earthsdk3 3.4.0-beta.11 → 3.4.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/earthsdk3.iife.js +36 -36
- package/dist/earthsdk3.js +1727 -1707
- package/dist/earthsdk3.umd.cjs +35 -35
- package/dist/types/ESJTypes/pickedInfos/index.d.ts +0 -15
- package/dist/types/ESJTypes/pickedInfos/index.d.ts.map +1 -1
- package/dist/types/ESJTypes/properties/ESJGeoRegion.d.ts +11 -0
- package/dist/types/ESJTypes/properties/ESJGeoRegion.d.ts.map +1 -0
- package/dist/types/ESJTypes/properties/index.d.ts +1 -0
- package/dist/types/ESJTypes/properties/index.d.ts.map +1 -1
- package/dist/types/ESObjects/base/ESSceneObject/index.d.ts +2 -13
- package/dist/types/ESObjects/base/ESSceneObject/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHole.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESHumanPoi.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESMsTileset/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts.map +1 -1
- package/dist/types/ESViewer/ESViewer.d.ts +14 -1
- package/dist/types/ESViewer/ESViewer.d.ts.map +1 -1
- package/dist/types/EngineObject/EngineObjectsContext.d.ts +2 -4
- package/dist/types/EngineObject/EngineObjectsContext.d.ts.map +1 -1
- package/dist/types/EngineObject/index.d.ts +1 -1
- package/dist/types/EngineObject/index.d.ts.map +1 -1
- package/dist/types/xbsj-base/index.d.ts +1 -0
- package/dist/types/xbsj-base/index.d.ts.map +1 -1
- package/dist/types/xbsj-base/xr-base-utils/events.d.ts +6 -2
- package/dist/types/xbsj-base/xr-base-utils/events.d.ts.map +1 -1
- package/dist/types/xbsj-base/xr-utils/ObservableSet.d.ts +20 -0
- package/dist/types/xbsj-base/xr-utils/ObservableSet.d.ts.map +1 -0
- package/dist/types/xbsj-base/xr-utils/index.d.ts +2 -0
- package/dist/types/xbsj-base/xr-utils/index.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/earthsdk3.iife.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var EarthSDK3=function(M,g){"use strict";var
|
|
1
|
+
var EarthSDK3=function(M,g){"use strict";var O2=Object.defineProperty;var D2=(M,g,jo)=>g in M?O2(M,g,{enumerable:!0,configurable:!0,writable:!0,value:jo}):M[g]=jo;var d=(M,g,jo)=>D2(M,typeof g!="symbol"?g+"":g,jo);function jo(){const r=navigator.userAgent;let t="Unknown";/Windows/.test(r)?t="Windows":/Macintosh/.test(r)?t="MacOS":/Linux/.test(r)?t="Linux":/Android/.test(r)?t="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?e="x64":/x86|i686|Win32/.test(r)?e="x86":/arm64|aarch64/.test(r)?e="arm64":/arm/.test(r)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const km=Date.now();function Cg(r){const{os:t,arch:e}=jo(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-km)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}M.copyright=void 0;try{const r="earthsdk3",t="3.4.0-beta.13",e="2025-09-04T08:27:38.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="231b182a7d40241080224d74ac33fc6a2203810a",a=((Date.now()-1756974458e3)/36e5).toFixed(1),u=`%c🌏 ${r}%c ${t}.${s.slice(0,8)}.${e} (距今${a}个小时)
|
|
2
2
|
%c${i?i+`
|
|
3
3
|
`:""}当前网站正在使用${r},此软件版权归${n}所有
|
|
4
|
-
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4
|
+
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","231b182a7d40241080224d74ac33fc6a2203810a")},get info(){return u},get date(){return"2025-09-04T08:27:38.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.13"},get name(){return"earthsdk3"},get commitId(){return"231b182a7d40241080224d74ac33fc6a2203810a"},print(){console.info(this.info,`
|
|
5
5
|
font-size: 18px;
|
|
6
6
|
font-weight: 1000;
|
|
7
7
|
line-height: 1;
|
|
@@ -18,9 +18,9 @@ var EarthSDK3=function(M,g){"use strict";var T2=Object.defineProperty;var A2=(M,
|
|
|
18
18
|
color: rgb(0, 120, 215);
|
|
19
19
|
padding-bottom: 2px;
|
|
20
20
|
padding-left: 35px;
|
|
21
|
-
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=M.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>Eg(M.copyright),6e4),setInterval(()=>Eg(M.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&M.copyright.print()}catch{console.warn("版本信息有误!")}function Gm(){return!0}function km(){throw new Error("throwOnDestroyed")}function Sg(r){for(var t in r)typeof r[t]=="function"&&(r[t]=km);r.isDestroyed=Gm}const Kl=class Kl{constructor(){d(this,"_memId",++Kl._lastMemId);d(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(t){return this.disposers.push(t),t}d(t){return this.dispose(t)}disposeVar(t){return this.disposers.push(()=>t.destroy()),t}dv(t){return this.disposeVar(t)}tryDisposeVar(t){return this.disposers.push(()=>t.tryDestroy()),t}tdv(t){return this.tryDisposeVar(t)}autoDispose(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}ad(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const t=this._disposers,e=t.length;for(let n=e-1;n>=0;--n)t[n]();t.length=0,this._disposers=void 0}catch(t){console.error(`destroy get error! ${t}`)}return Sg(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};d(Kl,"_lastMemId",-1);let ot=Kl,hc;function Cg(r){hc=r}Object.defineProperties(ot.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!hc)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new hc)}return this._toDestroyEvent}}});class lc{constructor(t,e,n=!1){d(this,"_freeElements");d(this,"_usedElementsCount");d(this,"_usedElements");d(this,"_nextCreateID");d(this,"_scratchObjs");this._createDefaultFunc=t,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],n&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let t;return this._freeElements.length>0?t=this._freeElements.pop():t=this._createDefaultFunc&&this._createDefaultFunc()||{},t._cid=this._getCreateID(),t}create(){return this._create()}multiCreate(t){this._scratchObjs.length=0;for(let e=0;e<t;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(t){this._destroyFunc&&this._destroyFunc(t),t._cid=void 0}destroy(...t){const e=t.length;for(let n=0;n<e;++n)this._destroy(t[n])}}function Vm(){return{item:void 0,previous:void 0,next:void 0}}function Um(r){r.item=void 0,r.previous=void 0,r.next=void 0}const Pg=new lc(Vm,Um,!0);function cc(r,t,e){const n=Pg.create();return n.item=r,n.previous=t,n.next=e,n}function Ig(r){if(!r)throw new Error("node is undefined!");Pg.destroy(r)}function fc(r,t){t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=void 0,r.tail=t.previous):t.next?(t.next.previous=void 0,r.head=t.next):(r.head=void 0,r.tail=void 0),t.next=void 0,t.previous=void 0}class Mg{constructor(t){d(this,"head");d(this,"tail");d(this,"_length");const{needLength:e}=t||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(t){typeof this._length=="number"&&(this._length=t)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let t=this.head;for(;t;)yield t,t=t.next}remove(t){if(!t)throw new Error("node is undefined!");fc(this,t),this._decrementLength(),Ig(t)}getNode(t){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===t)return e;e=e.next}}moveAfter(t,e){if(t!==e){fc(this,e);var n=t.next;t.next=e,this.tail===t?this.tail=e:n&&(n.previous=e),e.next=n,e.previous=t}}moveBefore(t,e){if(t!==e){fc(this,e);var n=t.previous;t.previous=e,this.head===t?this.head=e:n&&(n.next=e),e.previous=n,e.next=t}}insertBefore(t,e){const n=cc(e,t.previous,t);return t.previous&&(t.previous.next=n),t.previous=n,this.head===t&&(this.head=n),this._incrementLength(),n}insertAfter(t,e){const n=cc(e,t,t.next);return t.next&&(t.next.previous=n),t.next=n,this.tail===t&&(this.tail=n),this._incrementLength(),n}_setFirstNode(t){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=cc(t,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(t){return this.tail?this.insertAfter(this.tail,t):this._setFirstNode(t)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const t=this.tail.item;return this.remove(this.tail),t}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const t=this.head.item;return this.remove(this.head),t}unshift(t){return this.head?this.insertBefore(this.head,t):this._setFirstNode(t)}removeAll(){let t=this.head;for(;t;){const e=t.next;Ig(t),t=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}const bg=new Set;function Ng(r,t=r){bg.has(t)||(bg.add(t),console.warn(r))}function zm(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function qm(r){r.func=void 0,r.scope=void 0,r._hasRemoved=!1,r._once=!1}const no=new lc(zm,qm,!0);class dc{constructor(){d(this,"__dll");d(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new Mg({needLength:!0}),this.__dll}_pushCurrentListener(t){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(t):this.__currentListenerStack=[this.__currentListenerStack,t]:this.__currentListenerStack=t}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(t){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(t)!==-1:this.__currentListenerStack===t:!1}do(...t){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const n=e.item;n._hasRemoved||(this._pushCurrentListener(n),n.func.call(n.scope,...t),this._popCurrentListener());const i=e.next;n._once&&!n._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let t=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){t=!1;break}e=e.next}return t}isHandlerValid(t){return!t.item._hasRemoved}nextHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(t,e)}moveBefore(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(t,e)}insertBefore(t,e,n,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=no.create();return s.func=e,s.scope=n,s._once=i,this._dll.insertBefore(t,s)}insertAfter(t,e,n,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=no.create();return s.func=e,s.scope=n,s._once=i,this._dll.insertAfter(t,s)}_clearHasRemoved(t){t.item._hasRemoved&&!this._hasCurrentListener(t.item)&&(no.destroy(t.item),this._dll.remove(t))}remove(t){if(!t.item||t.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(t.item)?t.item._hasRemoved=!0:(no.destroy(t.item),this._dll.remove(t))}removeAll(){if(this.__dll&&!this._dll.empty){let t=this._dll.head;for(;t;){const e=t.next;t.item._hasRemoved||this.remove(t),t=e}}}destroy(){if(!this.__dll)return;let t=this._dll.head;for(;t;){const e=t.next,n=t;this._hasCurrentListener(n.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${n.item.func.toString()}`)),no.destroy(n.item),this._dll.remove(n),t=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(t,e,n=!1){const i=no.create();return i.func=t,i.scope=e,i._once=n,this._dll.push(i)}pop(){const t=this.tail;if(!t)throw new Error("pop error!");this.remove(t)}shift(){const t=this.head;if(!t)throw new Error("shift error!");this.remove(t)}unshift(t,e,n=!1){const i=no.create();return i.func=t,i.scope=e,i._once=n,this._dll.unshift(i)}get tail(){let t=this._dll.tail;for(;t&&t.item._hasRemoved;)t=t.previous;return t}get head(){let t=this._dll.head;for(;t&&t.item._hasRemoved;)t=t.previous;return t}}class Eu{constructor(){d(this,"_listenerHandler");d(this,"_cid")}_reset(t,e){this._listenerHandler=t,this._cid=e}clone(t){return t=t??new Eu,t._reset(this._listenerHandler,this._cid),t}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const t=this._listenerHandler._cid;if(typeof t<"u"&&this._cid===t)return!0}return!1}}class gc extends Eu{}let X=class extends ot{constructor(){super(...arguments);d(this,"__pipe");d(this,"beforeCallback");d(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new dc,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,n,i=!1,s){const o=i?this._pipe.unshift(e,n,!1):this._pipe.push(e,n,!1);return s=s??new gc,s._reset(o,o._cid),s}disposableOn(e,n,i=!1,s){const o=this.on(e,n,i,s);return()=>{o.valid&&this.off(o)}}don(e,n,i=!1,s){return this.disposableOn(e,n,i,s)}disposableWeakOn(e,n,i=!1,s){const o=new ot,a=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,n,i,s)),o.dispose(this.toDestroyEvent.disposableOn(a)),a}dwon(e,n,i=!1,s){return this.disposableWeakOn(e,n,i,s)}once(e,n,i=!1,s){const o=i?this._pipe.unshift(e,n,!0):this._pipe.push(e,n,!0);return s=s??new gc,s._reset(o,o._cid),s}disposableOnce(e,n,i=!1,s){const o=this.once(e,n,i,s);return()=>o.valid&&this.off(o)}donce(e,n,i=!1,s){const o=this.once(e,n,i,s);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(Ng("The event is destroying with listeners!"),this._pipe.removeAll())}};Cg(X);function Qo(r,t){return t=t??new Eu,t._reset(r,r._cid),t}class Wm{constructor(){d(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new dc,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...t){return this._pipe.do(...t)}isHandlerValid(t){return t.valid?this._pipe.isHandlerValid(t._listenerHandler):!1}moveAfter(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}moveBefore(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}insertBefore(t,e,n,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(t._listenerHandler,e,n,i);return Qo(o,s)}insertAfter(t,e,n,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(t._listenerHandler,e,n,i);return Qo(o,s)}remove(t){if(!t.valid)throw new Error("handler is not valid!");return this._pipe.remove(t._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(t,e,n=!1,i){const s=this._pipe.push(t,e,n);return Qo(s,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(t,e,n=!1,i){const s=this._pipe.unshift(t,e,n);return Qo(s,i)}getTail(t){const e=this._pipe.tail;if(e)return Qo(e,t)}getHead(t){const e=this._pipe.head;if(e)return Qo(e,t)}}function Xm(r,t,...e){const n=setInterval(r,t,...e);return()=>clearInterval(n)}function Hm(r,t,...e){const n=setTimeout(r,t,...e);return()=>clearTimeout(n)}function Bm(r,...t){let e;const n=()=>{const i=performance.now();r(i,...t),e=requestAnimationFrame(n)};return n(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function xg(r,...t){let e;return e=requestAnimationFrame(()=>{const i=performance.now();r(i,...t)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Ym(r,...t){let e=!1,n;return new Promise((i,s)=>{n=s,i()}).then(()=>{!e&&r(...t)}).catch(i=>{console.error(i)}),()=>(e=!0)&&n&&(n("nextMicroTask cancelled!"),n=void 0)}class Jm extends X{constructor(e,n,...i){super();d(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(s=>this.dispose(s[n?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class Tg extends Jm{constructor(...t){super(xg,!1,...t)}}function Su(r,t,e="don"){const n=new Tg(...r),i=n[e](t);return()=>{i(),n.destroy()}}function jm(r,t,e){typeof e>"u"&&(t.endsWith(".gltf")?e="model/gltf+json":t.endsWith(".bin")?e="application/octet-stream":t.endsWith(".glb")?e="model/gltf-binary":t.endsWith(".jpg")||t.endsWith(".jpeg")?e="image/jpeg":t.endsWith(".png")?e="image/png":t.endsWith(".glsl")?e="text/plain":t.endsWith(".json")?e="application/json":t.endsWith(".b3dm")||t.endsWith(".i3dm")||t.endsWith("pnts")||t.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${t}: MimeType无法确定!`));const n=new Blob([r],{type:e||""});let i=URL.createObjectURL(n);var s=document.createElement("a"),o=new MouseEvent("click");s.download=t,s.href=i,s.dispatchEvent(o),URL.revokeObjectURL(i)}function Qm(r,t){const e=document.createElement("a"),n=new MouseEvent("click");e.download=t||"下载",e.href=r,e.dispatchEvent(n)}class Km extends ot{constructor(){super(...arguments);d(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s}getEngineObjConstructor(e,n){const i=this.registerEngines[n];if(!i)return;let s=e.constructor,o=e.typeName,a=i.get(o);if(a)return a;const u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${n}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(e,n){const i=this.getEngineObjConstructor(e,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new io(e,n);return s.createdEvent.emit(),s}}}class $m extends ot{constructor(){super(...arguments);d(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s}getEngineObjConstructor(e,n){const s=(this.registerEngines[n]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${n}中对应的实现类!`)}createEngineObject(e,n){const i=this.getEngineObjConstructor(e.typeName,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new io(e,n);return s.createdEvent.emit(),s}}}const Vn=class Vn extends ot{constructor(e,n,i=!1){super();d(this,"_createdEvent",this.dv(new X));d(this,"_id",++Vn._accumId);this._sceneObject=e,this._viewer=n;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};d(Vn,"context",new Km),d(Vn,"contextEditing",new $m),d(Vn,"register",Vn.context.register.bind(Vn.context)),d(Vn,"registerEditing",Vn.contextEditing.register.bind(Vn.contextEditing)),d(Vn,"_accumId",-1);let io=Vn;const $l=class $l extends ot{constructor(e,n){super();d(this,"_id",++$l._accumId);this._name=e,this._description=n}get id(){return this._id}get name(){return this._name}get description(){return this._description}};d($l,"_accumId",-1);let ws=$l;class pc extends ws{constructor(t,e,n,i,s){super(t,e),this._withUndefined=n,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Ot extends pc{constructor(t,e,n,i,s,o){const a=t instanceof g.ReactiveVariable?"未获取到属性名":t[1].toString();super(e??a,o??a,i??!1,s??!1,n),this._reactVar=t}get reactVar(){return this._reactVar}}class Z extends Ot{get type(){return"BooleanProperty"}}class Et extends Ot{get type(){return"StringProperty"}}class L extends Ot{get type(){return"NumberProperty"}}class Zm extends Ot{get type(){return"MaximumScreenSpaceErrorProperty"}}class Ag extends Ot{get type(){return"StringsProperty"}}class ty extends Ot{get type(){return"NumbersProperty"}}class ey extends Ot{get type(){return"BooleansProperty"}}class ry extends Ot{get type(){return"String2Property"}}class ny extends Ot{get type(){return"String3Property"}}class iy extends Ot{get type(){return"String4Property"}}class Og extends Ot{get type(){return"String2sProperty"}}class sy extends Ot{get type(){return"String3sProperty"}}class oy extends Ot{get type(){return"String4sProperty"}}class ze extends Ot{get type(){return"Number2Property"}}class cr extends Ot{get type(){return"Number3Property"}}class Yn extends Ot{get type(){return"Number4Property"}}class ay extends Ot{get type(){return"Number4WithUndefinedProperty"}}class Dg extends Ot{get type(){return"Number2sProperty"}}class vc extends Ot{get type(){return"Number3sProperty"}}class uy extends Ot{get type(){return"Number4sProperty"}}class hy extends Ot{get type(){return"Boolean2Property"}}class ly extends Ot{get type(){return"Boolean3Property"}}class cy extends Ot{get type(){return"Boolean4Property"}}class fy extends Ot{get type(){return"Boolean2sProperty"}}class dy extends Ot{get type(){return"Boolean3sProperty"}}class gy extends Ot{get type(){return"Boolean4sProperty"}}class py extends Ot{get type(){return"StringNumberProperty"}}class vy extends Ot{get type(){return"StringNumbersProperty"}}class Gt extends Yn{get type(){return"ColorProperty"}}class my extends cr{get type(){return"ColorRgbProperty"}}class yy extends L{get type(){return"DashPatternProperty"}}class Tt extends Ot{constructor(t,e,n,i,s,o,a){super(t,n,i,s,o,a),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class _y extends Ot{constructor(t,e,n,i,s,o,a){super(t,n,i,s,o,a),this._enums=e}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Es extends Ot{constructor(t,e,n,i,s,o,a){super(t,e,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class Lg extends Ot{constructor(t,e,n,i,s){super(t,e,i,!1,!1,s),this._paramTypes=n}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class mt extends ws{constructor(e,n,i,s,o){const a=s??"Unnamed Function";super(a,o??a);d(this,"_paramsProperty");d(this,"_getValueFunc");this._func=n;const u=this.disposeVar(g.reactJson(i));this._paramsProperty=this.disposeVar(new Lg(u,a+"_params",e,i));const[h]=g.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=h}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class vt extends ws{constructor(t,e,n){const i=e??"分组";super(i,n??i),this._children=t}get type(){return"GroupProperty"}get children(){return this._children}}class lt extends Ot{constructor(t,e,n,i,s,o,a){super(t,e,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class mc extends Ot{constructor(t,e,n,i,s,o,a){super(t,e,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class wy extends ze{get type(){return"MinmaxProperty"}}class Ey extends Yn{get type(){return"NearFarScalerProperty"}}class Rg extends pc{constructor(t,e,n,i,s,o,a){const u=n??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=t,this._setJsonStringFunc=e}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Sy extends ze{get type(){return"NumberRangeProperty"}}class Be extends Ot{constructor(t,e,n,i,s,o,a,u){super(t,i,s,o,a,u),this._step=e,this._minMax=n}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function Cy(r,t){const[e,n,i]=g.getReactFuncs(r),[s,o,a]=g.getReactFuncs(t),u=g.react((e()??0)/(s()??3e3)),h=()=>{const l=u.value,c=s()??3e3,f=e()??0;if(!Number.isFinite(c)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${c} currentTime: ${f}`);return}Math.abs(l*c-f)<.001||(c<=0?u.value=0:u.value=f/c)};return u.dispose(i.disposableOn(h)),u.dispose(a.disposableOn(h)),u.dispose(u.changed.disposableOn(()=>{const l=u.value,c=s()??3e3,f=e()??0;if(!Number.isFinite(c)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${c} currentTime: ${f}`);return}Math.abs(l*c-f)<.001||n(l*c)})),u}class Uh extends ws{constructor(e,n,i,s,o,a){super(s??"播放器",a??"播放器");d(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=n,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}d(Uh,"createPlayingRatio",Cy);class Ko extends cr{get type(){return"PositionProperty"}}class Fg extends Ot{get type(){return"PositionsProperty"}}class Py extends Ot{get type(){return"PositionsSetPropety"}}class yc extends cr{get type(){return"RotationProperty"}}class Cu extends Et{get type(){return"UriProperty"}}class Gg extends ws{constructor(e,n,i,s,o,a){const u=s??"视角播放器";super(u,a??u);d(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=n,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class kg extends Ot{get type(){return"DatesProperty"}}class so extends Ot{get type(){return"DateProperty"}}var ct=(r=>(r.Place="place",r.Translation="translation",r.Rotation="rotation",r.Scale="scale",r.DoublePointsAppend="doublePointsAppend",r.DoublePointsModify="doublePointsModify",r.CircularAppend="circularAppend",r.CircularInsert="circularInsert",r.LineStringAppend="lineStringAppend",r.LineStringInsert="lineStringInsert",r.ScatterAppend="scatterAppend",r.ScatterModify="scatterModify",r.VisibilityAppend="visibilityAppend",r.VisibilityModify="visibilityModify",r.HeightModify="heightModify",r))(ct||{}),Vg=(r=>(r.DECIMAL_DEGREE="DECIMAL_DEGREE",r.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",r.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",r))(Vg||{});class Iy{constructor(t){this.childPickedInfo=t}}class My{constructor(t,e,n,i,s,o){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=n,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class by extends ot{constructor(e){super();d(this,"_sceneObjRefs",new Map);d(this,"_refs",{});d(this,"_refsChanged",this.dv(new X));const n=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const l=u.indexOf(i);l===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(l,1),u.length===0&&this._sceneObjRefs.delete(o))}const h=this.getLastSceneObject(o);this._refs[o]=h,this._refsChanged.emit(h,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
21
|
+
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=M.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>Cg(M.copyright),6e4),setInterval(()=>Cg(M.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&M.copyright.print()}catch{console.warn("版本信息有误!")}function Vm(){return!0}function Um(){throw new Error("throwOnDestroyed")}function Pg(r){for(var t in r)typeof r[t]=="function"&&(r[t]=Um);r.isDestroyed=Vm}const $l=class $l{constructor(){d(this,"_memId",++$l._lastMemId);d(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(t){return this.disposers.push(t),t}d(t){return this.dispose(t)}disposeVar(t){return this.disposers.push(()=>t.destroy()),t}dv(t){return this.disposeVar(t)}tryDisposeVar(t){return this.disposers.push(()=>t.tryDestroy()),t}tdv(t){return this.tryDisposeVar(t)}autoDispose(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}ad(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const t=this._disposers,e=t.length;for(let n=e-1;n>=0;--n)t[n]();t.length=0,this._disposers=void 0}catch(t){console.error(`destroy get error! ${t}`)}return Pg(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};d($l,"_lastMemId",-1);let ot=$l,cc;function Ig(r){cc=r}Object.defineProperties(ot.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!cc)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new cc)}return this._toDestroyEvent}}});class fc{constructor(t,e,n=!1){d(this,"_freeElements");d(this,"_usedElementsCount");d(this,"_usedElements");d(this,"_nextCreateID");d(this,"_scratchObjs");this._createDefaultFunc=t,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],n&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let t;return this._freeElements.length>0?t=this._freeElements.pop():t=this._createDefaultFunc&&this._createDefaultFunc()||{},t._cid=this._getCreateID(),t}create(){return this._create()}multiCreate(t){this._scratchObjs.length=0;for(let e=0;e<t;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(t){this._destroyFunc&&this._destroyFunc(t),t._cid=void 0}destroy(...t){const e=t.length;for(let n=0;n<e;++n)this._destroy(t[n])}}function zm(){return{item:void 0,previous:void 0,next:void 0}}function qm(r){r.item=void 0,r.previous=void 0,r.next=void 0}const Mg=new fc(zm,qm,!0);function dc(r,t,e){const n=Mg.create();return n.item=r,n.previous=t,n.next=e,n}function bg(r){if(!r)throw new Error("node is undefined!");Mg.destroy(r)}function gc(r,t){t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=void 0,r.tail=t.previous):t.next?(t.next.previous=void 0,r.head=t.next):(r.head=void 0,r.tail=void 0),t.next=void 0,t.previous=void 0}class Ng{constructor(t){d(this,"head");d(this,"tail");d(this,"_length");const{needLength:e}=t||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(t){typeof this._length=="number"&&(this._length=t)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let t=this.head;for(;t;)yield t,t=t.next}remove(t){if(!t)throw new Error("node is undefined!");gc(this,t),this._decrementLength(),bg(t)}getNode(t){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===t)return e;e=e.next}}moveAfter(t,e){if(t!==e){gc(this,e);var n=t.next;t.next=e,this.tail===t?this.tail=e:n&&(n.previous=e),e.next=n,e.previous=t}}moveBefore(t,e){if(t!==e){gc(this,e);var n=t.previous;t.previous=e,this.head===t?this.head=e:n&&(n.next=e),e.previous=n,e.next=t}}insertBefore(t,e){const n=dc(e,t.previous,t);return t.previous&&(t.previous.next=n),t.previous=n,this.head===t&&(this.head=n),this._incrementLength(),n}insertAfter(t,e){const n=dc(e,t,t.next);return t.next&&(t.next.previous=n),t.next=n,this.tail===t&&(this.tail=n),this._incrementLength(),n}_setFirstNode(t){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=dc(t,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(t){return this.tail?this.insertAfter(this.tail,t):this._setFirstNode(t)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const t=this.tail.item;return this.remove(this.tail),t}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const t=this.head.item;return this.remove(this.head),t}unshift(t){return this.head?this.insertBefore(this.head,t):this._setFirstNode(t)}removeAll(){let t=this.head;for(;t;){const e=t.next;bg(t),t=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}const xg=new Set;function Tg(r,t=r){xg.has(t)||(xg.add(t),console.warn(r))}function Wm(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function Xm(r){r.func=void 0,r.scope=void 0,r._hasRemoved=!1,r._once=!1}const no=new fc(Wm,Xm,!0);class pc{constructor(){d(this,"__dll");d(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new Ng({needLength:!0}),this.__dll}_pushCurrentListener(t){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(t):this.__currentListenerStack=[this.__currentListenerStack,t]:this.__currentListenerStack=t}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(t){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(t)!==-1:this.__currentListenerStack===t:!1}do(...t){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const n=e.item;n._hasRemoved||(this._pushCurrentListener(n),n.func.call(n.scope,...t),this._popCurrentListener());const i=e.next;n._once&&!n._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let t=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){t=!1;break}e=e.next}return t}isHandlerValid(t){return!t.item._hasRemoved}nextHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(t,e)}moveBefore(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(t,e)}insertBefore(t,e,n,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=no.create();return s.func=e,s.scope=n,s._once=i,this._dll.insertBefore(t,s)}insertAfter(t,e,n,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=no.create();return s.func=e,s.scope=n,s._once=i,this._dll.insertAfter(t,s)}_clearHasRemoved(t){t.item._hasRemoved&&!this._hasCurrentListener(t.item)&&(no.destroy(t.item),this._dll.remove(t))}remove(t){if(!t.item||t.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(t.item)?t.item._hasRemoved=!0:(no.destroy(t.item),this._dll.remove(t))}removeAll(){if(this.__dll&&!this._dll.empty){let t=this._dll.head;for(;t;){const e=t.next;t.item._hasRemoved||this.remove(t),t=e}}}destroy(){if(!this.__dll)return;let t=this._dll.head;for(;t;){const e=t.next,n=t;this._hasCurrentListener(n.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${n.item.func.toString()}`)),no.destroy(n.item),this._dll.remove(n),t=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(t,e,n=!1){const i=no.create();return i.func=t,i.scope=e,i._once=n,this._dll.push(i)}pop(){const t=this.tail;if(!t)throw new Error("pop error!");this.remove(t)}shift(){const t=this.head;if(!t)throw new Error("shift error!");this.remove(t)}unshift(t,e,n=!1){const i=no.create();return i.func=t,i.scope=e,i._once=n,this._dll.unshift(i)}get tail(){let t=this._dll.tail;for(;t&&t.item._hasRemoved;)t=t.previous;return t}get head(){let t=this._dll.head;for(;t&&t.item._hasRemoved;)t=t.previous;return t}}class Eu{constructor(){d(this,"_listenerHandler");d(this,"_cid")}_reset(t,e){this._listenerHandler=t,this._cid=e}clone(t){return t=t??new Eu,t._reset(this._listenerHandler,this._cid),t}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const t=this._listenerHandler._cid;if(typeof t<"u"&&this._cid===t)return!0}return!1}}class vc extends Eu{}let X=class extends ot{constructor(){super(...arguments);d(this,"__pipe");d(this,"beforeCallback");d(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new pc,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,n,i=!1,s){const o=i?this._pipe.unshift(e,n,!1):this._pipe.push(e,n,!1);return s=s??new vc,s._reset(o,o._cid),s}disposableOn(e,n,i=!1,s){const o=this.on(e,n,i,s);return()=>{o.valid&&this.off(o)}}don(e,n,i=!1,s){return this.disposableOn(e,n,i,s)}disposableWeakOn(e,n,i=!1,s){const o=new ot,a=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,n,i,s)),o.dispose(this.toDestroyEvent.disposableOn(a)),a}dwon(e,n,i=!1,s){return this.disposableWeakOn(e,n,i,s)}once(e,n,i=!1,s){const o=i?this._pipe.unshift(e,n,!0):this._pipe.push(e,n,!0);return s=s??new vc,s._reset(o,o._cid),s}disposableOnce(e,n,i=!1,s){const o=this.once(e,n,i,s);return()=>o.valid&&this.off(o)}donce(e,n,i=!1,s){const o=this.once(e,n,i,s);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(Tg("The event is destroying with listeners!"),this._pipe.removeAll())}};Ig(X);function Qo(r,t){return t=t??new Eu,t._reset(r,r._cid),t}class Hm{constructor(){d(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new pc,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...t){return this._pipe.do(...t)}isHandlerValid(t){return t.valid?this._pipe.isHandlerValid(t._listenerHandler):!1}moveAfter(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}moveBefore(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}insertBefore(t,e,n,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(t._listenerHandler,e,n,i);return Qo(o,s)}insertAfter(t,e,n,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(t._listenerHandler,e,n,i);return Qo(o,s)}remove(t){if(!t.valid)throw new Error("handler is not valid!");return this._pipe.remove(t._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(t,e,n=!1,i){const s=this._pipe.push(t,e,n);return Qo(s,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(t,e,n=!1,i){const s=this._pipe.unshift(t,e,n);return Qo(s,i)}getTail(t){const e=this._pipe.tail;if(e)return Qo(e,t)}getHead(t){const e=this._pipe.head;if(e)return Qo(e,t)}}function Bm(r,t,...e){const n=setInterval(r,t,...e);return()=>clearInterval(n)}function Ym(r,t,...e){const n=setTimeout(r,t,...e);return()=>clearTimeout(n)}function Jm(r,...t){let e;const n=()=>{const i=performance.now();r(i,...t),e=requestAnimationFrame(n)};return n(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Ag(r,...t){let e;return e=requestAnimationFrame(()=>{const i=performance.now();r(i,...t)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function jm(r,...t){let e=!1,n;return new Promise((i,s)=>{n=s,i()}).then(()=>{!e&&r(...t)}).catch(i=>{console.error(i)}),()=>(e=!0)&&n&&(n("nextMicroTask cancelled!"),n=void 0)}class Qm extends X{constructor(e,n,...i){super();d(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(s=>this.dispose(s[n?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class Og extends Qm{constructor(...t){super(Ag,!1,...t)}}function Su(r,t,e={time:"don",immediate:!1}){const n=new Og(...Array.isArray(r)?r:[r]),i=n[e.time??"don"](t);return(e.immediate??!1)&&t(),()=>{i(),n.destroy()}}function Km(r,t,e){typeof e>"u"&&(t.endsWith(".gltf")?e="model/gltf+json":t.endsWith(".bin")?e="application/octet-stream":t.endsWith(".glb")?e="model/gltf-binary":t.endsWith(".jpg")||t.endsWith(".jpeg")?e="image/jpeg":t.endsWith(".png")?e="image/png":t.endsWith(".glsl")?e="text/plain":t.endsWith(".json")?e="application/json":t.endsWith(".b3dm")||t.endsWith(".i3dm")||t.endsWith("pnts")||t.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${t}: MimeType无法确定!`));const n=new Blob([r],{type:e||""});let i=URL.createObjectURL(n);var s=document.createElement("a"),o=new MouseEvent("click");s.download=t,s.href=i,s.dispatchEvent(o),URL.revokeObjectURL(i)}function $m(r,t){const e=document.createElement("a"),n=new MouseEvent("click");e.download=t||"下载",e.href=r,e.dispatchEvent(n)}const Zl=class Zl extends ot{constructor(){super();d(this,"_set",new Set);d(this,"_toChangeEvent",this.disposeVar(new X));d(this,"_changedEvent",this.disposeVar(new X));d(this,"main");this.dispose(()=>{this._set.size!==0&&(Zl.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...e){if(e.length==2&&typeof e[1]=="boolean")e[1]&&(this.main=e[0]);else for(let n of e)this._toChangeEvent.emit([],[n]),this._set.add(n),this._changedEvent.emit([],[n])}delete(...e){for(let n of e)this.main&&this.main==n&&(this.main=void 0),this._toChangeEvent.emit([n],[]),this._set.delete(n),this._changedEvent.emit([n],[])}disposableAdd(...e){return e.length==2&&typeof e[1]=="boolean"?(e[1]&&(this.main=e[0]),this.add(e[0]),()=>this.delete(e[0])):(this.add(...e),()=>this.delete(...e))}get size(){return this._set.size}clear(){const e=[...this._set];this._toChangeEvent.emit([],e),this._set.clear(),this._changedEvent.emit([],e)}values(){return this._set.values()}};d(Zl,"warnOnDestroying",!0);let Uh=Zl;class Zm extends ot{constructor(){super(...arguments);d(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;return s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s,n}getEngineObjConstructor(e,n){const i=this.registerEngines[n];if(!i)return;let s=e.constructor,o=e.typeName,a=i.get(o);if(a)return a;if(e.components.main)return;const u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${n}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(e,n){const i=this.getEngineObjConstructor(e,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new io(e,n);return s.createdEvent.emit(),s}}}class ty extends ot{constructor(){super(...arguments);d(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s}getEngineObjConstructor(e,n){const s=(this.registerEngines[n]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${n}中对应的实现类!`)}createEngineObject(e,n){const i=this.getEngineObjConstructor(e.typeName,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new io(e,n);return s.createdEvent.emit(),s}}}const Vn=class Vn extends ot{constructor(e,n,i=!1){super();d(this,"_createdEvent",this.dv(new X));d(this,"_id",++Vn._accumId);this._sceneObject=e,this._viewer=n;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};d(Vn,"context",new Zm),d(Vn,"contextEditing",new ty),d(Vn,"register",Vn.context.register.bind(Vn.context)),d(Vn,"registerEditing",Vn.contextEditing.register.bind(Vn.contextEditing)),d(Vn,"_accumId",-1);let io=Vn;const tc=class tc extends ot{constructor(e,n){super();d(this,"_id",++tc._accumId);this._name=e,this._description=n}get id(){return this._id}get name(){return this._name}get description(){return this._description}};d(tc,"_accumId",-1);let ws=tc;class mc extends ws{constructor(t,e,n,i,s){super(t,e),this._withUndefined=n,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Ot extends mc{constructor(t,e,n,i,s,o){const a=t instanceof g.ReactiveVariable?"未获取到属性名":t[1].toString();super(e??a,o??a,i??!1,s??!1,n),this._reactVar=t}get reactVar(){return this._reactVar}}class Z extends Ot{get type(){return"BooleanProperty"}}class Et extends Ot{get type(){return"StringProperty"}}class L extends Ot{get type(){return"NumberProperty"}}class ey extends Ot{get type(){return"MaximumScreenSpaceErrorProperty"}}class Dg extends Ot{get type(){return"StringsProperty"}}class ry extends Ot{get type(){return"NumbersProperty"}}class ny extends Ot{get type(){return"BooleansProperty"}}class iy extends Ot{get type(){return"String2Property"}}class sy extends Ot{get type(){return"String3Property"}}class oy extends Ot{get type(){return"String4Property"}}class Lg extends Ot{get type(){return"String2sProperty"}}class ay extends Ot{get type(){return"String3sProperty"}}class uy extends Ot{get type(){return"String4sProperty"}}class ze extends Ot{get type(){return"Number2Property"}}class cr extends Ot{get type(){return"Number3Property"}}class Yn extends Ot{get type(){return"Number4Property"}}class hy extends Ot{get type(){return"Number4WithUndefinedProperty"}}class Rg extends Ot{get type(){return"Number2sProperty"}}class yc extends Ot{get type(){return"Number3sProperty"}}class ly extends Ot{get type(){return"Number4sProperty"}}class cy extends Ot{get type(){return"Boolean2Property"}}class fy extends Ot{get type(){return"Boolean3Property"}}class dy extends Ot{get type(){return"Boolean4Property"}}class gy extends Ot{get type(){return"Boolean2sProperty"}}class py extends Ot{get type(){return"Boolean3sProperty"}}class vy extends Ot{get type(){return"Boolean4sProperty"}}class my extends Ot{get type(){return"StringNumberProperty"}}class yy extends Ot{get type(){return"StringNumbersProperty"}}class Gt extends Yn{get type(){return"ColorProperty"}}class _y extends cr{get type(){return"ColorRgbProperty"}}class wy extends L{get type(){return"DashPatternProperty"}}class Tt extends Ot{constructor(t,e,n,i,s,o,a){super(t,n,i,s,o,a),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class Ey extends Ot{constructor(t,e,n,i,s,o,a){super(t,n,i,s,o,a),this._enums=e}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Es extends Ot{constructor(t,e,n,i,s,o,a){super(t,e,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class Fg extends Ot{constructor(t,e,n,i,s){super(t,e,i,!1,!1,s),this._paramTypes=n}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class mt extends ws{constructor(e,n,i,s,o){const a=s??"Unnamed Function";super(a,o??a);d(this,"_paramsProperty");d(this,"_getValueFunc");this._func=n;const u=this.disposeVar(g.reactJson(i));this._paramsProperty=this.disposeVar(new Fg(u,a+"_params",e,i));const[h]=g.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=h}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class vt extends ws{constructor(t,e,n){const i=e??"分组";super(i,n??i),this._children=t}get type(){return"GroupProperty"}get children(){return this._children}}class lt extends Ot{constructor(t,e,n,i,s,o,a){super(t,e,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class _c extends Ot{constructor(t,e,n,i,s,o,a){super(t,e,n,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class Sy extends ze{get type(){return"MinmaxProperty"}}class Cy extends Yn{get type(){return"NearFarScalerProperty"}}class Gg extends mc{constructor(t,e,n,i,s,o,a){const u=n??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=t,this._setJsonStringFunc=e}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Py extends ze{get type(){return"NumberRangeProperty"}}class Be extends Ot{constructor(t,e,n,i,s,o,a,u){super(t,i,s,o,a,u),this._step=e,this._minMax=n}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function Iy(r,t){const[e,n,i]=g.getReactFuncs(r),[s,o,a]=g.getReactFuncs(t),u=g.react((e()??0)/(s()??3e3)),h=()=>{const l=u.value,c=s()??3e3,f=e()??0;if(!Number.isFinite(c)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${c} currentTime: ${f}`);return}Math.abs(l*c-f)<.001||(c<=0?u.value=0:u.value=f/c)};return u.dispose(i.disposableOn(h)),u.dispose(a.disposableOn(h)),u.dispose(u.changed.disposableOn(()=>{const l=u.value,c=s()??3e3,f=e()??0;if(!Number.isFinite(c)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${c} currentTime: ${f}`);return}Math.abs(l*c-f)<.001||n(l*c)})),u}class zh extends ws{constructor(e,n,i,s,o,a){super(s??"播放器",a??"播放器");d(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=n,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}d(zh,"createPlayingRatio",Iy);class Ko extends cr{get type(){return"PositionProperty"}}class kg extends Ot{get type(){return"PositionsProperty"}}class My extends Ot{get type(){return"PositionsSetPropety"}}class wc extends cr{get type(){return"RotationProperty"}}class Cu extends Et{get type(){return"UriProperty"}}class Vg extends ws{constructor(e,n,i,s,o,a){const u=s??"视角播放器";super(u,a??u);d(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=n,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class Ug extends Ot{get type(){return"DatesProperty"}}class so extends Ot{get type(){return"DateProperty"}}var ct=(r=>(r.Place="place",r.Translation="translation",r.Rotation="rotation",r.Scale="scale",r.DoublePointsAppend="doublePointsAppend",r.DoublePointsModify="doublePointsModify",r.CircularAppend="circularAppend",r.CircularInsert="circularInsert",r.LineStringAppend="lineStringAppend",r.LineStringInsert="lineStringInsert",r.ScatterAppend="scatterAppend",r.ScatterModify="scatterModify",r.VisibilityAppend="visibilityAppend",r.VisibilityModify="visibilityModify",r.HeightModify="heightModify",r))(ct||{}),zg=(r=>(r.DECIMAL_DEGREE="DECIMAL_DEGREE",r.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",r.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",r))(zg||{});class by{constructor(t){this.childPickedInfo=t}}class Ny{constructor(t,e,n,i,s,o){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=n,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class xy extends ot{constructor(e){super();d(this,"_sceneObjRefs",new Map);d(this,"_refs",{});d(this,"_refsChanged",this.dv(new X));const n=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const l=u.indexOf(i);l===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(l,1),u.length===0&&this._sceneObjRefs.delete(o))}const h=this.getLastSceneObject(o);this._refs[o]=h,this._refsChanged.emit(h,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
22
22
|
${u.map(l=>`${l.id} ${l.typeName}
|
|
23
|
-
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const h=this.getLastSceneObject(s);this._refs[s]=h,this._refsChanged.emit(h,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>n(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&n(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const n=this.getSceneObjects(e);if(n)return n[n.length-1]}getSceneObjects(e){const n=this._sceneObjRefs.get(e);if(!(!n||n.length===0))return n}}function Ug(r,t){const[e,n,i]=g.getReactFuncs(r),s=g.react(void 0),o=()=>{const a=e()??t;s.value=a&&ft.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(ft.context.environmentVariablesChanged.don(o)),s}function zg(r){const t=/\${(.*?)\}/g;if(!t.test(r))return r;const e=r.replace(t,(n,i)=>{const s=ft.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return zg(e)}class Ny extends ot{constructor(){super();d(this,"_esObjConstructors",new Map);d(this,"_sceneObjs",new Map);d(this,"_sceneObjCreatedEvent",new X);d(this,"_sceneObjToDestroyEvent",new X);d(this,"_refsManager",this.dv(new by(this)));d(this,"_environmentVariables",window.ESSDK_ENV||{});d(this,"_environmentVariablesChanged",this.dv(new X))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,n,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,n),i&&g.setExtProp(n,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,n){if(!n||this._sceneObjs.has(n)){const s=g.createGuid();n&&console.warn(`已存在相同id的对象!id自动变更!${n} -> ${s} 请注意:id变更可能导致引用失效!`),n=s}if(!n)throw new Error("id不能为空!");const i=new e(n);return i.id!==n&&(console.warn(`sceneObj.id(${i.id}) !== id(${n}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,n){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,n)}else return this.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){const n=this.createSceneObject(e.type,e.id);return n&&(n.json=e),n}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const n=[];for(const i of this._sceneObjs.values())i.typeName===e&&n.push(i);return n}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const n=this._esObjConstructors.get(e);if(n)return n}getProps(e){const n=this._getSceneObjConstructor(e);if(!n){console.warn(`cannot get constructor from type: ${e}`);return}return g.getExtProp(n,"__sceneObjExtraInfo")}setProps(e,n){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=g.getExtProp(i,"__sceneObjExtraInfo");s||(s={},g.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,n)}getProp(e,n){const i=this.getProps(e);return i&&i[n]}setProp(e,n,i){this.setProps(e,{[n]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[n,i]of Object.entries(e))this.setEnv(n,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,n){if(this._environmentVariables[e]!==n){const i=this._environmentVariables[e];this._environmentVariables[e]=n,this._environmentVariablesChanged.emit(e,n,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return zg(e)}createEnvStrReact(e,n){return Ug(e,n)}createEvnStrReact(e,n){return Ug(e,n)}}const Mt=class Mt extends ot{constructor(e){super();d(this,"_components",this.dv(new g.ObservableSet));d(this,"_viewerAttached",this.dv(new X));d(this,"_viewerDetached",this.dv(new X));d(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(n=>{n.actived&&(this.activeViewer=n),n.ad(n.activedChanged.don(i=>{i&&e.has(n)&&(this.activeViewer=n)})),e.add(n)})),this.d(this._viewerDetached.don(n=>{e.delete(n),this.activeViewer==n&&(this.activeViewer=void 0)})),e})());d(this,"_activeViewer",this.disposeVar(g.react(void 0)));d(this,"_createdEvent",this.dv(new X));d(this,"_flushEvent",this.dv(new X));d(this,"_id");d(this,"_mainClass");d(this,"_updateFuncReact",this.dv(g.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(g.react(void 0)));d(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??g.createGuid(),this._initName();{const n=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};n(),this.d(this.execOnceFuncStrChanged.don(n))}{const n=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};n(),this.d(this.updateFuncStrChanged.don(n));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||g.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const n=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};n(),this.d(this.toDestroyFuncStrChanged.don(n)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,n,i){g.extendClassProps(n.prototype,n.createDefaultProps);const s=n.createDefaultProps();n.defaults&&(n.defaults={});for(const o of Object.keys(s))n.defaults[o]=s[o]instanceof g.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,n,i),e}static get envs(){return Mt.context.environmentVariables}static get $refs(){return Mt.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const n=new Map;this.d(()=>{n.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&n.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!n.has(i))return;const s=n.get(i);s&&(s.destroy(),n.delete(i))}))}createAttachedObject(e){const n=new Map,i=()=>{for(let[u,h]of n.entries())h.destroy();n.clear()},s=u=>{const h=e(u);h&&n.set(u,h)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!n.has(u))return;const h=n.get(u);h&&(h.destroy(),n.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(n=>new xy(n,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}get mainClass(){return this._mainClass??this}set mainClass(e){this._mainClass=e}_innerGetJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof g.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_innerSetJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof g.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getProperties(e){const n={...this.getESProperties()},i=[];return n.general.length>0&&i.push(new vt(n.general,"general")),Object.keys(n).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&n[s].length>0&&i.push(new vt(n[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new Et([this,"typeName"],"类型",void 0,!1,!0),new Et([this,"id"],"唯一标识",void 0,!1,!0),new Et([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new Et([this,"ref"],"ref",void 0,!0),new lt([this,"extras"],"extras",void 0,void 0,!0),new Rg(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};d(Mt,"context",new Ny),d(Mt,"innerRegister",Mt.context.register.bind(Mt.context)),d(Mt,"defaults",{}),d(Mt,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:g.reactJson(void 0),devTags:g.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),d(Mt,"type",Mt.register("ESSceneObject",Mt,{chsName:"场景类",tags:["ESObjects"],description:""})),d(Mt,"create",Mt.context.createSceneObject.bind(Mt.context)),d(Mt,"createFromClass",Mt.context.createSceneObjectFromClass.bind(Mt.context)),d(Mt,"createFromJson",Mt.context.createSceneObjectFromJson.bind(Mt.context)),d(Mt,"destroySceneObject",Mt.context.destroySceneObject.bind(Mt.context)),d(Mt,"getSceneObjById",Mt.context.getSceneObjectById.bind(Mt.context)),d(Mt,"getSceneObj",Mt.context.getSceneObject.bind(Mt.context)),d(Mt,"getEnv",Mt.context.getEnv.bind(Mt.context)),d(Mt,"setEnv",Mt.context.setEnv.bind(Mt.context)),d(Mt,"getStrFromEnv",Mt.context.getStrFromEnv.bind(Mt.context)),d(Mt,"getSceneObjectById",Mt.context.getSceneObjectById.bind(Mt.context)),d(Mt,"getSceneObject",Mt.context.getSceneObject.bind(Mt.context));let ft=Mt;class xy extends ot{constructor(t,e){super(),this.dv(new g.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const oo={distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},Ty={position:[0,0,0],rotation:[0,0,0],flyDuration:1},Kr=class Kr extends ft{constructor(e){super(e);d(this,"_editing",this.dv(g.react(!1)));d(this,"editingID");d(this,"editingBindMode","singlePoint");d(this,"_deprecated",[]);d(this,"_flyInEvent",this.dv(new X));d(this,"_flyToEvent",this.dv(new X));d(this,"_flyOverEvent",this.disposeVar(new X));d(this,"_pickedEvent",this.dv(new X));d(this,"_calcFlyToParamEvent",this.dv(new X));d(this,"_calcFlyInParamEvent",this.dv(new X));d(this,"useCalcFlyToParamInESObjectWithLocation",!1);Bg(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let n=0;n<e.length;n++){const i=e[n];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach(h=>{a===h&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${h} 下版本将会被移除,推荐使用属性值 ${u[h]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,Kr._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,Kr._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new Z([this,"show"],"是否显示",Kr.defaults.show),new Z([this,"collision"],"开启碰撞",Kr.defaults.collision),new Z([this,"allowPicking"],"允许拾取",Kr.defaults.allowPicking),new mt([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new mt([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new mt([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new mt([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new vt([],"飞行定位","飞向参数"),new mt(["number"],n=>this.flyTo(n),[1],"飞向"),new lt([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new L([this,"flyToDistance"],"flyToDistance",void 0,!0),new L([this,"flyToHeading"],"flyToHeading",void 0,!0),new L([this,"flyToPitch"],"flyToPitch",void 0,!0),new L([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new L([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new L([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new vt([],"飞入参数"),new mt(["number"],n=>this.flyIn(n),[1],"飞入"),new lt([this,"flyInParam"],"flyInParam",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,pDelta:e}:void 0}};d(Kr,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:g.reactJsonWithUndefined(void 0),flyInParam:g.reactJsonWithUndefined(void 0)})),d(Kr,"type",Kr.register("ESVisualObject",Kr,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),d(Kr,"supportEditingModes",[]),d(Kr,"_lastFlyInId",0),d(Kr,"_lastFlyToId",0);let ne=Kr;class qg extends ot{constructor(){super();d(this,"_data",this.dv(g.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class Wg extends ot{constructor(){super(...arguments);d(this,"_dragStartEvent",this.dv(new X));d(this,"_dragOverEvent",this.dv(new X));d(this,"_dragLeaveEvent",this.dv(new X));d(this,"_dropEvent",this.dv(new X))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function Ay(r,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function Oy(r){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(r.typeName)||(Reflect.has(r,"editing")?r.editing=!0:Reflect.has(r,"positionEditing")&&(r.positionEditing=!0)),typeof r.execOnCreating=="function"&&r.execOnCreating()}function zh(r,t){g.getExtProp(r,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),g.setExtProp(r,"__treeItem",t)}function Dy(r){return g.getExtProp(r,"__treeItem")}function Ly(r){if(!(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")))return r;const t=document.createElement("a");t.href=r;const e=t.href;return t.remove(),e}function Ry(r){try{return JSON.parse(r),!0}catch{return!1}}function Fy(r){return r instanceof Function?r():r}function Xg(r,t){for(let e of r)if(t.includes(e))return!0;return!1}function Qi(r,t){const e=r,n=t;return e===void 0||e.length===0||n===void 0||n.length===0?!0:Xg(e,n)}function Gy(r){const t=setTimeout(()=>{r(),clearTimeout(t)})}function $o(r){let t=r%360;return t=t<0?360+t:t,t}function Hg(r){return $o(r+180)-180}function qh(r,t,e){let n=$o(r),i=$o(t);Math.abs(n-i)>180&&(n<i?n+=360:i+=360);const s=n*(1-e)+i*e;return Hg(s)}function _c(r,t,e,n){return n=n||[0,0,0],n[0]=qh(r[0],t[0],e),n[1]=qh(r[1],t[1],e),n[2]=qh(r[2],t[2],e),n}function Bg(r,t,e="editing"){const n=new ot;r.ad(n);const i=t.bind(r);return n.ad(new g.ObjResettingWithEvent(r.activeViewerChanged,()=>{const s=new ot;let o=r.activeViewer;return o?(s.ad(r[`${e}Changed`].don(()=>{var a;r[`${e}`]?i():(a=r.mainClass.editingID)!=null&&a.includes("inner")&&r.activeViewer&&r.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(r.id)&&a.type==="end"){const u=r.mainClass;u.editingID&&a.editingID.includes(u.editingID)?r[`${e}`]=!1:r[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(r[`${e}Changed`].don(()=>{r[`${e}`]=!1})),s})),r[`${e}`]&&i(),n}class ky extends ot{constructor(e,n,i,s){super();d(this,"_sceneObjectId",this.dv(new g.SceneObjectWithId));this._id=e,this._startTimeStamp=n,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=g.clamp(u,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof Jn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Vy=`
|
|
23
|
+
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const h=this.getLastSceneObject(s);this._refs[s]=h,this._refsChanged.emit(h,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>n(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&n(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const n=this.getSceneObjects(e);if(n)return n[n.length-1]}getSceneObjects(e){const n=this._sceneObjRefs.get(e);if(!(!n||n.length===0))return n}}function qg(r,t){const[e,n,i]=g.getReactFuncs(r),s=g.react(void 0),o=()=>{const a=e()??t;s.value=a&&ft.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(ft.context.environmentVariablesChanged.don(o)),s}function Wg(r){const t=/\${(.*?)\}/g;if(!t.test(r))return r;const e=r.replace(t,(n,i)=>{const s=ft.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return Wg(e)}class Ty extends ot{constructor(){super();d(this,"_esObjConstructors",new Map);d(this,"_sceneObjs",new Map);d(this,"_sceneObjCreatedEvent",new X);d(this,"_sceneObjToDestroyEvent",new X);d(this,"_refsManager",this.dv(new xy(this)));d(this,"_environmentVariables",window.ESSDK_ENV||{});d(this,"_environmentVariablesChanged",this.dv(new X))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,n,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,n),i&&g.setExtProp(n,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,n){if(!n||this._sceneObjs.has(n)){const s=g.createGuid();n&&console.warn(`已存在相同id的对象!id自动变更!${n} -> ${s} 请注意:id变更可能导致引用失效!`),n=s}if(!n)throw new Error("id不能为空!");const i=new e(n);return i.id!==n&&(console.warn(`sceneObj.id(${i.id}) !== id(${n}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,n){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,n)}else return this.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){const n=this.createSceneObject(e.type,e.id);return n&&(n.json=e),n}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const n=[];for(const i of this._sceneObjs.values())i.typeName===e&&n.push(i);return n}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const n=this._esObjConstructors.get(e);if(n)return n}getProps(e){const n=this._getSceneObjConstructor(e);if(!n){console.warn(`cannot get constructor from type: ${e}`);return}return g.getExtProp(n,"__sceneObjExtraInfo")}setProps(e,n){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=g.getExtProp(i,"__sceneObjExtraInfo");s||(s={},g.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,n)}getProp(e,n){const i=this.getProps(e);return i&&i[n]}setProp(e,n,i){this.setProps(e,{[n]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[n,i]of Object.entries(e))this.setEnv(n,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,n){if(this._environmentVariables[e]!==n){const i=this._environmentVariables[e];this._environmentVariables[e]=n,this._environmentVariablesChanged.emit(e,n,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return Wg(e)}createEnvStrReact(e,n){return qg(e,n)}createEvnStrReact(e,n){return qg(e,n)}}const Mt=class Mt extends ot{constructor(e){super();d(this,"_components",this.dv(new Uh));d(this,"_viewerAttached",this.dv(new X));d(this,"_viewerDetached",this.dv(new X));d(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(n=>{n.actived&&(this.activeViewer=n),n.ad(n.activedChanged.don(i=>{i&&e.has(n)&&(this.activeViewer=n)})),e.add(n)})),this.d(this._viewerDetached.don(n=>{e.delete(n),this.activeViewer==n&&(this.activeViewer=void 0)})),e})());d(this,"_activeViewer",this.disposeVar(g.react(void 0)));d(this,"_createdEvent",this.dv(new X));d(this,"_flushEvent",this.dv(new X));d(this,"_id");d(this,"_updateFuncReact",this.dv(g.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(g.react(void 0)));d(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??g.createGuid(),this._initName();{const n=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};n(),this.d(this.execOnceFuncStrChanged.don(n))}{const n=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};n(),this.d(this.updateFuncStrChanged.don(n));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||g.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const n=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};n(),this.d(this.toDestroyFuncStrChanged.don(n)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,n,i){g.extendClassProps(n.prototype,n.createDefaultProps);const s=n.createDefaultProps();n.defaults&&(n.defaults={});for(const o of Object.keys(s))n.defaults[o]=s[o]instanceof g.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,n,i),e}static get envs(){return Mt.context.environmentVariables}static get $refs(){return Mt.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const n=new Map;this.d(()=>{n.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&n.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!n.has(i))return;const s=n.get(i);s&&(s.destroy(),n.delete(i))}))}createAttachedObject(e){const n=new Map,i=()=>{for(let[u,h]of n.entries())h.destroy();n.clear()},s=u=>{const h=e(u);h&&n.set(u,h)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!n.has(u))return;const h=n.get(u);h&&(h.destroy(),n.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(n=>new Ay(n,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof g.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_innerSetJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof g.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getProperties(e){const n={...this.getESProperties()},i=[];return n.general.length>0&&i.push(new vt(n.general,"general")),Object.keys(n).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&n[s].length>0&&i.push(new vt(n[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new Et([this,"typeName"],"类型",void 0,!1,!0),new Et([this,"id"],"唯一标识",void 0,!1,!0),new Et([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new Et([this,"ref"],"ref",void 0,!0),new lt([this,"extras"],"extras",void 0,void 0,!0),new Gg(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};d(Mt,"context",new Ty),d(Mt,"innerRegister",Mt.context.register.bind(Mt.context)),d(Mt,"defaults",{}),d(Mt,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:g.reactJson(void 0),devTags:g.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),d(Mt,"type",Mt.register("ESSceneObject",Mt,{chsName:"场景类",tags:["ESObjects"],description:""})),d(Mt,"create",Mt.context.createSceneObject.bind(Mt.context)),d(Mt,"createFromClass",Mt.context.createSceneObjectFromClass.bind(Mt.context)),d(Mt,"createFromJson",Mt.context.createSceneObjectFromJson.bind(Mt.context)),d(Mt,"destroySceneObject",Mt.context.destroySceneObject.bind(Mt.context)),d(Mt,"getSceneObjById",Mt.context.getSceneObjectById.bind(Mt.context)),d(Mt,"getSceneObj",Mt.context.getSceneObject.bind(Mt.context)),d(Mt,"getEnv",Mt.context.getEnv.bind(Mt.context)),d(Mt,"setEnv",Mt.context.setEnv.bind(Mt.context)),d(Mt,"getStrFromEnv",Mt.context.getStrFromEnv.bind(Mt.context)),d(Mt,"getSceneObjectById",Mt.context.getSceneObjectById.bind(Mt.context)),d(Mt,"getSceneObject",Mt.context.getSceneObject.bind(Mt.context));let ft=Mt;class Ay extends ot{constructor(t,e){super(),this.dv(new g.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const oo={distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},Oy={position:[0,0,0],rotation:[0,0,0],flyDuration:1},Kr=class Kr extends ft{constructor(e){super(e);d(this,"_editing",this.dv(g.react(!1)));d(this,"editingID");d(this,"editingBindMode","singlePoint");d(this,"_deprecated",[]);d(this,"_flyInEvent",this.dv(new X));d(this,"_flyToEvent",this.dv(new X));d(this,"_flyOverEvent",this.disposeVar(new X));d(this,"_pickedEvent",this.dv(new X));d(this,"_calcFlyToParamEvent",this.dv(new X));d(this,"_calcFlyInParamEvent",this.dv(new X));d(this,"useCalcFlyToParamInESObjectWithLocation",!1);Jg(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let n=0;n<e.length;n++){const i=e[n];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach(h=>{a===h&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${h} 下版本将会被移除,推荐使用属性值 ${u[h]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,Kr._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,Kr._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new Z([this,"show"],"是否显示",Kr.defaults.show),new Z([this,"collision"],"开启碰撞",Kr.defaults.collision),new Z([this,"allowPicking"],"允许拾取",Kr.defaults.allowPicking),new mt([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new mt([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new mt([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new mt([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new vt([],"飞行定位","飞向参数"),new mt(["number"],n=>this.flyTo(n),[1],"飞向"),new lt([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new L([this,"flyToDistance"],"flyToDistance",void 0,!0),new L([this,"flyToHeading"],"flyToHeading",void 0,!0),new L([this,"flyToPitch"],"flyToPitch",void 0,!0),new L([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new L([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new L([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new vt([],"飞入参数"),new mt(["number"],n=>this.flyIn(n),[1],"飞入"),new lt([this,"flyInParam"],"flyInParam",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??oo,pDelta:e}:void 0}};d(Kr,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:g.reactJsonWithUndefined(void 0),flyInParam:g.reactJsonWithUndefined(void 0)})),d(Kr,"type",Kr.register("ESVisualObject",Kr,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),d(Kr,"supportEditingModes",[]),d(Kr,"_lastFlyInId",0),d(Kr,"_lastFlyToId",0);let ne=Kr;class Xg extends ot{constructor(){super();d(this,"_data",this.dv(g.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class Hg extends ot{constructor(){super(...arguments);d(this,"_dragStartEvent",this.dv(new X));d(this,"_dragOverEvent",this.dv(new X));d(this,"_dragLeaveEvent",this.dv(new X));d(this,"_dropEvent",this.dv(new X))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function Dy(r,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function Ly(r){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(r.typeName)||(Reflect.has(r,"editing")?r.editing=!0:Reflect.has(r,"positionEditing")&&(r.positionEditing=!0)),typeof r.execOnCreating=="function"&&r.execOnCreating()}function qh(r,t){g.getExtProp(r,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),g.setExtProp(r,"__treeItem",t)}function Ry(r){return g.getExtProp(r,"__treeItem")}function Fy(r){if(!(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")))return r;const t=document.createElement("a");t.href=r;const e=t.href;return t.remove(),e}function Gy(r){try{return JSON.parse(r),!0}catch{return!1}}function ky(r){return r instanceof Function?r():r}function Bg(r,t){for(let e of r)if(t.includes(e))return!0;return!1}function Qi(r,t){const e=r,n=t;return e===void 0||e.length===0||n===void 0||n.length===0?!0:Bg(e,n)}function Vy(r){const t=setTimeout(()=>{r(),clearTimeout(t)})}function $o(r){let t=r%360;return t=t<0?360+t:t,t}function Yg(r){return $o(r+180)-180}function Wh(r,t,e){let n=$o(r),i=$o(t);Math.abs(n-i)>180&&(n<i?n+=360:i+=360);const s=n*(1-e)+i*e;return Yg(s)}function Ec(r,t,e,n){return n=n||[0,0,0],n[0]=Wh(r[0],t[0],e),n[1]=Wh(r[1],t[1],e),n[2]=Wh(r[2],t[2],e),n}function Jg(r,t,e="editing"){const n=new ot;r.ad(n);const i=t.bind(r);return n.ad(new g.ObjResettingWithEvent(r.activeViewerChanged,()=>{const s=new ot;let o=r.activeViewer;return o?(s.ad(r[`${e}Changed`].don(()=>{var a;r[`${e}`]?i():(a=(r.components.main??r).editingID)!=null&&a.includes("inner")&&r.activeViewer&&r.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(r.id)&&a.type==="end"){const u=r.components.main??r;u.editingID&&a.editingID.includes(u.editingID)?r[`${e}`]=!1:r[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(r[`${e}Changed`].don(()=>{r[`${e}`]=!1})),s})),r[`${e}`]&&i(),n}class Uy extends ot{constructor(e,n,i,s){super();d(this,"_sceneObjectId",this.dv(new g.SceneObjectWithId));this._id=e,this._startTimeStamp=n,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=g.clamp(u,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof Jn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const zy=`
|
|
24
24
|
用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
|
|
25
25
|
注意时间的单位是毫秒。
|
|
26
26
|
示例如下:
|
|
@@ -38,10 +38,10 @@ ${u.map(l=>`${l.id} ${l.typeName}
|
|
|
38
38
|
]
|
|
39
39
|
]
|
|
40
40
|
\`\`\`
|
|
41
|
-
`,hr=class hr extends ot{constructor(){super();d(this,"_ratio",this.dv(g.react(0)));d(this,"_subPlayers",this.dv(new g.ObservableArray));const e=this.dv(new g.Player);{const o=()=>{e.loop=this.loop??hr.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??hr.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??hr.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??hr.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??hr.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??hr.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??hr.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??hr.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??hr.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??hr.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const n=()=>{const o=this.duration??hr.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??hr.defaults.currentTime)/o)};n();const i=this.dv(g.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(n)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[u,h,l]=a;return new ky(u,h,l,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??hr.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};d(hr,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),d(hr,"channelsReadMe",Vy);let Jn=hr;(r=>{r.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:g.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((n,i)=>n===e[i]),t=>[...t])})})(Jn||(Jn={})),g.extendClassProps(Jn.prototype,Jn.createDefaultProps);class wc extends ot{constructor(e){super();d(this,"_sceneObject",this.dv(g.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const n=ft.getSceneObjById(this._id);n&&(this._sceneObject.value=n),this.d(ft.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(ft.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class Uy extends ot{constructor(e,n){super();d(this,"_sofi");this._id=e,this._sofi=this.dv(new wc(this._id));{const i=()=>{n.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class zy extends ot{constructor(){super();d(this,"_id",this.dv(g.react(void 0)));d(this,"_sceneObject",this.dv(g.react(void 0)));d(this,"_resetting",this.dv(new g.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new Uy(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class qy extends ot{constructor(t,e,n,i){super(),this.disposeVar(new g.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=t.sceneObject;if(o&&e){const a=e.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let u=g.pluckProperty(o,!1,...a);(!u||!(u instanceof X))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=g.pluckProperty(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof X?(s=u,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(s){const a=new ot;return a.d(s.dwon(()=>n.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const Yg=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends ot{constructor(e,n,i){super();d(this,"_doEvalEvent",this.dv(new X));const s=this._doEvalEvent,o=this.disposeVar(g.createNextAnimateFrameEvent(s)),a=e.map(([u,h])=>{const l=new wc(u),c=h&&new qy(l,h,s,n)||void 0;return[l,c]});this.d(()=>{a.forEach(([u,h])=>{h==null||h.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:h=!0}=n;if(u==="Immediate"){const l=a.map(([c])=>c.sceneObject);(!h||l.every(c=>c!==void 0))&&i(l)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:h=!0}=n;if(u==="NextAnimateFrame"){const l=a.map(([c])=>c.sceneObject);(!h||l.every(c=>c!==void 0))&&i(l)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:Wy}=Yg;class Pu extends ot{constructor(){super();d(this,"_evalFunc");d(this,"_forceExecute",new X);const e=this.dv(g.react(void 0)),n=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};n(),this.dispose(this.evalFuncStrChanged.disposableOn(n));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},s=this.disposeVar(new g.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new Wy(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(r=>{r.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:g.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:g.reactJson(void 0),devTags:g.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Pu||(Pu={})),g.extendClassProps(Pu.prototype,Pu.createDefaultProps);function Xy(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var t=1;t<=60;++t)r("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),r("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var ao=1,uo=2,Zo=3,Hy=4,Ec=5,Jg=6378137,By=6356752314e-3,jg=.0066943799901413165,Iu=484813681109536e-20,Y=Math.PI/2,Yy=.16666666666666666,Jy=.04722222222222222,jy=.022156084656084655,tt=1e-10,ae=.017453292519943295,Si=57.29577951308232,te=Math.PI/4,Mu=Math.PI*2,rr=3.14159265359,Vr={};Vr.greenwich=0,Vr.lisbon=-9.131906111111,Vr.paris=2.337229166667,Vr.bogota=-74.080916666667,Vr.madrid=-3.687938888889,Vr.rome=12.452333333333,Vr.bern=7.439583333333,Vr.jakarta=106.807719444444,Vr.ferro=-17.666666666667,Vr.brussels=4.367975,Vr.stockholm=18.058277777778,Vr.athens=23.7163375,Vr.oslo=10.722916666667;const Qy={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var Qg=/[\s_\-\/\(\)]/g;function Ss(r,t){if(r[t])return r[t];for(var e=Object.keys(r),n=t.toLowerCase().replace(Qg,""),i=-1,s,o;++i<e.length;)if(s=e[i],o=s.toLowerCase().replace(Qg,""),o===n)return r[s]}function Sc(r){var t={},e=r.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,u){var h=u.split("=");return h.push(!0),a[h[0].toLowerCase()]=h[1],a},{}),n,i,s,o={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*ae},lat_1:function(a){t.lat1=a*ae},lat_2:function(a){t.lat2=a*ae},lat_ts:function(a){t.lat_ts=a*ae},lon_0:function(a){t.long0=a*ae},lon_1:function(a){t.long1=a*ae},lon_2:function(a){t.long2=a*ae},alpha:function(a){t.alpha=parseFloat(a)*ae},gamma:function(a){t.rectified_grid_angle=parseFloat(a)*ae},lonc:function(a){t.longc=a*ae},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r:function(a){t.a=t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(u){return parseFloat(u)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var u=Ss(Qy,a);u&&(t.to_meter=u.to_meter)},from_greenwich:function(a){t.from_greenwich=a*ae},pm:function(a){var u=Ss(Vr,a);t.from_greenwich=(u||parseFloat(a))*ae},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var u="ewnsud";a.length===3&&u.indexOf(a.substr(0,1))!==-1&&u.indexOf(a.substr(1,1))!==-1&&u.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(n in e)i=e[n],n in o?(s=o[n],typeof s=="function"?s(i):t[s]=i):t[n]=i;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}class Kg{static getId(t){const e=t.find(n=>Array.isArray(n)&&n[0]==="ID");return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const n=t[1],i=parseFloat(t[2])||null,s=t.find(a=>Array.isArray(a)&&a[0]==="ID"),o=s?{authority:s[1],code:parseInt(s[2],10)}:null;return{type:e,name:n,conversion_factor:i,id:o}}static convertAxis(t){const e=t[1]||"Unknown";let n;const i=e.match(/^\((.)\)$/);if(i){const h=i[1].toUpperCase();if(h==="E")n="east";else if(h==="N")n="north";else if(h==="U")n="up";else throw new Error(`Unknown axis abbreviation: ${h}`)}else n=t[2]?t[2].toLowerCase():"unknown";const s=t.find(h=>Array.isArray(h)&&h[0]==="ORDER"),o=s?parseInt(s[1],10):null,a=t.find(h=>Array.isArray(h)&&(h[0]==="LENGTHUNIT"||h[0]==="ANGLEUNIT"||h[0]==="SCALEUNIT")),u=this.convertUnit(a);return{name:e,direction:n,unit:u,order:o}}static extractAxes(t){return t.filter(e=>Array.isArray(e)&&e[0]==="AXIS").map(e=>this.convertAxis(e)).sort((e,n)=>(e.order||0)-(n.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")):null,e.conversion=t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")):null;const n=t.find(f=>Array.isArray(f)&&f[0]==="CS");n&&(e.coordinate_system={type:n[1],axis:this.extractAxes(t)});const i=t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT");if(i){const f=this.convertUnit(i);e.coordinate_system.unit=f}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(f=>Array.isArray(f)&&(f[0]==="DATUM"||f[0]==="ENSEMBLE"));if(s){const f=this.convert(s);s[0]==="ENSEMBLE"?e.datum_ensemble=f:e.datum=f;const p=t.find(v=>Array.isArray(v)&&v[0]==="PRIMEM");p&&p[1]!=="Greenwich"&&(f.prime_meridian={name:p[1],longitude:parseFloat(p[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(f=>Array.isArray(f)&&f[0]==="MEMBER").map(f=>({type:"DatumEnsembleMember",name:f[1],id:this.getId(f)}));const o=t.find(f=>Array.isArray(f)&&f[0]==="ENSEMBLEACCURACY");o&&(e.accuracy=parseFloat(o[1]));const a=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID");a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT")&&this.convert(t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT"),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&f[0]==="PARAMETER").map(f=>this.convert(f));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(f=>Array.isArray(f)&&(f[0]==="LENGTHUNIT"||f[0]==="ANGLEUNIT"||f[0]==="SCALEUNIT"))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const u=t.find(f=>Array.isArray(f)&&f[0]==="SOURCECRS");if(u){const f=u.find(p=>Array.isArray(p));e.source_crs=f?this.convert(f):null}const h=t.find(f=>Array.isArray(f)&&f[0]==="TARGETCRS");if(h){const f=h.find(p=>Array.isArray(p));e.target_crs=f?this.convert(f):null}const l=t.find(f=>Array.isArray(f)&&f[0]==="ABRIDGEDTRANSFORMATION");l?e.transformation=this.convert(l):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&(f[0]==="PARAMETER"||f[0]==="PARAMETERFILE")).map(f=>{if(f[0]==="PARAMETER")return this.convert(f);if(f[0]==="PARAMETERFILE")return{name:f[1],value:f[2],id:{authority:"EPSG",code:8656}}}),e.parameters.length===7){const f=e.parameters[6];f.name==="Scale difference"&&(f.value=Math.round((f.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const c=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(f=>{f.unit||(f.unit=c)}),c.conversion_factor&&c.conversion_factor!==1&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:c});break;default:e.keyword=t[0];break}return e}}class Ky extends Kg{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&e.coordinate_system.subtype==="Cartesian"&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class $y extends Kg{static convert(t,e={}){super.convert(t,e);const n=t.find(s=>Array.isArray(s)&&s[0]==="CS");n&&(e.coordinate_system={subtype:n[1],axis:this.extractAxes(t)});const i=t.find(s=>Array.isArray(s)&&s[0]==="USAGE");if(i){const s=i.find(u=>Array.isArray(u)&&u[0]==="SCOPE"),o=i.find(u=>Array.isArray(u)&&u[0]==="AREA"),a=i.find(u=>Array.isArray(u)&&u[0]==="BBOX");e.usage={},s&&(e.usage.scope=s[1]),o&&(e.usage.area=o[1]),a&&(e.usage.bbox=a.slice(1))}return e}}function Zy(r){return r.find(t=>Array.isArray(t)&&t[0]==="USAGE")?"2019":(r.find(t=>Array.isArray(t)&&t[0]==="CS")||r[0]==="BOUNDCRS"||r[0]==="PROJCRS"||r[0]==="GEOGCRS","2015")}function t_(r){return(Zy(r)==="2019"?$y:Ky).convert(r)}function e_(r){const t=r.toUpperCase();return t.includes("PROJCRS")||t.includes("GEOGCRS")||t.includes("BOUNDCRS")||t.includes("VERTCRS")||t.includes("LENGTHUNIT")||t.includes("ANGLEUNIT")||t.includes("SCALEUNIT")?"WKT2":(t.includes("PROJCS")||t.includes("GEOGCS")||t.includes("LOCAL_CS")||t.includes("VERT_CS")||t.includes("UNIT"),"WKT1")}var bu=1,$g=2,Zg=3,Wh=4,tp=5,Cc=-1,r_=/\s/,n_=/[A-Za-z]/,i_=/[A-Za-z84_]/,Xh=/[,\]]/,ep=/[\d\.E\-\+]/;function Ki(r){if(typeof r!="string")throw new Error("not a string");this.text=r.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=bu}Ki.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==Wh)for(;r_.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case bu:return this.neutral(r);case $g:return this.keyword(r);case Wh:return this.quoted(r);case tp:return this.afterquote(r);case Zg:return this.number(r);case Cc:return}},Ki.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=Wh;return}if(Xh.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)},Ki.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=bu;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=bu,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Cc);return}},Ki.prototype.number=function(r){if(ep.test(r)){this.word+=r;return}if(Xh.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)},Ki.prototype.quoted=function(r){if(r==='"'){this.state=tp;return}this.word+=r},Ki.prototype.keyword=function(r){if(i_.test(r)){this.word+=r;return}if(r==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=bu;return}if(Xh.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)},Ki.prototype.neutral=function(r){if(n_.test(r)){this.word=r,this.state=$g;return}if(r==='"'){this.word="",this.state=Wh;return}if(ep.test(r)){this.word=r,this.state=Zg;return}if(Xh.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)},Ki.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Cc)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function s_(r){var t=new Ki(r);return t.output()}function Pc(r,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:r,i=e.reduce(function(s,o){return ta(o,s),s},n);t&&(r[t]=i)}function ta(r,t){if(!Array.isArray(r)){t[r]=!0;return}var e=r.shift();if(e==="PARAMETER"&&(e=r.shift()),r.length===1){if(Array.isArray(r[0])){t[e]={},ta(r[0],t[e]);return}t[e]=r[0];return}if(!r.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=r;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(r);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:r[0].toLowerCase(),convert:r[1]},r.length===3&&ta(r[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:r[0],a:r[1],rf:r[2]},r.length===4&&ta(r[3],t[e]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":r[0]=["name",r[0]],Pc(t,e,r);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":r[0]=["name",r[0]],Pc(t,e,r),t[e].type=e;return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return ta(r,t[e]);return Pc(t,e,r)}}var o_=.017453292519943295;function jn(r){return r*o_}function rp(r){const t=(r.projName||"").toLowerCase().replace(/_/g," ");!r.long0&&r.longc&&(t==="albers conic equal area"||t==="lambert azimuthal equal area")&&(r.long0=r.longc),!r.lat_ts&&r.lat1&&(t==="stereographic south pole"||t==="polar stereographic (variant b)")?(r.lat0=jn(r.lat1>0?90:-90),r.lat_ts=r.lat1,delete r.lat1):!r.lat_ts&&r.lat0&&(t==="polar stereographic"||t==="polar stereographic (variant a)")&&(r.lat_ts=r.lat0,r.lat0=jn(r.lat0>0?90:-90),delete r.lat1)}function np(r){let t={units:null,to_meter:void 0};return typeof r=="string"?(t.units=r.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.units==="meter"&&(t.to_meter=1)):r&&r.name&&(t.units=r.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.to_meter=r.conversion_factor),t}function ip(r){return typeof r=="object"?r.value*r.unit.conversion_factor:r}function sp(r,t){r.ellipsoid.radius?(t.a=r.ellipsoid.radius,t.rf=0):(t.a=ip(r.ellipsoid.semi_major_axis),r.ellipsoid.inverse_flattening!==void 0?t.rf=r.ellipsoid.inverse_flattening:r.ellipsoid.semi_major_axis!==void 0&&r.ellipsoid.semi_minor_axis!==void 0&&(t.rf=t.a/(t.a-ip(r.ellipsoid.semi_minor_axis))))}function Hh(r,t={}){return!r||typeof r!="object"?r:r.type==="BoundCRS"?(Hh(r.source_crs,t),r.transformation&&(r.transformation.method&&r.transformation.method.name==="NTv2"?t.nadgrids=r.transformation.parameters[0].value:t.datum_params=r.transformation.parameters.map(e=>e.value)),t):(Object.keys(r).forEach(e=>{const n=r[e];if(n!==null)switch(e){case"name":if(t.srsCode)break;t.name=n,t.srsCode=n;break;case"type":n==="GeographicCRS"?t.projName="longlat":n==="ProjectedCRS"&&r.conversion&&r.conversion.method&&(t.projName=r.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(t.ellps=n.ellipsoid.name,sp(n,t)),n.prime_meridian&&(t.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":t.ellps=n.name,sp(n,t);break;case"prime_meridian":t.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis){if(t.axis=n.axis.map(i=>{const s=i.direction;if(s==="east")return"e";if(s==="north")return"n";if(s==="west")return"w";if(s==="south")return"s";throw new Error(`Unknown axis direction: ${s}`)}).join("")+"u",n.unit){const{units:i,to_meter:s}=np(n.unit);t.units=i,t.to_meter=s}else if(n.axis[0]&&n.axis[0].unit){const{units:i,to_meter:s}=np(n.axis[0].unit);t.units=i,t.to_meter=s}}break;case"id":n.authority&&n.code&&(t.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(t.projName=n.method.name),n.parameters&&n.parameters.forEach(i=>{const s=i.name.toLowerCase().replace(/\s+/g,"_"),o=i.value;i.unit&&i.unit.conversion_factor?t[s]=o*i.unit.conversion_factor:i.unit==="degree"?t[s]=o*Math.PI/180:t[s]=o});break;case"unit":n.name&&(t.units=n.name.toLowerCase(),t.units==="metre"&&(t.units="meter")),n.conversion_factor&&(t.to_meter=n.conversion_factor);break;case"base_crs":Hh(n,t),t.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name;break}}),t.latitude_of_false_origin!==void 0&&(t.lat0=t.latitude_of_false_origin),t.longitude_of_false_origin!==void 0&&(t.long0=t.longitude_of_false_origin),t.latitude_of_standard_parallel!==void 0&&(t.lat0=t.latitude_of_standard_parallel,t.lat1=t.latitude_of_standard_parallel),t.latitude_of_1st_standard_parallel!==void 0&&(t.lat1=t.latitude_of_1st_standard_parallel),t.latitude_of_2nd_standard_parallel!==void 0&&(t.lat2=t.latitude_of_2nd_standard_parallel),t.latitude_of_projection_centre!==void 0&&(t.lat0=t.latitude_of_projection_centre),t.longitude_of_projection_centre!==void 0&&(t.longc=t.longitude_of_projection_centre),t.easting_at_false_origin!==void 0&&(t.x0=t.easting_at_false_origin),t.northing_at_false_origin!==void 0&&(t.y0=t.northing_at_false_origin),t.latitude_of_natural_origin!==void 0&&(t.lat0=t.latitude_of_natural_origin),t.longitude_of_natural_origin!==void 0&&(t.long0=t.longitude_of_natural_origin),t.longitude_of_origin!==void 0&&(t.long0=t.longitude_of_origin),t.false_easting!==void 0&&(t.x0=t.false_easting),t.easting_at_projection_centre&&(t.x0=t.easting_at_projection_centre),t.false_northing!==void 0&&(t.y0=t.false_northing),t.northing_at_projection_centre&&(t.y0=t.northing_at_projection_centre),t.standard_parallel_1!==void 0&&(t.lat1=t.standard_parallel_1),t.standard_parallel_2!==void 0&&(t.lat2=t.standard_parallel_2),t.scale_factor_at_natural_origin!==void 0&&(t.k0=t.scale_factor_at_natural_origin),t.scale_factor_at_projection_centre!==void 0&&(t.k0=t.scale_factor_at_projection_centre),t.scale_factor_on_pseudo_standard_parallel!==void 0&&(t.k0=t.scale_factor_on_pseudo_standard_parallel),t.azimuth!==void 0&&(t.alpha=t.azimuth),t.azimuth_at_projection_centre!==void 0&&(t.alpha=t.azimuth_at_projection_centre),t.angle_from_rectified_to_skew_grid&&(t.rectified_grid_angle=t.angle_from_rectified_to_skew_grid),rp(t),t)}var a_=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function u_(r,t){var e=t[0],n=t[1];!(e in r)&&n in r&&(r[e]=r[n],t.length===3&&(r[e]=t[2](r[e])))}function op(r){for(var t=Object.keys(r),e=0,n=t.length;e<n;++e){var i=t[e];a_.indexOf(i)!==-1&&h_(r[i]),typeof r[i]=="object"&&op(r[i])}}function h_(r){if(r.AUTHORITY){var t=Object.keys(r.AUTHORITY)[0];t&&t in r.AUTHORITY&&(r.title=t+":"+r.AUTHORITY[t])}if(r.type==="GEOGCS"?r.projName="longlat":r.type==="LOCAL_CS"?(r.projName="identity",r.local=!0):typeof r.PROJECTION=="object"?r.projName=Object.keys(r.PROJECTION)[0]:r.projName=r.PROJECTION,r.AXIS){for(var e="",n=0,i=r.AXIS.length;n<i;++n){var s=[r.AXIS[n][0].toLowerCase(),r.AXIS[n][1].toLowerCase()];s[0].indexOf("north")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="north"?e+="n":s[0].indexOf("south")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="south"?e+="s":s[0].indexOf("east")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="east"?e+="e":(s[0].indexOf("west")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(r.axis=e)}r.UNIT&&(r.units=r.UNIT.name.toLowerCase(),r.units==="metre"&&(r.units="meter"),r.UNIT.convert&&(r.type==="GEOGCS"?r.DATUM&&r.DATUM.SPHEROID&&(r.to_meter=r.UNIT.convert*r.DATUM.SPHEROID.a):r.to_meter=r.UNIT.convert));var o=r.GEOGCS;r.type==="GEOGCS"&&(o=r),o&&(o.DATUM?r.datumCode=o.DATUM.name.toLowerCase():r.datumCode=o.name.toLowerCase(),r.datumCode.slice(0,2)==="d_"&&(r.datumCode=r.datumCode.slice(2)),r.datumCode==="new_zealand_1949"&&(r.datumCode="nzgd49"),(r.datumCode==="wgs_1984"||r.datumCode==="world_geodetic_system_1984")&&(r.PROJECTION==="Mercator_Auxiliary_Sphere"&&(r.sphere=!0),r.datumCode="wgs84"),r.datumCode==="belge_1972"&&(r.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(r.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),r.ellps.toLowerCase().slice(0,13)==="international"&&(r.ellps="intl"),r.a=o.DATUM.SPHEROID.a,r.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(r.datum_params=o.DATUM.TOWGS84),~r.datumCode.indexOf("osgb_1936")&&(r.datumCode="osgb36"),~r.datumCode.indexOf("osni_1952")&&(r.datumCode="osni52"),(~r.datumCode.indexOf("tm65")||~r.datumCode.indexOf("geodetic_datum_of_1965"))&&(r.datumCode="ire65"),r.datumCode==="ch1903+"&&(r.datumCode="ch1903"),~r.datumCode.indexOf("israel")&&(r.datumCode="isr93")),r.b&&!isFinite(r.b)&&(r.b=r.a),r.rectified_grid_angle&&(r.rectified_grid_angle=jn(r.rectified_grid_angle));function a(l){var c=r.to_meter||1;return l*c}var u=function(l){return u_(r,l)},h=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",jn],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",jn],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",jn],["lat0","latitude_of_origin",jn],["lat0","standard_parallel_1",jn],["lat1","standard_parallel_1",jn],["lat2","standard_parallel_2",jn],["azimuth","Azimuth"],["alpha","azimuth",jn],["srsCode","name"]];h.forEach(u),rp(r)}function Ic(r){if(typeof r=="object")return Hh(r);const t=e_(r);var e=s_(r);if(t==="WKT2"){const s=t_(e);return Hh(s)}var n=e[0],i={};return ta(e,i),op(i),i[n]}function br(r){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?br[r]=Sc(arguments[1]):br[r]=Ic(arguments[1]):br[r]=e}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?br.apply(t,n):br(n)});if(typeof r=="string"){if(r in br)return br[r]}else"EPSG"in r?br["EPSG:"+r.EPSG]=r:"ESRI"in r?br["ESRI:"+r.ESRI]=r:"IAU2000"in r?br["IAU2000:"+r.IAU2000]=r:console.log(r);return}}Xy(br);function l_(r){return typeof r=="string"}function c_(r){return r in br}function f_(r){return r.indexOf("+")!==0&&r.indexOf("[")!==-1||typeof r=="object"&&!("srsCode"in r)}var d_=["3857","900913","3785","102113"];function g_(r){var t=Ss(r,"authority");if(t){var e=Ss(t,"epsg");return e&&d_.indexOf(e)>-1}}function p_(r){var t=Ss(r,"extension");if(t)return Ss(t,"proj4")}function v_(r){return r[0]==="+"}function m_(r){if(l_(r)){if(c_(r))return br[r];if(f_(r)){var t=Ic(r);if(g_(t))return br["EPSG:3857"];var e=p_(t);return e?Sc(e):t}if(v_(r))return Sc(r)}else return r.projName?r:Ic(r)}function ap(r,t){r=r||{};var e,n;if(!t)return r;for(n in t)e=t[n],e!==void 0&&(r[n]=e);return r}function Ci(r,t,e){var n=r*t;return e/Math.sqrt(1-n*n)}function Nu(r){return r<0?-1:1}function it(r){return Math.abs(r)<=rr?r:r-Nu(r)*Mu}function Qn(r,t,e){var n=r*e,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(Y-t))/n}function xu(r,t){for(var e=.5*r,n,i,s=Y-2*Math.atan(t),o=0;o<=15;o++)if(n=r*Math.sin(s),i=Y-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}function y_(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function __(r){var t=r.x,e=r.y;if(e*Si>90&&e*Si<-90&&t*Si>180&&t*Si<-180)return null;var n,i;if(Math.abs(Math.abs(e)-Y)<=tt)return null;if(this.sphere)n=this.x0+this.a*this.k0*it(t-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(te+.5*e));else{var s=Math.sin(e),o=Qn(this.e,e,s);n=this.x0+this.a*this.k0*it(t-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return r.x=n,r.y=i,r}function w_(r){var t=r.x-this.x0,e=r.y-this.y0,n,i;if(this.sphere)i=Y-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s=Math.exp(-e/(this.a*this.k0));if(i=xu(this.e,s),i===-9999)return null}return n=it(this.long0+t/(this.a*this.k0)),r.x=n,r.y=i,r}var E_=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const S_={init:y_,forward:__,inverse:w_,names:E_};function C_(){}function up(r){return r}var P_=["longlat","identity"],I_=[S_,{init:C_,forward:up,inverse:up,names:P_}],ho={},ea=[];function hp(r,t){var e=ea.length;return r.names?(ea[e]=r,r.names.forEach(function(n){ho[n.toLowerCase()]=e}),this):(console.log(t),!0)}function lp(r){return r.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function M_(r){if(!r)return!1;var t=r.toLowerCase();if(typeof ho[t]<"u"&&ea[ho[t]]||(t=lp(t),t in ho&&ea[ho[t]]))return ea[ho[t]]}function b_(){I_.forEach(hp)}const N_={start:b_,add:hp,get:M_};var cp={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const x_=cp.WGS84;function T_(r,t,e,n){var i=r*r,s=t*t,o=(i-s)/i,a=0;n?(r*=1-o*(Yy+o*(Jy+o*jy)),i=r*r,o=0):a=Math.sqrt(o);var u=(i-s)/s;return{es:o,e:a,ep2:u}}function A_(r,t,e,n,i){if(!r){var s=Ss(cp,n);s||(s=x_),r=s.a,t=s.b,e=s.rf}return e&&!t&&(t=(1-1/e)*r),(e===0||Math.abs(r-t)<tt)&&(i=!0,t=r),{a:r,b:t,rf:e,sphere:i}}var Bh={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var O_ in Bh){var Mc=Bh[O_];Mc.datumName&&(Bh[Mc.datumName]=Mc)}function D_(r,t,e,n,i,s,o){var a={};return r===void 0||r==="none"?a.datum_type=Ec:a.datum_type=Hy,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=ao),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=uo,a.datum_params[3]*=Iu,a.datum_params[4]*=Iu,a.datum_params[5]*=Iu,a.datum_params[6]=a.datum_params[6]/1e6+1)),o&&(a.datum_type=Zo,a.grids=o),a.a=e,a.b=n,a.es=i,a.ep2=s,a}var bc={};function L_(r,t,e){return t instanceof ArrayBuffer?R_(r,t,e):{ready:F_(r,t)}}function R_(r,t,e){var n=!0;e!==void 0&&e.includeErrorFields===!1&&(n=!1);var i=new DataView(t),s=V_(i),o=U_(i,s),a=z_(i,o,s,n),u={header:o,subgrids:a};return bc[r]=u,u}async function F_(r,t){for(var e=[],n=await t.getImageCount(),i=n-1;i>=0;i--){var s=await t.getImage(i),o=await s.readRasters(),a=o,u=[s.getWidth(),s.getHeight()],h=s.getBoundingBox().map(fp),l=[s.fileDirectory.ModelPixelScale[0],s.fileDirectory.ModelPixelScale[1]].map(fp),c=h[0]+(u[0]-1)*l[0],f=h[3]-(u[1]-1)*l[1],p=a[0],v=a[1],w=[];for(let y=u[1]-1;y>=0;y--)for(let _=u[0]-1;_>=0;_--){var E=y*u[0]+_;w.push([-Cs(v[E]),Cs(p[E])])}e.push({del:l,lim:u,ll:[-c,f],cvs:w})}var I={header:{nSubgrids:n},subgrids:e};return bc[r]=I,I}function G_(r){if(r===void 0)return null;var t=r.split(",");return t.map(k_)}function k_(r){if(r.length===0)return null;var t=r[0]==="@";return t&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:r,mandatory:!t,grid:bc[r]||null,isNull:!1}}function fp(r){return r*Math.PI/180}function Cs(r){return r/3600*Math.PI/180}function V_(r){var t=r.getInt32(8,!1);return t===11?!1:(t=r.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function U_(r,t){return{nFields:r.getInt32(8,t),nSubgridFields:r.getInt32(24,t),nSubgrids:r.getInt32(40,t),shiftType:Nc(r,56,64).trim(),fromSemiMajorAxis:r.getFloat64(120,t),fromSemiMinorAxis:r.getFloat64(136,t),toSemiMajorAxis:r.getFloat64(152,t),toSemiMinorAxis:r.getFloat64(168,t)}}function Nc(r,t,e){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(t,e)))}function z_(r,t,e,n){for(var i=176,s=[],o=0;o<t.nSubgrids;o++){var a=W_(r,i,e),u=X_(r,i,a,e,n),h=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),l=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);s.push({ll:[Cs(a.lowerLongitude),Cs(a.lowerLatitude)],del:[Cs(a.longitudeInterval),Cs(a.latitudeInterval)],lim:[h,l],count:a.gridNodeCount,cvs:q_(u)});var c=16;n===!1&&(c=8),i+=176+a.gridNodeCount*c}return s}function q_(r){return r.map(function(t){return[Cs(t.longitudeShift),Cs(t.latitudeShift)]})}function W_(r,t,e){return{name:Nc(r,t+8,t+16).trim(),parent:Nc(r,t+24,t+24+8).trim(),lowerLatitude:r.getFloat64(t+72,e),upperLatitude:r.getFloat64(t+88,e),lowerLongitude:r.getFloat64(t+104,e),upperLongitude:r.getFloat64(t+120,e),latitudeInterval:r.getFloat64(t+136,e),longitudeInterval:r.getFloat64(t+152,e),gridNodeCount:r.getInt32(t+168,e)}}function X_(r,t,e,n,i){var s=t+176,o=16;i===!1&&(o=8);for(var a=[],u=0;u<e.gridNodeCount;u++){var h={latitudeShift:r.getFloat32(s+u*o,n),longitudeShift:r.getFloat32(s+u*o+4,n)};i!==!1&&(h.latitudeAccuracy=r.getFloat32(s+u*o+8,n),h.longitudeAccuracy=r.getFloat32(s+u*o+12,n)),a.push(h)}return a}function Pi(r,t){if(!(this instanceof Pi))return new Pi(r);t=t||function(h){if(h)throw h};var e=m_(r);if(typeof e!="object"){t("Could not parse to valid json: "+r);return}var n=Pi.projections.get(e.projName);if(!n){t("Could not get projection name from: "+r);return}if(e.datumCode&&e.datumCode!=="none"){var i=Ss(Bh,e.datumCode);i&&(e.datum_params=e.datum_params||(i.towgs84?i.towgs84.split(","):null),e.ellps=i.ellipse,e.datumName=i.datumName?i.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var s=A_(e.a,e.b,e.rf,e.ellps,e.sphere),o=T_(s.a,s.b,s.rf,e.R_A),a=G_(e.nadgrids),u=e.datum||D_(e.datumCode,e.datum_params,s.a,s.b,o.es,o.ep2,a);ap(this,e),ap(this,n),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=u,this.init(),t(null,this)}Pi.projections=N_,Pi.projections.start();function H_(r,t){return r.datum_type!==t.datum_type||r.a!==t.a||Math.abs(r.es-t.es)>5e-11?!1:r.datum_type===ao?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]:r.datum_type===uo?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]&&r.datum_params[3]===t.datum_params[3]&&r.datum_params[4]===t.datum_params[4]&&r.datum_params[5]===t.datum_params[5]&&r.datum_params[6]===t.datum_params[6]:!0}function dp(r,t,e){var n=r.x,i=r.y,s=r.z?r.z:0,o,a,u,h;if(i<-Y&&i>-1.001*Y)i=-Y;else if(i>Y&&i<1.001*Y)i=Y;else{if(i<-Y)return{x:-1/0,y:-1/0,z:r.z};if(i>Y)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(i),h=Math.cos(i),u=a*a,o=e/Math.sqrt(1-t*u),{x:(o+s)*h*Math.cos(n),y:(o+s)*h*Math.sin(n),z:(o*(1-t)+s)*a}}function gp(r,t,e,n){var i=1e-12,s=i*i,o=30,a,u,h,l,c,f,p,v,w,E,I,y,_,m=r.x,S=r.y,C=r.z?r.z:0,P,b,x;if(a=Math.sqrt(m*m+S*S),u=Math.sqrt(m*m+S*S+C*C),a/e<i){if(P=0,u/e<i)return b=Y,x=-n,{x:r.x,y:r.y,z:r.z}}else P=Math.atan2(S,m);h=C/u,l=a/u,c=1/Math.sqrt(1-t*(2-t)*l*l),v=l*(1-t)*c,w=h*c,_=0;do _++,p=e/Math.sqrt(1-t*w*w),x=a*v+C*w-p*(1-t*w*w),f=t*p/(p+x),c=1/Math.sqrt(1-f*(2-f)*l*l),E=l*(1-f)*c,I=h*c,y=I*v-E*w,v=E,w=I;while(y*y>s&&_<o);return b=Math.atan(I/Math.abs(E)),{x:P,y:b,z:x}}function B_(r,t,e){if(t===ao)return{x:r.x+e[0],y:r.y+e[1],z:r.z+e[2]};if(t===uo){var n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],h=e[6];return{x:h*(r.x-u*r.y+a*r.z)+n,y:h*(u*r.x+r.y-o*r.z)+i,z:h*(-a*r.x+o*r.y+r.z)+s}}}function Y_(r,t,e){if(t===ao)return{x:r.x-e[0],y:r.y-e[1],z:r.z-e[2]};if(t===uo){var n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],h=e[6],l=(r.x-n)/h,c=(r.y-i)/h,f=(r.z-s)/h;return{x:l+u*c-a*f,y:-u*l+c+o*f,z:a*l-o*c+f}}}function Yh(r){return r===ao||r===uo}function J_(r,t,e){if(H_(r,t)||r.datum_type===Ec||t.datum_type===Ec)return e;var n=r.a,i=r.es;if(r.datum_type===Zo){var s=pp(r,!1,e);if(s!==0)return;n=Jg,i=jg}var o=t.a,a=t.b,u=t.es;if(t.datum_type===Zo&&(o=Jg,a=By,u=jg),i===u&&n===o&&!Yh(r.datum_type)&&!Yh(t.datum_type))return e;if(e=dp(e,i,n),Yh(r.datum_type)&&(e=B_(e,r.datum_type,r.datum_params)),Yh(t.datum_type)&&(e=Y_(e,t.datum_type,t.datum_params)),e=gp(e,u,o,a),t.datum_type===Zo){var h=pp(t,!0,e);if(h!==0)return}return e}function pp(r,t,e){if(r.grids===null||r.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-e.x,y:e.y},i={x:Number.NaN,y:Number.NaN},s=[];t:for(var o=0;o<r.grids.length;o++){var a=r.grids[o];if(s.push(a.name),a.isNull){i=n;break}if(a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}for(var u=a.grid.subgrids,h=0,l=u.length;h<l;h++){var c=u[h],f=(Math.abs(c.del[1])+Math.abs(c.del[0]))/1e4,p=c.ll[0]-f,v=c.ll[1]-f,w=c.ll[0]+(c.lim[0]-1)*c.del[0]+f,E=c.ll[1]+(c.lim[1]-1)*c.del[1]+f;if(!(v>n.y||p>n.x||E<n.y||w<n.x)&&(i=j_(n,t,c),!isNaN(i.x)))break t}}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*Si+" "+n.y*Si+" tried: '"+s+"'"),-1):(e.x=-i.x,e.y=i.y,0)}function j_(r,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(r.x))return n;var i={x:r.x,y:r.y};i.x-=e.ll[0],i.y-=e.ll[1],i.x=it(i.x-Math.PI)+Math.PI;var s=vp(i,e);if(t){if(isNaN(s.x))return n;s.x=i.x-s.x,s.y=i.y-s.y;var o=9,a=1e-12,u,h;do{if(h=vp(s,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}u={x:i.x-(h.x+s.x),y:i.y-(h.y+s.y)},s.x+=u.x,s.y+=u.y}while(o--&&Math.abs(u.x)>a&&Math.abs(u.y)>a);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=it(s.x+e.ll[0]),n.y=s.y+e.ll[1]}else isNaN(s.x)||(n.x=r.x+s.x,n.y=r.y+s.y);return n}function vp(r,t){var e={x:r.x/t.del[0],y:r.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},i={x:e.x-1*n.x,y:e.y-1*n.y},s={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return s;o=n.y*t.lim[0]+n.x;var a={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var u={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var h={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var l={x:t.cvs[o][0],y:t.cvs[o][1]},c=i.x*i.y,f=i.x*(1-i.y),p=(1-i.x)*(1-i.y),v=(1-i.x)*i.y;return s.x=p*a.x+f*u.x+v*l.x+c*h.x,s.y=p*a.y+f*u.y+v*l.y+c*h.y,s}function mp(r,t,e){var n=e.x,i=e.y,s=e.z||0,o,a,u,h={};for(u=0;u<3;u++)if(!(t&&u===2&&e.z===void 0))switch(u===0?(o=n,"ew".indexOf(r.axis[u])!==-1?a="x":a="y"):u===1?(o=i,"ns".indexOf(r.axis[u])!==-1?a="y":a="x"):(o=s,a="z"),r.axis[u]){case"e":h[a]=o;break;case"w":h[a]=-o;break;case"n":h[a]=o;break;case"s":h[a]=-o;break;case"u":e[a]!==void 0&&(h.z=o);break;case"d":e[a]!==void 0&&(h.z=-o);break;default:return null}return h}function yp(r){var t={x:r[0],y:r[1]};return r.length>2&&(t.z=r[2]),r.length>3&&(t.m=r[3]),t}function Q_(r){_p(r.x),_p(r.y)}function _p(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function K_(r,t){return(r.datum.datum_type===ao||r.datum.datum_type===uo||r.datum.datum_type===Zo)&&t.datumCode!=="WGS84"||(t.datum.datum_type===ao||t.datum.datum_type===uo||t.datum.datum_type===Zo)&&r.datumCode!=="WGS84"}function Jh(r,t,e,n){var i;Array.isArray(e)?e=yp(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var s=e.z!==void 0;if(Q_(e),r.datum&&t.datum&&K_(r,t)&&(i=new Pi("WGS84"),e=Jh(r,i,e,n),r=i),n&&r.axis!=="enu"&&(e=mp(r,!1,e)),r.projName==="longlat")e={x:e.x*ae,y:e.y*ae,z:e.z||0};else if(r.to_meter&&(e={x:e.x*r.to_meter,y:e.y*r.to_meter,z:e.z||0}),e=r.inverse(e),!e)return;if(r.from_greenwich&&(e.x+=r.from_greenwich),e=J_(r.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*Si,y:e.y*Si,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?mp(t,!0,e):(e&&!s&&delete e.z,e)}var wp=Pi("WGS84");function xc(r,t,e,n){var i,s,o;return Array.isArray(e)?(i=Jh(r,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(e.slice(3)):[i.x,i.y,e[2]].concat(e.slice(3)):[i.x,i.y].concat(e.slice(2)):[i.x,i.y]):(s=Jh(r,t,e,n),o=Object.keys(e),o.length===2||o.forEach(function(a){if(typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;s[a]=e[a]}),s)}function Ep(r){return r instanceof Pi?r:r.oProj?r.oProj:Pi(r)}function Ur(r,t,e){r=Ep(r);var n=!1,i;return typeof t>"u"?(t=r,r=wp,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=r,r=wp,n=!0),t=Ep(t),e?xc(r,t,e):(i={forward:function(s,o){return xc(r,t,s,o)},inverse:function(s,o){return xc(t,r,s,o)}},n&&(i.oProj=t),i)}var Sp=6,Cp="AJSAJS",Pp="AFAFAF",ra=65,zr=73,mn=79,Tu=86,Au=90;const $_={forward:Ip,inverse:Z_,toPoint:Mp};function Ip(r,t){return t=t||5,r1(t1({lat:r[1],lon:r[0]}),t)}function Z_(r){var t=Ac(xp(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Mp(r){var t=Ac(xp(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Tc(r){return r*(Math.PI/180)}function bp(r){return 180*(r/Math.PI)}function t1(r){var t=r.lat,e=r.lon,n=6378137,i=.00669438,s=.9996,o,a,u,h,l,c,f,p=Tc(t),v=Tc(e),w,E;E=Math.floor((e+180)/6)+1,e===180&&(E=60),t>=56&&t<64&&e>=3&&e<12&&(E=32),t>=72&&t<84&&(e>=0&&e<9?E=31:e>=9&&e<21?E=33:e>=21&&e<33?E=35:e>=33&&e<42&&(E=37)),o=(E-1)*6-180+3,w=Tc(o),a=i/(1-i),u=n/Math.sqrt(1-i*Math.sin(p)*Math.sin(p)),h=Math.tan(p)*Math.tan(p),l=a*Math.cos(p)*Math.cos(p),c=Math.cos(p)*(v-w),f=n*((1-i/4-3*i*i/64-5*i*i*i/256)*p-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*p)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*p)-35*i*i*i/3072*Math.sin(6*p));var I=s*u*(c+(1-h+l)*c*c*c/6+(5-18*h+h*h+72*l-58*a)*c*c*c*c*c/120)+5e5,y=s*(f+u*Math.tan(p)*(c*c/2+(5-h+9*l+4*l*l)*c*c*c*c/24+(61-58*h+h*h+600*l-330*a)*c*c*c*c*c*c/720));return t<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(I),zoneNumber:E,zoneLetter:e1(t)}}function Ac(r){var t=r.northing,e=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var s=.9996,o=6378137,a=.00669438,u,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),l,c,f,p,v,w,E,I,y,_=e-5e5,m=t;n<"N"&&(m-=1e7),E=(i-1)*6-180+3,u=a/(1-a),w=m/s,I=w/(o*(1-a/4-3*a*a/64-5*a*a*a/256)),y=I+(3*h/2-27*h*h*h/32)*Math.sin(2*I)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*I)+151*h*h*h/96*Math.sin(6*I),l=o/Math.sqrt(1-a*Math.sin(y)*Math.sin(y)),c=Math.tan(y)*Math.tan(y),f=u*Math.cos(y)*Math.cos(y),p=o*(1-a)/Math.pow(1-a*Math.sin(y)*Math.sin(y),1.5),v=_/(l*s);var S=y-l*Math.tan(y)/p*(v*v/2-(5+3*c+10*f-4*f*f-9*u)*v*v*v*v/24+(61+90*c+298*f+45*c*c-252*u-3*f*f)*v*v*v*v*v*v/720);S=bp(S);var C=(v-(1+2*c+f)*v*v*v/6+(5-2*f+28*c-3*f*f+8*u+24*c*c)*v*v*v*v*v/120)/Math.cos(y);C=E+bp(C);var P;if(r.accuracy){var b=Ac({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});P={top:b.lat,right:b.lon,bottom:S,left:C}}else P={lat:S,lon:C};return P}function e1(r){var t="Z";return 84>=r&&r>=72?t="X":72>r&&r>=64?t="W":64>r&&r>=56?t="V":56>r&&r>=48?t="U":48>r&&r>=40?t="T":40>r&&r>=32?t="S":32>r&&r>=24?t="R":24>r&&r>=16?t="Q":16>r&&r>=8?t="P":8>r&&r>=0?t="N":0>r&&r>=-8?t="M":-8>r&&r>=-16?t="L":-16>r&&r>=-24?t="K":-24>r&&r>=-32?t="J":-32>r&&r>=-40?t="H":-40>r&&r>=-48?t="G":-48>r&&r>=-56?t="F":-56>r&&r>=-64?t="E":-64>r&&r>=-72?t="D":-72>r&&r>=-80&&(t="C"),t}function r1(r,t){var e="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+n1(r.easting,r.northing,r.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function n1(r,t,e){var n=Np(e),i=Math.floor(r/1e5),s=Math.floor(t/1e5)%20;return i1(i,s,n)}function Np(r){var t=r%Sp;return t===0&&(t=Sp),t}function i1(r,t,e){var n=e-1,i=Cp.charCodeAt(n),s=Pp.charCodeAt(n),o=i+r-1,a=s+t,u=!1;o>Au&&(o=o-Au+ra-1,u=!0),(o===zr||i<zr&&o>zr||(o>zr||i<zr)&&u)&&o++,(o===mn||i<mn&&o>mn||(o>mn||i<mn)&&u)&&(o++,o===zr&&o++),o>Au&&(o=o-Au+ra-1),a>Tu?(a=a-Tu+ra-1,u=!0):u=!1,(a===zr||s<zr&&a>zr||(a>zr||s<zr)&&u)&&a++,(a===mn||s<mn&&a>mn||(a>mn||s<mn)&&u)&&(a++,a===zr&&a++),a>Tu&&(a=a-Tu+ra-1);var h=String.fromCharCode(o)+String.fromCharCode(a);return h}function xp(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var t=r.length,e=null,n="",i,s=0;!/[A-Z]/.test(i=r.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,s++}var o=parseInt(n,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+r;var a=r.charAt(s++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+r;e=r.substring(s,s+=2);for(var u=Np(o),h=s1(e.charAt(0),u),l=o1(e.charAt(1),u);l<a1(a);)l+=2e6;var c=t-s;if(c%2!==0)throw`MGRSPoint has to have an even number
|
|
41
|
+
`,hr=class hr extends ot{constructor(){super();d(this,"_ratio",this.dv(g.react(0)));d(this,"_subPlayers",this.dv(new g.ObservableArray));const e=this.dv(new g.Player);{const o=()=>{e.loop=this.loop??hr.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??hr.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??hr.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??hr.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??hr.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??hr.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??hr.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??hr.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??hr.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??hr.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const n=()=>{const o=this.duration??hr.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??hr.defaults.currentTime)/o)};n();const i=this.dv(g.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(n)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[u,h,l]=a;return new Uy(u,h,l,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??hr.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};d(hr,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),d(hr,"channelsReadMe",zy);let Jn=hr;(r=>{r.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:g.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((n,i)=>n===e[i]),t=>[...t])})})(Jn||(Jn={})),g.extendClassProps(Jn.prototype,Jn.createDefaultProps);class Sc extends ot{constructor(e){super();d(this,"_sceneObject",this.dv(g.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const n=ft.getSceneObjById(this._id);n&&(this._sceneObject.value=n),this.d(ft.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(ft.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class qy extends ot{constructor(e,n){super();d(this,"_sofi");this._id=e,this._sofi=this.dv(new Sc(this._id));{const i=()=>{n.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class Wy extends ot{constructor(){super();d(this,"_id",this.dv(g.react(void 0)));d(this,"_sceneObject",this.dv(g.react(void 0)));d(this,"_resetting",this.dv(new g.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new qy(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class Xy extends ot{constructor(t,e,n,i){super(),this.disposeVar(new g.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=t.sceneObject;if(o&&e){const a=e.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let u=g.pluckProperty(o,!1,...a);(!u||!(u instanceof X))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=g.pluckProperty(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof X?(s=u,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(s){const a=new ot;return a.d(s.dwon(()=>n.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const jg=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends ot{constructor(e,n,i){super();d(this,"_doEvalEvent",this.dv(new X));const s=this._doEvalEvent,o=this.disposeVar(g.createNextAnimateFrameEvent(s)),a=e.map(([u,h])=>{const l=new Sc(u),c=h&&new Xy(l,h,s,n)||void 0;return[l,c]});this.d(()=>{a.forEach(([u,h])=>{h==null||h.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:h=!0}=n;if(u==="Immediate"){const l=a.map(([c])=>c.sceneObject);(!h||l.every(c=>c!==void 0))&&i(l)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:h=!0}=n;if(u==="NextAnimateFrame"){const l=a.map(([c])=>c.sceneObject);(!h||l.every(c=>c!==void 0))&&i(l)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:Hy}=jg;class Pu extends ot{constructor(){super();d(this,"_evalFunc");d(this,"_forceExecute",new X);const e=this.dv(g.react(void 0)),n=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};n(),this.dispose(this.evalFuncStrChanged.disposableOn(n));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},s=this.disposeVar(new g.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new Hy(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(r=>{r.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:g.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:g.reactJson(void 0),devTags:g.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Pu||(Pu={})),g.extendClassProps(Pu.prototype,Pu.createDefaultProps);function By(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var t=1;t<=60;++t)r("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),r("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var ao=1,uo=2,Zo=3,Yy=4,Cc=5,Qg=6378137,Jy=6356752314e-3,Kg=.0066943799901413165,Iu=484813681109536e-20,Y=Math.PI/2,jy=.16666666666666666,Qy=.04722222222222222,Ky=.022156084656084655,tt=1e-10,ae=.017453292519943295,Si=57.29577951308232,te=Math.PI/4,Mu=Math.PI*2,rr=3.14159265359,Vr={};Vr.greenwich=0,Vr.lisbon=-9.131906111111,Vr.paris=2.337229166667,Vr.bogota=-74.080916666667,Vr.madrid=-3.687938888889,Vr.rome=12.452333333333,Vr.bern=7.439583333333,Vr.jakarta=106.807719444444,Vr.ferro=-17.666666666667,Vr.brussels=4.367975,Vr.stockholm=18.058277777778,Vr.athens=23.7163375,Vr.oslo=10.722916666667;const $y={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var $g=/[\s_\-\/\(\)]/g;function Ss(r,t){if(r[t])return r[t];for(var e=Object.keys(r),n=t.toLowerCase().replace($g,""),i=-1,s,o;++i<e.length;)if(s=e[i],o=s.toLowerCase().replace($g,""),o===n)return r[s]}function Pc(r){var t={},e=r.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,u){var h=u.split("=");return h.push(!0),a[h[0].toLowerCase()]=h[1],a},{}),n,i,s,o={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*ae},lat_1:function(a){t.lat1=a*ae},lat_2:function(a){t.lat2=a*ae},lat_ts:function(a){t.lat_ts=a*ae},lon_0:function(a){t.long0=a*ae},lon_1:function(a){t.long1=a*ae},lon_2:function(a){t.long2=a*ae},alpha:function(a){t.alpha=parseFloat(a)*ae},gamma:function(a){t.rectified_grid_angle=parseFloat(a)*ae},lonc:function(a){t.longc=a*ae},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r:function(a){t.a=t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(u){return parseFloat(u)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var u=Ss($y,a);u&&(t.to_meter=u.to_meter)},from_greenwich:function(a){t.from_greenwich=a*ae},pm:function(a){var u=Ss(Vr,a);t.from_greenwich=(u||parseFloat(a))*ae},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var u="ewnsud";a.length===3&&u.indexOf(a.substr(0,1))!==-1&&u.indexOf(a.substr(1,1))!==-1&&u.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(n in e)i=e[n],n in o?(s=o[n],typeof s=="function"?s(i):t[s]=i):t[n]=i;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}class Zg{static getId(t){const e=t.find(n=>Array.isArray(n)&&n[0]==="ID");return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const n=t[1],i=parseFloat(t[2])||null,s=t.find(a=>Array.isArray(a)&&a[0]==="ID"),o=s?{authority:s[1],code:parseInt(s[2],10)}:null;return{type:e,name:n,conversion_factor:i,id:o}}static convertAxis(t){const e=t[1]||"Unknown";let n;const i=e.match(/^\((.)\)$/);if(i){const h=i[1].toUpperCase();if(h==="E")n="east";else if(h==="N")n="north";else if(h==="U")n="up";else throw new Error(`Unknown axis abbreviation: ${h}`)}else n=t[2]?t[2].toLowerCase():"unknown";const s=t.find(h=>Array.isArray(h)&&h[0]==="ORDER"),o=s?parseInt(s[1],10):null,a=t.find(h=>Array.isArray(h)&&(h[0]==="LENGTHUNIT"||h[0]==="ANGLEUNIT"||h[0]==="SCALEUNIT")),u=this.convertUnit(a);return{name:e,direction:n,unit:u,order:o}}static extractAxes(t){return t.filter(e=>Array.isArray(e)&&e[0]==="AXIS").map(e=>this.convertAxis(e)).sort((e,n)=>(e.order||0)-(n.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")):null,e.conversion=t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")):null;const n=t.find(f=>Array.isArray(f)&&f[0]==="CS");n&&(e.coordinate_system={type:n[1],axis:this.extractAxes(t)});const i=t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT");if(i){const f=this.convertUnit(i);e.coordinate_system.unit=f}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(f=>Array.isArray(f)&&(f[0]==="DATUM"||f[0]==="ENSEMBLE"));if(s){const f=this.convert(s);s[0]==="ENSEMBLE"?e.datum_ensemble=f:e.datum=f;const p=t.find(v=>Array.isArray(v)&&v[0]==="PRIMEM");p&&p[1]!=="Greenwich"&&(f.prime_meridian={name:p[1],longitude:parseFloat(p[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(f=>Array.isArray(f)&&f[0]==="MEMBER").map(f=>({type:"DatumEnsembleMember",name:f[1],id:this.getId(f)}));const o=t.find(f=>Array.isArray(f)&&f[0]==="ENSEMBLEACCURACY");o&&(e.accuracy=parseFloat(o[1]));const a=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID");a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT")&&this.convert(t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT"),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&f[0]==="PARAMETER").map(f=>this.convert(f));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(f=>Array.isArray(f)&&(f[0]==="LENGTHUNIT"||f[0]==="ANGLEUNIT"||f[0]==="SCALEUNIT"))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const u=t.find(f=>Array.isArray(f)&&f[0]==="SOURCECRS");if(u){const f=u.find(p=>Array.isArray(p));e.source_crs=f?this.convert(f):null}const h=t.find(f=>Array.isArray(f)&&f[0]==="TARGETCRS");if(h){const f=h.find(p=>Array.isArray(p));e.target_crs=f?this.convert(f):null}const l=t.find(f=>Array.isArray(f)&&f[0]==="ABRIDGEDTRANSFORMATION");l?e.transformation=this.convert(l):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&(f[0]==="PARAMETER"||f[0]==="PARAMETERFILE")).map(f=>{if(f[0]==="PARAMETER")return this.convert(f);if(f[0]==="PARAMETERFILE")return{name:f[1],value:f[2],id:{authority:"EPSG",code:8656}}}),e.parameters.length===7){const f=e.parameters[6];f.name==="Scale difference"&&(f.value=Math.round((f.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const c=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(f=>{f.unit||(f.unit=c)}),c.conversion_factor&&c.conversion_factor!==1&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:c});break;default:e.keyword=t[0];break}return e}}class Zy extends Zg{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&e.coordinate_system.subtype==="Cartesian"&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class t_ extends Zg{static convert(t,e={}){super.convert(t,e);const n=t.find(s=>Array.isArray(s)&&s[0]==="CS");n&&(e.coordinate_system={subtype:n[1],axis:this.extractAxes(t)});const i=t.find(s=>Array.isArray(s)&&s[0]==="USAGE");if(i){const s=i.find(u=>Array.isArray(u)&&u[0]==="SCOPE"),o=i.find(u=>Array.isArray(u)&&u[0]==="AREA"),a=i.find(u=>Array.isArray(u)&&u[0]==="BBOX");e.usage={},s&&(e.usage.scope=s[1]),o&&(e.usage.area=o[1]),a&&(e.usage.bbox=a.slice(1))}return e}}function e_(r){return r.find(t=>Array.isArray(t)&&t[0]==="USAGE")?"2019":(r.find(t=>Array.isArray(t)&&t[0]==="CS")||r[0]==="BOUNDCRS"||r[0]==="PROJCRS"||r[0]==="GEOGCRS","2015")}function r_(r){return(e_(r)==="2019"?t_:Zy).convert(r)}function n_(r){const t=r.toUpperCase();return t.includes("PROJCRS")||t.includes("GEOGCRS")||t.includes("BOUNDCRS")||t.includes("VERTCRS")||t.includes("LENGTHUNIT")||t.includes("ANGLEUNIT")||t.includes("SCALEUNIT")?"WKT2":(t.includes("PROJCS")||t.includes("GEOGCS")||t.includes("LOCAL_CS")||t.includes("VERT_CS")||t.includes("UNIT"),"WKT1")}var bu=1,tp=2,ep=3,Xh=4,rp=5,Ic=-1,i_=/\s/,s_=/[A-Za-z]/,o_=/[A-Za-z84_]/,Hh=/[,\]]/,np=/[\d\.E\-\+]/;function Ki(r){if(typeof r!="string")throw new Error("not a string");this.text=r.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=bu}Ki.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==Xh)for(;i_.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case bu:return this.neutral(r);case tp:return this.keyword(r);case Xh:return this.quoted(r);case rp:return this.afterquote(r);case ep:return this.number(r);case Ic:return}},Ki.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=Xh;return}if(Hh.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)},Ki.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=bu;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=bu,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Ic);return}},Ki.prototype.number=function(r){if(np.test(r)){this.word+=r;return}if(Hh.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)},Ki.prototype.quoted=function(r){if(r==='"'){this.state=rp;return}this.word+=r},Ki.prototype.keyword=function(r){if(o_.test(r)){this.word+=r;return}if(r==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=bu;return}if(Hh.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)},Ki.prototype.neutral=function(r){if(s_.test(r)){this.word=r,this.state=tp;return}if(r==='"'){this.word="",this.state=Xh;return}if(np.test(r)){this.word=r,this.state=ep;return}if(Hh.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)},Ki.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Ic)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function a_(r){var t=new Ki(r);return t.output()}function Mc(r,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:r,i=e.reduce(function(s,o){return ta(o,s),s},n);t&&(r[t]=i)}function ta(r,t){if(!Array.isArray(r)){t[r]=!0;return}var e=r.shift();if(e==="PARAMETER"&&(e=r.shift()),r.length===1){if(Array.isArray(r[0])){t[e]={},ta(r[0],t[e]);return}t[e]=r[0];return}if(!r.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=r;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(r);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:r[0].toLowerCase(),convert:r[1]},r.length===3&&ta(r[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:r[0],a:r[1],rf:r[2]},r.length===4&&ta(r[3],t[e]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":r[0]=["name",r[0]],Mc(t,e,r);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":r[0]=["name",r[0]],Mc(t,e,r),t[e].type=e;return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return ta(r,t[e]);return Mc(t,e,r)}}var u_=.017453292519943295;function jn(r){return r*u_}function ip(r){const t=(r.projName||"").toLowerCase().replace(/_/g," ");!r.long0&&r.longc&&(t==="albers conic equal area"||t==="lambert azimuthal equal area")&&(r.long0=r.longc),!r.lat_ts&&r.lat1&&(t==="stereographic south pole"||t==="polar stereographic (variant b)")?(r.lat0=jn(r.lat1>0?90:-90),r.lat_ts=r.lat1,delete r.lat1):!r.lat_ts&&r.lat0&&(t==="polar stereographic"||t==="polar stereographic (variant a)")&&(r.lat_ts=r.lat0,r.lat0=jn(r.lat0>0?90:-90),delete r.lat1)}function sp(r){let t={units:null,to_meter:void 0};return typeof r=="string"?(t.units=r.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.units==="meter"&&(t.to_meter=1)):r&&r.name&&(t.units=r.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.to_meter=r.conversion_factor),t}function op(r){return typeof r=="object"?r.value*r.unit.conversion_factor:r}function ap(r,t){r.ellipsoid.radius?(t.a=r.ellipsoid.radius,t.rf=0):(t.a=op(r.ellipsoid.semi_major_axis),r.ellipsoid.inverse_flattening!==void 0?t.rf=r.ellipsoid.inverse_flattening:r.ellipsoid.semi_major_axis!==void 0&&r.ellipsoid.semi_minor_axis!==void 0&&(t.rf=t.a/(t.a-op(r.ellipsoid.semi_minor_axis))))}function Bh(r,t={}){return!r||typeof r!="object"?r:r.type==="BoundCRS"?(Bh(r.source_crs,t),r.transformation&&(r.transformation.method&&r.transformation.method.name==="NTv2"?t.nadgrids=r.transformation.parameters[0].value:t.datum_params=r.transformation.parameters.map(e=>e.value)),t):(Object.keys(r).forEach(e=>{const n=r[e];if(n!==null)switch(e){case"name":if(t.srsCode)break;t.name=n,t.srsCode=n;break;case"type":n==="GeographicCRS"?t.projName="longlat":n==="ProjectedCRS"&&r.conversion&&r.conversion.method&&(t.projName=r.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(t.ellps=n.ellipsoid.name,ap(n,t)),n.prime_meridian&&(t.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":t.ellps=n.name,ap(n,t);break;case"prime_meridian":t.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis){if(t.axis=n.axis.map(i=>{const s=i.direction;if(s==="east")return"e";if(s==="north")return"n";if(s==="west")return"w";if(s==="south")return"s";throw new Error(`Unknown axis direction: ${s}`)}).join("")+"u",n.unit){const{units:i,to_meter:s}=sp(n.unit);t.units=i,t.to_meter=s}else if(n.axis[0]&&n.axis[0].unit){const{units:i,to_meter:s}=sp(n.axis[0].unit);t.units=i,t.to_meter=s}}break;case"id":n.authority&&n.code&&(t.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(t.projName=n.method.name),n.parameters&&n.parameters.forEach(i=>{const s=i.name.toLowerCase().replace(/\s+/g,"_"),o=i.value;i.unit&&i.unit.conversion_factor?t[s]=o*i.unit.conversion_factor:i.unit==="degree"?t[s]=o*Math.PI/180:t[s]=o});break;case"unit":n.name&&(t.units=n.name.toLowerCase(),t.units==="metre"&&(t.units="meter")),n.conversion_factor&&(t.to_meter=n.conversion_factor);break;case"base_crs":Bh(n,t),t.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name;break}}),t.latitude_of_false_origin!==void 0&&(t.lat0=t.latitude_of_false_origin),t.longitude_of_false_origin!==void 0&&(t.long0=t.longitude_of_false_origin),t.latitude_of_standard_parallel!==void 0&&(t.lat0=t.latitude_of_standard_parallel,t.lat1=t.latitude_of_standard_parallel),t.latitude_of_1st_standard_parallel!==void 0&&(t.lat1=t.latitude_of_1st_standard_parallel),t.latitude_of_2nd_standard_parallel!==void 0&&(t.lat2=t.latitude_of_2nd_standard_parallel),t.latitude_of_projection_centre!==void 0&&(t.lat0=t.latitude_of_projection_centre),t.longitude_of_projection_centre!==void 0&&(t.longc=t.longitude_of_projection_centre),t.easting_at_false_origin!==void 0&&(t.x0=t.easting_at_false_origin),t.northing_at_false_origin!==void 0&&(t.y0=t.northing_at_false_origin),t.latitude_of_natural_origin!==void 0&&(t.lat0=t.latitude_of_natural_origin),t.longitude_of_natural_origin!==void 0&&(t.long0=t.longitude_of_natural_origin),t.longitude_of_origin!==void 0&&(t.long0=t.longitude_of_origin),t.false_easting!==void 0&&(t.x0=t.false_easting),t.easting_at_projection_centre&&(t.x0=t.easting_at_projection_centre),t.false_northing!==void 0&&(t.y0=t.false_northing),t.northing_at_projection_centre&&(t.y0=t.northing_at_projection_centre),t.standard_parallel_1!==void 0&&(t.lat1=t.standard_parallel_1),t.standard_parallel_2!==void 0&&(t.lat2=t.standard_parallel_2),t.scale_factor_at_natural_origin!==void 0&&(t.k0=t.scale_factor_at_natural_origin),t.scale_factor_at_projection_centre!==void 0&&(t.k0=t.scale_factor_at_projection_centre),t.scale_factor_on_pseudo_standard_parallel!==void 0&&(t.k0=t.scale_factor_on_pseudo_standard_parallel),t.azimuth!==void 0&&(t.alpha=t.azimuth),t.azimuth_at_projection_centre!==void 0&&(t.alpha=t.azimuth_at_projection_centre),t.angle_from_rectified_to_skew_grid&&(t.rectified_grid_angle=t.angle_from_rectified_to_skew_grid),ip(t),t)}var h_=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function l_(r,t){var e=t[0],n=t[1];!(e in r)&&n in r&&(r[e]=r[n],t.length===3&&(r[e]=t[2](r[e])))}function up(r){for(var t=Object.keys(r),e=0,n=t.length;e<n;++e){var i=t[e];h_.indexOf(i)!==-1&&c_(r[i]),typeof r[i]=="object"&&up(r[i])}}function c_(r){if(r.AUTHORITY){var t=Object.keys(r.AUTHORITY)[0];t&&t in r.AUTHORITY&&(r.title=t+":"+r.AUTHORITY[t])}if(r.type==="GEOGCS"?r.projName="longlat":r.type==="LOCAL_CS"?(r.projName="identity",r.local=!0):typeof r.PROJECTION=="object"?r.projName=Object.keys(r.PROJECTION)[0]:r.projName=r.PROJECTION,r.AXIS){for(var e="",n=0,i=r.AXIS.length;n<i;++n){var s=[r.AXIS[n][0].toLowerCase(),r.AXIS[n][1].toLowerCase()];s[0].indexOf("north")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="north"?e+="n":s[0].indexOf("south")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="south"?e+="s":s[0].indexOf("east")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="east"?e+="e":(s[0].indexOf("west")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(r.axis=e)}r.UNIT&&(r.units=r.UNIT.name.toLowerCase(),r.units==="metre"&&(r.units="meter"),r.UNIT.convert&&(r.type==="GEOGCS"?r.DATUM&&r.DATUM.SPHEROID&&(r.to_meter=r.UNIT.convert*r.DATUM.SPHEROID.a):r.to_meter=r.UNIT.convert));var o=r.GEOGCS;r.type==="GEOGCS"&&(o=r),o&&(o.DATUM?r.datumCode=o.DATUM.name.toLowerCase():r.datumCode=o.name.toLowerCase(),r.datumCode.slice(0,2)==="d_"&&(r.datumCode=r.datumCode.slice(2)),r.datumCode==="new_zealand_1949"&&(r.datumCode="nzgd49"),(r.datumCode==="wgs_1984"||r.datumCode==="world_geodetic_system_1984")&&(r.PROJECTION==="Mercator_Auxiliary_Sphere"&&(r.sphere=!0),r.datumCode="wgs84"),r.datumCode==="belge_1972"&&(r.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(r.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),r.ellps.toLowerCase().slice(0,13)==="international"&&(r.ellps="intl"),r.a=o.DATUM.SPHEROID.a,r.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(r.datum_params=o.DATUM.TOWGS84),~r.datumCode.indexOf("osgb_1936")&&(r.datumCode="osgb36"),~r.datumCode.indexOf("osni_1952")&&(r.datumCode="osni52"),(~r.datumCode.indexOf("tm65")||~r.datumCode.indexOf("geodetic_datum_of_1965"))&&(r.datumCode="ire65"),r.datumCode==="ch1903+"&&(r.datumCode="ch1903"),~r.datumCode.indexOf("israel")&&(r.datumCode="isr93")),r.b&&!isFinite(r.b)&&(r.b=r.a),r.rectified_grid_angle&&(r.rectified_grid_angle=jn(r.rectified_grid_angle));function a(l){var c=r.to_meter||1;return l*c}var u=function(l){return l_(r,l)},h=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",jn],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",jn],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",jn],["lat0","latitude_of_origin",jn],["lat0","standard_parallel_1",jn],["lat1","standard_parallel_1",jn],["lat2","standard_parallel_2",jn],["azimuth","Azimuth"],["alpha","azimuth",jn],["srsCode","name"]];h.forEach(u),ip(r)}function bc(r){if(typeof r=="object")return Bh(r);const t=n_(r);var e=a_(r);if(t==="WKT2"){const s=r_(e);return Bh(s)}var n=e[0],i={};return ta(e,i),up(i),i[n]}function br(r){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?br[r]=Pc(arguments[1]):br[r]=bc(arguments[1]):br[r]=e}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?br.apply(t,n):br(n)});if(typeof r=="string"){if(r in br)return br[r]}else"EPSG"in r?br["EPSG:"+r.EPSG]=r:"ESRI"in r?br["ESRI:"+r.ESRI]=r:"IAU2000"in r?br["IAU2000:"+r.IAU2000]=r:console.log(r);return}}By(br);function f_(r){return typeof r=="string"}function d_(r){return r in br}function g_(r){return r.indexOf("+")!==0&&r.indexOf("[")!==-1||typeof r=="object"&&!("srsCode"in r)}var p_=["3857","900913","3785","102113"];function v_(r){var t=Ss(r,"authority");if(t){var e=Ss(t,"epsg");return e&&p_.indexOf(e)>-1}}function m_(r){var t=Ss(r,"extension");if(t)return Ss(t,"proj4")}function y_(r){return r[0]==="+"}function __(r){if(f_(r)){if(d_(r))return br[r];if(g_(r)){var t=bc(r);if(v_(t))return br["EPSG:3857"];var e=m_(t);return e?Pc(e):t}if(y_(r))return Pc(r)}else return r.projName?r:bc(r)}function hp(r,t){r=r||{};var e,n;if(!t)return r;for(n in t)e=t[n],e!==void 0&&(r[n]=e);return r}function Ci(r,t,e){var n=r*t;return e/Math.sqrt(1-n*n)}function Nu(r){return r<0?-1:1}function it(r){return Math.abs(r)<=rr?r:r-Nu(r)*Mu}function Qn(r,t,e){var n=r*e,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(Y-t))/n}function xu(r,t){for(var e=.5*r,n,i,s=Y-2*Math.atan(t),o=0;o<=15;o++)if(n=r*Math.sin(s),i=Y-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}function w_(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function E_(r){var t=r.x,e=r.y;if(e*Si>90&&e*Si<-90&&t*Si>180&&t*Si<-180)return null;var n,i;if(Math.abs(Math.abs(e)-Y)<=tt)return null;if(this.sphere)n=this.x0+this.a*this.k0*it(t-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(te+.5*e));else{var s=Math.sin(e),o=Qn(this.e,e,s);n=this.x0+this.a*this.k0*it(t-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return r.x=n,r.y=i,r}function S_(r){var t=r.x-this.x0,e=r.y-this.y0,n,i;if(this.sphere)i=Y-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s=Math.exp(-e/(this.a*this.k0));if(i=xu(this.e,s),i===-9999)return null}return n=it(this.long0+t/(this.a*this.k0)),r.x=n,r.y=i,r}var C_=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const P_={init:w_,forward:E_,inverse:S_,names:C_};function I_(){}function lp(r){return r}var M_=["longlat","identity"],b_=[P_,{init:I_,forward:lp,inverse:lp,names:M_}],ho={},ea=[];function cp(r,t){var e=ea.length;return r.names?(ea[e]=r,r.names.forEach(function(n){ho[n.toLowerCase()]=e}),this):(console.log(t),!0)}function fp(r){return r.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function N_(r){if(!r)return!1;var t=r.toLowerCase();if(typeof ho[t]<"u"&&ea[ho[t]]||(t=fp(t),t in ho&&ea[ho[t]]))return ea[ho[t]]}function x_(){b_.forEach(cp)}const T_={start:x_,add:cp,get:N_};var dp={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const A_=dp.WGS84;function O_(r,t,e,n){var i=r*r,s=t*t,o=(i-s)/i,a=0;n?(r*=1-o*(jy+o*(Qy+o*Ky)),i=r*r,o=0):a=Math.sqrt(o);var u=(i-s)/s;return{es:o,e:a,ep2:u}}function D_(r,t,e,n,i){if(!r){var s=Ss(dp,n);s||(s=A_),r=s.a,t=s.b,e=s.rf}return e&&!t&&(t=(1-1/e)*r),(e===0||Math.abs(r-t)<tt)&&(i=!0,t=r),{a:r,b:t,rf:e,sphere:i}}var Yh={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var L_ in Yh){var Nc=Yh[L_];Nc.datumName&&(Yh[Nc.datumName]=Nc)}function R_(r,t,e,n,i,s,o){var a={};return r===void 0||r==="none"?a.datum_type=Cc:a.datum_type=Yy,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=ao),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=uo,a.datum_params[3]*=Iu,a.datum_params[4]*=Iu,a.datum_params[5]*=Iu,a.datum_params[6]=a.datum_params[6]/1e6+1)),o&&(a.datum_type=Zo,a.grids=o),a.a=e,a.b=n,a.es=i,a.ep2=s,a}var xc={};function F_(r,t,e){return t instanceof ArrayBuffer?G_(r,t,e):{ready:k_(r,t)}}function G_(r,t,e){var n=!0;e!==void 0&&e.includeErrorFields===!1&&(n=!1);var i=new DataView(t),s=z_(i),o=q_(i,s),a=W_(i,o,s,n),u={header:o,subgrids:a};return xc[r]=u,u}async function k_(r,t){for(var e=[],n=await t.getImageCount(),i=n-1;i>=0;i--){var s=await t.getImage(i),o=await s.readRasters(),a=o,u=[s.getWidth(),s.getHeight()],h=s.getBoundingBox().map(gp),l=[s.fileDirectory.ModelPixelScale[0],s.fileDirectory.ModelPixelScale[1]].map(gp),c=h[0]+(u[0]-1)*l[0],f=h[3]-(u[1]-1)*l[1],p=a[0],v=a[1],w=[];for(let y=u[1]-1;y>=0;y--)for(let _=u[0]-1;_>=0;_--){var E=y*u[0]+_;w.push([-Cs(v[E]),Cs(p[E])])}e.push({del:l,lim:u,ll:[-c,f],cvs:w})}var I={header:{nSubgrids:n},subgrids:e};return xc[r]=I,I}function V_(r){if(r===void 0)return null;var t=r.split(",");return t.map(U_)}function U_(r){if(r.length===0)return null;var t=r[0]==="@";return t&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:r,mandatory:!t,grid:xc[r]||null,isNull:!1}}function gp(r){return r*Math.PI/180}function Cs(r){return r/3600*Math.PI/180}function z_(r){var t=r.getInt32(8,!1);return t===11?!1:(t=r.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function q_(r,t){return{nFields:r.getInt32(8,t),nSubgridFields:r.getInt32(24,t),nSubgrids:r.getInt32(40,t),shiftType:Tc(r,56,64).trim(),fromSemiMajorAxis:r.getFloat64(120,t),fromSemiMinorAxis:r.getFloat64(136,t),toSemiMajorAxis:r.getFloat64(152,t),toSemiMinorAxis:r.getFloat64(168,t)}}function Tc(r,t,e){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(t,e)))}function W_(r,t,e,n){for(var i=176,s=[],o=0;o<t.nSubgrids;o++){var a=H_(r,i,e),u=B_(r,i,a,e,n),h=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),l=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);s.push({ll:[Cs(a.lowerLongitude),Cs(a.lowerLatitude)],del:[Cs(a.longitudeInterval),Cs(a.latitudeInterval)],lim:[h,l],count:a.gridNodeCount,cvs:X_(u)});var c=16;n===!1&&(c=8),i+=176+a.gridNodeCount*c}return s}function X_(r){return r.map(function(t){return[Cs(t.longitudeShift),Cs(t.latitudeShift)]})}function H_(r,t,e){return{name:Tc(r,t+8,t+16).trim(),parent:Tc(r,t+24,t+24+8).trim(),lowerLatitude:r.getFloat64(t+72,e),upperLatitude:r.getFloat64(t+88,e),lowerLongitude:r.getFloat64(t+104,e),upperLongitude:r.getFloat64(t+120,e),latitudeInterval:r.getFloat64(t+136,e),longitudeInterval:r.getFloat64(t+152,e),gridNodeCount:r.getInt32(t+168,e)}}function B_(r,t,e,n,i){var s=t+176,o=16;i===!1&&(o=8);for(var a=[],u=0;u<e.gridNodeCount;u++){var h={latitudeShift:r.getFloat32(s+u*o,n),longitudeShift:r.getFloat32(s+u*o+4,n)};i!==!1&&(h.latitudeAccuracy=r.getFloat32(s+u*o+8,n),h.longitudeAccuracy=r.getFloat32(s+u*o+12,n)),a.push(h)}return a}function Pi(r,t){if(!(this instanceof Pi))return new Pi(r);t=t||function(h){if(h)throw h};var e=__(r);if(typeof e!="object"){t("Could not parse to valid json: "+r);return}var n=Pi.projections.get(e.projName);if(!n){t("Could not get projection name from: "+r);return}if(e.datumCode&&e.datumCode!=="none"){var i=Ss(Yh,e.datumCode);i&&(e.datum_params=e.datum_params||(i.towgs84?i.towgs84.split(","):null),e.ellps=i.ellipse,e.datumName=i.datumName?i.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var s=D_(e.a,e.b,e.rf,e.ellps,e.sphere),o=O_(s.a,s.b,s.rf,e.R_A),a=V_(e.nadgrids),u=e.datum||R_(e.datumCode,e.datum_params,s.a,s.b,o.es,o.ep2,a);hp(this,e),hp(this,n),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=u,this.init(),t(null,this)}Pi.projections=T_,Pi.projections.start();function Y_(r,t){return r.datum_type!==t.datum_type||r.a!==t.a||Math.abs(r.es-t.es)>5e-11?!1:r.datum_type===ao?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]:r.datum_type===uo?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]&&r.datum_params[3]===t.datum_params[3]&&r.datum_params[4]===t.datum_params[4]&&r.datum_params[5]===t.datum_params[5]&&r.datum_params[6]===t.datum_params[6]:!0}function pp(r,t,e){var n=r.x,i=r.y,s=r.z?r.z:0,o,a,u,h;if(i<-Y&&i>-1.001*Y)i=-Y;else if(i>Y&&i<1.001*Y)i=Y;else{if(i<-Y)return{x:-1/0,y:-1/0,z:r.z};if(i>Y)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(i),h=Math.cos(i),u=a*a,o=e/Math.sqrt(1-t*u),{x:(o+s)*h*Math.cos(n),y:(o+s)*h*Math.sin(n),z:(o*(1-t)+s)*a}}function vp(r,t,e,n){var i=1e-12,s=i*i,o=30,a,u,h,l,c,f,p,v,w,E,I,y,_,m=r.x,S=r.y,C=r.z?r.z:0,P,b,x;if(a=Math.sqrt(m*m+S*S),u=Math.sqrt(m*m+S*S+C*C),a/e<i){if(P=0,u/e<i)return b=Y,x=-n,{x:r.x,y:r.y,z:r.z}}else P=Math.atan2(S,m);h=C/u,l=a/u,c=1/Math.sqrt(1-t*(2-t)*l*l),v=l*(1-t)*c,w=h*c,_=0;do _++,p=e/Math.sqrt(1-t*w*w),x=a*v+C*w-p*(1-t*w*w),f=t*p/(p+x),c=1/Math.sqrt(1-f*(2-f)*l*l),E=l*(1-f)*c,I=h*c,y=I*v-E*w,v=E,w=I;while(y*y>s&&_<o);return b=Math.atan(I/Math.abs(E)),{x:P,y:b,z:x}}function J_(r,t,e){if(t===ao)return{x:r.x+e[0],y:r.y+e[1],z:r.z+e[2]};if(t===uo){var n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],h=e[6];return{x:h*(r.x-u*r.y+a*r.z)+n,y:h*(u*r.x+r.y-o*r.z)+i,z:h*(-a*r.x+o*r.y+r.z)+s}}}function j_(r,t,e){if(t===ao)return{x:r.x-e[0],y:r.y-e[1],z:r.z-e[2]};if(t===uo){var n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],h=e[6],l=(r.x-n)/h,c=(r.y-i)/h,f=(r.z-s)/h;return{x:l+u*c-a*f,y:-u*l+c+o*f,z:a*l-o*c+f}}}function Jh(r){return r===ao||r===uo}function Q_(r,t,e){if(Y_(r,t)||r.datum_type===Cc||t.datum_type===Cc)return e;var n=r.a,i=r.es;if(r.datum_type===Zo){var s=mp(r,!1,e);if(s!==0)return;n=Qg,i=Kg}var o=t.a,a=t.b,u=t.es;if(t.datum_type===Zo&&(o=Qg,a=Jy,u=Kg),i===u&&n===o&&!Jh(r.datum_type)&&!Jh(t.datum_type))return e;if(e=pp(e,i,n),Jh(r.datum_type)&&(e=J_(e,r.datum_type,r.datum_params)),Jh(t.datum_type)&&(e=j_(e,t.datum_type,t.datum_params)),e=vp(e,u,o,a),t.datum_type===Zo){var h=mp(t,!0,e);if(h!==0)return}return e}function mp(r,t,e){if(r.grids===null||r.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-e.x,y:e.y},i={x:Number.NaN,y:Number.NaN},s=[];t:for(var o=0;o<r.grids.length;o++){var a=r.grids[o];if(s.push(a.name),a.isNull){i=n;break}if(a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}for(var u=a.grid.subgrids,h=0,l=u.length;h<l;h++){var c=u[h],f=(Math.abs(c.del[1])+Math.abs(c.del[0]))/1e4,p=c.ll[0]-f,v=c.ll[1]-f,w=c.ll[0]+(c.lim[0]-1)*c.del[0]+f,E=c.ll[1]+(c.lim[1]-1)*c.del[1]+f;if(!(v>n.y||p>n.x||E<n.y||w<n.x)&&(i=K_(n,t,c),!isNaN(i.x)))break t}}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*Si+" "+n.y*Si+" tried: '"+s+"'"),-1):(e.x=-i.x,e.y=i.y,0)}function K_(r,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(r.x))return n;var i={x:r.x,y:r.y};i.x-=e.ll[0],i.y-=e.ll[1],i.x=it(i.x-Math.PI)+Math.PI;var s=yp(i,e);if(t){if(isNaN(s.x))return n;s.x=i.x-s.x,s.y=i.y-s.y;var o=9,a=1e-12,u,h;do{if(h=yp(s,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}u={x:i.x-(h.x+s.x),y:i.y-(h.y+s.y)},s.x+=u.x,s.y+=u.y}while(o--&&Math.abs(u.x)>a&&Math.abs(u.y)>a);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=it(s.x+e.ll[0]),n.y=s.y+e.ll[1]}else isNaN(s.x)||(n.x=r.x+s.x,n.y=r.y+s.y);return n}function yp(r,t){var e={x:r.x/t.del[0],y:r.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},i={x:e.x-1*n.x,y:e.y-1*n.y},s={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return s;o=n.y*t.lim[0]+n.x;var a={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var u={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var h={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var l={x:t.cvs[o][0],y:t.cvs[o][1]},c=i.x*i.y,f=i.x*(1-i.y),p=(1-i.x)*(1-i.y),v=(1-i.x)*i.y;return s.x=p*a.x+f*u.x+v*l.x+c*h.x,s.y=p*a.y+f*u.y+v*l.y+c*h.y,s}function _p(r,t,e){var n=e.x,i=e.y,s=e.z||0,o,a,u,h={};for(u=0;u<3;u++)if(!(t&&u===2&&e.z===void 0))switch(u===0?(o=n,"ew".indexOf(r.axis[u])!==-1?a="x":a="y"):u===1?(o=i,"ns".indexOf(r.axis[u])!==-1?a="y":a="x"):(o=s,a="z"),r.axis[u]){case"e":h[a]=o;break;case"w":h[a]=-o;break;case"n":h[a]=o;break;case"s":h[a]=-o;break;case"u":e[a]!==void 0&&(h.z=o);break;case"d":e[a]!==void 0&&(h.z=-o);break;default:return null}return h}function wp(r){var t={x:r[0],y:r[1]};return r.length>2&&(t.z=r[2]),r.length>3&&(t.m=r[3]),t}function $_(r){Ep(r.x),Ep(r.y)}function Ep(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function Z_(r,t){return(r.datum.datum_type===ao||r.datum.datum_type===uo||r.datum.datum_type===Zo)&&t.datumCode!=="WGS84"||(t.datum.datum_type===ao||t.datum.datum_type===uo||t.datum.datum_type===Zo)&&r.datumCode!=="WGS84"}function jh(r,t,e,n){var i;Array.isArray(e)?e=wp(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var s=e.z!==void 0;if($_(e),r.datum&&t.datum&&Z_(r,t)&&(i=new Pi("WGS84"),e=jh(r,i,e,n),r=i),n&&r.axis!=="enu"&&(e=_p(r,!1,e)),r.projName==="longlat")e={x:e.x*ae,y:e.y*ae,z:e.z||0};else if(r.to_meter&&(e={x:e.x*r.to_meter,y:e.y*r.to_meter,z:e.z||0}),e=r.inverse(e),!e)return;if(r.from_greenwich&&(e.x+=r.from_greenwich),e=Q_(r.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*Si,y:e.y*Si,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?_p(t,!0,e):(e&&!s&&delete e.z,e)}var Sp=Pi("WGS84");function Ac(r,t,e,n){var i,s,o;return Array.isArray(e)?(i=jh(r,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(e.slice(3)):[i.x,i.y,e[2]].concat(e.slice(3)):[i.x,i.y].concat(e.slice(2)):[i.x,i.y]):(s=jh(r,t,e,n),o=Object.keys(e),o.length===2||o.forEach(function(a){if(typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;s[a]=e[a]}),s)}function Cp(r){return r instanceof Pi?r:r.oProj?r.oProj:Pi(r)}function Ur(r,t,e){r=Cp(r);var n=!1,i;return typeof t>"u"?(t=r,r=Sp,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=r,r=Sp,n=!0),t=Cp(t),e?Ac(r,t,e):(i={forward:function(s,o){return Ac(r,t,s,o)},inverse:function(s,o){return Ac(t,r,s,o)}},n&&(i.oProj=t),i)}var Pp=6,Ip="AJSAJS",Mp="AFAFAF",ra=65,zr=73,mn=79,Tu=86,Au=90;const t1={forward:bp,inverse:e1,toPoint:Np};function bp(r,t){return t=t||5,i1(r1({lat:r[1],lon:r[0]}),t)}function e1(r){var t=Dc(Ap(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Np(r){var t=Dc(Ap(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Oc(r){return r*(Math.PI/180)}function xp(r){return 180*(r/Math.PI)}function r1(r){var t=r.lat,e=r.lon,n=6378137,i=.00669438,s=.9996,o,a,u,h,l,c,f,p=Oc(t),v=Oc(e),w,E;E=Math.floor((e+180)/6)+1,e===180&&(E=60),t>=56&&t<64&&e>=3&&e<12&&(E=32),t>=72&&t<84&&(e>=0&&e<9?E=31:e>=9&&e<21?E=33:e>=21&&e<33?E=35:e>=33&&e<42&&(E=37)),o=(E-1)*6-180+3,w=Oc(o),a=i/(1-i),u=n/Math.sqrt(1-i*Math.sin(p)*Math.sin(p)),h=Math.tan(p)*Math.tan(p),l=a*Math.cos(p)*Math.cos(p),c=Math.cos(p)*(v-w),f=n*((1-i/4-3*i*i/64-5*i*i*i/256)*p-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*p)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*p)-35*i*i*i/3072*Math.sin(6*p));var I=s*u*(c+(1-h+l)*c*c*c/6+(5-18*h+h*h+72*l-58*a)*c*c*c*c*c/120)+5e5,y=s*(f+u*Math.tan(p)*(c*c/2+(5-h+9*l+4*l*l)*c*c*c*c/24+(61-58*h+h*h+600*l-330*a)*c*c*c*c*c*c/720));return t<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(I),zoneNumber:E,zoneLetter:n1(t)}}function Dc(r){var t=r.northing,e=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var s=.9996,o=6378137,a=.00669438,u,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),l,c,f,p,v,w,E,I,y,_=e-5e5,m=t;n<"N"&&(m-=1e7),E=(i-1)*6-180+3,u=a/(1-a),w=m/s,I=w/(o*(1-a/4-3*a*a/64-5*a*a*a/256)),y=I+(3*h/2-27*h*h*h/32)*Math.sin(2*I)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*I)+151*h*h*h/96*Math.sin(6*I),l=o/Math.sqrt(1-a*Math.sin(y)*Math.sin(y)),c=Math.tan(y)*Math.tan(y),f=u*Math.cos(y)*Math.cos(y),p=o*(1-a)/Math.pow(1-a*Math.sin(y)*Math.sin(y),1.5),v=_/(l*s);var S=y-l*Math.tan(y)/p*(v*v/2-(5+3*c+10*f-4*f*f-9*u)*v*v*v*v/24+(61+90*c+298*f+45*c*c-252*u-3*f*f)*v*v*v*v*v*v/720);S=xp(S);var C=(v-(1+2*c+f)*v*v*v/6+(5-2*f+28*c-3*f*f+8*u+24*c*c)*v*v*v*v*v/120)/Math.cos(y);C=E+xp(C);var P;if(r.accuracy){var b=Dc({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});P={top:b.lat,right:b.lon,bottom:S,left:C}}else P={lat:S,lon:C};return P}function n1(r){var t="Z";return 84>=r&&r>=72?t="X":72>r&&r>=64?t="W":64>r&&r>=56?t="V":56>r&&r>=48?t="U":48>r&&r>=40?t="T":40>r&&r>=32?t="S":32>r&&r>=24?t="R":24>r&&r>=16?t="Q":16>r&&r>=8?t="P":8>r&&r>=0?t="N":0>r&&r>=-8?t="M":-8>r&&r>=-16?t="L":-16>r&&r>=-24?t="K":-24>r&&r>=-32?t="J":-32>r&&r>=-40?t="H":-40>r&&r>=-48?t="G":-48>r&&r>=-56?t="F":-56>r&&r>=-64?t="E":-64>r&&r>=-72?t="D":-72>r&&r>=-80&&(t="C"),t}function i1(r,t){var e="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+s1(r.easting,r.northing,r.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function s1(r,t,e){var n=Tp(e),i=Math.floor(r/1e5),s=Math.floor(t/1e5)%20;return o1(i,s,n)}function Tp(r){var t=r%Pp;return t===0&&(t=Pp),t}function o1(r,t,e){var n=e-1,i=Ip.charCodeAt(n),s=Mp.charCodeAt(n),o=i+r-1,a=s+t,u=!1;o>Au&&(o=o-Au+ra-1,u=!0),(o===zr||i<zr&&o>zr||(o>zr||i<zr)&&u)&&o++,(o===mn||i<mn&&o>mn||(o>mn||i<mn)&&u)&&(o++,o===zr&&o++),o>Au&&(o=o-Au+ra-1),a>Tu?(a=a-Tu+ra-1,u=!0):u=!1,(a===zr||s<zr&&a>zr||(a>zr||s<zr)&&u)&&a++,(a===mn||s<mn&&a>mn||(a>mn||s<mn)&&u)&&(a++,a===zr&&a++),a>Tu&&(a=a-Tu+ra-1);var h=String.fromCharCode(o)+String.fromCharCode(a);return h}function Ap(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var t=r.length,e=null,n="",i,s=0;!/[A-Z]/.test(i=r.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,s++}var o=parseInt(n,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+r;var a=r.charAt(s++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+r;e=r.substring(s,s+=2);for(var u=Tp(o),h=a1(e.charAt(0),u),l=u1(e.charAt(1),u);l<h1(a);)l+=2e6;var c=t-s;if(c%2!==0)throw`MGRSPoint has to have an even number
|
|
42
42
|
of digits after the zone letter and two 100km letters - front
|
|
43
43
|
half for easting meters, second half for
|
|
44
|
-
northing meters`+r;var f=c/2,p=0,v=0,w,E,I,y,_;return f>0&&(w=1e5/Math.pow(10,f),E=r.substring(s,s+f),p=parseFloat(E)*w,I=r.substring(s+f),v=parseFloat(I)*w),y=p+h,_=v+l,{easting:y,northing:_,zoneLetter:a,zoneNumber:o,accuracy:w}}function s1(r,t){for(var e=Cp.charCodeAt(t-1),n=1e5,i=!1;e!==r.charCodeAt(0);){if(e++,e===zr&&e++,e===mn&&e++,e>Au){if(i)throw"Bad character: "+r;e=ra,i=!0}n+=1e5}return n}function o1(r,t){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var e=Pp.charCodeAt(t-1),n=0,i=!1;e!==r.charCodeAt(0);){if(e++,e===zr&&e++,e===mn&&e++,e>Tu){if(i)throw"Bad character: "+r;e=ra,i=!0}n+=1e5}return n}function a1(r){var t;switch(r){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+r}function na(r,t,e){if(!(this instanceof na))return new na(r,t,e);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof t>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}na.fromMGRS=function(r){return new na(Mp(r))},na.prototype.toMGRS=function(r){return Ip([this.x,this.y],r)};var u1=1,h1=.25,Tp=.046875,Ap=.01953125,Op=.01068115234375,l1=.75,c1=.46875,f1=.013020833333333334,d1=.007120768229166667,g1=.3645833333333333,p1=.005696614583333333,v1=.3076171875;function Oc(r){var t=[];t[0]=u1-r*(h1+r*(Tp+r*(Ap+r*Op))),t[1]=r*(l1-r*(Tp+r*(Ap+r*Op)));var e=r*r;return t[2]=e*(c1-r*(f1+r*d1)),e*=r,t[3]=e*(g1-r*p1),t[4]=e*r*v1,t}function ia(r,t,e,n){return e*=t,t*=t,n[0]*r-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var m1=20;function Dc(r,t,e){for(var n=1/(1-t),i=r,s=m1;s;--s){var o=Math.sin(i),a=1-t*o*o;if(a=(ia(i,o,Math.cos(i),e)-r)*(a*Math.sqrt(a))*n,i-=a,Math.abs(a)<tt)return i}return i}function y1(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Oc(this.es),this.ml0=ia(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function _1(r){var t=r.x,e=r.y,n=it(t-this.long0),i,s,o,a=Math.sin(e),u=Math.cos(e);if(this.es){var l=u*n,c=Math.pow(l,2),f=this.ep2*Math.pow(u,2),p=Math.pow(f,2),v=Math.abs(u)>tt?Math.tan(e):0,w=Math.pow(v,2),E=Math.pow(w,2);i=1-this.es*Math.pow(a,2),l=l/Math.sqrt(i);var I=ia(e,a,u,this.en);s=this.a*(this.k0*l*(1+c/6*(1-w+f+c/20*(5-18*w+E+14*f-58*w*f+c/42*(61+179*E-E*w-479*w)))))+this.x0,o=this.a*(this.k0*(I-this.ml0+a*n*l/2*(1+c/12*(5-w+9*f+4*p+c/30*(61+E-58*w+270*f-330*w*f+c/56*(1385+543*E-E*w-3111*w))))))+this.y0}else{var h=u*Math.sin(n);if(Math.abs(Math.abs(h)-1)<tt)return 93;if(s=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,o=u*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(o),h>=1){if(h-1>tt)return 93;o=0}else o=Math.acos(o);e<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return r.x=s,r.y=o,r}function w1(r){var t,e,n,i,s=(r.x-this.x0)*(1/this.a),o=(r.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,e=Dc(t,this.es,this.en),Math.abs(e)<Y){var c=Math.sin(e),f=Math.cos(e),p=Math.abs(f)>tt?Math.tan(e):0,v=this.ep2*Math.pow(f,2),w=Math.pow(v,2),E=Math.pow(p,2),I=Math.pow(E,2);t=1-this.es*Math.pow(c,2);var y=s*Math.sqrt(t)/this.k0,_=Math.pow(y,2);t=t*p,n=e-t*_/(1-this.es)*.5*(1-_/12*(5+3*E-9*v*E+v-4*w-_/30*(61+90*E-252*v*E+45*I+46*v-_/56*(1385+3633*E+4095*I+1574*I*E)))),i=it(this.long0+y*(1-_/6*(1+2*E+v-_/20*(5+28*E+24*I+8*v*E+6*v-_/42*(61+662*E+1320*I+720*I*E))))/f)}else n=Y*Nu(o),i=0;else{var a=Math.exp(s/this.k0),u=.5*(a-1/a),h=this.lat0+o/this.k0,l=Math.cos(h);t=Math.sqrt((1-Math.pow(l,2))/(1+Math.pow(u,2))),n=Math.asin(t),o<0&&(n=-n),u===0&&l===0?i=0:i=it(Math.atan2(u,l)+this.long0)}return r.x=i,r.y=n,r}var E1=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const jh={init:y1,forward:_1,inverse:w1,names:E1};function Dp(r){var t=Math.exp(r);return t=(t-1/t)/2,t}function qr(r,t){r=Math.abs(r),t=Math.abs(t);var e=Math.max(r,t),n=Math.min(r,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function S1(r){var t=1+r,e=t-1;return e===0?r:r*Math.log(t)/e}function C1(r){var t=Math.abs(r);return t=S1(t*(1+t/(qr(1,t)+1))),r<0?-t:t}function Lc(r,t){for(var e=2*Math.cos(2*t),n=r.length-1,i=r[n],s=0,o;--n>=0;)o=-s+e*i+r[n],s=i,i=o;return t+o*Math.sin(2*t)}function P1(r,t){for(var e=2*Math.cos(t),n=r.length-1,i=r[n],s=0,o;--n>=0;)o=-s+e*i+r[n],s=i,i=o;return Math.sin(t)*o}function I1(r){var t=Math.exp(r);return t=(t+1/t)/2,t}function Lp(r,t,e){for(var n=Math.sin(t),i=Math.cos(t),s=Dp(e),o=I1(e),a=2*i*o,u=-2*n*s,h=r.length-1,l=r[h],c=0,f=0,p=0,v,w;--h>=0;)v=f,w=c,f=l,c=p,l=-v+a*f-u*c+r[h],p=-w+u*f+a*c;return a=n*o,u=i*s,[a*l-u*p,a*p+u*l]}function M1(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(jh.init.apply(this),this.forward=jh.forward,this.inverse=jh.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),t=r/(2-r),e=t;this.cgb[0]=t*(2+t*(-.6666666666666666+t*(-2+t*(2.577777777777778+t*(.5777777777777777+t*-4.228148148148148))))),this.cbg[0]=t*(-2+t*(.6666666666666666+t*(1.3333333333333333+t*(-1.8222222222222222+t*(.7111111111111111+t*.9824338624338624))))),e=e*t,this.cgb[1]=e*(2.3333333333333335+t*(-1.6+t*(-5.044444444444444+t*(8.584126984126984+t*2.458201058201058)))),this.cbg[1]=e*(1.6666666666666667+t*(-1.0666666666666667+t*(-1.4444444444444444+t*(2.86984126984127+t*-1.6105820105820106)))),e=e*t,this.cgb[2]=e*(3.7333333333333334+t*(-3.8857142857142857+t*(-12.019047619047619+t*26.03668430335097))),this.cbg[2]=e*(-1.7333333333333334+t*(1.619047619047619+t*(1.6+t*-4.474779541446208))),e=e*t,this.cgb[3]=e*(6.792063492063492+t*(-9.485714285714286+t*-28.188500881834216)),this.cbg[3]=e*(1.9634920634920634+t*(-2.4+t*-1.7518165784832451)),e=e*t,this.cgb[4]=e*(13.250793650793652+t*-23.22238255571589),this.cbg[4]=e*(-2.3301587301587303+t*3.5144460477793813),e=e*t,this.cgb[5]=e*27.011268237934903,this.cbg[5]=e*2.8496841430174764,e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(.25+e*(.015625+e/256))),this.utg[0]=t*(-.5+t*(.6666666666666666+t*(-.3854166666666667+t*(.002777777777777778+t*(.158203125+t*-.15905919312169312))))),this.gtu[0]=t*(.5+t*(-.6666666666666666+t*(.3125+t*(.22777777777777777+t*(-.4409722222222222+t*.20875661375661375))))),this.utg[1]=e*(-.020833333333333332+t*(-.06666666666666667+t*(.3034722222222222+t*(-.4380952380952381+t*.2890188388723545)))),this.gtu[1]=e*(.2708333333333333+t*(-.6+t*(.38680555555555557+t*(.44603174603174606+t*-1.0248393063822752)))),e=e*t,this.utg[2]=e*(-.035416666666666666+t*(.04404761904761905+t*(.046651785714285715+t*-.06138668430335097))),this.gtu[2]=e*(.25416666666666665+t*(-.7357142857142858+t*(.5603050595238095+t*.9237378747795415))),e=e*t,this.utg[3]=e*(-.02726314484126984+t*(.021825396825396824+t*.11439745921516754)),this.gtu[3]=e*(.30729786706349205+t*(-1.0654761904761905+t*.9096203979276896)),e=e*t,this.utg[4]=e*(-.02841641865079365+t*.027268468414301746),this.gtu[4]=e*(.4306671626984127+t*-1.713007555715889),e=e*t,this.utg[5]=e*-.03233083094085698,this.gtu[5]=e*.6650675310896665;var n=Lc(this.cbg,this.lat0);this.Zb=-this.Qn*(n+P1(this.gtu,2*n))}function b1(r){var t=it(r.x-this.long0),e=r.y;e=Lc(this.cbg,e);var n=Math.sin(e),i=Math.cos(e),s=Math.sin(t),o=Math.cos(t);e=Math.atan2(n,o*i),t=Math.atan2(s*i,qr(n,i*o)),t=C1(Math.tan(t));var a=Lp(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var u,h;return Math.abs(t)<=2.623395162778?(u=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(u=1/0,h=1/0),r.x=u,r.y=h,r}function N1(r){var t=(r.x-this.x0)*(1/this.a),e=(r.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,i;if(Math.abs(t)<=2.623395162778){var s=Lp(this.utg,2*e,2*t);e=e+s[0],t=t+s[1],t=Math.atan(Dp(t));var o=Math.sin(e),a=Math.cos(e),u=Math.sin(t),h=Math.cos(t);e=Math.atan2(o*h,qr(u,h*a)),t=Math.atan2(u,h*a),n=it(t+this.long0),i=Lc(this.cgb,e)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var x1=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Qh={init:M1,forward:b1,inverse:N1,names:x1};function T1(r,t){if(r===void 0){if(r=Math.floor((it(t)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var A1="etmerc";function O1(){var r=T1(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*ae,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Qh.init.apply(this),this.forward=Qh.forward,this.inverse=Qh.inverse}var D1=["Universal Transverse Mercator System","utm"];const L1={init:O1,names:D1,dependsOn:A1};function Rc(r,t){return Math.pow((1-r)/(1+r),t)}var R1=20;function F1(){var r=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+te)/(Math.pow(Math.tan(.5*this.lat0+te),this.C)*Rc(this.e*r,this.ratexp))}function G1(r){var t=r.x,e=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+te),this.C)*Rc(this.e*Math.sin(e),this.ratexp))-Y,r.x=this.C*t,r}function k1(r){for(var t=1e-14,e=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+te)/this.K,1/this.C),s=R1;s>0&&(n=2*Math.atan(i*Rc(this.e*Math.sin(r.y),-.5*this.e))-Y,!(Math.abs(n-r.y)<t));--s)r.y=n;return s?(r.x=e,r.y=n,r):null}const Fc={init:F1,forward:G1,inverse:k1};function V1(){Fc.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function U1(r){var t,e,n,i;return r.x=it(r.x-this.long0),Fc.forward.apply(this,[r]),t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),r.x=i*e*Math.sin(r.x),r.y=i*(this.cosc0*t-this.sinc0*e*n),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function z1(r){var t,e,n,i,s;if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,s=qr(r.x,r.y)){var o=2*Math.atan2(s,this.R2);t=Math.sin(o),e=Math.cos(o),i=Math.asin(e*this.sinc0+r.y*t*this.cosc0/s),n=Math.atan2(r.x*t,s*this.cosc0*e-r.y*this.sinc0*t)}else i=this.phic0,n=0;return r.x=n,r.y=i,Fc.inverse.apply(this,[r]),r.x=it(r.x+this.long0),r}var q1=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const W1={init:V1,forward:U1,inverse:z1,names:q1};function X1(r,t,e){return t*=e,Math.tan(.5*(Y+r))*Math.pow((1-t)/(1+t),.5*e)}function H1(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=tt&&(this.k0=.5*(1+Nu(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=tt&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=tt&&Math.abs(Math.cos(this.lat_ts))>tt&&(this.k0=.5*this.cons*Ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Qn(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ci(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Y,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function B1(r){var t=r.x,e=r.y,n=Math.sin(e),i=Math.cos(e),s,o,a,u,h,l,c=it(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=tt&&Math.abs(e+this.lat0)<=tt?(r.x=NaN,r.y=NaN,r):this.sphere?(s=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(c)),r.x=this.a*s*i*Math.sin(c)+this.x0,r.y=this.a*s*(this.coslat0*n-this.sinlat0*i*Math.cos(c))+this.y0,r):(o=2*Math.atan(this.ssfn_(e,n,this.e))-Y,u=Math.cos(o),a=Math.sin(o),Math.abs(this.coslat0)<=tt?(h=Qn(this.e,e*this.con,this.con*n),l=2*this.a*this.k0*h/this.cons,r.x=this.x0+l*Math.sin(t-this.long0),r.y=this.y0-this.con*l*Math.cos(t-this.long0),r):(Math.abs(this.sinlat0)<tt?(s=2*this.a*this.k0/(1+u*Math.cos(c)),r.y=s*a):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*u*Math.cos(c))),r.y=s*(this.cosX0*a-this.sinX0*u*Math.cos(c))+this.y0),r.x=s*u*Math.sin(c)+this.x0,r))}function Y1(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,o=Math.sqrt(r.x*r.x+r.y*r.y);if(this.sphere){var a=2*Math.atan(o/(2*this.a*this.k0));return t=this.long0,e=this.lat0,o<=tt?(r.x=t,r.y=e,r):(e=Math.asin(Math.cos(a)*this.sinlat0+r.y*Math.sin(a)*this.coslat0/o),Math.abs(this.coslat0)<tt?this.lat0>0?t=it(this.long0+Math.atan2(r.x,-1*r.y)):t=it(this.long0+Math.atan2(r.x,r.y)):t=it(this.long0+Math.atan2(r.x*Math.sin(a),o*this.coslat0*Math.cos(a)-r.y*this.sinlat0*Math.sin(a))),r.x=t,r.y=e,r)}else if(Math.abs(this.coslat0)<=tt){if(o<=tt)return e=this.lat0,t=this.long0,r.x=t,r.y=e,r;r.x*=this.con,r.y*=this.con,n=o*this.cons/(2*this.a*this.k0),e=this.con*xu(this.e,n),t=this.con*it(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=tt?s=this.X0:(s=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/o),t=it(this.long0+Math.atan2(r.x*Math.sin(i),o*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),e=-1*xu(this.e,Math.tan(.5*(Y+s)));return r.x=t,r.y=e,r}var J1=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const j1={init:H1,forward:B1,inverse:Y1,names:J1,ssfn_:X1};function Q1(){var r=this.lat0;this.lambda0=this.long0;var t=Math.sin(r),e=this.a,n=this.rf,i=1/n,s=2*i-Math.pow(i,2),o=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),u=Math.log(Math.tan(Math.PI/4+r/2)),h=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*u+this.alpha*o/2*h}function K1(r){var t=Math.log(Math.tan(Math.PI/4-r.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(t+e)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(r.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return r.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,r.x=this.R*o+this.x0,r}function $1(r){for(var t=r.x-this.x0,e=r.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),a=this.lambda0+o/this.alpha,u=0,h=s,l=-1e3,c=0;Math.abs(h-l)>1e-7;){if(++c>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),l=h,h=2*Math.atan(Math.exp(u))-Math.PI/2}return r.x=a,r.y=h,r}var Z1=["somerc"];const tw={init:Q1,forward:K1,inverse:$1,names:Z1};var sa=1e-7;function ew(r){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof r.projName=="object"?Object.keys(r.projName)[0]:r.projName;return"no_uoff"in r||"no_off"in r||t.indexOf(e)!==-1||t.indexOf(lp(e))!==-1}function rw(){var r,t,e,n,i,s,o,a,u,h,l=0,c,f=0,p=0,v=0,w=0,E=0,I=0;this.no_off=ew(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var _=!1;if("rectified_grid_angle"in this&&(_=!0),y&&(I=this.alpha),_&&(l=this.rectified_grid_angle),y||_)f=this.longc;else if(p=this.long1,w=this.lat1,v=this.long2,E=this.lat2,Math.abs(w-E)<=sa||(r=Math.abs(w))<=sa||Math.abs(r-Y)<=sa||Math.abs(Math.abs(this.lat0)-Y)<=sa||Math.abs(Math.abs(E)-Y)<=sa)throw new Error;var m=1-this.es;t=Math.sqrt(m),Math.abs(this.lat0)>tt?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),r=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/m),this.A=this.B*this.k0*t/r,n=this.B*t/(e*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Qn(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=i=1),y||_?(y?(c=Math.asin(Math.sin(I)/n),_||(l=I)):(c=l,I=Math.asin(n*Math.sin(c))),this.lam0=f-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(s=Math.pow(Qn(this.e,w,Math.sin(w)),this.B),o=Math.pow(Qn(this.e,E,Math.sin(E)),this.B),i=this.E/s,u=(o-s)/(o+s),h=this.E*this.E,h=(h-o*s)/(h+o*s),r=p-v,r<-Math.pi?v-=Mu:r>Math.pi&&(v+=Mu),this.lam0=it(.5*(p+v)-Math.atan(h*Math.tan(.5*this.B*(p-v))/u)/this.B),c=Math.atan(2*Math.sin(this.B*it(p-this.lam0))/(i-1/i)),l=I=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(l),this.cosrot=Math.cos(l),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(I))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(te-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(te+i))}function nw(r){var t={},e,n,i,s,o,a,u,h;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-Y)>tt){if(o=this.E/Math.pow(Qn(this.e,r.y,Math.sin(r.y)),this.B),a=1/o,e=.5*(o-a),n=.5*(o+a),s=Math.sin(this.B*r.x),i=(e*this.singam-s*this.cosgam)/n,Math.abs(Math.abs(i)-1)<tt)throw new Error;h=.5*this.ArB*Math.log((1-i)/(1+i)),a=Math.cos(this.B*r.x),Math.abs(a)<sa?u=this.A*r.x:u=this.ArB*Math.atan2(e*this.cosgam+s*this.singam,a)}else h=r.y>0?this.v_pole_n:this.v_pole_s,u=this.ArB*r.y;return this.no_rot?(t.x=u,t.y=h):(u-=this.u_0,t.x=h*this.cosrot+u*this.sinrot,t.y=u*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function iw(r){var t,e,n,i,s,o,a,u={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(e=r.y,t=r.x):(e=r.x*this.cosrot-r.y*this.sinrot,t=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),i=.5*(n-1/n),s=.5*(n+1/n),o=Math.sin(this.BrA*t),a=(o*this.cosgam+i*this.singam)/s,Math.abs(Math.abs(a)-1)<tt)u.x=0,u.y=a<0?-Y:Y;else{if(u.y=this.E/Math.sqrt((1+a)/(1-a)),u.y=xu(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(i*this.cosgam-o*this.singam,Math.cos(this.BrA*t))}return u.x+=this.lam0,u}var sw=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const ow={init:rw,forward:nw,inverse:iw,names:sw};function aw(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<tt)){var r=this.b/this.a;this.e=Math.sqrt(1-r*r);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=Ci(this.e,t,e),i=Qn(this.e,this.lat1,t),s=Math.sin(this.lat2),o=Math.cos(this.lat2),a=Ci(this.e,s,o),u=Qn(this.e,this.lat2,s),h=Math.abs(Math.abs(this.lat0)-Y)<tt?0:Qn(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>tt?this.ns=Math.log(n/a)/Math.log(i/u):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function uw(r){var t=r.x,e=r.y;Math.abs(2*Math.abs(e)-Math.PI)<=tt&&(e=Nu(e)*(Y-2*tt));var n=Math.abs(Math.abs(e)-Y),i,s;if(n>tt)i=Qn(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(i,this.ns);else{if(n=e*this.ns,n<=0)return null;s=0}var o=this.ns*it(t-this.long0);return r.x=this.k0*(s*Math.sin(o))+this.x0,r.y=this.k0*(this.rh-s*Math.cos(o))+this.y0,r}function hw(r){var t,e,n,i,s,o=(r.x-this.x0)/this.k0,a=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+a*a),e=1):(t=-Math.sqrt(o*o+a*a),e=-1);var u=0;if(t!==0&&(u=Math.atan2(e*o,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),i=xu(this.e,n),i===-9999)return null}else i=-Y;return s=it(u/this.ns+this.long0),r.x=s,r.y=i,r}var lw=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const cw={init:aw,forward:uw,inverse:hw,names:lw};function fw(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function dw(r){var t,e,n,i,s,o,a,u=r.x,h=r.y,l=it(u-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-l*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),s=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(i)),o=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=a*Math.cos(o)/1,r.x=a*Math.sin(o)/1,this.czech||(r.y*=-1,r.x*=-1),r}function gw(r){var t,e,n,i,s,o,a,u,h=r.x;r.x=r.y,r.y=h,this.czech||(r.y*=-1,r.x*=-1),o=Math.sqrt(r.x*r.x+r.y*r.y),s=Math.atan2(r.y,r.x),i=s/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),e=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),r.x=this.long0-e/this.alfa,a=t,u=0;var l=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-r.y)<1e-10&&(u=1),a=r.y,l+=1;while(u===0&&l<15);return l>=15?null:r}var pw=["Krovak","krovak"];const vw={init:fw,forward:dw,inverse:gw,names:pw};function Nr(r,t,e,n,i){return r*i-t*Math.sin(2*i)+e*Math.sin(4*i)-n*Math.sin(6*i)}function Ou(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function Du(r){return .375*r*(1+.25*r*(1+.46875*r))}function Lu(r){return .05859375*r*r*(1+.75*r)}function Ru(r){return r*r*r*.011393229166666666}function Gc(r,t,e){var n=t*e;return r/Math.sqrt(1-n*n)}function Ps(r){return Math.abs(r)<Y?r:r-Nu(r)*Math.PI}function Kh(r,t,e,n,i){var s,o;s=r/t;for(var a=0;a<15;a++)if(o=(r-(t*s-e*Math.sin(2*s)+n*Math.sin(4*s)-i*Math.sin(6*s)))/(t-2*e*Math.cos(2*s)+4*n*Math.cos(4*s)-6*i*Math.cos(6*s)),s+=o,Math.abs(o)<=1e-10)return s;return NaN}function mw(){this.sphere||(this.e0=Ou(this.es),this.e1=Du(this.es),this.e2=Lu(this.es),this.e3=Ru(this.es),this.ml0=this.a*Nr(this.e0,this.e1,this.e2,this.e3,this.lat0))}function yw(r){var t,e,n=r.x,i=r.y;if(n=it(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var s=Math.sin(i),o=Math.cos(i),a=Gc(this.a,this.e,s),u=Math.tan(i)*Math.tan(i),h=n*Math.cos(i),l=h*h,c=this.es*o*o/(1-this.es),f=this.a*Nr(this.e0,this.e1,this.e2,this.e3,i);t=a*h*(1-l*u*(.16666666666666666-(8-u+8*c)*l/120)),e=f-this.ml0+a*s/o*l*(.5+(5-u+6*c)*l/24)}return r.x=t+this.x0,r.y=e+this.y0,r}function _w(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i;if(this.sphere){var s=e+this.lat0;n=Math.asin(Math.sin(s)*Math.cos(t)),i=Math.atan2(Math.tan(t),Math.cos(s))}else{var o=this.ml0/this.a+e,a=Kh(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-Y)<=tt)return r.x=this.long0,r.y=Y,e<0&&(r.y*=-1),r;var u=Gc(this.a,this.e,Math.sin(a)),h=u*u*u/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(a),2),c=t*this.a/u,f=c*c;n=a-u*Math.tan(a)/h*c*c*(.5-(1+3*l)*c*c/24),i=c*(1-f*(l/3+(1+3*l)*l*f/15))/Math.cos(a)}return r.x=it(i+this.long0),r.y=Ps(n),r}var ww=["Cassini","Cassini_Soldner","cass"];const Ew={init:mw,forward:yw,inverse:_w,names:ww};function Is(r,t){var e;return r>1e-7?(e=r*t,(1-r*r)*(t/(1-e*e)-.5/r*Math.log((1-e)/(1+e)))):2*t}var Sw=1,Cw=2,Pw=3,Iw=4;function Mw(){var r=Math.abs(this.lat0);if(Math.abs(r-Y)<tt?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<tt?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Is(this.e,1),this.mmf=.5/(1-this.es),this.apa=Rw(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Is(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function bw(r){var t,e,n,i,s,o,a,u,h,l,c=r.x,f=r.y;if(c=it(c-this.long0),this.sphere){if(s=Math.sin(f),l=Math.cos(f),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+l*n:1+this.sinph0*s+this.cosph0*l*n,e<=tt)return null;e=Math.sqrt(2/e),t=e*l*Math.sin(c),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*l*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(f+this.lat0)<tt)return null;e=te-f*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(c),e*=n}}else{switch(a=0,u=0,h=0,n=Math.cos(c),i=Math.sin(c),s=Math.sin(f),o=Is(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=o/this.qp,u=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:h=1+this.sinb1*a+this.cosb1*u*n;break;case this.EQUIT:h=1+u*n;break;case this.N_POLE:h=Y+f,o=this.qp-o;break;case this.S_POLE:h=f-Y,o=this.qp+o;break}if(Math.abs(h)<tt)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?e=this.ymf*h*(this.cosb1*a-this.sinb1*u*n):e=(h=Math.sqrt(2/(1+u*n)))*a*this.ymf,t=this.xmf*h*u*i;break;case this.N_POLE:case this.S_POLE:o>=0?(t=(h=Math.sqrt(o))*i,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return r.x=this.a*t+this.x0,r.y=this.a*e+this.y0,r}function Nw(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i,s,o,a,u,h;if(this.sphere){var l=0,c,f=0;if(c=Math.sqrt(t*t+e*e),i=c*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(i),l=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=tt?0:Math.asin(e*f/c),t*=f,e=l*c;break;case this.OBLIQ:i=Math.abs(c)<=tt?this.lat0:Math.asin(l*this.sinph0+e*f*this.cosph0/c),t*=f*this.cosph0,e=(l-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:e=-e,i=Y-i;break;case this.S_POLE:i-=Y;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,u=Math.sqrt(t*t+e*e),u<tt)return r.x=this.long0,r.y=this.lat0,r;o=2*Math.asin(.5*u/this.rq),s=Math.cos(o),t*=o=Math.sin(o),this.mode===this.OBLIQ?(h=s*this.sinb1+e*o*this.cosb1/u,a=this.qp*h,e=u*this.cosb1*s-e*this.sinb1*o):(h=e*o/u,a=this.qp*h,e=u*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return r.x=this.long0,r.y=this.lat0,r;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,e),i=Fw(Math.asin(h),this.apa)}return r.x=it(this.long0+n),r.y=i,r}var xw=.3333333333333333,Tw=.17222222222222222,Aw=.10257936507936508,Ow=.06388888888888888,Dw=.0664021164021164,Lw=.016415012942191543;function Rw(r){var t,e=[];return e[0]=r*xw,t=r*r,e[0]+=t*Tw,e[1]=t*Ow,t*=r,e[0]+=t*Aw,e[1]+=t*Dw,e[2]=t*Lw,e}function Fw(r,t){var e=r+r;return r+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var Gw=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const kw={init:Mw,forward:bw,inverse:Nw,names:Gw,S_POLE:Sw,N_POLE:Cw,EQUIT:Pw,OBLIQ:Iw};function Ms(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function Vw(){Math.abs(this.lat1+this.lat2)<tt||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Ci(this.e3,this.sin_po,this.cos_po),this.qs1=Is(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Ci(this.e3,this.sin_po,this.cos_po),this.qs2=Is(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Is(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>tt?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function Uw(r){var t=r.x,e=r.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Is(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*it(t-this.long0),o=i*Math.sin(s)+this.x0,a=this.rh-i*Math.cos(s)+this.y0;return r.x=o,r.y=a,r}function zw(r){var t,e,n,i,s,o;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(t=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(t=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,t!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,e)),s=it(i/this.ns0+this.long0),r.x=s,r.y=o,r}function qw(r,t){var e,n,i,s,o,a=Ms(.5*t);if(r<tt)return a;for(var u=r*r,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),i=r*e,s=1-i*i,o=.5*s*s/n*(t/(1-u)-e/s+.5/r*Math.log((1-i)/(1+i))),a=a+o,Math.abs(o)<=1e-7)return a;return null}var Ww=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const Xw={init:Vw,forward:Uw,inverse:zw,names:Ww,phi1z:qw};function Hw(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Bw(r){var t,e,n,i,s,o,a,u,h=r.x,l=r.y;return n=it(h-this.long0),t=Math.sin(l),e=Math.cos(l),i=Math.cos(n),o=this.sin_p14*t+this.cos_p14*e*i,s=1,o>0||Math.abs(o)<=tt?(a=this.x0+this.a*s*e*Math.sin(n)/o,u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)/o):(a=this.x0+this.infinity_dist*e*Math.sin(n),u=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*i)),r.x=a,r.y=u,r}function Yw(r){var t,e,n,i,s,o;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(t=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(t,this.rc),e=Math.sin(i),n=Math.cos(i),o=Ms(n*this.sin_p14+r.y*e*this.cos_p14/t),s=Math.atan2(r.x*e,t*this.cos_p14*n-r.y*this.sin_p14*e),s=it(this.long0+s)):(o=this.phic0,s=0),r.x=s,r.y=o,r}var Jw=["gnom"];const jw={init:Hw,forward:Bw,inverse:Yw,names:Jw};function Qw(r,t){var e=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*Y:Y;for(var n=Math.asin(.5*t),i,s,o,a,u=0;u<30;u++)if(s=Math.sin(n),o=Math.cos(n),a=r*s,i=Math.pow(1-a*a,2)/(2*o)*(t/(1-r*r)-s/(1-a*a)+.5/r*Math.log((1-a)/(1+a))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function Kw(){this.sphere||(this.k0=Ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function $w(r){var t=r.x,e=r.y,n,i,s=it(t-this.long0);if(this.sphere)n=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var o=Is(this.e,Math.sin(e));n=this.x0+this.a*this.k0*s,i=this.y0+this.a*o*.5/this.k0}return r.x=n,r.y=i,r}function Zw(r){r.x-=this.x0,r.y-=this.y0;var t,e;return this.sphere?(t=it(this.long0+r.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(e=Qw(this.e,2*r.y*this.k0/this.a),t=it(this.long0+r.x/(this.a*this.k0))),r.x=t,r.y=e,r}var tE=["cea"];const eE={init:Kw,forward:$w,inverse:Zw,names:tE};function rE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function nE(r){var t=r.x,e=r.y,n=it(t-this.long0),i=Ps(e-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function iE(r){var t=r.x,e=r.y;return r.x=it(this.long0+(t-this.x0)/(this.a*this.rc)),r.y=Ps(this.lat0+(e-this.y0)/this.a),r}var sE=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const oE={init:rE,forward:nE,inverse:iE,names:sE};var Rp=20;function aE(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ou(this.es),this.e1=Du(this.es),this.e2=Lu(this.es),this.e3=Ru(this.es),this.ml0=this.a*Nr(this.e0,this.e1,this.e2,this.e3,this.lat0)}function uE(r){var t=r.x,e=r.y,n,i,s,o=it(t-this.long0);if(s=o*Math.sin(e),this.sphere)Math.abs(e)<=tt?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(s)/Math.tan(e),i=this.a*(Ps(e-this.lat0)+(1-Math.cos(s))/Math.tan(e)));else if(Math.abs(e)<=tt)n=this.a*o,i=-1*this.ml0;else{var a=Gc(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(s),i=this.a*Nr(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(s))}return r.x=n+this.x0,r.y=i+this.y0,r}function hE(r){var t,e,n,i,s,o,a,u,h;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=tt)t=it(n/this.a+this.long0),e=0;else{o=this.lat0+i/this.a,a=n*n/this.a/this.a+o*o,u=o;var l;for(s=Rp;s;--s)if(l=Math.tan(u),h=-1*(o*(u*l+1)-u-.5*(u*u+a)*l)/((u-o)/l-1),u+=h,Math.abs(h)<=tt){e=u;break}t=it(this.long0+Math.asin(n*Math.tan(u)/this.a)/Math.sin(e))}else if(Math.abs(i+this.ml0)<=tt)e=0,t=it(this.long0+n/this.a);else{o=(this.ml0+i)/this.a,a=n*n/this.a/this.a+o*o,u=o;var c,f,p,v,w;for(s=Rp;s;--s)if(w=this.e*Math.sin(u),c=Math.sqrt(1-w*w)*Math.tan(u),f=this.a*Nr(this.e0,this.e1,this.e2,this.e3,u),p=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),v=f/this.a,h=(o*(c*v+1)-v-.5*c*(v*v+a))/(this.es*Math.sin(2*u)*(v*v+a-2*o*v)/(4*c)+(o-v)*(c*p-2/Math.sin(2*u))-p),u-=h,Math.abs(h)<=tt){e=u;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=it(this.long0+Math.asin(n*c/this.a)/Math.sin(e))}return r.x=t,r.y=e,r}var lE=["Polyconic","American_Polyconic","poly"];const cE={init:aE,forward:uE,inverse:hE,names:lE};function fE(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function dE(r){var t,e=r.x,n=r.y,i=n-this.lat0,s=e-this.long0,o=i/Iu*1e-5,a=s,u=1,h=0;for(t=1;t<=10;t++)u=u*o,h=h+this.A[t]*u;var l=h,c=a,f=1,p=0,v,w,E=0,I=0;for(t=1;t<=6;t++)v=f*l-p*c,w=p*l+f*c,f=v,p=w,E=E+this.B_re[t]*f-this.B_im[t]*p,I=I+this.B_im[t]*f+this.B_re[t]*p;return r.x=I*this.a+this.x0,r.y=E*this.a+this.y0,r}function gE(r){var t,e=r.x,n=r.y,i=e-this.x0,s=n-this.y0,o=s/this.a,a=i/this.a,u=1,h=0,l,c,f=0,p=0;for(t=1;t<=6;t++)l=u*o-h*a,c=h*o+u*a,u=l,h=c,f=f+this.C_re[t]*u-this.C_im[t]*h,p=p+this.C_im[t]*u+this.C_re[t]*h;for(var v=0;v<this.iterations;v++){var w=f,E=p,I,y,_=o,m=a;for(t=2;t<=6;t++)I=w*f-E*p,y=E*f+w*p,w=I,E=y,_=_+(t-1)*(this.B_re[t]*w-this.B_im[t]*E),m=m+(t-1)*(this.B_im[t]*w+this.B_re[t]*E);w=1,E=0;var S=this.B_re[1],C=this.B_im[1];for(t=2;t<=6;t++)I=w*f-E*p,y=E*f+w*p,w=I,E=y,S=S+t*(this.B_re[t]*w-this.B_im[t]*E),C=C+t*(this.B_im[t]*w+this.B_re[t]*E);var P=S*S+C*C;f=(_*S+m*C)/P,p=(m*S-_*C)/P}var b=f,x=p,A=1,N=0;for(t=1;t<=9;t++)A=A*b,N=N+this.D[t]*A;var T=this.lat0+N*Iu*1e5,R=this.long0+x;return r.x=R,r.y=T,r}var pE=["New_Zealand_Map_Grid","nzmg"];const vE={init:fE,forward:dE,inverse:gE,names:pE};function mE(){}function yE(r){var t=r.x,e=r.y,n=it(t-this.long0),i=this.x0+this.a*n,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return r.x=i,r.y=s,r}function _E(r){r.x-=this.x0,r.y-=this.y0;var t=it(this.long0+r.x/this.a),e=2.5*(Math.atan(Math.exp(.8*r.y/this.a))-Math.PI/4);return r.x=t,r.y=e,r}var wE=["Miller_Cylindrical","mill"];const EE={init:mE,forward:yE,inverse:_E,names:wE};var SE=20;function CE(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Oc(this.es)}function PE(r){var t,e,n=r.x,i=r.y;if(n=it(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var s=this.n*Math.sin(i),o=SE;o;--o){var a=(this.m*i+Math.sin(i)-s)/(this.m+Math.cos(i));if(i-=a,Math.abs(a)<tt)break}t=this.a*this.C_x*n*(this.m+Math.cos(i)),e=this.a*this.C_y*i}else{var u=Math.sin(i),h=Math.cos(i);e=this.a*ia(i,u,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*u*u)}return r.x=t,r.y=e,r}function IE(r){var t,e,n,i;return r.x-=this.x0,n=r.x/this.a,r.y-=this.y0,t=r.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=Ms((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Ms(Math.sin(t)/this.n)),n=it(n+this.long0),t=Ps(t)):(t=Dc(r.y/this.a,this.es,this.en),i=Math.abs(t),i<Y?(i=Math.sin(t),e=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(t)),n=it(e)):i-tt<Y&&(n=this.long0)),r.x=n,r.y=t,r}var ME=["Sinusoidal","sinu"];const bE={init:CE,forward:PE,inverse:IE,names:ME};function NE(){}function xE(r){for(var t=r.x,e=r.y,n=it(t-this.long0),i=e,s=Math.PI*Math.sin(e);;){var o=-(i+Math.sin(i)-s)/(1+Math.cos(i));if(i+=o,Math.abs(o)<tt)break}i/=2,Math.PI/2-Math.abs(e)<tt&&(n=0);var a=.900316316158*this.a*n*Math.cos(i)+this.x0,u=1.4142135623731*this.a*Math.sin(i)+this.y0;return r.x=a,r.y=u,r}function TE(r){var t,e;r.x-=this.x0,r.y-=this.y0,e=r.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=it(this.long0+r.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var i=Math.asin(e);return r.x=n,r.y=i,r}var AE=["Mollweide","moll"];const OE={init:NE,forward:xE,inverse:TE,names:AE};function DE(){Math.abs(this.lat1+this.lat2)<tt||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ou(this.es),this.e1=Du(this.es),this.e2=Lu(this.es),this.e3=Ru(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ci(this.e,this.sinphi,this.cosphi),this.ml1=Nr(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<tt?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ci(this.e,this.sinphi,this.cosphi),this.ml2=Nr(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Nr(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function LE(r){var t=r.x,e=r.y,n;if(this.sphere)n=this.a*(this.g-e);else{var i=Nr(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-i)}var s=this.ns*it(t-this.long0),o=this.x0+n*Math.sin(s),a=this.y0+this.rh-n*Math.cos(s);return r.x=o,r.y=a,r}function RE(r){r.x-=this.x0,r.y=this.rh-r.y+this.y0;var t,e,n,i;this.ns>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),t=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),t=-1);var s=0;if(e!==0&&(s=Math.atan2(t*r.x,t*r.y)),this.sphere)return i=it(this.long0+s/this.ns),n=Ps(this.g-e/this.a),r.x=i,r.y=n,r;var o=this.g-e/this.a;return n=Kh(o,this.e0,this.e1,this.e2,this.e3),i=it(this.long0+s/this.ns),r.x=i,r.y=n,r}var FE=["Equidistant_Conic","eqdc"];const GE={init:DE,forward:LE,inverse:RE,names:FE};function kE(){this.R=this.a}function VE(r){var t=r.x,e=r.y,n=it(t-this.long0),i,s;Math.abs(e)<=tt&&(i=this.x0+this.R*n,s=this.y0);var o=Ms(2*Math.abs(e/Math.PI));(Math.abs(n)<=tt||Math.abs(Math.abs(e)-Y)<=tt)&&(i=this.x0,e>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*o):s=this.y0+Math.PI*this.R*-Math.tan(.5*o));var a=.5*Math.abs(Math.PI/n-n/Math.PI),u=a*a,h=Math.sin(o),l=Math.cos(o),c=l/(h+l-1),f=c*c,p=c*(2/h-1),v=p*p,w=Math.PI*this.R*(a*(c-v)+Math.sqrt(u*(c-v)*(c-v)-(v+u)*(f-v)))/(v+u);n<0&&(w=-w),i=this.x0+w;var E=u+c;return w=Math.PI*this.R*(p*E-a*Math.sqrt((v+u)*(u+1)-E*E))/(v+u),e>=0?s=this.y0+w:s=this.y0-w,r.x=i,r.y=s,r}function UE(r){var t,e,n,i,s,o,a,u,h,l,c,f,p;return r.x-=this.x0,r.y-=this.y0,c=Math.PI*this.R,n=r.x/c,i=r.y/c,s=n*n+i*i,o=-Math.abs(i)*(1+s),a=o-2*i*i+n*n,u=-2*o+1+2*i*i+s*s,p=i*i/u+(2*a*a*a/u/u/u-9*o*a/u/u)/27,h=(o-a*a/3/u)/u,l=2*Math.sqrt(-h/3),c=3*p/h/l,Math.abs(c)>1&&(c>=0?c=1:c=-1),f=Math.acos(c)/3,r.y>=0?e=(-l*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI:e=-(-l*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI,Math.abs(n)<tt?t=this.long0:t=it(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(n*n-i*i)+s*s))/2/n),r.x=t,r.y=e,r}var zE=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const qE={init:kE,forward:VE,inverse:UE,names:zE};function Fp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function WE(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var t=r.default;if(typeof t=="function"){var e=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),e}var kc={exports:{}},Gp;function XE(){return Gp||(Gp=1,function(r){(function(t){var e={};e.Constants={},e.Math={},e.Accumulator={},function(n){n.WGS84={a:6378137,f:.0033528106647474805},n.version={major:2,minor:1,patch:1},n.version_string="2.1.1"}(e.Constants),function(n){n.digits=53,n.epsilon=Math.pow(.5,n.digits-1),n.degree=Math.PI/180,n.sq=function(i){return i*i},n.hypot=function(i,s){return Math.sqrt(i*i+s*s)},n.cbrt=Math.cbrt||function(i){var s=Math.pow(Math.abs(i),.3333333333333333);return i>0?s:i<0?-s:i},n.log1p=Math.log1p||function(i){var s=1+i,o=s-1;return o===0?i:i*Math.log(s)/o},n.atanh=Math.atanh||function(i){var s=Math.abs(i);return s=n.log1p(2*s/(1-s))/2,i>0?s:i<0?-s:i},n.copysign=function(i,s){return Math.abs(i)*(s<0||s===0&&1/s<0?-1:1)},n.sum=function(i,s){var o=i+s,a=o-s,u=o-a,h;return a-=i,u-=s,h=o&&0-(a+u),{s:o,t:h}},n.polyval=function(i,s,o,a){for(var u=i<0?0:s[o++];--i>=0;)u=u*a+s[o++];return u},n.AngRound=function(i){var s=.0625,o=Math.abs(i);return o=o<s?s-(s-o):o,n.copysign(o,i)},n.remainder=function(i,s){return i%=s,i<-s/2?i+s:i<s/2?i:i-s},n.AngNormalize=function(i){var s=n.remainder(i,360);return Math.abs(s)===180?n.copysign(180,i):s},n.LatFix=function(i){return Math.abs(i)>90?NaN:i},n.AngDiff=function(i,s){var o=n.sum(n.remainder(-i,360),n.remainder(s,360)),a,u;return o=n.sum(n.remainder(o.s,360),o.t),a=o.s,u=o.t,(a===0||Math.abs(a)===180)&&(a=n.copysign(a,u===0?s-i:-u)),{d:a,e:u}},n.sincosd=function(i){var s,o,a,u,h,l,c;switch(s=i%360,a=Math.round(s/90),s-=90*a,o=s*this.degree,u=Math.sin(o),h=Math.cos(o),Math.abs(s)===45?(h=Math.sqrt(.5),u=n.copysign(h,o)):Math.abs(s)===30&&(h=Math.sqrt(.75),u=n.copysign(.5,o)),a&3){case 0:l=u,c=h;break;case 1:l=h,c=-u;break;case 2:l=-u,c=-h;break;default:l=-h,c=u;break}return c+=0,l===0&&(l=n.copysign(l,i)),{s:l,c}},n.sincosde=function(i,s){var o,a,u,h,l,c,f;switch(o=i%360,u=Math.round(o/90),o=n.AngRound(o-90*u+s),a=o*this.degree,h=Math.sin(a),l=Math.cos(a),Math.abs(o)===45?(l=Math.sqrt(.5),h=n.copysign(l,a)):Math.abs(o)===30&&(l=Math.sqrt(.75),h=n.copysign(.5,a)),u&3){case 0:c=h,f=l;break;case 1:c=l,f=-h;break;case 2:c=-h,f=-l;break;default:c=-l,f=h;break}return f+=0,c===0&&(c=n.copysign(c,i+s)),{s:c,c:f}},n.atan2d=function(i,s){var o=0,a;switch(Math.abs(i)>Math.abs(s)&&([i,s]=[s,i],o=2),n.copysign(1,s)<0&&(s=-s,++o),a=Math.atan2(i,s)/this.degree,o){case 1:a=n.copysign(180,i)-a;break;case 2:a=90-a;break;case 3:a=-90+a;break}return a}}(e.Math),function(n,i){n.Accumulator=function(s){this.Set(s)},n.Accumulator.prototype.Set=function(s){s||(s=0),s.constructor===n.Accumulator?(this._s=s._s,this._t=s._t):(this._s=s,this._t=0)},n.Accumulator.prototype.Add=function(s){var o=i.sum(s,this._t),a=i.sum(o.s,this._s);o=o.t,this._s=a.s,this._t=a.t,this._s===0?this._s=o:this._t+=o},n.Accumulator.prototype.Sum=function(s){var o;return s?(o=new n.Accumulator(this),o.Add(s),o._s):this._s},n.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},n.Accumulator.prototype.Remainder=function(s){this._s=i.remainder(this._s,s),this.Add(0)}}(e.Accumulator,e.Math),e.Geodesic={},e.GeodesicLine={},e.PolygonArea={},function(n,i,s,o,a){var u=6,h=u,l=u,c=u,f=c,p,v,w=20,E=w+o.digits+10,I=o.epsilon,y=200*I,_=Math.sqrt(I),m=I,S=1e3*_,C=0,P=31,b=32640,x,A,N,T,R,V,$,J,st;n.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),n.nC1_=u,n.nC1p_=u,n.nC2_=u,n.nC3_=u,n.nC4_=u,p=n.nC3_*(n.nC3_-1)/2,v=n.nC4_*(n.nC4_+1)/2,n.CAP_C1=1,n.CAP_C1p=2,n.CAP_C2=4,n.CAP_C3=8,n.CAP_C4=16,n.NONE=0,n.ARC=64,n.LATITUDE=128|C,n.LONGITUDE=256|n.CAP_C3,n.AZIMUTH=512|C,n.DISTANCE=1024|n.CAP_C1,n.STANDARD=n.LATITUDE|n.LONGITUDE|n.AZIMUTH|n.DISTANCE,n.DISTANCE_IN=2048|n.CAP_C1|n.CAP_C1p,n.REDUCEDLENGTH=4096|n.CAP_C1|n.CAP_C2,n.GEODESICSCALE=8192|n.CAP_C1|n.CAP_C2,n.AREA=16384|n.CAP_C4,n.ALL=b|P,n.LONG_UNROLL=32768,n.OUT_MASK=b|n.LONG_UNROLL,n.SinCosSeries=function(G,W,k,U){var O=U.length,q=O-(G?1:0),H=2*(k-W)*(k+W),et=q&1?U[--O]:0,ht=0;for(q=Math.floor(q/2);q--;)ht=H*et-ht+U[--O],et=H*ht-et+U[--O];return G?2*W*k*et:k*(et-ht)},x=function(G,W){var k,U=o.sq(G),O=o.sq(W),q=(U+O-1)/6,H,et,ht,rt,_t,nt,Ct,It,Q,wt,bt;return O===0&&q<=0?k=0:(H=U*O/4,et=o.sq(q),ht=q*et,rt=H*(H+2*ht),_t=q,rt>=0?(nt=H+ht,nt+=nt<0?-Math.sqrt(rt):Math.sqrt(rt),Ct=o.cbrt(nt),_t+=Ct+(Ct!==0?et/Ct:0)):(It=Math.atan2(Math.sqrt(-rt),-(H+ht)),_t+=2*q*Math.cos(It/3)),Q=Math.sqrt(o.sq(_t)+O),wt=_t<0?O/(Q-_t):_t+Q,bt=(wt-O)/(2*Q),k=wt/(Math.sqrt(wt+o.sq(bt))+bt)),k},A=[1,4,64,0,256],n.A1m1f=function(G){var W=Math.floor(h/2),k=o.polyval(W,A,0,o.sq(G))/A[W+1];return(k+G)/(1-G)},N=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],n.C1f=function(G,W){var k=o.sq(G),U=G,O=0,q,H;for(q=1;q<=n.nC1_;++q)H=Math.floor((n.nC1_-q)/2),W[q]=U*o.polyval(H,N,O,k)/N[O+H+1],O+=H+2,U*=G},T=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],n.C1pf=function(G,W){var k=o.sq(G),U=G,O=0,q,H;for(q=1;q<=n.nC1p_;++q)H=Math.floor((n.nC1p_-q)/2),W[q]=U*o.polyval(H,T,O,k)/T[O+H+1],O+=H+2,U*=G},R=[-11,-28,-192,0,256],n.A2m1f=function(G){var W=Math.floor(l/2),k=o.polyval(W,R,0,o.sq(G))/R[W+1];return(k-G)/(1+G)},V=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],n.C2f=function(G,W){var k=o.sq(G),U=G,O=0,q,H;for(q=1;q<=n.nC2_;++q)H=Math.floor((n.nC2_-q)/2),W[q]=U*o.polyval(H,V,O,k)/V[O+H+1],O+=H+2,U*=G},n.Geodesic=function(G,W){if(this.a=G,this.f=W,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/o.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(o.sq(this.a)+o.sq(this._b)*(this._e2===0?1:(this._e2>0?o.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*_/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(f),this._C3x=new Array(p),this._C4x=new Array(v),this.A3coeff(),this.C3coeff(),this.C4coeff()},$=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],n.Geodesic.prototype.A3coeff=function(){var G=0,W=0,k,U;for(k=c-1;k>=0;--k)U=Math.min(c-k-1,k),this._A3x[W++]=o.polyval(U,$,G,this._n)/$[G+U+1],G+=U+2},J=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],n.Geodesic.prototype.C3coeff=function(){var G=0,W=0,k,U,O;for(k=1;k<n.nC3_;++k)for(U=n.nC3_-1;U>=k;--U)O=Math.min(n.nC3_-U-1,U),this._C3x[W++]=o.polyval(O,J,G,this._n)/J[G+O+1],G+=O+2},st=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],n.Geodesic.prototype.C4coeff=function(){var G=0,W=0,k,U,O;for(k=0;k<n.nC4_;++k)for(U=n.nC4_-1;U>=k;--U)O=n.nC4_-U-1,this._C4x[W++]=o.polyval(O,st,G,this._n)/st[G+O+1],G+=O+2},n.Geodesic.prototype.A3f=function(G){return o.polyval(f-1,this._A3x,0,G)},n.Geodesic.prototype.C3f=function(G,W){var k=1,U=0,O,q;for(O=1;O<n.nC3_;++O)q=n.nC3_-O-1,k*=G,W[O]=k*o.polyval(q,this._C3x,U,G),U+=q+1},n.Geodesic.prototype.C4f=function(G,W){var k=1,U=0,O,q;for(O=0;O<n.nC4_;++O)q=n.nC4_-O-1,W[O]=k*o.polyval(q,this._C4x,U,G),U+=q+1,k*=G},n.Geodesic.prototype.Lengths=function(G,W,k,U,O,q,H,et,ht,rt,_t,nt,Ct){_t&=n.OUT_MASK;var It={},Q=0,wt=0,bt=0,Lt=0,Xt,Ht,Qt,fe,Ue;if(_t&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&(bt=n.A1m1f(G),n.C1f(G,nt),_t&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Lt=n.A2m1f(G),n.C2f(G,Ct),Q=bt-Lt,Lt=1+Lt),bt=1+bt),_t&n.DISTANCE)Xt=n.SinCosSeries(!0,q,H,nt)-n.SinCosSeries(!0,k,U,nt),It.s12b=bt*(W+Xt),_t&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Ht=n.SinCosSeries(!0,q,H,Ct)-n.SinCosSeries(!0,k,U,Ct),wt=Q*W+(bt*Xt-Lt*Ht));else if(_t&(n.REDUCEDLENGTH|n.GEODESICSCALE)){for(Qt=1;Qt<=n.nC2_;++Qt)Ct[Qt]=bt*nt[Qt]-Lt*Ct[Qt];wt=Q*W+(n.SinCosSeries(!0,q,H,Ct)-n.SinCosSeries(!0,k,U,Ct))}return _t&n.REDUCEDLENGTH&&(It.m0=Q,It.m12b=et*(U*q)-O*(k*H)-U*H*wt),_t&n.GEODESICSCALE&&(fe=U*H+k*q,Ue=this._ep2*(ht-rt)*(ht+rt)/(O+et),It.M12=fe+(Ue*q-H*wt)*k/O,It.M21=fe-(Ue*k-U*wt)*q/et),It},n.Geodesic.prototype.InverseStart=function(G,W,k,U,O,q,H,et,ht,rt,_t){var nt={},Ct=U*W-O*G,It=O*W+U*G,Q,wt,bt,Lt,Xt,Ht,Qt,fe,Ue,Bt,Ft,kt,me,Ae,Bn,ro,Dh,ji,Kt,Zr,Mr,tn,vn;return nt.sig12=-1,Q=U*W,Q+=O*G,wt=It>=0&&Ct<.5&&O*H<.5,wt?(Lt=o.sq(G+U),Lt/=Lt+o.sq(W+O),nt.dnm=Math.sqrt(1+this._ep2*Lt),bt=H/(this._f1*nt.dnm),Xt=Math.sin(bt),Ht=Math.cos(bt)):(Xt=et,Ht=ht),nt.salp1=O*Xt,nt.calp1=Ht>=0?Ct+O*G*o.sq(Xt)/(1+Ht):Q-O*G*o.sq(Xt)/(1-Ht),fe=o.hypot(nt.salp1,nt.calp1),Ue=G*U+W*O*Ht,wt&&fe<this._etol2?(nt.salp2=W*Xt,nt.calp2=Ct-W*U*(Ht>=0?o.sq(Xt)/(1+Ht):1-Ht),Qt=o.hypot(nt.salp2,nt.calp2),nt.salp2/=Qt,nt.calp2/=Qt,nt.sig12=Math.atan2(fe,Ue)):Math.abs(this._n)>.1||Ue>=0||fe>=6*Math.abs(this._n)*Math.PI*o.sq(W)||(vn=Math.atan2(-et,-ht),this.f>=0?(Ae=o.sq(G)*this._ep2,Bn=Ae/(2*(1+Math.sqrt(1+Ae))+Ae),kt=this.f*W*this.A3f(Bn)*Math.PI,me=kt*W,Bt=vn/kt,Ft=Q/me):(ro=O*W-U*G,Dh=Math.atan2(Q,ro),Zr=this.Lengths(this._n,Math.PI+Dh,G,-W,k,U,O,q,W,O,n.REDUCEDLENGTH,rt,_t),ji=Zr.m12b,Kt=Zr.m0,Bt=-1+ji/(W*O*Kt*Math.PI),me=Bt<-.01?Q/Bt:-this.f*o.sq(W)*Math.PI,kt=me/W,Ft=H/kt),Ft>-y&&Bt>-1-S?this.f>=0?(nt.salp1=Math.min(1,-Bt),nt.calp1=-Math.sqrt(1-o.sq(nt.salp1))):(nt.calp1=Math.max(Bt>-y?0:-1,Bt),nt.salp1=Math.sqrt(1-o.sq(nt.calp1))):(Mr=x(Bt,Ft),tn=kt*(this.f>=0?-Bt*Mr/(1+Mr):-Ft*(1+Mr)/Mr),Xt=Math.sin(tn),Ht=-Math.cos(tn),nt.salp1=O*Xt,nt.calp1=Q-O*G*o.sq(Xt)/(1-Ht))),nt.salp1<=0?(nt.salp1=1,nt.calp1=0):(Qt=o.hypot(nt.salp1,nt.calp1),nt.salp1/=Qt,nt.calp1/=Qt),nt},n.Geodesic.prototype.Lambda12=function(G,W,k,U,O,q,H,et,ht,rt,_t,nt,Ct,It){var Q={},wt,bt,Lt,Xt,Ht,Qt,fe,Ue,Bt,Ft,kt,me,Ae;return G===0&&et===0&&(et=-n.tiny_),bt=H*W,Lt=o.hypot(et,H*G),Q.ssig1=G,Xt=bt*G,Q.csig1=Ht=et*W,wt=o.hypot(Q.ssig1,Q.csig1),Q.ssig1/=wt,Q.csig1/=wt,Q.salp2=O!==W?bt/O:H,Q.calp2=O!==W||Math.abs(U)!==-G?Math.sqrt(o.sq(et*W)+(W<-G?(O-W)*(W+O):(G-U)*(G+U)))/O:Math.abs(et),Q.ssig2=U,Qt=bt*U,Q.csig2=fe=Q.calp2*O,wt=o.hypot(Q.ssig2,Q.csig2),Q.ssig2/=wt,Q.csig2/=wt,Q.sig12=Math.atan2(Math.max(0,Q.csig1*Q.ssig2-Q.ssig1*Q.csig2),Q.csig1*Q.csig2+Q.ssig1*Q.ssig2),Ue=Math.max(0,Ht*Qt-Xt*fe),Bt=Ht*fe+Xt*Qt,kt=Math.atan2(Ue*rt-Bt*ht,Bt*rt+Ue*ht),me=o.sq(Lt)*this._ep2,Q.eps=me/(2*(1+Math.sqrt(1+me))+me),this.C3f(Q.eps,It),Ft=n.SinCosSeries(!0,Q.ssig2,Q.csig2,It)-n.SinCosSeries(!0,Q.ssig1,Q.csig1,It),Q.domg12=-this.f*this.A3f(Q.eps)*bt*(Q.sig12+Ft),Q.lam12=kt+Q.domg12,_t&&(Q.calp2===0?Q.dlam12=-2*this._f1*k/G:(Ae=this.Lengths(Q.eps,Q.sig12,Q.ssig1,Q.csig1,k,Q.ssig2,Q.csig2,q,W,O,n.REDUCEDLENGTH,nt,Ct),Q.dlam12=Ae.m12b,Q.dlam12*=this._f1/(Q.calp2*O))),Q},n.Geodesic.prototype.Inverse=function(G,W,k,U,O){var q,H;return O||(O=n.STANDARD),O===n.LONG_UNROLL&&(O|=n.STANDARD),O&=n.OUT_MASK,q=this.InverseInt(G,W,k,U,O),H=q.vals,O&n.AZIMUTH&&(H.azi1=o.atan2d(q.salp1,q.calp1),H.azi2=o.atan2d(q.salp2,q.calp2)),H},n.Geodesic.prototype.InverseInt=function(G,W,k,U,O){var q={},H,et,ht,rt,_t,nt,Ct,It,Q,wt,bt,Lt,Xt,Ht,Qt,fe,Ue,Bt,Ft,kt,me,Ae,Bn,ro,Dh,ji,Kt,Zr,Mr,tn,vn,Zl,tc,_u,Jo,Lh,Rh,Fh,Gh,ec,lg,wu,cg,rc,fg,dg,gg,Om,pg,nc,vg,ic,Dm,sc,Lm,Rm,kh,oc,Vh,mg,yg,ac,uc,_g,wg;if(q.lat1=G=o.LatFix(G),q.lat2=k=o.LatFix(k),G=o.AngRound(G),k=o.AngRound(k),H=o.AngDiff(W,U),et=H.e,H=H.d,O&n.LONG_UNROLL?(q.lon1=W,q.lon2=W+H+et):(q.lon1=o.AngNormalize(W),q.lon2=o.AngNormalize(U)),ht=o.copysign(1,H),H*=ht,et*=ht,Qt=H*o.degree,rt=o.sincosde(H,et),fe=rt.s,Ue=rt.c,et=180-H-et,_t=Math.abs(G)<Math.abs(k)||isNaN(k)?-1:1,_t<0&&(ht*=-1,[k,G]=[G,k]),nt=o.copysign(1,-G),G*=nt,k*=nt,rt=o.sincosd(G),Ct=this._f1*rt.s,It=rt.c,rt=o.hypot(Ct,It),Ct/=rt,It/=rt,It=Math.max(n.tiny_,It),rt=o.sincosd(k),Q=this._f1*rt.s,wt=rt.c,rt=o.hypot(Q,wt),Q/=rt,wt/=rt,wt=Math.max(n.tiny_,wt),It<-Ct?wt===It&&(Q=o.copysign(Ct,Q)):Math.abs(Q)===-Ct&&(wt=It),Xt=Math.sqrt(1+this._ep2*o.sq(Ct)),Ht=Math.sqrt(1+this._ep2*o.sq(Q)),Bn=new Array(n.nC1_+1),ro=new Array(n.nC2_+1),Dh=new Array(n.nC3_),ji=G===-90||fe===0,ji&&(Ft=Ue,kt=fe,me=1,Ae=0,Zr=Ct,Mr=Ft*It,tn=Q,vn=me*wt,Bt=Math.atan2(Math.max(0,Mr*tn-Zr*vn),Mr*vn+Zr*tn),Kt=this.Lengths(this._n,Bt,Zr,Mr,Xt,tn,vn,Ht,It,wt,O|n.DISTANCE|n.REDUCEDLENGTH,Bn,ro),bt=Kt.s12b,Lt=Kt.m12b,O&n.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Bt<1||Lt>=0?((Bt<3*n.tiny_||Bt<I&&(bt<0||Lt<0))&&(Bt=Lt=bt=0),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree):ji=!1),kh=2,!ji&&Ct===0&&(this.f<=0||et>=this.f*180))Ft=me=0,kt=Ae=1,bt=this.a*Qt,Bt=tc=Qt/this._f1,Lt=this._b*Math.sin(Bt),O&n.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt)),q.a12=H/this._f1;else if(!ji)if(Kt=this.InverseStart(Ct,It,Xt,Q,wt,Ht,Qt,fe,Ue,Bn,ro),Bt=Kt.sig12,kt=Kt.salp1,Ft=Kt.calp1,Bt>=0)Ae=Kt.salp2,me=Kt.calp2,_u=Kt.dnm,bt=Bt*this._b*_u,Lt=o.sq(_u)*this._b*Math.sin(Bt/_u),O&n.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt/_u)),q.a12=Bt/o.degree,tc=Qt/(this._f1*_u);else{for(Jo=0,Lh=n.tiny_,Rh=1,Fh=n.tiny_,Gh=-1,ec=!1,lg=!1;Kt=this.Lambda12(Ct,It,Xt,Q,wt,Ht,kt,Ft,fe,Ue,Jo<w,Bn,ro,Dh),wu=Kt.lam12,Ae=Kt.salp2,me=Kt.calp2,Bt=Kt.sig12,Zr=Kt.ssig1,Mr=Kt.csig1,tn=Kt.ssig2,vn=Kt.csig2,Zl=Kt.eps,Vh=Kt.domg12,cg=Kt.dlam12,!(lg||!(Math.abs(wu)>=(ec?8:1)*I)||Jo==E);++Jo){if(wu>0&&(Jo<w||Ft/kt>Gh/Fh)?(Fh=kt,Gh=Ft):wu<0&&(Jo<w||Ft/kt<Rh/Lh)&&(Lh=kt,Rh=Ft),Jo<w&&cg>0&&(rc=-wu/cg,Math.abs(rc)<Math.PI&&(fg=Math.sin(rc),dg=Math.cos(rc),gg=kt*dg+Ft*fg,gg>0))){Ft=Ft*dg-kt*fg,kt=gg,rt=o.hypot(kt,Ft),kt/=rt,Ft/=rt,ec=Math.abs(wu)<=16*I;continue}kt=(Lh+Fh)/2,Ft=(Rh+Gh)/2,rt=o.hypot(kt,Ft),kt/=rt,Ft/=rt,ec=!1,lg=Math.abs(Lh-kt)+(Rh-Ft)<m||Math.abs(kt-Fh)+(Ft-Gh)<m}Om=O|(O&(n.REDUCEDLENGTH|n.GEODESICSCALE)?n.DISTANCE:n.NONE),Kt=this.Lengths(Zl,Bt,Zr,Mr,Xt,tn,vn,Ht,It,wt,Om,Bn,ro),bt=Kt.s12b,Lt=Kt.m12b,O&n.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree,O&n.AREA&&(_g=Math.sin(Vh),wg=Math.cos(Vh),kh=fe*wg-Ue*_g,oc=Ue*wg+fe*_g)}return O&n.DISTANCE&&(q.s12=0+bt),O&n.REDUCEDLENGTH&&(q.m12=0+Lt),O&n.AREA&&(pg=kt*It,nc=o.hypot(Ft,kt*Ct),nc!==0&&pg!==0?(Zr=Ct,Mr=Ft*It,tn=Q,vn=me*wt,ic=o.sq(nc)*this._ep2,Zl=ic/(2*(1+Math.sqrt(1+ic))+ic),Dm=o.sq(this.a)*nc*pg*this._e2,rt=o.hypot(Zr,Mr),Zr/=rt,Mr/=rt,rt=o.hypot(tn,vn),tn/=rt,vn/=rt,sc=new Array(n.nC4_),this.C4f(Zl,sc),Lm=n.SinCosSeries(!1,Zr,Mr,sc),Rm=n.SinCosSeries(!1,tn,vn,sc),q.S12=Dm*(Rm-Lm)):q.S12=0,!ji&&kh==2&&(kh=Math.sin(tc),oc=Math.cos(tc)),!ji&&oc>-.7071&&Q-Ct<1.75?(Vh=1+oc,mg=1+It,yg=1+wt,vg=2*Math.atan2(kh*(Ct*yg+Q*mg),Vh*(Ct*Q+mg*yg))):(ac=Ae*Ft-me*kt,uc=me*Ft+Ae*kt,ac===0&&uc<0&&(ac=n.tiny_*Ft,uc=-1),vg=Math.atan2(ac,uc)),q.S12+=this._c2*vg,q.S12*=_t*ht*nt,q.S12+=0),_t<0&&([Ae,kt]=[kt,Ae],[me,Ft]=[Ft,me],O&n.GEODESICSCALE&&([q.M21,q.M12]=[q.M12,q.M21])),kt*=_t*ht,Ft*=_t*nt,Ae*=_t*ht,me*=_t*nt,{vals:q,salp1:kt,calp1:Ft,salp2:Ae,calp2:me}},n.Geodesic.prototype.GenDirect=function(G,W,k,U,O,q){var H;return q?q===n.LONG_UNROLL&&(q|=n.STANDARD):q=n.STANDARD,U||(q|=n.DISTANCE_IN),H=new i.GeodesicLine(this,G,W,k,q),H.GenPosition(U,O,q)},n.Geodesic.prototype.Direct=function(G,W,k,U,O){return this.GenDirect(G,W,k,!1,U,O)},n.Geodesic.prototype.ArcDirect=function(G,W,k,U,O){return this.GenDirect(G,W,k,!0,U,O)},n.Geodesic.prototype.Line=function(G,W,k,U){return new i.GeodesicLine(this,G,W,k,U)},n.Geodesic.prototype.DirectLine=function(G,W,k,U,O){return this.GenDirectLine(G,W,k,!1,U,O)},n.Geodesic.prototype.ArcDirectLine=function(G,W,k,U,O){return this.GenDirectLine(G,W,k,!0,U,O)},n.Geodesic.prototype.GenDirectLine=function(G,W,k,U,O,q){var H;return q||(q=n.STANDARD|n.DISTANCE_IN),U||(q|=n.DISTANCE_IN),H=new i.GeodesicLine(this,G,W,k,q),H.GenSetDistance(U,O),H},n.Geodesic.prototype.InverseLine=function(G,W,k,U,O){var q,H,et;return O||(O=n.STANDARD|n.DISTANCE_IN),q=this.InverseInt(G,W,k,U,n.ARC),et=o.atan2d(q.salp1,q.calp1),O&(n.OUT_MASK&n.DISTANCE_IN)&&(O|=n.DISTANCE),H=new i.GeodesicLine(this,G,W,et,O,q.salp1,q.calp1),H.SetArc(q.vals.a12),H},n.Geodesic.prototype.Polygon=function(G){return new s.PolygonArea(this,G)},n.WGS84=new n.Geodesic(a.WGS84.a,a.WGS84.f)}(e.Geodesic,e.GeodesicLine,e.PolygonArea,e.Math,e.Constants),function(n,i,s){i.GeodesicLine=function(o,a,u,h,l,c,f){var p,v,w,E,I,y;l||(l=n.STANDARD|n.DISTANCE_IN),this.a=o.a,this.f=o.f,this._b=o._b,this._c2=o._c2,this._f1=o._f1,this.caps=l|n.LATITUDE|n.AZIMUTH|n.LONG_UNROLL,this.lat1=s.LatFix(a),this.lon1=u,typeof c>"u"||typeof f>"u"?(this.azi1=s.AngNormalize(h),p=s.sincosd(s.AngRound(this.azi1)),this.salp1=p.s,this.calp1=p.c):(this.azi1=h,this.salp1=c,this.calp1=f),p=s.sincosd(s.AngRound(this.lat1)),w=this._f1*p.s,v=p.c,p=s.hypot(w,v),w/=p,v/=p,v=Math.max(n.tiny_,v),this._dn1=Math.sqrt(1+o._ep2*s.sq(w)),this._salp0=this.salp1*v,this._calp0=s.hypot(this.calp1,this.salp1*w),this._ssig1=w,this._somg1=this._salp0*w,this._csig1=this._comg1=w!==0||this.calp1!==0?v*this.calp1:1,p=s.hypot(this._ssig1,this._csig1),this._ssig1/=p,this._csig1/=p,this._k2=s.sq(this._calp0)*o._ep2,E=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&n.CAP_C1&&(this._A1m1=n.A1m1f(E),this._C1a=new Array(n.nC1_+1),n.C1f(E,this._C1a),this._B11=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),I=Math.sin(this._B11),y=Math.cos(this._B11),this._stau1=this._ssig1*y+this._csig1*I,this._ctau1=this._csig1*y-this._ssig1*I),this.caps&n.CAP_C1p&&(this._C1pa=new Array(n.nC1p_+1),n.C1pf(E,this._C1pa)),this.caps&n.CAP_C2&&(this._A2m1=n.A2m1f(E),this._C2a=new Array(n.nC2_+1),n.C2f(E,this._C2a),this._B21=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&n.CAP_C3&&(this._C3a=new Array(n.nC3_),o.C3f(E,this._C3a),this._A3c=-this.f*this._salp0*o.A3f(E),this._B31=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&n.CAP_C4&&(this._C4a=new Array(n.nC4_),o.C4f(E,this._C4a),this._A4=s.sq(this.a)*this._calp0*this._salp0*o._e2,this._B41=n.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},i.GeodesicLine.prototype.GenPosition=function(o,a,u){var h={},l,c,f,p,v,w,E,I,y,_,m,S,C,P,b,x,A,N,T,R,V,$,J,st,G,W,k,U,O;return u?u===n.LONG_UNROLL&&(u|=n.STANDARD):u=n.STANDARD,u&=this.caps&n.OUT_MASK,h.lat1=this.lat1,h.azi1=this.azi1,h.lon1=u&n.LONG_UNROLL?this.lon1:s.AngNormalize(this.lon1),o?h.a12=a:h.s12=a,o||this.caps&n.DISTANCE_IN&n.OUT_MASK?(p=0,v=0,o?(l=a*s.degree,W=s.sincosd(a),c=W.s,f=W.c):(I=a/(this._b*(1+this._A1m1)),y=Math.sin(I),_=Math.cos(I),p=-n.SinCosSeries(!0,this._stau1*_+this._ctau1*y,this._ctau1*_-this._stau1*y,this._C1pa),l=I-(p-this._B11),c=Math.sin(l),f=Math.cos(l),Math.abs(this.f)>.01&&(w=this._ssig1*f+this._csig1*c,E=this._csig1*f-this._ssig1*c,p=n.SinCosSeries(!0,w,E,this._C1a),m=(1+this._A1m1)*(l+(p-this._B11))-a/this._b,l=l-m/Math.sqrt(1+this._k2*s.sq(w)),c=Math.sin(l),f=Math.cos(l))),w=this._ssig1*f+this._csig1*c,E=this._csig1*f-this._ssig1*c,$=Math.sqrt(1+this._k2*s.sq(w)),u&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&((o||Math.abs(this.f)>.01)&&(p=n.SinCosSeries(!0,w,E,this._C1a)),v=(1+this._A1m1)*(p-this._B11)),x=this._calp0*w,A=s.hypot(this._salp0,this._calp0*E),A===0&&(A=E=n.tiny_),R=this._salp0,V=this._calp0*E,o&&u&n.DISTANCE&&(h.s12=this._b*((1+this._A1m1)*l+v)),u&n.LONGITUDE&&(N=this._salp0*w,T=E,b=s.copysign(1,this._salp0),S=u&n.LONG_UNROLL?b*(l-(Math.atan2(w,E)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(b*N,T)-Math.atan2(b*this._somg1,this._comg1))):Math.atan2(N*this._comg1-T*this._somg1,T*this._comg1+N*this._somg1),C=S+this._A3c*(l+(n.SinCosSeries(!0,w,E,this._C3a)-this._B31)),P=C/s.degree,h.lon2=u&n.LONG_UNROLL?this.lon1+P:s.AngNormalize(s.AngNormalize(this.lon1)+s.AngNormalize(P))),u&n.LATITUDE&&(h.lat2=s.atan2d(x,this._f1*A)),u&n.AZIMUTH&&(h.azi2=s.atan2d(R,V)),u&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(J=n.SinCosSeries(!0,w,E,this._C2a),st=(1+this._A2m1)*(J-this._B21),G=(this._A1m1-this._A2m1)*l+(v-st),u&n.REDUCEDLENGTH&&(h.m12=this._b*($*(this._csig1*w)-this._dn1*(this._ssig1*E)-this._csig1*E*G)),u&n.GEODESICSCALE&&(W=this._k2*(w-this._ssig1)*(w+this._ssig1)/(this._dn1+$),h.M12=f+(W*w-E*G)*this._ssig1/this._dn1,h.M21=f-(W*this._ssig1-this._csig1*G)*w/$)),u&n.AREA&&(k=n.SinCosSeries(!1,w,E,this._C4a),this._calp0===0||this._salp0===0?(U=R*this.calp1-V*this.salp1,O=V*this.calp1+R*this.salp1):(U=this._calp0*this._salp0*(f<=0?this._csig1*(1-f)+c*this._ssig1:c*(this._csig1*c/(1+f)+this._ssig1)),O=s.sq(this._salp0)+s.sq(this._calp0)*this._csig1*E),h.S12=this._c2*Math.atan2(U,O)+this._A4*(k-this._B41)),o||(h.a12=l/s.degree),h):(h.a12=NaN,h)},i.GeodesicLine.prototype.Position=function(o,a){return this.GenPosition(!1,o,a)},i.GeodesicLine.prototype.ArcPosition=function(o,a){return this.GenPosition(!0,o,a)},i.GeodesicLine.prototype.GenSetDistance=function(o,a){o?this.SetArc(a):this.SetDistance(a)},i.GeodesicLine.prototype.SetDistance=function(o){var a;this.s13=o,a=this.GenPosition(!1,this.s13,n.ARC),this.a13=0+a.a12},i.GeodesicLine.prototype.SetArc=function(o){var a;this.a13=o,a=this.GenPosition(!0,this.a13,n.DISTANCE),this.s13=0+a.s12}}(e.Geodesic,e.GeodesicLine,e.Math),function(n,i,s,o){var a,u,h,l;a=function(c,f){var p=s.AngDiff(c,f).d;return c=s.AngNormalize(c),f=s.AngNormalize(f),p>0&&(c<0&&f>=0||c>0&&f===0)?1:p<0&&c>=0&&f<0?-1:0},u=function(c,f){return c=c%720,f=f%720,(0<=f&&f<360||f<-360?0:1)-(0<=c&&c<360||c<-360?0:1)},h=function(c,f,p,v,w){return c.Remainder(f),p&1&&c.Add((c.Sum()<0?1:-1)*f/2),v||c.Negate(),w?c.Sum()>f/2?c.Add(-f):c.Sum()<=-f/2&&c.Add(+f):c.Sum()>=f?c.Add(-f):c.Sum()<0&&c.Add(+f),0+c.Sum()},l=function(c,f,p,v,w){return c=s.remainder(c,f),p&1&&(c+=(c<0?1:-1)*f/2),v||(c*=-1),w?c>f/2?c-=f:c<=-f/2&&(c+=f):c>=f?c-=f:c<0&&(c+=f),0+c},n.PolygonArea=function(c,f){this._geod=c,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*c._c2,this.polyline=f||!1,this._mask=i.LATITUDE|i.LONGITUDE|i.DISTANCE|(this.polyline?i.NONE:i.AREA|i.LONG_UNROLL),this.polyline||(this._areasum=new o.Accumulator(0)),this._perimetersum=new o.Accumulator(0),this.Clear()},n.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},n.PolygonArea.prototype.AddPoint=function(c,f){var p;this.num===0?(this._lat0=this.lat=c,this._lon0=this.lon=f):(p=this._geod.Inverse(this.lat,this.lon,c,f,this._mask),this._perimetersum.Add(p.s12),this.polyline||(this._areasum.Add(p.S12),this._crossings+=a(this.lon,f)),this.lat=c,this.lon=f),++this.num},n.PolygonArea.prototype.AddEdge=function(c,f){var p;this.num&&(p=this._geod.Direct(this.lat,this.lon,c,f,this._mask),this._perimetersum.Add(f),this.polyline||(this._areasum.Add(p.S12),this._crossings+=u(this.lon,p.lon2)),this.lat=p.lat2,this.lon=p.lon2),++this.num},n.PolygonArea.prototype.Compute=function(c,f){var p={number:this.num},v,w;return this.num<2?(p.perimeter=0,this.polyline||(p.area=0),p):this.polyline?(p.perimeter=this._perimetersum.Sum(),p):(v=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),p.perimeter=this._perimetersum.Sum(v.s12),w=new o.Accumulator(this._areasum),w.Add(v.S12),p.area=h(w,this._area0,this._crossings+a(this.lon,this._lon0),c,f),p)},n.PolygonArea.prototype.TestPoint=function(c,f,p,v){var w={number:this.num+1},E,I,y,_;if(this.num===0)return w.perimeter=0,this.polyline||(w.area=0),w;for(w.perimeter=this._perimetersum.Sum(),I=this.polyline?0:this._areasum.Sum(),y=this._crossings,_=0;_<(this.polyline?1:2);++_)E=this._geod.Inverse(_===0?this.lat:c,_===0?this.lon:f,_!==0?this._lat0:c,_!==0?this._lon0:f,this._mask),w.perimeter+=E.s12,this.polyline||(I+=E.S12,y+=a(_===0?this.lon:f,_!==0?this._lon0:f));return this.polyline||(w.area=l(I,this._area0,y,p,v)),w},n.PolygonArea.prototype.TestEdge=function(c,f,p,v){var w={number:this.num?this.num+1:0},E,I,y;return this.num===0||(w.perimeter=this._perimetersum.Sum()+f,this.polyline)||(I=this._areasum.Sum(),y=this._crossings,E=this._geod.Direct(this.lat,this.lon,c,f,this._mask),I+=E.S12,y+=u(this.lon,E.lon2),y+=a(E.lon2,this._lon0),E=this._geod.Inverse(E.lat2,E.lon2,this._lat0,this._lon0,this._mask),w.perimeter+=E.s12,I+=E.S12,w.area=l(I,this._area0,y,p,v)),w}}(e.PolygonArea,e.Geodesic,e.Math,e.Accumulator),t(e)})(function(t){r.exports?r.exports=t:window.geodesic=t})}(kc)),kc.exports}var HE=XE();function BE(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new HE.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function YE(r){var t=r.x,e=r.y,n=Math.sin(r.y),i=Math.cos(r.y),s=it(t-this.long0),o,a,u,h,l,c,f,p,v,w,E,I,y,_,m;return this.sphere?Math.abs(this.sin_p12-1)<=tt?(r.x=this.x0+this.a*(Y-e)*Math.sin(s),r.y=this.y0-this.a*(Y-e)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=tt?(r.x=this.x0+this.a*(Y+e)*Math.sin(s),r.y=this.y0+this.a*(Y+e)*Math.cos(s),r):(v=this.sin_p12*n+this.cos_p12*i*Math.cos(s),f=Math.acos(v),p=f?f/Math.sin(f):1,r.x=this.x0+this.a*p*i*Math.sin(s),r.y=this.y0+this.a*p*(this.cos_p12*n-this.sin_p12*i*Math.cos(s)),r):(o=Ou(this.es),a=Du(this.es),u=Lu(this.es),h=Ru(this.es),Math.abs(this.sin_p12-1)<=tt?(l=this.a*Nr(o,a,u,h,Y),c=this.a*Nr(o,a,u,h,e),r.x=this.x0+(l-c)*Math.sin(s),r.y=this.y0-(l-c)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=tt?(l=this.a*Nr(o,a,u,h,Y),c=this.a*Nr(o,a,u,h,e),r.x=this.x0+(l+c)*Math.sin(s),r.y=this.y0+(l+c)*Math.cos(s),r):Math.abs(t)<tt&&Math.abs(e-this.lat0)<tt?(r.x=r.y=0,r):(w=this.lat0/ae,E=this.long0/ae,I=e/ae,y=t/ae,_=this.g.Inverse(w,E,I,y,this.g.AZIMUTH),m=_.azi1*ae,r.x=_.s12*Math.sin(m),r.y=_.s12*Math.cos(m),r))}function JE(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,o,a,u,h,l,c,f,p,v,w,E,I,y;return this.sphere?(t=Math.sqrt(r.x*r.x+r.y*r.y),t>2*Y*this.a?void 0:(e=t/this.a,n=Math.sin(e),i=Math.cos(e),s=this.long0,Math.abs(t)<=tt?o=this.lat0:(o=Ms(i*this.sin_p12+r.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-Y,Math.abs(a)<=tt?this.lat0>=0?s=it(this.long0+Math.atan2(r.x,-r.y)):s=it(this.long0-Math.atan2(-r.x,r.y)):s=it(this.long0+Math.atan2(r.x*n,t*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=s,r.y=o,r)):(u=Ou(this.es),h=Du(this.es),l=Lu(this.es),c=Ru(this.es),Math.abs(this.sin_p12-1)<=tt?(f=this.a*Nr(u,h,l,c,Y),t=Math.sqrt(r.x*r.x+r.y*r.y),p=f-t,o=Kh(p/this.a,u,h,l,c),s=it(this.long0+Math.atan2(r.x,-1*r.y)),r.x=s,r.y=o,r):Math.abs(this.sin_p12+1)<=tt?(f=this.a*Nr(u,h,l,c,Y),t=Math.sqrt(r.x*r.x+r.y*r.y),p=t-f,o=Kh(p/this.a,u,h,l,c),s=it(this.long0+Math.atan2(r.x,r.y)),r.x=s,r.y=o,r):(v=this.lat0/ae,w=this.long0/ae,E=Math.atan2(r.x,r.y)/ae,I=Math.sqrt(r.x*r.x+r.y*r.y),y=this.g.Direct(v,w,E,I,this.g.STANDARD),r.x=y.lon2*ae,r.y=y.lat2*ae,r))}var jE=["Azimuthal_Equidistant","aeqd"];const QE={init:BE,forward:YE,inverse:JE,names:jE};function KE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function $E(r){var t,e,n,i,s,o,a,u,h=r.x,l=r.y;return n=it(h-this.long0),t=Math.sin(l),e=Math.cos(l),i=Math.cos(n),o=this.sin_p14*t+this.cos_p14*e*i,s=1,(o>0||Math.abs(o)<=tt)&&(a=this.a*s*e*Math.sin(n),u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)),r.x=a,r.y=u,r}function ZE(r){var t,e,n,i,s,o,a;return r.x-=this.x0,r.y-=this.y0,t=Math.sqrt(r.x*r.x+r.y*r.y),e=Ms(t/this.a),n=Math.sin(e),i=Math.cos(e),o=this.long0,Math.abs(t)<=tt?(a=this.lat0,r.x=o,r.y=a,r):(a=Ms(i*this.sin_p14+r.y*n*this.cos_p14/t),s=Math.abs(this.lat0)-Y,Math.abs(s)<=tt?(this.lat0>=0?o=it(this.long0+Math.atan2(r.x,-r.y)):o=it(this.long0-Math.atan2(-r.x,r.y)),r.x=o,r.y=a,r):(o=it(this.long0+Math.atan2(r.x*n,t*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=o,r.y=a,r))}var tS=["ortho"];const eS={init:KE,forward:$E,inverse:ZE,names:tS};var Se={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ee={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function rS(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Y-te/2?this.face=Se.TOP:this.lat0<=-(Y-te/2)?this.face=Se.BOTTOM:Math.abs(this.long0)<=te?this.face=Se.FRONT:Math.abs(this.long0)<=Y+te?this.face=this.long0>0?Se.RIGHT:Se.LEFT:this.face=Se.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function nS(r){var t={x:0,y:0},e,n,i,s,o,a,u={value:0};if(r.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):e=r.y,n=r.x,this.face===Se.TOP)s=Y-e,n>=te&&n<=Y+te?(u.value=ee.AREA_0,i=n-Y):n>Y+te||n<=-(Y+te)?(u.value=ee.AREA_1,i=n>0?n-rr:n+rr):n>-(Y+te)&&n<=-te?(u.value=ee.AREA_2,i=n+Y):(u.value=ee.AREA_3,i=n);else if(this.face===Se.BOTTOM)s=Y+e,n>=te&&n<=Y+te?(u.value=ee.AREA_0,i=-n+Y):n<te&&n>=-te?(u.value=ee.AREA_1,i=-n):n<-te&&n>=-(Y+te)?(u.value=ee.AREA_2,i=-n-Y):(u.value=ee.AREA_3,i=n>0?-n+rr:-n-rr);else{var h,l,c,f,p,v,w;this.face===Se.RIGHT?n=oa(n,+Y):this.face===Se.BACK?n=oa(n,3.14159265359):this.face===Se.LEFT&&(n=oa(n,-Y)),f=Math.sin(e),p=Math.cos(e),v=Math.sin(n),w=Math.cos(n),h=p*w,l=p*v,c=f,this.face===Se.FRONT?(s=Math.acos(h),i=$h(s,c,l,u)):this.face===Se.RIGHT?(s=Math.acos(l),i=$h(s,c,-h,u)):this.face===Se.BACK?(s=Math.acos(-h),i=$h(s,c,-l,u)):this.face===Se.LEFT?(s=Math.acos(-l),i=$h(s,c,h,u)):(s=i=0,u.value=ee.AREA_0)}return a=Math.atan(12/rr*(i+Math.acos(Math.sin(i)*Math.cos(te))-Y)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(i))))),u.value===ee.AREA_1?a+=Y:u.value===ee.AREA_2?a+=rr:u.value===ee.AREA_3&&(a+=1.5*rr),t.x=o*Math.cos(a),t.y=o*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,r.x=t.x,r.y=t.y,r}function iS(r){var t={lam:0,phi:0},e,n,i,s,o,a,u,h,l,c={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),e=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?c.value=ee.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(c.value=ee.AREA_1,e-=Y):r.x<0&&-r.x>=Math.abs(r.y)?(c.value=ee.AREA_2,e=e<0?e+rr:e-rr):(c.value=ee.AREA_3,e+=Y),l=rr/12*Math.tan(e),o=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(o),i=Math.cos(e),s=Math.tan(n),u=1-i*i*s*s*(1-Math.cos(Math.atan(1/Math.cos(a)))),u<-1?u=-1:u>1&&(u=1),this.face===Se.TOP)h=Math.acos(u),t.phi=Y-h,c.value===ee.AREA_0?t.lam=a+Y:c.value===ee.AREA_1?t.lam=a<0?a+rr:a-rr:c.value===ee.AREA_2?t.lam=a-Y:t.lam=a;else if(this.face===Se.BOTTOM)h=Math.acos(u),t.phi=h-Y,c.value===ee.AREA_0?t.lam=-a+Y:c.value===ee.AREA_1?t.lam=-a:c.value===ee.AREA_2?t.lam=-a-Y:t.lam=a<0?-a-rr:-a+rr;else{var f,p,v;f=u,l=f*f,l>=1?v=0:v=Math.sqrt(1-l)*Math.sin(a),l+=v*v,l>=1?p=0:p=Math.sqrt(1-l),c.value===ee.AREA_1?(l=p,p=-v,v=l):c.value===ee.AREA_2?(p=-p,v=-v):c.value===ee.AREA_3&&(l=p,p=v,v=-l),this.face===Se.RIGHT?(l=f,f=-p,p=l):this.face===Se.BACK?(f=-f,p=-p):this.face===Se.LEFT&&(l=f,f=p,p=-l),t.phi=Math.acos(-v)-Y,t.lam=Math.atan2(p,f),this.face===Se.RIGHT?t.lam=oa(t.lam,-Y):this.face===Se.BACK?t.lam=oa(t.lam,-3.14159265359):this.face===Se.LEFT&&(t.lam=oa(t.lam,+Y))}if(this.es!==0){var w,E,I;w=t.phi<0?1:0,E=Math.tan(t.phi),I=this.b/Math.sqrt(E*E+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-I*I)/(this.one_minus_f*I)),w&&(t.phi=-t.phi)}return t.lam+=this.long0,r.x=t.lam,r.y=t.phi,r}function $h(r,t,e,n){var i;return r<tt?(n.value=ee.AREA_0,i=0):(i=Math.atan2(t,e),Math.abs(i)<=te?n.value=ee.AREA_0:i>te&&i<=Y+te?(n.value=ee.AREA_1,i-=Y):i>Y+te||i<=-(Y+te)?(n.value=ee.AREA_2,i=i>=0?i-rr:i+rr):(n.value=ee.AREA_3,i+=Y)),i}function oa(r,t){var e=r+t;return e<-3.14159265359?e+=Mu:e>3.14159265359&&(e-=Mu),e}var sS=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const oS={init:rS,forward:nS,inverse:iS,names:sS};var Vc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Fu=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],kp=.8487,Vp=1.3523,Up=Si/5,aS=1/Up,aa=18,Zh=function(r,t){return r[0]+t*(r[1]+t*(r[2]+t*r[3]))},uS=function(r,t){return r[1]+t*(2*r[2]+t*3*r[3])};function hS(r,t,e,n){for(var i=t;n;--n){var s=r(i);if(i-=s,Math.abs(s)<e)break}return i}function lS(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function cS(r){var t=it(r.x-this.long0),e=Math.abs(r.y),n=Math.floor(e*Up);n<0?n=0:n>=aa&&(n=aa-1),e=Si*(e-aS*n);var i={x:Zh(Vc[n],e)*t,y:Zh(Fu[n],e)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*kp+this.x0,i.y=i.y*this.a*Vp+this.y0,i}function fS(r){var t={x:(r.x-this.x0)/(this.a*kp),y:Math.abs(r.y-this.y0)/(this.a*Vp)};if(t.y>=1)t.x/=Vc[aa][0],t.y=r.y<0?-Y:Y;else{var e=Math.floor(t.y*aa);for(e<0?e=0:e>=aa&&(e=aa-1);;)if(Fu[e][0]>t.y)--e;else if(Fu[e+1][0]<=t.y)++e;else break;var n=Fu[e],i=5*(t.y-n[0])/(Fu[e+1][0]-n[0]);i=hS(function(s){return(Zh(n,s)-t.y)/uS(n,s)},i,tt,100),t.x/=Zh(Vc[e],i),t.y=(5*e+i)*ae,r.y<0&&(t.y=-t.y)}return t.x=it(t.x+this.long0),t}var dS=["Robinson","robin"];const gS={init:lS,forward:cS,inverse:fS,names:dS};function pS(){this.name="geocent"}function vS(r){var t=dp(r,this.es,this.a);return t}function mS(r){var t=gp(r,this.es,this.a,this.b);return t}var yS=["Geocentric","geocentric","geocent","Geocent"];const _S={init:pS,forward:vS,inverse:mS,names:yS};var fr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Gu={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function wS(){if(Object.keys(Gu).forEach((function(e){if(typeof this[e]>"u")this[e]=Gu[e].def;else{if(Gu[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Gu[e].num&&(this[e]=parseFloat(this[e]))}Gu[e].degrees&&(this[e]=this[e]*ae)}).bind(this)),Math.abs(Math.abs(this.lat0)-Y)<tt?this.mode=this.lat0<0?fr.S_POLE:fr.N_POLE:Math.abs(this.lat0)<tt?this.mode=fr.EQUIT:(this.mode=fr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var r=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(r),this.sw=Math.sin(r)}function ES(r){r.x-=this.long0;var t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i,s;switch(this.mode){case fr.OBLIQ:s=this.sinph0*t+this.cosph0*e*n;break;case fr.EQUIT:s=e*n;break;case fr.S_POLE:s=-t;break;case fr.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),i=s*e*Math.sin(r.x),this.mode){case fr.OBLIQ:s*=this.cosph0*t-this.sinph0*e*n;break;case fr.EQUIT:s*=t;break;case fr.N_POLE:s*=-(e*n);break;case fr.S_POLE:s*=e*n;break}var o,a;return o=s*this.cg+i*this.sg,a=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-s*this.sg)*this.cw*a,s=o*a,r.x=i*this.a,r.y=s*this.a,r}function SS(r){r.x/=this.a,r.y/=this.a;var t={x:r.x,y:r.y},e,n,i;i=1/(this.pn1-r.y*this.sw),e=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=e*this.cg+n*this.sg,r.y=n*this.cg-e*this.sg;var s=qr(r.x,r.y);if(Math.abs(s)<tt)t.x=0,t.y=r.y;else{var o,a;switch(a=1-s*s*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/s+s/this.pn1),o=Math.sqrt(1-a*a),this.mode){case fr.OBLIQ:t.y=Math.asin(o*this.sinph0+r.y*a*this.cosph0/s),r.y=(o-this.sinph0*Math.sin(t.y))*s,r.x*=a*this.cosph0;break;case fr.EQUIT:t.y=Math.asin(r.y*a/s),r.y=o*s,r.x*=a;break;case fr.N_POLE:t.y=Math.asin(o),r.y=-r.y;break;case fr.S_POLE:t.y=-Math.asin(o);break}t.x=Math.atan2(r.x,r.y)}return r.x=t.x+this.long0,r.y=t.y,r}var CS=["Tilted_Perspective","tpers"];const PS={init:wS,forward:ES,inverse:SS,names:CS};function IS(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var r=1-this.es,t=1/r;this.radius_p=Math.sqrt(r),this.radius_p2=r,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function MS(r){var t=r.x,e=r.y,n,i,s,o;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/qr(this.radius_p*Math.cos(e),Math.sin(e));if(i=a*Math.cos(t)*Math.cos(e),s=a*Math.sin(t)*Math.cos(e),o=a*Math.sin(e),(this.radius_g-i)*i-s*s-o*o*this.radius_p_inv2<0)return r.x=Number.NaN,r.y=Number.NaN,r;n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/qr(o,n)),r.y=this.radius_g_1*Math.atan(o/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(o/qr(s,n)))}else this.shape==="sphere"&&(n=Math.cos(e),i=Math.cos(t)*n,s=Math.sin(t)*n,o=Math.sin(e),n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/qr(o,n)),r.y=this.radius_g_1*Math.atan(o/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(o/qr(s,n))));return r.x=r.x*this.a,r.y=r.y*this.a,r}function bS(r){var t=-1,e=0,n=0,i,s,o,a;if(r.x=r.x/this.a,r.y=r.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*qr(1,n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*qr(1,e));var u=n/this.radius_p;if(i=e*e+u*u+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return r.x=Number.NaN,r.y=Number.NaN,r;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,n*=a,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t),r.y=Math.atan(this.radius_p_inv2*Math.tan(r.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*Math.sqrt(1+e*e)),i=e*e+n*n+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return r.x=Number.NaN,r.y=Number.NaN,r;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,n*=a,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t)}return r.x=r.x+this.long0,r}var NS=["Geostationary Satellite View","Geostationary_Satellite","geos"];const xS={init:IS,forward:MS,inverse:bS,names:NS};var ku=1.340264,Vu=-.081106,Uu=893e-6,zu=.003796,tl=Math.sqrt(3)/2;function TS(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function AS(r){var t=it(r.x-this.long0),e=r.y,n=Math.asin(tl*Math.sin(e)),i=n*n,s=i*i*i;return r.x=t*Math.cos(n)/(tl*(ku+3*Vu*i+s*(7*Uu+9*zu*i))),r.y=n*(ku+Vu*i+s*(Uu+zu*i)),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function OS(r){r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a;var t=1e-9,e=12,n=r.y,i,s,o,a,u,h;for(h=0;h<e&&(i=n*n,s=i*i*i,o=n*(ku+Vu*i+s*(Uu+zu*i))-r.y,a=ku+3*Vu*i+s*(7*Uu+9*zu*i),n-=u=o/a,!(Math.abs(u)<t));++h);return i=n*n,s=i*i*i,r.x=tl*r.x*(ku+3*Vu*i+s*(7*Uu+9*zu*i))/Math.cos(n),r.y=Math.asin(Math.sin(n)/tl),r.x=it(r.x+this.long0),r}var DS=["eqearth","Equal Earth","Equal_Earth"];const LS={init:TS,forward:AS,inverse:OS,names:DS};var qu=1e-10;function RS(){var r;if(this.phi1=this.lat1,Math.abs(this.phi1)<qu)throw new Error;this.es?(this.en=Oc(this.es),this.m1=ia(this.phi1,this.am1=Math.sin(this.phi1),r=Math.cos(this.phi1),this.en),this.am1=r/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=GS,this.forward=FS):(Math.abs(this.phi1)+qu>=Y?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=VS,this.forward=kS)}function FS(r){var t=it(r.x-(this.long0||0)),e=r.y,n,i,s;return n=this.am1+this.m1-ia(e,i=Math.sin(e),s=Math.cos(e),this.en),i=s*t/(n*Math.sqrt(1-this.es*i*i)),r.x=n*Math.sin(i),r.y=this.am1-n*Math.cos(i),r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function GS(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n,i;if(e=qr(r.x,r.y=this.am1-r.y),i=Dc(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(i))<Y)t=Math.sin(i),n=e*Math.atan2(r.x,r.y)*Math.sqrt(1-this.es*t*t)/Math.cos(i);else if(Math.abs(t-Y)<=qu)n=0;else throw new Error;return r.x=it(n+(this.long0||0)),r.y=Ps(i),r}function kS(r){var t=it(r.x-(this.long0||0)),e=r.y,n,i;return i=this.cphi1+this.phi1-e,Math.abs(i)>qu?(r.x=i*Math.sin(n=t*Math.cos(e)/i),r.y=this.cphi1-i*Math.cos(n)):r.x=r.y=0,r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function VS(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n=qr(r.x,r.y=this.cphi1-r.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>Y)throw new Error;return Math.abs(Math.abs(e)-Y)<=qu?t=0:t=n*Math.atan2(r.x,r.y)/Math.cos(e),r.x=it(t+(this.long0||0)),r.y=Ps(e),r}var US=["bonne","Bonne (Werner lat_1=90)"];const zS={init:RS,names:US};function qS(r){r.Proj.projections.add(jh),r.Proj.projections.add(Qh),r.Proj.projections.add(L1),r.Proj.projections.add(W1),r.Proj.projections.add(j1),r.Proj.projections.add(tw),r.Proj.projections.add(ow),r.Proj.projections.add(cw),r.Proj.projections.add(vw),r.Proj.projections.add(Ew),r.Proj.projections.add(kw),r.Proj.projections.add(Xw),r.Proj.projections.add(jw),r.Proj.projections.add(eE),r.Proj.projections.add(oE),r.Proj.projections.add(cE),r.Proj.projections.add(vE),r.Proj.projections.add(EE),r.Proj.projections.add(bE),r.Proj.projections.add(OE),r.Proj.projections.add(GE),r.Proj.projections.add(qE),r.Proj.projections.add(QE),r.Proj.projections.add(eS),r.Proj.projections.add(oS),r.Proj.projections.add(gS),r.Proj.projections.add(_S),r.Proj.projections.add(PS),r.Proj.projections.add(xS),r.Proj.projections.add(LS),r.Proj.projections.add(zS)}Ur.defaultDatum="WGS84",Ur.Proj=Pi,Ur.WGS84=new Ur.Proj("WGS84"),Ur.Point=na,Ur.toPoint=yp,Ur.defs=br,Ur.nadgrid=L_,Ur.transform=Jh,Ur.mgrs=$_,Ur.version="__VERSION__",qS(Ur);const zp=Ur("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function Ii(r){return zp.forward(r)}function qp(r){return zp.inverse(r)}const Wp=Ur("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function WS(r){const t=Wp.forward([r[0],r[1]]);return[t[0],t[1],r[2]]}function XS(r){const t=Wp.inverse([r[0],r[1]]);return[t[0],t[1],r[2]]}var nr=63710088e-1,Xp={centimeters:nr*100,centimetres:nr*100,degrees:nr/111325,feet:nr*3.28084,inches:nr*39.37,kilometers:nr/1e3,kilometres:nr/1e3,meters:nr,metres:nr,miles:nr/1609.344,millimeters:nr*1e3,millimetres:nr*1e3,nauticalmiles:nr/1852,radians:1,yards:nr*1.0936};function Kn(r,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=r,n}function ie(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Hp(r[0])||!Hp(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return Kn(n,t,e)}function dr(r,t,e){e===void 0&&(e={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:r};return Kn(a,t,e)}function $n(r,t,e){if(e===void 0&&(e={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return Kn(n,t,e)}function ua(r,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=r,e}function Uc(r,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:r};return Kn(n,t,e)}function zc(r,t){t===void 0&&(t="kilometers");var e=Xp[t];if(!e)throw new Error(t+" units is invalid");return r*e}function qc(r,t){t===void 0&&(t="kilometers");var e=Xp[t];if(!e)throw new Error(t+" units is invalid");return r/e}function el(r){var t=r%(2*Math.PI);return t*180/Math.PI}function gr(r){var t=r%360;return t*Math.PI/180}function Wc(r,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(r>=0))throw new Error("length must be a positive number");return zc(qc(r,t),e)}function Hp(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function ha(r,t,e){if(r!==null)for(var n,i,s,o,a,u,h,l=0,c=0,f,p=r.type,v=p==="FeatureCollection",w=p==="Feature",E=v?r.features.length:1,I=0;I<E;I++){h=v?r.features[I].geometry:w?r.geometry:r,f=h?h.type==="GeometryCollection":!1,a=f?h.geometries.length:1;for(var y=0;y<a;y++){var _=0,m=0;if(o=f?h.geometries[y]:h,o!==null){u=o.coordinates;var S=o.type;switch(l=e&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(t(u,c,I,_,m)===!1)return!1;c++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(t(u[n],c,I,_,m)===!1)return!1;c++,S==="MultiPoint"&&_++}S==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-l;i++){if(t(u[n][i],c,I,_,m)===!1)return!1;c++}S==="MultiLineString"&&_++,S==="Polygon"&&m++}S==="Polygon"&&_++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(m=0,i=0;i<u[n].length;i++){for(s=0;s<u[n][i].length-l;s++){if(t(u[n][i][s],c,I,_,m)===!1)return!1;c++}m++}_++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(ha(o.geometries[n],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function rl(r,t){if(r.type==="Feature")t(r,0);else if(r.type==="FeatureCollection")for(var e=0;e<r.features.length&&t(r.features[e],e)!==!1;e++);}function nl(r,t){var e,n,i,s,o,a,u,h,l,c,f=0,p=r.type==="FeatureCollection",v=r.type==="Feature",w=p?r.features.length:1;for(e=0;e<w;e++){for(a=p?r.features[e].geometry:v?r.geometry:r,h=p?r.features[e].properties:v?r.properties:{},l=p?r.features[e].bbox:v?r.bbox:void 0,c=p?r.features[e].id:v?r.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,f,h,l,c)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,f,h,l,c)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(t(s.geometries[n],f,h,l,c)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function HS(r,t,e){var n=e;return nl(r,function(i,s,o,a,u){n=t(n,i,s,o,a,u)}),n}function Xc(r,t){nl(r,function(e,n,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(Kn(e,i,{bbox:s,id:o}),n,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var h=0;h<e.coordinates.length;h++){var l=e.coordinates[h],c={type:u,coordinates:l};if(t(Kn(c,i),n,h)===!1)return!1}})}function BS(r,t){Xc(r,function(e,n,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,h=0,l=0;if(ha(e,function(c,f,p,v,w){if(a===void 0||n>u||v>h||w>l){a=c,u=n,h=v,l=w,s=0;return}var E=$n([a,c],e.properties);if(t(E,n,i,w,s)===!1)return!1;s++,a=c})===!1)return!1}}})}function Zn(r){var t=[1/0,1/0,-1/0,-1/0];return ha(r,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}Zn.default=Zn;function xr(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function lo(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Bp(r,t,e){if(!r)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!r.geometry||r.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+r.geometry.type)}function en(r){return r.type==="Feature"?r.geometry:r}function YS(r,t){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}var il={exports:{}},sl={exports:{}},JS=sl.exports,Yp;function Jp(){return Yp||(Yp=1,function(r,t){(function(e,n){r.exports=n()})(JS,function(){function e(y,_,m,S,C){(function P(b,x,A,N,T){for(;N>A;){if(N-A>600){var R=N-A+1,V=x-A+1,$=Math.log(R),J=.5*Math.exp(2*$/3),st=.5*Math.sqrt($*J*(R-J)/R)*(V-R/2<0?-1:1),G=Math.max(A,Math.floor(x-V*J/R+st)),W=Math.min(N,Math.floor(x+(R-V)*J/R+st));P(b,x,G,W,T)}var k=b[x],U=A,O=N;for(n(b,A,x),T(b[N],k)>0&&n(b,A,N);U<O;){for(n(b,U,O),U++,O--;T(b[U],k)<0;)U++;for(;T(b[O],k)>0;)O--}T(b[A],k)===0?n(b,A,O):n(b,++O,N),O<=x&&(A=O+1),x<=O&&(N=O-1)}})(y,_,m||0,S||y.length-1,C||i)}function n(y,_,m){var S=y[_];y[_]=y[m],y[m]=S}function i(y,_){return y<_?-1:y>_?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(y,_,m){if(!m)return _.indexOf(y);for(var S=0;S<_.length;S++)if(m(y,_[S]))return S;return-1}function a(y,_){u(y,0,y.children.length,_,y)}function u(y,_,m,S,C){C||(C=E(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var P=_;P<m;P++){var b=y.children[P];h(C,y.leaf?S(b):b)}return C}function h(y,_){return y.minX=Math.min(y.minX,_.minX),y.minY=Math.min(y.minY,_.minY),y.maxX=Math.max(y.maxX,_.maxX),y.maxY=Math.max(y.maxY,_.maxY),y}function l(y,_){return y.minX-_.minX}function c(y,_){return y.minY-_.minY}function f(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function p(y){return y.maxX-y.minX+(y.maxY-y.minY)}function v(y,_){return y.minX<=_.minX&&y.minY<=_.minY&&_.maxX<=y.maxX&&_.maxY<=y.maxY}function w(y,_){return _.minX<=y.maxX&&_.minY<=y.maxY&&_.maxX>=y.minX&&_.maxY>=y.minY}function E(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function I(y,_,m,S,C){for(var P=[_,m];P.length;)if(!((m=P.pop())-(_=P.pop())<=S)){var b=_+Math.ceil((m-_)/S/2)*S;e(y,b,_,m,C),P.push(_,b,b,m)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var _=this.data,m=[];if(!w(y,_))return m;for(var S=this.toBBox,C=[];_;){for(var P=0;P<_.children.length;P++){var b=_.children[P],x=_.leaf?S(b):b;w(y,x)&&(_.leaf?m.push(b):v(y,x)?this._all(b,m):C.push(b))}_=C.pop()}return m},s.prototype.collides=function(y){var _=this.data;if(!w(y,_))return!1;for(var m=[];_;){for(var S=0;S<_.children.length;S++){var C=_.children[S],P=_.leaf?this.toBBox(C):C;if(w(y,P)){if(_.leaf||v(y,P))return!0;m.push(C)}}_=m.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var _=0;_<y.length;_++)this.insert(y[_]);return this}var m=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===m.height)this._splitRoot(this.data,m);else{if(this.data.height<m.height){var S=this.data;this.data=m,m=S}this._insert(m,this.data.height-m.height-1,!0)}else this.data=m;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=E([]),this},s.prototype.remove=function(y,_){if(!y)return this;for(var m,S,C,P=this.data,b=this.toBBox(y),x=[],A=[];P||x.length;){if(P||(P=x.pop(),S=x[x.length-1],m=A.pop(),C=!0),P.leaf){var N=o(y,P.children,_);if(N!==-1)return P.children.splice(N,1),x.push(P),this._condense(x),this}C||P.leaf||!v(P,b)?S?(m++,P=S.children[m],C=!1):P=null:(x.push(P),A.push(m),m=0,S=P,P=P.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,_){return y.minX-_.minX},s.prototype.compareMinY=function(y,_){return y.minY-_.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,_){for(var m=[];y;)y.leaf?_.push.apply(_,y.children):m.push.apply(m,y.children),y=m.pop();return _},s.prototype._build=function(y,_,m,S){var C,P=m-_+1,b=this._maxEntries;if(P<=b)return a(C=E(y.slice(_,m+1)),this.toBBox),C;S||(S=Math.ceil(Math.log(P)/Math.log(b)),b=Math.ceil(P/Math.pow(b,S-1))),(C=E([])).leaf=!1,C.height=S;var x=Math.ceil(P/b),A=x*Math.ceil(Math.sqrt(b));I(y,_,m,A,this.compareMinX);for(var N=_;N<=m;N+=A){var T=Math.min(N+A-1,m);I(y,N,T,x,this.compareMinY);for(var R=N;R<=T;R+=x){var V=Math.min(R+x-1,T);C.children.push(this._build(y,R,V,S-1))}}return a(C,this.toBBox),C},s.prototype._chooseSubtree=function(y,_,m,S){for(;S.push(_),!_.leaf&&S.length-1!==m;){for(var C=1/0,P=1/0,b=void 0,x=0;x<_.children.length;x++){var A=_.children[x],N=f(A),T=(R=y,V=A,(Math.max(V.maxX,R.maxX)-Math.min(V.minX,R.minX))*(Math.max(V.maxY,R.maxY)-Math.min(V.minY,R.minY))-N);T<P?(P=T,C=N<C?N:C,b=A):T===P&&N<C&&(C=N,b=A)}_=b||_.children[0]}var R,V;return _},s.prototype._insert=function(y,_,m){var S=m?y:this.toBBox(y),C=[],P=this._chooseSubtree(S,this.data,_,C);for(P.children.push(y),h(P,S);_>=0&&C[_].children.length>this._maxEntries;)this._split(C,_),_--;this._adjustParentBBoxes(S,C,_)},s.prototype._split=function(y,_){var m=y[_],S=m.children.length,C=this._minEntries;this._chooseSplitAxis(m,C,S);var P=this._chooseSplitIndex(m,C,S),b=E(m.children.splice(P,m.children.length-P));b.height=m.height,b.leaf=m.leaf,a(m,this.toBBox),a(b,this.toBBox),_?y[_-1].children.push(b):this._splitRoot(m,b)},s.prototype._splitRoot=function(y,_){this.data=E([y,_]),this.data.height=y.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,_,m){for(var S,C,P,b,x,A,N,T=1/0,R=1/0,V=_;V<=m-_;V++){var $=u(y,0,V,this.toBBox),J=u(y,V,m,this.toBBox),st=(C=$,P=J,b=void 0,x=void 0,A=void 0,N=void 0,b=Math.max(C.minX,P.minX),x=Math.max(C.minY,P.minY),A=Math.min(C.maxX,P.maxX),N=Math.min(C.maxY,P.maxY),Math.max(0,A-b)*Math.max(0,N-x)),G=f($)+f(J);st<T?(T=st,S=V,R=G<R?G:R):st===T&&G<R&&(R=G,S=V)}return S||m-_},s.prototype._chooseSplitAxis=function(y,_,m){var S=y.leaf?this.compareMinX:l,C=y.leaf?this.compareMinY:c;this._allDistMargin(y,_,m,S)<this._allDistMargin(y,_,m,C)&&y.children.sort(S)},s.prototype._allDistMargin=function(y,_,m,S){y.children.sort(S);for(var C=this.toBBox,P=u(y,0,_,C),b=u(y,m-_,m,C),x=p(P)+p(b),A=_;A<m-_;A++){var N=y.children[A];h(P,y.leaf?C(N):N),x+=p(P)}for(var T=m-_-1;T>=_;T--){var R=y.children[T];h(b,y.leaf?C(R):R),x+=p(b)}return x},s.prototype._adjustParentBBoxes=function(y,_,m){for(var S=m;S>=0;S--)h(_[S],y)},s.prototype._condense=function(y){for(var _=y.length-1,m=void 0;_>=0;_--)y[_].children.length===0?_>0?(m=y[_-1].children).splice(m.indexOf(y[_]),1):this.clear():a(y[_],this.toBBox)},s})}(sl)),sl.exports}class jS{constructor(t=[],e=QS){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(n(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1,a=e[o];const u=o+1;if(u<this.length&&n(e[u],a)<0&&(o=u,a=e[u]),n(a,s)>=0)break;e[t]=a,t=o}e[t]=s}}function QS(r,t){return r<t?-1:r>t?1:0}const KS=WE(Object.freeze(Object.defineProperty({__proto__:null,default:jS},Symbol.toStringTag,{value:"Module"})));var Wu={exports:{}},Hc,jp;function $S(){return jp||(jp=1,Hc=function(t,e,n,i){var s=t[0],o=t[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var u=(i-n)/2,h=0,l=u-1;h<u;l=h++){var c=e[n+h*2+0],f=e[n+h*2+1],p=e[n+l*2+0],v=e[n+l*2+1],w=f>o!=v>o&&s<(p-c)*(o-f)/(v-f)+c;w&&(a=!a)}return a}),Hc}var Bc,Qp;function ZS(){return Qp||(Qp=1,Bc=function(t,e,n,i){var s=t[0],o=t[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var u=i-n,h=0,l=u-1;h<u;l=h++){var c=e[h+n][0],f=e[h+n][1],p=e[l+n][0],v=e[l+n][1],w=f>o!=v>o&&s<(p-c)*(o-f)/(v-f)+c;w&&(a=!a)}return a}),Bc}var Kp;function tC(){if(Kp)return Wu.exports;Kp=1;var r=$S(),t=ZS();return Wu.exports=function(n,i,s,o){return i.length>0&&Array.isArray(i[0])?t(n,i,s,o):r(n,i,s,o)},Wu.exports.nested=t,Wu.exports.flat=r,Wu.exports}var Xu={exports:{}},eC=Xu.exports,$p;function rC(){return $p||($p=1,function(r,t){(function(e,n){n(t)})(eC,function(e){const i=33306690738754706e-32;function s(w,E,I,y,_){let m,S,C,P,b=E[0],x=y[0],A=0,N=0;x>b==x>-b?(m=b,b=E[++A]):(m=x,x=y[++N]);let T=0;if(A<w&&N<I)for(x>b==x>-b?(C=m-((S=b+m)-b),b=E[++A]):(C=m-((S=x+m)-x),x=y[++N]),m=S,C!==0&&(_[T++]=C);A<w&&N<I;)x>b==x>-b?(C=m-((S=m+b)-(P=S-m))+(b-P),b=E[++A]):(C=m-((S=m+x)-(P=S-m))+(x-P),x=y[++N]),m=S,C!==0&&(_[T++]=C);for(;A<w;)C=m-((S=m+b)-(P=S-m))+(b-P),b=E[++A],m=S,C!==0&&(_[T++]=C);for(;N<I;)C=m-((S=m+x)-(P=S-m))+(x-P),x=y[++N],m=S,C!==0&&(_[T++]=C);return m===0&&T!==0||(_[T++]=m),T}function o(w){return new Float64Array(w)}const a=33306690738754716e-32,u=22204460492503146e-32,h=11093356479670487e-47,l=o(4),c=o(8),f=o(12),p=o(16),v=o(4);e.orient2d=function(w,E,I,y,_,m){const S=(E-m)*(I-_),C=(w-_)*(y-m),P=S-C;if(S===0||C===0||S>0!=C>0)return P;const b=Math.abs(S+C);return Math.abs(P)>=a*b?P:-function(x,A,N,T,R,V,$){let J,st,G,W,k,U,O,q,H,et,ht,rt,_t,nt,Ct,It,Q,wt;const bt=x-R,Lt=N-R,Xt=A-V,Ht=T-V;k=(Ct=(q=bt-(O=(U=134217729*bt)-(U-bt)))*(et=Ht-(H=(U=134217729*Ht)-(U-Ht)))-((nt=bt*Ht)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=Xt-(O=(U=134217729*Xt)-(U-Xt)))*(et=Lt-(H=(U=134217729*Lt)-(U-Lt)))-((It=Xt*Lt)-O*H-q*H-O*et))),l[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),l[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,l[2]=rt-(wt-k)+(ht-k),l[3]=wt;let Qt=function(kt,me){let Ae=me[0];for(let Bn=1;Bn<kt;Bn++)Ae+=me[Bn];return Ae}(4,l),fe=u*$;if(Qt>=fe||-Qt>=fe||(J=x-(bt+(k=x-bt))+(k-R),G=N-(Lt+(k=N-Lt))+(k-R),st=A-(Xt+(k=A-Xt))+(k-V),W=T-(Ht+(k=T-Ht))+(k-V),J===0&&st===0&&G===0&&W===0)||(fe=h*$+i*Math.abs(Qt),(Qt+=bt*W+Ht*J-(Xt*G+Lt*st))>=fe||-Qt>=fe))return Qt;k=(Ct=(q=J-(O=(U=134217729*J)-(U-J)))*(et=Ht-(H=(U=134217729*Ht)-(U-Ht)))-((nt=J*Ht)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=st-(O=(U=134217729*st)-(U-st)))*(et=Lt-(H=(U=134217729*Lt)-(U-Lt)))-((It=st*Lt)-O*H-q*H-O*et))),v[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),v[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,v[2]=rt-(wt-k)+(ht-k),v[3]=wt;const Ue=s(4,l,4,v,c);k=(Ct=(q=bt-(O=(U=134217729*bt)-(U-bt)))*(et=W-(H=(U=134217729*W)-(U-W)))-((nt=bt*W)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=Xt-(O=(U=134217729*Xt)-(U-Xt)))*(et=G-(H=(U=134217729*G)-(U-G)))-((It=Xt*G)-O*H-q*H-O*et))),v[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),v[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,v[2]=rt-(wt-k)+(ht-k),v[3]=wt;const Bt=s(Ue,c,4,v,f);k=(Ct=(q=J-(O=(U=134217729*J)-(U-J)))*(et=W-(H=(U=134217729*W)-(U-W)))-((nt=J*W)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=st-(O=(U=134217729*st)-(U-st)))*(et=G-(H=(U=134217729*G)-(U-G)))-((It=st*G)-O*H-q*H-O*et))),v[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),v[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,v[2]=rt-(wt-k)+(ht-k),v[3]=wt;const Ft=s(Bt,f,4,v,p);return p[Ft-1]}(w,E,I,y,_,m,b)},e.orient2dfast=function(w,E,I,y,_,m){return(E-m)*(I-_)-(w-_)*(y-m)},Object.defineProperty(e,"__esModule",{value:!0})})}(Xu,Xu.exports)),Xu.exports}var Zp;function nC(){if(Zp)return il.exports;Zp=1;var r=Jp(),t=KS,e=tC(),n=rC().orient2d;t.default&&(t=t.default),il.exports=i,il.exports.default=i;function i(m,S,C){S=Math.max(0,S===void 0?2:S),C=C||0;var P=p(m),b=new r(16);b.toBBox=function(O){return{minX:O[0],minY:O[1],maxX:O[0],maxY:O[1]}},b.compareMinX=function(O,q){return O[0]-q[0]},b.compareMinY=function(O,q){return O[1]-q[1]},b.load(m);for(var x=[],A=0,N;A<P.length;A++){var T=P[A];b.remove(T),N=v(T,N),x.push(N)}var R=new r(16);for(A=0;A<x.length;A++)R.insert(f(x[A]));for(var V=S*S,$=C*C;x.length;){var J=x.shift(),st=J.p,G=J.next.p,W=w(st,G);if(!(W<$)){var k=W/V;T=s(b,J.prev.p,st,G,J.next.next.p,k,R),T&&Math.min(w(T,st),w(T,G))<=k&&(x.push(J),x.push(v(T,J)),b.remove(T),R.remove(J),R.insert(f(J)),R.insert(f(J.next)))}}J=N;var U=[];do U.push(J.p),J=J.next;while(J!==N);return U.push(J.p),U}function s(m,S,C,P,b,x,A){for(var N=new t([],o),T=m.data;T;){for(var R=0;R<T.children.length;R++){var V=T.children[R],$=T.leaf?E(V,C,P):a(C,P,V);$>x||N.push({node:V,dist:$})}for(;N.length&&!N.peek().node.children;){var J=N.pop(),st=J.node,G=E(st,S,C),W=E(st,P,b);if(J.dist<G&&J.dist<W&&h(C,st,A)&&h(P,st,A))return st}T=N.pop(),T&&(T=T.node)}return null}function o(m,S){return m.dist-S.dist}function a(m,S,C){if(u(m,C)||u(S,C))return 0;var P=I(m[0],m[1],S[0],S[1],C.minX,C.minY,C.maxX,C.minY);if(P===0)return 0;var b=I(m[0],m[1],S[0],S[1],C.minX,C.minY,C.minX,C.maxY);if(b===0)return 0;var x=I(m[0],m[1],S[0],S[1],C.maxX,C.minY,C.maxX,C.maxY);if(x===0)return 0;var A=I(m[0],m[1],S[0],S[1],C.minX,C.maxY,C.maxX,C.maxY);return A===0?0:Math.min(P,b,x,A)}function u(m,S){return m[0]>=S.minX&&m[0]<=S.maxX&&m[1]>=S.minY&&m[1]<=S.maxY}function h(m,S,C){for(var P=Math.min(m[0],S[0]),b=Math.min(m[1],S[1]),x=Math.max(m[0],S[0]),A=Math.max(m[1],S[1]),N=C.search({minX:P,minY:b,maxX:x,maxY:A}),T=0;T<N.length;T++)if(c(N[T].p,N[T].next.p,m,S))return!1;return!0}function l(m,S,C){return n(m[0],m[1],S[0],S[1],C[0],C[1])}function c(m,S,C,P){return m!==P&&S!==C&&l(m,S,C)>0!=l(m,S,P)>0&&l(C,P,m)>0!=l(C,P,S)>0}function f(m){var S=m.p,C=m.next.p;return m.minX=Math.min(S[0],C[0]),m.minY=Math.min(S[1],C[1]),m.maxX=Math.max(S[0],C[0]),m.maxY=Math.max(S[1],C[1]),m}function p(m){for(var S=m[0],C=m[0],P=m[0],b=m[0],x=0;x<m.length;x++){var A=m[x];A[0]<S[0]&&(S=A),A[0]>P[0]&&(P=A),A[1]<C[1]&&(C=A),A[1]>b[1]&&(b=A)}var N=[S,C,P,b],T=N.slice();for(x=0;x<m.length;x++)e(m[x],N)||T.push(m[x]);return _(T)}function v(m,S){var C={p:m,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return S?(C.next=S.next,C.prev=S,S.next.prev=C,S.next=C):(C.prev=C,C.next=C),C}function w(m,S){var C=m[0]-S[0],P=m[1]-S[1];return C*C+P*P}function E(m,S,C){var P=S[0],b=S[1],x=C[0]-P,A=C[1]-b;if(x!==0||A!==0){var N=((m[0]-P)*x+(m[1]-b)*A)/(x*x+A*A);N>1?(P=C[0],b=C[1]):N>0&&(P+=x*N,b+=A*N)}return x=m[0]-P,A=m[1]-b,x*x+A*A}function I(m,S,C,P,b,x,A,N){var T=C-m,R=P-S,V=A-b,$=N-x,J=m-b,st=S-x,G=T*T+R*R,W=T*V+R*$,k=V*V+$*$,U=T*J+R*st,O=V*J+$*st,q=G*k-W*W,H,et,ht,rt,_t=q,nt=q;q===0?(et=0,_t=1,rt=O,nt=k):(et=W*O-k*U,rt=G*O-W*U,et<0?(et=0,rt=O,nt=k):et>_t&&(et=_t,rt=O+W,nt=k)),rt<0?(rt=0,-U<0?et=0:-U>G?et=_t:(et=-U,_t=G)):rt>nt&&(rt=nt,-U+W<0?et=0:-U+W>G?et=_t:(et=-U+W,_t=G)),H=et===0?0:et/_t,ht=rt===0?0:rt/nt;var Ct=(1-H)*m+H*C,It=(1-H)*S+H*P,Q=(1-ht)*b+ht*A,wt=(1-ht)*x+ht*N,bt=Q-Ct,Lt=wt-It;return bt*bt+Lt*Lt}function y(m,S){return m[0]===S[0]?m[1]-S[1]:m[0]-S[0]}function _(m){m.sort(y);for(var S=[],C=0;C<m.length;C++){for(;S.length>=2&&l(S[S.length-2],S[S.length-1],m[C])<=0;)S.pop();S.push(m[C])}for(var P=[],b=m.length-1;b>=0;b--){for(;P.length>=2&&l(P[P.length-2],P[P.length-1],m[b])<=0;)P.pop();P.push(m[b])}return P.pop(),S.pop(),S.concat(P)}return il.exports}var iC=nC();const sC=Fp(iC);function oC(r,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(ha(r,function(i){e.push([i[0],i[1]])}),!e.length)return null;var n=sC(e,t.concavity);return n.length>3?dr([n]):null}function yn(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=xr(r),i=en(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&aC(n,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,h=0;h<a.length&&!u;h++)if(t0(n,a[h][0],e.ignoreBoundary)){for(var l=!1,c=1;c<a[h].length&&!l;)t0(n,a[h][c],!e.ignoreBoundary)&&(l=!0),c++;l||(u=!0)}return u}function t0(r,t,e){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],h=t[s][1],l=r[1]*(o-u)+a*(u-r[0])+h*(r[0]-o)===0&&(o-r[0])*(u-r[0])<=0&&(a-r[1])*(h-r[1])<=0;if(l)return!e;var c=a>r[1]!=h>r[1]&&r[0]<(u-o)*(r[1]-a)/(h-a)+o;c&&(n=!n)}return n}function aC(r,t){return t[0]<=r[0]&&t[1]<=r[1]&&t[2]>=r[0]&&t[3]>=r[1]}function $i(r,t,e){e===void 0&&(e={});var n=xr(r),i=xr(t),s=gr(i[1]-n[1]),o=gr(i[0]-n[0]),a=gr(n[1]),u=gr(i[1]),h=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return zc(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),e.units)}function la(r,t,e,n){n===void 0&&(n={});var i=xr(r),s=gr(i[0]),o=gr(i[1]),a=gr(e),u=qc(t,n.units),h=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),l=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(h)),c=el(l),f=el(h);return ie([c,f],n.properties)}function uC(r,t,e){e===void 0&&(e={});for(var n=e.steps||64,i=e.properties?e.properties:!Array.isArray(r)&&r.type==="Feature"&&r.properties?r.properties:{},s=[],o=0;o<n;o++)s.push(la(r,t,o*-360/n,e).geometry.coordinates);return s.push(s[0]),dr([s],i)}function Hu(r,t,e){if(e===void 0&&(e={}),e.final===!0)return hC(r,t);var n=xr(r),i=xr(t),s=gr(n[0]),o=gr(i[0]),a=gr(n[1]),u=gr(i[1]),h=Math.sin(o-s)*Math.cos(u),l=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return el(Math.atan2(h,l))}function hC(r,t){var e=Hu(t,r);return e=(e+180)%360,e}function lC(r,t){var e=$i(r,t),n=Hu(r,t),i=la(r,e/2,n);return i}function cC(r,t){t===void 0&&(t={});var e=Zn(r),n=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return ie([n,i],t.properties,t)}function e0(r,t){t===void 0&&(t={});var e=0,n=0,i=0;return ha(r,function(s){e+=s[0],n+=s[1],i++},!0),ie([e/i,n/i],t.properties)}function r0(r,t){switch(t===void 0&&(t={}),YS(r)){case"Point":return ie(xr(r),t.properties);case"Polygon":var e=[];ha(r,function(m){e.push(m)});var n=e0(r,{properties:t.properties}),i=n.geometry.coordinates,s=0,o=0,a=0,u,h,l,c,f,p,v,w,E=e.map(function(m){return[m[0]-i[0],m[1]-i[1]]});for(u=0;u<e.length-1;u++)h=E[u],c=h[0],p=h[1],l=E[u+1],f=l[0],v=l[1],w=c*v-f*p,a+=w,s+=(c+f)*w,o+=(p+v)*w;if(a===0)return n;var I=a*.5,y=1/(6*I);return ie([i[0]+y*s,i[1]+y*o],t.properties);default:var _=oC(r);return _?r0(_,{properties:t.properties}):e0(r,{properties:t.properties})}}function n0(r){if(!r)throw new Error("geojson is required");var t=[];return Xc(r,function(e){fC(e,t)}),ua(t)}function fC(r,t){var e=[],n=r.geometry;if(n!==null){switch(n.type){case"Polygon":e=lo(n);break;case"LineString":e=[lo(n)]}e.forEach(function(i){var s=dC(i,r.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function dC(r,t){var e=[];return r.reduce(function(n,i){var s=$n([n,i],t);return s.bbox=gC(n,i),e.push(s),i}),e}function gC(r,t){var e=r[0],n=r[1],i=t[0],s=t[1],o=e<i?e:i,a=n<s?n:s,u=e>i?e:i,h=n>s?n:s;return[o,a,u,h]}var ol={exports:{}},Yc={},i0;function s0(){return i0||(i0=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=63710088e-1,r.factors={centimeters:r.earthRadius*100,centimetres:r.earthRadius*100,degrees:r.earthRadius/111325,feet:r.earthRadius*3.28084,inches:r.earthRadius*39.37,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:r.earthRadius*1e3,millimetres:r.earthRadius*1e3,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius*1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/r.earthRadius,yards:1.0936133},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(N,T,R){R===void 0&&(R={});var V={type:"Feature"};return(R.id===0||R.id)&&(V.id=R.id),R.bbox&&(V.bbox=R.bbox),V.properties=T||{},V.geometry=N,V}r.feature=t;function e(N,T,R){switch(N){case"Point":return n(T).geometry;case"LineString":return a(T).geometry;case"Polygon":return s(T).geometry;case"MultiPoint":return c(T).geometry;case"MultiLineString":return l(T).geometry;case"MultiPolygon":return f(T).geometry;default:throw new Error(N+" is invalid")}}r.geometry=e;function n(N,T,R){if(R===void 0&&(R={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!P(N[0])||!P(N[1]))throw new Error("coordinates must contain numbers");var V={type:"Point",coordinates:N};return t(V,T,R)}r.point=n;function i(N,T,R){return R===void 0&&(R={}),h(N.map(function(V){return n(V,T)}),R)}r.points=i;function s(N,T,R){R===void 0&&(R={});for(var V=0,$=N;V<$.length;V++){var J=$[V];if(J.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var st=0;st<J[J.length-1].length;st++)if(J[J.length-1][st]!==J[0][st])throw new Error("First and last Position are not equivalent.")}var G={type:"Polygon",coordinates:N};return t(G,T,R)}r.polygon=s;function o(N,T,R){return R===void 0&&(R={}),h(N.map(function(V){return s(V,T)}),R)}r.polygons=o;function a(N,T,R){if(R===void 0&&(R={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var V={type:"LineString",coordinates:N};return t(V,T,R)}r.lineString=a;function u(N,T,R){return R===void 0&&(R={}),h(N.map(function(V){return a(V,T)}),R)}r.lineStrings=u;function h(N,T){T===void 0&&(T={});var R={type:"FeatureCollection"};return T.id&&(R.id=T.id),T.bbox&&(R.bbox=T.bbox),R.features=N,R}r.featureCollection=h;function l(N,T,R){R===void 0&&(R={});var V={type:"MultiLineString",coordinates:N};return t(V,T,R)}r.multiLineString=l;function c(N,T,R){R===void 0&&(R={});var V={type:"MultiPoint",coordinates:N};return t(V,T,R)}r.multiPoint=c;function f(N,T,R){R===void 0&&(R={});var V={type:"MultiPolygon",coordinates:N};return t(V,T,R)}r.multiPolygon=f;function p(N,T,R){R===void 0&&(R={});var V={type:"GeometryCollection",geometries:N};return t(V,T,R)}r.geometryCollection=p;function v(N,T){if(T===void 0&&(T=0),T&&!(T>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,T||0);return Math.round(N*R)/R}r.round=v;function w(N,T){T===void 0&&(T="kilometers");var R=r.factors[T];if(!R)throw new Error(T+" units is invalid");return N*R}r.radiansToLength=w;function E(N,T){T===void 0&&(T="kilometers");var R=r.factors[T];if(!R)throw new Error(T+" units is invalid");return N/R}r.lengthToRadians=E;function I(N,T){return _(E(N,T))}r.lengthToDegrees=I;function y(N){var T=N%360;return T<0&&(T+=360),T}r.bearingToAzimuth=y;function _(N){var T=N%(2*Math.PI);return T*180/Math.PI}r.radiansToDegrees=_;function m(N){var T=N%360;return T*Math.PI/180}r.degreesToRadians=m;function S(N,T,R){if(T===void 0&&(T="kilometers"),R===void 0&&(R="kilometers"),!(N>=0))throw new Error("length must be a positive number");return w(E(N,T),R)}r.convertLength=S;function C(N,T,R){if(T===void 0&&(T="meters"),R===void 0&&(R="kilometers"),!(N>=0))throw new Error("area must be a positive number");var V=r.areaFactors[T];if(!V)throw new Error("invalid original units");var $=r.areaFactors[R];if(!$)throw new Error("invalid final units");return N/V*$}r.convertArea=C;function P(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}r.isNumber=P;function b(N){return!!N&&N.constructor===Object}r.isObject=b;function x(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(T){if(!P(T))throw new Error("bbox must only contain numbers")})}r.validateBBox=x;function A(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}r.validateId=A}(Yc)),Yc}var Oe={},o0;function a0(){if(o0)return Oe;o0=1,Object.defineProperty(Oe,"__esModule",{value:!0});var r=s0();function t(y,_,m){if(y!==null)for(var S,C,P,b,x,A,N,T=0,R=0,V,$=y.type,J=$==="FeatureCollection",st=$==="Feature",G=J?y.features.length:1,W=0;W<G;W++){N=J?y.features[W].geometry:st?y.geometry:y,V=N?N.type==="GeometryCollection":!1,x=V?N.geometries.length:1;for(var k=0;k<x;k++){var U=0,O=0;if(b=V?N.geometries[k]:N,b!==null){A=b.coordinates;var q=b.type;switch(T=m&&(q==="Polygon"||q==="MultiPolygon")?1:0,q){case null:break;case"Point":if(_(A,R,W,U,O)===!1)return!1;R++,U++;break;case"LineString":case"MultiPoint":for(S=0;S<A.length;S++){if(_(A[S],R,W,U,O)===!1)return!1;R++,q==="MultiPoint"&&U++}q==="LineString"&&U++;break;case"Polygon":case"MultiLineString":for(S=0;S<A.length;S++){for(C=0;C<A[S].length-T;C++){if(_(A[S][C],R,W,U,O)===!1)return!1;R++}q==="MultiLineString"&&U++,q==="Polygon"&&O++}q==="Polygon"&&U++;break;case"MultiPolygon":for(S=0;S<A.length;S++){for(O=0,C=0;C<A[S].length;C++){for(P=0;P<A[S][C].length-T;P++){if(_(A[S][C][P],R,W,U,O)===!1)return!1;R++}O++}U++}break;case"GeometryCollection":for(S=0;S<b.geometries.length;S++)if(t(b.geometries[S],_,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(y,_,m,S){var C=m;return t(y,function(P,b,x,A,N){b===0&&m===void 0?C=P:C=_(C,P,b,x,A,N)},S),C}function n(y,_){var m;switch(y.type){case"FeatureCollection":for(m=0;m<y.features.length&&_(y.features[m].properties,m)!==!1;m++);break;case"Feature":_(y.properties,0);break}}function i(y,_,m){var S=m;return n(y,function(C,P){P===0&&m===void 0?S=C:S=_(S,C,P)}),S}function s(y,_){if(y.type==="Feature")_(y,0);else if(y.type==="FeatureCollection")for(var m=0;m<y.features.length&&_(y.features[m],m)!==!1;m++);}function o(y,_,m){var S=m;return s(y,function(C,P){P===0&&m===void 0?S=C:S=_(S,C,P)}),S}function a(y){var _=[];return t(y,function(m){_.push(m)}),_}function u(y,_){var m,S,C,P,b,x,A,N,T,R,V=0,$=y.type==="FeatureCollection",J=y.type==="Feature",st=$?y.features.length:1;for(m=0;m<st;m++){for(x=$?y.features[m].geometry:J?y.geometry:y,N=$?y.features[m].properties:J?y.properties:{},T=$?y.features[m].bbox:J?y.bbox:void 0,R=$?y.features[m].id:J?y.id:void 0,A=x?x.type==="GeometryCollection":!1,b=A?x.geometries.length:1,C=0;C<b;C++){if(P=A?x.geometries[C]:x,P===null){if(_(null,V,N,T,R)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(P,V,N,T,R)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<P.geometries.length;S++)if(_(P.geometries[S],V,N,T,R)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}V++}}function h(y,_,m){var S=m;return u(y,function(C,P,b,x,A){P===0&&m===void 0?S=C:S=_(S,C,P,b,x,A)}),S}function l(y,_){u(y,function(m,S,C,P,b){var x=m===null?null:m.type;switch(x){case null:case"Point":case"LineString":case"Polygon":return _(r.feature(m,C,{bbox:P,id:b}),S,0)===!1?!1:void 0}var A;switch(x){case"MultiPoint":A="Point";break;case"MultiLineString":A="LineString";break;case"MultiPolygon":A="Polygon";break}for(var N=0;N<m.coordinates.length;N++){var T=m.coordinates[N],R={type:A,coordinates:T};if(_(r.feature(R,C),S,N)===!1)return!1}})}function c(y,_,m){var S=m;return l(y,function(C,P,b){P===0&&b===0&&m===void 0?S=C:S=_(S,C,P,b)}),S}function f(y,_){l(y,function(m,S,C){var P=0;if(m.geometry){var b=m.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var x,A=0,N=0,T=0;if(t(m,function(R,V,$,J,st){if(x===void 0||S>A||J>N||st>T){x=R,A=S,N=J,T=st,P=0;return}var G=r.lineString([x,R],m.properties);if(_(G,S,C,st,P)===!1)return!1;P++,x=R})===!1)return!1}}})}function p(y,_,m){var S=m,C=!1;return f(y,function(P,b,x,A,N){C===!1&&m===void 0?S=P:S=_(S,P,b,x,A,N),C=!0}),S}function v(y,_){if(!y)throw new Error("geojson is required");l(y,function(m,S,C){if(m.geometry!==null){var P=m.geometry.type,b=m.geometry.coordinates;switch(P){case"LineString":if(_(m,S,C,0,0)===!1)return!1;break;case"Polygon":for(var x=0;x<b.length;x++)if(_(r.lineString(b[x],m.properties),S,C,x)===!1)return!1;break}}})}function w(y,_,m){var S=m;return v(y,function(C,P,b,x){P===0&&m===void 0?S=C:S=_(S,C,P,b,x)}),S}function E(y,_){if(_=_||{},!r.isObject(_))throw new Error("options is invalid");var m=_.featureIndex||0,S=_.multiFeatureIndex||0,C=_.geometryIndex||0,P=_.segmentIndex||0,b=_.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":case"MultiPoint":return null;case"LineString":return P<0&&(P=A.length+P-1),r.lineString([A[P],A[P+1]],b,_);case"Polygon":return C<0&&(C=A.length+C),P<0&&(P=A[C].length+P-1),r.lineString([A[C][P],A[C][P+1]],b,_);case"MultiLineString":return S<0&&(S=A.length+S),P<0&&(P=A[S].length+P-1),r.lineString([A[S][P],A[S][P+1]],b,_);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),P<0&&(P=A[S][C].length-P-1),r.lineString([A[S][C][P],A[S][C][P+1]],b,_)}throw new Error("geojson is invalid")}function I(y,_){if(_=_||{},!r.isObject(_))throw new Error("options is invalid");var m=_.featureIndex||0,S=_.multiFeatureIndex||0,C=_.geometryIndex||0,P=_.coordIndex||0,b=_.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":return r.point(A,b,_);case"MultiPoint":return S<0&&(S=A.length+S),r.point(A[S],b,_);case"LineString":return P<0&&(P=A.length+P),r.point(A[P],b,_);case"Polygon":return C<0&&(C=A.length+C),P<0&&(P=A[C].length+P),r.point(A[C][P],b,_);case"MultiLineString":return S<0&&(S=A.length+S),P<0&&(P=A[S].length+P),r.point(A[S][P],b,_);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),P<0&&(P=A[S][C].length-P),r.point(A[S][C][P],b,_)}throw new Error("geojson is invalid")}return Oe.coordAll=a,Oe.coordEach=t,Oe.coordReduce=e,Oe.featureEach=s,Oe.featureReduce=o,Oe.findPoint=I,Oe.findSegment=E,Oe.flattenEach=l,Oe.flattenReduce=c,Oe.geomEach=u,Oe.geomReduce=h,Oe.lineEach=v,Oe.lineReduce=w,Oe.propEach=n,Oe.propReduce=i,Oe.segmentEach=f,Oe.segmentReduce=p,Oe}var al={},u0;function pC(){if(u0)return al;u0=1,Object.defineProperty(al,"__esModule",{value:!0});var r=a0();function t(e){var n=[1/0,1/0,-1/0,-1/0];return r.coordEach(e,function(i){n[0]>i[0]&&(n[0]=i[0]),n[1]>i[1]&&(n[1]=i[1]),n[2]<i[0]&&(n[2]=i[0]),n[3]<i[1]&&(n[3]=i[1])}),n}return t.default=t,al.default=t,al}var h0;function vC(){if(h0)return ol.exports;h0=1;var r=Jp(),t=s0(),e=a0(),n=pC().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new r(a);return u.insert=function(h){if(h.type!=="Feature")throw new Error("invalid feature");return h.bbox=h.bbox?h.bbox:n(h),r.prototype.insert.call(this,h)},u.load=function(h){var l=[];return Array.isArray(h)?h.forEach(function(c){if(c.type!=="Feature")throw new Error("invalid features");c.bbox=c.bbox?c.bbox:n(c),l.push(c)}):i(h,function(c){if(c.type!=="Feature")throw new Error("invalid features");c.bbox=c.bbox?c.bbox:n(c),l.push(c)}),r.prototype.load.call(this,l)},u.remove=function(h,l){if(h.type!=="Feature")throw new Error("invalid feature");return h.bbox=h.bbox?h.bbox:n(h),r.prototype.remove.call(this,h,l)},u.clear=function(){return r.prototype.clear.call(this)},u.search=function(h){var l=r.prototype.search.call(this,this.toBBox(h));return s(l)},u.collides=function(h){return r.prototype.collides.call(this,this.toBBox(h))},u.all=function(){var h=r.prototype.all.call(this);return s(h)},u.toJSON=function(){return r.prototype.toJSON.call(this)},u.fromJSON=function(h){return r.prototype.fromJSON.call(this,h)},u.toBBox=function(h){var l;if(h.bbox)l=h.bbox;else if(Array.isArray(h)&&h.length===4)l=h;else if(Array.isArray(h)&&h.length===6)l=[h[0],h[1],h[3],h[4]];else if(h.type==="Feature")l=n(h);else if(h.type==="FeatureCollection")l=n(h);else throw new Error("invalid geojson");return{minX:l[0],minY:l[1],maxX:l[2],maxY:l[3]}},u}return ol.exports=o,ol.exports.default=o,ol.exports}var mC=vC();const yC=Fp(mC);function l0(r,t){var e={},n=[];if(r.type==="LineString"&&(r=Kn(r)),t.type==="LineString"&&(t=Kn(t)),r.type==="Feature"&&t.type==="Feature"&&r.geometry!==null&&t.geometry!==null&&r.geometry.type==="LineString"&&t.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=c0(r,t);return i&&n.push(i),ua(n)}var s=yC();return s.load(n0(t)),rl(n0(r),function(o){rl(s.search(o),function(a){var u=c0(o,a);if(u){var h=lo(u).join(",");e[h]||(e[h]=!0,n.push(u))}})}),ua(n)}function c0(r,t){var e=lo(r),n=lo(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=n[0][0],h=n[0][1],l=n[1][0],c=n[1][1],f=(c-h)*(o-i)-(l-u)*(a-s),p=(l-u)*(s-h)-(c-h)*(i-u),v=(o-i)*(s-h)-(a-s)*(i-u);if(f===0)return null;var w=p/f,E=v/f;if(w>=0&&w<=1&&E>=0&&E<=1){var I=i+w*(o-i),y=s+w*(a-s);return ie([I,y])}return null}function _C(r,t,e){e===void 0&&(e={});var n=ie([1/0,1/0],{dist:1/0}),i=0;return Xc(r,function(s){for(var o=lo(s),a=0;a<o.length-1;a++){var u=ie(o[a]);u.properties.dist=$i(t,u,e);var h=ie(o[a+1]);h.properties.dist=$i(t,h,e);var l=$i(u,h,e),c=Math.max(u.properties.dist,h.properties.dist),f=Hu(u,h),p=la(t,c,f+90,e),v=la(t,c,f-90,e),w=l0($n([p.geometry.coordinates,v.geometry.coordinates]),$n([u.geometry.coordinates,h.geometry.coordinates])),E=null;w.features.length>0&&(E=w.features[0],E.properties.dist=$i(t,E,e),E.properties.location=i+$i(u,E,e)),u.properties.dist<n.properties.dist&&(n=u,n.properties.index=a,n.properties.location=i),h.properties.dist<n.properties.dist&&(n=h,n.properties.index=a+1,n.properties.location=i+l),E&&E.properties.dist<n.properties.dist&&(n=E,n.properties.index=a),i+=l}}),n}function f0(r,t,e){e===void 0&&(e={});var n=xr(r),i=xr(t);i[0]+=i[0]-n[0]>180?-360:n[0]-i[0]>180?360:0;var s=wC(n,i),o=Wc(s,"meters",e.units);return o}function wC(r,t,e){e=e===void 0?nr:Number(e);var n=e,i=r[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-r[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),h=Math.abs(u)>1e-11?o/u:Math.cos(i),l=Math.sqrt(o*o+h*h*a*a),c=l*n;return c}function EC(r,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!r)throw new Error("pt is required");if(Array.isArray(r)?r=ie(r):r.type==="Point"?r=Kn(r):Bp(r,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=$n(t):t.type==="LineString"?t=Kn(t):Bp(t,"LineString","line");var n=1/0,i=r.geometry.coordinates;return BS(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=SC(i,o,a,e);u<n&&(n=u)}),Wc(n,"degrees",e.units)}function SC(r,t,e,n){var i=[e[0]-t[0],e[1]-t[1]],s=[r[0]-t[0],r[1]-t[1]],o=d0(s,i);if(o<=0)return Jc(r,t,{method:n.method,units:"degrees"});var a=d0(i,i);if(a<=o)return Jc(r,e,{method:n.method,units:"degrees"});var u=o/a,h=[t[0]+u*i[0],t[1]+u*i[1]];return Jc(r,h,{method:n.method,units:"degrees"})}function d0(r,t){return r[0]*t[0]+r[1]*t[1]}function Jc(r,t,e){return e.method==="planar"?f0(r,t,e):$i(r,t,e)}var g0=6378137;function CC(r){return HS(r,function(t,e){return t+PC(e)},0)}function PC(r){var t=0,e;switch(r.type){case"Polygon":return p0(r.coordinates);case"MultiPolygon":for(e=0;e<r.coordinates.length;e++)t+=p0(r.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function p0(r){var t=0;if(r&&r.length>0){t+=Math.abs(v0(r[0]));for(var e=1;e<r.length;e++)t-=Math.abs(v0(r[e]))}return t}function v0(r){var t,e,n,i,s,o,a,u=0,h=r.length;if(h>2){for(a=0;a<h;a++)a===h-2?(i=h-2,s=h-1,o=0):a===h-1?(i=h-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=r[i],e=r[s],n=r[o],u+=(jc(n[0])-jc(t[0]))*Math.sin(jc(e[1]));u=u*g0*g0/2}return u}function jc(r){return r*Math.PI/180}function IC(r,t,e){e===void 0&&(e={});for(var n=en(r),i=n.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=Hu(i[o],i[o-1])-180,h=la(i[o],a,u,e);return h}else return ie(i[o])}else s+=$i(i[o],i[o+1],e);return ie(i[i.length-1])}function Zi(r,t,e){e===void 0&&(e={});for(var n=xr(r),i=lo(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),MC(i[s],i[s+1],n,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function MC(r,t,e,n,i){var s=e[0],o=e[1],a=r[0],u=r[1],h=t[0],l=t[1],c=e[0]-a,f=e[1]-u,p=h-a,v=l-u,w=c*v-f*p;if(i!==null){if(Math.abs(w)>i)return!1}else if(w!==0)return!1;if(n){if(n==="start")return Math.abs(p)>=Math.abs(v)?p>0?a<s&&s<=h:h<=s&&s<a:v>0?u<o&&o<=l:l<=o&&o<u;if(n==="end")return Math.abs(p)>=Math.abs(v)?p>0?a<=s&&s<h:h<s&&s<=a:v>0?u<=o&&o<l:l<o&&o<=u;if(n==="both")return Math.abs(p)>=Math.abs(v)?p>0?a<s&&s<h:h<s&&s<a:v>0?u<o&&o<l:l<o&&o<u}else return Math.abs(p)>=Math.abs(v)?p>0?a<=s&&s<=h:h<=s&&s<=a:v>0?u<=o&&o<=l:l<=o&&o<=u;return!1}function bC(r,t){var e=en(r),n=en(t),i=e.type,s=n.type;switch(i){case"Point":switch(s){case"MultiPoint":return NC(e,n);case"LineString":return Zi(e,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return yn(e,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return xC(e,n);case"LineString":return TC(e,n);case"Polygon":case"MultiPolygon":return AC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return OC(e,n);case"Polygon":case"MultiPolygon":return DC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return LC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function NC(r,t){var e,n=!1;for(e=0;e<t.coordinates.length;e++)if(y0(t.coordinates[e],r.coordinates)){n=!0;break}return n}function xC(r,t){for(var e=0;e<r.coordinates.length;e++){for(var n=!1,i=0;i<t.coordinates.length;i++)y0(r.coordinates[e],t.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function TC(r,t){for(var e=!1,n=0;n<r.coordinates.length;n++){if(!Zi(r.coordinates[n],t))return!1;e||(e=Zi(r.coordinates[n],t,{ignoreEndVertices:!0}))}return e}function AC(r,t){for(var e=!0,n=!1,i=0;i<r.coordinates.length;i++){if(n=yn(r.coordinates[1],t),!n){e=!1;break}n=yn(r.coordinates[1],t,{ignoreBoundary:!0})}return e&&n}function OC(r,t){for(var e=0;e<r.coordinates.length;e++)if(!Zi(r.coordinates[e],t))return!1;return!0}function DC(r,t){var e=Zn(t),n=Zn(r);if(!m0(e,n))return!1;for(var i=!1,s=0;s<r.coordinates.length-1;s++){if(!yn(r.coordinates[s],t))return!1;if(i||(i=yn(r.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=RC(r.coordinates[s],r.coordinates[s+1]);i=yn(o,t,{ignoreBoundary:!0})}}return i}function LC(r,t){var e=Zn(r),n=Zn(t);if(!m0(n,e))return!1;for(var i=0;i<r.coordinates[0].length;i++)if(!yn(r.coordinates[0][i],t))return!1;return!0}function m0(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function y0(r,t){return r[0]===t[0]&&r[1]===t[1]}function RC(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}function FC(r,t,e){e===void 0&&(e={});var n;e.final?n=_0(xr(t),xr(r)):n=_0(xr(r),xr(t));var i=n>180?-(360-n):n;return i}function _0(r,t){var e=gr(r[1]),n=gr(t[1]),i=gr(t[0]-r[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(el(o)+360)%360}function GC(r,t,e,n){n===void 0&&(n={});var i=t<0,s=Wc(Math.abs(t),n.units,"meters");i&&(s=-Math.abs(s));var o=xr(r),a=kC(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,ie(a,n.properties)}function kC(r,t,e,n){n=n===void 0?nr:Number(n);var i=t/n,s=r[0]*Math.PI/180,o=gr(r[1]),a=gr(e),u=i*Math.cos(a),h=o+u;Math.abs(h)>Math.PI/2&&(h=h>0?Math.PI-h:-Math.PI-h);var l=Math.log(Math.tan(h/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?u/l:Math.cos(o),f=i*Math.sin(a)/c,p=s+f;return[(p*180/Math.PI+540)%360-180,h*180/Math.PI]}function VC(r,t){var e=en(r),n=en(t),i=e.type,s=n.type,o=e.coordinates,a=n.coordinates;switch(i){case"Point":switch(s){case"Point":return Qc(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return UC(e,n);case"MultiPoint":return zC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return Zi(n,e,{ignoreEndVertices:!0});case"LineString":return XC(e,n);case"MultiPoint":return qC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return yn(n,e,{ignoreBoundary:!0});case"LineString":return HC(e,n);case"Polygon":return BC(e,n);case"MultiPoint":return WC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function UC(r,t){var e,n=!1;for(e=0;e<r.coordinates.length;e++)if(Qc(r.coordinates[e],t.coordinates)){n=!0;break}return n}function zC(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){for(var i=n[e],s=!1,o=0,a=r.coordinates;o<a.length;o++){var u=a[o];if(Qc(i,u)){s=!0;break}}if(!s)return!1}return!0}function qC(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(Zi(s,r,{ignoreEndVertices:!0})&&(e=!0),!Zi(s,r))return!1}return!!e}function WC(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){var i=n[e];if(!yn(i,r,{ignoreBoundary:!0}))return!1}return!0}function XC(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(Zi({type:"Point",coordinates:s},r,{ignoreEndVertices:!0})&&(e=!0),!Zi({type:"Point",coordinates:s},r,{ignoreEndVertices:!1}))return!1}return e}function HC(r,t){var e=!1,n=0,i=Zn(r),s=Zn(t);if(!w0(i,s))return!1;for(n;n<t.coordinates.length-1;n++){var o=YC(t.coordinates[n],t.coordinates[n+1]);if(yn({type:"Point",coordinates:o},r,{ignoreBoundary:!0})){e=!0;break}}return e}function BC(r,t){if(r.type==="Feature"&&r.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=Zn(r),n=Zn(t);if(!w0(e,n))return!1;for(var i=en(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,h=a;u<h.length;u++){var l=h[u];if(!yn(l,r))return!1}return!0}function w0(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function Qc(r,t){return r[0]===t[0]&&r[1]===t[1]}function YC(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}/**
|
|
44
|
+
northing meters`+r;var f=c/2,p=0,v=0,w,E,I,y,_;return f>0&&(w=1e5/Math.pow(10,f),E=r.substring(s,s+f),p=parseFloat(E)*w,I=r.substring(s+f),v=parseFloat(I)*w),y=p+h,_=v+l,{easting:y,northing:_,zoneLetter:a,zoneNumber:o,accuracy:w}}function a1(r,t){for(var e=Ip.charCodeAt(t-1),n=1e5,i=!1;e!==r.charCodeAt(0);){if(e++,e===zr&&e++,e===mn&&e++,e>Au){if(i)throw"Bad character: "+r;e=ra,i=!0}n+=1e5}return n}function u1(r,t){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var e=Mp.charCodeAt(t-1),n=0,i=!1;e!==r.charCodeAt(0);){if(e++,e===zr&&e++,e===mn&&e++,e>Tu){if(i)throw"Bad character: "+r;e=ra,i=!0}n+=1e5}return n}function h1(r){var t;switch(r){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+r}function na(r,t,e){if(!(this instanceof na))return new na(r,t,e);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof t>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}na.fromMGRS=function(r){return new na(Np(r))},na.prototype.toMGRS=function(r){return bp([this.x,this.y],r)};var l1=1,c1=.25,Op=.046875,Dp=.01953125,Lp=.01068115234375,f1=.75,d1=.46875,g1=.013020833333333334,p1=.007120768229166667,v1=.3645833333333333,m1=.005696614583333333,y1=.3076171875;function Lc(r){var t=[];t[0]=l1-r*(c1+r*(Op+r*(Dp+r*Lp))),t[1]=r*(f1-r*(Op+r*(Dp+r*Lp)));var e=r*r;return t[2]=e*(d1-r*(g1+r*p1)),e*=r,t[3]=e*(v1-r*m1),t[4]=e*r*y1,t}function ia(r,t,e,n){return e*=t,t*=t,n[0]*r-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var _1=20;function Rc(r,t,e){for(var n=1/(1-t),i=r,s=_1;s;--s){var o=Math.sin(i),a=1-t*o*o;if(a=(ia(i,o,Math.cos(i),e)-r)*(a*Math.sqrt(a))*n,i-=a,Math.abs(a)<tt)return i}return i}function w1(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Lc(this.es),this.ml0=ia(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function E1(r){var t=r.x,e=r.y,n=it(t-this.long0),i,s,o,a=Math.sin(e),u=Math.cos(e);if(this.es){var l=u*n,c=Math.pow(l,2),f=this.ep2*Math.pow(u,2),p=Math.pow(f,2),v=Math.abs(u)>tt?Math.tan(e):0,w=Math.pow(v,2),E=Math.pow(w,2);i=1-this.es*Math.pow(a,2),l=l/Math.sqrt(i);var I=ia(e,a,u,this.en);s=this.a*(this.k0*l*(1+c/6*(1-w+f+c/20*(5-18*w+E+14*f-58*w*f+c/42*(61+179*E-E*w-479*w)))))+this.x0,o=this.a*(this.k0*(I-this.ml0+a*n*l/2*(1+c/12*(5-w+9*f+4*p+c/30*(61+E-58*w+270*f-330*w*f+c/56*(1385+543*E-E*w-3111*w))))))+this.y0}else{var h=u*Math.sin(n);if(Math.abs(Math.abs(h)-1)<tt)return 93;if(s=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,o=u*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(o),h>=1){if(h-1>tt)return 93;o=0}else o=Math.acos(o);e<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return r.x=s,r.y=o,r}function S1(r){var t,e,n,i,s=(r.x-this.x0)*(1/this.a),o=(r.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,e=Rc(t,this.es,this.en),Math.abs(e)<Y){var c=Math.sin(e),f=Math.cos(e),p=Math.abs(f)>tt?Math.tan(e):0,v=this.ep2*Math.pow(f,2),w=Math.pow(v,2),E=Math.pow(p,2),I=Math.pow(E,2);t=1-this.es*Math.pow(c,2);var y=s*Math.sqrt(t)/this.k0,_=Math.pow(y,2);t=t*p,n=e-t*_/(1-this.es)*.5*(1-_/12*(5+3*E-9*v*E+v-4*w-_/30*(61+90*E-252*v*E+45*I+46*v-_/56*(1385+3633*E+4095*I+1574*I*E)))),i=it(this.long0+y*(1-_/6*(1+2*E+v-_/20*(5+28*E+24*I+8*v*E+6*v-_/42*(61+662*E+1320*I+720*I*E))))/f)}else n=Y*Nu(o),i=0;else{var a=Math.exp(s/this.k0),u=.5*(a-1/a),h=this.lat0+o/this.k0,l=Math.cos(h);t=Math.sqrt((1-Math.pow(l,2))/(1+Math.pow(u,2))),n=Math.asin(t),o<0&&(n=-n),u===0&&l===0?i=0:i=it(Math.atan2(u,l)+this.long0)}return r.x=i,r.y=n,r}var C1=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Qh={init:w1,forward:E1,inverse:S1,names:C1};function Rp(r){var t=Math.exp(r);return t=(t-1/t)/2,t}function qr(r,t){r=Math.abs(r),t=Math.abs(t);var e=Math.max(r,t),n=Math.min(r,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function P1(r){var t=1+r,e=t-1;return e===0?r:r*Math.log(t)/e}function I1(r){var t=Math.abs(r);return t=P1(t*(1+t/(qr(1,t)+1))),r<0?-t:t}function Fc(r,t){for(var e=2*Math.cos(2*t),n=r.length-1,i=r[n],s=0,o;--n>=0;)o=-s+e*i+r[n],s=i,i=o;return t+o*Math.sin(2*t)}function M1(r,t){for(var e=2*Math.cos(t),n=r.length-1,i=r[n],s=0,o;--n>=0;)o=-s+e*i+r[n],s=i,i=o;return Math.sin(t)*o}function b1(r){var t=Math.exp(r);return t=(t+1/t)/2,t}function Fp(r,t,e){for(var n=Math.sin(t),i=Math.cos(t),s=Rp(e),o=b1(e),a=2*i*o,u=-2*n*s,h=r.length-1,l=r[h],c=0,f=0,p=0,v,w;--h>=0;)v=f,w=c,f=l,c=p,l=-v+a*f-u*c+r[h],p=-w+u*f+a*c;return a=n*o,u=i*s,[a*l-u*p,a*p+u*l]}function N1(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Qh.init.apply(this),this.forward=Qh.forward,this.inverse=Qh.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),t=r/(2-r),e=t;this.cgb[0]=t*(2+t*(-.6666666666666666+t*(-2+t*(2.577777777777778+t*(.5777777777777777+t*-4.228148148148148))))),this.cbg[0]=t*(-2+t*(.6666666666666666+t*(1.3333333333333333+t*(-1.8222222222222222+t*(.7111111111111111+t*.9824338624338624))))),e=e*t,this.cgb[1]=e*(2.3333333333333335+t*(-1.6+t*(-5.044444444444444+t*(8.584126984126984+t*2.458201058201058)))),this.cbg[1]=e*(1.6666666666666667+t*(-1.0666666666666667+t*(-1.4444444444444444+t*(2.86984126984127+t*-1.6105820105820106)))),e=e*t,this.cgb[2]=e*(3.7333333333333334+t*(-3.8857142857142857+t*(-12.019047619047619+t*26.03668430335097))),this.cbg[2]=e*(-1.7333333333333334+t*(1.619047619047619+t*(1.6+t*-4.474779541446208))),e=e*t,this.cgb[3]=e*(6.792063492063492+t*(-9.485714285714286+t*-28.188500881834216)),this.cbg[3]=e*(1.9634920634920634+t*(-2.4+t*-1.7518165784832451)),e=e*t,this.cgb[4]=e*(13.250793650793652+t*-23.22238255571589),this.cbg[4]=e*(-2.3301587301587303+t*3.5144460477793813),e=e*t,this.cgb[5]=e*27.011268237934903,this.cbg[5]=e*2.8496841430174764,e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(.25+e*(.015625+e/256))),this.utg[0]=t*(-.5+t*(.6666666666666666+t*(-.3854166666666667+t*(.002777777777777778+t*(.158203125+t*-.15905919312169312))))),this.gtu[0]=t*(.5+t*(-.6666666666666666+t*(.3125+t*(.22777777777777777+t*(-.4409722222222222+t*.20875661375661375))))),this.utg[1]=e*(-.020833333333333332+t*(-.06666666666666667+t*(.3034722222222222+t*(-.4380952380952381+t*.2890188388723545)))),this.gtu[1]=e*(.2708333333333333+t*(-.6+t*(.38680555555555557+t*(.44603174603174606+t*-1.0248393063822752)))),e=e*t,this.utg[2]=e*(-.035416666666666666+t*(.04404761904761905+t*(.046651785714285715+t*-.06138668430335097))),this.gtu[2]=e*(.25416666666666665+t*(-.7357142857142858+t*(.5603050595238095+t*.9237378747795415))),e=e*t,this.utg[3]=e*(-.02726314484126984+t*(.021825396825396824+t*.11439745921516754)),this.gtu[3]=e*(.30729786706349205+t*(-1.0654761904761905+t*.9096203979276896)),e=e*t,this.utg[4]=e*(-.02841641865079365+t*.027268468414301746),this.gtu[4]=e*(.4306671626984127+t*-1.713007555715889),e=e*t,this.utg[5]=e*-.03233083094085698,this.gtu[5]=e*.6650675310896665;var n=Fc(this.cbg,this.lat0);this.Zb=-this.Qn*(n+M1(this.gtu,2*n))}function x1(r){var t=it(r.x-this.long0),e=r.y;e=Fc(this.cbg,e);var n=Math.sin(e),i=Math.cos(e),s=Math.sin(t),o=Math.cos(t);e=Math.atan2(n,o*i),t=Math.atan2(s*i,qr(n,i*o)),t=I1(Math.tan(t));var a=Fp(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var u,h;return Math.abs(t)<=2.623395162778?(u=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(u=1/0,h=1/0),r.x=u,r.y=h,r}function T1(r){var t=(r.x-this.x0)*(1/this.a),e=(r.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,i;if(Math.abs(t)<=2.623395162778){var s=Fp(this.utg,2*e,2*t);e=e+s[0],t=t+s[1],t=Math.atan(Rp(t));var o=Math.sin(e),a=Math.cos(e),u=Math.sin(t),h=Math.cos(t);e=Math.atan2(o*h,qr(u,h*a)),t=Math.atan2(u,h*a),n=it(t+this.long0),i=Fc(this.cgb,e)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var A1=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Kh={init:N1,forward:x1,inverse:T1,names:A1};function O1(r,t){if(r===void 0){if(r=Math.floor((it(t)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var D1="etmerc";function L1(){var r=O1(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*ae,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Kh.init.apply(this),this.forward=Kh.forward,this.inverse=Kh.inverse}var R1=["Universal Transverse Mercator System","utm"];const F1={init:L1,names:R1,dependsOn:D1};function Gc(r,t){return Math.pow((1-r)/(1+r),t)}var G1=20;function k1(){var r=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+te)/(Math.pow(Math.tan(.5*this.lat0+te),this.C)*Gc(this.e*r,this.ratexp))}function V1(r){var t=r.x,e=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+te),this.C)*Gc(this.e*Math.sin(e),this.ratexp))-Y,r.x=this.C*t,r}function U1(r){for(var t=1e-14,e=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+te)/this.K,1/this.C),s=G1;s>0&&(n=2*Math.atan(i*Gc(this.e*Math.sin(r.y),-.5*this.e))-Y,!(Math.abs(n-r.y)<t));--s)r.y=n;return s?(r.x=e,r.y=n,r):null}const kc={init:k1,forward:V1,inverse:U1};function z1(){kc.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function q1(r){var t,e,n,i;return r.x=it(r.x-this.long0),kc.forward.apply(this,[r]),t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),r.x=i*e*Math.sin(r.x),r.y=i*(this.cosc0*t-this.sinc0*e*n),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function W1(r){var t,e,n,i,s;if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,s=qr(r.x,r.y)){var o=2*Math.atan2(s,this.R2);t=Math.sin(o),e=Math.cos(o),i=Math.asin(e*this.sinc0+r.y*t*this.cosc0/s),n=Math.atan2(r.x*t,s*this.cosc0*e-r.y*this.sinc0*t)}else i=this.phic0,n=0;return r.x=n,r.y=i,kc.inverse.apply(this,[r]),r.x=it(r.x+this.long0),r}var X1=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const H1={init:z1,forward:q1,inverse:W1,names:X1};function B1(r,t,e){return t*=e,Math.tan(.5*(Y+r))*Math.pow((1-t)/(1+t),.5*e)}function Y1(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=tt&&(this.k0=.5*(1+Nu(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=tt&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=tt&&Math.abs(Math.cos(this.lat_ts))>tt&&(this.k0=.5*this.cons*Ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Qn(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ci(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Y,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function J1(r){var t=r.x,e=r.y,n=Math.sin(e),i=Math.cos(e),s,o,a,u,h,l,c=it(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=tt&&Math.abs(e+this.lat0)<=tt?(r.x=NaN,r.y=NaN,r):this.sphere?(s=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(c)),r.x=this.a*s*i*Math.sin(c)+this.x0,r.y=this.a*s*(this.coslat0*n-this.sinlat0*i*Math.cos(c))+this.y0,r):(o=2*Math.atan(this.ssfn_(e,n,this.e))-Y,u=Math.cos(o),a=Math.sin(o),Math.abs(this.coslat0)<=tt?(h=Qn(this.e,e*this.con,this.con*n),l=2*this.a*this.k0*h/this.cons,r.x=this.x0+l*Math.sin(t-this.long0),r.y=this.y0-this.con*l*Math.cos(t-this.long0),r):(Math.abs(this.sinlat0)<tt?(s=2*this.a*this.k0/(1+u*Math.cos(c)),r.y=s*a):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*u*Math.cos(c))),r.y=s*(this.cosX0*a-this.sinX0*u*Math.cos(c))+this.y0),r.x=s*u*Math.sin(c)+this.x0,r))}function j1(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,o=Math.sqrt(r.x*r.x+r.y*r.y);if(this.sphere){var a=2*Math.atan(o/(2*this.a*this.k0));return t=this.long0,e=this.lat0,o<=tt?(r.x=t,r.y=e,r):(e=Math.asin(Math.cos(a)*this.sinlat0+r.y*Math.sin(a)*this.coslat0/o),Math.abs(this.coslat0)<tt?this.lat0>0?t=it(this.long0+Math.atan2(r.x,-1*r.y)):t=it(this.long0+Math.atan2(r.x,r.y)):t=it(this.long0+Math.atan2(r.x*Math.sin(a),o*this.coslat0*Math.cos(a)-r.y*this.sinlat0*Math.sin(a))),r.x=t,r.y=e,r)}else if(Math.abs(this.coslat0)<=tt){if(o<=tt)return e=this.lat0,t=this.long0,r.x=t,r.y=e,r;r.x*=this.con,r.y*=this.con,n=o*this.cons/(2*this.a*this.k0),e=this.con*xu(this.e,n),t=this.con*it(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=tt?s=this.X0:(s=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/o),t=it(this.long0+Math.atan2(r.x*Math.sin(i),o*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),e=-1*xu(this.e,Math.tan(.5*(Y+s)));return r.x=t,r.y=e,r}var Q1=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const K1={init:Y1,forward:J1,inverse:j1,names:Q1,ssfn_:B1};function $1(){var r=this.lat0;this.lambda0=this.long0;var t=Math.sin(r),e=this.a,n=this.rf,i=1/n,s=2*i-Math.pow(i,2),o=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),u=Math.log(Math.tan(Math.PI/4+r/2)),h=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*u+this.alpha*o/2*h}function Z1(r){var t=Math.log(Math.tan(Math.PI/4-r.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(t+e)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(r.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return r.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,r.x=this.R*o+this.x0,r}function tw(r){for(var t=r.x-this.x0,e=r.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),a=this.lambda0+o/this.alpha,u=0,h=s,l=-1e3,c=0;Math.abs(h-l)>1e-7;){if(++c>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),l=h,h=2*Math.atan(Math.exp(u))-Math.PI/2}return r.x=a,r.y=h,r}var ew=["somerc"];const rw={init:$1,forward:Z1,inverse:tw,names:ew};var sa=1e-7;function nw(r){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof r.projName=="object"?Object.keys(r.projName)[0]:r.projName;return"no_uoff"in r||"no_off"in r||t.indexOf(e)!==-1||t.indexOf(fp(e))!==-1}function iw(){var r,t,e,n,i,s,o,a,u,h,l=0,c,f=0,p=0,v=0,w=0,E=0,I=0;this.no_off=nw(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var _=!1;if("rectified_grid_angle"in this&&(_=!0),y&&(I=this.alpha),_&&(l=this.rectified_grid_angle),y||_)f=this.longc;else if(p=this.long1,w=this.lat1,v=this.long2,E=this.lat2,Math.abs(w-E)<=sa||(r=Math.abs(w))<=sa||Math.abs(r-Y)<=sa||Math.abs(Math.abs(this.lat0)-Y)<=sa||Math.abs(Math.abs(E)-Y)<=sa)throw new Error;var m=1-this.es;t=Math.sqrt(m),Math.abs(this.lat0)>tt?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),r=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/m),this.A=this.B*this.k0*t/r,n=this.B*t/(e*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Qn(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=i=1),y||_?(y?(c=Math.asin(Math.sin(I)/n),_||(l=I)):(c=l,I=Math.asin(n*Math.sin(c))),this.lam0=f-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(s=Math.pow(Qn(this.e,w,Math.sin(w)),this.B),o=Math.pow(Qn(this.e,E,Math.sin(E)),this.B),i=this.E/s,u=(o-s)/(o+s),h=this.E*this.E,h=(h-o*s)/(h+o*s),r=p-v,r<-Math.pi?v-=Mu:r>Math.pi&&(v+=Mu),this.lam0=it(.5*(p+v)-Math.atan(h*Math.tan(.5*this.B*(p-v))/u)/this.B),c=Math.atan(2*Math.sin(this.B*it(p-this.lam0))/(i-1/i)),l=I=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(l),this.cosrot=Math.cos(l),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(I))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(te-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(te+i))}function sw(r){var t={},e,n,i,s,o,a,u,h;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-Y)>tt){if(o=this.E/Math.pow(Qn(this.e,r.y,Math.sin(r.y)),this.B),a=1/o,e=.5*(o-a),n=.5*(o+a),s=Math.sin(this.B*r.x),i=(e*this.singam-s*this.cosgam)/n,Math.abs(Math.abs(i)-1)<tt)throw new Error;h=.5*this.ArB*Math.log((1-i)/(1+i)),a=Math.cos(this.B*r.x),Math.abs(a)<sa?u=this.A*r.x:u=this.ArB*Math.atan2(e*this.cosgam+s*this.singam,a)}else h=r.y>0?this.v_pole_n:this.v_pole_s,u=this.ArB*r.y;return this.no_rot?(t.x=u,t.y=h):(u-=this.u_0,t.x=h*this.cosrot+u*this.sinrot,t.y=u*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function ow(r){var t,e,n,i,s,o,a,u={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(e=r.y,t=r.x):(e=r.x*this.cosrot-r.y*this.sinrot,t=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),i=.5*(n-1/n),s=.5*(n+1/n),o=Math.sin(this.BrA*t),a=(o*this.cosgam+i*this.singam)/s,Math.abs(Math.abs(a)-1)<tt)u.x=0,u.y=a<0?-Y:Y;else{if(u.y=this.E/Math.sqrt((1+a)/(1-a)),u.y=xu(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(i*this.cosgam-o*this.singam,Math.cos(this.BrA*t))}return u.x+=this.lam0,u}var aw=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const uw={init:iw,forward:sw,inverse:ow,names:aw};function hw(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<tt)){var r=this.b/this.a;this.e=Math.sqrt(1-r*r);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=Ci(this.e,t,e),i=Qn(this.e,this.lat1,t),s=Math.sin(this.lat2),o=Math.cos(this.lat2),a=Ci(this.e,s,o),u=Qn(this.e,this.lat2,s),h=Math.abs(Math.abs(this.lat0)-Y)<tt?0:Qn(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>tt?this.ns=Math.log(n/a)/Math.log(i/u):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function lw(r){var t=r.x,e=r.y;Math.abs(2*Math.abs(e)-Math.PI)<=tt&&(e=Nu(e)*(Y-2*tt));var n=Math.abs(Math.abs(e)-Y),i,s;if(n>tt)i=Qn(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(i,this.ns);else{if(n=e*this.ns,n<=0)return null;s=0}var o=this.ns*it(t-this.long0);return r.x=this.k0*(s*Math.sin(o))+this.x0,r.y=this.k0*(this.rh-s*Math.cos(o))+this.y0,r}function cw(r){var t,e,n,i,s,o=(r.x-this.x0)/this.k0,a=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+a*a),e=1):(t=-Math.sqrt(o*o+a*a),e=-1);var u=0;if(t!==0&&(u=Math.atan2(e*o,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),i=xu(this.e,n),i===-9999)return null}else i=-Y;return s=it(u/this.ns+this.long0),r.x=s,r.y=i,r}var fw=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const dw={init:hw,forward:lw,inverse:cw,names:fw};function gw(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function pw(r){var t,e,n,i,s,o,a,u=r.x,h=r.y,l=it(u-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-l*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),s=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(i)),o=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=a*Math.cos(o)/1,r.x=a*Math.sin(o)/1,this.czech||(r.y*=-1,r.x*=-1),r}function vw(r){var t,e,n,i,s,o,a,u,h=r.x;r.x=r.y,r.y=h,this.czech||(r.y*=-1,r.x*=-1),o=Math.sqrt(r.x*r.x+r.y*r.y),s=Math.atan2(r.y,r.x),i=s/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),e=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),r.x=this.long0-e/this.alfa,a=t,u=0;var l=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-r.y)<1e-10&&(u=1),a=r.y,l+=1;while(u===0&&l<15);return l>=15?null:r}var mw=["Krovak","krovak"];const yw={init:gw,forward:pw,inverse:vw,names:mw};function Nr(r,t,e,n,i){return r*i-t*Math.sin(2*i)+e*Math.sin(4*i)-n*Math.sin(6*i)}function Ou(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function Du(r){return .375*r*(1+.25*r*(1+.46875*r))}function Lu(r){return .05859375*r*r*(1+.75*r)}function Ru(r){return r*r*r*.011393229166666666}function Vc(r,t,e){var n=t*e;return r/Math.sqrt(1-n*n)}function Ps(r){return Math.abs(r)<Y?r:r-Nu(r)*Math.PI}function $h(r,t,e,n,i){var s,o;s=r/t;for(var a=0;a<15;a++)if(o=(r-(t*s-e*Math.sin(2*s)+n*Math.sin(4*s)-i*Math.sin(6*s)))/(t-2*e*Math.cos(2*s)+4*n*Math.cos(4*s)-6*i*Math.cos(6*s)),s+=o,Math.abs(o)<=1e-10)return s;return NaN}function _w(){this.sphere||(this.e0=Ou(this.es),this.e1=Du(this.es),this.e2=Lu(this.es),this.e3=Ru(this.es),this.ml0=this.a*Nr(this.e0,this.e1,this.e2,this.e3,this.lat0))}function ww(r){var t,e,n=r.x,i=r.y;if(n=it(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var s=Math.sin(i),o=Math.cos(i),a=Vc(this.a,this.e,s),u=Math.tan(i)*Math.tan(i),h=n*Math.cos(i),l=h*h,c=this.es*o*o/(1-this.es),f=this.a*Nr(this.e0,this.e1,this.e2,this.e3,i);t=a*h*(1-l*u*(.16666666666666666-(8-u+8*c)*l/120)),e=f-this.ml0+a*s/o*l*(.5+(5-u+6*c)*l/24)}return r.x=t+this.x0,r.y=e+this.y0,r}function Ew(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i;if(this.sphere){var s=e+this.lat0;n=Math.asin(Math.sin(s)*Math.cos(t)),i=Math.atan2(Math.tan(t),Math.cos(s))}else{var o=this.ml0/this.a+e,a=$h(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-Y)<=tt)return r.x=this.long0,r.y=Y,e<0&&(r.y*=-1),r;var u=Vc(this.a,this.e,Math.sin(a)),h=u*u*u/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(a),2),c=t*this.a/u,f=c*c;n=a-u*Math.tan(a)/h*c*c*(.5-(1+3*l)*c*c/24),i=c*(1-f*(l/3+(1+3*l)*l*f/15))/Math.cos(a)}return r.x=it(i+this.long0),r.y=Ps(n),r}var Sw=["Cassini","Cassini_Soldner","cass"];const Cw={init:_w,forward:ww,inverse:Ew,names:Sw};function Is(r,t){var e;return r>1e-7?(e=r*t,(1-r*r)*(t/(1-e*e)-.5/r*Math.log((1-e)/(1+e)))):2*t}var Pw=1,Iw=2,Mw=3,bw=4;function Nw(){var r=Math.abs(this.lat0);if(Math.abs(r-Y)<tt?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<tt?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Is(this.e,1),this.mmf=.5/(1-this.es),this.apa=Gw(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Is(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function xw(r){var t,e,n,i,s,o,a,u,h,l,c=r.x,f=r.y;if(c=it(c-this.long0),this.sphere){if(s=Math.sin(f),l=Math.cos(f),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+l*n:1+this.sinph0*s+this.cosph0*l*n,e<=tt)return null;e=Math.sqrt(2/e),t=e*l*Math.sin(c),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*l*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(f+this.lat0)<tt)return null;e=te-f*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(c),e*=n}}else{switch(a=0,u=0,h=0,n=Math.cos(c),i=Math.sin(c),s=Math.sin(f),o=Is(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=o/this.qp,u=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:h=1+this.sinb1*a+this.cosb1*u*n;break;case this.EQUIT:h=1+u*n;break;case this.N_POLE:h=Y+f,o=this.qp-o;break;case this.S_POLE:h=f-Y,o=this.qp+o;break}if(Math.abs(h)<tt)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?e=this.ymf*h*(this.cosb1*a-this.sinb1*u*n):e=(h=Math.sqrt(2/(1+u*n)))*a*this.ymf,t=this.xmf*h*u*i;break;case this.N_POLE:case this.S_POLE:o>=0?(t=(h=Math.sqrt(o))*i,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return r.x=this.a*t+this.x0,r.y=this.a*e+this.y0,r}function Tw(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i,s,o,a,u,h;if(this.sphere){var l=0,c,f=0;if(c=Math.sqrt(t*t+e*e),i=c*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(i),l=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=tt?0:Math.asin(e*f/c),t*=f,e=l*c;break;case this.OBLIQ:i=Math.abs(c)<=tt?this.lat0:Math.asin(l*this.sinph0+e*f*this.cosph0/c),t*=f*this.cosph0,e=(l-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:e=-e,i=Y-i;break;case this.S_POLE:i-=Y;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,u=Math.sqrt(t*t+e*e),u<tt)return r.x=this.long0,r.y=this.lat0,r;o=2*Math.asin(.5*u/this.rq),s=Math.cos(o),t*=o=Math.sin(o),this.mode===this.OBLIQ?(h=s*this.sinb1+e*o*this.cosb1/u,a=this.qp*h,e=u*this.cosb1*s-e*this.sinb1*o):(h=e*o/u,a=this.qp*h,e=u*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return r.x=this.long0,r.y=this.lat0,r;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,e),i=kw(Math.asin(h),this.apa)}return r.x=it(this.long0+n),r.y=i,r}var Aw=.3333333333333333,Ow=.17222222222222222,Dw=.10257936507936508,Lw=.06388888888888888,Rw=.0664021164021164,Fw=.016415012942191543;function Gw(r){var t,e=[];return e[0]=r*Aw,t=r*r,e[0]+=t*Ow,e[1]=t*Lw,t*=r,e[0]+=t*Dw,e[1]+=t*Rw,e[2]=t*Fw,e}function kw(r,t){var e=r+r;return r+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var Vw=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const Uw={init:Nw,forward:xw,inverse:Tw,names:Vw,S_POLE:Pw,N_POLE:Iw,EQUIT:Mw,OBLIQ:bw};function Ms(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function zw(){Math.abs(this.lat1+this.lat2)<tt||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Ci(this.e3,this.sin_po,this.cos_po),this.qs1=Is(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Ci(this.e3,this.sin_po,this.cos_po),this.qs2=Is(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Is(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>tt?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function qw(r){var t=r.x,e=r.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Is(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*it(t-this.long0),o=i*Math.sin(s)+this.x0,a=this.rh-i*Math.cos(s)+this.y0;return r.x=o,r.y=a,r}function Ww(r){var t,e,n,i,s,o;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(t=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(t=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,t!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,e)),s=it(i/this.ns0+this.long0),r.x=s,r.y=o,r}function Xw(r,t){var e,n,i,s,o,a=Ms(.5*t);if(r<tt)return a;for(var u=r*r,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),i=r*e,s=1-i*i,o=.5*s*s/n*(t/(1-u)-e/s+.5/r*Math.log((1-i)/(1+i))),a=a+o,Math.abs(o)<=1e-7)return a;return null}var Hw=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const Bw={init:zw,forward:qw,inverse:Ww,names:Hw,phi1z:Xw};function Yw(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Jw(r){var t,e,n,i,s,o,a,u,h=r.x,l=r.y;return n=it(h-this.long0),t=Math.sin(l),e=Math.cos(l),i=Math.cos(n),o=this.sin_p14*t+this.cos_p14*e*i,s=1,o>0||Math.abs(o)<=tt?(a=this.x0+this.a*s*e*Math.sin(n)/o,u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)/o):(a=this.x0+this.infinity_dist*e*Math.sin(n),u=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*i)),r.x=a,r.y=u,r}function jw(r){var t,e,n,i,s,o;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(t=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(t,this.rc),e=Math.sin(i),n=Math.cos(i),o=Ms(n*this.sin_p14+r.y*e*this.cos_p14/t),s=Math.atan2(r.x*e,t*this.cos_p14*n-r.y*this.sin_p14*e),s=it(this.long0+s)):(o=this.phic0,s=0),r.x=s,r.y=o,r}var Qw=["gnom"];const Kw={init:Yw,forward:Jw,inverse:jw,names:Qw};function $w(r,t){var e=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*Y:Y;for(var n=Math.asin(.5*t),i,s,o,a,u=0;u<30;u++)if(s=Math.sin(n),o=Math.cos(n),a=r*s,i=Math.pow(1-a*a,2)/(2*o)*(t/(1-r*r)-s/(1-a*a)+.5/r*Math.log((1-a)/(1+a))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function Zw(){this.sphere||(this.k0=Ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function tE(r){var t=r.x,e=r.y,n,i,s=it(t-this.long0);if(this.sphere)n=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var o=Is(this.e,Math.sin(e));n=this.x0+this.a*this.k0*s,i=this.y0+this.a*o*.5/this.k0}return r.x=n,r.y=i,r}function eE(r){r.x-=this.x0,r.y-=this.y0;var t,e;return this.sphere?(t=it(this.long0+r.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(e=$w(this.e,2*r.y*this.k0/this.a),t=it(this.long0+r.x/(this.a*this.k0))),r.x=t,r.y=e,r}var rE=["cea"];const nE={init:Zw,forward:tE,inverse:eE,names:rE};function iE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function sE(r){var t=r.x,e=r.y,n=it(t-this.long0),i=Ps(e-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function oE(r){var t=r.x,e=r.y;return r.x=it(this.long0+(t-this.x0)/(this.a*this.rc)),r.y=Ps(this.lat0+(e-this.y0)/this.a),r}var aE=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const uE={init:iE,forward:sE,inverse:oE,names:aE};var Gp=20;function hE(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ou(this.es),this.e1=Du(this.es),this.e2=Lu(this.es),this.e3=Ru(this.es),this.ml0=this.a*Nr(this.e0,this.e1,this.e2,this.e3,this.lat0)}function lE(r){var t=r.x,e=r.y,n,i,s,o=it(t-this.long0);if(s=o*Math.sin(e),this.sphere)Math.abs(e)<=tt?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(s)/Math.tan(e),i=this.a*(Ps(e-this.lat0)+(1-Math.cos(s))/Math.tan(e)));else if(Math.abs(e)<=tt)n=this.a*o,i=-1*this.ml0;else{var a=Vc(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(s),i=this.a*Nr(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(s))}return r.x=n+this.x0,r.y=i+this.y0,r}function cE(r){var t,e,n,i,s,o,a,u,h;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=tt)t=it(n/this.a+this.long0),e=0;else{o=this.lat0+i/this.a,a=n*n/this.a/this.a+o*o,u=o;var l;for(s=Gp;s;--s)if(l=Math.tan(u),h=-1*(o*(u*l+1)-u-.5*(u*u+a)*l)/((u-o)/l-1),u+=h,Math.abs(h)<=tt){e=u;break}t=it(this.long0+Math.asin(n*Math.tan(u)/this.a)/Math.sin(e))}else if(Math.abs(i+this.ml0)<=tt)e=0,t=it(this.long0+n/this.a);else{o=(this.ml0+i)/this.a,a=n*n/this.a/this.a+o*o,u=o;var c,f,p,v,w;for(s=Gp;s;--s)if(w=this.e*Math.sin(u),c=Math.sqrt(1-w*w)*Math.tan(u),f=this.a*Nr(this.e0,this.e1,this.e2,this.e3,u),p=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),v=f/this.a,h=(o*(c*v+1)-v-.5*c*(v*v+a))/(this.es*Math.sin(2*u)*(v*v+a-2*o*v)/(4*c)+(o-v)*(c*p-2/Math.sin(2*u))-p),u-=h,Math.abs(h)<=tt){e=u;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=it(this.long0+Math.asin(n*c/this.a)/Math.sin(e))}return r.x=t,r.y=e,r}var fE=["Polyconic","American_Polyconic","poly"];const dE={init:hE,forward:lE,inverse:cE,names:fE};function gE(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function pE(r){var t,e=r.x,n=r.y,i=n-this.lat0,s=e-this.long0,o=i/Iu*1e-5,a=s,u=1,h=0;for(t=1;t<=10;t++)u=u*o,h=h+this.A[t]*u;var l=h,c=a,f=1,p=0,v,w,E=0,I=0;for(t=1;t<=6;t++)v=f*l-p*c,w=p*l+f*c,f=v,p=w,E=E+this.B_re[t]*f-this.B_im[t]*p,I=I+this.B_im[t]*f+this.B_re[t]*p;return r.x=I*this.a+this.x0,r.y=E*this.a+this.y0,r}function vE(r){var t,e=r.x,n=r.y,i=e-this.x0,s=n-this.y0,o=s/this.a,a=i/this.a,u=1,h=0,l,c,f=0,p=0;for(t=1;t<=6;t++)l=u*o-h*a,c=h*o+u*a,u=l,h=c,f=f+this.C_re[t]*u-this.C_im[t]*h,p=p+this.C_im[t]*u+this.C_re[t]*h;for(var v=0;v<this.iterations;v++){var w=f,E=p,I,y,_=o,m=a;for(t=2;t<=6;t++)I=w*f-E*p,y=E*f+w*p,w=I,E=y,_=_+(t-1)*(this.B_re[t]*w-this.B_im[t]*E),m=m+(t-1)*(this.B_im[t]*w+this.B_re[t]*E);w=1,E=0;var S=this.B_re[1],C=this.B_im[1];for(t=2;t<=6;t++)I=w*f-E*p,y=E*f+w*p,w=I,E=y,S=S+t*(this.B_re[t]*w-this.B_im[t]*E),C=C+t*(this.B_im[t]*w+this.B_re[t]*E);var P=S*S+C*C;f=(_*S+m*C)/P,p=(m*S-_*C)/P}var b=f,x=p,A=1,N=0;for(t=1;t<=9;t++)A=A*b,N=N+this.D[t]*A;var T=this.lat0+N*Iu*1e5,R=this.long0+x;return r.x=R,r.y=T,r}var mE=["New_Zealand_Map_Grid","nzmg"];const yE={init:gE,forward:pE,inverse:vE,names:mE};function _E(){}function wE(r){var t=r.x,e=r.y,n=it(t-this.long0),i=this.x0+this.a*n,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return r.x=i,r.y=s,r}function EE(r){r.x-=this.x0,r.y-=this.y0;var t=it(this.long0+r.x/this.a),e=2.5*(Math.atan(Math.exp(.8*r.y/this.a))-Math.PI/4);return r.x=t,r.y=e,r}var SE=["Miller_Cylindrical","mill"];const CE={init:_E,forward:wE,inverse:EE,names:SE};var PE=20;function IE(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Lc(this.es)}function ME(r){var t,e,n=r.x,i=r.y;if(n=it(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var s=this.n*Math.sin(i),o=PE;o;--o){var a=(this.m*i+Math.sin(i)-s)/(this.m+Math.cos(i));if(i-=a,Math.abs(a)<tt)break}t=this.a*this.C_x*n*(this.m+Math.cos(i)),e=this.a*this.C_y*i}else{var u=Math.sin(i),h=Math.cos(i);e=this.a*ia(i,u,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*u*u)}return r.x=t,r.y=e,r}function bE(r){var t,e,n,i;return r.x-=this.x0,n=r.x/this.a,r.y-=this.y0,t=r.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=Ms((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Ms(Math.sin(t)/this.n)),n=it(n+this.long0),t=Ps(t)):(t=Rc(r.y/this.a,this.es,this.en),i=Math.abs(t),i<Y?(i=Math.sin(t),e=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(t)),n=it(e)):i-tt<Y&&(n=this.long0)),r.x=n,r.y=t,r}var NE=["Sinusoidal","sinu"];const xE={init:IE,forward:ME,inverse:bE,names:NE};function TE(){}function AE(r){for(var t=r.x,e=r.y,n=it(t-this.long0),i=e,s=Math.PI*Math.sin(e);;){var o=-(i+Math.sin(i)-s)/(1+Math.cos(i));if(i+=o,Math.abs(o)<tt)break}i/=2,Math.PI/2-Math.abs(e)<tt&&(n=0);var a=.900316316158*this.a*n*Math.cos(i)+this.x0,u=1.4142135623731*this.a*Math.sin(i)+this.y0;return r.x=a,r.y=u,r}function OE(r){var t,e;r.x-=this.x0,r.y-=this.y0,e=r.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=it(this.long0+r.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var i=Math.asin(e);return r.x=n,r.y=i,r}var DE=["Mollweide","moll"];const LE={init:TE,forward:AE,inverse:OE,names:DE};function RE(){Math.abs(this.lat1+this.lat2)<tt||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ou(this.es),this.e1=Du(this.es),this.e2=Lu(this.es),this.e3=Ru(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ci(this.e,this.sinphi,this.cosphi),this.ml1=Nr(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<tt?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ci(this.e,this.sinphi,this.cosphi),this.ml2=Nr(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Nr(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function FE(r){var t=r.x,e=r.y,n;if(this.sphere)n=this.a*(this.g-e);else{var i=Nr(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-i)}var s=this.ns*it(t-this.long0),o=this.x0+n*Math.sin(s),a=this.y0+this.rh-n*Math.cos(s);return r.x=o,r.y=a,r}function GE(r){r.x-=this.x0,r.y=this.rh-r.y+this.y0;var t,e,n,i;this.ns>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),t=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),t=-1);var s=0;if(e!==0&&(s=Math.atan2(t*r.x,t*r.y)),this.sphere)return i=it(this.long0+s/this.ns),n=Ps(this.g-e/this.a),r.x=i,r.y=n,r;var o=this.g-e/this.a;return n=$h(o,this.e0,this.e1,this.e2,this.e3),i=it(this.long0+s/this.ns),r.x=i,r.y=n,r}var kE=["Equidistant_Conic","eqdc"];const VE={init:RE,forward:FE,inverse:GE,names:kE};function UE(){this.R=this.a}function zE(r){var t=r.x,e=r.y,n=it(t-this.long0),i,s;Math.abs(e)<=tt&&(i=this.x0+this.R*n,s=this.y0);var o=Ms(2*Math.abs(e/Math.PI));(Math.abs(n)<=tt||Math.abs(Math.abs(e)-Y)<=tt)&&(i=this.x0,e>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*o):s=this.y0+Math.PI*this.R*-Math.tan(.5*o));var a=.5*Math.abs(Math.PI/n-n/Math.PI),u=a*a,h=Math.sin(o),l=Math.cos(o),c=l/(h+l-1),f=c*c,p=c*(2/h-1),v=p*p,w=Math.PI*this.R*(a*(c-v)+Math.sqrt(u*(c-v)*(c-v)-(v+u)*(f-v)))/(v+u);n<0&&(w=-w),i=this.x0+w;var E=u+c;return w=Math.PI*this.R*(p*E-a*Math.sqrt((v+u)*(u+1)-E*E))/(v+u),e>=0?s=this.y0+w:s=this.y0-w,r.x=i,r.y=s,r}function qE(r){var t,e,n,i,s,o,a,u,h,l,c,f,p;return r.x-=this.x0,r.y-=this.y0,c=Math.PI*this.R,n=r.x/c,i=r.y/c,s=n*n+i*i,o=-Math.abs(i)*(1+s),a=o-2*i*i+n*n,u=-2*o+1+2*i*i+s*s,p=i*i/u+(2*a*a*a/u/u/u-9*o*a/u/u)/27,h=(o-a*a/3/u)/u,l=2*Math.sqrt(-h/3),c=3*p/h/l,Math.abs(c)>1&&(c>=0?c=1:c=-1),f=Math.acos(c)/3,r.y>=0?e=(-l*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI:e=-(-l*Math.cos(f+Math.PI/3)-a/3/u)*Math.PI,Math.abs(n)<tt?t=this.long0:t=it(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(n*n-i*i)+s*s))/2/n),r.x=t,r.y=e,r}var WE=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const XE={init:UE,forward:zE,inverse:qE,names:WE};function kp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function HE(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var t=r.default;if(typeof t=="function"){var e=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),e}var Uc={exports:{}},Vp;function BE(){return Vp||(Vp=1,function(r){(function(t){var e={};e.Constants={},e.Math={},e.Accumulator={},function(n){n.WGS84={a:6378137,f:.0033528106647474805},n.version={major:2,minor:1,patch:1},n.version_string="2.1.1"}(e.Constants),function(n){n.digits=53,n.epsilon=Math.pow(.5,n.digits-1),n.degree=Math.PI/180,n.sq=function(i){return i*i},n.hypot=function(i,s){return Math.sqrt(i*i+s*s)},n.cbrt=Math.cbrt||function(i){var s=Math.pow(Math.abs(i),.3333333333333333);return i>0?s:i<0?-s:i},n.log1p=Math.log1p||function(i){var s=1+i,o=s-1;return o===0?i:i*Math.log(s)/o},n.atanh=Math.atanh||function(i){var s=Math.abs(i);return s=n.log1p(2*s/(1-s))/2,i>0?s:i<0?-s:i},n.copysign=function(i,s){return Math.abs(i)*(s<0||s===0&&1/s<0?-1:1)},n.sum=function(i,s){var o=i+s,a=o-s,u=o-a,h;return a-=i,u-=s,h=o&&0-(a+u),{s:o,t:h}},n.polyval=function(i,s,o,a){for(var u=i<0?0:s[o++];--i>=0;)u=u*a+s[o++];return u},n.AngRound=function(i){var s=.0625,o=Math.abs(i);return o=o<s?s-(s-o):o,n.copysign(o,i)},n.remainder=function(i,s){return i%=s,i<-s/2?i+s:i<s/2?i:i-s},n.AngNormalize=function(i){var s=n.remainder(i,360);return Math.abs(s)===180?n.copysign(180,i):s},n.LatFix=function(i){return Math.abs(i)>90?NaN:i},n.AngDiff=function(i,s){var o=n.sum(n.remainder(-i,360),n.remainder(s,360)),a,u;return o=n.sum(n.remainder(o.s,360),o.t),a=o.s,u=o.t,(a===0||Math.abs(a)===180)&&(a=n.copysign(a,u===0?s-i:-u)),{d:a,e:u}},n.sincosd=function(i){var s,o,a,u,h,l,c;switch(s=i%360,a=Math.round(s/90),s-=90*a,o=s*this.degree,u=Math.sin(o),h=Math.cos(o),Math.abs(s)===45?(h=Math.sqrt(.5),u=n.copysign(h,o)):Math.abs(s)===30&&(h=Math.sqrt(.75),u=n.copysign(.5,o)),a&3){case 0:l=u,c=h;break;case 1:l=h,c=-u;break;case 2:l=-u,c=-h;break;default:l=-h,c=u;break}return c+=0,l===0&&(l=n.copysign(l,i)),{s:l,c}},n.sincosde=function(i,s){var o,a,u,h,l,c,f;switch(o=i%360,u=Math.round(o/90),o=n.AngRound(o-90*u+s),a=o*this.degree,h=Math.sin(a),l=Math.cos(a),Math.abs(o)===45?(l=Math.sqrt(.5),h=n.copysign(l,a)):Math.abs(o)===30&&(l=Math.sqrt(.75),h=n.copysign(.5,a)),u&3){case 0:c=h,f=l;break;case 1:c=l,f=-h;break;case 2:c=-h,f=-l;break;default:c=-l,f=h;break}return f+=0,c===0&&(c=n.copysign(c,i+s)),{s:c,c:f}},n.atan2d=function(i,s){var o=0,a;switch(Math.abs(i)>Math.abs(s)&&([i,s]=[s,i],o=2),n.copysign(1,s)<0&&(s=-s,++o),a=Math.atan2(i,s)/this.degree,o){case 1:a=n.copysign(180,i)-a;break;case 2:a=90-a;break;case 3:a=-90+a;break}return a}}(e.Math),function(n,i){n.Accumulator=function(s){this.Set(s)},n.Accumulator.prototype.Set=function(s){s||(s=0),s.constructor===n.Accumulator?(this._s=s._s,this._t=s._t):(this._s=s,this._t=0)},n.Accumulator.prototype.Add=function(s){var o=i.sum(s,this._t),a=i.sum(o.s,this._s);o=o.t,this._s=a.s,this._t=a.t,this._s===0?this._s=o:this._t+=o},n.Accumulator.prototype.Sum=function(s){var o;return s?(o=new n.Accumulator(this),o.Add(s),o._s):this._s},n.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},n.Accumulator.prototype.Remainder=function(s){this._s=i.remainder(this._s,s),this.Add(0)}}(e.Accumulator,e.Math),e.Geodesic={},e.GeodesicLine={},e.PolygonArea={},function(n,i,s,o,a){var u=6,h=u,l=u,c=u,f=c,p,v,w=20,E=w+o.digits+10,I=o.epsilon,y=200*I,_=Math.sqrt(I),m=I,S=1e3*_,C=0,P=31,b=32640,x,A,N,T,R,V,$,J,st;n.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),n.nC1_=u,n.nC1p_=u,n.nC2_=u,n.nC3_=u,n.nC4_=u,p=n.nC3_*(n.nC3_-1)/2,v=n.nC4_*(n.nC4_+1)/2,n.CAP_C1=1,n.CAP_C1p=2,n.CAP_C2=4,n.CAP_C3=8,n.CAP_C4=16,n.NONE=0,n.ARC=64,n.LATITUDE=128|C,n.LONGITUDE=256|n.CAP_C3,n.AZIMUTH=512|C,n.DISTANCE=1024|n.CAP_C1,n.STANDARD=n.LATITUDE|n.LONGITUDE|n.AZIMUTH|n.DISTANCE,n.DISTANCE_IN=2048|n.CAP_C1|n.CAP_C1p,n.REDUCEDLENGTH=4096|n.CAP_C1|n.CAP_C2,n.GEODESICSCALE=8192|n.CAP_C1|n.CAP_C2,n.AREA=16384|n.CAP_C4,n.ALL=b|P,n.LONG_UNROLL=32768,n.OUT_MASK=b|n.LONG_UNROLL,n.SinCosSeries=function(G,W,k,U){var O=U.length,q=O-(G?1:0),H=2*(k-W)*(k+W),et=q&1?U[--O]:0,ht=0;for(q=Math.floor(q/2);q--;)ht=H*et-ht+U[--O],et=H*ht-et+U[--O];return G?2*W*k*et:k*(et-ht)},x=function(G,W){var k,U=o.sq(G),O=o.sq(W),q=(U+O-1)/6,H,et,ht,rt,_t,nt,Ct,It,Q,wt,bt;return O===0&&q<=0?k=0:(H=U*O/4,et=o.sq(q),ht=q*et,rt=H*(H+2*ht),_t=q,rt>=0?(nt=H+ht,nt+=nt<0?-Math.sqrt(rt):Math.sqrt(rt),Ct=o.cbrt(nt),_t+=Ct+(Ct!==0?et/Ct:0)):(It=Math.atan2(Math.sqrt(-rt),-(H+ht)),_t+=2*q*Math.cos(It/3)),Q=Math.sqrt(o.sq(_t)+O),wt=_t<0?O/(Q-_t):_t+Q,bt=(wt-O)/(2*Q),k=wt/(Math.sqrt(wt+o.sq(bt))+bt)),k},A=[1,4,64,0,256],n.A1m1f=function(G){var W=Math.floor(h/2),k=o.polyval(W,A,0,o.sq(G))/A[W+1];return(k+G)/(1-G)},N=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],n.C1f=function(G,W){var k=o.sq(G),U=G,O=0,q,H;for(q=1;q<=n.nC1_;++q)H=Math.floor((n.nC1_-q)/2),W[q]=U*o.polyval(H,N,O,k)/N[O+H+1],O+=H+2,U*=G},T=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],n.C1pf=function(G,W){var k=o.sq(G),U=G,O=0,q,H;for(q=1;q<=n.nC1p_;++q)H=Math.floor((n.nC1p_-q)/2),W[q]=U*o.polyval(H,T,O,k)/T[O+H+1],O+=H+2,U*=G},R=[-11,-28,-192,0,256],n.A2m1f=function(G){var W=Math.floor(l/2),k=o.polyval(W,R,0,o.sq(G))/R[W+1];return(k-G)/(1+G)},V=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],n.C2f=function(G,W){var k=o.sq(G),U=G,O=0,q,H;for(q=1;q<=n.nC2_;++q)H=Math.floor((n.nC2_-q)/2),W[q]=U*o.polyval(H,V,O,k)/V[O+H+1],O+=H+2,U*=G},n.Geodesic=function(G,W){if(this.a=G,this.f=W,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/o.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(o.sq(this.a)+o.sq(this._b)*(this._e2===0?1:(this._e2>0?o.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*_/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(f),this._C3x=new Array(p),this._C4x=new Array(v),this.A3coeff(),this.C3coeff(),this.C4coeff()},$=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],n.Geodesic.prototype.A3coeff=function(){var G=0,W=0,k,U;for(k=c-1;k>=0;--k)U=Math.min(c-k-1,k),this._A3x[W++]=o.polyval(U,$,G,this._n)/$[G+U+1],G+=U+2},J=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],n.Geodesic.prototype.C3coeff=function(){var G=0,W=0,k,U,O;for(k=1;k<n.nC3_;++k)for(U=n.nC3_-1;U>=k;--U)O=Math.min(n.nC3_-U-1,U),this._C3x[W++]=o.polyval(O,J,G,this._n)/J[G+O+1],G+=O+2},st=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],n.Geodesic.prototype.C4coeff=function(){var G=0,W=0,k,U,O;for(k=0;k<n.nC4_;++k)for(U=n.nC4_-1;U>=k;--U)O=n.nC4_-U-1,this._C4x[W++]=o.polyval(O,st,G,this._n)/st[G+O+1],G+=O+2},n.Geodesic.prototype.A3f=function(G){return o.polyval(f-1,this._A3x,0,G)},n.Geodesic.prototype.C3f=function(G,W){var k=1,U=0,O,q;for(O=1;O<n.nC3_;++O)q=n.nC3_-O-1,k*=G,W[O]=k*o.polyval(q,this._C3x,U,G),U+=q+1},n.Geodesic.prototype.C4f=function(G,W){var k=1,U=0,O,q;for(O=0;O<n.nC4_;++O)q=n.nC4_-O-1,W[O]=k*o.polyval(q,this._C4x,U,G),U+=q+1,k*=G},n.Geodesic.prototype.Lengths=function(G,W,k,U,O,q,H,et,ht,rt,_t,nt,Ct){_t&=n.OUT_MASK;var It={},Q=0,wt=0,bt=0,Lt=0,Xt,Ht,Qt,fe,Ue;if(_t&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&(bt=n.A1m1f(G),n.C1f(G,nt),_t&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Lt=n.A2m1f(G),n.C2f(G,Ct),Q=bt-Lt,Lt=1+Lt),bt=1+bt),_t&n.DISTANCE)Xt=n.SinCosSeries(!0,q,H,nt)-n.SinCosSeries(!0,k,U,nt),It.s12b=bt*(W+Xt),_t&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Ht=n.SinCosSeries(!0,q,H,Ct)-n.SinCosSeries(!0,k,U,Ct),wt=Q*W+(bt*Xt-Lt*Ht));else if(_t&(n.REDUCEDLENGTH|n.GEODESICSCALE)){for(Qt=1;Qt<=n.nC2_;++Qt)Ct[Qt]=bt*nt[Qt]-Lt*Ct[Qt];wt=Q*W+(n.SinCosSeries(!0,q,H,Ct)-n.SinCosSeries(!0,k,U,Ct))}return _t&n.REDUCEDLENGTH&&(It.m0=Q,It.m12b=et*(U*q)-O*(k*H)-U*H*wt),_t&n.GEODESICSCALE&&(fe=U*H+k*q,Ue=this._ep2*(ht-rt)*(ht+rt)/(O+et),It.M12=fe+(Ue*q-H*wt)*k/O,It.M21=fe-(Ue*k-U*wt)*q/et),It},n.Geodesic.prototype.InverseStart=function(G,W,k,U,O,q,H,et,ht,rt,_t){var nt={},Ct=U*W-O*G,It=O*W+U*G,Q,wt,bt,Lt,Xt,Ht,Qt,fe,Ue,Bt,Ft,kt,me,Ae,Bn,ro,Dh,ji,Kt,Zr,Mr,tn,vn;return nt.sig12=-1,Q=U*W,Q+=O*G,wt=It>=0&&Ct<.5&&O*H<.5,wt?(Lt=o.sq(G+U),Lt/=Lt+o.sq(W+O),nt.dnm=Math.sqrt(1+this._ep2*Lt),bt=H/(this._f1*nt.dnm),Xt=Math.sin(bt),Ht=Math.cos(bt)):(Xt=et,Ht=ht),nt.salp1=O*Xt,nt.calp1=Ht>=0?Ct+O*G*o.sq(Xt)/(1+Ht):Q-O*G*o.sq(Xt)/(1-Ht),fe=o.hypot(nt.salp1,nt.calp1),Ue=G*U+W*O*Ht,wt&&fe<this._etol2?(nt.salp2=W*Xt,nt.calp2=Ct-W*U*(Ht>=0?o.sq(Xt)/(1+Ht):1-Ht),Qt=o.hypot(nt.salp2,nt.calp2),nt.salp2/=Qt,nt.calp2/=Qt,nt.sig12=Math.atan2(fe,Ue)):Math.abs(this._n)>.1||Ue>=0||fe>=6*Math.abs(this._n)*Math.PI*o.sq(W)||(vn=Math.atan2(-et,-ht),this.f>=0?(Ae=o.sq(G)*this._ep2,Bn=Ae/(2*(1+Math.sqrt(1+Ae))+Ae),kt=this.f*W*this.A3f(Bn)*Math.PI,me=kt*W,Bt=vn/kt,Ft=Q/me):(ro=O*W-U*G,Dh=Math.atan2(Q,ro),Zr=this.Lengths(this._n,Math.PI+Dh,G,-W,k,U,O,q,W,O,n.REDUCEDLENGTH,rt,_t),ji=Zr.m12b,Kt=Zr.m0,Bt=-1+ji/(W*O*Kt*Math.PI),me=Bt<-.01?Q/Bt:-this.f*o.sq(W)*Math.PI,kt=me/W,Ft=H/kt),Ft>-y&&Bt>-1-S?this.f>=0?(nt.salp1=Math.min(1,-Bt),nt.calp1=-Math.sqrt(1-o.sq(nt.salp1))):(nt.calp1=Math.max(Bt>-y?0:-1,Bt),nt.salp1=Math.sqrt(1-o.sq(nt.calp1))):(Mr=x(Bt,Ft),tn=kt*(this.f>=0?-Bt*Mr/(1+Mr):-Ft*(1+Mr)/Mr),Xt=Math.sin(tn),Ht=-Math.cos(tn),nt.salp1=O*Xt,nt.calp1=Q-O*G*o.sq(Xt)/(1-Ht))),nt.salp1<=0?(nt.salp1=1,nt.calp1=0):(Qt=o.hypot(nt.salp1,nt.calp1),nt.salp1/=Qt,nt.calp1/=Qt),nt},n.Geodesic.prototype.Lambda12=function(G,W,k,U,O,q,H,et,ht,rt,_t,nt,Ct,It){var Q={},wt,bt,Lt,Xt,Ht,Qt,fe,Ue,Bt,Ft,kt,me,Ae;return G===0&&et===0&&(et=-n.tiny_),bt=H*W,Lt=o.hypot(et,H*G),Q.ssig1=G,Xt=bt*G,Q.csig1=Ht=et*W,wt=o.hypot(Q.ssig1,Q.csig1),Q.ssig1/=wt,Q.csig1/=wt,Q.salp2=O!==W?bt/O:H,Q.calp2=O!==W||Math.abs(U)!==-G?Math.sqrt(o.sq(et*W)+(W<-G?(O-W)*(W+O):(G-U)*(G+U)))/O:Math.abs(et),Q.ssig2=U,Qt=bt*U,Q.csig2=fe=Q.calp2*O,wt=o.hypot(Q.ssig2,Q.csig2),Q.ssig2/=wt,Q.csig2/=wt,Q.sig12=Math.atan2(Math.max(0,Q.csig1*Q.ssig2-Q.ssig1*Q.csig2),Q.csig1*Q.csig2+Q.ssig1*Q.ssig2),Ue=Math.max(0,Ht*Qt-Xt*fe),Bt=Ht*fe+Xt*Qt,kt=Math.atan2(Ue*rt-Bt*ht,Bt*rt+Ue*ht),me=o.sq(Lt)*this._ep2,Q.eps=me/(2*(1+Math.sqrt(1+me))+me),this.C3f(Q.eps,It),Ft=n.SinCosSeries(!0,Q.ssig2,Q.csig2,It)-n.SinCosSeries(!0,Q.ssig1,Q.csig1,It),Q.domg12=-this.f*this.A3f(Q.eps)*bt*(Q.sig12+Ft),Q.lam12=kt+Q.domg12,_t&&(Q.calp2===0?Q.dlam12=-2*this._f1*k/G:(Ae=this.Lengths(Q.eps,Q.sig12,Q.ssig1,Q.csig1,k,Q.ssig2,Q.csig2,q,W,O,n.REDUCEDLENGTH,nt,Ct),Q.dlam12=Ae.m12b,Q.dlam12*=this._f1/(Q.calp2*O))),Q},n.Geodesic.prototype.Inverse=function(G,W,k,U,O){var q,H;return O||(O=n.STANDARD),O===n.LONG_UNROLL&&(O|=n.STANDARD),O&=n.OUT_MASK,q=this.InverseInt(G,W,k,U,O),H=q.vals,O&n.AZIMUTH&&(H.azi1=o.atan2d(q.salp1,q.calp1),H.azi2=o.atan2d(q.salp2,q.calp2)),H},n.Geodesic.prototype.InverseInt=function(G,W,k,U,O){var q={},H,et,ht,rt,_t,nt,Ct,It,Q,wt,bt,Lt,Xt,Ht,Qt,fe,Ue,Bt,Ft,kt,me,Ae,Bn,ro,Dh,ji,Kt,Zr,Mr,tn,vn,ec,rc,_u,Jo,Lh,Rh,Fh,Gh,nc,fg,wu,dg,ic,gg,pg,vg,Lm,mg,sc,yg,oc,Rm,ac,Fm,Gm,kh,uc,Vh,_g,wg,hc,lc,Eg,Sg;if(q.lat1=G=o.LatFix(G),q.lat2=k=o.LatFix(k),G=o.AngRound(G),k=o.AngRound(k),H=o.AngDiff(W,U),et=H.e,H=H.d,O&n.LONG_UNROLL?(q.lon1=W,q.lon2=W+H+et):(q.lon1=o.AngNormalize(W),q.lon2=o.AngNormalize(U)),ht=o.copysign(1,H),H*=ht,et*=ht,Qt=H*o.degree,rt=o.sincosde(H,et),fe=rt.s,Ue=rt.c,et=180-H-et,_t=Math.abs(G)<Math.abs(k)||isNaN(k)?-1:1,_t<0&&(ht*=-1,[k,G]=[G,k]),nt=o.copysign(1,-G),G*=nt,k*=nt,rt=o.sincosd(G),Ct=this._f1*rt.s,It=rt.c,rt=o.hypot(Ct,It),Ct/=rt,It/=rt,It=Math.max(n.tiny_,It),rt=o.sincosd(k),Q=this._f1*rt.s,wt=rt.c,rt=o.hypot(Q,wt),Q/=rt,wt/=rt,wt=Math.max(n.tiny_,wt),It<-Ct?wt===It&&(Q=o.copysign(Ct,Q)):Math.abs(Q)===-Ct&&(wt=It),Xt=Math.sqrt(1+this._ep2*o.sq(Ct)),Ht=Math.sqrt(1+this._ep2*o.sq(Q)),Bn=new Array(n.nC1_+1),ro=new Array(n.nC2_+1),Dh=new Array(n.nC3_),ji=G===-90||fe===0,ji&&(Ft=Ue,kt=fe,me=1,Ae=0,Zr=Ct,Mr=Ft*It,tn=Q,vn=me*wt,Bt=Math.atan2(Math.max(0,Mr*tn-Zr*vn),Mr*vn+Zr*tn),Kt=this.Lengths(this._n,Bt,Zr,Mr,Xt,tn,vn,Ht,It,wt,O|n.DISTANCE|n.REDUCEDLENGTH,Bn,ro),bt=Kt.s12b,Lt=Kt.m12b,O&n.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Bt<1||Lt>=0?((Bt<3*n.tiny_||Bt<I&&(bt<0||Lt<0))&&(Bt=Lt=bt=0),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree):ji=!1),kh=2,!ji&&Ct===0&&(this.f<=0||et>=this.f*180))Ft=me=0,kt=Ae=1,bt=this.a*Qt,Bt=rc=Qt/this._f1,Lt=this._b*Math.sin(Bt),O&n.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt)),q.a12=H/this._f1;else if(!ji)if(Kt=this.InverseStart(Ct,It,Xt,Q,wt,Ht,Qt,fe,Ue,Bn,ro),Bt=Kt.sig12,kt=Kt.salp1,Ft=Kt.calp1,Bt>=0)Ae=Kt.salp2,me=Kt.calp2,_u=Kt.dnm,bt=Bt*this._b*_u,Lt=o.sq(_u)*this._b*Math.sin(Bt/_u),O&n.GEODESICSCALE&&(q.M12=q.M21=Math.cos(Bt/_u)),q.a12=Bt/o.degree,rc=Qt/(this._f1*_u);else{for(Jo=0,Lh=n.tiny_,Rh=1,Fh=n.tiny_,Gh=-1,nc=!1,fg=!1;Kt=this.Lambda12(Ct,It,Xt,Q,wt,Ht,kt,Ft,fe,Ue,Jo<w,Bn,ro,Dh),wu=Kt.lam12,Ae=Kt.salp2,me=Kt.calp2,Bt=Kt.sig12,Zr=Kt.ssig1,Mr=Kt.csig1,tn=Kt.ssig2,vn=Kt.csig2,ec=Kt.eps,Vh=Kt.domg12,dg=Kt.dlam12,!(fg||!(Math.abs(wu)>=(nc?8:1)*I)||Jo==E);++Jo){if(wu>0&&(Jo<w||Ft/kt>Gh/Fh)?(Fh=kt,Gh=Ft):wu<0&&(Jo<w||Ft/kt<Rh/Lh)&&(Lh=kt,Rh=Ft),Jo<w&&dg>0&&(ic=-wu/dg,Math.abs(ic)<Math.PI&&(gg=Math.sin(ic),pg=Math.cos(ic),vg=kt*pg+Ft*gg,vg>0))){Ft=Ft*pg-kt*gg,kt=vg,rt=o.hypot(kt,Ft),kt/=rt,Ft/=rt,nc=Math.abs(wu)<=16*I;continue}kt=(Lh+Fh)/2,Ft=(Rh+Gh)/2,rt=o.hypot(kt,Ft),kt/=rt,Ft/=rt,nc=!1,fg=Math.abs(Lh-kt)+(Rh-Ft)<m||Math.abs(kt-Fh)+(Ft-Gh)<m}Lm=O|(O&(n.REDUCEDLENGTH|n.GEODESICSCALE)?n.DISTANCE:n.NONE),Kt=this.Lengths(ec,Bt,Zr,Mr,Xt,tn,vn,Ht,It,wt,Lm,Bn,ro),bt=Kt.s12b,Lt=Kt.m12b,O&n.GEODESICSCALE&&(q.M12=Kt.M12,q.M21=Kt.M21),Lt*=this._b,bt*=this._b,q.a12=Bt/o.degree,O&n.AREA&&(Eg=Math.sin(Vh),Sg=Math.cos(Vh),kh=fe*Sg-Ue*Eg,uc=Ue*Sg+fe*Eg)}return O&n.DISTANCE&&(q.s12=0+bt),O&n.REDUCEDLENGTH&&(q.m12=0+Lt),O&n.AREA&&(mg=kt*It,sc=o.hypot(Ft,kt*Ct),sc!==0&&mg!==0?(Zr=Ct,Mr=Ft*It,tn=Q,vn=me*wt,oc=o.sq(sc)*this._ep2,ec=oc/(2*(1+Math.sqrt(1+oc))+oc),Rm=o.sq(this.a)*sc*mg*this._e2,rt=o.hypot(Zr,Mr),Zr/=rt,Mr/=rt,rt=o.hypot(tn,vn),tn/=rt,vn/=rt,ac=new Array(n.nC4_),this.C4f(ec,ac),Fm=n.SinCosSeries(!1,Zr,Mr,ac),Gm=n.SinCosSeries(!1,tn,vn,ac),q.S12=Rm*(Gm-Fm)):q.S12=0,!ji&&kh==2&&(kh=Math.sin(rc),uc=Math.cos(rc)),!ji&&uc>-.7071&&Q-Ct<1.75?(Vh=1+uc,_g=1+It,wg=1+wt,yg=2*Math.atan2(kh*(Ct*wg+Q*_g),Vh*(Ct*Q+_g*wg))):(hc=Ae*Ft-me*kt,lc=me*Ft+Ae*kt,hc===0&&lc<0&&(hc=n.tiny_*Ft,lc=-1),yg=Math.atan2(hc,lc)),q.S12+=this._c2*yg,q.S12*=_t*ht*nt,q.S12+=0),_t<0&&([Ae,kt]=[kt,Ae],[me,Ft]=[Ft,me],O&n.GEODESICSCALE&&([q.M21,q.M12]=[q.M12,q.M21])),kt*=_t*ht,Ft*=_t*nt,Ae*=_t*ht,me*=_t*nt,{vals:q,salp1:kt,calp1:Ft,salp2:Ae,calp2:me}},n.Geodesic.prototype.GenDirect=function(G,W,k,U,O,q){var H;return q?q===n.LONG_UNROLL&&(q|=n.STANDARD):q=n.STANDARD,U||(q|=n.DISTANCE_IN),H=new i.GeodesicLine(this,G,W,k,q),H.GenPosition(U,O,q)},n.Geodesic.prototype.Direct=function(G,W,k,U,O){return this.GenDirect(G,W,k,!1,U,O)},n.Geodesic.prototype.ArcDirect=function(G,W,k,U,O){return this.GenDirect(G,W,k,!0,U,O)},n.Geodesic.prototype.Line=function(G,W,k,U){return new i.GeodesicLine(this,G,W,k,U)},n.Geodesic.prototype.DirectLine=function(G,W,k,U,O){return this.GenDirectLine(G,W,k,!1,U,O)},n.Geodesic.prototype.ArcDirectLine=function(G,W,k,U,O){return this.GenDirectLine(G,W,k,!0,U,O)},n.Geodesic.prototype.GenDirectLine=function(G,W,k,U,O,q){var H;return q||(q=n.STANDARD|n.DISTANCE_IN),U||(q|=n.DISTANCE_IN),H=new i.GeodesicLine(this,G,W,k,q),H.GenSetDistance(U,O),H},n.Geodesic.prototype.InverseLine=function(G,W,k,U,O){var q,H,et;return O||(O=n.STANDARD|n.DISTANCE_IN),q=this.InverseInt(G,W,k,U,n.ARC),et=o.atan2d(q.salp1,q.calp1),O&(n.OUT_MASK&n.DISTANCE_IN)&&(O|=n.DISTANCE),H=new i.GeodesicLine(this,G,W,et,O,q.salp1,q.calp1),H.SetArc(q.vals.a12),H},n.Geodesic.prototype.Polygon=function(G){return new s.PolygonArea(this,G)},n.WGS84=new n.Geodesic(a.WGS84.a,a.WGS84.f)}(e.Geodesic,e.GeodesicLine,e.PolygonArea,e.Math,e.Constants),function(n,i,s){i.GeodesicLine=function(o,a,u,h,l,c,f){var p,v,w,E,I,y;l||(l=n.STANDARD|n.DISTANCE_IN),this.a=o.a,this.f=o.f,this._b=o._b,this._c2=o._c2,this._f1=o._f1,this.caps=l|n.LATITUDE|n.AZIMUTH|n.LONG_UNROLL,this.lat1=s.LatFix(a),this.lon1=u,typeof c>"u"||typeof f>"u"?(this.azi1=s.AngNormalize(h),p=s.sincosd(s.AngRound(this.azi1)),this.salp1=p.s,this.calp1=p.c):(this.azi1=h,this.salp1=c,this.calp1=f),p=s.sincosd(s.AngRound(this.lat1)),w=this._f1*p.s,v=p.c,p=s.hypot(w,v),w/=p,v/=p,v=Math.max(n.tiny_,v),this._dn1=Math.sqrt(1+o._ep2*s.sq(w)),this._salp0=this.salp1*v,this._calp0=s.hypot(this.calp1,this.salp1*w),this._ssig1=w,this._somg1=this._salp0*w,this._csig1=this._comg1=w!==0||this.calp1!==0?v*this.calp1:1,p=s.hypot(this._ssig1,this._csig1),this._ssig1/=p,this._csig1/=p,this._k2=s.sq(this._calp0)*o._ep2,E=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&n.CAP_C1&&(this._A1m1=n.A1m1f(E),this._C1a=new Array(n.nC1_+1),n.C1f(E,this._C1a),this._B11=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),I=Math.sin(this._B11),y=Math.cos(this._B11),this._stau1=this._ssig1*y+this._csig1*I,this._ctau1=this._csig1*y-this._ssig1*I),this.caps&n.CAP_C1p&&(this._C1pa=new Array(n.nC1p_+1),n.C1pf(E,this._C1pa)),this.caps&n.CAP_C2&&(this._A2m1=n.A2m1f(E),this._C2a=new Array(n.nC2_+1),n.C2f(E,this._C2a),this._B21=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&n.CAP_C3&&(this._C3a=new Array(n.nC3_),o.C3f(E,this._C3a),this._A3c=-this.f*this._salp0*o.A3f(E),this._B31=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&n.CAP_C4&&(this._C4a=new Array(n.nC4_),o.C4f(E,this._C4a),this._A4=s.sq(this.a)*this._calp0*this._salp0*o._e2,this._B41=n.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},i.GeodesicLine.prototype.GenPosition=function(o,a,u){var h={},l,c,f,p,v,w,E,I,y,_,m,S,C,P,b,x,A,N,T,R,V,$,J,st,G,W,k,U,O;return u?u===n.LONG_UNROLL&&(u|=n.STANDARD):u=n.STANDARD,u&=this.caps&n.OUT_MASK,h.lat1=this.lat1,h.azi1=this.azi1,h.lon1=u&n.LONG_UNROLL?this.lon1:s.AngNormalize(this.lon1),o?h.a12=a:h.s12=a,o||this.caps&n.DISTANCE_IN&n.OUT_MASK?(p=0,v=0,o?(l=a*s.degree,W=s.sincosd(a),c=W.s,f=W.c):(I=a/(this._b*(1+this._A1m1)),y=Math.sin(I),_=Math.cos(I),p=-n.SinCosSeries(!0,this._stau1*_+this._ctau1*y,this._ctau1*_-this._stau1*y,this._C1pa),l=I-(p-this._B11),c=Math.sin(l),f=Math.cos(l),Math.abs(this.f)>.01&&(w=this._ssig1*f+this._csig1*c,E=this._csig1*f-this._ssig1*c,p=n.SinCosSeries(!0,w,E,this._C1a),m=(1+this._A1m1)*(l+(p-this._B11))-a/this._b,l=l-m/Math.sqrt(1+this._k2*s.sq(w)),c=Math.sin(l),f=Math.cos(l))),w=this._ssig1*f+this._csig1*c,E=this._csig1*f-this._ssig1*c,$=Math.sqrt(1+this._k2*s.sq(w)),u&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&((o||Math.abs(this.f)>.01)&&(p=n.SinCosSeries(!0,w,E,this._C1a)),v=(1+this._A1m1)*(p-this._B11)),x=this._calp0*w,A=s.hypot(this._salp0,this._calp0*E),A===0&&(A=E=n.tiny_),R=this._salp0,V=this._calp0*E,o&&u&n.DISTANCE&&(h.s12=this._b*((1+this._A1m1)*l+v)),u&n.LONGITUDE&&(N=this._salp0*w,T=E,b=s.copysign(1,this._salp0),S=u&n.LONG_UNROLL?b*(l-(Math.atan2(w,E)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(b*N,T)-Math.atan2(b*this._somg1,this._comg1))):Math.atan2(N*this._comg1-T*this._somg1,T*this._comg1+N*this._somg1),C=S+this._A3c*(l+(n.SinCosSeries(!0,w,E,this._C3a)-this._B31)),P=C/s.degree,h.lon2=u&n.LONG_UNROLL?this.lon1+P:s.AngNormalize(s.AngNormalize(this.lon1)+s.AngNormalize(P))),u&n.LATITUDE&&(h.lat2=s.atan2d(x,this._f1*A)),u&n.AZIMUTH&&(h.azi2=s.atan2d(R,V)),u&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(J=n.SinCosSeries(!0,w,E,this._C2a),st=(1+this._A2m1)*(J-this._B21),G=(this._A1m1-this._A2m1)*l+(v-st),u&n.REDUCEDLENGTH&&(h.m12=this._b*($*(this._csig1*w)-this._dn1*(this._ssig1*E)-this._csig1*E*G)),u&n.GEODESICSCALE&&(W=this._k2*(w-this._ssig1)*(w+this._ssig1)/(this._dn1+$),h.M12=f+(W*w-E*G)*this._ssig1/this._dn1,h.M21=f-(W*this._ssig1-this._csig1*G)*w/$)),u&n.AREA&&(k=n.SinCosSeries(!1,w,E,this._C4a),this._calp0===0||this._salp0===0?(U=R*this.calp1-V*this.salp1,O=V*this.calp1+R*this.salp1):(U=this._calp0*this._salp0*(f<=0?this._csig1*(1-f)+c*this._ssig1:c*(this._csig1*c/(1+f)+this._ssig1)),O=s.sq(this._salp0)+s.sq(this._calp0)*this._csig1*E),h.S12=this._c2*Math.atan2(U,O)+this._A4*(k-this._B41)),o||(h.a12=l/s.degree),h):(h.a12=NaN,h)},i.GeodesicLine.prototype.Position=function(o,a){return this.GenPosition(!1,o,a)},i.GeodesicLine.prototype.ArcPosition=function(o,a){return this.GenPosition(!0,o,a)},i.GeodesicLine.prototype.GenSetDistance=function(o,a){o?this.SetArc(a):this.SetDistance(a)},i.GeodesicLine.prototype.SetDistance=function(o){var a;this.s13=o,a=this.GenPosition(!1,this.s13,n.ARC),this.a13=0+a.a12},i.GeodesicLine.prototype.SetArc=function(o){var a;this.a13=o,a=this.GenPosition(!0,this.a13,n.DISTANCE),this.s13=0+a.s12}}(e.Geodesic,e.GeodesicLine,e.Math),function(n,i,s,o){var a,u,h,l;a=function(c,f){var p=s.AngDiff(c,f).d;return c=s.AngNormalize(c),f=s.AngNormalize(f),p>0&&(c<0&&f>=0||c>0&&f===0)?1:p<0&&c>=0&&f<0?-1:0},u=function(c,f){return c=c%720,f=f%720,(0<=f&&f<360||f<-360?0:1)-(0<=c&&c<360||c<-360?0:1)},h=function(c,f,p,v,w){return c.Remainder(f),p&1&&c.Add((c.Sum()<0?1:-1)*f/2),v||c.Negate(),w?c.Sum()>f/2?c.Add(-f):c.Sum()<=-f/2&&c.Add(+f):c.Sum()>=f?c.Add(-f):c.Sum()<0&&c.Add(+f),0+c.Sum()},l=function(c,f,p,v,w){return c=s.remainder(c,f),p&1&&(c+=(c<0?1:-1)*f/2),v||(c*=-1),w?c>f/2?c-=f:c<=-f/2&&(c+=f):c>=f?c-=f:c<0&&(c+=f),0+c},n.PolygonArea=function(c,f){this._geod=c,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*c._c2,this.polyline=f||!1,this._mask=i.LATITUDE|i.LONGITUDE|i.DISTANCE|(this.polyline?i.NONE:i.AREA|i.LONG_UNROLL),this.polyline||(this._areasum=new o.Accumulator(0)),this._perimetersum=new o.Accumulator(0),this.Clear()},n.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},n.PolygonArea.prototype.AddPoint=function(c,f){var p;this.num===0?(this._lat0=this.lat=c,this._lon0=this.lon=f):(p=this._geod.Inverse(this.lat,this.lon,c,f,this._mask),this._perimetersum.Add(p.s12),this.polyline||(this._areasum.Add(p.S12),this._crossings+=a(this.lon,f)),this.lat=c,this.lon=f),++this.num},n.PolygonArea.prototype.AddEdge=function(c,f){var p;this.num&&(p=this._geod.Direct(this.lat,this.lon,c,f,this._mask),this._perimetersum.Add(f),this.polyline||(this._areasum.Add(p.S12),this._crossings+=u(this.lon,p.lon2)),this.lat=p.lat2,this.lon=p.lon2),++this.num},n.PolygonArea.prototype.Compute=function(c,f){var p={number:this.num},v,w;return this.num<2?(p.perimeter=0,this.polyline||(p.area=0),p):this.polyline?(p.perimeter=this._perimetersum.Sum(),p):(v=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),p.perimeter=this._perimetersum.Sum(v.s12),w=new o.Accumulator(this._areasum),w.Add(v.S12),p.area=h(w,this._area0,this._crossings+a(this.lon,this._lon0),c,f),p)},n.PolygonArea.prototype.TestPoint=function(c,f,p,v){var w={number:this.num+1},E,I,y,_;if(this.num===0)return w.perimeter=0,this.polyline||(w.area=0),w;for(w.perimeter=this._perimetersum.Sum(),I=this.polyline?0:this._areasum.Sum(),y=this._crossings,_=0;_<(this.polyline?1:2);++_)E=this._geod.Inverse(_===0?this.lat:c,_===0?this.lon:f,_!==0?this._lat0:c,_!==0?this._lon0:f,this._mask),w.perimeter+=E.s12,this.polyline||(I+=E.S12,y+=a(_===0?this.lon:f,_!==0?this._lon0:f));return this.polyline||(w.area=l(I,this._area0,y,p,v)),w},n.PolygonArea.prototype.TestEdge=function(c,f,p,v){var w={number:this.num?this.num+1:0},E,I,y;return this.num===0||(w.perimeter=this._perimetersum.Sum()+f,this.polyline)||(I=this._areasum.Sum(),y=this._crossings,E=this._geod.Direct(this.lat,this.lon,c,f,this._mask),I+=E.S12,y+=u(this.lon,E.lon2),y+=a(E.lon2,this._lon0),E=this._geod.Inverse(E.lat2,E.lon2,this._lat0,this._lon0,this._mask),w.perimeter+=E.s12,I+=E.S12,w.area=l(I,this._area0,y,p,v)),w}}(e.PolygonArea,e.Geodesic,e.Math,e.Accumulator),t(e)})(function(t){r.exports?r.exports=t:window.geodesic=t})}(Uc)),Uc.exports}var YE=BE();function JE(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new YE.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function jE(r){var t=r.x,e=r.y,n=Math.sin(r.y),i=Math.cos(r.y),s=it(t-this.long0),o,a,u,h,l,c,f,p,v,w,E,I,y,_,m;return this.sphere?Math.abs(this.sin_p12-1)<=tt?(r.x=this.x0+this.a*(Y-e)*Math.sin(s),r.y=this.y0-this.a*(Y-e)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=tt?(r.x=this.x0+this.a*(Y+e)*Math.sin(s),r.y=this.y0+this.a*(Y+e)*Math.cos(s),r):(v=this.sin_p12*n+this.cos_p12*i*Math.cos(s),f=Math.acos(v),p=f?f/Math.sin(f):1,r.x=this.x0+this.a*p*i*Math.sin(s),r.y=this.y0+this.a*p*(this.cos_p12*n-this.sin_p12*i*Math.cos(s)),r):(o=Ou(this.es),a=Du(this.es),u=Lu(this.es),h=Ru(this.es),Math.abs(this.sin_p12-1)<=tt?(l=this.a*Nr(o,a,u,h,Y),c=this.a*Nr(o,a,u,h,e),r.x=this.x0+(l-c)*Math.sin(s),r.y=this.y0-(l-c)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=tt?(l=this.a*Nr(o,a,u,h,Y),c=this.a*Nr(o,a,u,h,e),r.x=this.x0+(l+c)*Math.sin(s),r.y=this.y0+(l+c)*Math.cos(s),r):Math.abs(t)<tt&&Math.abs(e-this.lat0)<tt?(r.x=r.y=0,r):(w=this.lat0/ae,E=this.long0/ae,I=e/ae,y=t/ae,_=this.g.Inverse(w,E,I,y,this.g.AZIMUTH),m=_.azi1*ae,r.x=_.s12*Math.sin(m),r.y=_.s12*Math.cos(m),r))}function QE(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,o,a,u,h,l,c,f,p,v,w,E,I,y;return this.sphere?(t=Math.sqrt(r.x*r.x+r.y*r.y),t>2*Y*this.a?void 0:(e=t/this.a,n=Math.sin(e),i=Math.cos(e),s=this.long0,Math.abs(t)<=tt?o=this.lat0:(o=Ms(i*this.sin_p12+r.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-Y,Math.abs(a)<=tt?this.lat0>=0?s=it(this.long0+Math.atan2(r.x,-r.y)):s=it(this.long0-Math.atan2(-r.x,r.y)):s=it(this.long0+Math.atan2(r.x*n,t*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=s,r.y=o,r)):(u=Ou(this.es),h=Du(this.es),l=Lu(this.es),c=Ru(this.es),Math.abs(this.sin_p12-1)<=tt?(f=this.a*Nr(u,h,l,c,Y),t=Math.sqrt(r.x*r.x+r.y*r.y),p=f-t,o=$h(p/this.a,u,h,l,c),s=it(this.long0+Math.atan2(r.x,-1*r.y)),r.x=s,r.y=o,r):Math.abs(this.sin_p12+1)<=tt?(f=this.a*Nr(u,h,l,c,Y),t=Math.sqrt(r.x*r.x+r.y*r.y),p=t-f,o=$h(p/this.a,u,h,l,c),s=it(this.long0+Math.atan2(r.x,r.y)),r.x=s,r.y=o,r):(v=this.lat0/ae,w=this.long0/ae,E=Math.atan2(r.x,r.y)/ae,I=Math.sqrt(r.x*r.x+r.y*r.y),y=this.g.Direct(v,w,E,I,this.g.STANDARD),r.x=y.lon2*ae,r.y=y.lat2*ae,r))}var KE=["Azimuthal_Equidistant","aeqd"];const $E={init:JE,forward:jE,inverse:QE,names:KE};function ZE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function tS(r){var t,e,n,i,s,o,a,u,h=r.x,l=r.y;return n=it(h-this.long0),t=Math.sin(l),e=Math.cos(l),i=Math.cos(n),o=this.sin_p14*t+this.cos_p14*e*i,s=1,(o>0||Math.abs(o)<=tt)&&(a=this.a*s*e*Math.sin(n),u=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)),r.x=a,r.y=u,r}function eS(r){var t,e,n,i,s,o,a;return r.x-=this.x0,r.y-=this.y0,t=Math.sqrt(r.x*r.x+r.y*r.y),e=Ms(t/this.a),n=Math.sin(e),i=Math.cos(e),o=this.long0,Math.abs(t)<=tt?(a=this.lat0,r.x=o,r.y=a,r):(a=Ms(i*this.sin_p14+r.y*n*this.cos_p14/t),s=Math.abs(this.lat0)-Y,Math.abs(s)<=tt?(this.lat0>=0?o=it(this.long0+Math.atan2(r.x,-r.y)):o=it(this.long0-Math.atan2(-r.x,r.y)),r.x=o,r.y=a,r):(o=it(this.long0+Math.atan2(r.x*n,t*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=o,r.y=a,r))}var rS=["ortho"];const nS={init:ZE,forward:tS,inverse:eS,names:rS};var Se={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ee={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function iS(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Y-te/2?this.face=Se.TOP:this.lat0<=-(Y-te/2)?this.face=Se.BOTTOM:Math.abs(this.long0)<=te?this.face=Se.FRONT:Math.abs(this.long0)<=Y+te?this.face=this.long0>0?Se.RIGHT:Se.LEFT:this.face=Se.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function sS(r){var t={x:0,y:0},e,n,i,s,o,a,u={value:0};if(r.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):e=r.y,n=r.x,this.face===Se.TOP)s=Y-e,n>=te&&n<=Y+te?(u.value=ee.AREA_0,i=n-Y):n>Y+te||n<=-(Y+te)?(u.value=ee.AREA_1,i=n>0?n-rr:n+rr):n>-(Y+te)&&n<=-te?(u.value=ee.AREA_2,i=n+Y):(u.value=ee.AREA_3,i=n);else if(this.face===Se.BOTTOM)s=Y+e,n>=te&&n<=Y+te?(u.value=ee.AREA_0,i=-n+Y):n<te&&n>=-te?(u.value=ee.AREA_1,i=-n):n<-te&&n>=-(Y+te)?(u.value=ee.AREA_2,i=-n-Y):(u.value=ee.AREA_3,i=n>0?-n+rr:-n-rr);else{var h,l,c,f,p,v,w;this.face===Se.RIGHT?n=oa(n,+Y):this.face===Se.BACK?n=oa(n,3.14159265359):this.face===Se.LEFT&&(n=oa(n,-Y)),f=Math.sin(e),p=Math.cos(e),v=Math.sin(n),w=Math.cos(n),h=p*w,l=p*v,c=f,this.face===Se.FRONT?(s=Math.acos(h),i=Zh(s,c,l,u)):this.face===Se.RIGHT?(s=Math.acos(l),i=Zh(s,c,-h,u)):this.face===Se.BACK?(s=Math.acos(-h),i=Zh(s,c,-l,u)):this.face===Se.LEFT?(s=Math.acos(-l),i=Zh(s,c,h,u)):(s=i=0,u.value=ee.AREA_0)}return a=Math.atan(12/rr*(i+Math.acos(Math.sin(i)*Math.cos(te))-Y)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(i))))),u.value===ee.AREA_1?a+=Y:u.value===ee.AREA_2?a+=rr:u.value===ee.AREA_3&&(a+=1.5*rr),t.x=o*Math.cos(a),t.y=o*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,r.x=t.x,r.y=t.y,r}function oS(r){var t={lam:0,phi:0},e,n,i,s,o,a,u,h,l,c={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),e=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?c.value=ee.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(c.value=ee.AREA_1,e-=Y):r.x<0&&-r.x>=Math.abs(r.y)?(c.value=ee.AREA_2,e=e<0?e+rr:e-rr):(c.value=ee.AREA_3,e+=Y),l=rr/12*Math.tan(e),o=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(o),i=Math.cos(e),s=Math.tan(n),u=1-i*i*s*s*(1-Math.cos(Math.atan(1/Math.cos(a)))),u<-1?u=-1:u>1&&(u=1),this.face===Se.TOP)h=Math.acos(u),t.phi=Y-h,c.value===ee.AREA_0?t.lam=a+Y:c.value===ee.AREA_1?t.lam=a<0?a+rr:a-rr:c.value===ee.AREA_2?t.lam=a-Y:t.lam=a;else if(this.face===Se.BOTTOM)h=Math.acos(u),t.phi=h-Y,c.value===ee.AREA_0?t.lam=-a+Y:c.value===ee.AREA_1?t.lam=-a:c.value===ee.AREA_2?t.lam=-a-Y:t.lam=a<0?-a-rr:-a+rr;else{var f,p,v;f=u,l=f*f,l>=1?v=0:v=Math.sqrt(1-l)*Math.sin(a),l+=v*v,l>=1?p=0:p=Math.sqrt(1-l),c.value===ee.AREA_1?(l=p,p=-v,v=l):c.value===ee.AREA_2?(p=-p,v=-v):c.value===ee.AREA_3&&(l=p,p=v,v=-l),this.face===Se.RIGHT?(l=f,f=-p,p=l):this.face===Se.BACK?(f=-f,p=-p):this.face===Se.LEFT&&(l=f,f=p,p=-l),t.phi=Math.acos(-v)-Y,t.lam=Math.atan2(p,f),this.face===Se.RIGHT?t.lam=oa(t.lam,-Y):this.face===Se.BACK?t.lam=oa(t.lam,-3.14159265359):this.face===Se.LEFT&&(t.lam=oa(t.lam,+Y))}if(this.es!==0){var w,E,I;w=t.phi<0?1:0,E=Math.tan(t.phi),I=this.b/Math.sqrt(E*E+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-I*I)/(this.one_minus_f*I)),w&&(t.phi=-t.phi)}return t.lam+=this.long0,r.x=t.lam,r.y=t.phi,r}function Zh(r,t,e,n){var i;return r<tt?(n.value=ee.AREA_0,i=0):(i=Math.atan2(t,e),Math.abs(i)<=te?n.value=ee.AREA_0:i>te&&i<=Y+te?(n.value=ee.AREA_1,i-=Y):i>Y+te||i<=-(Y+te)?(n.value=ee.AREA_2,i=i>=0?i-rr:i+rr):(n.value=ee.AREA_3,i+=Y)),i}function oa(r,t){var e=r+t;return e<-3.14159265359?e+=Mu:e>3.14159265359&&(e-=Mu),e}var aS=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const uS={init:iS,forward:sS,inverse:oS,names:aS};var zc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Fu=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Up=.8487,zp=1.3523,qp=Si/5,hS=1/qp,aa=18,tl=function(r,t){return r[0]+t*(r[1]+t*(r[2]+t*r[3]))},lS=function(r,t){return r[1]+t*(2*r[2]+t*3*r[3])};function cS(r,t,e,n){for(var i=t;n;--n){var s=r(i);if(i-=s,Math.abs(s)<e)break}return i}function fS(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function dS(r){var t=it(r.x-this.long0),e=Math.abs(r.y),n=Math.floor(e*qp);n<0?n=0:n>=aa&&(n=aa-1),e=Si*(e-hS*n);var i={x:tl(zc[n],e)*t,y:tl(Fu[n],e)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*Up+this.x0,i.y=i.y*this.a*zp+this.y0,i}function gS(r){var t={x:(r.x-this.x0)/(this.a*Up),y:Math.abs(r.y-this.y0)/(this.a*zp)};if(t.y>=1)t.x/=zc[aa][0],t.y=r.y<0?-Y:Y;else{var e=Math.floor(t.y*aa);for(e<0?e=0:e>=aa&&(e=aa-1);;)if(Fu[e][0]>t.y)--e;else if(Fu[e+1][0]<=t.y)++e;else break;var n=Fu[e],i=5*(t.y-n[0])/(Fu[e+1][0]-n[0]);i=cS(function(s){return(tl(n,s)-t.y)/lS(n,s)},i,tt,100),t.x/=tl(zc[e],i),t.y=(5*e+i)*ae,r.y<0&&(t.y=-t.y)}return t.x=it(t.x+this.long0),t}var pS=["Robinson","robin"];const vS={init:fS,forward:dS,inverse:gS,names:pS};function mS(){this.name="geocent"}function yS(r){var t=pp(r,this.es,this.a);return t}function _S(r){var t=vp(r,this.es,this.a,this.b);return t}var wS=["Geocentric","geocentric","geocent","Geocent"];const ES={init:mS,forward:yS,inverse:_S,names:wS};var fr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Gu={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function SS(){if(Object.keys(Gu).forEach((function(e){if(typeof this[e]>"u")this[e]=Gu[e].def;else{if(Gu[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Gu[e].num&&(this[e]=parseFloat(this[e]))}Gu[e].degrees&&(this[e]=this[e]*ae)}).bind(this)),Math.abs(Math.abs(this.lat0)-Y)<tt?this.mode=this.lat0<0?fr.S_POLE:fr.N_POLE:Math.abs(this.lat0)<tt?this.mode=fr.EQUIT:(this.mode=fr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var r=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(r),this.sw=Math.sin(r)}function CS(r){r.x-=this.long0;var t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i,s;switch(this.mode){case fr.OBLIQ:s=this.sinph0*t+this.cosph0*e*n;break;case fr.EQUIT:s=e*n;break;case fr.S_POLE:s=-t;break;case fr.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),i=s*e*Math.sin(r.x),this.mode){case fr.OBLIQ:s*=this.cosph0*t-this.sinph0*e*n;break;case fr.EQUIT:s*=t;break;case fr.N_POLE:s*=-(e*n);break;case fr.S_POLE:s*=e*n;break}var o,a;return o=s*this.cg+i*this.sg,a=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-s*this.sg)*this.cw*a,s=o*a,r.x=i*this.a,r.y=s*this.a,r}function PS(r){r.x/=this.a,r.y/=this.a;var t={x:r.x,y:r.y},e,n,i;i=1/(this.pn1-r.y*this.sw),e=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=e*this.cg+n*this.sg,r.y=n*this.cg-e*this.sg;var s=qr(r.x,r.y);if(Math.abs(s)<tt)t.x=0,t.y=r.y;else{var o,a;switch(a=1-s*s*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/s+s/this.pn1),o=Math.sqrt(1-a*a),this.mode){case fr.OBLIQ:t.y=Math.asin(o*this.sinph0+r.y*a*this.cosph0/s),r.y=(o-this.sinph0*Math.sin(t.y))*s,r.x*=a*this.cosph0;break;case fr.EQUIT:t.y=Math.asin(r.y*a/s),r.y=o*s,r.x*=a;break;case fr.N_POLE:t.y=Math.asin(o),r.y=-r.y;break;case fr.S_POLE:t.y=-Math.asin(o);break}t.x=Math.atan2(r.x,r.y)}return r.x=t.x+this.long0,r.y=t.y,r}var IS=["Tilted_Perspective","tpers"];const MS={init:SS,forward:CS,inverse:PS,names:IS};function bS(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var r=1-this.es,t=1/r;this.radius_p=Math.sqrt(r),this.radius_p2=r,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function NS(r){var t=r.x,e=r.y,n,i,s,o;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/qr(this.radius_p*Math.cos(e),Math.sin(e));if(i=a*Math.cos(t)*Math.cos(e),s=a*Math.sin(t)*Math.cos(e),o=a*Math.sin(e),(this.radius_g-i)*i-s*s-o*o*this.radius_p_inv2<0)return r.x=Number.NaN,r.y=Number.NaN,r;n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/qr(o,n)),r.y=this.radius_g_1*Math.atan(o/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(o/qr(s,n)))}else this.shape==="sphere"&&(n=Math.cos(e),i=Math.cos(t)*n,s=Math.sin(t)*n,o=Math.sin(e),n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/qr(o,n)),r.y=this.radius_g_1*Math.atan(o/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(o/qr(s,n))));return r.x=r.x*this.a,r.y=r.y*this.a,r}function xS(r){var t=-1,e=0,n=0,i,s,o,a;if(r.x=r.x/this.a,r.y=r.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*qr(1,n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*qr(1,e));var u=n/this.radius_p;if(i=e*e+u*u+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return r.x=Number.NaN,r.y=Number.NaN,r;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,n*=a,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t),r.y=Math.atan(this.radius_p_inv2*Math.tan(r.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*Math.sqrt(1+e*e)),i=e*e+n*n+t*t,s=2*this.radius_g*t,o=s*s-4*i*this.C,o<0)return r.x=Number.NaN,r.y=Number.NaN,r;a=(-s-Math.sqrt(o))/(2*i),t=this.radius_g+a*t,e*=a,n*=a,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t)}return r.x=r.x+this.long0,r}var TS=["Geostationary Satellite View","Geostationary_Satellite","geos"];const AS={init:bS,forward:NS,inverse:xS,names:TS};var ku=1.340264,Vu=-.081106,Uu=893e-6,zu=.003796,el=Math.sqrt(3)/2;function OS(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function DS(r){var t=it(r.x-this.long0),e=r.y,n=Math.asin(el*Math.sin(e)),i=n*n,s=i*i*i;return r.x=t*Math.cos(n)/(el*(ku+3*Vu*i+s*(7*Uu+9*zu*i))),r.y=n*(ku+Vu*i+s*(Uu+zu*i)),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function LS(r){r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a;var t=1e-9,e=12,n=r.y,i,s,o,a,u,h;for(h=0;h<e&&(i=n*n,s=i*i*i,o=n*(ku+Vu*i+s*(Uu+zu*i))-r.y,a=ku+3*Vu*i+s*(7*Uu+9*zu*i),n-=u=o/a,!(Math.abs(u)<t));++h);return i=n*n,s=i*i*i,r.x=el*r.x*(ku+3*Vu*i+s*(7*Uu+9*zu*i))/Math.cos(n),r.y=Math.asin(Math.sin(n)/el),r.x=it(r.x+this.long0),r}var RS=["eqearth","Equal Earth","Equal_Earth"];const FS={init:OS,forward:DS,inverse:LS,names:RS};var qu=1e-10;function GS(){var r;if(this.phi1=this.lat1,Math.abs(this.phi1)<qu)throw new Error;this.es?(this.en=Lc(this.es),this.m1=ia(this.phi1,this.am1=Math.sin(this.phi1),r=Math.cos(this.phi1),this.en),this.am1=r/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=VS,this.forward=kS):(Math.abs(this.phi1)+qu>=Y?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=zS,this.forward=US)}function kS(r){var t=it(r.x-(this.long0||0)),e=r.y,n,i,s;return n=this.am1+this.m1-ia(e,i=Math.sin(e),s=Math.cos(e),this.en),i=s*t/(n*Math.sqrt(1-this.es*i*i)),r.x=n*Math.sin(i),r.y=this.am1-n*Math.cos(i),r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function VS(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n,i;if(e=qr(r.x,r.y=this.am1-r.y),i=Rc(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(i))<Y)t=Math.sin(i),n=e*Math.atan2(r.x,r.y)*Math.sqrt(1-this.es*t*t)/Math.cos(i);else if(Math.abs(t-Y)<=qu)n=0;else throw new Error;return r.x=it(n+(this.long0||0)),r.y=Ps(i),r}function US(r){var t=it(r.x-(this.long0||0)),e=r.y,n,i;return i=this.cphi1+this.phi1-e,Math.abs(i)>qu?(r.x=i*Math.sin(n=t*Math.cos(e)/i),r.y=this.cphi1-i*Math.cos(n)):r.x=r.y=0,r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function zS(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n=qr(r.x,r.y=this.cphi1-r.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>Y)throw new Error;return Math.abs(Math.abs(e)-Y)<=qu?t=0:t=n*Math.atan2(r.x,r.y)/Math.cos(e),r.x=it(t+(this.long0||0)),r.y=Ps(e),r}var qS=["bonne","Bonne (Werner lat_1=90)"];const WS={init:GS,names:qS};function XS(r){r.Proj.projections.add(Qh),r.Proj.projections.add(Kh),r.Proj.projections.add(F1),r.Proj.projections.add(H1),r.Proj.projections.add(K1),r.Proj.projections.add(rw),r.Proj.projections.add(uw),r.Proj.projections.add(dw),r.Proj.projections.add(yw),r.Proj.projections.add(Cw),r.Proj.projections.add(Uw),r.Proj.projections.add(Bw),r.Proj.projections.add(Kw),r.Proj.projections.add(nE),r.Proj.projections.add(uE),r.Proj.projections.add(dE),r.Proj.projections.add(yE),r.Proj.projections.add(CE),r.Proj.projections.add(xE),r.Proj.projections.add(LE),r.Proj.projections.add(VE),r.Proj.projections.add(XE),r.Proj.projections.add($E),r.Proj.projections.add(nS),r.Proj.projections.add(uS),r.Proj.projections.add(vS),r.Proj.projections.add(ES),r.Proj.projections.add(MS),r.Proj.projections.add(AS),r.Proj.projections.add(FS),r.Proj.projections.add(WS)}Ur.defaultDatum="WGS84",Ur.Proj=Pi,Ur.WGS84=new Ur.Proj("WGS84"),Ur.Point=na,Ur.toPoint=wp,Ur.defs=br,Ur.nadgrid=F_,Ur.transform=jh,Ur.mgrs=t1,Ur.version="__VERSION__",XS(Ur);const Wp=Ur("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function Ii(r){return Wp.forward(r)}function Xp(r){return Wp.inverse(r)}const Hp=Ur("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function HS(r){const t=Hp.forward([r[0],r[1]]);return[t[0],t[1],r[2]]}function BS(r){const t=Hp.inverse([r[0],r[1]]);return[t[0],t[1],r[2]]}var nr=63710088e-1,Bp={centimeters:nr*100,centimetres:nr*100,degrees:nr/111325,feet:nr*3.28084,inches:nr*39.37,kilometers:nr/1e3,kilometres:nr/1e3,meters:nr,metres:nr,miles:nr/1609.344,millimeters:nr*1e3,millimetres:nr*1e3,nauticalmiles:nr/1852,radians:1,yards:nr*1.0936};function Kn(r,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=r,n}function ie(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Yp(r[0])||!Yp(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return Kn(n,t,e)}function dr(r,t,e){e===void 0&&(e={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:r};return Kn(a,t,e)}function $n(r,t,e){if(e===void 0&&(e={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return Kn(n,t,e)}function ua(r,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=r,e}function qc(r,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:r};return Kn(n,t,e)}function Wc(r,t){t===void 0&&(t="kilometers");var e=Bp[t];if(!e)throw new Error(t+" units is invalid");return r*e}function Xc(r,t){t===void 0&&(t="kilometers");var e=Bp[t];if(!e)throw new Error(t+" units is invalid");return r/e}function rl(r){var t=r%(2*Math.PI);return t*180/Math.PI}function gr(r){var t=r%360;return t*Math.PI/180}function Hc(r,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(r>=0))throw new Error("length must be a positive number");return Wc(Xc(r,t),e)}function Yp(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function ha(r,t,e){if(r!==null)for(var n,i,s,o,a,u,h,l=0,c=0,f,p=r.type,v=p==="FeatureCollection",w=p==="Feature",E=v?r.features.length:1,I=0;I<E;I++){h=v?r.features[I].geometry:w?r.geometry:r,f=h?h.type==="GeometryCollection":!1,a=f?h.geometries.length:1;for(var y=0;y<a;y++){var _=0,m=0;if(o=f?h.geometries[y]:h,o!==null){u=o.coordinates;var S=o.type;switch(l=e&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(t(u,c,I,_,m)===!1)return!1;c++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(t(u[n],c,I,_,m)===!1)return!1;c++,S==="MultiPoint"&&_++}S==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-l;i++){if(t(u[n][i],c,I,_,m)===!1)return!1;c++}S==="MultiLineString"&&_++,S==="Polygon"&&m++}S==="Polygon"&&_++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(m=0,i=0;i<u[n].length;i++){for(s=0;s<u[n][i].length-l;s++){if(t(u[n][i][s],c,I,_,m)===!1)return!1;c++}m++}_++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(ha(o.geometries[n],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function nl(r,t){if(r.type==="Feature")t(r,0);else if(r.type==="FeatureCollection")for(var e=0;e<r.features.length&&t(r.features[e],e)!==!1;e++);}function il(r,t){var e,n,i,s,o,a,u,h,l,c,f=0,p=r.type==="FeatureCollection",v=r.type==="Feature",w=p?r.features.length:1;for(e=0;e<w;e++){for(a=p?r.features[e].geometry:v?r.geometry:r,h=p?r.features[e].properties:v?r.properties:{},l=p?r.features[e].bbox:v?r.bbox:void 0,c=p?r.features[e].id:v?r.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,f,h,l,c)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,f,h,l,c)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(t(s.geometries[n],f,h,l,c)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function YS(r,t,e){var n=e;return il(r,function(i,s,o,a,u){n=t(n,i,s,o,a,u)}),n}function Bc(r,t){il(r,function(e,n,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(Kn(e,i,{bbox:s,id:o}),n,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var h=0;h<e.coordinates.length;h++){var l=e.coordinates[h],c={type:u,coordinates:l};if(t(Kn(c,i),n,h)===!1)return!1}})}function JS(r,t){Bc(r,function(e,n,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,h=0,l=0;if(ha(e,function(c,f,p,v,w){if(a===void 0||n>u||v>h||w>l){a=c,u=n,h=v,l=w,s=0;return}var E=$n([a,c],e.properties);if(t(E,n,i,w,s)===!1)return!1;s++,a=c})===!1)return!1}}})}function Zn(r){var t=[1/0,1/0,-1/0,-1/0];return ha(r,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}Zn.default=Zn;function xr(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function lo(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Jp(r,t,e){if(!r)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!r.geometry||r.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+r.geometry.type)}function en(r){return r.type==="Feature"?r.geometry:r}function jS(r,t){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}var sl={exports:{}},ol={exports:{}},QS=ol.exports,jp;function Qp(){return jp||(jp=1,function(r,t){(function(e,n){r.exports=n()})(QS,function(){function e(y,_,m,S,C){(function P(b,x,A,N,T){for(;N>A;){if(N-A>600){var R=N-A+1,V=x-A+1,$=Math.log(R),J=.5*Math.exp(2*$/3),st=.5*Math.sqrt($*J*(R-J)/R)*(V-R/2<0?-1:1),G=Math.max(A,Math.floor(x-V*J/R+st)),W=Math.min(N,Math.floor(x+(R-V)*J/R+st));P(b,x,G,W,T)}var k=b[x],U=A,O=N;for(n(b,A,x),T(b[N],k)>0&&n(b,A,N);U<O;){for(n(b,U,O),U++,O--;T(b[U],k)<0;)U++;for(;T(b[O],k)>0;)O--}T(b[A],k)===0?n(b,A,O):n(b,++O,N),O<=x&&(A=O+1),x<=O&&(N=O-1)}})(y,_,m||0,S||y.length-1,C||i)}function n(y,_,m){var S=y[_];y[_]=y[m],y[m]=S}function i(y,_){return y<_?-1:y>_?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(y,_,m){if(!m)return _.indexOf(y);for(var S=0;S<_.length;S++)if(m(y,_[S]))return S;return-1}function a(y,_){u(y,0,y.children.length,_,y)}function u(y,_,m,S,C){C||(C=E(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var P=_;P<m;P++){var b=y.children[P];h(C,y.leaf?S(b):b)}return C}function h(y,_){return y.minX=Math.min(y.minX,_.minX),y.minY=Math.min(y.minY,_.minY),y.maxX=Math.max(y.maxX,_.maxX),y.maxY=Math.max(y.maxY,_.maxY),y}function l(y,_){return y.minX-_.minX}function c(y,_){return y.minY-_.minY}function f(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function p(y){return y.maxX-y.minX+(y.maxY-y.minY)}function v(y,_){return y.minX<=_.minX&&y.minY<=_.minY&&_.maxX<=y.maxX&&_.maxY<=y.maxY}function w(y,_){return _.minX<=y.maxX&&_.minY<=y.maxY&&_.maxX>=y.minX&&_.maxY>=y.minY}function E(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function I(y,_,m,S,C){for(var P=[_,m];P.length;)if(!((m=P.pop())-(_=P.pop())<=S)){var b=_+Math.ceil((m-_)/S/2)*S;e(y,b,_,m,C),P.push(_,b,b,m)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var _=this.data,m=[];if(!w(y,_))return m;for(var S=this.toBBox,C=[];_;){for(var P=0;P<_.children.length;P++){var b=_.children[P],x=_.leaf?S(b):b;w(y,x)&&(_.leaf?m.push(b):v(y,x)?this._all(b,m):C.push(b))}_=C.pop()}return m},s.prototype.collides=function(y){var _=this.data;if(!w(y,_))return!1;for(var m=[];_;){for(var S=0;S<_.children.length;S++){var C=_.children[S],P=_.leaf?this.toBBox(C):C;if(w(y,P)){if(_.leaf||v(y,P))return!0;m.push(C)}}_=m.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var _=0;_<y.length;_++)this.insert(y[_]);return this}var m=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===m.height)this._splitRoot(this.data,m);else{if(this.data.height<m.height){var S=this.data;this.data=m,m=S}this._insert(m,this.data.height-m.height-1,!0)}else this.data=m;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=E([]),this},s.prototype.remove=function(y,_){if(!y)return this;for(var m,S,C,P=this.data,b=this.toBBox(y),x=[],A=[];P||x.length;){if(P||(P=x.pop(),S=x[x.length-1],m=A.pop(),C=!0),P.leaf){var N=o(y,P.children,_);if(N!==-1)return P.children.splice(N,1),x.push(P),this._condense(x),this}C||P.leaf||!v(P,b)?S?(m++,P=S.children[m],C=!1):P=null:(x.push(P),A.push(m),m=0,S=P,P=P.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,_){return y.minX-_.minX},s.prototype.compareMinY=function(y,_){return y.minY-_.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,_){for(var m=[];y;)y.leaf?_.push.apply(_,y.children):m.push.apply(m,y.children),y=m.pop();return _},s.prototype._build=function(y,_,m,S){var C,P=m-_+1,b=this._maxEntries;if(P<=b)return a(C=E(y.slice(_,m+1)),this.toBBox),C;S||(S=Math.ceil(Math.log(P)/Math.log(b)),b=Math.ceil(P/Math.pow(b,S-1))),(C=E([])).leaf=!1,C.height=S;var x=Math.ceil(P/b),A=x*Math.ceil(Math.sqrt(b));I(y,_,m,A,this.compareMinX);for(var N=_;N<=m;N+=A){var T=Math.min(N+A-1,m);I(y,N,T,x,this.compareMinY);for(var R=N;R<=T;R+=x){var V=Math.min(R+x-1,T);C.children.push(this._build(y,R,V,S-1))}}return a(C,this.toBBox),C},s.prototype._chooseSubtree=function(y,_,m,S){for(;S.push(_),!_.leaf&&S.length-1!==m;){for(var C=1/0,P=1/0,b=void 0,x=0;x<_.children.length;x++){var A=_.children[x],N=f(A),T=(R=y,V=A,(Math.max(V.maxX,R.maxX)-Math.min(V.minX,R.minX))*(Math.max(V.maxY,R.maxY)-Math.min(V.minY,R.minY))-N);T<P?(P=T,C=N<C?N:C,b=A):T===P&&N<C&&(C=N,b=A)}_=b||_.children[0]}var R,V;return _},s.prototype._insert=function(y,_,m){var S=m?y:this.toBBox(y),C=[],P=this._chooseSubtree(S,this.data,_,C);for(P.children.push(y),h(P,S);_>=0&&C[_].children.length>this._maxEntries;)this._split(C,_),_--;this._adjustParentBBoxes(S,C,_)},s.prototype._split=function(y,_){var m=y[_],S=m.children.length,C=this._minEntries;this._chooseSplitAxis(m,C,S);var P=this._chooseSplitIndex(m,C,S),b=E(m.children.splice(P,m.children.length-P));b.height=m.height,b.leaf=m.leaf,a(m,this.toBBox),a(b,this.toBBox),_?y[_-1].children.push(b):this._splitRoot(m,b)},s.prototype._splitRoot=function(y,_){this.data=E([y,_]),this.data.height=y.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,_,m){for(var S,C,P,b,x,A,N,T=1/0,R=1/0,V=_;V<=m-_;V++){var $=u(y,0,V,this.toBBox),J=u(y,V,m,this.toBBox),st=(C=$,P=J,b=void 0,x=void 0,A=void 0,N=void 0,b=Math.max(C.minX,P.minX),x=Math.max(C.minY,P.minY),A=Math.min(C.maxX,P.maxX),N=Math.min(C.maxY,P.maxY),Math.max(0,A-b)*Math.max(0,N-x)),G=f($)+f(J);st<T?(T=st,S=V,R=G<R?G:R):st===T&&G<R&&(R=G,S=V)}return S||m-_},s.prototype._chooseSplitAxis=function(y,_,m){var S=y.leaf?this.compareMinX:l,C=y.leaf?this.compareMinY:c;this._allDistMargin(y,_,m,S)<this._allDistMargin(y,_,m,C)&&y.children.sort(S)},s.prototype._allDistMargin=function(y,_,m,S){y.children.sort(S);for(var C=this.toBBox,P=u(y,0,_,C),b=u(y,m-_,m,C),x=p(P)+p(b),A=_;A<m-_;A++){var N=y.children[A];h(P,y.leaf?C(N):N),x+=p(P)}for(var T=m-_-1;T>=_;T--){var R=y.children[T];h(b,y.leaf?C(R):R),x+=p(b)}return x},s.prototype._adjustParentBBoxes=function(y,_,m){for(var S=m;S>=0;S--)h(_[S],y)},s.prototype._condense=function(y){for(var _=y.length-1,m=void 0;_>=0;_--)y[_].children.length===0?_>0?(m=y[_-1].children).splice(m.indexOf(y[_]),1):this.clear():a(y[_],this.toBBox)},s})}(ol)),ol.exports}class KS{constructor(t=[],e=$S){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(n(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1,a=e[o];const u=o+1;if(u<this.length&&n(e[u],a)<0&&(o=u,a=e[u]),n(a,s)>=0)break;e[t]=a,t=o}e[t]=s}}function $S(r,t){return r<t?-1:r>t?1:0}const ZS=HE(Object.freeze(Object.defineProperty({__proto__:null,default:KS},Symbol.toStringTag,{value:"Module"})));var Wu={exports:{}},Yc,Kp;function tC(){return Kp||(Kp=1,Yc=function(t,e,n,i){var s=t[0],o=t[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var u=(i-n)/2,h=0,l=u-1;h<u;l=h++){var c=e[n+h*2+0],f=e[n+h*2+1],p=e[n+l*2+0],v=e[n+l*2+1],w=f>o!=v>o&&s<(p-c)*(o-f)/(v-f)+c;w&&(a=!a)}return a}),Yc}var Jc,$p;function eC(){return $p||($p=1,Jc=function(t,e,n,i){var s=t[0],o=t[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var u=i-n,h=0,l=u-1;h<u;l=h++){var c=e[h+n][0],f=e[h+n][1],p=e[l+n][0],v=e[l+n][1],w=f>o!=v>o&&s<(p-c)*(o-f)/(v-f)+c;w&&(a=!a)}return a}),Jc}var Zp;function rC(){if(Zp)return Wu.exports;Zp=1;var r=tC(),t=eC();return Wu.exports=function(n,i,s,o){return i.length>0&&Array.isArray(i[0])?t(n,i,s,o):r(n,i,s,o)},Wu.exports.nested=t,Wu.exports.flat=r,Wu.exports}var Xu={exports:{}},nC=Xu.exports,t0;function iC(){return t0||(t0=1,function(r,t){(function(e,n){n(t)})(nC,function(e){const i=33306690738754706e-32;function s(w,E,I,y,_){let m,S,C,P,b=E[0],x=y[0],A=0,N=0;x>b==x>-b?(m=b,b=E[++A]):(m=x,x=y[++N]);let T=0;if(A<w&&N<I)for(x>b==x>-b?(C=m-((S=b+m)-b),b=E[++A]):(C=m-((S=x+m)-x),x=y[++N]),m=S,C!==0&&(_[T++]=C);A<w&&N<I;)x>b==x>-b?(C=m-((S=m+b)-(P=S-m))+(b-P),b=E[++A]):(C=m-((S=m+x)-(P=S-m))+(x-P),x=y[++N]),m=S,C!==0&&(_[T++]=C);for(;A<w;)C=m-((S=m+b)-(P=S-m))+(b-P),b=E[++A],m=S,C!==0&&(_[T++]=C);for(;N<I;)C=m-((S=m+x)-(P=S-m))+(x-P),x=y[++N],m=S,C!==0&&(_[T++]=C);return m===0&&T!==0||(_[T++]=m),T}function o(w){return new Float64Array(w)}const a=33306690738754716e-32,u=22204460492503146e-32,h=11093356479670487e-47,l=o(4),c=o(8),f=o(12),p=o(16),v=o(4);e.orient2d=function(w,E,I,y,_,m){const S=(E-m)*(I-_),C=(w-_)*(y-m),P=S-C;if(S===0||C===0||S>0!=C>0)return P;const b=Math.abs(S+C);return Math.abs(P)>=a*b?P:-function(x,A,N,T,R,V,$){let J,st,G,W,k,U,O,q,H,et,ht,rt,_t,nt,Ct,It,Q,wt;const bt=x-R,Lt=N-R,Xt=A-V,Ht=T-V;k=(Ct=(q=bt-(O=(U=134217729*bt)-(U-bt)))*(et=Ht-(H=(U=134217729*Ht)-(U-Ht)))-((nt=bt*Ht)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=Xt-(O=(U=134217729*Xt)-(U-Xt)))*(et=Lt-(H=(U=134217729*Lt)-(U-Lt)))-((It=Xt*Lt)-O*H-q*H-O*et))),l[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),l[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,l[2]=rt-(wt-k)+(ht-k),l[3]=wt;let Qt=function(kt,me){let Ae=me[0];for(let Bn=1;Bn<kt;Bn++)Ae+=me[Bn];return Ae}(4,l),fe=u*$;if(Qt>=fe||-Qt>=fe||(J=x-(bt+(k=x-bt))+(k-R),G=N-(Lt+(k=N-Lt))+(k-R),st=A-(Xt+(k=A-Xt))+(k-V),W=T-(Ht+(k=T-Ht))+(k-V),J===0&&st===0&&G===0&&W===0)||(fe=h*$+i*Math.abs(Qt),(Qt+=bt*W+Ht*J-(Xt*G+Lt*st))>=fe||-Qt>=fe))return Qt;k=(Ct=(q=J-(O=(U=134217729*J)-(U-J)))*(et=Ht-(H=(U=134217729*Ht)-(U-Ht)))-((nt=J*Ht)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=st-(O=(U=134217729*st)-(U-st)))*(et=Lt-(H=(U=134217729*Lt)-(U-Lt)))-((It=st*Lt)-O*H-q*H-O*et))),v[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),v[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,v[2]=rt-(wt-k)+(ht-k),v[3]=wt;const Ue=s(4,l,4,v,c);k=(Ct=(q=bt-(O=(U=134217729*bt)-(U-bt)))*(et=W-(H=(U=134217729*W)-(U-W)))-((nt=bt*W)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=Xt-(O=(U=134217729*Xt)-(U-Xt)))*(et=G-(H=(U=134217729*G)-(U-G)))-((It=Xt*G)-O*H-q*H-O*et))),v[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),v[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,v[2]=rt-(wt-k)+(ht-k),v[3]=wt;const Bt=s(Ue,c,4,v,f);k=(Ct=(q=J-(O=(U=134217729*J)-(U-J)))*(et=W-(H=(U=134217729*W)-(U-W)))-((nt=J*W)-O*H-q*H-O*et))-(ht=Ct-(Q=(q=st-(O=(U=134217729*st)-(U-st)))*(et=G-(H=(U=134217729*G)-(U-G)))-((It=st*G)-O*H-q*H-O*et))),v[0]=Ct-(ht+k)+(k-Q),k=(_t=nt-((rt=nt+ht)-(k=rt-nt))+(ht-k))-(ht=_t-It),v[1]=_t-(ht+k)+(k-It),k=(wt=rt+ht)-rt,v[2]=rt-(wt-k)+(ht-k),v[3]=wt;const Ft=s(Bt,f,4,v,p);return p[Ft-1]}(w,E,I,y,_,m,b)},e.orient2dfast=function(w,E,I,y,_,m){return(E-m)*(I-_)-(w-_)*(y-m)},Object.defineProperty(e,"__esModule",{value:!0})})}(Xu,Xu.exports)),Xu.exports}var e0;function sC(){if(e0)return sl.exports;e0=1;var r=Qp(),t=ZS,e=rC(),n=iC().orient2d;t.default&&(t=t.default),sl.exports=i,sl.exports.default=i;function i(m,S,C){S=Math.max(0,S===void 0?2:S),C=C||0;var P=p(m),b=new r(16);b.toBBox=function(O){return{minX:O[0],minY:O[1],maxX:O[0],maxY:O[1]}},b.compareMinX=function(O,q){return O[0]-q[0]},b.compareMinY=function(O,q){return O[1]-q[1]},b.load(m);for(var x=[],A=0,N;A<P.length;A++){var T=P[A];b.remove(T),N=v(T,N),x.push(N)}var R=new r(16);for(A=0;A<x.length;A++)R.insert(f(x[A]));for(var V=S*S,$=C*C;x.length;){var J=x.shift(),st=J.p,G=J.next.p,W=w(st,G);if(!(W<$)){var k=W/V;T=s(b,J.prev.p,st,G,J.next.next.p,k,R),T&&Math.min(w(T,st),w(T,G))<=k&&(x.push(J),x.push(v(T,J)),b.remove(T),R.remove(J),R.insert(f(J)),R.insert(f(J.next)))}}J=N;var U=[];do U.push(J.p),J=J.next;while(J!==N);return U.push(J.p),U}function s(m,S,C,P,b,x,A){for(var N=new t([],o),T=m.data;T;){for(var R=0;R<T.children.length;R++){var V=T.children[R],$=T.leaf?E(V,C,P):a(C,P,V);$>x||N.push({node:V,dist:$})}for(;N.length&&!N.peek().node.children;){var J=N.pop(),st=J.node,G=E(st,S,C),W=E(st,P,b);if(J.dist<G&&J.dist<W&&h(C,st,A)&&h(P,st,A))return st}T=N.pop(),T&&(T=T.node)}return null}function o(m,S){return m.dist-S.dist}function a(m,S,C){if(u(m,C)||u(S,C))return 0;var P=I(m[0],m[1],S[0],S[1],C.minX,C.minY,C.maxX,C.minY);if(P===0)return 0;var b=I(m[0],m[1],S[0],S[1],C.minX,C.minY,C.minX,C.maxY);if(b===0)return 0;var x=I(m[0],m[1],S[0],S[1],C.maxX,C.minY,C.maxX,C.maxY);if(x===0)return 0;var A=I(m[0],m[1],S[0],S[1],C.minX,C.maxY,C.maxX,C.maxY);return A===0?0:Math.min(P,b,x,A)}function u(m,S){return m[0]>=S.minX&&m[0]<=S.maxX&&m[1]>=S.minY&&m[1]<=S.maxY}function h(m,S,C){for(var P=Math.min(m[0],S[0]),b=Math.min(m[1],S[1]),x=Math.max(m[0],S[0]),A=Math.max(m[1],S[1]),N=C.search({minX:P,minY:b,maxX:x,maxY:A}),T=0;T<N.length;T++)if(c(N[T].p,N[T].next.p,m,S))return!1;return!0}function l(m,S,C){return n(m[0],m[1],S[0],S[1],C[0],C[1])}function c(m,S,C,P){return m!==P&&S!==C&&l(m,S,C)>0!=l(m,S,P)>0&&l(C,P,m)>0!=l(C,P,S)>0}function f(m){var S=m.p,C=m.next.p;return m.minX=Math.min(S[0],C[0]),m.minY=Math.min(S[1],C[1]),m.maxX=Math.max(S[0],C[0]),m.maxY=Math.max(S[1],C[1]),m}function p(m){for(var S=m[0],C=m[0],P=m[0],b=m[0],x=0;x<m.length;x++){var A=m[x];A[0]<S[0]&&(S=A),A[0]>P[0]&&(P=A),A[1]<C[1]&&(C=A),A[1]>b[1]&&(b=A)}var N=[S,C,P,b],T=N.slice();for(x=0;x<m.length;x++)e(m[x],N)||T.push(m[x]);return _(T)}function v(m,S){var C={p:m,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return S?(C.next=S.next,C.prev=S,S.next.prev=C,S.next=C):(C.prev=C,C.next=C),C}function w(m,S){var C=m[0]-S[0],P=m[1]-S[1];return C*C+P*P}function E(m,S,C){var P=S[0],b=S[1],x=C[0]-P,A=C[1]-b;if(x!==0||A!==0){var N=((m[0]-P)*x+(m[1]-b)*A)/(x*x+A*A);N>1?(P=C[0],b=C[1]):N>0&&(P+=x*N,b+=A*N)}return x=m[0]-P,A=m[1]-b,x*x+A*A}function I(m,S,C,P,b,x,A,N){var T=C-m,R=P-S,V=A-b,$=N-x,J=m-b,st=S-x,G=T*T+R*R,W=T*V+R*$,k=V*V+$*$,U=T*J+R*st,O=V*J+$*st,q=G*k-W*W,H,et,ht,rt,_t=q,nt=q;q===0?(et=0,_t=1,rt=O,nt=k):(et=W*O-k*U,rt=G*O-W*U,et<0?(et=0,rt=O,nt=k):et>_t&&(et=_t,rt=O+W,nt=k)),rt<0?(rt=0,-U<0?et=0:-U>G?et=_t:(et=-U,_t=G)):rt>nt&&(rt=nt,-U+W<0?et=0:-U+W>G?et=_t:(et=-U+W,_t=G)),H=et===0?0:et/_t,ht=rt===0?0:rt/nt;var Ct=(1-H)*m+H*C,It=(1-H)*S+H*P,Q=(1-ht)*b+ht*A,wt=(1-ht)*x+ht*N,bt=Q-Ct,Lt=wt-It;return bt*bt+Lt*Lt}function y(m,S){return m[0]===S[0]?m[1]-S[1]:m[0]-S[0]}function _(m){m.sort(y);for(var S=[],C=0;C<m.length;C++){for(;S.length>=2&&l(S[S.length-2],S[S.length-1],m[C])<=0;)S.pop();S.push(m[C])}for(var P=[],b=m.length-1;b>=0;b--){for(;P.length>=2&&l(P[P.length-2],P[P.length-1],m[b])<=0;)P.pop();P.push(m[b])}return P.pop(),S.pop(),S.concat(P)}return sl.exports}var oC=sC();const aC=kp(oC);function uC(r,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(ha(r,function(i){e.push([i[0],i[1]])}),!e.length)return null;var n=aC(e,t.concavity);return n.length>3?dr([n]):null}function yn(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=xr(r),i=en(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&hC(n,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,h=0;h<a.length&&!u;h++)if(r0(n,a[h][0],e.ignoreBoundary)){for(var l=!1,c=1;c<a[h].length&&!l;)r0(n,a[h][c],!e.ignoreBoundary)&&(l=!0),c++;l||(u=!0)}return u}function r0(r,t,e){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],h=t[s][1],l=r[1]*(o-u)+a*(u-r[0])+h*(r[0]-o)===0&&(o-r[0])*(u-r[0])<=0&&(a-r[1])*(h-r[1])<=0;if(l)return!e;var c=a>r[1]!=h>r[1]&&r[0]<(u-o)*(r[1]-a)/(h-a)+o;c&&(n=!n)}return n}function hC(r,t){return t[0]<=r[0]&&t[1]<=r[1]&&t[2]>=r[0]&&t[3]>=r[1]}function $i(r,t,e){e===void 0&&(e={});var n=xr(r),i=xr(t),s=gr(i[1]-n[1]),o=gr(i[0]-n[0]),a=gr(n[1]),u=gr(i[1]),h=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return Wc(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),e.units)}function la(r,t,e,n){n===void 0&&(n={});var i=xr(r),s=gr(i[0]),o=gr(i[1]),a=gr(e),u=Xc(t,n.units),h=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),l=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(h)),c=rl(l),f=rl(h);return ie([c,f],n.properties)}function lC(r,t,e){e===void 0&&(e={});for(var n=e.steps||64,i=e.properties?e.properties:!Array.isArray(r)&&r.type==="Feature"&&r.properties?r.properties:{},s=[],o=0;o<n;o++)s.push(la(r,t,o*-360/n,e).geometry.coordinates);return s.push(s[0]),dr([s],i)}function Hu(r,t,e){if(e===void 0&&(e={}),e.final===!0)return cC(r,t);var n=xr(r),i=xr(t),s=gr(n[0]),o=gr(i[0]),a=gr(n[1]),u=gr(i[1]),h=Math.sin(o-s)*Math.cos(u),l=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return rl(Math.atan2(h,l))}function cC(r,t){var e=Hu(t,r);return e=(e+180)%360,e}function fC(r,t){var e=$i(r,t),n=Hu(r,t),i=la(r,e/2,n);return i}function dC(r,t){t===void 0&&(t={});var e=Zn(r),n=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return ie([n,i],t.properties,t)}function n0(r,t){t===void 0&&(t={});var e=0,n=0,i=0;return ha(r,function(s){e+=s[0],n+=s[1],i++},!0),ie([e/i,n/i],t.properties)}function i0(r,t){switch(t===void 0&&(t={}),jS(r)){case"Point":return ie(xr(r),t.properties);case"Polygon":var e=[];ha(r,function(m){e.push(m)});var n=n0(r,{properties:t.properties}),i=n.geometry.coordinates,s=0,o=0,a=0,u,h,l,c,f,p,v,w,E=e.map(function(m){return[m[0]-i[0],m[1]-i[1]]});for(u=0;u<e.length-1;u++)h=E[u],c=h[0],p=h[1],l=E[u+1],f=l[0],v=l[1],w=c*v-f*p,a+=w,s+=(c+f)*w,o+=(p+v)*w;if(a===0)return n;var I=a*.5,y=1/(6*I);return ie([i[0]+y*s,i[1]+y*o],t.properties);default:var _=uC(r);return _?i0(_,{properties:t.properties}):n0(r,{properties:t.properties})}}function s0(r){if(!r)throw new Error("geojson is required");var t=[];return Bc(r,function(e){gC(e,t)}),ua(t)}function gC(r,t){var e=[],n=r.geometry;if(n!==null){switch(n.type){case"Polygon":e=lo(n);break;case"LineString":e=[lo(n)]}e.forEach(function(i){var s=pC(i,r.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function pC(r,t){var e=[];return r.reduce(function(n,i){var s=$n([n,i],t);return s.bbox=vC(n,i),e.push(s),i}),e}function vC(r,t){var e=r[0],n=r[1],i=t[0],s=t[1],o=e<i?e:i,a=n<s?n:s,u=e>i?e:i,h=n>s?n:s;return[o,a,u,h]}var al={exports:{}},jc={},o0;function a0(){return o0||(o0=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=63710088e-1,r.factors={centimeters:r.earthRadius*100,centimetres:r.earthRadius*100,degrees:r.earthRadius/111325,feet:r.earthRadius*3.28084,inches:r.earthRadius*39.37,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:r.earthRadius*1e3,millimetres:r.earthRadius*1e3,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius*1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/r.earthRadius,yards:1.0936133},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(N,T,R){R===void 0&&(R={});var V={type:"Feature"};return(R.id===0||R.id)&&(V.id=R.id),R.bbox&&(V.bbox=R.bbox),V.properties=T||{},V.geometry=N,V}r.feature=t;function e(N,T,R){switch(N){case"Point":return n(T).geometry;case"LineString":return a(T).geometry;case"Polygon":return s(T).geometry;case"MultiPoint":return c(T).geometry;case"MultiLineString":return l(T).geometry;case"MultiPolygon":return f(T).geometry;default:throw new Error(N+" is invalid")}}r.geometry=e;function n(N,T,R){if(R===void 0&&(R={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!P(N[0])||!P(N[1]))throw new Error("coordinates must contain numbers");var V={type:"Point",coordinates:N};return t(V,T,R)}r.point=n;function i(N,T,R){return R===void 0&&(R={}),h(N.map(function(V){return n(V,T)}),R)}r.points=i;function s(N,T,R){R===void 0&&(R={});for(var V=0,$=N;V<$.length;V++){var J=$[V];if(J.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var st=0;st<J[J.length-1].length;st++)if(J[J.length-1][st]!==J[0][st])throw new Error("First and last Position are not equivalent.")}var G={type:"Polygon",coordinates:N};return t(G,T,R)}r.polygon=s;function o(N,T,R){return R===void 0&&(R={}),h(N.map(function(V){return s(V,T)}),R)}r.polygons=o;function a(N,T,R){if(R===void 0&&(R={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var V={type:"LineString",coordinates:N};return t(V,T,R)}r.lineString=a;function u(N,T,R){return R===void 0&&(R={}),h(N.map(function(V){return a(V,T)}),R)}r.lineStrings=u;function h(N,T){T===void 0&&(T={});var R={type:"FeatureCollection"};return T.id&&(R.id=T.id),T.bbox&&(R.bbox=T.bbox),R.features=N,R}r.featureCollection=h;function l(N,T,R){R===void 0&&(R={});var V={type:"MultiLineString",coordinates:N};return t(V,T,R)}r.multiLineString=l;function c(N,T,R){R===void 0&&(R={});var V={type:"MultiPoint",coordinates:N};return t(V,T,R)}r.multiPoint=c;function f(N,T,R){R===void 0&&(R={});var V={type:"MultiPolygon",coordinates:N};return t(V,T,R)}r.multiPolygon=f;function p(N,T,R){R===void 0&&(R={});var V={type:"GeometryCollection",geometries:N};return t(V,T,R)}r.geometryCollection=p;function v(N,T){if(T===void 0&&(T=0),T&&!(T>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,T||0);return Math.round(N*R)/R}r.round=v;function w(N,T){T===void 0&&(T="kilometers");var R=r.factors[T];if(!R)throw new Error(T+" units is invalid");return N*R}r.radiansToLength=w;function E(N,T){T===void 0&&(T="kilometers");var R=r.factors[T];if(!R)throw new Error(T+" units is invalid");return N/R}r.lengthToRadians=E;function I(N,T){return _(E(N,T))}r.lengthToDegrees=I;function y(N){var T=N%360;return T<0&&(T+=360),T}r.bearingToAzimuth=y;function _(N){var T=N%(2*Math.PI);return T*180/Math.PI}r.radiansToDegrees=_;function m(N){var T=N%360;return T*Math.PI/180}r.degreesToRadians=m;function S(N,T,R){if(T===void 0&&(T="kilometers"),R===void 0&&(R="kilometers"),!(N>=0))throw new Error("length must be a positive number");return w(E(N,T),R)}r.convertLength=S;function C(N,T,R){if(T===void 0&&(T="meters"),R===void 0&&(R="kilometers"),!(N>=0))throw new Error("area must be a positive number");var V=r.areaFactors[T];if(!V)throw new Error("invalid original units");var $=r.areaFactors[R];if(!$)throw new Error("invalid final units");return N/V*$}r.convertArea=C;function P(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}r.isNumber=P;function b(N){return!!N&&N.constructor===Object}r.isObject=b;function x(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(T){if(!P(T))throw new Error("bbox must only contain numbers")})}r.validateBBox=x;function A(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}r.validateId=A}(jc)),jc}var Oe={},u0;function h0(){if(u0)return Oe;u0=1,Object.defineProperty(Oe,"__esModule",{value:!0});var r=a0();function t(y,_,m){if(y!==null)for(var S,C,P,b,x,A,N,T=0,R=0,V,$=y.type,J=$==="FeatureCollection",st=$==="Feature",G=J?y.features.length:1,W=0;W<G;W++){N=J?y.features[W].geometry:st?y.geometry:y,V=N?N.type==="GeometryCollection":!1,x=V?N.geometries.length:1;for(var k=0;k<x;k++){var U=0,O=0;if(b=V?N.geometries[k]:N,b!==null){A=b.coordinates;var q=b.type;switch(T=m&&(q==="Polygon"||q==="MultiPolygon")?1:0,q){case null:break;case"Point":if(_(A,R,W,U,O)===!1)return!1;R++,U++;break;case"LineString":case"MultiPoint":for(S=0;S<A.length;S++){if(_(A[S],R,W,U,O)===!1)return!1;R++,q==="MultiPoint"&&U++}q==="LineString"&&U++;break;case"Polygon":case"MultiLineString":for(S=0;S<A.length;S++){for(C=0;C<A[S].length-T;C++){if(_(A[S][C],R,W,U,O)===!1)return!1;R++}q==="MultiLineString"&&U++,q==="Polygon"&&O++}q==="Polygon"&&U++;break;case"MultiPolygon":for(S=0;S<A.length;S++){for(O=0,C=0;C<A[S].length;C++){for(P=0;P<A[S][C].length-T;P++){if(_(A[S][C][P],R,W,U,O)===!1)return!1;R++}O++}U++}break;case"GeometryCollection":for(S=0;S<b.geometries.length;S++)if(t(b.geometries[S],_,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(y,_,m,S){var C=m;return t(y,function(P,b,x,A,N){b===0&&m===void 0?C=P:C=_(C,P,b,x,A,N)},S),C}function n(y,_){var m;switch(y.type){case"FeatureCollection":for(m=0;m<y.features.length&&_(y.features[m].properties,m)!==!1;m++);break;case"Feature":_(y.properties,0);break}}function i(y,_,m){var S=m;return n(y,function(C,P){P===0&&m===void 0?S=C:S=_(S,C,P)}),S}function s(y,_){if(y.type==="Feature")_(y,0);else if(y.type==="FeatureCollection")for(var m=0;m<y.features.length&&_(y.features[m],m)!==!1;m++);}function o(y,_,m){var S=m;return s(y,function(C,P){P===0&&m===void 0?S=C:S=_(S,C,P)}),S}function a(y){var _=[];return t(y,function(m){_.push(m)}),_}function u(y,_){var m,S,C,P,b,x,A,N,T,R,V=0,$=y.type==="FeatureCollection",J=y.type==="Feature",st=$?y.features.length:1;for(m=0;m<st;m++){for(x=$?y.features[m].geometry:J?y.geometry:y,N=$?y.features[m].properties:J?y.properties:{},T=$?y.features[m].bbox:J?y.bbox:void 0,R=$?y.features[m].id:J?y.id:void 0,A=x?x.type==="GeometryCollection":!1,b=A?x.geometries.length:1,C=0;C<b;C++){if(P=A?x.geometries[C]:x,P===null){if(_(null,V,N,T,R)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(P,V,N,T,R)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<P.geometries.length;S++)if(_(P.geometries[S],V,N,T,R)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}V++}}function h(y,_,m){var S=m;return u(y,function(C,P,b,x,A){P===0&&m===void 0?S=C:S=_(S,C,P,b,x,A)}),S}function l(y,_){u(y,function(m,S,C,P,b){var x=m===null?null:m.type;switch(x){case null:case"Point":case"LineString":case"Polygon":return _(r.feature(m,C,{bbox:P,id:b}),S,0)===!1?!1:void 0}var A;switch(x){case"MultiPoint":A="Point";break;case"MultiLineString":A="LineString";break;case"MultiPolygon":A="Polygon";break}for(var N=0;N<m.coordinates.length;N++){var T=m.coordinates[N],R={type:A,coordinates:T};if(_(r.feature(R,C),S,N)===!1)return!1}})}function c(y,_,m){var S=m;return l(y,function(C,P,b){P===0&&b===0&&m===void 0?S=C:S=_(S,C,P,b)}),S}function f(y,_){l(y,function(m,S,C){var P=0;if(m.geometry){var b=m.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var x,A=0,N=0,T=0;if(t(m,function(R,V,$,J,st){if(x===void 0||S>A||J>N||st>T){x=R,A=S,N=J,T=st,P=0;return}var G=r.lineString([x,R],m.properties);if(_(G,S,C,st,P)===!1)return!1;P++,x=R})===!1)return!1}}})}function p(y,_,m){var S=m,C=!1;return f(y,function(P,b,x,A,N){C===!1&&m===void 0?S=P:S=_(S,P,b,x,A,N),C=!0}),S}function v(y,_){if(!y)throw new Error("geojson is required");l(y,function(m,S,C){if(m.geometry!==null){var P=m.geometry.type,b=m.geometry.coordinates;switch(P){case"LineString":if(_(m,S,C,0,0)===!1)return!1;break;case"Polygon":for(var x=0;x<b.length;x++)if(_(r.lineString(b[x],m.properties),S,C,x)===!1)return!1;break}}})}function w(y,_,m){var S=m;return v(y,function(C,P,b,x){P===0&&m===void 0?S=C:S=_(S,C,P,b,x)}),S}function E(y,_){if(_=_||{},!r.isObject(_))throw new Error("options is invalid");var m=_.featureIndex||0,S=_.multiFeatureIndex||0,C=_.geometryIndex||0,P=_.segmentIndex||0,b=_.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":case"MultiPoint":return null;case"LineString":return P<0&&(P=A.length+P-1),r.lineString([A[P],A[P+1]],b,_);case"Polygon":return C<0&&(C=A.length+C),P<0&&(P=A[C].length+P-1),r.lineString([A[C][P],A[C][P+1]],b,_);case"MultiLineString":return S<0&&(S=A.length+S),P<0&&(P=A[S].length+P-1),r.lineString([A[S][P],A[S][P+1]],b,_);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),P<0&&(P=A[S][C].length-P-1),r.lineString([A[S][C][P],A[S][C][P+1]],b,_)}throw new Error("geojson is invalid")}function I(y,_){if(_=_||{},!r.isObject(_))throw new Error("options is invalid");var m=_.featureIndex||0,S=_.multiFeatureIndex||0,C=_.geometryIndex||0,P=_.coordIndex||0,b=_.properties,x;switch(y.type){case"FeatureCollection":m<0&&(m=y.features.length+m),b=b||y.features[m].properties,x=y.features[m].geometry;break;case"Feature":b=b||y.properties,x=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":x=y;break;default:throw new Error("geojson is invalid")}if(x===null)return null;var A=x.coordinates;switch(x.type){case"Point":return r.point(A,b,_);case"MultiPoint":return S<0&&(S=A.length+S),r.point(A[S],b,_);case"LineString":return P<0&&(P=A.length+P),r.point(A[P],b,_);case"Polygon":return C<0&&(C=A.length+C),P<0&&(P=A[C].length+P),r.point(A[C][P],b,_);case"MultiLineString":return S<0&&(S=A.length+S),P<0&&(P=A[S].length+P),r.point(A[S][P],b,_);case"MultiPolygon":return S<0&&(S=A.length+S),C<0&&(C=A[S].length+C),P<0&&(P=A[S][C].length-P),r.point(A[S][C][P],b,_)}throw new Error("geojson is invalid")}return Oe.coordAll=a,Oe.coordEach=t,Oe.coordReduce=e,Oe.featureEach=s,Oe.featureReduce=o,Oe.findPoint=I,Oe.findSegment=E,Oe.flattenEach=l,Oe.flattenReduce=c,Oe.geomEach=u,Oe.geomReduce=h,Oe.lineEach=v,Oe.lineReduce=w,Oe.propEach=n,Oe.propReduce=i,Oe.segmentEach=f,Oe.segmentReduce=p,Oe}var ul={},l0;function mC(){if(l0)return ul;l0=1,Object.defineProperty(ul,"__esModule",{value:!0});var r=h0();function t(e){var n=[1/0,1/0,-1/0,-1/0];return r.coordEach(e,function(i){n[0]>i[0]&&(n[0]=i[0]),n[1]>i[1]&&(n[1]=i[1]),n[2]<i[0]&&(n[2]=i[0]),n[3]<i[1]&&(n[3]=i[1])}),n}return t.default=t,ul.default=t,ul}var c0;function yC(){if(c0)return al.exports;c0=1;var r=Qp(),t=a0(),e=h0(),n=mC().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new r(a);return u.insert=function(h){if(h.type!=="Feature")throw new Error("invalid feature");return h.bbox=h.bbox?h.bbox:n(h),r.prototype.insert.call(this,h)},u.load=function(h){var l=[];return Array.isArray(h)?h.forEach(function(c){if(c.type!=="Feature")throw new Error("invalid features");c.bbox=c.bbox?c.bbox:n(c),l.push(c)}):i(h,function(c){if(c.type!=="Feature")throw new Error("invalid features");c.bbox=c.bbox?c.bbox:n(c),l.push(c)}),r.prototype.load.call(this,l)},u.remove=function(h,l){if(h.type!=="Feature")throw new Error("invalid feature");return h.bbox=h.bbox?h.bbox:n(h),r.prototype.remove.call(this,h,l)},u.clear=function(){return r.prototype.clear.call(this)},u.search=function(h){var l=r.prototype.search.call(this,this.toBBox(h));return s(l)},u.collides=function(h){return r.prototype.collides.call(this,this.toBBox(h))},u.all=function(){var h=r.prototype.all.call(this);return s(h)},u.toJSON=function(){return r.prototype.toJSON.call(this)},u.fromJSON=function(h){return r.prototype.fromJSON.call(this,h)},u.toBBox=function(h){var l;if(h.bbox)l=h.bbox;else if(Array.isArray(h)&&h.length===4)l=h;else if(Array.isArray(h)&&h.length===6)l=[h[0],h[1],h[3],h[4]];else if(h.type==="Feature")l=n(h);else if(h.type==="FeatureCollection")l=n(h);else throw new Error("invalid geojson");return{minX:l[0],minY:l[1],maxX:l[2],maxY:l[3]}},u}return al.exports=o,al.exports.default=o,al.exports}var _C=yC();const wC=kp(_C);function f0(r,t){var e={},n=[];if(r.type==="LineString"&&(r=Kn(r)),t.type==="LineString"&&(t=Kn(t)),r.type==="Feature"&&t.type==="Feature"&&r.geometry!==null&&t.geometry!==null&&r.geometry.type==="LineString"&&t.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=d0(r,t);return i&&n.push(i),ua(n)}var s=wC();return s.load(s0(t)),nl(s0(r),function(o){nl(s.search(o),function(a){var u=d0(o,a);if(u){var h=lo(u).join(",");e[h]||(e[h]=!0,n.push(u))}})}),ua(n)}function d0(r,t){var e=lo(r),n=lo(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=n[0][0],h=n[0][1],l=n[1][0],c=n[1][1],f=(c-h)*(o-i)-(l-u)*(a-s),p=(l-u)*(s-h)-(c-h)*(i-u),v=(o-i)*(s-h)-(a-s)*(i-u);if(f===0)return null;var w=p/f,E=v/f;if(w>=0&&w<=1&&E>=0&&E<=1){var I=i+w*(o-i),y=s+w*(a-s);return ie([I,y])}return null}function EC(r,t,e){e===void 0&&(e={});var n=ie([1/0,1/0],{dist:1/0}),i=0;return Bc(r,function(s){for(var o=lo(s),a=0;a<o.length-1;a++){var u=ie(o[a]);u.properties.dist=$i(t,u,e);var h=ie(o[a+1]);h.properties.dist=$i(t,h,e);var l=$i(u,h,e),c=Math.max(u.properties.dist,h.properties.dist),f=Hu(u,h),p=la(t,c,f+90,e),v=la(t,c,f-90,e),w=f0($n([p.geometry.coordinates,v.geometry.coordinates]),$n([u.geometry.coordinates,h.geometry.coordinates])),E=null;w.features.length>0&&(E=w.features[0],E.properties.dist=$i(t,E,e),E.properties.location=i+$i(u,E,e)),u.properties.dist<n.properties.dist&&(n=u,n.properties.index=a,n.properties.location=i),h.properties.dist<n.properties.dist&&(n=h,n.properties.index=a+1,n.properties.location=i+l),E&&E.properties.dist<n.properties.dist&&(n=E,n.properties.index=a),i+=l}}),n}function g0(r,t,e){e===void 0&&(e={});var n=xr(r),i=xr(t);i[0]+=i[0]-n[0]>180?-360:n[0]-i[0]>180?360:0;var s=SC(n,i),o=Hc(s,"meters",e.units);return o}function SC(r,t,e){e=e===void 0?nr:Number(e);var n=e,i=r[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-r[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),h=Math.abs(u)>1e-11?o/u:Math.cos(i),l=Math.sqrt(o*o+h*h*a*a),c=l*n;return c}function CC(r,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!r)throw new Error("pt is required");if(Array.isArray(r)?r=ie(r):r.type==="Point"?r=Kn(r):Jp(r,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=$n(t):t.type==="LineString"?t=Kn(t):Jp(t,"LineString","line");var n=1/0,i=r.geometry.coordinates;return JS(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=PC(i,o,a,e);u<n&&(n=u)}),Hc(n,"degrees",e.units)}function PC(r,t,e,n){var i=[e[0]-t[0],e[1]-t[1]],s=[r[0]-t[0],r[1]-t[1]],o=p0(s,i);if(o<=0)return Qc(r,t,{method:n.method,units:"degrees"});var a=p0(i,i);if(a<=o)return Qc(r,e,{method:n.method,units:"degrees"});var u=o/a,h=[t[0]+u*i[0],t[1]+u*i[1]];return Qc(r,h,{method:n.method,units:"degrees"})}function p0(r,t){return r[0]*t[0]+r[1]*t[1]}function Qc(r,t,e){return e.method==="planar"?g0(r,t,e):$i(r,t,e)}var v0=6378137;function IC(r){return YS(r,function(t,e){return t+MC(e)},0)}function MC(r){var t=0,e;switch(r.type){case"Polygon":return m0(r.coordinates);case"MultiPolygon":for(e=0;e<r.coordinates.length;e++)t+=m0(r.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function m0(r){var t=0;if(r&&r.length>0){t+=Math.abs(y0(r[0]));for(var e=1;e<r.length;e++)t-=Math.abs(y0(r[e]))}return t}function y0(r){var t,e,n,i,s,o,a,u=0,h=r.length;if(h>2){for(a=0;a<h;a++)a===h-2?(i=h-2,s=h-1,o=0):a===h-1?(i=h-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=r[i],e=r[s],n=r[o],u+=(Kc(n[0])-Kc(t[0]))*Math.sin(Kc(e[1]));u=u*v0*v0/2}return u}function Kc(r){return r*Math.PI/180}function bC(r,t,e){e===void 0&&(e={});for(var n=en(r),i=n.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=Hu(i[o],i[o-1])-180,h=la(i[o],a,u,e);return h}else return ie(i[o])}else s+=$i(i[o],i[o+1],e);return ie(i[i.length-1])}function Zi(r,t,e){e===void 0&&(e={});for(var n=xr(r),i=lo(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),NC(i[s],i[s+1],n,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function NC(r,t,e,n,i){var s=e[0],o=e[1],a=r[0],u=r[1],h=t[0],l=t[1],c=e[0]-a,f=e[1]-u,p=h-a,v=l-u,w=c*v-f*p;if(i!==null){if(Math.abs(w)>i)return!1}else if(w!==0)return!1;if(n){if(n==="start")return Math.abs(p)>=Math.abs(v)?p>0?a<s&&s<=h:h<=s&&s<a:v>0?u<o&&o<=l:l<=o&&o<u;if(n==="end")return Math.abs(p)>=Math.abs(v)?p>0?a<=s&&s<h:h<s&&s<=a:v>0?u<=o&&o<l:l<o&&o<=u;if(n==="both")return Math.abs(p)>=Math.abs(v)?p>0?a<s&&s<h:h<s&&s<a:v>0?u<o&&o<l:l<o&&o<u}else return Math.abs(p)>=Math.abs(v)?p>0?a<=s&&s<=h:h<=s&&s<=a:v>0?u<=o&&o<=l:l<=o&&o<=u;return!1}function xC(r,t){var e=en(r),n=en(t),i=e.type,s=n.type;switch(i){case"Point":switch(s){case"MultiPoint":return TC(e,n);case"LineString":return Zi(e,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return yn(e,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return AC(e,n);case"LineString":return OC(e,n);case"Polygon":case"MultiPolygon":return DC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return LC(e,n);case"Polygon":case"MultiPolygon":return RC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return FC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function TC(r,t){var e,n=!1;for(e=0;e<t.coordinates.length;e++)if(w0(t.coordinates[e],r.coordinates)){n=!0;break}return n}function AC(r,t){for(var e=0;e<r.coordinates.length;e++){for(var n=!1,i=0;i<t.coordinates.length;i++)w0(r.coordinates[e],t.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function OC(r,t){for(var e=!1,n=0;n<r.coordinates.length;n++){if(!Zi(r.coordinates[n],t))return!1;e||(e=Zi(r.coordinates[n],t,{ignoreEndVertices:!0}))}return e}function DC(r,t){for(var e=!0,n=!1,i=0;i<r.coordinates.length;i++){if(n=yn(r.coordinates[1],t),!n){e=!1;break}n=yn(r.coordinates[1],t,{ignoreBoundary:!0})}return e&&n}function LC(r,t){for(var e=0;e<r.coordinates.length;e++)if(!Zi(r.coordinates[e],t))return!1;return!0}function RC(r,t){var e=Zn(t),n=Zn(r);if(!_0(e,n))return!1;for(var i=!1,s=0;s<r.coordinates.length-1;s++){if(!yn(r.coordinates[s],t))return!1;if(i||(i=yn(r.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=GC(r.coordinates[s],r.coordinates[s+1]);i=yn(o,t,{ignoreBoundary:!0})}}return i}function FC(r,t){var e=Zn(r),n=Zn(t);if(!_0(n,e))return!1;for(var i=0;i<r.coordinates[0].length;i++)if(!yn(r.coordinates[0][i],t))return!1;return!0}function _0(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function w0(r,t){return r[0]===t[0]&&r[1]===t[1]}function GC(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}function kC(r,t,e){e===void 0&&(e={});var n;e.final?n=E0(xr(t),xr(r)):n=E0(xr(r),xr(t));var i=n>180?-(360-n):n;return i}function E0(r,t){var e=gr(r[1]),n=gr(t[1]),i=gr(t[0]-r[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(rl(o)+360)%360}function VC(r,t,e,n){n===void 0&&(n={});var i=t<0,s=Hc(Math.abs(t),n.units,"meters");i&&(s=-Math.abs(s));var o=xr(r),a=UC(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,ie(a,n.properties)}function UC(r,t,e,n){n=n===void 0?nr:Number(n);var i=t/n,s=r[0]*Math.PI/180,o=gr(r[1]),a=gr(e),u=i*Math.cos(a),h=o+u;Math.abs(h)>Math.PI/2&&(h=h>0?Math.PI-h:-Math.PI-h);var l=Math.log(Math.tan(h/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?u/l:Math.cos(o),f=i*Math.sin(a)/c,p=s+f;return[(p*180/Math.PI+540)%360-180,h*180/Math.PI]}function zC(r,t){var e=en(r),n=en(t),i=e.type,s=n.type,o=e.coordinates,a=n.coordinates;switch(i){case"Point":switch(s){case"Point":return $c(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return qC(e,n);case"MultiPoint":return WC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return Zi(n,e,{ignoreEndVertices:!0});case"LineString":return BC(e,n);case"MultiPoint":return XC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return yn(n,e,{ignoreBoundary:!0});case"LineString":return YC(e,n);case"Polygon":return JC(e,n);case"MultiPoint":return HC(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function qC(r,t){var e,n=!1;for(e=0;e<r.coordinates.length;e++)if($c(r.coordinates[e],t.coordinates)){n=!0;break}return n}function WC(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){for(var i=n[e],s=!1,o=0,a=r.coordinates;o<a.length;o++){var u=a[o];if($c(i,u)){s=!0;break}}if(!s)return!1}return!0}function XC(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(Zi(s,r,{ignoreEndVertices:!0})&&(e=!0),!Zi(s,r))return!1}return!!e}function HC(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){var i=n[e];if(!yn(i,r,{ignoreBoundary:!0}))return!1}return!0}function BC(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(Zi({type:"Point",coordinates:s},r,{ignoreEndVertices:!0})&&(e=!0),!Zi({type:"Point",coordinates:s},r,{ignoreEndVertices:!1}))return!1}return e}function YC(r,t){var e=!1,n=0,i=Zn(r),s=Zn(t);if(!S0(i,s))return!1;for(n;n<t.coordinates.length-1;n++){var o=jC(t.coordinates[n],t.coordinates[n+1]);if(yn({type:"Point",coordinates:o},r,{ignoreBoundary:!0})){e=!0;break}}return e}function JC(r,t){if(r.type==="Feature"&&r.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=Zn(r),n=Zn(t);if(!S0(e,n))return!1;for(var i=en(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,h=a;u<h.length;u++){var l=h[u];if(!yn(l,r))return!1}return!0}function S0(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function $c(r,t){return r[0]===t[0]&&r[1]===t[1]}function jC(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}/**
|
|
45
45
|
* splaytree v3.1.2
|
|
46
46
|
* Fast Splay tree for Node and browser
|
|
47
47
|
*
|
|
@@ -61,14 +61,14 @@ northing meters`+r;var f=c/2,p=0,v=0,w,E,I,y,_;return f>0&&(w=1e5/Math.pow(10,f)
|
|
|
61
61
|
|
|
62
62
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
63
63
|
and limitations under the License.
|
|
64
|
-
***************************************************************************** */function
|
|
65
|
-
`);var s=t+(e?" ":"│ ");r.left&&$c(r.left,s,!1,n,i),r.right&&$c(r.right,s,!0,n,i)}}var Zc=function(){function r(t){t===void 0&&(t=jC),this._root=null,this._size=0,this._comparator=t}return r.prototype.insert=function(t,e){return this._size++,this._root=Kc(t,e,this._root,this._comparator)},r.prototype.add=function(t,e){var n=new bs(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=Ns(t,this._root,i),o=i(t,s.key);return o===0?this._root=s:(o<0?(n.left=s.left,n.right=s,s.left=null):o>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},r.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},r.prototype._remove=function(t,e,n){var i;if(e===null)return null;e=Ns(t,e,n);var s=n(t,e.key);return s===0?(e.left===null?i=e.right:(i=Ns(t,e.left,n),i.right=e.right),this._size--,i):e},r.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Ns(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},r.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},r.prototype.find=function(t){return this._root&&(this._root=Ns(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},r.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},r.prototype.forEach=function(t,e){for(var n=this._root,i=[],s=!1;!s;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),t.call(e,n),n=n.right):s=!0;return this},r.prototype.range=function(t,e,n,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,e),u>0)break;if(o(a.key,t)>=0&&n.call(i,a))return this;a=a.right}return this},r.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},r.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},r.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},r.prototype.at=function(t){for(var e=this._root,n=!1,i=0,s=[];!n;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},r.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(n=e,e=e.left):e=e.right}return n},r.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(n=e,e=e.right)}return n},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return $C(this._root)},r.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var i=t.length,s=this._comparator;if(n&&rf(t,e,0,i-1,s),this._root===null)this._root=tf(t,e,0,i),this._size=i;else{var o=ZC(this.toList(),KC(t,e),s);i=this._size+i,this._root=ef({head:o},0,i)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return $c(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},r.prototype.update=function(t,e,n){var i=this._comparator,s=E0(t,this._root,i),o=s.left,a=s.right;i(t,e)<0?a=Kc(e,n,a,i):o=Kc(e,n,o,i),this._root=QC(o,a,i)},r.prototype.split=function(t){return E0(t,this._root,this._comparator)},r.prototype[Symbol.iterator]=function(){var t,e,n;return JC(this,function(i){switch(i.label){case 0:t=this._root,e=[],n=!1,i.label=1;case 1:return n?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},r}();function tf(r,t,e,n){var i=n-e;if(i>0){var s=e+Math.floor(i/2),o=r[s],a=t[s],u=new bs(o,a);return u.left=tf(r,t,e,s),u.right=tf(r,t,s+1,n),u}return null}function KC(r,t){for(var e=new bs(null,null),n=e,i=0;i<r.length;i++)n=n.next=new bs(r[i],t[i]);return n.next=null,e.next}function $C(r){for(var t=r,e=[],n=!1,i=new bs(null,null),s=i;!n;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):n=!0;return s.next=null,i.next}function ef(r,t,e){var n=e-t;if(n>0){var i=t+Math.floor(n/2),s=ef(r,t,i),o=r.head;return o.left=s,r.head=r.head.next,o.right=ef(r,i+1,e),o}return null}function ZC(r,t,e){for(var n=new bs(null,null),i=n,s=r,o=t;s!==null&&o!==null;)e(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),n.next}function rf(r,t,e,n,i){if(!(e>=n)){for(var s=r[e+n>>1],o=e-1,a=n+1;;){do o++;while(i(r[o],s)<0);do a--;while(i(r[a],s)>0);if(o>=a)break;var u=r[o];r[o]=r[a],r[a]=u,u=t[o],t[o]=t[a],t[a]=u}rf(r,t,e,a,i),rf(r,t,a+1,n,i)}}const ts=11102230246251565e-32,pr=134217729,tP=(3+8*ts)*ts;function nf(r,t,e,n,i){let s,o,a,u,h=t[0],l=n[0],c=0,f=0;l>h==l>-h?(s=h,h=t[++c]):(s=l,l=n[++f]);let p=0;if(c<r&&f<e)for(l>h==l>-h?(o=h+s,a=s-(o-h),h=t[++c]):(o=l+s,a=s-(o-l),l=n[++f]),s=o,a!==0&&(i[p++]=a);c<r&&f<e;)l>h==l>-h?(o=s+h,u=o-s,a=s-(o-u)+(h-u),h=t[++c]):(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=n[++f]),s=o,a!==0&&(i[p++]=a);for(;c<r;)o=s+h,u=o-s,a=s-(o-u)+(h-u),h=t[++c],s=o,a!==0&&(i[p++]=a);for(;f<e;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=n[++f],s=o,a!==0&&(i[p++]=a);return(s!==0||p===0)&&(i[p++]=s),p}function eP(r,t){let e=t[0];for(let n=1;n<r;n++)e+=t[n];return e}function Bu(r){return new Float64Array(r)}const rP=(3+16*ts)*ts,nP=(2+12*ts)*ts,iP=(9+64*ts)*ts*ts,ca=Bu(4),S0=Bu(8),C0=Bu(12),P0=Bu(16),Tr=Bu(4);function sP(r,t,e,n,i,s,o){let a,u,h,l,c,f,p,v,w,E,I,y,_,m,S,C,P,b;const x=r-i,A=e-i,N=t-s,T=n-s;m=x*T,f=pr*x,p=f-(f-x),v=x-p,f=pr*T,w=f-(f-T),E=T-w,S=v*E-(m-p*w-v*w-p*E),C=N*A,f=pr*N,p=f-(f-N),v=N-p,f=pr*A,w=f-(f-A),E=A-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,ca[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,ca[1]=_-(I+c)+(c-C),b=y+I,c=b-y,ca[2]=y-(b-c)+(I-c),ca[3]=b;let R=eP(4,ca),V=nP*o;if(R>=V||-R>=V||(c=r-x,a=r-(x+c)+(c-i),c=e-A,h=e-(A+c)+(c-i),c=t-N,u=t-(N+c)+(c-s),c=n-T,l=n-(T+c)+(c-s),a===0&&u===0&&h===0&&l===0)||(V=iP*o+tP*Math.abs(R),R+=x*l+T*a-(N*h+A*u),R>=V||-R>=V))return R;m=a*T,f=pr*a,p=f-(f-a),v=a-p,f=pr*T,w=f-(f-T),E=T-w,S=v*E-(m-p*w-v*w-p*E),C=u*A,f=pr*u,p=f-(f-u),v=u-p,f=pr*A,w=f-(f-A),E=A-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,Tr[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,Tr[1]=_-(I+c)+(c-C),b=y+I,c=b-y,Tr[2]=y-(b-c)+(I-c),Tr[3]=b;const $=nf(4,ca,4,Tr,S0);m=x*l,f=pr*x,p=f-(f-x),v=x-p,f=pr*l,w=f-(f-l),E=l-w,S=v*E-(m-p*w-v*w-p*E),C=N*h,f=pr*N,p=f-(f-N),v=N-p,f=pr*h,w=f-(f-h),E=h-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,Tr[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,Tr[1]=_-(I+c)+(c-C),b=y+I,c=b-y,Tr[2]=y-(b-c)+(I-c),Tr[3]=b;const J=nf($,S0,4,Tr,C0);m=a*l,f=pr*a,p=f-(f-a),v=a-p,f=pr*l,w=f-(f-l),E=l-w,S=v*E-(m-p*w-v*w-p*E),C=u*h,f=pr*u,p=f-(f-u),v=u-p,f=pr*h,w=f-(f-h),E=h-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,Tr[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,Tr[1]=_-(I+c)+(c-C),b=y+I,c=b-y,Tr[2]=y-(b-c)+(I-c),Tr[3]=b;const st=nf(J,C0,4,Tr,P0);return P0[st-1]}function oP(r,t,e,n,i,s){const o=(t-s)*(e-i),a=(r-i)*(n-s),u=o-a,h=Math.abs(o+a);return Math.abs(u)>=rP*h?u:-sP(r,t,e,n,i,s,h)}const Yu=(r,t)=>r.ll.x<=t.x&&t.x<=r.ur.x&&r.ll.y<=t.y&&t.y<=r.ur.y,sf=(r,t)=>{if(t.ur.x<r.ll.x||r.ur.x<t.ll.x||t.ur.y<r.ll.y||r.ur.y<t.ll.y)return null;const e=r.ll.x<t.ll.x?t.ll.x:r.ll.x,n=r.ur.x<t.ur.x?r.ur.x:t.ur.x,i=r.ll.y<t.ll.y?t.ll.y:r.ll.y,s=r.ur.y<t.ur.y?r.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:n,y:s}}};let xs=Number.EPSILON;xs===void 0&&(xs=Math.pow(2,-52));const aP=xs*xs,I0=(r,t)=>{if(-xs<r&&r<xs&&-xs<t&&t<xs)return 0;const e=r-t;return e*e<aP*r*t?0:r<t?-1:1};class uP{constructor(){this.reset()}reset(){this.xRounder=new M0,this.yRounder=new M0}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class M0{constructor(){this.tree=new Zc,this.round(0)}round(t){const e=this.tree.add(t),n=this.tree.prev(e);if(n!==null&&I0(e.key,n.key)===0)return this.tree.remove(t),n.key;const i=this.tree.next(e);return i!==null&&I0(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const Ju=new uP,ul=(r,t)=>r.x*t.y-r.y*t.x,b0=(r,t)=>r.x*t.x+r.y*t.y,N0=(r,t,e)=>{const n=oP(r.x,r.y,t.x,t.y,e.x,e.y);return n>0?-1:n<0?1:0},hl=r=>Math.sqrt(b0(r,r)),hP=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return ul(i,n)/hl(i)/hl(n)},lP=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return b0(i,n)/hl(i)/hl(n)},x0=(r,t,e)=>t.y===0?null:{x:r.x+t.x/t.y*(e-r.y),y:e},T0=(r,t,e)=>t.x===0?null:{x:e,y:r.y+t.y/t.x*(e-r.x)},cP=(r,t,e,n)=>{if(t.x===0)return T0(e,n,r.x);if(n.x===0)return T0(r,t,e.x);if(t.y===0)return x0(e,n,r.y);if(n.y===0)return x0(r,t,e.y);const i=ul(t,n);if(i==0)return null;const s={x:e.x-r.x,y:e.y-r.y},o=ul(s,t)/i,a=ul(s,n)/i,u=r.x+a*t.x,h=e.x+o*n.x,l=r.y+a*t.y,c=e.y+o*n.y,f=(u+h)/2,p=(l+c)/2;return{x:f,y:p}};class _n{static compare(t,e){const n=_n.comparePoints(t.point,e.point);return n!==0?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:Ts.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let n=0,i=e.length;n<i;n++){const s=e[n];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(n.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,n=i=>{const s=i.otherSE;e.set(i,{sine:hP(this.point,t.point,s.point),cosine:lP(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||n(i),e.has(s)||n(s);const{sine:o,cosine:a}=e.get(i),{sine:u,cosine:h}=e.get(s);return o>=0&&u>=0?a<h?1:a>h?-1:0:o<0&&u<0?a<h?-1:a>h?1:0:u<o?-1:u>o?1:0}}}let fP=0;class Ts{static compare(t,e){const n=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(s<i)return-1;const a=t.leftSE.point.y,u=e.leftSE.point.y,h=t.rightSE.point.y,l=e.rightSE.point.y;if(n<i){if(u<a&&u<h)return 1;if(u>a&&u>h)return-1;const c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;const f=e.comparePoint(t.rightSE.point);return f!==0?f:-1}if(n>i){if(a<u&&a<l)return-1;if(a>u&&a>l)return 1;const c=e.comparePoint(t.leftSE.point);if(c!==0)return c;const f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const c=e.comparePoint(t.rightSE.point);if(c!==0)return c}if(s>o){const c=t.comparePoint(e.rightSE.point);if(c<0)return 1;if(c>0)return-1}if(s!==o){const c=h-a,f=s-n,p=l-u,v=o-i;if(c>f&&p<v)return 1;if(c<f&&p>v)return-1}return s>o?1:s<o||h<l?-1:h>l?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,i){this.id=++fP,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=i}static fromRing(t,e,n){let i,s,o;const a=_n.comparePoints(t,e);if(a<0)i=t,s=e,o=1;else if(a>0)i=e,s=t,o=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const u=new _n(i,!0),h=new _n(s,!1);return new Ts(u,h,[n],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,o=e.x+s*i.x;if(t.x===o)return 0;const a=(t.x-e.x)/i.x,u=e.y+a*i.y;return t.y===u?0:t.y<u?-1:1}getIntersection(t){const e=this.bbox(),n=t.bbox(),i=sf(e,n);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,u=t.rightSE.point,h=Yu(e,a)&&this.comparePoint(a)===0,l=Yu(n,s)&&t.comparePoint(s)===0,c=Yu(e,u)&&this.comparePoint(u)===0,f=Yu(n,o)&&t.comparePoint(o)===0;if(l&&h)return f&&!c?o:!f&&c?u:null;if(l)return c&&s.x===u.x&&s.y===u.y?null:s;if(h)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&c)return null;if(f)return o;if(c)return u;const p=cP(s,this.vector(),a,t.vector());return p===null||!Yu(i,p)?null:Ju.round(p.x,p.y)}split(t){const e=[],n=t.events!==void 0,i=new _n(t,!0),s=new _n(t,!1),o=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const a=new Ts(i,o,this.rings.slice(),this.windings.slice());return _n.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),_n.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}consume(t){let e=this,n=t;for(;e.consumedBy;)e=e.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const i=Ts.compare(e,n);if(i!==0){if(i>0){const s=e;e=n,n=s}if(e.prev===n){const s=e;e=n,n=s}for(let s=0,o=n.rings.length;s<o;s++){const a=n.rings[s],u=n.windings[s],h=e.rings.indexOf(a);h===-1?(e.rings.push(a),e.windings.push(u)):e.windings[h]+=u}n.rings=null,n.windings=null,n.consumedBy=e,n.leftSE.consumedBy=e.leftSE,n.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,u=this.rings.length;a<u;a++){const h=this.rings[a],l=this.windings[a],c=e.indexOf(h);c===-1?(e.push(h),n.push(l)):n[c]+=l}const s=[],o=[];for(let a=0,u=e.length;a<u;a++){if(n[a]===0)continue;const h=e[a],l=h.poly;if(o.indexOf(l)===-1)if(h.isExterior)s.push(l);else{o.indexOf(l)===-1&&o.push(l);const c=s.indexOf(h.poly);c!==-1&&s.splice(c,1)}}for(let a=0,u=s.length;a<u;a++){const h=s[a].multiPoly;i.indexOf(h)===-1&&i.push(h)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(ti.type){case"union":{const n=t.length===0,i=e.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;t.length<e.length?(n=t.length,i=e.length):(n=e.length,i=t.length),this._isInResult=i===ti.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2===1;break}case"difference":{const n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(t)!==n(e);break}default:throw new Error(`Unrecognized operation type found ${ti.type}`)}return this._isInResult}}class A0{constructor(t,e,n){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Ju.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=t.length;o<a;o++){if(typeof t[o][0]!="number"||typeof t[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=Ju.round(t[o][0],t[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(Ts.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(Ts.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class dP{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new A0(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,i=t.length;n<i;n++){const s=new A0(t[n],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class O0{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let n=0,i=t.length;n<i;n++){const s=new dP(t[n],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class ll{static factory(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,u=s.rightSE;const h=[a],l=a.point,c=[];for(;o=a,a=u,h.push(a),a.point!==l;)for(;;){const f=a.getAvailableLinkedEvents();if(f.length===0){const w=h[0].point,E=h[h.length-1].point;throw new Error(`Unable to complete output ring starting at [${w.x}, ${w.y}]. Last matching segment found ends at [${E.x}, ${E.y}].`)}if(f.length===1){u=f[0].otherSE;break}let p=null;for(let w=0,E=c.length;w<E;w++)if(c[w].point===a.point){p=w;break}if(p!==null){const w=c.splice(p)[0],E=h.splice(w.index);E.unshift(E[0].otherSE),e.push(new ll(E.reverse()));continue}c.push({index:h.length,point:a.point});const v=a.getLeftmostComparator(o);u=f.sort(v)[0].otherSE;break}e.push(new ll(h))}return e}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let h=1,l=this.events.length-1;h<l;h++){const c=this.events[h].point,f=this.events[h+1].point;N0(c,t,f)!==0&&(e.push(c),t=c)}if(e.length===1)return null;const n=e[0],i=e[1];N0(n,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,u=[];for(let h=o;h!=a;h+=s)u.push([e[h].x,e[h].y]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];_n.compare(t,o)>0&&(t=o)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}}class D0{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class gP{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.poly)if(s.isExteriorRing())e.push(new D0(s));else{const o=s.enclosingRing();o.poly||e.push(new D0(o)),o.poly.addInterior(s)}}return e}}class pP{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ts.compare;this.queue=t,this.tree=new Zc(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(t.isLeft){let h=null;if(a){const c=a.getIntersection(e);if(c!==null&&(e.isAnEndpoint(c)||(h=c),!a.isAnEndpoint(c))){const f=this._splitSafely(a,c);for(let p=0,v=f.length;p<v;p++)n.push(f[p])}}let l=null;if(u){const c=u.getIntersection(e);if(c!==null&&(e.isAnEndpoint(c)||(l=c),!u.isAnEndpoint(c))){const f=this._splitSafely(u,c);for(let p=0,v=f.length;p<v;p++)n.push(f[p])}}if(h!==null||l!==null){let c=null;h===null?c=l:l===null?c=h:c=_n.comparePoints(h,l)<=0?h:l,this.queue.remove(e.rightSE),n.push(e.rightSE);const f=e.split(c);for(let p=0,v=f.length;p<v;p++)n.push(f[p])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&u){const h=a.getIntersection(u);if(h!==null){if(!a.isAnEndpoint(h)){const l=this._splitSafely(a,h);for(let c=0,f=l.length;c<f;c++)n.push(l[c])}if(!u.isAnEndpoint(h)){const l=this._splitSafely(u,h);for(let c=0,f=l.length;c<f;c++)n.push(l[c])}}}this.tree.remove(e)}return n}_splitSafely(t,e){this.tree.remove(t);const n=t.rightSE;this.queue.remove(n);const i=t.split(e);return i.push(n),t.consumedBy===void 0&&this.tree.add(t),i}}const L0=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,vP=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class mP{run(t,e,n){ti.type=t,Ju.reset();const i=[new O0(e,!0)];for(let c=0,f=n.length;c<f;c++)i.push(new O0(n[c],!1));if(ti.numMultiPolys=i.length,ti.type==="difference"){const c=i[0];let f=1;for(;f<i.length;)sf(i[f].bbox,c.bbox)!==null?f++:i.splice(f,1)}if(ti.type==="intersection")for(let c=0,f=i.length;c<f;c++){const p=i[c];for(let v=c+1,w=i.length;v<w;v++)if(sf(p.bbox,i[v].bbox)===null)return[]}const s=new Zc(_n.compare);for(let c=0,f=i.length;c<f;c++){const p=i[c].getSweepEvents();for(let v=0,w=p.length;v<w;v++)if(s.insert(p[v]),s.size>L0)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new pP(s);let a=s.size,u=s.pop();for(;u;){const c=u.key;if(s.size===a){const p=c.segment;throw new Error(`Unable to pop() ${c.isLeft?"left":"right"} SweepEvent [${c.point.x}, ${c.point.y}] from segment #${p.id} [${p.leftSE.point.x}, ${p.leftSE.point.y}] -> [${p.rightSE.point.x}, ${p.rightSE.point.y}] from queue.`)}if(s.size>L0)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>vP)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=o.process(c);for(let p=0,v=f.length;p<v;p++){const w=f[p];w.consumedBy===void 0&&s.insert(w)}a=s.size,u=s.pop()}Ju.reset();const h=ll.factory(o.segments);return new gP(h).getGeom()}}const ti=new mP;var of={union:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("union",r,e)},intersection:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("intersection",r,e)},xor:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("xor",r,e)},difference:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("difference",r,e)}};function yP(r,t){var e=en(r),n=en(t),i=r.properties||{},s=of.difference(e.coordinates,n.coordinates);return s.length===0?null:s.length===1?dr(s[0],i):Uc(s,i)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!==r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var co=function(){};co.prototype.interfaces_=function(){return[]},co.prototype.getClass=function(){return co},co.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var se=function(r){function t(e){r.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),yt=function(){},R0={MAX_VALUE:{configurable:!0}};yt.isNaN=function(t){return Number.isNaN(t)},yt.doubleToLongBits=function(t){return t},yt.longBitsToDouble=function(t){return t},yt.isInfinite=function(t){return!Number.isFinite(t)},R0.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(yt,R0);var Wr=function(){},cl=function(){},fa=function(){};function Xr(){}var D=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},fo={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};D.prototype.setOrdinate=function(t,e){switch(t){case D.X:this.x=e;break;case D.Y:this.y=e;break;case D.Z:this.z=e;break;default:throw new se("Invalid ordinate index: "+t)}},D.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return!(!co.equalsWithTolerance(this.x,e.x,n)||!co.equalsWithTolerance(this.y,e.y,n))}},D.prototype.getOrdinate=function(t){switch(t){case D.X:return this.x;case D.Y:return this.y;case D.Z:return this.z}throw new se("Invalid ordinate index: "+t)},D.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||yt.isNaN(this.z))&&yt.isNaN(t.z)},D.prototype.equals=function(t){return t instanceof D?this.equals2D(t):!1},D.prototype.equalInZ=function(t,e){return co.equalsWithTolerance(this.z,t.z,e)},D.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},D.prototype.clone=function(){},D.prototype.copy=function(){return new D(this)},D.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},D.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},D.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},D.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this.x),t=37*t+D.hashCode(this.y),t},D.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},D.prototype.interfaces_=function(){return[Wr,cl,Xr]},D.prototype.getClass=function(){return D},D.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=yt.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},fo.DimensionalComparator.get=function(){return es},fo.serialVersionUID.get=function(){return 6683108902428367e3},fo.NULL_ORDINATE.get=function(){return yt.NaN},fo.X.get=function(){return 0},fo.Y.get=function(){return 1},fo.Z.get=function(){return 2},Object.defineProperties(D,fo);var es=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new se("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};es.prototype.compare=function(t,e){var n=t,i=e,s=es.compare(n.x,i.x);if(s!==0)return s;var o=es.compare(n.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=es.compare(n.z,i.z);return a},es.prototype.interfaces_=function(){return[fa]},es.prototype.getClass=function(){return es},es.compare=function(t,e){return t<e?-1:t>e?1:yt.isNaN(t)?yt.isNaN(e)?0:-1:yt.isNaN(e)?1:0};var da=function(){};da.prototype.create=function(){},da.prototype.interfaces_=function(){return[]},da.prototype.getClass=function(){return da};var F=function(){},ju={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};F.prototype.interfaces_=function(){return[]},F.prototype.getClass=function(){return F},F.toLocationSymbol=function(t){switch(t){case F.EXTERIOR:return"e";case F.BOUNDARY:return"b";case F.INTERIOR:return"i";case F.NONE:return"-"}throw new se("Unknown location value: "+t)},ju.INTERIOR.get=function(){return 0},ju.BOUNDARY.get=function(){return 1},ju.EXTERIOR.get=function(){return 2},ju.NONE.get=function(){return-1},Object.defineProperties(F,ju);var pt=function(r,t){return r.interfaces_&&r.interfaces_().indexOf(t)>-1},Ar=function(){},F0={LOG_10:{configurable:!0}};Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar},Ar.log10=function(t){var e=Math.log(t);return yt.isInfinite(e)||yt.isNaN(e)?e:e/Ar.LOG_10},Ar.min=function(t,e,n,i){var s=t;return e<s&&(s=e),n<s&&(s=n),i<s&&(s=i),s},Ar.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},Ar.wrap=function(t,e){return t<0?e- -t%e:t%e},Ar.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],h=s;return o>h&&(h=o),a>h&&(h=a),u>h&&(h=u),h}},Ar.average=function(t,e){return(t+e)/2},F0.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Ar,F0);var wn=function(t){this.str=t};wn.prototype.append=function(t){this.str+=t},wn.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},wn.prototype.toString=function(t){return this.str};var En=function(t){this.value=t};En.prototype.intValue=function(){return this.value},En.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},En.isNaN=function(t){return Number.isNaN(t)};var Qu=function(){};Qu.isWhitespace=function(t){return t<=32&&t>=0||t===127},Qu.toUpperCase=function(t){return t.toUpperCase()};var z=function r(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];r.call(this,r.parse(n))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},rn={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};z.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},z.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=z.magnitude(n._hi),s=z.TEN.pow(i);n=n.divide(s),n.gt(z.TEN)?(n=n.divide(z.TEN),i+=1):n.lt(z.ONE)&&(n=n.multiply(z.TEN),i-=1);for(var o=i+1,a=new wn,u=z.MAX_PRINT_DIGITS-1,h=0;h<=u;h++){t&&h===o&&a.append(".");var l=Math.trunc(n._hi);if(l<0)break;var c=!1,f=0;l>9?(c=!0,f="9"):f="0"+l,a.append(f),n=n.subtract(z.valueOf(l)).multiply(z.TEN),c&&n.selfAdd(z.TEN);var p=!0,v=z.magnitude(n._hi);if(v<0&&Math.abs(v)>=u-h&&(p=!1),!p)break}return e[0]=i,a.toString()},z.prototype.sqr=function(){return this.multiply(this)},z.prototype.doubleValue=function(){return this._hi+this._lo},z.prototype.subtract=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},z.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},z.prototype.isZero=function(){return this._hi===0&&this._lo===0},z.prototype.selfSubtract=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},z.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},z.prototype.min=function(t){return this.le(t)?this:t},z.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,h=null,l=null,c=null,f=null;return h=this._hi/n,l=z.SPLIT*h,s=l-h,f=z.SPLIT*n,s=l-s,o=h-s,a=f-n,c=h*n,a=f-a,u=n-a,f=s*a-c+s*u+o*a+o*u,l=(this._hi-c-f+this._lo-h*i)/n,f=h+l,this._hi=f,this._lo=h-f+l,this}},z.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},z.prototype.divide=function(){if(arguments[0]instanceof z){var t=arguments[0],e=null,n=null,i=null,s=null,o=null,a=null,u=null,h=null;o=this._hi/t._hi,a=z.SPLIT*o,e=a-o,h=z.SPLIT*t._hi,e=a-e,n=o-e,i=h-t._hi,u=o*t._hi,i=h-i,s=t._hi-i,h=e*i-u+e*s+n*i+n*s,a=(this._hi-u-h+this._lo-o*t._lo)/t._hi,h=o+a;var l=h,c=o-h+a;return new z(l,c)}else if(typeof arguments[0]=="number"){var f=arguments[0];return yt.isNaN(f)?z.createNaN():z.copy(this).selfDivide(f,0)}},z.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},z.prototype.pow=function(t){if(t===0)return z.valueOf(1);var e=new z(this),n=z.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&n.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},z.prototype.ceil=function(){if(this.isNaN())return z.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new z(t,e)},z.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},z.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},z.prototype.setValue=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},z.prototype.max=function(t){return this.ge(t)?this:t},z.prototype.sqrt=function(){if(this.isZero())return z.valueOf(0);if(this.isNegative())return z.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=z.valueOf(e),i=this.subtract(n.sqr()),s=i._hi*(t*.5);return n.add(s)},z.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,i=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,n=s+u,i=u+(s-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var h=arguments[0],l=arguments[1],c=null,f=null,p=null,v=null,w=null,E=null,I=null,y=null;w=this._hi+h,p=this._lo+l,I=w-this._hi,y=p-this._lo,E=w-I,v=p-y,E=h-I+(this._hi-E),v=l-y+(this._lo-v),I=E+p,c=w+I,f=I+(w-c),I=v+f;var _=c+I,m=I+(c-_);return this._hi=_,this._lo=m,this}},z.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,h=null,l=null;h=z.SPLIT*this._hi,s=h-this._hi,l=z.SPLIT*n,s=h-s,o=this._hi-s,a=l-n,h=this._hi*n,a=l-a,u=n-a,l=s*a-h+s*u+o*a+o*u+(this._hi*i+this._lo*n);var c=h+l;s=h-c;var f=l+s;return this._hi=c,this._lo=f,this}},z.prototype.selfSqr=function(){return this.selfMultiply(this)},z.prototype.floor=function(){if(this.isNaN())return z.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new z(t,e)},z.prototype.negate=function(){return this.isNaN()?this:new z(-this._hi,-this._lo)},z.prototype.clone=function(){},z.prototype.multiply=function(){if(arguments[0]instanceof z){var t=arguments[0];return t.isNaN()?z.createNaN():z.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return yt.isNaN(e)?z.createNaN():z.copy(this).selfMultiply(e,0)}},z.prototype.isNaN=function(){return yt.isNaN(this._hi)},z.prototype.intValue=function(){return Math.trunc(this._hi)},z.prototype.toString=function(){var t=z.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},z.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(i<0)s="0."+z.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var o=i-n.length,a=z.stringOfChar("0",o);s=n+a+".0"}return this.isNegative()?"-"+s:s},z.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=z.SPLIT*s,t=o-s,u=z.SPLIT*this._hi,t=o-t,e=s-t,n=u-this._hi,a=s*this._hi,n=u-n,i=this._hi-n,u=t*n-a+t*i+e*n+e*i,o=(1-a-u-s*this._lo)/this._hi;var h=s+o,l=s-h+o;return new z(h,l)},z.prototype.toSciNotation=function(){if(this.isZero())return z.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=z.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var o=n.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},z.prototype.abs=function(){return this.isNaN()?z.NaN:this.isNegative()?this.negate():new z(this)},z.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},z.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},z.prototype.add=function(){if(arguments[0]instanceof z){var t=arguments[0];return z.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return z.copy(this).selfAdd(e)}},z.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof z){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},z.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},z.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},z.prototype.trunc=function(){return this.isNaN()?z.NaN:this.isPositive()?this.floor():this.ceil()},z.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},z.prototype.interfaces_=function(){return[Xr,Wr,cl]},z.prototype.getClass=function(){return z},z.sqr=function(t){return z.valueOf(t).selfMultiply(t)},z.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return z.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new z(e)}},z.sqrt=function(t){return z.valueOf(t).sqrt()},z.parse=function(t){for(var e=0,n=t.length;Qu.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var o=new z,a=0,u=0,h=0;!(e>=n);){var l=t.charAt(e);if(e++,Qu.isDigit(l)){var c=l-"0";o.selfMultiply(z.TEN),o.selfAdd(c),a++;continue}if(l==="."){u=a;continue}if(l==="e"||l==="E"){var f=t.substring(e);try{h=En.parseInt(f)}catch(I){throw I instanceof Error?new Error("Invalid exponent "+f+" in string "+t):I}finally{}break}throw new Error("Unexpected character '"+l+"' at position "+e+" in string "+t)}var p=o,v=a-u-h;if(v===0)p=o;else if(v>0){var w=z.TEN.pow(v);p=o.divide(w)}else if(v<0){var E=z.TEN.pow(-v);p=o.multiply(E)}return i?p.negate():p},z.createNaN=function(){return new z(yt.NaN,yt.NaN)},z.copy=function(t){return new z(t)},z.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},z.stringOfChar=function(t,e){for(var n=new wn,i=0;i<e;i++)n.append(t);return n.toString()},rn.PI.get=function(){return new z(3.141592653589793,12246467991473532e-32)},rn.TWO_PI.get=function(){return new z(6.283185307179586,24492935982947064e-32)},rn.PI_2.get=function(){return new z(1.5707963267948966,6123233995736766e-32)},rn.E.get=function(){return new z(2.718281828459045,14456468917292502e-32)},rn.NaN.get=function(){return new z(yt.NaN,yt.NaN)},rn.EPS.get=function(){return 123259516440783e-46},rn.SPLIT.get=function(){return 134217729},rn.MAX_PRINT_DIGITS.get=function(){return 32},rn.TEN.get=function(){return z.valueOf(10)},rn.ONE.get=function(){return z.valueOf(1)},rn.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},rn.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(z,rn);var ir=function(){},G0={DP_SAFE_EPSILON:{configurable:!0}};ir.prototype.interfaces_=function(){return[]},ir.prototype.getClass=function(){return ir},ir.orientationIndex=function(t,e,n){var i=ir.orientationIndexFilter(t,e,n);if(i<=1)return i;var s=z.valueOf(e.x).selfAdd(-t.x),o=z.valueOf(e.y).selfAdd(-t.y),a=z.valueOf(n.x).selfAdd(-e.x),u=z.valueOf(n.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},ir.signOfDet2x2=function(t,e,n,i){var s=t.multiply(i).selfSubtract(e.multiply(n));return s.signum()},ir.intersection=function(t,e,n,i){var s=z.valueOf(i.y).selfSubtract(n.y).selfMultiply(z.valueOf(e.x).selfSubtract(t.x)),o=z.valueOf(i.x).selfSubtract(n.x).selfMultiply(z.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=z.valueOf(i.x).selfSubtract(n.x).selfMultiply(z.valueOf(t.y).selfSubtract(n.y)),h=z.valueOf(i.y).selfSubtract(n.y).selfMultiply(z.valueOf(t.x).selfSubtract(n.x)),l=u.subtract(h),c=l.selfDivide(a).doubleValue(),f=z.valueOf(t.x).selfAdd(z.valueOf(e.x).selfSubtract(t.x).selfMultiply(c)).doubleValue(),p=z.valueOf(e.x).selfSubtract(t.x).selfMultiply(z.valueOf(t.y).selfSubtract(n.y)),v=z.valueOf(e.y).selfSubtract(t.y).selfMultiply(z.valueOf(t.x).selfSubtract(n.x)),w=p.subtract(v),E=w.selfDivide(a).doubleValue(),I=z.valueOf(n.y).selfAdd(z.valueOf(i.y).selfSubtract(n.y).selfMultiply(E)).doubleValue();return new D(f,I)},ir.orientationIndexFilter=function(t,e,n){var i=null,s=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),a=s-o;if(s>0){if(o<=0)return ir.signum(a);i=s+o}else if(s<0){if(o>=0)return ir.signum(a);i=-s-o}else return ir.signum(a);var u=ir.DP_SAFE_EPSILON*i;return a>=u||-a>=u?ir.signum(a):2},ir.signum=function(t){return t>0?1:t<0?-1:0},G0.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(ir,G0);var Dt=function(){},Ku={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ku.X.get=function(){return 0},Ku.Y.get=function(){return 1},Ku.Z.get=function(){return 2},Ku.M.get=function(){return 3},Dt.prototype.setOrdinate=function(t,e,n){},Dt.prototype.size=function(){},Dt.prototype.getOrdinate=function(t,e){},Dt.prototype.getCoordinate=function(){},Dt.prototype.getCoordinateCopy=function(t){},Dt.prototype.getDimension=function(){},Dt.prototype.getX=function(t){},Dt.prototype.clone=function(){},Dt.prototype.expandEnvelope=function(t){},Dt.prototype.copy=function(){},Dt.prototype.getY=function(t){},Dt.prototype.toCoordinateArray=function(){},Dt.prototype.interfaces_=function(){return[cl]},Dt.prototype.getClass=function(){return Dt},Object.defineProperties(Dt,Ku);var k0=function(){},ga=function(r){function t(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(k0),De=function(){};De.arraycopy=function(t,e,n,i,s){for(var o=0,a=e;a<e+s;a++)n[i+o]=t[a],o++},De.getProperty=function(t){return{"line.separator":`
|
|
66
|
-
`}[t]};var nn=function r(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof r&&arguments[1]instanceof r){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var u=arguments[0],h=arguments[1],l=arguments[2];this.x=u,this.y=h,this.w=l}else if(arguments.length===4){var c=arguments[0],f=arguments[1],p=arguments[2],v=arguments[3],w=c.y-f.y,E=f.x-c.x,I=c.x*f.y-f.x*c.y,y=p.y-v.y,_=v.x-p.x,m=p.x*v.y-v.x*p.y;this.x=E*m-_*I,this.y=y*I-w*m,this.w=w*_-y*E}};nn.prototype.getY=function(){var t=this.y/this.w;if(yt.isNaN(t)||yt.isInfinite(t))throw new ga;return t},nn.prototype.getX=function(){var t=this.x/this.w;if(yt.isNaN(t)||yt.isInfinite(t))throw new ga;return t},nn.prototype.getCoordinate=function(){var t=new D;return t.x=this.getX(),t.y=this.getY(),t},nn.prototype.interfaces_=function(){return[]},nn.prototype.getClass=function(){return nn},nn.intersection=function(t,e,n,i){var s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=n.y-i.y,h=i.x-n.x,l=n.x*i.y-i.x*n.y,c=o*l-h*a,f=u*a-s*l,p=s*h-u*o,v=c/p,w=f/p;if(yt.isNaN(v)||yt.isInfinite(v)||yt.isNaN(w)||yt.isInfinite(w))throw new ga;return new D(v,w)};var at=function r(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];this.init(s,o,a,u)}},V0={serialVersionUID:{configurable:!0}};at.prototype.getArea=function(){return this.getWidth()*this.getHeight()},at.prototype.equals=function(t){if(!(t instanceof at))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},at.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new at;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new at(e,i,n,s)},at.prototype.isNull=function(){return this._maxx<this._minx},at.prototype.getMaxX=function(){return this._maxx},at.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},at.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof at){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof D){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},at.prototype.getMinY=function(){return this._miny},at.prototype.getMinX=function(){return this._minx},at.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},at.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},at.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},at.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},at.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},at.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},at.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},at.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},at.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},at.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},at.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof at){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},at.prototype.centre=function(){return this.isNull()?null:new D((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},at.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},at.prototype.getMaxY=function(){return this._maxy},at.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)},at.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this._minx),t=37*t+D.hashCode(this._maxx),t=37*t+D.hashCode(this._miny),t=37*t+D.hashCode(this._maxy),t},at.prototype.interfaces_=function(){return[Wr,Xr]},at.prototype.getClass=function(){return at},at.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=Math.min(o.x,a.x),h=Math.max(o.x,a.x),l=Math.min(i.x,s.x),c=Math.max(i.x,s.x);return!(l>h||c<u||(u=Math.min(o.y,a.y),h=Math.max(o.y,a.y),l=Math.min(i.y,s.y),c=Math.max(i.y,s.y),l>h)||c<u)}},V0.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(at,V0);var Sn={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},fl=function(t){this.geometryFactory=t||new xt};fl.prototype.read=function(t){var e,n,i;t=t.replace(/[\n\r]/g," ");var s=Sn.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=Sn.emptyTypeStr.exec(t),s[2]=void 0),s&&(n=s[1].toLowerCase(),i=s[2],pa[n]&&(e=pa[n].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},fl.prototype.write=function(t){return this.extractGeometry(t)},fl.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Mi[e])return null;var n=e.toUpperCase(),i;return t.isEmpty()?i=n+" EMPTY":i=n+"("+Mi[e].apply(this,[t])+")",i};var Mi={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Mi.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+Mi.point.apply(e,[t._geometries[i]])+")");return n.join(",")},linestring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(Mi.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},linearring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(Mi.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},multilinestring:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+Mi.linestring.apply(e,[t._geometries[i]])+")");return n.join(",")},polygon:function(t){var e=this,n=[];n.push("("+Mi.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)n.push("("+Mi.linestring.apply(e,[t._holes[i]])+")");return n.join(",")},multipolygon:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+Mi.polygon.apply(e,[t._geometries[i]])+")");return n.join(",")},geometrycollection:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push(e.extractGeometry(t._geometries[i]));return n.join(",")}},pa={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(Sn.spaces);return this.geometryFactory.createPoint(new D(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var n,i=t.trim().split(","),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Sn.trimParens,"$1"),s.push(pa.point.apply(e,[n]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),n=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Sn.spaces),n.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(n)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),n=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Sn.spaces),n.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var n,i=t.trim().split(Sn.parenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Sn.trimParens,"$1"),s.push(pa.linestring.apply(e,[n]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var n,i,s,o=t.trim().split(Sn.parenComma),a,u=[],h=0,l=o.length;h<l;++h)n=o[h].replace(Sn.trimParens,"$1"),i=pa.linestring.apply(e,[n]),s=e.geometryFactory.createLinearRing(i._points),h===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=t.trim().split(Sn.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Sn.trimParens,"$1"),s.push(pa.polygon.apply(e,[n]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var n=t.trim().split("|"),i=[],s=0,o=n.length;s<o;++s)i.push(e.read(n[s]));return this.geometryFactory.createGeometryCollection(i)}},sn=function(t){this.parser=new fl(t)};sn.prototype.write=function(t){return this.parser.write(t)},sn.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var bi=function(r){function t(e){r.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),dl=function(r){function t(){if(r.call(this),arguments.length===0)r.call(this);else if(arguments.length===1){var e=arguments[0];r.call(this,e)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(bi),Pt=function(){};Pt.prototype.interfaces_=function(){return[]},Pt.prototype.getClass=function(){return Pt},Pt.shouldNeverReachHere=function(){if(arguments.length===0)Pt.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new dl("Should never reach here"+(t!==null?": "+t:""))}},Pt.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],Pt.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new dl:new dl(e)},Pt.equals=function(){var t,e,n;if(arguments.length===2)t=arguments[0],e=arguments[1],Pt.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new dl("Expected "+t+" but encountered "+e+(n!==null?": "+n:""))};var ue=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new D,this._intPt[1]=new D,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},go={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};ue.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},ue.prototype.getTopologySummary=function(){var t=new wn;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},ue.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},ue.prototype.getIntersectionNum=function(){return this._result},ue.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),n=this.getEdgeDistance(t,1);e>n?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},ue.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},ue.prototype.setPrecisionModel=function(t){this._precisionModel=t},ue.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;n<this._result;n++)if(!(t._intPt[n].equals2D(t._inputLines[e][0])||t._intPt[n].equals2D(t._inputLines[e][1])))return!0;return!1}},ue.prototype.getIntersection=function(t){return this._intPt[t]},ue.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},ue.prototype.hasIntersection=function(){return this._result!==ue.NO_INTERSECTION},ue.prototype.getEdgeDistance=function(t,e){var n=ue.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return n},ue.prototype.isCollinear=function(){return this._result===ue.COLLINEAR_INTERSECTION},ue.prototype.toString=function(){return sn.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+sn.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},ue.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},ue.prototype.isIntersection=function(t){for(var e=this,n=0;n<this._result;n++)if(e._intPt[n].equals2D(t))return!0;return!1},ue.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},ue.prototype.interfaces_=function(){return[]},ue.prototype.getClass=function(){return ue},ue.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),s=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))i>s?o=i:o=s;else{var a=Math.abs(t.x-e.x),u=Math.abs(t.y-e.y);i>s?o=a:o=u,o===0&&!t.equals(e)&&(o=Math.max(a,u))}return Pt.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},ue.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s);return Pt.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},go.DONT_INTERSECT.get=function(){return 0},go.DO_INTERSECT.get=function(){return 1},go.COLLINEAR.get=function(){return 2},go.NO_INTERSECTION.get=function(){return 0},go.POINT_INTERSECTION.get=function(){return 1},go.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(ue,go);var As=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(n){var i=new at(this._inputLines[0][0],this._inputLines[0][1]),s=new at(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(n)&&s.contains(n)},t.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,at.intersects(i,s,n)&&K.orientationIndex(i,s,n)===0&&K.orientationIndex(s,i,n)===0)return this._isProper=!0,(n.equals(i)||n.equals(s))&&(this._isProper=!1),this._result=r.POINT_INTERSECTION,null;this._result=r.NO_INTERSECTION}else return r.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(n,i,s,o,a){a.x=this.smallestInAbsValue(n.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(n.y,i.y,s.y,o.y),n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.safeHCoordinateIntersection=function(n,i,s,o){var a=null;try{a=nn.intersection(n,i,s,o)}catch(u){if(u instanceof ga)a=t.nearestEndpoint(n,i,s,o);else throw u}finally{}return a},t.prototype.intersection=function(n,i,s,o){var a=this.intersectionWithNormalization(n,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new D(t.nearestEndpoint(n,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(n,i,s,o){var a=n,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},t.prototype.checkDD=function(n,i,s,o,a){var u=ir.intersection(n,i,s,o),h=this.isInSegmentEnvelopes(u);De.out.println("DD in env = "+h+" --------------------- "+u),a.distance(u)>1e-4&&De.out.println("Distance = "+a.distance(u))},t.prototype.intersectionWithNormalization=function(n,i,s,o){var a=new D(n),u=new D(i),h=new D(s),l=new D(o),c=new D;this.normalizeToEnvCentre(a,u,h,l,c);var f=this.safeHCoordinateIntersection(a,u,h,l);return f.x+=c.x,f.y+=c.y,f},t.prototype.computeCollinearIntersection=function(n,i,s,o){var a=at.intersects(n,i,s),u=at.intersects(n,i,o),h=at.intersects(s,o,n),l=at.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,r.COLLINEAR_INTERSECTION):h&&l?(this._intPt[0]=n,this._intPt[1]=i,r.COLLINEAR_INTERSECTION):a&&h?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!u&&!l?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!h?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):u&&h?(this._intPt[0]=o,this._intPt[1]=n,o.equals(n)&&!a&&!l?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!h?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):r.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(n,i,s,o,a){var u=n.x<i.x?n.x:i.x,h=n.y<i.y?n.y:i.y,l=n.x>i.x?n.x:i.x,c=n.y>i.y?n.y:i.y,f=s.x<o.x?s.x:o.x,p=s.y<o.y?s.y:o.y,v=s.x>o.x?s.x:o.x,w=s.y>o.y?s.y:o.y,E=u>f?u:f,I=l<v?l:v,y=h>p?h:p,_=c<w?c:w,m=(E+I)/2,S=(y+_)/2;a.x=m,a.y=S,n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.computeIntersect=function(n,i,s,o){if(this._isProper=!1,!at.intersects(n,i,s,o))return r.NO_INTERSECTION;var a=K.orientationIndex(n,i,s),u=K.orientationIndex(n,i,o);if(a>0&&u>0||a<0&&u<0)return r.NO_INTERSECTION;var h=K.orientationIndex(s,o,n),l=K.orientationIndex(s,o,i);if(h>0&&l>0||h<0&&l<0)return r.NO_INTERSECTION;var c=a===0&&u===0&&h===0&&l===0;return c?this.computeCollinearIntersection(n,i,s,o):(a===0||u===0||h===0||l===0?(this._isProper=!1,n.equals2D(s)||n.equals2D(o)?this._intPt[0]=n:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new D(s):u===0?this._intPt[0]=new D(o):h===0?this._intPt[0]=new D(n):l===0&&(this._intPt[0]=new D(i))):(this._isProper=!0,this._intPt[0]=this.intersection(n,i,s,o)),r.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(n,i,s,o){var a=n,u=K.distancePointLine(n,s,o),h=K.distancePointLine(i,s,o);return h<u&&(u=h,a=i),h=K.distancePointLine(s,n,i),h<u&&(u=h,a=s),h=K.distancePointLine(o,n,i),h<u&&(u=h,a=o),a},t}(ue),po=function(){};po.prototype.interfaces_=function(){return[]},po.prototype.getClass=function(){return po},po.orientationIndex=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,o=n.x-e.x,a=n.y-e.y;return po.signOfDet2x2(i,s,o,a)},po.signOfDet2x2=function(t,e,n,i){var s=null,o=null,a=null;if(s=1,t===0||i===0)return e===0||n===0?0:e>0?n>0?-s:s:n>0?s:-s;if(e===0||n===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(s=-s,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(s=-s,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(s=-s,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0)if(n>0){if(!(t<=n))return s}else return s;else{if(n>0)return-s;if(t>=n)s=-s,t=-t,n=-n;else return-s}for(;;){if(a=Math.floor(n/t),n=n-a*t,i=i-a*e,i<0)return-s;if(i>e)return s;if(t>n+n){if(e<i+i)return s}else{if(e>i+i)return-s;n=t-n,i=e-i,s=-s}if(i===0)return n===0?0:-s;if(n===0||(a=Math.floor(t/n),t=t-a*n,e=e-a*i,e<0))return s;if(e>i)return-s;if(n>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=n-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var Cn=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Cn.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,u=e.y-this._p.y,h=po.signOfDet2x2(s,o,a,u);if(h===0)return this._isPointOnSegment=!0,null;u<o&&(h=-h),h>0&&this._crossingCount++}},Cn.prototype.isPointInPolygon=function(){return this.getLocation()!==F.EXTERIOR},Cn.prototype.getLocation=function(){return this._isPointOnSegment?F.BOUNDARY:this._crossingCount%2===1?F.INTERIOR:F.EXTERIOR},Cn.prototype.isOnSegment=function(){return this._isPointOnSegment},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.locatePointInRing=function(){if(arguments[0]instanceof D&&pt(arguments[1],Dt)){for(var t=arguments[0],e=arguments[1],n=new Cn(t),i=new D,s=new D,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,s),n.countSegment(i,s),n.isOnSegment())return n.getLocation();return n.getLocation()}else if(arguments[0]instanceof D&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],h=new Cn(a),l=1;l<u.length;l++){var c=u[l],f=u[l-1];if(h.countSegment(c,f),h.isOnSegment())return h.getLocation()}return h.getLocation()}};var K=function(){},vo={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};K.prototype.interfaces_=function(){return[]},K.prototype.getClass=function(){return K},K.orientationIndex=function(t,e,n){return ir.orientationIndex(t,e,n)},K.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-n,o=t[i+1].y,a=t[i-1].y;e+=s*(a-o)}return e/2}else if(pt(arguments[0],Dt)){var u=arguments[0],h=u.size();if(h<3)return 0;var l=new D,c=new D,f=new D;u.getCoordinate(0,c),u.getCoordinate(1,f);var p=c.x;f.x-=p;for(var v=0,w=1;w<h-1;w++)l.y=c.y,c.x=f.x,c.y=f.y,u.getCoordinate(w+1,f),f.x-=p,v+=c.x*(l.y-f.y);return v/2}},K.distanceLineLine=function(t,e,n,i){if(t.equals(e))return K.distancePointLine(t,n,i);if(n.equals(i))return K.distancePointLine(i,t,e);var s=!1;if(!at.intersects(t,e,n,i))s=!0;else{var o=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(o===0)s=!0;else{var a=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),u=(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y),h=u/o,l=a/o;(l<0||l>1||h<0||h>1)&&(s=!0)}}return s?Ar.min(K.distancePointLine(t,n,i),K.distancePointLine(e,n,i),K.distancePointLine(n,t,e),K.distancePointLine(i,t,e)):0},K.isPointInRing=function(t,e){return K.locatePointInRing(t,e)!==F.EXTERIOR},K.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new D;t.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<e;a++){t.getCoordinate(a,i);var u=i.x,h=i.y,l=u-s,c=h-o;n+=Math.sqrt(l*l+c*c),s=u,o=h}return n},K.isCCW=function(t){var e=t.length-1;if(e<3)throw new se("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],i=0,s=1;s<=e;s++){var o=t[s];o.y>n.y&&(n=o,i=s)}var a=i;do a=a-1,a<0&&(a=e);while(t[a].equals2D(n)&&a!==i);var u=i;do u=(u+1)%e;while(t[u].equals2D(n)&&u!==i);var h=t[a],l=t[u];if(h.equals2D(n)||l.equals2D(n)||h.equals2D(l))return!1;var c=K.computeOrientation(h,n,l),f=!1;return c===0?f=h.x>l.x:f=c>0,f},K.locatePointInRing=function(t,e){return Cn.locatePointInRing(t,e)},K.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),s=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},K.computeOrientation=function(t,e,n){return K.orientationIndex(t,e,n)},K.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new se("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var s=K.distancePointLine(t,e[i],e[i+1]);s<n&&(n=s)}return n}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var h=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),l=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/h;if(l<=0)return o.distance(a);if(l>=1)return o.distance(u);var c=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/h;return Math.abs(c)*Math.sqrt(h)}},K.isOnLine=function(t,e){for(var n=new As,i=1;i<e.length;i++){var s=e[i-1],o=e[i];if(n.computeIntersection(t,s,o),n.hasIntersection())return!0}return!1},vo.CLOCKWISE.get=function(){return-1},vo.RIGHT.get=function(){return K.CLOCKWISE},vo.COUNTERCLOCKWISE.get=function(){return 1},vo.LEFT.get=function(){return K.COUNTERCLOCKWISE},vo.COLLINEAR.get=function(){return 0},vo.STRAIGHT.get=function(){return K.COLLINEAR},Object.defineProperties(K,vo);var Ni=function(){};Ni.prototype.filter=function(t){},Ni.prototype.interfaces_=function(){return[]},Ni.prototype.getClass=function(){return Ni};var gt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ei={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};gt.prototype.isGeometryCollection=function(){return this.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION},gt.prototype.getFactory=function(){return this._factory},gt.prototype.getGeometryN=function(t){return this},gt.prototype.getArea=function(){return 0},gt.prototype.isRectangle=function(){return!1},gt.prototype.equals=function(){if(arguments[0]instanceof gt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof gt))return!1;var n=e;return this.equalsExact(n)}},gt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},gt.prototype.geometryChanged=function(){this.apply(gt.geometryChangedFilter)},gt.prototype.geometryChangedAction=function(){this._envelope=null},gt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},gt.prototype.getLength=function(){return 0},gt.prototype.getNumGeometries=function(){return 1},gt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},gt.prototype.getUserData=function(){return this._userData},gt.prototype.getSRID=function(){return this._SRID},gt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},gt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION)throw new se("This method does not support GeometryCollection arguments")},gt.prototype.equal=function(t,e,n){return n===0?t.equals(e):t.distance(e)<=n},gt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},gt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},gt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new at(this._envelope)},gt.prototype.setSRID=function(t){this._SRID=t},gt.prototype.setUserData=function(t){this._userData=t},gt.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var s=n.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return n.hasNext()?1:i.hasNext()?-1:0},gt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},gt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===gt.SORTINDEX_MULTIPOINT||this.getSortIndex()===gt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===gt.SORTINDEX_MULTIPOLYGON},gt.prototype.interfaces_=function(){return[cl,Wr,Xr]},gt.prototype.getClass=function(){return gt},gt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},gt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},ei.serialVersionUID.get=function(){return 8763622679187377e3},ei.SORTINDEX_POINT.get=function(){return 0},ei.SORTINDEX_MULTIPOINT.get=function(){return 1},ei.SORTINDEX_LINESTRING.get=function(){return 2},ei.SORTINDEX_LINEARRING.get=function(){return 3},ei.SORTINDEX_MULTILINESTRING.get=function(){return 4},ei.SORTINDEX_POLYGON.get=function(){return 5},ei.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ei.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ei.geometryChangedFilter.get=function(){return af},Object.defineProperties(gt,ei);var af=function(){};af.interfaces_=function(){return[Ni]},af.filter=function(t){t.geometryChangedAction()};var ri=function(){};ri.prototype.filter=function(t){},ri.prototype.interfaces_=function(){return[]},ri.prototype.getClass=function(){return ri};var Hr=function(){},xi={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};Hr.prototype.isInBoundary=function(t){},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},xi.Mod2BoundaryNodeRule.get=function(){return va},xi.EndPointBoundaryNodeRule.get=function(){return ma},xi.MultiValentEndPointBoundaryNodeRule.get=function(){return ya},xi.MonoValentEndPointBoundaryNodeRule.get=function(){return _a},xi.MOD2_BOUNDARY_RULE.get=function(){return new va},xi.ENDPOINT_BOUNDARY_RULE.get=function(){return new ma},xi.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ya},xi.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new _a},xi.OGC_SFS_BOUNDARY_RULE.get=function(){return Hr.MOD2_BOUNDARY_RULE},Object.defineProperties(Hr,xi);var va=function(){};va.prototype.isInBoundary=function(t){return t%2===1},va.prototype.interfaces_=function(){return[Hr]},va.prototype.getClass=function(){return va};var ma=function(){};ma.prototype.isInBoundary=function(t){return t>0},ma.prototype.interfaces_=function(){return[Hr]},ma.prototype.getClass=function(){return ma};var ya=function(){};ya.prototype.isInBoundary=function(t){return t>1},ya.prototype.interfaces_=function(){return[Hr]},ya.prototype.getClass=function(){return ya};var _a=function(){};_a.prototype.isInBoundary=function(t){return t===1},_a.prototype.interfaces_=function(){return[Hr]},_a.prototype.getClass=function(){return _a};var Ce=function(){};Ce.prototype.add=function(){},Ce.prototype.addAll=function(){},Ce.prototype.isEmpty=function(){},Ce.prototype.iterator=function(){},Ce.prototype.size=function(){},Ce.prototype.toArray=function(){},Ce.prototype.remove=function(){};function uf(r){this.message=r||""}uf.prototype=new Error,uf.prototype.name="IndexOutOfBoundsException";var wa=function(){};wa.prototype.hasNext=function(){},wa.prototype.next=function(){},wa.prototype.remove=function(){};var on=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Ce);function Ea(r){this.message=r||""}Ea.prototype=new Error,Ea.prototype.name="NoSuchElementException";var j=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Ce&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[r,Ce]},t.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(n,i){var s=this.array_[n];return this.array_[n]=i,s},t.prototype.iterator=function(){return new _P(this)},t.prototype.get=function(n){if(n<0||n>=this.size())throw new uf;return this.array_[n]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var n=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(n.array_[s]);return i},t.prototype.remove=function(n){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===n){i.array_.splice(o,1),s=!0;break}return s},t}(on),_P=function(r){function t(e){r.call(this),this.arrayList_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new Ea;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(n){return this.arrayList_.set(this.position_-1,n)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(wa),$u=function(r){function t(){if(r.call(this),arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.ensureCapacity(n.length),this.add(n,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,u=s.iterator();u.hasNext();)i.add(u.next(),o),a=!0;return a}else return r.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=r.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];r.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof D&&typeof arguments[1]=="boolean"){var u=arguments[0],h=arguments[1];if(!h&&this.size()>=1){var l=this.get(this.size()-1);if(l.equals2D(u))return null}r.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var c=arguments[0],f=arguments[1];return this.add(c,f),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var p=arguments[0],v=arguments[1],w=arguments[2];if(w)for(var E=0;E<p.length;E++)i.add(p[E],v);else for(var I=p.length-1;I>=0;I--)i.add(p[I],v);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof D){var y=arguments[0],_=arguments[1],m=arguments[2];if(!m){var S=this.size();if(S>0){if(y>0){var C=this.get(y-1);if(C.equals2D(_))return null}if(y<S){var P=this.get(y);if(P.equals2D(_))return null}}}r.prototype.add.call(this,y,_)}}else if(arguments.length===4){var b=arguments[0],x=arguments[1],A=arguments[2],N=arguments[3],T=1;A>N&&(T=-1);for(var R=A;R!==N;R+=T)i.add(b[R],x);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new D(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(j),Nt=function(){},gl={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};gl.ForwardComparator.get=function(){return Zu},gl.BidirectionalComparator.get=function(){return Sa},gl.coordArrayType.get=function(){return new Array(0).fill(null)},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Nt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Nt.indexOf(i,e)<0)return i}return null},Nt.scroll=function(t,e){var n=Nt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);De.arraycopy(t,n,i,0,t.length-n),De.arraycopy(t,0,i,t.length-n,n),De.arraycopy(i,0,t,0,t.length)},Nt.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},Nt.intersection=function(t,e){for(var n=new $u,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Nt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Nt.removeRepeatedPoints=function(t){if(!Nt.hasRepeatedPoints(t))return t;var e=new $u(t,!1);return e.toCoordinateArray()},Nt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},Nt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)t[n]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,o=0;o<t.length;o++)t[o]!==null&&(i[s++]=t[o]);return i},Nt.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new D(t[n]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],h=0;h<u;h++)o[a+h]=new D(i[s+h])},Nt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],s=e[t.length-n-1];if(i.compareTo(s)!==0)return!1}return!0},Nt.envelope=function(t){for(var e=new at,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Nt.toCoordinateArray=function(t){return t.toArray(Nt.coordArrayType)},Nt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Nt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Nt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(i!==0)return i}return 1},Nt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(i!==0)return i;n++}return n<e.length?-1:n<t.length?1:0},Nt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(e===null||e.compareTo(t[n])>0)&&(e=t[n]);return e},Nt.extract=function(t,e,n){e=Ar.clamp(e,0,t.length),n=Ar.clamp(n,-1,t.length);var i=n-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=e;a<=n;a++)s[o++]=t[a];return s},Object.defineProperties(Nt,gl);var Zu=function(){};Zu.prototype.compare=function(t,e){var n=t,i=e;return Nt.compare(n,i)},Zu.prototype.interfaces_=function(){return[fa]},Zu.prototype.getClass=function(){return Zu};var Sa=function(){};Sa.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;var s=Nt.compare(n,i),o=Nt.isEqualReversed(n,i);return o?0:s},Sa.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;for(var s=Nt.increasingDirection(n),o=Nt.increasingDirection(i),a=s>0?0:n.length-1,u=o>0?0:n.length-1,h=0;h<n.length;h++){var l=n[a].compareTo(i[u]);if(l!==0)return l;a+=s,u+=o}return 0},Sa.prototype.interfaces_=function(){return[fa]},Sa.prototype.getClass=function(){return Sa};var mo=function(){};mo.prototype.get=function(){},mo.prototype.put=function(){},mo.prototype.size=function(){},mo.prototype.values=function(){},mo.prototype.entrySet=function(){};var wP=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(mo);function th(r){this.message=r||""}th.prototype=new Error,th.prototype.name="OperationNotSupported";function pl(){}pl.prototype=new Ce,pl.prototype.contains=function(){};var hf=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Ce&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.contains=function(n){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===n)return!0}return!1},t.prototype.add=function(n){return this.contains(n)?!1:(this.array_.push(n),!0)},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(n){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var n=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(n.array_[s]);return i},t.prototype.iterator=function(){return new EP(this)},t}(pl),EP=function(r){function t(e){r.call(this),this.hashSet_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new Ea;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new th},t}(wa),Ti=0,Os=1;function U0(r){return r===null?Ti:r.color}function $t(r){return r===null?null:r.parent}function Ai(r,t){r!==null&&(r.color=t)}function lf(r){return r===null?null:r.left}function z0(r){return r===null?null:r.right}function qe(){this.root_=null,this.size_=0}qe.prototype=new wP,qe.prototype.get=function(r){for(var t=this.root_;t!==null;){var e=r.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},qe.prototype.put=function(r,t){if(this.root_===null)return this.root_={key:r,value:t,left:null,right:null,parent:null,color:Ti,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,n,i;do if(n=e,i=r.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var o={key:r,left:null,right:null,value:t,parent:n,color:Ti,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=o:n.right=o,this.fixAfterInsertion(o),this.size_++,null},qe.prototype.fixAfterInsertion=function(r){var t=this;for(r.color=Os;r!=null&&r!==this.root_&&r.parent.color===Os;)if($t(r)===lf($t($t(r)))){var e=z0($t($t(r)));U0(e)===Os?(Ai($t(r),Ti),Ai(e,Ti),Ai($t($t(r)),Os),r=$t($t(r))):(r===z0($t(r))&&(r=$t(r),t.rotateLeft(r)),Ai($t(r),Ti),Ai($t($t(r)),Os),t.rotateRight($t($t(r))))}else{var n=lf($t($t(r)));U0(n)===Os?(Ai($t(r),Ti),Ai(n,Ti),Ai($t($t(r)),Os),r=$t($t(r))):(r===lf($t(r))&&(r=$t(r),t.rotateRight(r)),Ai($t(r),Ti),Ai($t($t(r)),Os),t.rotateLeft($t($t(r))))}this.root_.color=Ti},qe.prototype.values=function(){var r=new j,t=this.getFirstEntry();if(t!==null)for(r.add(t.value);(t=qe.successor(t))!==null;)r.add(t.value);return r},qe.prototype.entrySet=function(){var r=new hf,t=this.getFirstEntry();if(t!==null)for(r.add(t);(t=qe.successor(t))!==null;)r.add(t);return r},qe.prototype.rotateLeft=function(r){if(r!=null){var t=r.right;r.right=t.left,t.left!=null&&(t.left.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.left===r?r.parent.left=t:r.parent.right=t,t.left=r,r.parent=t}},qe.prototype.rotateRight=function(r){if(r!=null){var t=r.left;r.left=t.right,t.right!=null&&(t.right.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.right===r?r.parent.right=t:r.parent.left=t,t.right=r,r.parent=t}},qe.prototype.getFirstEntry=function(){var r=this.root_;if(r!=null)for(;r.left!=null;)r=r.left;return r},qe.successor=function(r){if(r===null)return null;if(r.right!==null){for(var t=r.right;t.left!==null;)t=t.left;return t}else{for(var e=r.parent,n=r;e!==null&&n===e.right;)n=e,e=e.parent;return e}},qe.prototype.size=function(){return this.size_};var eh=function(){};eh.prototype.interfaces_=function(){return[]},eh.prototype.getClass=function(){return eh};function q0(){}q0.prototype=new pl;function Pn(){this.array_=[],arguments[0]instanceof Ce&&this.addAll(arguments[0])}Pn.prototype=new q0,Pn.prototype.contains=function(r){for(var t=this,e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===0)return!0}return!1},Pn.prototype.add=function(r){var t=this;if(this.contains(r))return!1;for(var e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===1)return t.array_.splice(e,0,r),!0}return this.array_.push(r),!0},Pn.prototype.addAll=function(r){for(var t=this,e=r.iterator();e.hasNext();)t.add(e.next());return!0},Pn.prototype.remove=function(r){throw new th},Pn.prototype.size=function(){return this.array_.length},Pn.prototype.isEmpty=function(){return this.array_.length===0},Pn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t},Pn.prototype.iterator=function(){return new vl(this)};var vl=function(r){this.treeSet_=r,this.position_=0};vl.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new Ea;return this.treeSet_.array_[this.position_++]},vl.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},vl.prototype.remove=function(){throw new th};var Ds=function(){};Ds.sort=function(){var t=arguments[0],e,n,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},t.sort(s);else if(arguments.length===3){n=t.slice(arguments[1],arguments[2]),n.sort();var o=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(n=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,u){return i.compare(a,u)},n.sort(s),o=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},Ds.asList=function(t){for(var e=new j,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var Vt=function(){},an={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};an.P.get=function(){return 0},an.L.get=function(){return 1},an.A.get=function(){return 2},an.FALSE.get=function(){return-1},an.TRUE.get=function(){return-2},an.DONTCARE.get=function(){return-3},an.SYM_FALSE.get=function(){return"F"},an.SYM_TRUE.get=function(){return"T"},an.SYM_DONTCARE.get=function(){return"*"},an.SYM_P.get=function(){return"0"},an.SYM_L.get=function(){return"1"},an.SYM_A.get=function(){return"2"},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.toDimensionSymbol=function(t){switch(t){case Vt.FALSE:return Vt.SYM_FALSE;case Vt.TRUE:return Vt.SYM_TRUE;case Vt.DONTCARE:return Vt.SYM_DONTCARE;case Vt.P:return Vt.SYM_P;case Vt.L:return Vt.SYM_L;case Vt.A:return Vt.SYM_A}throw new se("Unknown dimension value: "+t)},Vt.toDimensionValue=function(t){switch(Qu.toUpperCase(t)){case Vt.SYM_FALSE:return Vt.FALSE;case Vt.SYM_TRUE:return Vt.TRUE;case Vt.SYM_DONTCARE:return Vt.DONTCARE;case Vt.SYM_P:return Vt.P;case Vt.SYM_L:return Vt.L;case Vt.SYM_A:return Vt.A}throw new se("Unknown dimension symbol: "+t)},Object.defineProperties(Vt,an);var In=function(){};In.prototype.filter=function(t){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var un=function(){};un.prototype.filter=function(t,e){},un.prototype.isDone=function(){},un.prototype.isGeometryChanged=function(){},un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un};var Ye=function(r){function t(n,i){if(r.call(this,i),this._geometries=n||[],r.hasNullElements(this._geometries))throw new se("geometries must not contain null elements")}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new at,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return r.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var u=i._geometries[a].getCoordinates(),h=0;h<u.length;h++)o++,s[o]=u[h];return s},t.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();Ds.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=Vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=Vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new Pn(Ds.asList(this._geometries)),a=new Pn(Ds.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],h=arguments[1],l=u,c=this.getNumGeometries(),f=l.getNumGeometries(),p=0;p<c&&p<f;){var v=i.getGeometryN(p),w=l.getGeometryN(p),E=v.compareToSameClass(w,h);if(E!==0)return E;p++}return p<c?1:p<f?-1:0}},t.prototype.apply=function(){var i=this;if(pt(arguments[0],ri))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(pt(arguments[0],un)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],In)){var h=arguments[0];h.filter(this);for(var l=0;l<this._geometries.length;l++)i._geometries[l].apply(h)}else if(pt(arguments[0],Ni)){var c=arguments[0];c.filter(this);for(var f=0;f<this._geometries.length;f++)i._geometries[f].apply(c)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),Pt.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(gt),Ls=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new Br(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[eh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(Ye),Br=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=Hr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};Br.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Br.prototype.getBoundary=function(){return this._geom instanceof le?this.boundaryLineString(this._geom):this._geom instanceof Ls?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Br.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Br.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Br.prototype.computeBoundaryCoordinates=function(t){var e=this,n=new j;this._endpointMap=new qe;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),u=a.getValue(),h=u.count;e._bnRule.isInBoundary(h)&&n.add(a.getKey())}return Nt.toCoordinateArray(n)},Br.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new ml,this._endpointMap.put(t,e)),e.count++},Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br},Br.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new Br(t);return e.getBoundary()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Br(n,i);return s.getBoundary()}};var ml=function(){this.count=null};ml.prototype.interfaces_=function(){return[]},ml.prototype.getClass=function(){return ml};function SP(){}function CP(){}var PP=function(){};function IP(){}function MP(){}function bP(){}var Yr=function(){},cf={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Yr.prototype.interfaces_=function(){return[]},Yr.prototype.getClass=function(){return Yr},Yr.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},Yr.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new IP,n=new SP;return t.printStackTrace(n),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new CP(Yr.getStackTrace(i));for(var a=new bP,u=0;u<s;u++)try{o+=a.readLine()+Yr.NEWLINE}catch(h){if(h instanceof MP)Pt.shouldNeverReachHere();else throw h}finally{}return o}},Yr.split=function(t,e){for(var n=e.length,i=new j,s=""+t,o=s.indexOf(e);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+n),o=s.indexOf(e)}s.length>0&&i.add(s);for(var u=new Array(i.size()).fill(null),h=0;h<u.length;h++)u[h]=i.get(h);return u},Yr.toString=function(){if(arguments.length===1){var t=arguments[0];return Yr.SIMPLE_ORDINATE_FORMAT.format(t)}},Yr.spaces=function(t){return Yr.chars(" ",t)},cf.NEWLINE.get=function(){return De.getProperty("line.separator")},cf.SIMPLE_ORDINATE_FORMAT.get=function(){return new PP},Object.defineProperties(Yr,cf);var de=function(){};de.prototype.interfaces_=function(){return[]},de.prototype.getClass=function(){return de},de.copyCoord=function(t,e,n,i){for(var s=Math.min(t.getDimension(),n.getDimension()),o=0;o<s;o++)n.setOrdinate(i,o,t.getOrdinate(e,o))},de.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,Dt.X)===t.getOrdinate(e-1,Dt.X)&&t.getOrdinate(0,Dt.Y)===t.getOrdinate(e-1,Dt.Y)},de.isEqual=function(t,e){var n=t.size(),i=e.size();if(n!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),o=0;o<n;o++)for(var a=0;a<s;a++){var u=t.getOrdinate(o,a),h=e.getOrdinate(o,a);if(t.getOrdinate(o,a)!==e.getOrdinate(o,a)&&!(yt.isNaN(u)&&yt.isNaN(h)))return!1}return!0},de.extend=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();if(de.copy(e,0,i,0,s),s>0)for(var o=s;o<n;o++)de.copy(e,s-1,i,o,1);return i},de.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)de.swap(t,i,e-i)},de.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,s)}},de.copy=function(t,e,n,i,s){for(var o=0;o<s;o++)de.copyCoord(t,e+o,n,i+o)},de.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var n=t.getDimension(),i=new wn;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var o=0;o<n;o++)o>0&&i.append(","),i.append(Yr.toString(t.getOrdinate(s,o)))}return i.append(")"),i.toString()}},de.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return de.createClosedRing(t,e,4);var i=e.getOrdinate(0,Dt.X)===e.getOrdinate(n-1,Dt.X)&&e.getOrdinate(0,Dt.Y)===e.getOrdinate(n-1,Dt.Y);return i?e:de.createClosedRing(t,e,n+1)},de.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();de.copy(e,0,i,0,s);for(var o=s;o<n;o++)de.copy(e,0,i,o,1);return i};var le=function(r){function t(n,i){r.call(this,i),this._points=null,this.init(n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new at:this._points.expandEnvelope(new at)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return r.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&de.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return K.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();de.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,u=0;a<this._points.size()&&u<o._points.size();){var h=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(h!==0)return h;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var l=arguments[0],c=arguments[1],f=l;return c.compare(this._points,f._points)}},t.prototype.apply=function(){var i=this;if(pt(arguments[0],ri))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(pt(arguments[0],un)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],In)){var h=arguments[0];h.filter(this)}else if(pt(arguments[0],Ni)){var l=arguments[0];l.filter(this)}},t.prototype.getBoundary=function(){return new Br(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new se("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[eh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(gt),rh=function(){};rh.prototype.interfaces_=function(){return[]},rh.prototype.getClass=function(){return rh};var vr=function(r){function t(n,i){r.call(this,i),this._coordinates=n||null,this.init(this._coordinates)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new at;var i=new at;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return r.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],u=o;return a.compare(this._coordinates,u._coordinates)}},t.prototype.apply=function(){if(pt(arguments[0],ri)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(pt(arguments[0],un)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],In)){var o=arguments[0];o.filter(this)}else if(pt(arguments[0],Ni)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),Pt.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[rh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(gt),rs=function(){};rs.prototype.interfaces_=function(){return[]},rs.prototype.getClass=function(){return rs};var Pe=function(r){function t(n,i,s){if(r.call(this,s),this._shell=null,this._holes=null,n===null&&(n=this.getFactory().createLinearRing()),i===null&&(i=[]),r.hasNullElements(i))throw new se("holes must not contain null elements");if(n.isEmpty()&&r.hasNonEmptyElements(i))throw new se("shell is empty but holes are not");this._shell=n,this._holes=i}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return r.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var h=0;h<this._holes.length;h++)for(var l=i._holes[h].getCoordinates(),c=0;c<l.length;c++)o++,s[o]=l[c];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(K.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(K.signedArea(i._holes[o].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var h=i.getX(0),l=i.getY(0),c=1;c<=4;c++){var f=i.getX(c),p=i.getY(c),v=f!==h,w=p!==l;if(v===w)return!1;h=f,l=p}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,u=this._shell,h=a._shell;if(!u.equalsExact(h,o)||this._holes.length!==a._holes.length)return!1;for(var l=0;l<this._holes.length;l++)if(!i._holes[l].equalsExact(a._holes[l],o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);Ds.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);De.arraycopy(o.getCoordinates(),0,u,0,u.length);var h=Nt.minCoordinate(o.getCoordinates());Nt.scroll(u,h),De.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],K.isCCW(o.getCoordinates())===a&&Nt.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var u=arguments[0],h=arguments[1],l=u,c=this._shell,f=l._shell,p=c.compareToSameClass(f,h);if(p!==0)return p;for(var v=this.getNumInteriorRing(),w=l.getNumInteriorRing(),E=0;E<v&&E<w;){var I=i.getInteriorRingN(E),y=l.getInteriorRingN(E),_=I.compareToSameClass(y,h);if(_!==0)return _;E++}return E<v?1:E<w?-1:0}},t.prototype.apply=function(i){var s=this;if(pt(i,ri)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(pt(i,un)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(pt(i,In))i.filter(this);else if(pt(i,Ni)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new t(s,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[rs]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(gt),Ca=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return r.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[rh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(Ye),ni=function(r){function t(n,i){n instanceof D&&i instanceof xt&&(n=i.getCoordinateSequenceFactory().create(n)),r.call(this,n,i),this.validateConstruction()}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:r.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();de.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!r.prototype.isClosed.call(this))throw new se("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new se("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(le),ii=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new j,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),h=0;h<u.getNumGeometries();h++)s.add(u.getGeometryN(h));var l=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(l))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[rs]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(Ye),Jr=function(t){this._factory=t||null,this._isUserDataCopied=!1},yl={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Jr.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},Jr.prototype.edit=function(t,e){if(t===null)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},Jr.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof Ye?this.editGeometryCollection(t,e):t instanceof Pe?this.editPolygon(t,e):t instanceof vr?e.edit(t,this._factory):t instanceof le?e.edit(t,this._factory):(Pt.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},Jr.prototype.editGeometryCollection=function(t,e){for(var n=this,i=e.edit(t,this._factory),s=new j,o=0;o<i.getNumGeometries();o++){var a=n.edit(i.getGeometryN(o),e);a===null||a.isEmpty()||s.add(a)}return i.getClass()===Ca?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Ls?this._factory.createMultiLineString(s.toArray([])):i.getClass()===ii?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},Jr.prototype.editPolygon=function(t,e){var n=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new j,a=0;a<i.getNumInteriorRing();a++){var u=n.edit(i.getInteriorRingN(a),e);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},Jr.prototype.interfaces_=function(){return[]},Jr.prototype.getClass=function(){return Jr},Jr.GeometryEditorOperation=function(){},yl.NoOpGeometryOperation.get=function(){return nh},yl.CoordinateOperation.get=function(){return ih},yl.CoordinateSequenceOperation.get=function(){return sh},Object.defineProperties(Jr,yl);var nh=function(){};nh.prototype.edit=function(t,e){return t},nh.prototype.interfaces_=function(){return[Jr.GeometryEditorOperation]},nh.prototype.getClass=function(){return nh};var ih=function(){};ih.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return n===null?t:t instanceof ni?e.createLinearRing(n):t instanceof le?e.createLineString(n):t instanceof vr?n.length>0?e.createPoint(n[0]):e.createPoint():t},ih.prototype.interfaces_=function(){return[Jr.GeometryEditorOperation]},ih.prototype.getClass=function(){return ih};var sh=function(){};sh.prototype.edit=function(t,e){return t instanceof ni?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof le?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof vr?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},sh.prototype.interfaces_=function(){return[Jr.GeometryEditorOperation]},sh.prototype.getClass=function(){return sh};var ge=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n<e;n++)t._coordinates[n]=new D}else if(pt(arguments[0],Dt)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var u=arguments[0],h=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=h;for(var l=0;l<u;l++)t._coordinates[l]=new D}}},W0={serialVersionUID:{configurable:!0}};ge.prototype.setOrdinate=function(t,e,n){switch(e){case Dt.X:this._coordinates[t].x=n;break;case Dt.Y:this._coordinates[t].y=n;break;case Dt.Z:this._coordinates[t].z=n;break;default:throw new se("invalid ordinateIndex")}},ge.prototype.size=function(){return this._coordinates.length},ge.prototype.getOrdinate=function(t,e){switch(e){case Dt.X:return this._coordinates[t].x;case Dt.Y:return this._coordinates[t].y;case Dt.Z:return this._coordinates[t].z}return yt.NaN},ge.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ge.prototype.getCoordinateCopy=function(t){return new D(this._coordinates[t])},ge.prototype.getDimension=function(){return this._dimension},ge.prototype.getX=function(t){return this._coordinates[t].x},ge.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].clone();return new ge(e,this._dimension)},ge.prototype.expandEnvelope=function(t){for(var e=this,n=0;n<this._coordinates.length;n++)t.expandToInclude(e._coordinates[n]);return t},ge.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].copy();return new ge(e,this._dimension)},ge.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new wn(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n<this._coordinates.length;n++)e.append(", "),e.append(t._coordinates[n]);return e.append(")"),e.toString()}else return"()"},ge.prototype.getY=function(t){return this._coordinates[t].y},ge.prototype.toCoordinateArray=function(){return this._coordinates},ge.prototype.interfaces_=function(){return[Dt,Xr]},ge.prototype.getClass=function(){return ge},W0.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ge,W0);var si=function(){},ff={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};si.prototype.readResolve=function(){return si.instance()},si.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new ge(t)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new ge(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new ge(n):new ge(n,i)}},si.prototype.interfaces_=function(){return[da,Xr]},si.prototype.getClass=function(){return si},si.instance=function(){return si.instanceObject},ff.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},ff.instanceObject.get=function(){return new si},Object.defineProperties(si,ff);var X0=function(r){function t(){r.call(this),this.map_=new Map}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return this.map_.get(n)||null},t.prototype.put=function(n,i){return this.map_.set(n,i),i},t.prototype.values=function(){for(var n=new j,i=this.map_.values(),s=i.next();!s.done;)n.add(s.value),s=i.next();return n},t.prototype.entrySet=function(){var n=new hf;return this.map_.entries().forEach(function(i){return n.add(i)}),n},t.prototype.size=function(){return this.map_.size()},t}(mo),Ut=function r(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=r.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Mn){var t=arguments[0];this._modelType=t,t===r.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=r.FIXED,this.setScale(e)}else if(arguments[0]instanceof r){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}},df={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ut.prototype.equals=function(t){if(!(t instanceof Ut))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ut.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new En(n).compareTo(new En(i))},Ut.prototype.getScale=function(){return this._scale},Ut.prototype.isFloating=function(){return this._modelType===Ut.FLOATING||this._modelType===Ut.FLOATING_SINGLE},Ut.prototype.getType=function(){return this._modelType},Ut.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ut.FLOATING?t="Floating":this._modelType===Ut.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ut.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ut.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(yt.isNaN(t))return t;if(this._modelType===Ut.FLOATING_SINGLE){var e=t;return e}return this._modelType===Ut.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof D){var n=arguments[0];if(this._modelType===Ut.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},Ut.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ut.FLOATING?t=16:this._modelType===Ut.FLOATING_SINGLE?t=6:this._modelType===Ut.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ut.prototype.setScale=function(t){this._scale=Math.abs(t)},Ut.prototype.interfaces_=function(){return[Xr,Wr]},Ut.prototype.getClass=function(){return Ut},Ut.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},df.serialVersionUID.get=function(){return 7777263578777804e3},df.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ut,df);var Mn=function r(t){this._name=t||null,r.nameToTypeMap.put(t,this)},gf={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Mn.prototype.readResolve=function(){return Mn.nameToTypeMap.get(this._name)},Mn.prototype.toString=function(){return this._name},Mn.prototype.interfaces_=function(){return[Xr]},Mn.prototype.getClass=function(){return Mn},gf.serialVersionUID.get=function(){return-552860263173159e4},gf.nameToTypeMap.get=function(){return new X0},Object.defineProperties(Mn,gf),Ut.Type=Mn,Ut.FIXED=new Mn("FIXED"),Ut.FLOATING=new Mn("FLOATING"),Ut.FLOATING_SINGLE=new Mn("FLOATING SINGLE");var xt=function r(){this._precisionModel=new Ut,this._SRID=0,this._coordinateSequenceFactory=r.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?pt(arguments[0],da)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ut&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},H0={serialVersionUID:{configurable:!0}};xt.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new D(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new D(t.getMinX(),t.getMinY()),new D(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new D(t.getMinX(),t.getMinY()),new D(t.getMinX(),t.getMaxY()),new D(t.getMaxX(),t.getMaxY()),new D(t.getMaxX(),t.getMinY()),new D(t.getMinX(),t.getMinY())]),null)},xt.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new le(this.getCoordinateSequenceFactory().create(t),this);if(pt(t,Dt))return new le(t,this)}else return new le(this.getCoordinateSequenceFactory().create([]),this)},xt.prototype.createMultiLineString=function(){if(arguments.length===0)return new Ls(null,this);if(arguments.length===1){var t=arguments[0];return new Ls(t,this)}},xt.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,s=t.iterator();s.hasNext();){var o=s.next(),a=o.getClass();e===null&&(e=a),a!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(xt.toGeometryArray(t));var u=t.iterator().next(),h=t.size()>1;if(h){if(u instanceof Pe)return this.createMultiPolygon(xt.toPolygonArray(t));if(u instanceof le)return this.createMultiLineString(xt.toLineStringArray(t));if(u instanceof vr)return this.createMultiPoint(xt.toPointArray(t));Pt.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},xt.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},xt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new vr(e,this)}}},xt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},xt.prototype.createPolygon=function(){if(arguments.length===0)return new Pe(null,null,this);if(arguments.length===1){if(pt(arguments[0],Dt)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof ni){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new Pe(i,s,this)}},xt.prototype.getSRID=function(){return this._SRID},xt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Ye(null,this);if(arguments.length===1){var t=arguments[0];return new Ye(t,this)}},xt.prototype.createGeometry=function(t){var e=new Jr(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})},xt.prototype.getPrecisionModel=function(){return this._precisionModel},xt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new ni(e,this)}}},xt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new ii(null,this);if(arguments.length===1){var t=arguments[0];return new ii(t,this)}},xt.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new Ca(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Ca(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(pt(arguments[0],Dt)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=t.getCoordinateSequenceFactory().create(1,i.getDimension());de.copy(i,o,a,0,1),s[o]=t.createPoint(a)}return this.createMultiPoint(s)}}},xt.prototype.interfaces_=function(){return[Xr]},xt.prototype.getClass=function(){return xt},xt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.getDefaultCoordinateSequenceFactory=function(){return si.instance()},xt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},H0.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(xt,H0);var NP=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],_l=function(t){this.geometryFactory=t||new xt};_l.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var n=e.type;if(!bn[n])throw new Error("Unknown GeoJSON type: "+e.type);return NP.indexOf(n)!==-1?bn[n].apply(this,[e.coordinates]):n==="GeometryCollection"?bn[n].apply(this,[e.geometries]):bn[n].apply(this,[e])},_l.prototype.write=function(t){var e=t.getGeometryType();if(!Oi[e])throw new Error("Geometry is not supported");return Oi[e].apply(this,[t])};var bn={Feature:function(r){var t={};for(var e in r)t[e]=r[e];if(r.geometry){var n=r.geometry.type;if(!bn[n])throw new Error("Unknown GeoJSON type: "+r.type);t.geometry=this.read(r.geometry)}return r.bbox&&(t.bbox=bn.bbox.apply(this,[r.bbox])),t},FeatureCollection:function(r){var t=this,e={};if(r.features){e.features=[];for(var n=0;n<r.features.length;++n)e.features.push(t.read(r.features[n]))}return r.bbox&&(e.bbox=this.parse.bbox.apply(this,[r.bbox])),e},coordinates:function(r){for(var t=[],e=0;e<r.length;++e){var n=r[e];t.push(new D(n[0],n[1]))}return t},bbox:function(r){return this.geometryFactory.createLinearRing([new D(r[0],r[1]),new D(r[2],r[1]),new D(r[2],r[3]),new D(r[0],r[3]),new D(r[0],r[1])])},Point:function(r){var t=new D(r[0],r[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(bn.Point.apply(t,[r[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(r){var t=bn.coordinates.apply(this,[r]);return this.geometryFactory.createLineString(t)},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(bn.LineString.apply(t,[r[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(r){for(var t=this,e=bn.coordinates.apply(this,[r[0]]),n=this.geometryFactory.createLinearRing(e),i=[],s=1;s<r.length;++s){var o=r[s],a=bn.coordinates.apply(t,[o]),u=t.geometryFactory.createLinearRing(a);i.push(u)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(bn.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Oi={coordinate:function(r){return[r.x,r.y]},Point:function(r){var t=Oi.coordinate.apply(this,[r.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Oi.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(r){for(var t=this,e=[],n=r.getCoordinates(),i=0;i<n.length;++i){var s=n[i];e.push(Oi.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Oi.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(r){var t=this,e=[],n=Oi.LineString.apply(this,[r._shell]);e.push(n.coordinates);for(var i=0;i<r._holes.length;++i){var s=r._holes[i],o=Oi.LineString.apply(t,[s]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Oi.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=i.getGeometryType();e.push(Oi[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},pf=function(t){this.geometryFactory=t||new xt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new _l(this.geometryFactory)};pf.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ut.FIXED&&this.reducePrecision(e),e},pf.prototype.reducePrecision=function(t){var e=this,n,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(n=0,i=t.points.length;n<i;n++)e.precisionModel.makePrecise(t.points[n]);else if(t.geometries)for(n=0,i=t.geometries.length;n<i;n++)e.reducePrecision(t.geometries[n])};var B0=function(){this.parser=new _l(this.geometryFactory)};B0.prototype.write=function(t){return this.parser.write(t)};var B=function(){},wl={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};B.prototype.interfaces_=function(){return[]},B.prototype.getClass=function(){return B},B.opposite=function(t){return t===B.LEFT?B.RIGHT:t===B.RIGHT?B.LEFT:t},wl.ON.get=function(){return 0},wl.LEFT.get=function(){return 1},wl.RIGHT.get=function(){return 2},Object.defineProperties(B,wl);function El(r){this.message=r||""}El.prototype=new Error,El.prototype.name="EmptyStackException";function Nn(){this.array_=[]}Nn.prototype=new on,Nn.prototype.add=function(r){return this.array_.push(r),!0},Nn.prototype.get=function(r){if(r<0||r>=this.size())throw new Error;return this.array_[r]},Nn.prototype.push=function(r){return this.array_.push(r),r},Nn.prototype.pop=function(r){if(this.array_.length===0)throw new El;return this.array_.pop()},Nn.prototype.peek=function(){if(this.array_.length===0)throw new El;return this.array_[this.array_.length-1]},Nn.prototype.empty=function(){return this.array_.length===0},Nn.prototype.isEmpty=function(){return this.empty()},Nn.prototype.search=function(r){return this.array_.indexOf(r)},Nn.prototype.size=function(){return this.array_.length},Nn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t};var xn=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};xn.prototype.getCoordinate=function(){return this._minCoord},xn.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},xn.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();Pt.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=K.computeOrientation(this._minCoord,n,e),s=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===K.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===K.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},xn.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),i=n.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=B.LEFT;return i[e].y<i[e+1].y&&(s=B.RIGHT),s},xn.prototype.getEdge=function(){return this._orientedDe},xn.prototype.checkForRightmostCoordinate=function(t){for(var e=this,n=t.getEdge().getCoordinates(),i=0;i<n.length-1;i++)(e._minCoord===null||n[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=n[i])},xn.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},xn.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();i.isForward()&&e.checkForRightmostCoordinate(i)}Pt.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===B.LEFT&&(this._orientedDe=this._minDe.getSym())},xn.prototype.interfaces_=function(){return[]},xn.prototype.getClass=function(){return xn};var Di=function(r){function t(e,n){r.call(this,t.msgWithCoord(e,n)),this.pt=n?new D(n):null,this.name="TopologyException"}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(n,i){return i?n:n+" [ "+i+" ]"},t}(bi),Sl=function(){this.array_=[]};Sl.prototype.addLast=function(t){this.array_.push(t)},Sl.prototype.removeFirst=function(){return this.array_.shift()},Sl.prototype.isEmpty=function(){return this.array_.length===0};var Je=function(){this._finder=null,this._dirEdgeList=new j,this._nodes=new j,this._rightMostCoord=null,this._env=null,this._finder=new xn};Je.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},Je.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Je.prototype.computeNodeDepth=function(t){for(var e=this,n=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){n=s;break}}if(n===null)throw new Di("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var o=t.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),e.copySymDepths(a)}},Je.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(B.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Je.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Je.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(B.RIGHT)>=1&&e.getDepth(B.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Je.prototype.computeDepths=function(t){var e=this,n=new hf,i=new Sl,s=t.getNode();for(i.addLast(s),n.add(s),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();n.add(o),e.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var u=a.next(),h=u.getSym();if(!h.isVisited()){var l=h.getNode();n.contains(l)||(i.addLast(l),n.add(l))}}}},Je.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Je.prototype.getEnvelope=function(){if(this._env===null){for(var t=new at,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),i=n.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},Je.prototype.addReachable=function(t){var e=this,n=new Nn;for(n.add(t);!n.empty();){var i=n.pop();e.add(i,n)}},Je.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(B.LEFT,t.getDepth(B.RIGHT)),e.setDepth(B.RIGHT,t.getDepth(B.LEFT))},Je.prototype.add=function(t,e){var n=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();n._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||e.push(a)}},Je.prototype.getNodes=function(){return this._nodes},Je.prototype.getDirectedEdges=function(){return this._dirEdgeList},Je.prototype.interfaces_=function(){return[Wr]},Je.prototype.getClass=function(){return Je};var Zt=function r(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[B.ON]=n}else if(arguments[0]instanceof r){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];this.init(3),this.location[B.ON]=o,this.location[B.LEFT]=a,this.location[B.RIGHT]=u}};Zt.prototype.setAllLocations=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]=t},Zt.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==F.NONE)return!1;return!0},Zt.prototype.setAllLocationsIfNull=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]===F.NONE&&(e.location[n]=t)},Zt.prototype.isLine=function(){return this.location.length===1},Zt.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var n=new Array(3).fill(null);n[B.ON]=this.location[B.ON],n[B.LEFT]=F.NONE,n[B.RIGHT]=F.NONE,this.location=n}for(var i=0;i<this.location.length;i++)e.location[i]===F.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},Zt.prototype.getLocations=function(){return this.location},Zt.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[B.LEFT];this.location[B.LEFT]=this.location[B.RIGHT],this.location[B.RIGHT]=t},Zt.prototype.toString=function(){var t=new wn;return this.location.length>1&&t.append(F.toLocationSymbol(this.location[B.LEFT])),t.append(F.toLocationSymbol(this.location[B.ON])),this.location.length>1&&t.append(F.toLocationSymbol(this.location[B.RIGHT])),t.toString()},Zt.prototype.setLocations=function(t,e,n){this.location[B.ON]=t,this.location[B.LEFT]=e,this.location[B.RIGHT]=n},Zt.prototype.get=function(t){return t<this.location.length?this.location[t]:F.NONE},Zt.prototype.isArea=function(){return this.location.length>1},Zt.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===F.NONE)return!0;return!1},Zt.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(B.ON,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.location[e]=n}},Zt.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(F.NONE)},Zt.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Zt.prototype.allPositionsEqual=function(t){for(var e=this,n=0;n<this.location.length;n++)if(e.location[n]!==t)return!1;return!0},Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt};var Yt=function r(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new Zt(t),this.elt[1]=new Zt(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.elt[0]=new Zt(e.elt[0]),this.elt[1]=new Zt(e.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new Zt(F.NONE),this.elt[1]=new Zt(F.NONE),this.elt[n].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new Zt(s,o,a),this.elt[1]=new Zt(s,o,a)}else if(arguments.length===4){var u=arguments[0],h=arguments[1],l=arguments[2],c=arguments[3];this.elt[0]=new Zt(F.NONE,F.NONE,F.NONE),this.elt[1]=new Zt(F.NONE,F.NONE,F.NONE),this.elt[u].setLocations(h,l,c)}};Yt.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Yt.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Yt.prototype.isNull=function(t){return this.elt[t].isNull()},Yt.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Yt.prototype.isLine=function(t){return this.elt[t].isLine()},Yt.prototype.merge=function(t){for(var e=this,n=0;n<2;n++)e.elt[n]===null&&t.elt[n]!==null?e.elt[n]=new Zt(t.elt[n]):e.elt[n].merge(t.elt[n])},Yt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Yt.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(B.ON)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Yt.prototype.toString=function(){var t=new wn;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Yt.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Yt.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Yt.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(B.ON,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this.elt[n].setLocation(i,s)}},Yt.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Yt.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Yt.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Zt(this.elt[t].location[0]))},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.toLineLabel=function(t){for(var e=new Yt(F.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var ye=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new j,this._pts=new j,this._label=new Yt(F.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new j,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};ye.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)e[n]=t._pts.get(n);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=K.isCCW(this._ring.getCoordinates())},ye.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},ye.prototype.computePoints=function(t){var e=this;this._startDe=t;var n=t,i=!0;do{if(n===null)throw new Di("Found null DirectedEdge");if(n.getEdgeRing()===e)throw new Di("Directed Edge visited twice during ring-building at "+n.getCoordinate());e._edges.add(n);var s=n.getLabel();Pt.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(n.getEdge(),n.isForward(),i),i=!1,e.setEdgeRing(n,e),n=e.getNext(n)}while(n!==this._startDe)},ye.prototype.getLinearRing=function(){return this._ring},ye.prototype.getCoordinate=function(t){return this._pts.get(t)},ye.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var n=e.getNode(),i=n.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},ye.prototype.addPoints=function(t,e,n){var i=this,s=t.getCoordinates();if(e){var o=1;n&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var u=s.length-2;n&&(u=s.length-1);for(var h=u;h>=0;h--)i._pts.add(s[h])}},ye.prototype.isHole=function(){return this._isHole},ye.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},ye.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!K.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},ye.prototype.addHole=function(t){this._holes.add(t)},ye.prototype.isShell=function(){return this._shell===null},ye.prototype.getLabel=function(){return this._label},ye.prototype.getEdges=function(){return this._edges},ye.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},ye.prototype.getShell=function(){return this._shell},ye.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=e.getLocation(n,B.RIGHT);if(i===F.NONE)return null;if(this._label.getLocation(n)===F.NONE)return this._label.setLocation(n,i),null}},ye.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},ye.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)n[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),n);return s},ye.prototype.interfaces_=function(){return[]},ye.prototype.getClass=function(){return ye};var xP=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(n,i){n.setMinEdgeRing(i)},t.prototype.getNext=function(n){return n.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ye),TP=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var n=this,i=new j,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new xP(s,n._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(n,i){n.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var n=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(n),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(n){return n.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ye),Or=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};Or.prototype.setVisited=function(t){this._isVisited=t},Or.prototype.setInResult=function(t){this._isInResult=t},Or.prototype.isCovered=function(){return this._isCovered},Or.prototype.isCoveredSet=function(){return this._isCoveredSet},Or.prototype.setLabel=function(t){this._label=t},Or.prototype.getLabel=function(){return this._label},Or.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Or.prototype.updateIM=function(t){Pt.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Or.prototype.isInResult=function(){return this._isInResult},Or.prototype.isVisited=function(){return this._isVisited},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Cl=function(r){function t(){r.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Yt(0,F.NONE)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var i=n.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(n){},t.prototype.computeMergedLocation=function(n,i){var s=F.NONE;if(s=this._label.getLocation(i),!n.isNull(i)){var o=n.getLocation(i);s!==F.BOUNDARY&&(s=o)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];this._label===null?this._label=new Yt(n,i):this._label.setLocation(n,i)}else return r.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Yt)for(var s=arguments[0],o=0;o<2;o++){var a=n.computeMergedLocation(s,o),u=n._label.getLocation(o);u===F.NONE&&n._label.setLocation(o,a)}},t.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},t.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var i=F.NONE;this._label!==null&&(i=this._label.getLocation(n));var s=null;switch(i){case F.BOUNDARY:s=F.INTERIOR;break;case F.INTERIOR:s=F.BOUNDARY;break;default:s=F.BOUNDARY;break}this._label.setLocation(n,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Or),Tn=function(){this.nodeMap=new qe,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Tn.prototype.find=function(t){return this.nodeMap.get(t)},Tn.prototype.addNode=function(){if(arguments[0]instanceof D){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof Cl){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Tn.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},Tn.prototype.iterator=function(){return this.nodeMap.values().iterator()},Tn.prototype.values=function(){return this.nodeMap.values()},Tn.prototype.getBoundaryNodes=function(t){for(var e=new j,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===F.BOUNDARY&&e.add(i)}return e},Tn.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn};var Jt=function(){},oh={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt},Jt.isNorthern=function(t){return t===Jt.NE||t===Jt.NW},Jt.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2},Jt.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},Jt.isInHalfPlane=function(t,e){return e===Jt.SE?t===Jt.SE||t===Jt.SW:t===e||t===e+1},Jt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new se("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Jt.NE:Jt.SE:e>=0?Jt.NW:Jt.SW}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new se("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?Jt.NE:Jt.SE:i.y>=n.y?Jt.NW:Jt.SW}},oh.NE.get=function(){return 0},oh.NW.get=function(){return 1},oh.SW.get=function(){return 2},oh.SE.get=function(){return 3},Object.defineProperties(Jt,oh);var We=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(n,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],u=arguments[2],h=arguments[3];this._edge=o,this.init(a,u),this._label=h}};We.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:K.computeOrientation(t._p0,t._p1,this._p1)},We.prototype.getDy=function(){return this._dy},We.prototype.getCoordinate=function(){return this._p0},We.prototype.setNode=function(t){this._node=t},We.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),s=n.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},We.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},We.prototype.getDirectedCoordinate=function(){return this._p1},We.prototype.getDx=function(){return this._dx},We.prototype.getLabel=function(){return this._label},We.prototype.getEdge=function(){return this._edge},We.prototype.getQuadrant=function(){return this._quadrant},We.prototype.getNode=function(){return this._node},We.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf("."),i=e.substring(n+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},We.prototype.computeLabel=function(t){},We.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Jt.quadrant(this._dx,this._dy),Pt.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},We.prototype.interfaces_=function(){return[Wr]},We.prototype.getClass=function(){return We};var vf=function(r){function t(){var e=arguments[0],n=arguments[1];if(r.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(n){return this._depth[n]},t.prototype.setVisited=function(n){this._isVisited=n},t.prototype.computeDirectedLabel=function(){this._label=new Yt(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(n,i){if(this._depth[n]!==-999&&this._depth[n]!==i)throw new Di("assigned depths do not match",this.getCoordinate());this._depth[n]=i},t.prototype.isInteriorAreaEdge=function(){for(var n=this,i=!0,s=0;s<2;s++)n._label.isArea(s)&&n._label.getLocation(s,B.LEFT)===F.INTERIOR&&n._label.getLocation(s,B.RIGHT)===F.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(n){this._nextMin=n},t.prototype.print=function(n){r.prototype.print.call(this,n),n.print(" "+this._depth[B.LEFT]+"/"+this._depth[B.RIGHT]),n.print(" ("+this.getDepthDelta()+")"),this._isInResult&&n.print(" inResult")},t.prototype.setMinEdgeRing=function(n){this._minEdgeRing=n},t.prototype.isLineEdge=function(){var n=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,F.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,F.EXTERIOR);return n&&i&&s},t.prototype.setEdgeRing=function(n){this._edgeRing=n},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var n=this._edge.getDepthDelta();return this._isForward||(n=-n),n},t.prototype.setInResult=function(n){this._isInResult=n},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(n){this.print(n),n.print(" "),this._isForward?this._edge.print(n):this._edge.printReverse(n)},t.prototype.setSym=function(n){this._sym=n},t.prototype.setVisitedEdge=function(n){this.setVisited(n),this._sym.setVisited(n)},t.prototype.setEdgeDepths=function(n,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;n===B.LEFT&&(o=-1);var a=B.opposite(n),u=s*o,h=i+u;this.setDepth(n,i),this.setDepth(a,h)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(n){this._next=n},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(n,i){return n===F.EXTERIOR&&i===F.INTERIOR?1:n===F.INTERIOR&&i===F.EXTERIOR?-1:0},t}(We),Pa=function(){};Pa.prototype.createNode=function(t){return new Cl(t,null)},Pa.prototype.interfaces_=function(){return[]},Pa.prototype.getClass=function(){return Pa};var he=function(){if(this._edges=new j,this._nodes=null,this._edgeEndList=new j,arguments.length===0)this._nodes=new Tn(new Pa);else if(arguments.length===1){var t=arguments[0];this._nodes=new Tn(t)}};he.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var n=0;n<this._edges.size();n++){t.println("edge "+n+":");var i=e._edges.get(n);i.print(t),i.eiList.print(t)}},he.prototype.find=function(t){return this._nodes.find(t)},he.prototype.addNode=function(){if(arguments[0]instanceof Cl){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this._nodes.addNode(e)}},he.prototype.getNodeIterator=function(){return this._nodes.iterator()},he.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},he.prototype.debugPrintln=function(t){De.out.println(t)},he.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(n===null)return!1;var i=n.getLabel();return i!==null&&i.getLocation(t)===F.BOUNDARY},he.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},he.prototype.matchInSameDirection=function(t,e,n,i){return t.equals(n)?K.computeOrientation(t,e,i)===K.COLLINEAR&&Jt.quadrant(t,e)===Jt.quadrant(n,i):!1},he.prototype.getEdgeEnds=function(){return this._edgeEndList},he.prototype.debugPrint=function(t){De.out.print(t)},he.prototype.getEdgeIterator=function(){return this._edges.iterator()},he.prototype.findEdgeInSameDirection=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),o=s.getCoordinates();if(n.matchInSameDirection(t,e,o[0],o[1])||n.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return s}return null},he.prototype.insertEdge=function(t){this._edges.add(t)},he.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},he.prototype.addEdges=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();e._edges.add(i);var s=new vf(i,!0),o=new vf(i,!1);s.setSym(o),o.setSym(s),e.add(s),e.add(o)}},he.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},he.prototype.getNodes=function(){return this._nodes.values()},he.prototype.findEdge=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),o=s.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return s}return null},he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he},he.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.getEdges().linkResultDirectedEdges()}};var mr=function(){this._geometryFactory=null,this._shellList=new j;var t=arguments[0];this._geometryFactory=t};mr.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?n.add(s):e.add(s)}},mr.prototype.computePolygons=function(t){for(var e=this,n=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(e._geometryFactory);n.add(o)}return n},mr.prototype.placeFreeHoles=function(t,e){for(var n=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=n.findEdgeRingContaining(s,t);if(o===null)throw new Di("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},mr.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=this,s=new j,o=t.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),h=i.findShell(u);h!==null?(i.placePolygonHoles(h,u),e.add(h)):n.addAll(u)}else s.add(a)}return s},mr.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1},mr.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new j,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new TP(s,e._geometryFactory);n.add(o),o.setInResult()}}return n},mr.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},mr.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},mr.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),s=n.getCoordinateN(0),o=null,a=null,u=e.iterator();u.hasNext();){var h=u.next(),l=h.getLinearRing(),c=l.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;c.contains(i)&&K.isPointInRing(s,l.getCoordinates())&&(f=!0),f&&(o===null||a.contains(c))&&(o=h)}return o},mr.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(n=s,e++)}return Pt.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},mr.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];he.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),s=new j,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var Ia=function(){};Ia.prototype.getBounds=function(){},Ia.prototype.interfaces_=function(){return[]},Ia.prototype.getClass=function(){return Ia};var hn=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};hn.prototype.getItem=function(){return this._item},hn.prototype.getBounds=function(){return this._bounds},hn.prototype.interfaces_=function(){return[Ia,Xr]},hn.prototype.getClass=function(){return hn};var Li=function(){this._size=null,this._items=null,this._size=0,this._items=new j,this._items.add(null)};Li.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Li.prototype.size=function(){return this._size},Li.prototype.reorder=function(t){for(var e=this,n=null,i=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(i)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,i)},Li.prototype.clear=function(){this._size=0,this._items.clear()},Li.prototype.isEmpty=function(){return this._size===0},Li.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li};var ns=function(){};ns.prototype.visitItem=function(t){},ns.prototype.interfaces_=function(){return[]},ns.prototype.getClass=function(){return ns};var yo=function(){};yo.prototype.insert=function(t,e){},yo.prototype.remove=function(t,e){},yo.prototype.query=function(){},yo.prototype.interfaces_=function(){return[]},yo.prototype.getClass=function(){return yo};var Ie=function(){if(this._childBoundables=new j,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},Y0={serialVersionUID:{configurable:!0}};Ie.prototype.getLevel=function(){return this._level},Ie.prototype.size=function(){return this._childBoundables.size()},Ie.prototype.getChildBoundables=function(){return this._childBoundables},Ie.prototype.addChildBoundable=function(t){Pt.isTrue(this._bounds===null),this._childBoundables.add(t)},Ie.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Ie.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Ie.prototype.interfaces_=function(){return[Ia,Xr]},Ie.prototype.getClass=function(){return Ie},Y0.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Ie,Y0);var ln=function(){};ln.reverseOrder=function(){return{compare:function(e,n){return n.compareTo(e)}}},ln.min=function(t){return ln.sort(t),t.get(0)},ln.sort=function(t,e){var n=t.toArray();e?Ds.sort(n,e):Ds.sort(n);for(var i=t.iterator(),s=0,o=n.length;s<o;s++)i.next(),i.set(n[s])},ln.singletonList=function(t){var e=new j;return e.add(t),e};var _e=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};_e.prototype.expandToQueue=function(t,e){var n=_e.isComposite(this._boundable1),i=_e.isComposite(this._boundable2);if(n&&i)return _e.area(this._boundable1)>_e.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new se("neither boundable is composite")},_e.prototype.isLeaves=function(){return!(_e.isComposite(this._boundable1)||_e.isComposite(this._boundable2))},_e.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},_e.prototype.expand=function(t,e,n,i){for(var s=this,o=t.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),h=new _e(u,e,s._itemDistance);h.getDistance()<i&&n.add(h)}},_e.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},_e.prototype.getDistance=function(){return this._distance},_e.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},_e.prototype.interfaces_=function(){return[Wr]},_e.prototype.getClass=function(){return _e},_e.area=function(t){return t.getBounds().getArea()},_e.isComposite=function(t){return t instanceof Ie};var Ne=function r(){if(this._root=null,this._built=!1,this._itemBoundables=new j,this._nodeCapacity=null,arguments.length===0){var t=r.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];Pt.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},Pl={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Ne.prototype.getNodeCapacity=function(){return this._nodeCapacity},Ne.prototype.lastNode=function(t){return t.get(t.size()-1)},Ne.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Ie?n+=t.size(s):s instanceof hn&&(n+=1)}return n}},Ne.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof hn&&s.getItem()===e&&(n=s)}return n!==null?(t.getChildBoundables().remove(n),!0):!1},Ne.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new j:e}else if(arguments.length===1){for(var n=arguments[0],i=new j,s=n.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof Ie){var a=t.itemsTree(o);a!==null&&i.add(a)}else o instanceof hn?i.add(o.getItem()):Pt.shouldNeverReachHere()}return i.size()<=0?null:i}},Ne.prototype.insert=function(t,e){Pt.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new hn(t,e))},Ne.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new j;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(Pt.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof Ie?t.boundablesAtLevel(i,u,o):(Pt.isTrue(u instanceof hn),i===-1&&o.add(u))}return null}},Ne.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new j;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(pt(arguments[2],ns)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie)for(var o=arguments[0],a=arguments[1],u=arguments[2],h=a.getChildBoundables(),l=0;l<h.size();l++){var c=h.get(l);t.getIntersectsOp().intersects(c.getBounds(),o)&&(c instanceof Ie?t.query(o,c,u):c instanceof hn?u.visitItem(c.getItem()):Pt.shouldNeverReachHere())}else if(pt(arguments[2],on)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie)for(var f=arguments[0],p=arguments[1],v=arguments[2],w=p.getChildBoundables(),E=0;E<w.size();E++){var I=w.get(E);t.getIntersectsOp().intersects(I.getBounds(),f)&&(I instanceof Ie?t.query(f,I,v):I instanceof hn?v.add(I.getItem()):Pt.shouldNeverReachHere())}}},Ne.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},Ne.prototype.getRoot=function(){return this.build(),this._root},Ne.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,n):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var u=null,h=s.getChildBoundables().iterator();h.hasNext();){var l=h.next();if(t.getIntersectsOp().intersects(l.getBounds(),i)&&l instanceof Ie&&(a=t.remove(i,l,o),a)){u=l;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},Ne.prototype.createHigherLevels=function(t,e){Pt.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return n.size()===1?n.get(0):this.createHigherLevels(n,e+1)},Ne.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof Ie){var o=t.depth(s);o>n&&(n=o)}}return n+1}},Ne.prototype.createParentBoundables=function(t,e){var n=this;Pt.isTrue(!t.isEmpty());var i=new j;i.add(this.createNode(e));var s=new j(t);ln.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();n.lastNode(i).getChildBoundables().size()===n.getNodeCapacity()&&i.add(n.createNode(e)),n.lastNode(i).addChildBoundable(a)}return i},Ne.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Ne.prototype.interfaces_=function(){return[Xr]},Ne.prototype.getClass=function(){return Ne},Ne.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},Pl.IntersectsOp.get=function(){return AP},Pl.serialVersionUID.get=function(){return-3886435814360241e3},Pl.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(Ne,Pl);var AP=function(){},Ma=function(){};Ma.prototype.distance=function(t,e){},Ma.prototype.interfaces_=function(){return[]},Ma.prototype.getClass=function(){return Ma};var J0=function(r){function t(n){n=n||t.DEFAULT_NODE_CAPACITY,r.call(this,n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;Pt.isTrue(i.length>0);for(var a=new j,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},t.prototype.createNode=function(i){return new j0(i)},t.prototype.size=function(){return arguments.length===0?r.prototype.size.call(this):r.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;r.prototype.insert.call(this,i,s)}else return r.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),u=i.iterator(),h=0;h<s;h++){a[h]=new j;for(var l=0;u.hasNext()&&l<o;){var c=u.next();a[h].add(c),l++}}return a},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return r.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];r.prototype.query.call(this,s,o)}else if(arguments.length===3){if(pt(arguments[2],ns)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie){var a=arguments[0],u=arguments[1],h=arguments[2];r.prototype.query.call(this,a,u,h)}else if(pt(arguments[2],on)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie){var l=arguments[0],c=arguments[1],f=arguments[2];r.prototype.query.call(this,l,c,f)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return r.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return r.prototype.remove.call(this,i,s)}else return r.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?r.prototype.depth.call(this):r.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){Pt.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new j(i);ln.sort(a,t.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(pt(arguments[0],Ma)){var i=arguments[0],s=new _e(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof _e){var o=arguments[0];return this.nearestNeighbour(o,yt.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&pt(arguments[1],Ma)){var a=arguments[0],u=arguments[1],h=new _e(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(h)}else if(arguments[0]instanceof _e&&typeof arguments[1]=="number"){var l=arguments[0],c=arguments[1],f=c,p=null,v=new Li;for(v.add(l);!v.isEmpty()&&f>0;){var w=v.poll(),E=w.getDistance();if(E>=f)break;w.isLeaves()?(f=E,p=w):w.expandToQueue(v,f)}return[p.getBoundable(0).getItem(),p.getBoundable(1).getItem()]}}else if(arguments.length===3){var I=arguments[0],y=arguments[1],_=arguments[2],m=new hn(I,y),S=new _e(this.getRoot(),m,_);return this.nearestNeighbour(S)[0]}},t.prototype.interfaces_=function(){return[yo,Xr]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return j0},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[fa]},compare:function(n,i){return r.compareDoubles(t.centreX(n.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[fa]},compare:function(n,i){return r.compareDoubles(t.centreY(n.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[r.IntersectsOp]},intersects:function(n,i){return n.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(Ne),j0=function(r){function t(){var e=arguments[0];r.call(this,e)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var n=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();n===null?n=new at(s.getBounds()):n.expandToInclude(s.getBounds())}return n},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ie),sr=function(){};sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},sr.relativeSign=function(t,e){return t<e?-1:t>e?1:0},sr.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=sr.relativeSign(e.x,n.x),s=sr.relativeSign(e.y,n.y);switch(t){case 0:return sr.compareValue(i,s);case 1:return sr.compareValue(s,i);case 2:return sr.compareValue(s,-i);case 3:return sr.compareValue(-i,s);case 4:return sr.compareValue(-i,-s);case 5:return sr.compareValue(-s,-i);case 6:return sr.compareValue(-s,i);case 7:return sr.compareValue(i,-s)}return Pt.shouldNeverReachHere("invalid octant value"),0},sr.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var is=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new D(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};is.prototype.getCoordinate=function(){return this.coord},is.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},is.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:sr.compare(this._segmentOctant,this.coord,e.coord)},is.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},is.prototype.isInterior=function(){return this._isInterior},is.prototype.interfaces_=function(){return[Wr]},is.prototype.getClass=function(){return is};var je=function(){this._nodeMap=new qe,this._edge=null;var t=arguments[0];this._edge=t};je.prototype.getSplitCoordinates=function(){var t=this,e=new $u;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},je.prototype.addCollapsedNodes=function(){var t=this,e=new j;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var i=n.next().intValue();t.add(t._edge.getCoordinate(i),i)}},je.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},je.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n<this._edge.size()-2;n++){var i=e._edge.getCoordinate(n),s=e._edge.getCoordinate(n+2);i.equals2D(s)&&t.add(new En(n+1))}},je.prototype.addEdgeCoordinates=function(t,e,n){var i=this,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);n.add(new D(t.coord),!1);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)n.add(i._edge.getCoordinate(a));o&&n.add(new D(e.coord))},je.prototype.iterator=function(){return this._nodeMap.values().iterator()},je.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},je.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(n[0]=t.segmentIndex+1,!0):!1},je.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,n=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=e.findCollapseIndex(s,o,n);a&&t.add(new En(n[0])),s=o}},je.prototype.getEdge=function(){return this._edge},je.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},je.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var h=t.segmentIndex+1;h<=e.segmentIndex;h++)a[u++]=n._edge.getCoordinate(h);return o&&(a[u]=new D(e.coord)),new pe(a,this._edge.getData())},je.prototype.add=function(t,e){var n=new is(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return i!==null?(Pt.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},je.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0),i=n.getCoordinate(0);if(!i.equals2D(e[0]))throw new bi("bad split edge start point at "+i);var s=t.get(t.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(e[e.length-1]))throw new bi("bad split edge end point at "+a)},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var _o=function(){};_o.prototype.interfaces_=function(){return[]},_o.prototype.getClass=function(){return _o},_o.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new se("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new se("Cannot compute the octant for two identical points "+s);return _o.octant(a,u)}};var oi=function(){};oi.prototype.getCoordinates=function(){},oi.prototype.size=function(){},oi.prototype.getCoordinate=function(t){},oi.prototype.isClosed=function(){},oi.prototype.setData=function(t){},oi.prototype.getData=function(){},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi};var ah=function(){};ah.prototype.addIntersection=function(t,e){},ah.prototype.interfaces_=function(){return[oi]},ah.prototype.getClass=function(){return ah};var pe=function(){this._nodeList=new je(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};pe.prototype.getCoordinates=function(){return this._pts},pe.prototype.size=function(){return this._pts.length},pe.prototype.getCoordinate=function(t){return this._pts[t]},pe.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},pe.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},pe.prototype.setData=function(t){this._data=t},pe.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:_o.octant(t,e)},pe.prototype.getData=function(){return this._data},pe.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[3],o=new D(n.getIntersection(s));this.addIntersection(o,i)}},pe.prototype.toString=function(){return sn.toLineString(new ge(this._pts))},pe.prototype.getNodeList=function(){return this._nodeList},pe.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(n=i)}var o=this._nodeList.add(t,n);return o},pe.prototype.addIntersections=function(t,e,n){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,n,s)},pe.prototype.interfaces_=function(){return[ah]},pe.prototype.getClass=function(){return pe},pe.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new j;return pe.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var n=arguments[0],i=arguments[1],s=n.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var ut=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new D,this.p1=new D;else if(arguments.length===1){var t=arguments[0];this.p0=new D(t.p0),this.p1=new D(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],n=arguments[1],i=arguments[2],s=arguments[3];this.p0=new D(e,n),this.p1=new D(i,s)}},Q0={serialVersionUID:{configurable:!0}};ut.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},ut.prototype.orientationIndex=function(){if(arguments[0]instanceof ut){var t=arguments[0],e=K.orientationIndex(this.p0,this.p1,t.p0),n=K.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof D){var i=arguments[0];return K.orientationIndex(this.p0,this.p1,i)}},ut.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},ut.prototype.isVertical=function(){return this.p0.x===this.p1.x},ut.prototype.equals=function(t){if(!(t instanceof ut))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},ut.prototype.intersection=function(t){var e=new As;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},ut.prototype.project=function(){if(arguments[0]instanceof D){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new D(t);var e=this.projectionFactor(t),n=new D;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof ut){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new ut(a,u)}},ut.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},ut.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},ut.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},ut.prototype.distancePerpendicular=function(t){return K.distancePointLinePerpendicular(t,this.p0,this.p1)},ut.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},ut.prototype.midPoint=function(){return ut.midPoint(this.p0,this.p1)},ut.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;if(i<=0)return yt.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i;return s},ut.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),i=yt.MAX_VALUE,s=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var a=this.closestPoint(t.p1);s=a.distance(t.p1),s<i&&(i=s,n[0]=a,n[1]=t.p1);var u=t.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,n[0]=this.p0,n[1]=u);var h=t.closestPoint(this.p1);return s=h.distance(this.p1),s<i&&(i=s,n[0]=this.p1,n[1]=h),n},ut.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var n=this.p0.distance(t),i=this.p1.distance(t);return n<i?this.p0:this.p1},ut.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},ut.prototype.getLength=function(){return this.p0.distance(this.p1)},ut.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return n!==0?n:this.p1.compareTo(e.p1)},ut.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},ut.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},ut.prototype.lineIntersection=function(t){try{var e=nn.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(n){if(!(n instanceof ga))throw n}finally{}return null},ut.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},ut.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),u=0,h=0;if(e!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=e*s/a,h=e*o/a}var l=n-h,c=i+u,f=new D(l,c);return f},ut.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},ut.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||yt.isNaN(e))&&(e=1),e},ut.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},ut.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},ut.prototype.distance=function(){if(arguments[0]instanceof ut){var t=arguments[0];return K.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof D){var e=arguments[0];return K.distancePointLine(e,this.p0,this.p1)}},ut.prototype.pointAlong=function(t){var e=new D;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},ut.prototype.hashCode=function(){var t=yt.doubleToLongBits(this.p0.x);t^=yt.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=yt.doubleToLongBits(this.p1.x);n^=yt.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return e^i},ut.prototype.interfaces_=function(){return[Wr,Xr]},ut.prototype.getClass=function(){return ut},ut.midPoint=function(t,e){return new D((t.x+e.x)/2,(t.y+e.y)/2)},Q0.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(ut,Q0);var uh=function(){this.tempEnv1=new at,this.tempEnv2=new at,this._overlapSeg1=new ut,this._overlapSeg2=new ut};uh.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},uh.prototype.interfaces_=function(){return[]},uh.prototype.getClass=function(){return uh};var yr=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};yr.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},yr.prototype.computeSelect=function(t,e,n,i){var s=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(s,o),n-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+n)/2);e<a&&this.computeSelect(t,e,a,i),a<n&&this.computeSelect(t,a,n,i)},yr.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),n=0,i=this._start;i<=this._end;i++)e[n++]=t._pts[i];return e},yr.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},yr.prototype.setId=function(t){this._id=t},yr.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},yr.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new at(t,e)}return this._env},yr.prototype.getEndIndex=function(){return this._end},yr.prototype.getStartIndex=function(){return this._start},yr.prototype.getContext=function(){return this._context},yr.prototype.getId=function(){return this._id},yr.prototype.computeOverlapsInternal=function(t,e,n,i,s,o){var a=this._pts[t],u=this._pts[e],h=n._pts[i],l=n._pts[s];if(e-t===1&&s-i===1)return o.overlap(this,t,n,i),null;if(o.tempEnv1.init(a,u),o.tempEnv2.init(h,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),f=Math.trunc((i+s)/2);t<c&&(i<f&&this.computeOverlapsInternal(t,c,n,i,f,o),f<s&&this.computeOverlapsInternal(t,c,n,f,s,o)),c<e&&(i<f&&this.computeOverlapsInternal(c,e,n,i,f,o),f<s&&this.computeOverlapsInternal(c,e,n,f,s,o))},yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr};var An=function(){};An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An},An.getChainStartIndices=function(t){var e=0,n=new j;n.add(new En(e));do{var i=An.findChainEnd(t,e);n.add(new En(i)),e=i}while(e<t.length-1);var s=An.toIntArray(n);return s},An.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=Jt.quadrant(t[n],t[n+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var o=Jt.quadrant(t[s-1],t[s]);if(o!==i)break}s++}return s-1},An.getChains=function(){if(arguments.length===1){var t=arguments[0];return An.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],n=arguments[1],i=new j,s=An.getChainStartIndices(e),o=0;o<s.length-1;o++){var a=new yr(e,s[o],s[o+1],n);i.add(a)}return i}},An.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Rs=function(){};Rs.prototype.computeNodes=function(t){},Rs.prototype.getNodedSubstrings=function(){},Rs.prototype.interfaces_=function(){return[]},Rs.prototype.getClass=function(){return Rs};var hh=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};hh.prototype.setSegmentIntersector=function(t){this._segInt=t},hh.prototype.interfaces_=function(){return[Rs]},hh.prototype.getClass=function(){return hh};var mf=function(r){function t(n){n?r.call(this,n):r.call(this),this._monoChains=new j,this._index=new J0,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return pe.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,o=An.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new K0(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),h=u.iterator();h.hasNext();){var l=h.next();if(l.getId()>a.getId()&&(a.computeOverlaps(l,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return K0},Object.defineProperties(t,e),t}(hh),K0=function(r){function t(){r.call(this),this._si=null;var e=arguments[0];this._si=e}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=n.getContext(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return r.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(uh),zt=function r(){if(this._quadrantSegments=r.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=r.CAP_ROUND,this._joinStyle=r.JOIN_ROUND,this._mitreLimit=r.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=r.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},Ri={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};zt.prototype.getEndCapStyle=function(){return this._endCapStyle},zt.prototype.isSingleSided=function(){return this._isSingleSided},zt.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=zt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=zt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==zt.JOIN_ROUND&&(this._quadrantSegments=zt.DEFAULT_QUADRANT_SEGMENTS)},zt.prototype.getJoinStyle=function(){return this._joinStyle},zt.prototype.setJoinStyle=function(t){this._joinStyle=t},zt.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},zt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},zt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},zt.prototype.setEndCapStyle=function(t){this._endCapStyle=t},zt.prototype.getMitreLimit=function(){return this._mitreLimit},zt.prototype.setMitreLimit=function(t){this._mitreLimit=t},zt.prototype.setSingleSided=function(t){this._isSingleSided=t},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt},zt.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Ri.CAP_ROUND.get=function(){return 1},Ri.CAP_FLAT.get=function(){return 2},Ri.CAP_SQUARE.get=function(){return 3},Ri.JOIN_ROUND.get=function(){return 1},Ri.JOIN_MITRE.get=function(){return 2},Ri.JOIN_BEVEL.get=function(){return 3},Ri.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Ri.DEFAULT_MITRE_LIMIT.get=function(){return 5},Ri.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(zt,Ri);var ce=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=K.COUNTERCLOCKWISE,this._inputLine=t||null},lh={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};ce.prototype.isDeletable=function(t,e,n,i){var s=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,t,n,i)},ce.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(n),s=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(e,n,i,t._distanceTol)&&(t._isDeleted[n]=ce.DELETE,o=!0,s=!0),o?e=i:e=n,n=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(n)}return s},ce.prototype.isShallowConcavity=function(t,e,n,i){var s=K.computeOrientation(t,e,n),o=s===this._angleOrientation;if(!o)return!1;var a=K.distancePointLine(e,t,n);return a<i},ce.prototype.isShallowSampled=function(t,e,n,i,s){var o=this,a=Math.trunc((i-n)/ce.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=n;u<i;u+=a)if(!o.isShallow(t,e,o._inputLine[u],s))return!1;return!0},ce.prototype.isConcave=function(t,e,n){var i=K.computeOrientation(t,e,n),s=i===this._angleOrientation;return s},ce.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=K.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=e.deleteShallowConcavities();while(n);return this.collapseLine()},ce.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===ce.DELETE;)e++;return e},ce.prototype.isShallow=function(t,e,n,i){var s=K.distancePointLine(e,t,n);return s<i},ce.prototype.collapseLine=function(){for(var t=this,e=new $u,n=0;n<this._inputLine.length;n++)t._isDeleted[n]!==ce.DELETE&&e.add(t._inputLine[n]);return e.toCoordinateArray()},ce.prototype.interfaces_=function(){return[]},ce.prototype.getClass=function(){return ce},ce.simplify=function(t,e){var n=new ce(t);return n.simplify(e)},lh.INIT.get=function(){return 0},lh.DELETE.get=function(){return 1},lh.KEEP.get=function(){return 1},lh.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(ce,lh);var Dr=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new j},$0={COORDINATE_ARRAY_TYPE:{configurable:!0}};Dr.prototype.getCoordinates=function(){var t=this._ptList.toArray(Dr.COORDINATE_ARRAY_TYPE);return t},Dr.prototype.setPrecisionModel=function(t){this._precisionModel=t},Dr.prototype.addPt=function(t){var e=new D(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Dr.prototype.revere=function(){},Dr.prototype.addPts=function(t,e){var n=this;if(e)for(var i=0;i<t.length;i++)n.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)n.addPt(t[s])},Dr.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return n<this._minimimVertexDistance},Dr.prototype.toString=function(){var t=new xt,e=t.createLineString(this.getCoordinates());return e.toString()},Dr.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new D(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Dr.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},$0.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Dr,$0);var At=function(){},wo={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},At.toDegrees=function(t){return t*180/Math.PI},At.normalize=function(t){for(;t>Math.PI;)t-=At.PI_TIMES_2;for(;t<=-Math.PI;)t+=At.PI_TIMES_2;return t},At.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=n.x-e.x,s=n.y-e.y;return Math.atan2(s,i)}},At.isAcute=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,o=n.x-e.x,a=n.y-e.y,u=i*o+s*a;return u>0},At.isObtuse=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,o=n.x-e.x,a=n.y-e.y,u=i*o+s*a;return u<0},At.interiorAngle=function(t,e,n){var i=At.angle(e,t),s=At.angle(e,n);return Math.abs(s-i)},At.normalizePositive=function(t){if(t<0){for(;t<0;)t+=At.PI_TIMES_2;t>=At.PI_TIMES_2&&(t=0)}else{for(;t>=At.PI_TIMES_2;)t-=At.PI_TIMES_2;t<0&&(t=0)}return t},At.angleBetween=function(t,e,n){var i=At.angle(e,t),s=At.angle(e,n);return At.diff(i,s)},At.diff=function(t,e){var n=null;return t<e?n=e-t:n=t-e,n>Math.PI&&(n=2*Math.PI-n),n},At.toRadians=function(t){return t*Math.PI/180},At.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?At.COUNTERCLOCKWISE:n<0?At.CLOCKWISE:At.NONE},At.angleBetweenOriented=function(t,e,n){var i=At.angle(e,t),s=At.angle(e,n),o=s-i;return o<=-Math.PI?o+At.PI_TIMES_2:o>Math.PI?o-At.PI_TIMES_2:o},wo.PI_TIMES_2.get=function(){return 2*Math.PI},wo.PI_OVER_2.get=function(){return Math.PI/2},wo.PI_OVER_4.get=function(){return Math.PI/4},wo.COUNTERCLOCKWISE.get=function(){return K.COUNTERCLOCKWISE},wo.CLOCKWISE.get=function(){return K.CLOCKWISE},wo.NONE.get=function(){return K.COLLINEAR},Object.defineProperties(At,wo);var re=function r(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new ut,this._seg1=new ut,this._offset0=new ut,this._offset1=new ut,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new As,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===zt.JOIN_ROUND&&(this._closingSegLengthFactor=r.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},ch={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};re.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=K.computeOrientation(this._s0,this._s1,this._s2),i=n===K.CLOCKWISE&&this._side===B.LEFT||n===K.COUNTERCLOCKWISE&&this._side===B.RIGHT;n===0?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},re.prototype.addLineEndCap=function(t,e){var n=new ut(t,e),i=new ut;this.computeOffsetSegment(n,B.LEFT,this._distance,i);var s=new ut;this.computeOffsetSegment(n,B.RIGHT,this._distance,s);var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case zt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,u+Math.PI/2,u-Math.PI/2,K.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case zt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case zt.CAP_SQUARE:var h=new D;h.x=Math.abs(this._distance)*Math.cos(u),h.y=Math.abs(this._distance)*Math.sin(u);var l=new D(i.p1.x+h.x,i.p1.y+h.y),c=new D(s.p1.x+h.x,s.p1.y+h.y);this._segList.addPt(l),this._segList.addPt(c);break}},re.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},re.prototype.addMitreJoin=function(t,e,n,i){var s=!0,o=null;try{o=nn.intersection(e.p0,e.p1,n.p0,n.p1);var a=i<=0?1:o.distance(t)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(u){if(u instanceof ga)o=new D(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},re.prototype.addFilletCorner=function(t,e,n,i,s){var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o),h=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,h);i===K.CLOCKWISE?u<=c&&(u+=2*Math.PI):u>=c&&(u-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,u,c,i,s),this._segList.addPt(n)},re.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*re.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===zt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===zt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},re.prototype.createSquare=function(t){this._segList.addPt(new D(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new D(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},re.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},re.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},re.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},re.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},re.prototype.addLimitedMitreJoin=function(t,e,n,i){var s=this._seg0.p1,o=At.angle(s,this._seg0.p0),a=At.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,h=At.normalize(o+u),l=At.normalize(h+Math.PI),c=i*n,f=c*Math.abs(Math.sin(u)),p=n-f,v=s.x+c*Math.cos(l),w=s.y+c*Math.sin(l),E=new D(v,w),I=new ut(s,E),y=I.pointAlongOffset(1,p),_=I.pointAlongOffset(1,-p);this._side===B.LEFT?(this._segList.addPt(y),this._segList.addPt(_)):(this._segList.addPt(_),this._segList.addPt(y))},re.prototype.computeOffsetSegment=function(t,e,n,i){var s=e===B.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,u=Math.sqrt(o*o+a*a),h=s*n*o/u,l=s*n*a/u;i.p0.x=t.p0.x-l,i.p0.y=t.p0.y+h,i.p1.x=t.p1.x-l,i.p1.y=t.p1.y+h},re.prototype.addFilletArc=function(t,e,n,i,s){var o=this,a=i===K.CLOCKWISE?-1:1,u=Math.abs(e-n),h=Math.trunc(u/this._filletAngleQuantum+.5);if(h<1)return null;for(var l=0,c=u/h,f=l,p=new D;f<u;){var v=e+a*f;p.x=t.x+s*Math.cos(v),p.y=t.y+s*Math.sin(v),o._segList.addPt(p),f+=c}},re.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*re.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new D((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new D((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},re.prototype.createCircle=function(t){var e=new D(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},re.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},re.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Dr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*re.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},re.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===zt.JOIN_BEVEL||this._bufParams.getJoinStyle()===zt.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,K.CLOCKWISE,this._distance))},re.prototype.closeRing=function(){this._segList.closeRing()},re.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},re.prototype.interfaces_=function(){return[]},re.prototype.getClass=function(){return re},ch.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},ch.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},ch.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},ch.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(re,ch);var or=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};or.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,n,s);var o=s.getCoordinates();return n&&Nt.reverse(o),o},or.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var s=ce.simplify(t,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],B.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{n.addSegments(t,!1);var u=ce.simplify(t,i),h=u.length-1;n.initSideSegments(u[0],u[1],B.LEFT),n.addFirstSegment();for(var l=2;l<=h;l++)n.addNextSegment(u[l],!0)}n.addLastSegment(),n.closeRing()},or.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===B.RIGHT&&(i=-i);var s=ce.simplify(t,i),o=s.length-1;n.initSideSegments(s[o-1],s[0],e);for(var a=1;a<=o;a++){var u=a!==1;n.addNextSegment(s[a],u)}n.closeRing()},or.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=ce.simplify(t,n),s=i.length-1;e.initSideSegments(i[0],i[1],B.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var a=ce.simplify(t,-n),u=a.length-1;e.initSideSegments(a[u],a[u-1],B.LEFT);for(var h=u-2;h>=0;h--)e.addNextSegment(a[h],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},or.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case zt.CAP_ROUND:e.createCircle(t);break;case zt.CAP_SQUARE:e.createSquare(t);break}},or.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o},or.prototype.getBufferParameters=function(){return this._bufParams},or.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},or.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return or.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},or.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var s=ce.simplify(t,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],B.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{var u=ce.simplify(t,i),h=u.length-1;n.initSideSegments(u[0],u[1],B.LEFT),n.addFirstSegment();for(var l=2;l<=h;l++)n.addNextSegment(u[l],!0)}n.addLastSegment()},or.prototype.getSegGen=function(t){return new re(this._precisionModel,this._bufParams,t)},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new D(t[n]);return e};var Eo=function(){this._subgraphs=null,this._seg=new ut,this._cga=new K;var t=arguments[0];this._subgraphs=t},Z0={DepthSegment:{configurable:!0}};Eo.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=new j,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(pt(arguments[2],on)&&arguments[0]instanceof D&&arguments[1]instanceof vf)for(var a=arguments[0],u=arguments[1],h=arguments[2],l=u.getEdge().getCoordinates(),c=0;c<l.length-1;c++){t._seg.p0=l[c],t._seg.p1=l[c+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var f=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(f<a.x)&&!t._seg.isHorizontal()&&!(a.y<t._seg.p0.y||a.y>t._seg.p1.y)&&K.computeOrientation(t._seg.p0,t._seg.p1,a)!==K.RIGHT){var p=u.getDepth(B.LEFT);t._seg.p0.equals(l[c])||(p=u.getDepth(B.RIGHT));var v=new Fs(t._seg,p);h.add(v)}}else if(pt(arguments[2],on)&&arguments[0]instanceof D&&pt(arguments[1],on))for(var w=arguments[0],E=arguments[1],I=arguments[2],y=E.iterator();y.hasNext();){var _=y.next();_.isForward()&&t.findStabbedSegments(w,_,I)}}},Eo.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=ln.min(e);return n._leftDepth},Eo.prototype.interfaces_=function(){return[]},Eo.prototype.getClass=function(){return Eo},Z0.DepthSegment.get=function(){return Fs},Object.defineProperties(Eo,Z0);var Fs=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new ut(t),this._leftDepth=e};Fs.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)},Fs.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)},Fs.prototype.toString=function(){return this._upwardSeg.toString()},Fs.prototype.interfaces_=function(){return[Wr]},Fs.prototype.getClass=function(){return Fs};var qt=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};qt.prototype.area=function(){return qt.area(this.p0,this.p1,this.p2)},qt.prototype.signedArea=function(){return qt.signedArea(this.p0,this.p1,this.p2)},qt.prototype.interpolateZ=function(t){if(t===null)throw new se("Supplied point is null.");return qt.interpolateZ(t,this.p0,this.p1,this.p2)},qt.prototype.longestSideLength=function(){return qt.longestSideLength(this.p0,this.p1,this.p2)},qt.prototype.isAcute=function(){return qt.isAcute(this.p0,this.p1,this.p2)},qt.prototype.circumcentre=function(){return qt.circumcentre(this.p0,this.p1,this.p2)},qt.prototype.area3D=function(){return qt.area3D(this.p0,this.p1,this.p2)},qt.prototype.centroid=function(){return qt.centroid(this.p0,this.p1,this.p2)},qt.prototype.inCentre=function(){return qt.inCentre(this.p0,this.p1,this.p2)},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},qt.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},qt.det=function(t,e,n,i){return t*i-e*n},qt.interpolateZ=function(t,e,n,i){var s=e.x,o=e.y,a=n.x-s,u=i.x-s,h=n.y-o,l=i.y-o,c=a*l-u*h,f=t.x-s,p=t.y-o,v=(l*f-u*p)/c,w=(-h*f+a*p)/c,E=e.z+v*(n.z-e.z)+w*(i.z-e.z);return E},qt.longestSideLength=function(t,e,n){var i=t.distance(e),s=e.distance(n),o=n.distance(t),a=i;return s>a&&(a=s),o>a&&(a=o),a},qt.isAcute=function(t,e,n){return!(!At.isAcute(t,e,n)||!At.isAcute(e,n,t)||!At.isAcute(n,t,e))},qt.circumcentre=function(t,e,n){var i=n.x,s=n.y,o=t.x-i,a=t.y-s,u=e.x-i,h=e.y-s,l=2*qt.det(o,a,u,h),c=qt.det(a,o*o+a*a,h,u*u+h*h),f=qt.det(o,o*o+a*a,u,u*u+h*h),p=i-c/l,v=s+f/l;return new D(p,v)},qt.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,s=new nn(t.x+n/2,t.y+i/2,1),o=new nn(t.x-i+n/2,t.y+n+i/2,1);return new nn(s,o)},qt.angleBisector=function(t,e,n){var i=e.distance(t),s=e.distance(n),o=i/(i+s),a=n.x-t.x,u=n.y-t.y,h=new D(t.x+o*a,t.y+o*u);return h},qt.area3D=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,o=e.z-t.z,a=n.x-t.x,u=n.y-t.y,h=n.z-t.z,l=s*h-o*u,c=o*a-i*h,f=i*u-s*a,p=l*l+c*c+f*f,v=Math.sqrt(p)/2;return v},qt.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,s=(t.y+e.y+n.y)/3;return new D(i,s)},qt.inCentre=function(t,e,n){var i=e.distance(n),s=t.distance(n),o=t.distance(e),a=i+s+o,u=(i*t.x+s*e.x+o*n.x)/a,h=(i*t.y+s*e.y+o*n.y)/a;return new D(u,h)};var jr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new j;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};jr.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},jr.prototype.addPolygon=function(t){var e=this,n=this._distance,i=B.LEFT;this._distance<0&&(n=-this._distance,i=B.RIGHT);var s=t.getExteriorRing(),o=Nt.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,n,i,F.EXTERIOR,F.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var u=t.getInteriorRingN(a),h=Nt.removeRepeatedPoints(u.getCoordinates());e._distance>0&&e.isErodedCompletely(u,-e._distance)||e.addPolygonRing(h,n,B.opposite(i),F.INTERIOR,F.EXTERIOR)}},jr.prototype.isTriangleErodedCompletely=function(t,e){var n=new qt(t[0],t[1],t[2]),i=n.inCentre(),s=K.distancePointLine(i,n.p0,n.p1);return s<Math.abs(e)},jr.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Nt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},jr.prototype.addCurve=function(t,e,n){if(t===null||t.length<2)return null;var i=new pe(t,new Yt(0,F.BOUNDARY,e,n));this._curveList.add(i)},jr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},jr.prototype.addPolygonRing=function(t,e,n,i,s){if(e===0&&t.length<ni.MINIMUM_VALID_SIZE)return null;var o=i,a=s;t.length>=ni.MINIMUM_VALID_SIZE&&K.isCCW(t)&&(o=s,a=i,n=B.opposite(n));var u=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(u,o,a)},jr.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Pe?this.addPolygon(t):t instanceof le?this.addLineString(t):t instanceof vr?this.addPoint(t):t instanceof Ca?this.addCollection(t):t instanceof Ls?this.addCollection(t):t instanceof ii?this.addCollection(t):t instanceof Ye&&this.addCollection(t)},jr.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},jr.prototype.addCollection=function(t){for(var e=this,n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);e.add(i)}},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr};var ba=function(){};ba.prototype.locate=function(t){},ba.prototype.interfaces_=function(){return[]},ba.prototype.getClass=function(){return ba};var ai=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};ai.prototype.next=function(){if(this._atStart)return this._atStart=!1,ai.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new Ea;var t=this._parent.getGeometryN(this._index++);return t instanceof Ye?(this._subcollectionIterator=new ai(t),this._subcollectionIterator.next()):t},ai.prototype.remove=function(){throw new Error(this.getClass().getName())},ai.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},ai.prototype.interfaces_=function(){return[wa]},ai.prototype.getClass=function(){return ai},ai.isAtomic=function(t){return!(t instanceof Ye)};var Lr=function(){this._geom=null;var t=arguments[0];this._geom=t};Lr.prototype.locate=function(t){return Lr.locate(t,this._geom)},Lr.prototype.interfaces_=function(){return[ba]},Lr.prototype.getClass=function(){return Lr},Lr.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?K.isPointInRing(t,e.getCoordinates()):!1},Lr.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Lr.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(Lr.isPointInRing(t,s))return!1}return!0},Lr.containsPoint=function(t,e){if(e instanceof Pe)return Lr.containsPointInPolygon(t,e);if(e instanceof Ye)for(var n=new ai(e);n.hasNext();){var i=n.next();if(i!==e&&Lr.containsPoint(t,i))return!0}return!1},Lr.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:Lr.containsPoint(t,e)?F.INTERIOR:F.EXTERIOR};var Xe=function(){this._edgeMap=new qe,this._edgeList=null,this._ptInAreaLocation=[F.NONE,F.NONE]};Xe.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return e===0&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Xe.prototype.propagateSideLabels=function(t){for(var e=F.NONE,n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,B.LEFT)!==F.NONE&&(e=s.getLocation(t,B.LEFT))}if(e===F.NONE)return null;for(var o=e,a=this.iterator();a.hasNext();){var u=a.next(),h=u.getLabel();if(h.getLocation(t,B.ON)===F.NONE&&h.setLocation(t,B.ON,o),h.isArea(t)){var l=h.getLocation(t,B.LEFT),c=h.getLocation(t,B.RIGHT);if(c!==F.NONE){if(c!==o)throw new Di("side location conflict",u.getCoordinate());l===F.NONE&&Pt.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=l}else Pt.isTrue(h.getLocation(t,B.LEFT)===F.NONE,"found single null side"),h.setLocation(t,B.RIGHT,o),h.setLocation(t,B.LEFT,o)}}},Xe.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},Xe.prototype.print=function(t){De.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},Xe.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Xe.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel(),s=i.getLocation(t,B.LEFT);Pt.isTrue(s!==F.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),h=u.getLabel();Pt.isTrue(h.isArea(t),"Found non-area edge");var l=h.getLocation(t,B.LEFT),c=h.getLocation(t,B.RIGHT);if(l===c||c!==o)return!1;o=l}return!0},Xe.prototype.findIndex=function(t){var e=this;this.iterator();for(var n=0;n<this._edgeList.size();n++){var i=e._edgeList.get(n);if(i===t)return n}return-1},Xe.prototype.iterator=function(){return this.getEdges().iterator()},Xe.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new j(this._edgeMap.values())),this._edgeList},Xe.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===F.NONE&&(this._ptInAreaLocation[t]=Lr.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Xe.prototype.toString=function(){var t=new wn;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
|
|
64
|
+
***************************************************************************** */function QC(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(h){return function(l){return u([h,l])}}function u(h){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(s=h[0]&2?i.return:h[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,h[1])).done)return s;switch(i=0,s&&(h=[h[0]&2,s.value]),h[0]){case 0:case 1:s=h;break;case 4:return e.label++,{value:h[1],done:!1};case 5:e.label++,i=h[1],h=[0];continue;case 7:h=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]<s[3])){e.label=h[1];break}if(h[0]===6&&e.label<s[1]){e.label=s[1],s=h;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(h);break}s[2]&&e.ops.pop(),e.trys.pop();continue}h=t.call(r,e)}catch(l){h=[6,l],i=0}finally{n=s=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}var bs=function(){function r(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return r}();function KC(r,t){return r>t?1:r<t?-1:0}function Ns(r,t,e){for(var n=new bs(null,null),i=n,s=n;;){var o=e(r,t.key);if(o<0){if(t.left===null)break;if(e(r,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}s.left=t,s=t,t=t.left}else if(o>0){if(t.right===null)break;if(e(r,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}i.right=t,i=t,t=t.right}else break}return i.right=t.left,s.left=t.right,t.left=n.right,t.right=n.left,t}function Zc(r,t,e,n){var i=new bs(r,t);if(e===null)return i.left=i.right=null,i;e=Ns(r,e,n);var s=n(r,e.key);return s<0?(i.left=e.left,i.right=e,e.left=null):s>=0&&(i.right=e.right,i.left=e,e.right=null),i}function C0(r,t,e){var n=null,i=null;if(t){t=Ns(r,t,e);var s=e(t.key,r);s===0?(n=t.left,i=t.right):s<0?(i=t.right,t.right=null,n=t):(n=t.left,t.left=null,i=t)}return{left:n,right:i}}function $C(r,t,e){return t===null?r:(r===null||(t=Ns(r.key,t,e),t.left=r),t)}function tf(r,t,e,n,i){if(r){n(""+t+(e?"└── ":"├── ")+i(r)+`
|
|
65
|
+
`);var s=t+(e?" ":"│ ");r.left&&tf(r.left,s,!1,n,i),r.right&&tf(r.right,s,!0,n,i)}}var ef=function(){function r(t){t===void 0&&(t=KC),this._root=null,this._size=0,this._comparator=t}return r.prototype.insert=function(t,e){return this._size++,this._root=Zc(t,e,this._root,this._comparator)},r.prototype.add=function(t,e){var n=new bs(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=Ns(t,this._root,i),o=i(t,s.key);return o===0?this._root=s:(o<0?(n.left=s.left,n.right=s,s.left=null):o>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},r.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},r.prototype._remove=function(t,e,n){var i;if(e===null)return null;e=Ns(t,e,n);var s=n(t,e.key);return s===0?(e.left===null?i=e.right:(i=Ns(t,e.left,n),i.right=e.right),this._size--,i):e},r.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Ns(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},r.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},r.prototype.find=function(t){return this._root&&(this._root=Ns(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},r.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},r.prototype.forEach=function(t,e){for(var n=this._root,i=[],s=!1;!s;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),t.call(e,n),n=n.right):s=!0;return this},r.prototype.range=function(t,e,n,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,e),u>0)break;if(o(a.key,t)>=0&&n.call(i,a))return this;a=a.right}return this},r.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},r.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},r.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},r.prototype.at=function(t){for(var e=this._root,n=!1,i=0,s=[];!n;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},r.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(n=e,e=e.left):e=e.right}return n},r.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(n=e,e=e.right)}return n},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return tP(this._root)},r.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var i=t.length,s=this._comparator;if(n&&sf(t,e,0,i-1,s),this._root===null)this._root=rf(t,e,0,i),this._size=i;else{var o=eP(this.toList(),ZC(t,e),s);i=this._size+i,this._root=nf({head:o},0,i)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return tf(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},r.prototype.update=function(t,e,n){var i=this._comparator,s=C0(t,this._root,i),o=s.left,a=s.right;i(t,e)<0?a=Zc(e,n,a,i):o=Zc(e,n,o,i),this._root=$C(o,a,i)},r.prototype.split=function(t){return C0(t,this._root,this._comparator)},r.prototype[Symbol.iterator]=function(){var t,e,n;return QC(this,function(i){switch(i.label){case 0:t=this._root,e=[],n=!1,i.label=1;case 1:return n?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},r}();function rf(r,t,e,n){var i=n-e;if(i>0){var s=e+Math.floor(i/2),o=r[s],a=t[s],u=new bs(o,a);return u.left=rf(r,t,e,s),u.right=rf(r,t,s+1,n),u}return null}function ZC(r,t){for(var e=new bs(null,null),n=e,i=0;i<r.length;i++)n=n.next=new bs(r[i],t[i]);return n.next=null,e.next}function tP(r){for(var t=r,e=[],n=!1,i=new bs(null,null),s=i;!n;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):n=!0;return s.next=null,i.next}function nf(r,t,e){var n=e-t;if(n>0){var i=t+Math.floor(n/2),s=nf(r,t,i),o=r.head;return o.left=s,r.head=r.head.next,o.right=nf(r,i+1,e),o}return null}function eP(r,t,e){for(var n=new bs(null,null),i=n,s=r,o=t;s!==null&&o!==null;)e(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),n.next}function sf(r,t,e,n,i){if(!(e>=n)){for(var s=r[e+n>>1],o=e-1,a=n+1;;){do o++;while(i(r[o],s)<0);do a--;while(i(r[a],s)>0);if(o>=a)break;var u=r[o];r[o]=r[a],r[a]=u,u=t[o],t[o]=t[a],t[a]=u}sf(r,t,e,a,i),sf(r,t,a+1,n,i)}}const ts=11102230246251565e-32,pr=134217729,rP=(3+8*ts)*ts;function of(r,t,e,n,i){let s,o,a,u,h=t[0],l=n[0],c=0,f=0;l>h==l>-h?(s=h,h=t[++c]):(s=l,l=n[++f]);let p=0;if(c<r&&f<e)for(l>h==l>-h?(o=h+s,a=s-(o-h),h=t[++c]):(o=l+s,a=s-(o-l),l=n[++f]),s=o,a!==0&&(i[p++]=a);c<r&&f<e;)l>h==l>-h?(o=s+h,u=o-s,a=s-(o-u)+(h-u),h=t[++c]):(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=n[++f]),s=o,a!==0&&(i[p++]=a);for(;c<r;)o=s+h,u=o-s,a=s-(o-u)+(h-u),h=t[++c],s=o,a!==0&&(i[p++]=a);for(;f<e;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=n[++f],s=o,a!==0&&(i[p++]=a);return(s!==0||p===0)&&(i[p++]=s),p}function nP(r,t){let e=t[0];for(let n=1;n<r;n++)e+=t[n];return e}function Bu(r){return new Float64Array(r)}const iP=(3+16*ts)*ts,sP=(2+12*ts)*ts,oP=(9+64*ts)*ts*ts,ca=Bu(4),P0=Bu(8),I0=Bu(12),M0=Bu(16),Tr=Bu(4);function aP(r,t,e,n,i,s,o){let a,u,h,l,c,f,p,v,w,E,I,y,_,m,S,C,P,b;const x=r-i,A=e-i,N=t-s,T=n-s;m=x*T,f=pr*x,p=f-(f-x),v=x-p,f=pr*T,w=f-(f-T),E=T-w,S=v*E-(m-p*w-v*w-p*E),C=N*A,f=pr*N,p=f-(f-N),v=N-p,f=pr*A,w=f-(f-A),E=A-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,ca[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,ca[1]=_-(I+c)+(c-C),b=y+I,c=b-y,ca[2]=y-(b-c)+(I-c),ca[3]=b;let R=nP(4,ca),V=sP*o;if(R>=V||-R>=V||(c=r-x,a=r-(x+c)+(c-i),c=e-A,h=e-(A+c)+(c-i),c=t-N,u=t-(N+c)+(c-s),c=n-T,l=n-(T+c)+(c-s),a===0&&u===0&&h===0&&l===0)||(V=oP*o+rP*Math.abs(R),R+=x*l+T*a-(N*h+A*u),R>=V||-R>=V))return R;m=a*T,f=pr*a,p=f-(f-a),v=a-p,f=pr*T,w=f-(f-T),E=T-w,S=v*E-(m-p*w-v*w-p*E),C=u*A,f=pr*u,p=f-(f-u),v=u-p,f=pr*A,w=f-(f-A),E=A-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,Tr[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,Tr[1]=_-(I+c)+(c-C),b=y+I,c=b-y,Tr[2]=y-(b-c)+(I-c),Tr[3]=b;const $=of(4,ca,4,Tr,P0);m=x*l,f=pr*x,p=f-(f-x),v=x-p,f=pr*l,w=f-(f-l),E=l-w,S=v*E-(m-p*w-v*w-p*E),C=N*h,f=pr*N,p=f-(f-N),v=N-p,f=pr*h,w=f-(f-h),E=h-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,Tr[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,Tr[1]=_-(I+c)+(c-C),b=y+I,c=b-y,Tr[2]=y-(b-c)+(I-c),Tr[3]=b;const J=of($,P0,4,Tr,I0);m=a*l,f=pr*a,p=f-(f-a),v=a-p,f=pr*l,w=f-(f-l),E=l-w,S=v*E-(m-p*w-v*w-p*E),C=u*h,f=pr*u,p=f-(f-u),v=u-p,f=pr*h,w=f-(f-h),E=h-w,P=v*E-(C-p*w-v*w-p*E),I=S-P,c=S-I,Tr[0]=S-(I+c)+(c-P),y=m+I,c=y-m,_=m-(y-c)+(I-c),I=_-C,c=_-I,Tr[1]=_-(I+c)+(c-C),b=y+I,c=b-y,Tr[2]=y-(b-c)+(I-c),Tr[3]=b;const st=of(J,I0,4,Tr,M0);return M0[st-1]}function uP(r,t,e,n,i,s){const o=(t-s)*(e-i),a=(r-i)*(n-s),u=o-a,h=Math.abs(o+a);return Math.abs(u)>=iP*h?u:-aP(r,t,e,n,i,s,h)}const Yu=(r,t)=>r.ll.x<=t.x&&t.x<=r.ur.x&&r.ll.y<=t.y&&t.y<=r.ur.y,af=(r,t)=>{if(t.ur.x<r.ll.x||r.ur.x<t.ll.x||t.ur.y<r.ll.y||r.ur.y<t.ll.y)return null;const e=r.ll.x<t.ll.x?t.ll.x:r.ll.x,n=r.ur.x<t.ur.x?r.ur.x:t.ur.x,i=r.ll.y<t.ll.y?t.ll.y:r.ll.y,s=r.ur.y<t.ur.y?r.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:n,y:s}}};let xs=Number.EPSILON;xs===void 0&&(xs=Math.pow(2,-52));const hP=xs*xs,b0=(r,t)=>{if(-xs<r&&r<xs&&-xs<t&&t<xs)return 0;const e=r-t;return e*e<hP*r*t?0:r<t?-1:1};class lP{constructor(){this.reset()}reset(){this.xRounder=new N0,this.yRounder=new N0}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class N0{constructor(){this.tree=new ef,this.round(0)}round(t){const e=this.tree.add(t),n=this.tree.prev(e);if(n!==null&&b0(e.key,n.key)===0)return this.tree.remove(t),n.key;const i=this.tree.next(e);return i!==null&&b0(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const Ju=new lP,hl=(r,t)=>r.x*t.y-r.y*t.x,x0=(r,t)=>r.x*t.x+r.y*t.y,T0=(r,t,e)=>{const n=uP(r.x,r.y,t.x,t.y,e.x,e.y);return n>0?-1:n<0?1:0},ll=r=>Math.sqrt(x0(r,r)),cP=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return hl(i,n)/ll(i)/ll(n)},fP=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return x0(i,n)/ll(i)/ll(n)},A0=(r,t,e)=>t.y===0?null:{x:r.x+t.x/t.y*(e-r.y),y:e},O0=(r,t,e)=>t.x===0?null:{x:e,y:r.y+t.y/t.x*(e-r.x)},dP=(r,t,e,n)=>{if(t.x===0)return O0(e,n,r.x);if(n.x===0)return O0(r,t,e.x);if(t.y===0)return A0(e,n,r.y);if(n.y===0)return A0(r,t,e.y);const i=hl(t,n);if(i==0)return null;const s={x:e.x-r.x,y:e.y-r.y},o=hl(s,t)/i,a=hl(s,n)/i,u=r.x+a*t.x,h=e.x+o*n.x,l=r.y+a*t.y,c=e.y+o*n.y,f=(u+h)/2,p=(l+c)/2;return{x:f,y:p}};class _n{static compare(t,e){const n=_n.comparePoints(t.point,e.point);return n!==0?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:Ts.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let n=0,i=e.length;n<i;n++){const s=e[n];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(n.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,n=i=>{const s=i.otherSE;e.set(i,{sine:cP(this.point,t.point,s.point),cosine:fP(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||n(i),e.has(s)||n(s);const{sine:o,cosine:a}=e.get(i),{sine:u,cosine:h}=e.get(s);return o>=0&&u>=0?a<h?1:a>h?-1:0:o<0&&u<0?a<h?-1:a>h?1:0:u<o?-1:u>o?1:0}}}let gP=0;class Ts{static compare(t,e){const n=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(s<i)return-1;const a=t.leftSE.point.y,u=e.leftSE.point.y,h=t.rightSE.point.y,l=e.rightSE.point.y;if(n<i){if(u<a&&u<h)return 1;if(u>a&&u>h)return-1;const c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;const f=e.comparePoint(t.rightSE.point);return f!==0?f:-1}if(n>i){if(a<u&&a<l)return-1;if(a>u&&a>l)return 1;const c=e.comparePoint(t.leftSE.point);if(c!==0)return c;const f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const c=e.comparePoint(t.rightSE.point);if(c!==0)return c}if(s>o){const c=t.comparePoint(e.rightSE.point);if(c<0)return 1;if(c>0)return-1}if(s!==o){const c=h-a,f=s-n,p=l-u,v=o-i;if(c>f&&p<v)return 1;if(c<f&&p>v)return-1}return s>o?1:s<o||h<l?-1:h>l?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,i){this.id=++gP,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=i}static fromRing(t,e,n){let i,s,o;const a=_n.comparePoints(t,e);if(a<0)i=t,s=e,o=1;else if(a>0)i=e,s=t,o=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const u=new _n(i,!0),h=new _n(s,!1);return new Ts(u,h,[n],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,o=e.x+s*i.x;if(t.x===o)return 0;const a=(t.x-e.x)/i.x,u=e.y+a*i.y;return t.y===u?0:t.y<u?-1:1}getIntersection(t){const e=this.bbox(),n=t.bbox(),i=af(e,n);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,u=t.rightSE.point,h=Yu(e,a)&&this.comparePoint(a)===0,l=Yu(n,s)&&t.comparePoint(s)===0,c=Yu(e,u)&&this.comparePoint(u)===0,f=Yu(n,o)&&t.comparePoint(o)===0;if(l&&h)return f&&!c?o:!f&&c?u:null;if(l)return c&&s.x===u.x&&s.y===u.y?null:s;if(h)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&c)return null;if(f)return o;if(c)return u;const p=dP(s,this.vector(),a,t.vector());return p===null||!Yu(i,p)?null:Ju.round(p.x,p.y)}split(t){const e=[],n=t.events!==void 0,i=new _n(t,!0),s=new _n(t,!1),o=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const a=new Ts(i,o,this.rings.slice(),this.windings.slice());return _n.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),_n.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}consume(t){let e=this,n=t;for(;e.consumedBy;)e=e.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const i=Ts.compare(e,n);if(i!==0){if(i>0){const s=e;e=n,n=s}if(e.prev===n){const s=e;e=n,n=s}for(let s=0,o=n.rings.length;s<o;s++){const a=n.rings[s],u=n.windings[s],h=e.rings.indexOf(a);h===-1?(e.rings.push(a),e.windings.push(u)):e.windings[h]+=u}n.rings=null,n.windings=null,n.consumedBy=e,n.leftSE.consumedBy=e.leftSE,n.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,u=this.rings.length;a<u;a++){const h=this.rings[a],l=this.windings[a],c=e.indexOf(h);c===-1?(e.push(h),n.push(l)):n[c]+=l}const s=[],o=[];for(let a=0,u=e.length;a<u;a++){if(n[a]===0)continue;const h=e[a],l=h.poly;if(o.indexOf(l)===-1)if(h.isExterior)s.push(l);else{o.indexOf(l)===-1&&o.push(l);const c=s.indexOf(h.poly);c!==-1&&s.splice(c,1)}}for(let a=0,u=s.length;a<u;a++){const h=s[a].multiPoly;i.indexOf(h)===-1&&i.push(h)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(ti.type){case"union":{const n=t.length===0,i=e.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;t.length<e.length?(n=t.length,i=e.length):(n=e.length,i=t.length),this._isInResult=i===ti.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2===1;break}case"difference":{const n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(t)!==n(e);break}default:throw new Error(`Unrecognized operation type found ${ti.type}`)}return this._isInResult}}class D0{constructor(t,e,n){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Ju.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=t.length;o<a;o++){if(typeof t[o][0]!="number"||typeof t[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=Ju.round(t[o][0],t[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(Ts.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(Ts.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class pP{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new D0(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,i=t.length;n<i;n++){const s=new D0(t[n],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class L0{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let n=0,i=t.length;n<i;n++){const s=new pP(t[n],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class cl{static factory(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,u=s.rightSE;const h=[a],l=a.point,c=[];for(;o=a,a=u,h.push(a),a.point!==l;)for(;;){const f=a.getAvailableLinkedEvents();if(f.length===0){const w=h[0].point,E=h[h.length-1].point;throw new Error(`Unable to complete output ring starting at [${w.x}, ${w.y}]. Last matching segment found ends at [${E.x}, ${E.y}].`)}if(f.length===1){u=f[0].otherSE;break}let p=null;for(let w=0,E=c.length;w<E;w++)if(c[w].point===a.point){p=w;break}if(p!==null){const w=c.splice(p)[0],E=h.splice(w.index);E.unshift(E[0].otherSE),e.push(new cl(E.reverse()));continue}c.push({index:h.length,point:a.point});const v=a.getLeftmostComparator(o);u=f.sort(v)[0].otherSE;break}e.push(new cl(h))}return e}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let h=1,l=this.events.length-1;h<l;h++){const c=this.events[h].point,f=this.events[h+1].point;T0(c,t,f)!==0&&(e.push(c),t=c)}if(e.length===1)return null;const n=e[0],i=e[1];T0(n,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,u=[];for(let h=o;h!=a;h+=s)u.push([e[h].x,e[h].y]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];_n.compare(t,o)>0&&(t=o)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}}class R0{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class vP{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.poly)if(s.isExteriorRing())e.push(new R0(s));else{const o=s.enclosingRing();o.poly||e.push(new R0(o)),o.poly.addInterior(s)}}return e}}class mP{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ts.compare;this.queue=t,this.tree=new ef(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(t.isLeft){let h=null;if(a){const c=a.getIntersection(e);if(c!==null&&(e.isAnEndpoint(c)||(h=c),!a.isAnEndpoint(c))){const f=this._splitSafely(a,c);for(let p=0,v=f.length;p<v;p++)n.push(f[p])}}let l=null;if(u){const c=u.getIntersection(e);if(c!==null&&(e.isAnEndpoint(c)||(l=c),!u.isAnEndpoint(c))){const f=this._splitSafely(u,c);for(let p=0,v=f.length;p<v;p++)n.push(f[p])}}if(h!==null||l!==null){let c=null;h===null?c=l:l===null?c=h:c=_n.comparePoints(h,l)<=0?h:l,this.queue.remove(e.rightSE),n.push(e.rightSE);const f=e.split(c);for(let p=0,v=f.length;p<v;p++)n.push(f[p])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&u){const h=a.getIntersection(u);if(h!==null){if(!a.isAnEndpoint(h)){const l=this._splitSafely(a,h);for(let c=0,f=l.length;c<f;c++)n.push(l[c])}if(!u.isAnEndpoint(h)){const l=this._splitSafely(u,h);for(let c=0,f=l.length;c<f;c++)n.push(l[c])}}}this.tree.remove(e)}return n}_splitSafely(t,e){this.tree.remove(t);const n=t.rightSE;this.queue.remove(n);const i=t.split(e);return i.push(n),t.consumedBy===void 0&&this.tree.add(t),i}}const F0=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,yP=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class _P{run(t,e,n){ti.type=t,Ju.reset();const i=[new L0(e,!0)];for(let c=0,f=n.length;c<f;c++)i.push(new L0(n[c],!1));if(ti.numMultiPolys=i.length,ti.type==="difference"){const c=i[0];let f=1;for(;f<i.length;)af(i[f].bbox,c.bbox)!==null?f++:i.splice(f,1)}if(ti.type==="intersection")for(let c=0,f=i.length;c<f;c++){const p=i[c];for(let v=c+1,w=i.length;v<w;v++)if(af(p.bbox,i[v].bbox)===null)return[]}const s=new ef(_n.compare);for(let c=0,f=i.length;c<f;c++){const p=i[c].getSweepEvents();for(let v=0,w=p.length;v<w;v++)if(s.insert(p[v]),s.size>F0)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new mP(s);let a=s.size,u=s.pop();for(;u;){const c=u.key;if(s.size===a){const p=c.segment;throw new Error(`Unable to pop() ${c.isLeft?"left":"right"} SweepEvent [${c.point.x}, ${c.point.y}] from segment #${p.id} [${p.leftSE.point.x}, ${p.leftSE.point.y}] -> [${p.rightSE.point.x}, ${p.rightSE.point.y}] from queue.`)}if(s.size>F0)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>yP)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=o.process(c);for(let p=0,v=f.length;p<v;p++){const w=f[p];w.consumedBy===void 0&&s.insert(w)}a=s.size,u=s.pop()}Ju.reset();const h=cl.factory(o.segments);return new vP(h).getGeom()}}const ti=new _P;var uf={union:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("union",r,e)},intersection:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("intersection",r,e)},xor:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("xor",r,e)},difference:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return ti.run("difference",r,e)}};function wP(r,t){var e=en(r),n=en(t),i=r.properties||{},s=uf.difference(e.coordinates,n.coordinates);return s.length===0?null:s.length===1?dr(s[0],i):qc(s,i)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!==r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var co=function(){};co.prototype.interfaces_=function(){return[]},co.prototype.getClass=function(){return co},co.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var se=function(r){function t(e){r.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),yt=function(){},G0={MAX_VALUE:{configurable:!0}};yt.isNaN=function(t){return Number.isNaN(t)},yt.doubleToLongBits=function(t){return t},yt.longBitsToDouble=function(t){return t},yt.isInfinite=function(t){return!Number.isFinite(t)},G0.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(yt,G0);var Wr=function(){},fl=function(){},fa=function(){};function Xr(){}var D=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},fo={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};D.prototype.setOrdinate=function(t,e){switch(t){case D.X:this.x=e;break;case D.Y:this.y=e;break;case D.Z:this.z=e;break;default:throw new se("Invalid ordinate index: "+t)}},D.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return!(!co.equalsWithTolerance(this.x,e.x,n)||!co.equalsWithTolerance(this.y,e.y,n))}},D.prototype.getOrdinate=function(t){switch(t){case D.X:return this.x;case D.Y:return this.y;case D.Z:return this.z}throw new se("Invalid ordinate index: "+t)},D.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||yt.isNaN(this.z))&&yt.isNaN(t.z)},D.prototype.equals=function(t){return t instanceof D?this.equals2D(t):!1},D.prototype.equalInZ=function(t,e){return co.equalsWithTolerance(this.z,t.z,e)},D.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},D.prototype.clone=function(){},D.prototype.copy=function(){return new D(this)},D.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},D.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},D.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},D.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this.x),t=37*t+D.hashCode(this.y),t},D.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},D.prototype.interfaces_=function(){return[Wr,fl,Xr]},D.prototype.getClass=function(){return D},D.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=yt.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},fo.DimensionalComparator.get=function(){return es},fo.serialVersionUID.get=function(){return 6683108902428367e3},fo.NULL_ORDINATE.get=function(){return yt.NaN},fo.X.get=function(){return 0},fo.Y.get=function(){return 1},fo.Z.get=function(){return 2},Object.defineProperties(D,fo);var es=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new se("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};es.prototype.compare=function(t,e){var n=t,i=e,s=es.compare(n.x,i.x);if(s!==0)return s;var o=es.compare(n.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=es.compare(n.z,i.z);return a},es.prototype.interfaces_=function(){return[fa]},es.prototype.getClass=function(){return es},es.compare=function(t,e){return t<e?-1:t>e?1:yt.isNaN(t)?yt.isNaN(e)?0:-1:yt.isNaN(e)?1:0};var da=function(){};da.prototype.create=function(){},da.prototype.interfaces_=function(){return[]},da.prototype.getClass=function(){return da};var F=function(){},ju={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};F.prototype.interfaces_=function(){return[]},F.prototype.getClass=function(){return F},F.toLocationSymbol=function(t){switch(t){case F.EXTERIOR:return"e";case F.BOUNDARY:return"b";case F.INTERIOR:return"i";case F.NONE:return"-"}throw new se("Unknown location value: "+t)},ju.INTERIOR.get=function(){return 0},ju.BOUNDARY.get=function(){return 1},ju.EXTERIOR.get=function(){return 2},ju.NONE.get=function(){return-1},Object.defineProperties(F,ju);var pt=function(r,t){return r.interfaces_&&r.interfaces_().indexOf(t)>-1},Ar=function(){},k0={LOG_10:{configurable:!0}};Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar},Ar.log10=function(t){var e=Math.log(t);return yt.isInfinite(e)||yt.isNaN(e)?e:e/Ar.LOG_10},Ar.min=function(t,e,n,i){var s=t;return e<s&&(s=e),n<s&&(s=n),i<s&&(s=i),s},Ar.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},Ar.wrap=function(t,e){return t<0?e- -t%e:t%e},Ar.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],h=s;return o>h&&(h=o),a>h&&(h=a),u>h&&(h=u),h}},Ar.average=function(t,e){return(t+e)/2},k0.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Ar,k0);var wn=function(t){this.str=t};wn.prototype.append=function(t){this.str+=t},wn.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},wn.prototype.toString=function(t){return this.str};var En=function(t){this.value=t};En.prototype.intValue=function(){return this.value},En.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},En.isNaN=function(t){return Number.isNaN(t)};var Qu=function(){};Qu.isWhitespace=function(t){return t<=32&&t>=0||t===127},Qu.toUpperCase=function(t){return t.toUpperCase()};var z=function r(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];r.call(this,r.parse(n))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},rn={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};z.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},z.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=z.magnitude(n._hi),s=z.TEN.pow(i);n=n.divide(s),n.gt(z.TEN)?(n=n.divide(z.TEN),i+=1):n.lt(z.ONE)&&(n=n.multiply(z.TEN),i-=1);for(var o=i+1,a=new wn,u=z.MAX_PRINT_DIGITS-1,h=0;h<=u;h++){t&&h===o&&a.append(".");var l=Math.trunc(n._hi);if(l<0)break;var c=!1,f=0;l>9?(c=!0,f="9"):f="0"+l,a.append(f),n=n.subtract(z.valueOf(l)).multiply(z.TEN),c&&n.selfAdd(z.TEN);var p=!0,v=z.magnitude(n._hi);if(v<0&&Math.abs(v)>=u-h&&(p=!1),!p)break}return e[0]=i,a.toString()},z.prototype.sqr=function(){return this.multiply(this)},z.prototype.doubleValue=function(){return this._hi+this._lo},z.prototype.subtract=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},z.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},z.prototype.isZero=function(){return this._hi===0&&this._lo===0},z.prototype.selfSubtract=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},z.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},z.prototype.min=function(t){return this.le(t)?this:t},z.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,h=null,l=null,c=null,f=null;return h=this._hi/n,l=z.SPLIT*h,s=l-h,f=z.SPLIT*n,s=l-s,o=h-s,a=f-n,c=h*n,a=f-a,u=n-a,f=s*a-c+s*u+o*a+o*u,l=(this._hi-c-f+this._lo-h*i)/n,f=h+l,this._hi=f,this._lo=h-f+l,this}},z.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},z.prototype.divide=function(){if(arguments[0]instanceof z){var t=arguments[0],e=null,n=null,i=null,s=null,o=null,a=null,u=null,h=null;o=this._hi/t._hi,a=z.SPLIT*o,e=a-o,h=z.SPLIT*t._hi,e=a-e,n=o-e,i=h-t._hi,u=o*t._hi,i=h-i,s=t._hi-i,h=e*i-u+e*s+n*i+n*s,a=(this._hi-u-h+this._lo-o*t._lo)/t._hi,h=o+a;var l=h,c=o-h+a;return new z(l,c)}else if(typeof arguments[0]=="number"){var f=arguments[0];return yt.isNaN(f)?z.createNaN():z.copy(this).selfDivide(f,0)}},z.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},z.prototype.pow=function(t){if(t===0)return z.valueOf(1);var e=new z(this),n=z.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&n.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},z.prototype.ceil=function(){if(this.isNaN())return z.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new z(t,e)},z.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},z.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},z.prototype.setValue=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},z.prototype.max=function(t){return this.ge(t)?this:t},z.prototype.sqrt=function(){if(this.isZero())return z.valueOf(0);if(this.isNegative())return z.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=z.valueOf(e),i=this.subtract(n.sqr()),s=i._hi*(t*.5);return n.add(s)},z.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,i=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,n=s+u,i=u+(s-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var h=arguments[0],l=arguments[1],c=null,f=null,p=null,v=null,w=null,E=null,I=null,y=null;w=this._hi+h,p=this._lo+l,I=w-this._hi,y=p-this._lo,E=w-I,v=p-y,E=h-I+(this._hi-E),v=l-y+(this._lo-v),I=E+p,c=w+I,f=I+(w-c),I=v+f;var _=c+I,m=I+(c-_);return this._hi=_,this._lo=m,this}},z.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,h=null,l=null;h=z.SPLIT*this._hi,s=h-this._hi,l=z.SPLIT*n,s=h-s,o=this._hi-s,a=l-n,h=this._hi*n,a=l-a,u=n-a,l=s*a-h+s*u+o*a+o*u+(this._hi*i+this._lo*n);var c=h+l;s=h-c;var f=l+s;return this._hi=c,this._lo=f,this}},z.prototype.selfSqr=function(){return this.selfMultiply(this)},z.prototype.floor=function(){if(this.isNaN())return z.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new z(t,e)},z.prototype.negate=function(){return this.isNaN()?this:new z(-this._hi,-this._lo)},z.prototype.clone=function(){},z.prototype.multiply=function(){if(arguments[0]instanceof z){var t=arguments[0];return t.isNaN()?z.createNaN():z.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return yt.isNaN(e)?z.createNaN():z.copy(this).selfMultiply(e,0)}},z.prototype.isNaN=function(){return yt.isNaN(this._hi)},z.prototype.intValue=function(){return Math.trunc(this._hi)},z.prototype.toString=function(){var t=z.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},z.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(i<0)s="0."+z.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var o=i-n.length,a=z.stringOfChar("0",o);s=n+a+".0"}return this.isNegative()?"-"+s:s},z.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=z.SPLIT*s,t=o-s,u=z.SPLIT*this._hi,t=o-t,e=s-t,n=u-this._hi,a=s*this._hi,n=u-n,i=this._hi-n,u=t*n-a+t*i+e*n+e*i,o=(1-a-u-s*this._lo)/this._hi;var h=s+o,l=s-h+o;return new z(h,l)},z.prototype.toSciNotation=function(){if(this.isZero())return z.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=z.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var o=n.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},z.prototype.abs=function(){return this.isNaN()?z.NaN:this.isNegative()?this.negate():new z(this)},z.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},z.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},z.prototype.add=function(){if(arguments[0]instanceof z){var t=arguments[0];return z.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return z.copy(this).selfAdd(e)}},z.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof z){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},z.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},z.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},z.prototype.trunc=function(){return this.isNaN()?z.NaN:this.isPositive()?this.floor():this.ceil()},z.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},z.prototype.interfaces_=function(){return[Xr,Wr,fl]},z.prototype.getClass=function(){return z},z.sqr=function(t){return z.valueOf(t).selfMultiply(t)},z.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return z.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new z(e)}},z.sqrt=function(t){return z.valueOf(t).sqrt()},z.parse=function(t){for(var e=0,n=t.length;Qu.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var o=new z,a=0,u=0,h=0;!(e>=n);){var l=t.charAt(e);if(e++,Qu.isDigit(l)){var c=l-"0";o.selfMultiply(z.TEN),o.selfAdd(c),a++;continue}if(l==="."){u=a;continue}if(l==="e"||l==="E"){var f=t.substring(e);try{h=En.parseInt(f)}catch(I){throw I instanceof Error?new Error("Invalid exponent "+f+" in string "+t):I}finally{}break}throw new Error("Unexpected character '"+l+"' at position "+e+" in string "+t)}var p=o,v=a-u-h;if(v===0)p=o;else if(v>0){var w=z.TEN.pow(v);p=o.divide(w)}else if(v<0){var E=z.TEN.pow(-v);p=o.multiply(E)}return i?p.negate():p},z.createNaN=function(){return new z(yt.NaN,yt.NaN)},z.copy=function(t){return new z(t)},z.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},z.stringOfChar=function(t,e){for(var n=new wn,i=0;i<e;i++)n.append(t);return n.toString()},rn.PI.get=function(){return new z(3.141592653589793,12246467991473532e-32)},rn.TWO_PI.get=function(){return new z(6.283185307179586,24492935982947064e-32)},rn.PI_2.get=function(){return new z(1.5707963267948966,6123233995736766e-32)},rn.E.get=function(){return new z(2.718281828459045,14456468917292502e-32)},rn.NaN.get=function(){return new z(yt.NaN,yt.NaN)},rn.EPS.get=function(){return 123259516440783e-46},rn.SPLIT.get=function(){return 134217729},rn.MAX_PRINT_DIGITS.get=function(){return 32},rn.TEN.get=function(){return z.valueOf(10)},rn.ONE.get=function(){return z.valueOf(1)},rn.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},rn.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(z,rn);var ir=function(){},V0={DP_SAFE_EPSILON:{configurable:!0}};ir.prototype.interfaces_=function(){return[]},ir.prototype.getClass=function(){return ir},ir.orientationIndex=function(t,e,n){var i=ir.orientationIndexFilter(t,e,n);if(i<=1)return i;var s=z.valueOf(e.x).selfAdd(-t.x),o=z.valueOf(e.y).selfAdd(-t.y),a=z.valueOf(n.x).selfAdd(-e.x),u=z.valueOf(n.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},ir.signOfDet2x2=function(t,e,n,i){var s=t.multiply(i).selfSubtract(e.multiply(n));return s.signum()},ir.intersection=function(t,e,n,i){var s=z.valueOf(i.y).selfSubtract(n.y).selfMultiply(z.valueOf(e.x).selfSubtract(t.x)),o=z.valueOf(i.x).selfSubtract(n.x).selfMultiply(z.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=z.valueOf(i.x).selfSubtract(n.x).selfMultiply(z.valueOf(t.y).selfSubtract(n.y)),h=z.valueOf(i.y).selfSubtract(n.y).selfMultiply(z.valueOf(t.x).selfSubtract(n.x)),l=u.subtract(h),c=l.selfDivide(a).doubleValue(),f=z.valueOf(t.x).selfAdd(z.valueOf(e.x).selfSubtract(t.x).selfMultiply(c)).doubleValue(),p=z.valueOf(e.x).selfSubtract(t.x).selfMultiply(z.valueOf(t.y).selfSubtract(n.y)),v=z.valueOf(e.y).selfSubtract(t.y).selfMultiply(z.valueOf(t.x).selfSubtract(n.x)),w=p.subtract(v),E=w.selfDivide(a).doubleValue(),I=z.valueOf(n.y).selfAdd(z.valueOf(i.y).selfSubtract(n.y).selfMultiply(E)).doubleValue();return new D(f,I)},ir.orientationIndexFilter=function(t,e,n){var i=null,s=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),a=s-o;if(s>0){if(o<=0)return ir.signum(a);i=s+o}else if(s<0){if(o>=0)return ir.signum(a);i=-s-o}else return ir.signum(a);var u=ir.DP_SAFE_EPSILON*i;return a>=u||-a>=u?ir.signum(a):2},ir.signum=function(t){return t>0?1:t<0?-1:0},V0.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(ir,V0);var Dt=function(){},Ku={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ku.X.get=function(){return 0},Ku.Y.get=function(){return 1},Ku.Z.get=function(){return 2},Ku.M.get=function(){return 3},Dt.prototype.setOrdinate=function(t,e,n){},Dt.prototype.size=function(){},Dt.prototype.getOrdinate=function(t,e){},Dt.prototype.getCoordinate=function(){},Dt.prototype.getCoordinateCopy=function(t){},Dt.prototype.getDimension=function(){},Dt.prototype.getX=function(t){},Dt.prototype.clone=function(){},Dt.prototype.expandEnvelope=function(t){},Dt.prototype.copy=function(){},Dt.prototype.getY=function(t){},Dt.prototype.toCoordinateArray=function(){},Dt.prototype.interfaces_=function(){return[fl]},Dt.prototype.getClass=function(){return Dt},Object.defineProperties(Dt,Ku);var U0=function(){},ga=function(r){function t(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(U0),De=function(){};De.arraycopy=function(t,e,n,i,s){for(var o=0,a=e;a<e+s;a++)n[i+o]=t[a],o++},De.getProperty=function(t){return{"line.separator":`
|
|
66
|
+
`}[t]};var nn=function r(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof r&&arguments[1]instanceof r){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var u=arguments[0],h=arguments[1],l=arguments[2];this.x=u,this.y=h,this.w=l}else if(arguments.length===4){var c=arguments[0],f=arguments[1],p=arguments[2],v=arguments[3],w=c.y-f.y,E=f.x-c.x,I=c.x*f.y-f.x*c.y,y=p.y-v.y,_=v.x-p.x,m=p.x*v.y-v.x*p.y;this.x=E*m-_*I,this.y=y*I-w*m,this.w=w*_-y*E}};nn.prototype.getY=function(){var t=this.y/this.w;if(yt.isNaN(t)||yt.isInfinite(t))throw new ga;return t},nn.prototype.getX=function(){var t=this.x/this.w;if(yt.isNaN(t)||yt.isInfinite(t))throw new ga;return t},nn.prototype.getCoordinate=function(){var t=new D;return t.x=this.getX(),t.y=this.getY(),t},nn.prototype.interfaces_=function(){return[]},nn.prototype.getClass=function(){return nn},nn.intersection=function(t,e,n,i){var s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=n.y-i.y,h=i.x-n.x,l=n.x*i.y-i.x*n.y,c=o*l-h*a,f=u*a-s*l,p=s*h-u*o,v=c/p,w=f/p;if(yt.isNaN(v)||yt.isInfinite(v)||yt.isNaN(w)||yt.isInfinite(w))throw new ga;return new D(v,w)};var at=function r(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];this.init(s,o,a,u)}},z0={serialVersionUID:{configurable:!0}};at.prototype.getArea=function(){return this.getWidth()*this.getHeight()},at.prototype.equals=function(t){if(!(t instanceof at))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},at.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new at;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new at(e,i,n,s)},at.prototype.isNull=function(){return this._maxx<this._minx},at.prototype.getMaxX=function(){return this._maxx},at.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},at.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof at){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof D){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},at.prototype.getMinY=function(){return this._miny},at.prototype.getMinX=function(){return this._minx},at.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},at.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},at.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},at.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},at.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},at.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},at.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},at.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},at.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},at.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},at.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof at){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},at.prototype.centre=function(){return this.isNull()?null:new D((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},at.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},at.prototype.getMaxY=function(){return this._maxy},at.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)},at.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this._minx),t=37*t+D.hashCode(this._maxx),t=37*t+D.hashCode(this._miny),t=37*t+D.hashCode(this._maxy),t},at.prototype.interfaces_=function(){return[Wr,Xr]},at.prototype.getClass=function(){return at},at.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=Math.min(o.x,a.x),h=Math.max(o.x,a.x),l=Math.min(i.x,s.x),c=Math.max(i.x,s.x);return!(l>h||c<u||(u=Math.min(o.y,a.y),h=Math.max(o.y,a.y),l=Math.min(i.y,s.y),c=Math.max(i.y,s.y),l>h)||c<u)}},z0.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(at,z0);var Sn={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},dl=function(t){this.geometryFactory=t||new xt};dl.prototype.read=function(t){var e,n,i;t=t.replace(/[\n\r]/g," ");var s=Sn.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=Sn.emptyTypeStr.exec(t),s[2]=void 0),s&&(n=s[1].toLowerCase(),i=s[2],pa[n]&&(e=pa[n].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},dl.prototype.write=function(t){return this.extractGeometry(t)},dl.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Mi[e])return null;var n=e.toUpperCase(),i;return t.isEmpty()?i=n+" EMPTY":i=n+"("+Mi[e].apply(this,[t])+")",i};var Mi={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Mi.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+Mi.point.apply(e,[t._geometries[i]])+")");return n.join(",")},linestring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(Mi.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},linearring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(Mi.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},multilinestring:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+Mi.linestring.apply(e,[t._geometries[i]])+")");return n.join(",")},polygon:function(t){var e=this,n=[];n.push("("+Mi.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)n.push("("+Mi.linestring.apply(e,[t._holes[i]])+")");return n.join(",")},multipolygon:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+Mi.polygon.apply(e,[t._geometries[i]])+")");return n.join(",")},geometrycollection:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push(e.extractGeometry(t._geometries[i]));return n.join(",")}},pa={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(Sn.spaces);return this.geometryFactory.createPoint(new D(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var n,i=t.trim().split(","),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Sn.trimParens,"$1"),s.push(pa.point.apply(e,[n]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),n=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Sn.spaces),n.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(n)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),n=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Sn.spaces),n.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var n,i=t.trim().split(Sn.parenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Sn.trimParens,"$1"),s.push(pa.linestring.apply(e,[n]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var n,i,s,o=t.trim().split(Sn.parenComma),a,u=[],h=0,l=o.length;h<l;++h)n=o[h].replace(Sn.trimParens,"$1"),i=pa.linestring.apply(e,[n]),s=e.geometryFactory.createLinearRing(i._points),h===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=t.trim().split(Sn.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)n=i[o].replace(Sn.trimParens,"$1"),s.push(pa.polygon.apply(e,[n]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var n=t.trim().split("|"),i=[],s=0,o=n.length;s<o;++s)i.push(e.read(n[s]));return this.geometryFactory.createGeometryCollection(i)}},sn=function(t){this.parser=new dl(t)};sn.prototype.write=function(t){return this.parser.write(t)},sn.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var bi=function(r){function t(e){r.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),gl=function(r){function t(){if(r.call(this),arguments.length===0)r.call(this);else if(arguments.length===1){var e=arguments[0];r.call(this,e)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(bi),Pt=function(){};Pt.prototype.interfaces_=function(){return[]},Pt.prototype.getClass=function(){return Pt},Pt.shouldNeverReachHere=function(){if(arguments.length===0)Pt.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new gl("Should never reach here"+(t!==null?": "+t:""))}},Pt.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],Pt.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new gl:new gl(e)},Pt.equals=function(){var t,e,n;if(arguments.length===2)t=arguments[0],e=arguments[1],Pt.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new gl("Expected "+t+" but encountered "+e+(n!==null?": "+n:""))};var ue=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new D,this._intPt[1]=new D,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},go={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};ue.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},ue.prototype.getTopologySummary=function(){var t=new wn;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},ue.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},ue.prototype.getIntersectionNum=function(){return this._result},ue.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),n=this.getEdgeDistance(t,1);e>n?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},ue.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},ue.prototype.setPrecisionModel=function(t){this._precisionModel=t},ue.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;n<this._result;n++)if(!(t._intPt[n].equals2D(t._inputLines[e][0])||t._intPt[n].equals2D(t._inputLines[e][1])))return!0;return!1}},ue.prototype.getIntersection=function(t){return this._intPt[t]},ue.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},ue.prototype.hasIntersection=function(){return this._result!==ue.NO_INTERSECTION},ue.prototype.getEdgeDistance=function(t,e){var n=ue.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return n},ue.prototype.isCollinear=function(){return this._result===ue.COLLINEAR_INTERSECTION},ue.prototype.toString=function(){return sn.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+sn.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},ue.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},ue.prototype.isIntersection=function(t){for(var e=this,n=0;n<this._result;n++)if(e._intPt[n].equals2D(t))return!0;return!1},ue.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},ue.prototype.interfaces_=function(){return[]},ue.prototype.getClass=function(){return ue},ue.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),s=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))i>s?o=i:o=s;else{var a=Math.abs(t.x-e.x),u=Math.abs(t.y-e.y);i>s?o=a:o=u,o===0&&!t.equals(e)&&(o=Math.max(a,u))}return Pt.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},ue.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s);return Pt.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},go.DONT_INTERSECT.get=function(){return 0},go.DO_INTERSECT.get=function(){return 1},go.COLLINEAR.get=function(){return 2},go.NO_INTERSECTION.get=function(){return 0},go.POINT_INTERSECTION.get=function(){return 1},go.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(ue,go);var As=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(n){var i=new at(this._inputLines[0][0],this._inputLines[0][1]),s=new at(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(n)&&s.contains(n)},t.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,at.intersects(i,s,n)&&K.orientationIndex(i,s,n)===0&&K.orientationIndex(s,i,n)===0)return this._isProper=!0,(n.equals(i)||n.equals(s))&&(this._isProper=!1),this._result=r.POINT_INTERSECTION,null;this._result=r.NO_INTERSECTION}else return r.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(n,i,s,o,a){a.x=this.smallestInAbsValue(n.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(n.y,i.y,s.y,o.y),n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.safeHCoordinateIntersection=function(n,i,s,o){var a=null;try{a=nn.intersection(n,i,s,o)}catch(u){if(u instanceof ga)a=t.nearestEndpoint(n,i,s,o);else throw u}finally{}return a},t.prototype.intersection=function(n,i,s,o){var a=this.intersectionWithNormalization(n,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new D(t.nearestEndpoint(n,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(n,i,s,o){var a=n,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},t.prototype.checkDD=function(n,i,s,o,a){var u=ir.intersection(n,i,s,o),h=this.isInSegmentEnvelopes(u);De.out.println("DD in env = "+h+" --------------------- "+u),a.distance(u)>1e-4&&De.out.println("Distance = "+a.distance(u))},t.prototype.intersectionWithNormalization=function(n,i,s,o){var a=new D(n),u=new D(i),h=new D(s),l=new D(o),c=new D;this.normalizeToEnvCentre(a,u,h,l,c);var f=this.safeHCoordinateIntersection(a,u,h,l);return f.x+=c.x,f.y+=c.y,f},t.prototype.computeCollinearIntersection=function(n,i,s,o){var a=at.intersects(n,i,s),u=at.intersects(n,i,o),h=at.intersects(s,o,n),l=at.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,r.COLLINEAR_INTERSECTION):h&&l?(this._intPt[0]=n,this._intPt[1]=i,r.COLLINEAR_INTERSECTION):a&&h?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!u&&!l?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!h?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):u&&h?(this._intPt[0]=o,this._intPt[1]=n,o.equals(n)&&!a&&!l?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!h?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):r.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(n,i,s,o,a){var u=n.x<i.x?n.x:i.x,h=n.y<i.y?n.y:i.y,l=n.x>i.x?n.x:i.x,c=n.y>i.y?n.y:i.y,f=s.x<o.x?s.x:o.x,p=s.y<o.y?s.y:o.y,v=s.x>o.x?s.x:o.x,w=s.y>o.y?s.y:o.y,E=u>f?u:f,I=l<v?l:v,y=h>p?h:p,_=c<w?c:w,m=(E+I)/2,S=(y+_)/2;a.x=m,a.y=S,n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.computeIntersect=function(n,i,s,o){if(this._isProper=!1,!at.intersects(n,i,s,o))return r.NO_INTERSECTION;var a=K.orientationIndex(n,i,s),u=K.orientationIndex(n,i,o);if(a>0&&u>0||a<0&&u<0)return r.NO_INTERSECTION;var h=K.orientationIndex(s,o,n),l=K.orientationIndex(s,o,i);if(h>0&&l>0||h<0&&l<0)return r.NO_INTERSECTION;var c=a===0&&u===0&&h===0&&l===0;return c?this.computeCollinearIntersection(n,i,s,o):(a===0||u===0||h===0||l===0?(this._isProper=!1,n.equals2D(s)||n.equals2D(o)?this._intPt[0]=n:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new D(s):u===0?this._intPt[0]=new D(o):h===0?this._intPt[0]=new D(n):l===0&&(this._intPt[0]=new D(i))):(this._isProper=!0,this._intPt[0]=this.intersection(n,i,s,o)),r.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(n,i,s,o){var a=n,u=K.distancePointLine(n,s,o),h=K.distancePointLine(i,s,o);return h<u&&(u=h,a=i),h=K.distancePointLine(s,n,i),h<u&&(u=h,a=s),h=K.distancePointLine(o,n,i),h<u&&(u=h,a=o),a},t}(ue),po=function(){};po.prototype.interfaces_=function(){return[]},po.prototype.getClass=function(){return po},po.orientationIndex=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,o=n.x-e.x,a=n.y-e.y;return po.signOfDet2x2(i,s,o,a)},po.signOfDet2x2=function(t,e,n,i){var s=null,o=null,a=null;if(s=1,t===0||i===0)return e===0||n===0?0:e>0?n>0?-s:s:n>0?s:-s;if(e===0||n===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(s=-s,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(s=-s,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(s=-s,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0)if(n>0){if(!(t<=n))return s}else return s;else{if(n>0)return-s;if(t>=n)s=-s,t=-t,n=-n;else return-s}for(;;){if(a=Math.floor(n/t),n=n-a*t,i=i-a*e,i<0)return-s;if(i>e)return s;if(t>n+n){if(e<i+i)return s}else{if(e>i+i)return-s;n=t-n,i=e-i,s=-s}if(i===0)return n===0?0:-s;if(n===0||(a=Math.floor(t/n),t=t-a*n,e=e-a*i,e<0))return s;if(e>i)return-s;if(n>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=n-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var Cn=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Cn.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,u=e.y-this._p.y,h=po.signOfDet2x2(s,o,a,u);if(h===0)return this._isPointOnSegment=!0,null;u<o&&(h=-h),h>0&&this._crossingCount++}},Cn.prototype.isPointInPolygon=function(){return this.getLocation()!==F.EXTERIOR},Cn.prototype.getLocation=function(){return this._isPointOnSegment?F.BOUNDARY:this._crossingCount%2===1?F.INTERIOR:F.EXTERIOR},Cn.prototype.isOnSegment=function(){return this._isPointOnSegment},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.locatePointInRing=function(){if(arguments[0]instanceof D&&pt(arguments[1],Dt)){for(var t=arguments[0],e=arguments[1],n=new Cn(t),i=new D,s=new D,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,s),n.countSegment(i,s),n.isOnSegment())return n.getLocation();return n.getLocation()}else if(arguments[0]instanceof D&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],h=new Cn(a),l=1;l<u.length;l++){var c=u[l],f=u[l-1];if(h.countSegment(c,f),h.isOnSegment())return h.getLocation()}return h.getLocation()}};var K=function(){},vo={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};K.prototype.interfaces_=function(){return[]},K.prototype.getClass=function(){return K},K.orientationIndex=function(t,e,n){return ir.orientationIndex(t,e,n)},K.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-n,o=t[i+1].y,a=t[i-1].y;e+=s*(a-o)}return e/2}else if(pt(arguments[0],Dt)){var u=arguments[0],h=u.size();if(h<3)return 0;var l=new D,c=new D,f=new D;u.getCoordinate(0,c),u.getCoordinate(1,f);var p=c.x;f.x-=p;for(var v=0,w=1;w<h-1;w++)l.y=c.y,c.x=f.x,c.y=f.y,u.getCoordinate(w+1,f),f.x-=p,v+=c.x*(l.y-f.y);return v/2}},K.distanceLineLine=function(t,e,n,i){if(t.equals(e))return K.distancePointLine(t,n,i);if(n.equals(i))return K.distancePointLine(i,t,e);var s=!1;if(!at.intersects(t,e,n,i))s=!0;else{var o=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(o===0)s=!0;else{var a=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),u=(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y),h=u/o,l=a/o;(l<0||l>1||h<0||h>1)&&(s=!0)}}return s?Ar.min(K.distancePointLine(t,n,i),K.distancePointLine(e,n,i),K.distancePointLine(n,t,e),K.distancePointLine(i,t,e)):0},K.isPointInRing=function(t,e){return K.locatePointInRing(t,e)!==F.EXTERIOR},K.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new D;t.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<e;a++){t.getCoordinate(a,i);var u=i.x,h=i.y,l=u-s,c=h-o;n+=Math.sqrt(l*l+c*c),s=u,o=h}return n},K.isCCW=function(t){var e=t.length-1;if(e<3)throw new se("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],i=0,s=1;s<=e;s++){var o=t[s];o.y>n.y&&(n=o,i=s)}var a=i;do a=a-1,a<0&&(a=e);while(t[a].equals2D(n)&&a!==i);var u=i;do u=(u+1)%e;while(t[u].equals2D(n)&&u!==i);var h=t[a],l=t[u];if(h.equals2D(n)||l.equals2D(n)||h.equals2D(l))return!1;var c=K.computeOrientation(h,n,l),f=!1;return c===0?f=h.x>l.x:f=c>0,f},K.locatePointInRing=function(t,e){return Cn.locatePointInRing(t,e)},K.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),s=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},K.computeOrientation=function(t,e,n){return K.orientationIndex(t,e,n)},K.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new se("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var s=K.distancePointLine(t,e[i],e[i+1]);s<n&&(n=s)}return n}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var h=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),l=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/h;if(l<=0)return o.distance(a);if(l>=1)return o.distance(u);var c=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/h;return Math.abs(c)*Math.sqrt(h)}},K.isOnLine=function(t,e){for(var n=new As,i=1;i<e.length;i++){var s=e[i-1],o=e[i];if(n.computeIntersection(t,s,o),n.hasIntersection())return!0}return!1},vo.CLOCKWISE.get=function(){return-1},vo.RIGHT.get=function(){return K.CLOCKWISE},vo.COUNTERCLOCKWISE.get=function(){return 1},vo.LEFT.get=function(){return K.COUNTERCLOCKWISE},vo.COLLINEAR.get=function(){return 0},vo.STRAIGHT.get=function(){return K.COLLINEAR},Object.defineProperties(K,vo);var Ni=function(){};Ni.prototype.filter=function(t){},Ni.prototype.interfaces_=function(){return[]},Ni.prototype.getClass=function(){return Ni};var gt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ei={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};gt.prototype.isGeometryCollection=function(){return this.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION},gt.prototype.getFactory=function(){return this._factory},gt.prototype.getGeometryN=function(t){return this},gt.prototype.getArea=function(){return 0},gt.prototype.isRectangle=function(){return!1},gt.prototype.equals=function(){if(arguments[0]instanceof gt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof gt))return!1;var n=e;return this.equalsExact(n)}},gt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},gt.prototype.geometryChanged=function(){this.apply(gt.geometryChangedFilter)},gt.prototype.geometryChangedAction=function(){this._envelope=null},gt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},gt.prototype.getLength=function(){return 0},gt.prototype.getNumGeometries=function(){return 1},gt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},gt.prototype.getUserData=function(){return this._userData},gt.prototype.getSRID=function(){return this._SRID},gt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},gt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION)throw new se("This method does not support GeometryCollection arguments")},gt.prototype.equal=function(t,e,n){return n===0?t.equals(e):t.distance(e)<=n},gt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},gt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},gt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new at(this._envelope)},gt.prototype.setSRID=function(t){this._SRID=t},gt.prototype.setUserData=function(t){this._userData=t},gt.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var s=n.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return n.hasNext()?1:i.hasNext()?-1:0},gt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},gt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===gt.SORTINDEX_MULTIPOINT||this.getSortIndex()===gt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===gt.SORTINDEX_MULTIPOLYGON},gt.prototype.interfaces_=function(){return[fl,Wr,Xr]},gt.prototype.getClass=function(){return gt},gt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},gt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},ei.serialVersionUID.get=function(){return 8763622679187377e3},ei.SORTINDEX_POINT.get=function(){return 0},ei.SORTINDEX_MULTIPOINT.get=function(){return 1},ei.SORTINDEX_LINESTRING.get=function(){return 2},ei.SORTINDEX_LINEARRING.get=function(){return 3},ei.SORTINDEX_MULTILINESTRING.get=function(){return 4},ei.SORTINDEX_POLYGON.get=function(){return 5},ei.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ei.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ei.geometryChangedFilter.get=function(){return hf},Object.defineProperties(gt,ei);var hf=function(){};hf.interfaces_=function(){return[Ni]},hf.filter=function(t){t.geometryChangedAction()};var ri=function(){};ri.prototype.filter=function(t){},ri.prototype.interfaces_=function(){return[]},ri.prototype.getClass=function(){return ri};var Hr=function(){},xi={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};Hr.prototype.isInBoundary=function(t){},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},xi.Mod2BoundaryNodeRule.get=function(){return va},xi.EndPointBoundaryNodeRule.get=function(){return ma},xi.MultiValentEndPointBoundaryNodeRule.get=function(){return ya},xi.MonoValentEndPointBoundaryNodeRule.get=function(){return _a},xi.MOD2_BOUNDARY_RULE.get=function(){return new va},xi.ENDPOINT_BOUNDARY_RULE.get=function(){return new ma},xi.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ya},xi.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new _a},xi.OGC_SFS_BOUNDARY_RULE.get=function(){return Hr.MOD2_BOUNDARY_RULE},Object.defineProperties(Hr,xi);var va=function(){};va.prototype.isInBoundary=function(t){return t%2===1},va.prototype.interfaces_=function(){return[Hr]},va.prototype.getClass=function(){return va};var ma=function(){};ma.prototype.isInBoundary=function(t){return t>0},ma.prototype.interfaces_=function(){return[Hr]},ma.prototype.getClass=function(){return ma};var ya=function(){};ya.prototype.isInBoundary=function(t){return t>1},ya.prototype.interfaces_=function(){return[Hr]},ya.prototype.getClass=function(){return ya};var _a=function(){};_a.prototype.isInBoundary=function(t){return t===1},_a.prototype.interfaces_=function(){return[Hr]},_a.prototype.getClass=function(){return _a};var Ce=function(){};Ce.prototype.add=function(){},Ce.prototype.addAll=function(){},Ce.prototype.isEmpty=function(){},Ce.prototype.iterator=function(){},Ce.prototype.size=function(){},Ce.prototype.toArray=function(){},Ce.prototype.remove=function(){};function lf(r){this.message=r||""}lf.prototype=new Error,lf.prototype.name="IndexOutOfBoundsException";var wa=function(){};wa.prototype.hasNext=function(){},wa.prototype.next=function(){},wa.prototype.remove=function(){};var on=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Ce);function Ea(r){this.message=r||""}Ea.prototype=new Error,Ea.prototype.name="NoSuchElementException";var j=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Ce&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[r,Ce]},t.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(n,i){var s=this.array_[n];return this.array_[n]=i,s},t.prototype.iterator=function(){return new EP(this)},t.prototype.get=function(n){if(n<0||n>=this.size())throw new lf;return this.array_[n]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var n=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(n.array_[s]);return i},t.prototype.remove=function(n){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===n){i.array_.splice(o,1),s=!0;break}return s},t}(on),EP=function(r){function t(e){r.call(this),this.arrayList_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new Ea;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(n){return this.arrayList_.set(this.position_-1,n)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(wa),$u=function(r){function t(){if(r.call(this),arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.ensureCapacity(n.length),this.add(n,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,u=s.iterator();u.hasNext();)i.add(u.next(),o),a=!0;return a}else return r.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=r.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];r.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof D&&typeof arguments[1]=="boolean"){var u=arguments[0],h=arguments[1];if(!h&&this.size()>=1){var l=this.get(this.size()-1);if(l.equals2D(u))return null}r.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var c=arguments[0],f=arguments[1];return this.add(c,f),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var p=arguments[0],v=arguments[1],w=arguments[2];if(w)for(var E=0;E<p.length;E++)i.add(p[E],v);else for(var I=p.length-1;I>=0;I--)i.add(p[I],v);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof D){var y=arguments[0],_=arguments[1],m=arguments[2];if(!m){var S=this.size();if(S>0){if(y>0){var C=this.get(y-1);if(C.equals2D(_))return null}if(y<S){var P=this.get(y);if(P.equals2D(_))return null}}}r.prototype.add.call(this,y,_)}}else if(arguments.length===4){var b=arguments[0],x=arguments[1],A=arguments[2],N=arguments[3],T=1;A>N&&(T=-1);for(var R=A;R!==N;R+=T)i.add(b[R],x);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new D(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(j),Nt=function(){},pl={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};pl.ForwardComparator.get=function(){return Zu},pl.BidirectionalComparator.get=function(){return Sa},pl.coordArrayType.get=function(){return new Array(0).fill(null)},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Nt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Nt.indexOf(i,e)<0)return i}return null},Nt.scroll=function(t,e){var n=Nt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);De.arraycopy(t,n,i,0,t.length-n),De.arraycopy(t,0,i,t.length-n,n),De.arraycopy(i,0,t,0,t.length)},Nt.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},Nt.intersection=function(t,e){for(var n=new $u,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Nt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Nt.removeRepeatedPoints=function(t){if(!Nt.hasRepeatedPoints(t))return t;var e=new $u(t,!1);return e.toCoordinateArray()},Nt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},Nt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)t[n]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,o=0;o<t.length;o++)t[o]!==null&&(i[s++]=t[o]);return i},Nt.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new D(t[n]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],h=0;h<u;h++)o[a+h]=new D(i[s+h])},Nt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],s=e[t.length-n-1];if(i.compareTo(s)!==0)return!1}return!0},Nt.envelope=function(t){for(var e=new at,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Nt.toCoordinateArray=function(t){return t.toArray(Nt.coordArrayType)},Nt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Nt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Nt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(i!==0)return i}return 1},Nt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(i!==0)return i;n++}return n<e.length?-1:n<t.length?1:0},Nt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(e===null||e.compareTo(t[n])>0)&&(e=t[n]);return e},Nt.extract=function(t,e,n){e=Ar.clamp(e,0,t.length),n=Ar.clamp(n,-1,t.length);var i=n-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=e;a<=n;a++)s[o++]=t[a];return s},Object.defineProperties(Nt,pl);var Zu=function(){};Zu.prototype.compare=function(t,e){var n=t,i=e;return Nt.compare(n,i)},Zu.prototype.interfaces_=function(){return[fa]},Zu.prototype.getClass=function(){return Zu};var Sa=function(){};Sa.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;var s=Nt.compare(n,i),o=Nt.isEqualReversed(n,i);return o?0:s},Sa.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;for(var s=Nt.increasingDirection(n),o=Nt.increasingDirection(i),a=s>0?0:n.length-1,u=o>0?0:n.length-1,h=0;h<n.length;h++){var l=n[a].compareTo(i[u]);if(l!==0)return l;a+=s,u+=o}return 0},Sa.prototype.interfaces_=function(){return[fa]},Sa.prototype.getClass=function(){return Sa};var mo=function(){};mo.prototype.get=function(){},mo.prototype.put=function(){},mo.prototype.size=function(){},mo.prototype.values=function(){},mo.prototype.entrySet=function(){};var SP=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(mo);function th(r){this.message=r||""}th.prototype=new Error,th.prototype.name="OperationNotSupported";function vl(){}vl.prototype=new Ce,vl.prototype.contains=function(){};var cf=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Ce&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.contains=function(n){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===n)return!0}return!1},t.prototype.add=function(n){return this.contains(n)?!1:(this.array_.push(n),!0)},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(n){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var n=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(n.array_[s]);return i},t.prototype.iterator=function(){return new CP(this)},t}(vl),CP=function(r){function t(e){r.call(this),this.hashSet_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new Ea;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new th},t}(wa),Ti=0,Os=1;function q0(r){return r===null?Ti:r.color}function $t(r){return r===null?null:r.parent}function Ai(r,t){r!==null&&(r.color=t)}function ff(r){return r===null?null:r.left}function W0(r){return r===null?null:r.right}function qe(){this.root_=null,this.size_=0}qe.prototype=new SP,qe.prototype.get=function(r){for(var t=this.root_;t!==null;){var e=r.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},qe.prototype.put=function(r,t){if(this.root_===null)return this.root_={key:r,value:t,left:null,right:null,parent:null,color:Ti,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,n,i;do if(n=e,i=r.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var o={key:r,left:null,right:null,value:t,parent:n,color:Ti,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=o:n.right=o,this.fixAfterInsertion(o),this.size_++,null},qe.prototype.fixAfterInsertion=function(r){var t=this;for(r.color=Os;r!=null&&r!==this.root_&&r.parent.color===Os;)if($t(r)===ff($t($t(r)))){var e=W0($t($t(r)));q0(e)===Os?(Ai($t(r),Ti),Ai(e,Ti),Ai($t($t(r)),Os),r=$t($t(r))):(r===W0($t(r))&&(r=$t(r),t.rotateLeft(r)),Ai($t(r),Ti),Ai($t($t(r)),Os),t.rotateRight($t($t(r))))}else{var n=ff($t($t(r)));q0(n)===Os?(Ai($t(r),Ti),Ai(n,Ti),Ai($t($t(r)),Os),r=$t($t(r))):(r===ff($t(r))&&(r=$t(r),t.rotateRight(r)),Ai($t(r),Ti),Ai($t($t(r)),Os),t.rotateLeft($t($t(r))))}this.root_.color=Ti},qe.prototype.values=function(){var r=new j,t=this.getFirstEntry();if(t!==null)for(r.add(t.value);(t=qe.successor(t))!==null;)r.add(t.value);return r},qe.prototype.entrySet=function(){var r=new cf,t=this.getFirstEntry();if(t!==null)for(r.add(t);(t=qe.successor(t))!==null;)r.add(t);return r},qe.prototype.rotateLeft=function(r){if(r!=null){var t=r.right;r.right=t.left,t.left!=null&&(t.left.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.left===r?r.parent.left=t:r.parent.right=t,t.left=r,r.parent=t}},qe.prototype.rotateRight=function(r){if(r!=null){var t=r.left;r.left=t.right,t.right!=null&&(t.right.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.right===r?r.parent.right=t:r.parent.left=t,t.right=r,r.parent=t}},qe.prototype.getFirstEntry=function(){var r=this.root_;if(r!=null)for(;r.left!=null;)r=r.left;return r},qe.successor=function(r){if(r===null)return null;if(r.right!==null){for(var t=r.right;t.left!==null;)t=t.left;return t}else{for(var e=r.parent,n=r;e!==null&&n===e.right;)n=e,e=e.parent;return e}},qe.prototype.size=function(){return this.size_};var eh=function(){};eh.prototype.interfaces_=function(){return[]},eh.prototype.getClass=function(){return eh};function X0(){}X0.prototype=new vl;function Pn(){this.array_=[],arguments[0]instanceof Ce&&this.addAll(arguments[0])}Pn.prototype=new X0,Pn.prototype.contains=function(r){for(var t=this,e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===0)return!0}return!1},Pn.prototype.add=function(r){var t=this;if(this.contains(r))return!1;for(var e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===1)return t.array_.splice(e,0,r),!0}return this.array_.push(r),!0},Pn.prototype.addAll=function(r){for(var t=this,e=r.iterator();e.hasNext();)t.add(e.next());return!0},Pn.prototype.remove=function(r){throw new th},Pn.prototype.size=function(){return this.array_.length},Pn.prototype.isEmpty=function(){return this.array_.length===0},Pn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t},Pn.prototype.iterator=function(){return new ml(this)};var ml=function(r){this.treeSet_=r,this.position_=0};ml.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new Ea;return this.treeSet_.array_[this.position_++]},ml.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},ml.prototype.remove=function(){throw new th};var Ds=function(){};Ds.sort=function(){var t=arguments[0],e,n,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},t.sort(s);else if(arguments.length===3){n=t.slice(arguments[1],arguments[2]),n.sort();var o=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(n=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,u){return i.compare(a,u)},n.sort(s),o=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},Ds.asList=function(t){for(var e=new j,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var Vt=function(){},an={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};an.P.get=function(){return 0},an.L.get=function(){return 1},an.A.get=function(){return 2},an.FALSE.get=function(){return-1},an.TRUE.get=function(){return-2},an.DONTCARE.get=function(){return-3},an.SYM_FALSE.get=function(){return"F"},an.SYM_TRUE.get=function(){return"T"},an.SYM_DONTCARE.get=function(){return"*"},an.SYM_P.get=function(){return"0"},an.SYM_L.get=function(){return"1"},an.SYM_A.get=function(){return"2"},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.toDimensionSymbol=function(t){switch(t){case Vt.FALSE:return Vt.SYM_FALSE;case Vt.TRUE:return Vt.SYM_TRUE;case Vt.DONTCARE:return Vt.SYM_DONTCARE;case Vt.P:return Vt.SYM_P;case Vt.L:return Vt.SYM_L;case Vt.A:return Vt.SYM_A}throw new se("Unknown dimension value: "+t)},Vt.toDimensionValue=function(t){switch(Qu.toUpperCase(t)){case Vt.SYM_FALSE:return Vt.FALSE;case Vt.SYM_TRUE:return Vt.TRUE;case Vt.SYM_DONTCARE:return Vt.DONTCARE;case Vt.SYM_P:return Vt.P;case Vt.SYM_L:return Vt.L;case Vt.SYM_A:return Vt.A}throw new se("Unknown dimension symbol: "+t)},Object.defineProperties(Vt,an);var In=function(){};In.prototype.filter=function(t){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var un=function(){};un.prototype.filter=function(t,e){},un.prototype.isDone=function(){},un.prototype.isGeometryChanged=function(){},un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un};var Ye=function(r){function t(n,i){if(r.call(this,i),this._geometries=n||[],r.hasNullElements(this._geometries))throw new se("geometries must not contain null elements")}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new at,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return r.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var u=i._geometries[a].getCoordinates(),h=0;h<u.length;h++)o++,s[o]=u[h];return s},t.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();Ds.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=Vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=Vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new Pn(Ds.asList(this._geometries)),a=new Pn(Ds.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],h=arguments[1],l=u,c=this.getNumGeometries(),f=l.getNumGeometries(),p=0;p<c&&p<f;){var v=i.getGeometryN(p),w=l.getGeometryN(p),E=v.compareToSameClass(w,h);if(E!==0)return E;p++}return p<c?1:p<f?-1:0}},t.prototype.apply=function(){var i=this;if(pt(arguments[0],ri))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(pt(arguments[0],un)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],In)){var h=arguments[0];h.filter(this);for(var l=0;l<this._geometries.length;l++)i._geometries[l].apply(h)}else if(pt(arguments[0],Ni)){var c=arguments[0];c.filter(this);for(var f=0;f<this._geometries.length;f++)i._geometries[f].apply(c)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),Pt.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(gt),Ls=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new Br(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[eh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(Ye),Br=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=Hr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};Br.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Br.prototype.getBoundary=function(){return this._geom instanceof le?this.boundaryLineString(this._geom):this._geom instanceof Ls?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Br.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Br.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Br.prototype.computeBoundaryCoordinates=function(t){var e=this,n=new j;this._endpointMap=new qe;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),u=a.getValue(),h=u.count;e._bnRule.isInBoundary(h)&&n.add(a.getKey())}return Nt.toCoordinateArray(n)},Br.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new yl,this._endpointMap.put(t,e)),e.count++},Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br},Br.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new Br(t);return e.getBoundary()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Br(n,i);return s.getBoundary()}};var yl=function(){this.count=null};yl.prototype.interfaces_=function(){return[]},yl.prototype.getClass=function(){return yl};function PP(){}function IP(){}var MP=function(){};function bP(){}function NP(){}function xP(){}var Yr=function(){},df={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Yr.prototype.interfaces_=function(){return[]},Yr.prototype.getClass=function(){return Yr},Yr.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},Yr.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new bP,n=new PP;return t.printStackTrace(n),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new IP(Yr.getStackTrace(i));for(var a=new xP,u=0;u<s;u++)try{o+=a.readLine()+Yr.NEWLINE}catch(h){if(h instanceof NP)Pt.shouldNeverReachHere();else throw h}finally{}return o}},Yr.split=function(t,e){for(var n=e.length,i=new j,s=""+t,o=s.indexOf(e);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+n),o=s.indexOf(e)}s.length>0&&i.add(s);for(var u=new Array(i.size()).fill(null),h=0;h<u.length;h++)u[h]=i.get(h);return u},Yr.toString=function(){if(arguments.length===1){var t=arguments[0];return Yr.SIMPLE_ORDINATE_FORMAT.format(t)}},Yr.spaces=function(t){return Yr.chars(" ",t)},df.NEWLINE.get=function(){return De.getProperty("line.separator")},df.SIMPLE_ORDINATE_FORMAT.get=function(){return new MP},Object.defineProperties(Yr,df);var de=function(){};de.prototype.interfaces_=function(){return[]},de.prototype.getClass=function(){return de},de.copyCoord=function(t,e,n,i){for(var s=Math.min(t.getDimension(),n.getDimension()),o=0;o<s;o++)n.setOrdinate(i,o,t.getOrdinate(e,o))},de.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,Dt.X)===t.getOrdinate(e-1,Dt.X)&&t.getOrdinate(0,Dt.Y)===t.getOrdinate(e-1,Dt.Y)},de.isEqual=function(t,e){var n=t.size(),i=e.size();if(n!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),o=0;o<n;o++)for(var a=0;a<s;a++){var u=t.getOrdinate(o,a),h=e.getOrdinate(o,a);if(t.getOrdinate(o,a)!==e.getOrdinate(o,a)&&!(yt.isNaN(u)&&yt.isNaN(h)))return!1}return!0},de.extend=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();if(de.copy(e,0,i,0,s),s>0)for(var o=s;o<n;o++)de.copy(e,s-1,i,o,1);return i},de.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)de.swap(t,i,e-i)},de.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,s)}},de.copy=function(t,e,n,i,s){for(var o=0;o<s;o++)de.copyCoord(t,e+o,n,i+o)},de.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var n=t.getDimension(),i=new wn;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var o=0;o<n;o++)o>0&&i.append(","),i.append(Yr.toString(t.getOrdinate(s,o)))}return i.append(")"),i.toString()}},de.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return de.createClosedRing(t,e,4);var i=e.getOrdinate(0,Dt.X)===e.getOrdinate(n-1,Dt.X)&&e.getOrdinate(0,Dt.Y)===e.getOrdinate(n-1,Dt.Y);return i?e:de.createClosedRing(t,e,n+1)},de.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();de.copy(e,0,i,0,s);for(var o=s;o<n;o++)de.copy(e,0,i,o,1);return i};var le=function(r){function t(n,i){r.call(this,i),this._points=null,this.init(n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new at:this._points.expandEnvelope(new at)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return r.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&de.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return K.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();de.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,u=0;a<this._points.size()&&u<o._points.size();){var h=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(h!==0)return h;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var l=arguments[0],c=arguments[1],f=l;return c.compare(this._points,f._points)}},t.prototype.apply=function(){var i=this;if(pt(arguments[0],ri))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(pt(arguments[0],un)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],In)){var h=arguments[0];h.filter(this)}else if(pt(arguments[0],Ni)){var l=arguments[0];l.filter(this)}},t.prototype.getBoundary=function(){return new Br(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new se("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[eh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(gt),rh=function(){};rh.prototype.interfaces_=function(){return[]},rh.prototype.getClass=function(){return rh};var vr=function(r){function t(n,i){r.call(this,i),this._coordinates=n||null,this.init(this._coordinates)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new at;var i=new at;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return r.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],u=o;return a.compare(this._coordinates,u._coordinates)}},t.prototype.apply=function(){if(pt(arguments[0],ri)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(pt(arguments[0],un)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],In)){var o=arguments[0];o.filter(this)}else if(pt(arguments[0],Ni)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),Pt.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[rh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(gt),rs=function(){};rs.prototype.interfaces_=function(){return[]},rs.prototype.getClass=function(){return rs};var Pe=function(r){function t(n,i,s){if(r.call(this,s),this._shell=null,this._holes=null,n===null&&(n=this.getFactory().createLinearRing()),i===null&&(i=[]),r.hasNullElements(i))throw new se("holes must not contain null elements");if(n.isEmpty()&&r.hasNonEmptyElements(i))throw new se("shell is empty but holes are not");this._shell=n,this._holes=i}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return r.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var h=0;h<this._holes.length;h++)for(var l=i._holes[h].getCoordinates(),c=0;c<l.length;c++)o++,s[o]=l[c];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(K.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(K.signedArea(i._holes[o].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var h=i.getX(0),l=i.getY(0),c=1;c<=4;c++){var f=i.getX(c),p=i.getY(c),v=f!==h,w=p!==l;if(v===w)return!1;h=f,l=p}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,u=this._shell,h=a._shell;if(!u.equalsExact(h,o)||this._holes.length!==a._holes.length)return!1;for(var l=0;l<this._holes.length;l++)if(!i._holes[l].equalsExact(a._holes[l],o))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);Ds.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);De.arraycopy(o.getCoordinates(),0,u,0,u.length);var h=Nt.minCoordinate(o.getCoordinates());Nt.scroll(u,h),De.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],K.isCCW(o.getCoordinates())===a&&Nt.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var u=arguments[0],h=arguments[1],l=u,c=this._shell,f=l._shell,p=c.compareToSameClass(f,h);if(p!==0)return p;for(var v=this.getNumInteriorRing(),w=l.getNumInteriorRing(),E=0;E<v&&E<w;){var I=i.getInteriorRingN(E),y=l.getInteriorRingN(E),_=I.compareToSameClass(y,h);if(_!==0)return _;E++}return E<v?1:E<w?-1:0}},t.prototype.apply=function(i){var s=this;if(pt(i,ri)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(pt(i,un)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(pt(i,In))i.filter(this);else if(pt(i,Ni)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new t(s,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[rs]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(gt),Ca=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return r.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[rh]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(Ye),ni=function(r){function t(n,i){n instanceof D&&i instanceof xt&&(n=i.getCoordinateSequenceFactory().create(n)),r.call(this,n,i),this.validateConstruction()}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:r.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();de.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!r.prototype.isClosed.call(this))throw new se("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new se("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(le),ii=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new j,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),h=0;h<u.getNumGeometries();h++)s.add(u.getGeometryN(h));var l=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(l))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[rs]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(Ye),Jr=function(t){this._factory=t||null,this._isUserDataCopied=!1},_l={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Jr.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},Jr.prototype.edit=function(t,e){if(t===null)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},Jr.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof Ye?this.editGeometryCollection(t,e):t instanceof Pe?this.editPolygon(t,e):t instanceof vr?e.edit(t,this._factory):t instanceof le?e.edit(t,this._factory):(Pt.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},Jr.prototype.editGeometryCollection=function(t,e){for(var n=this,i=e.edit(t,this._factory),s=new j,o=0;o<i.getNumGeometries();o++){var a=n.edit(i.getGeometryN(o),e);a===null||a.isEmpty()||s.add(a)}return i.getClass()===Ca?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Ls?this._factory.createMultiLineString(s.toArray([])):i.getClass()===ii?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},Jr.prototype.editPolygon=function(t,e){var n=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new j,a=0;a<i.getNumInteriorRing();a++){var u=n.edit(i.getInteriorRingN(a),e);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},Jr.prototype.interfaces_=function(){return[]},Jr.prototype.getClass=function(){return Jr},Jr.GeometryEditorOperation=function(){},_l.NoOpGeometryOperation.get=function(){return nh},_l.CoordinateOperation.get=function(){return ih},_l.CoordinateSequenceOperation.get=function(){return sh},Object.defineProperties(Jr,_l);var nh=function(){};nh.prototype.edit=function(t,e){return t},nh.prototype.interfaces_=function(){return[Jr.GeometryEditorOperation]},nh.prototype.getClass=function(){return nh};var ih=function(){};ih.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return n===null?t:t instanceof ni?e.createLinearRing(n):t instanceof le?e.createLineString(n):t instanceof vr?n.length>0?e.createPoint(n[0]):e.createPoint():t},ih.prototype.interfaces_=function(){return[Jr.GeometryEditorOperation]},ih.prototype.getClass=function(){return ih};var sh=function(){};sh.prototype.edit=function(t,e){return t instanceof ni?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof le?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof vr?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},sh.prototype.interfaces_=function(){return[Jr.GeometryEditorOperation]},sh.prototype.getClass=function(){return sh};var ge=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n<e;n++)t._coordinates[n]=new D}else if(pt(arguments[0],Dt)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var u=arguments[0],h=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=h;for(var l=0;l<u;l++)t._coordinates[l]=new D}}},H0={serialVersionUID:{configurable:!0}};ge.prototype.setOrdinate=function(t,e,n){switch(e){case Dt.X:this._coordinates[t].x=n;break;case Dt.Y:this._coordinates[t].y=n;break;case Dt.Z:this._coordinates[t].z=n;break;default:throw new se("invalid ordinateIndex")}},ge.prototype.size=function(){return this._coordinates.length},ge.prototype.getOrdinate=function(t,e){switch(e){case Dt.X:return this._coordinates[t].x;case Dt.Y:return this._coordinates[t].y;case Dt.Z:return this._coordinates[t].z}return yt.NaN},ge.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ge.prototype.getCoordinateCopy=function(t){return new D(this._coordinates[t])},ge.prototype.getDimension=function(){return this._dimension},ge.prototype.getX=function(t){return this._coordinates[t].x},ge.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].clone();return new ge(e,this._dimension)},ge.prototype.expandEnvelope=function(t){for(var e=this,n=0;n<this._coordinates.length;n++)t.expandToInclude(e._coordinates[n]);return t},ge.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].copy();return new ge(e,this._dimension)},ge.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new wn(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n<this._coordinates.length;n++)e.append(", "),e.append(t._coordinates[n]);return e.append(")"),e.toString()}else return"()"},ge.prototype.getY=function(t){return this._coordinates[t].y},ge.prototype.toCoordinateArray=function(){return this._coordinates},ge.prototype.interfaces_=function(){return[Dt,Xr]},ge.prototype.getClass=function(){return ge},H0.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ge,H0);var si=function(){},gf={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};si.prototype.readResolve=function(){return si.instance()},si.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new ge(t)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new ge(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new ge(n):new ge(n,i)}},si.prototype.interfaces_=function(){return[da,Xr]},si.prototype.getClass=function(){return si},si.instance=function(){return si.instanceObject},gf.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},gf.instanceObject.get=function(){return new si},Object.defineProperties(si,gf);var B0=function(r){function t(){r.call(this),this.map_=new Map}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return this.map_.get(n)||null},t.prototype.put=function(n,i){return this.map_.set(n,i),i},t.prototype.values=function(){for(var n=new j,i=this.map_.values(),s=i.next();!s.done;)n.add(s.value),s=i.next();return n},t.prototype.entrySet=function(){var n=new cf;return this.map_.entries().forEach(function(i){return n.add(i)}),n},t.prototype.size=function(){return this.map_.size()},t}(mo),Ut=function r(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=r.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Mn){var t=arguments[0];this._modelType=t,t===r.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=r.FIXED,this.setScale(e)}else if(arguments[0]instanceof r){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}},pf={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ut.prototype.equals=function(t){if(!(t instanceof Ut))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ut.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new En(n).compareTo(new En(i))},Ut.prototype.getScale=function(){return this._scale},Ut.prototype.isFloating=function(){return this._modelType===Ut.FLOATING||this._modelType===Ut.FLOATING_SINGLE},Ut.prototype.getType=function(){return this._modelType},Ut.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ut.FLOATING?t="Floating":this._modelType===Ut.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ut.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ut.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(yt.isNaN(t))return t;if(this._modelType===Ut.FLOATING_SINGLE){var e=t;return e}return this._modelType===Ut.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof D){var n=arguments[0];if(this._modelType===Ut.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},Ut.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ut.FLOATING?t=16:this._modelType===Ut.FLOATING_SINGLE?t=6:this._modelType===Ut.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ut.prototype.setScale=function(t){this._scale=Math.abs(t)},Ut.prototype.interfaces_=function(){return[Xr,Wr]},Ut.prototype.getClass=function(){return Ut},Ut.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},pf.serialVersionUID.get=function(){return 7777263578777804e3},pf.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ut,pf);var Mn=function r(t){this._name=t||null,r.nameToTypeMap.put(t,this)},vf={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Mn.prototype.readResolve=function(){return Mn.nameToTypeMap.get(this._name)},Mn.prototype.toString=function(){return this._name},Mn.prototype.interfaces_=function(){return[Xr]},Mn.prototype.getClass=function(){return Mn},vf.serialVersionUID.get=function(){return-552860263173159e4},vf.nameToTypeMap.get=function(){return new B0},Object.defineProperties(Mn,vf),Ut.Type=Mn,Ut.FIXED=new Mn("FIXED"),Ut.FLOATING=new Mn("FLOATING"),Ut.FLOATING_SINGLE=new Mn("FLOATING SINGLE");var xt=function r(){this._precisionModel=new Ut,this._SRID=0,this._coordinateSequenceFactory=r.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?pt(arguments[0],da)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ut&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},Y0={serialVersionUID:{configurable:!0}};xt.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new D(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new D(t.getMinX(),t.getMinY()),new D(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new D(t.getMinX(),t.getMinY()),new D(t.getMinX(),t.getMaxY()),new D(t.getMaxX(),t.getMaxY()),new D(t.getMaxX(),t.getMinY()),new D(t.getMinX(),t.getMinY())]),null)},xt.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new le(this.getCoordinateSequenceFactory().create(t),this);if(pt(t,Dt))return new le(t,this)}else return new le(this.getCoordinateSequenceFactory().create([]),this)},xt.prototype.createMultiLineString=function(){if(arguments.length===0)return new Ls(null,this);if(arguments.length===1){var t=arguments[0];return new Ls(t,this)}},xt.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,s=t.iterator();s.hasNext();){var o=s.next(),a=o.getClass();e===null&&(e=a),a!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(xt.toGeometryArray(t));var u=t.iterator().next(),h=t.size()>1;if(h){if(u instanceof Pe)return this.createMultiPolygon(xt.toPolygonArray(t));if(u instanceof le)return this.createMultiLineString(xt.toLineStringArray(t));if(u instanceof vr)return this.createMultiPoint(xt.toPointArray(t));Pt.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},xt.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},xt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new vr(e,this)}}},xt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},xt.prototype.createPolygon=function(){if(arguments.length===0)return new Pe(null,null,this);if(arguments.length===1){if(pt(arguments[0],Dt)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof ni){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new Pe(i,s,this)}},xt.prototype.getSRID=function(){return this._SRID},xt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Ye(null,this);if(arguments.length===1){var t=arguments[0];return new Ye(t,this)}},xt.prototype.createGeometry=function(t){var e=new Jr(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})},xt.prototype.getPrecisionModel=function(){return this._precisionModel},xt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new ni(e,this)}}},xt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new ii(null,this);if(arguments.length===1){var t=arguments[0];return new ii(t,this)}},xt.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new Ca(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Ca(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(pt(arguments[0],Dt)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=t.getCoordinateSequenceFactory().create(1,i.getDimension());de.copy(i,o,a,0,1),s[o]=t.createPoint(a)}return this.createMultiPoint(s)}}},xt.prototype.interfaces_=function(){return[Xr]},xt.prototype.getClass=function(){return xt},xt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.getDefaultCoordinateSequenceFactory=function(){return si.instance()},xt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},Y0.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(xt,Y0);var TP=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],wl=function(t){this.geometryFactory=t||new xt};wl.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var n=e.type;if(!bn[n])throw new Error("Unknown GeoJSON type: "+e.type);return TP.indexOf(n)!==-1?bn[n].apply(this,[e.coordinates]):n==="GeometryCollection"?bn[n].apply(this,[e.geometries]):bn[n].apply(this,[e])},wl.prototype.write=function(t){var e=t.getGeometryType();if(!Oi[e])throw new Error("Geometry is not supported");return Oi[e].apply(this,[t])};var bn={Feature:function(r){var t={};for(var e in r)t[e]=r[e];if(r.geometry){var n=r.geometry.type;if(!bn[n])throw new Error("Unknown GeoJSON type: "+r.type);t.geometry=this.read(r.geometry)}return r.bbox&&(t.bbox=bn.bbox.apply(this,[r.bbox])),t},FeatureCollection:function(r){var t=this,e={};if(r.features){e.features=[];for(var n=0;n<r.features.length;++n)e.features.push(t.read(r.features[n]))}return r.bbox&&(e.bbox=this.parse.bbox.apply(this,[r.bbox])),e},coordinates:function(r){for(var t=[],e=0;e<r.length;++e){var n=r[e];t.push(new D(n[0],n[1]))}return t},bbox:function(r){return this.geometryFactory.createLinearRing([new D(r[0],r[1]),new D(r[2],r[1]),new D(r[2],r[3]),new D(r[0],r[3]),new D(r[0],r[1])])},Point:function(r){var t=new D(r[0],r[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(bn.Point.apply(t,[r[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(r){var t=bn.coordinates.apply(this,[r]);return this.geometryFactory.createLineString(t)},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(bn.LineString.apply(t,[r[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(r){for(var t=this,e=bn.coordinates.apply(this,[r[0]]),n=this.geometryFactory.createLinearRing(e),i=[],s=1;s<r.length;++s){var o=r[s],a=bn.coordinates.apply(t,[o]),u=t.geometryFactory.createLinearRing(a);i.push(u)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(bn.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Oi={coordinate:function(r){return[r.x,r.y]},Point:function(r){var t=Oi.coordinate.apply(this,[r.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Oi.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(r){for(var t=this,e=[],n=r.getCoordinates(),i=0;i<n.length;++i){var s=n[i];e.push(Oi.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Oi.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(r){var t=this,e=[],n=Oi.LineString.apply(this,[r._shell]);e.push(n.coordinates);for(var i=0;i<r._holes.length;++i){var s=r._holes[i],o=Oi.LineString.apply(t,[s]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Oi.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=i.getGeometryType();e.push(Oi[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},mf=function(t){this.geometryFactory=t||new xt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new wl(this.geometryFactory)};mf.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ut.FIXED&&this.reducePrecision(e),e},mf.prototype.reducePrecision=function(t){var e=this,n,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(n=0,i=t.points.length;n<i;n++)e.precisionModel.makePrecise(t.points[n]);else if(t.geometries)for(n=0,i=t.geometries.length;n<i;n++)e.reducePrecision(t.geometries[n])};var J0=function(){this.parser=new wl(this.geometryFactory)};J0.prototype.write=function(t){return this.parser.write(t)};var B=function(){},El={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};B.prototype.interfaces_=function(){return[]},B.prototype.getClass=function(){return B},B.opposite=function(t){return t===B.LEFT?B.RIGHT:t===B.RIGHT?B.LEFT:t},El.ON.get=function(){return 0},El.LEFT.get=function(){return 1},El.RIGHT.get=function(){return 2},Object.defineProperties(B,El);function Sl(r){this.message=r||""}Sl.prototype=new Error,Sl.prototype.name="EmptyStackException";function Nn(){this.array_=[]}Nn.prototype=new on,Nn.prototype.add=function(r){return this.array_.push(r),!0},Nn.prototype.get=function(r){if(r<0||r>=this.size())throw new Error;return this.array_[r]},Nn.prototype.push=function(r){return this.array_.push(r),r},Nn.prototype.pop=function(r){if(this.array_.length===0)throw new Sl;return this.array_.pop()},Nn.prototype.peek=function(){if(this.array_.length===0)throw new Sl;return this.array_[this.array_.length-1]},Nn.prototype.empty=function(){return this.array_.length===0},Nn.prototype.isEmpty=function(){return this.empty()},Nn.prototype.search=function(r){return this.array_.indexOf(r)},Nn.prototype.size=function(){return this.array_.length},Nn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t};var xn=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};xn.prototype.getCoordinate=function(){return this._minCoord},xn.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},xn.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();Pt.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=K.computeOrientation(this._minCoord,n,e),s=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===K.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===K.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},xn.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),i=n.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=B.LEFT;return i[e].y<i[e+1].y&&(s=B.RIGHT),s},xn.prototype.getEdge=function(){return this._orientedDe},xn.prototype.checkForRightmostCoordinate=function(t){for(var e=this,n=t.getEdge().getCoordinates(),i=0;i<n.length-1;i++)(e._minCoord===null||n[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=n[i])},xn.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},xn.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();i.isForward()&&e.checkForRightmostCoordinate(i)}Pt.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===B.LEFT&&(this._orientedDe=this._minDe.getSym())},xn.prototype.interfaces_=function(){return[]},xn.prototype.getClass=function(){return xn};var Di=function(r){function t(e,n){r.call(this,t.msgWithCoord(e,n)),this.pt=n?new D(n):null,this.name="TopologyException"}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(n,i){return i?n:n+" [ "+i+" ]"},t}(bi),Cl=function(){this.array_=[]};Cl.prototype.addLast=function(t){this.array_.push(t)},Cl.prototype.removeFirst=function(){return this.array_.shift()},Cl.prototype.isEmpty=function(){return this.array_.length===0};var Je=function(){this._finder=null,this._dirEdgeList=new j,this._nodes=new j,this._rightMostCoord=null,this._env=null,this._finder=new xn};Je.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},Je.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Je.prototype.computeNodeDepth=function(t){for(var e=this,n=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){n=s;break}}if(n===null)throw new Di("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var o=t.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),e.copySymDepths(a)}},Je.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(B.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Je.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Je.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(B.RIGHT)>=1&&e.getDepth(B.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Je.prototype.computeDepths=function(t){var e=this,n=new cf,i=new Cl,s=t.getNode();for(i.addLast(s),n.add(s),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();n.add(o),e.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var u=a.next(),h=u.getSym();if(!h.isVisited()){var l=h.getNode();n.contains(l)||(i.addLast(l),n.add(l))}}}},Je.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Je.prototype.getEnvelope=function(){if(this._env===null){for(var t=new at,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),i=n.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},Je.prototype.addReachable=function(t){var e=this,n=new Nn;for(n.add(t);!n.empty();){var i=n.pop();e.add(i,n)}},Je.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(B.LEFT,t.getDepth(B.RIGHT)),e.setDepth(B.RIGHT,t.getDepth(B.LEFT))},Je.prototype.add=function(t,e){var n=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();n._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||e.push(a)}},Je.prototype.getNodes=function(){return this._nodes},Je.prototype.getDirectedEdges=function(){return this._dirEdgeList},Je.prototype.interfaces_=function(){return[Wr]},Je.prototype.getClass=function(){return Je};var Zt=function r(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[B.ON]=n}else if(arguments[0]instanceof r){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];this.init(3),this.location[B.ON]=o,this.location[B.LEFT]=a,this.location[B.RIGHT]=u}};Zt.prototype.setAllLocations=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]=t},Zt.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==F.NONE)return!1;return!0},Zt.prototype.setAllLocationsIfNull=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]===F.NONE&&(e.location[n]=t)},Zt.prototype.isLine=function(){return this.location.length===1},Zt.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var n=new Array(3).fill(null);n[B.ON]=this.location[B.ON],n[B.LEFT]=F.NONE,n[B.RIGHT]=F.NONE,this.location=n}for(var i=0;i<this.location.length;i++)e.location[i]===F.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},Zt.prototype.getLocations=function(){return this.location},Zt.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[B.LEFT];this.location[B.LEFT]=this.location[B.RIGHT],this.location[B.RIGHT]=t},Zt.prototype.toString=function(){var t=new wn;return this.location.length>1&&t.append(F.toLocationSymbol(this.location[B.LEFT])),t.append(F.toLocationSymbol(this.location[B.ON])),this.location.length>1&&t.append(F.toLocationSymbol(this.location[B.RIGHT])),t.toString()},Zt.prototype.setLocations=function(t,e,n){this.location[B.ON]=t,this.location[B.LEFT]=e,this.location[B.RIGHT]=n},Zt.prototype.get=function(t){return t<this.location.length?this.location[t]:F.NONE},Zt.prototype.isArea=function(){return this.location.length>1},Zt.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===F.NONE)return!0;return!1},Zt.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(B.ON,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.location[e]=n}},Zt.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(F.NONE)},Zt.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Zt.prototype.allPositionsEqual=function(t){for(var e=this,n=0;n<this.location.length;n++)if(e.location[n]!==t)return!1;return!0},Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt};var Yt=function r(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new Zt(t),this.elt[1]=new Zt(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.elt[0]=new Zt(e.elt[0]),this.elt[1]=new Zt(e.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new Zt(F.NONE),this.elt[1]=new Zt(F.NONE),this.elt[n].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new Zt(s,o,a),this.elt[1]=new Zt(s,o,a)}else if(arguments.length===4){var u=arguments[0],h=arguments[1],l=arguments[2],c=arguments[3];this.elt[0]=new Zt(F.NONE,F.NONE,F.NONE),this.elt[1]=new Zt(F.NONE,F.NONE,F.NONE),this.elt[u].setLocations(h,l,c)}};Yt.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Yt.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Yt.prototype.isNull=function(t){return this.elt[t].isNull()},Yt.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Yt.prototype.isLine=function(t){return this.elt[t].isLine()},Yt.prototype.merge=function(t){for(var e=this,n=0;n<2;n++)e.elt[n]===null&&t.elt[n]!==null?e.elt[n]=new Zt(t.elt[n]):e.elt[n].merge(t.elt[n])},Yt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Yt.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(B.ON)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Yt.prototype.toString=function(){var t=new wn;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Yt.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Yt.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Yt.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(B.ON,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this.elt[n].setLocation(i,s)}},Yt.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Yt.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Yt.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Zt(this.elt[t].location[0]))},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.toLineLabel=function(t){for(var e=new Yt(F.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var ye=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new j,this._pts=new j,this._label=new Yt(F.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new j,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};ye.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)e[n]=t._pts.get(n);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=K.isCCW(this._ring.getCoordinates())},ye.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},ye.prototype.computePoints=function(t){var e=this;this._startDe=t;var n=t,i=!0;do{if(n===null)throw new Di("Found null DirectedEdge");if(n.getEdgeRing()===e)throw new Di("Directed Edge visited twice during ring-building at "+n.getCoordinate());e._edges.add(n);var s=n.getLabel();Pt.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(n.getEdge(),n.isForward(),i),i=!1,e.setEdgeRing(n,e),n=e.getNext(n)}while(n!==this._startDe)},ye.prototype.getLinearRing=function(){return this._ring},ye.prototype.getCoordinate=function(t){return this._pts.get(t)},ye.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var n=e.getNode(),i=n.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},ye.prototype.addPoints=function(t,e,n){var i=this,s=t.getCoordinates();if(e){var o=1;n&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var u=s.length-2;n&&(u=s.length-1);for(var h=u;h>=0;h--)i._pts.add(s[h])}},ye.prototype.isHole=function(){return this._isHole},ye.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},ye.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!K.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},ye.prototype.addHole=function(t){this._holes.add(t)},ye.prototype.isShell=function(){return this._shell===null},ye.prototype.getLabel=function(){return this._label},ye.prototype.getEdges=function(){return this._edges},ye.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},ye.prototype.getShell=function(){return this._shell},ye.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=e.getLocation(n,B.RIGHT);if(i===F.NONE)return null;if(this._label.getLocation(n)===F.NONE)return this._label.setLocation(n,i),null}},ye.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},ye.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)n[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),n);return s},ye.prototype.interfaces_=function(){return[]},ye.prototype.getClass=function(){return ye};var AP=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(n,i){n.setMinEdgeRing(i)},t.prototype.getNext=function(n){return n.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ye),OP=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var n=this,i=new j,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new AP(s,n._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(n,i){n.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var n=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(n),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(n){return n.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ye),Or=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};Or.prototype.setVisited=function(t){this._isVisited=t},Or.prototype.setInResult=function(t){this._isInResult=t},Or.prototype.isCovered=function(){return this._isCovered},Or.prototype.isCoveredSet=function(){return this._isCoveredSet},Or.prototype.setLabel=function(t){this._label=t},Or.prototype.getLabel=function(){return this._label},Or.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Or.prototype.updateIM=function(t){Pt.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Or.prototype.isInResult=function(){return this._isInResult},Or.prototype.isVisited=function(){return this._isVisited},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Pl=function(r){function t(){r.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Yt(0,F.NONE)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var i=n.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(n){},t.prototype.computeMergedLocation=function(n,i){var s=F.NONE;if(s=this._label.getLocation(i),!n.isNull(i)){var o=n.getLocation(i);s!==F.BOUNDARY&&(s=o)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];this._label===null?this._label=new Yt(n,i):this._label.setLocation(n,i)}else return r.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Yt)for(var s=arguments[0],o=0;o<2;o++){var a=n.computeMergedLocation(s,o),u=n._label.getLocation(o);u===F.NONE&&n._label.setLocation(o,a)}},t.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},t.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var i=F.NONE;this._label!==null&&(i=this._label.getLocation(n));var s=null;switch(i){case F.BOUNDARY:s=F.INTERIOR;break;case F.INTERIOR:s=F.BOUNDARY;break;default:s=F.BOUNDARY;break}this._label.setLocation(n,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Or),Tn=function(){this.nodeMap=new qe,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Tn.prototype.find=function(t){return this.nodeMap.get(t)},Tn.prototype.addNode=function(){if(arguments[0]instanceof D){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof Pl){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Tn.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},Tn.prototype.iterator=function(){return this.nodeMap.values().iterator()},Tn.prototype.values=function(){return this.nodeMap.values()},Tn.prototype.getBoundaryNodes=function(t){for(var e=new j,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===F.BOUNDARY&&e.add(i)}return e},Tn.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn};var Jt=function(){},oh={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt},Jt.isNorthern=function(t){return t===Jt.NE||t===Jt.NW},Jt.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2},Jt.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},Jt.isInHalfPlane=function(t,e){return e===Jt.SE?t===Jt.SE||t===Jt.SW:t===e||t===e+1},Jt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new se("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Jt.NE:Jt.SE:e>=0?Jt.NW:Jt.SW}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new se("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?Jt.NE:Jt.SE:i.y>=n.y?Jt.NW:Jt.SW}},oh.NE.get=function(){return 0},oh.NW.get=function(){return 1},oh.SW.get=function(){return 2},oh.SE.get=function(){return 3},Object.defineProperties(Jt,oh);var We=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(n,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],u=arguments[2],h=arguments[3];this._edge=o,this.init(a,u),this._label=h}};We.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:K.computeOrientation(t._p0,t._p1,this._p1)},We.prototype.getDy=function(){return this._dy},We.prototype.getCoordinate=function(){return this._p0},We.prototype.setNode=function(t){this._node=t},We.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),s=n.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},We.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},We.prototype.getDirectedCoordinate=function(){return this._p1},We.prototype.getDx=function(){return this._dx},We.prototype.getLabel=function(){return this._label},We.prototype.getEdge=function(){return this._edge},We.prototype.getQuadrant=function(){return this._quadrant},We.prototype.getNode=function(){return this._node},We.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf("."),i=e.substring(n+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},We.prototype.computeLabel=function(t){},We.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Jt.quadrant(this._dx,this._dy),Pt.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},We.prototype.interfaces_=function(){return[Wr]},We.prototype.getClass=function(){return We};var yf=function(r){function t(){var e=arguments[0],n=arguments[1];if(r.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(n){return this._depth[n]},t.prototype.setVisited=function(n){this._isVisited=n},t.prototype.computeDirectedLabel=function(){this._label=new Yt(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(n,i){if(this._depth[n]!==-999&&this._depth[n]!==i)throw new Di("assigned depths do not match",this.getCoordinate());this._depth[n]=i},t.prototype.isInteriorAreaEdge=function(){for(var n=this,i=!0,s=0;s<2;s++)n._label.isArea(s)&&n._label.getLocation(s,B.LEFT)===F.INTERIOR&&n._label.getLocation(s,B.RIGHT)===F.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(n){this._nextMin=n},t.prototype.print=function(n){r.prototype.print.call(this,n),n.print(" "+this._depth[B.LEFT]+"/"+this._depth[B.RIGHT]),n.print(" ("+this.getDepthDelta()+")"),this._isInResult&&n.print(" inResult")},t.prototype.setMinEdgeRing=function(n){this._minEdgeRing=n},t.prototype.isLineEdge=function(){var n=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,F.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,F.EXTERIOR);return n&&i&&s},t.prototype.setEdgeRing=function(n){this._edgeRing=n},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var n=this._edge.getDepthDelta();return this._isForward||(n=-n),n},t.prototype.setInResult=function(n){this._isInResult=n},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(n){this.print(n),n.print(" "),this._isForward?this._edge.print(n):this._edge.printReverse(n)},t.prototype.setSym=function(n){this._sym=n},t.prototype.setVisitedEdge=function(n){this.setVisited(n),this._sym.setVisited(n)},t.prototype.setEdgeDepths=function(n,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;n===B.LEFT&&(o=-1);var a=B.opposite(n),u=s*o,h=i+u;this.setDepth(n,i),this.setDepth(a,h)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(n){this._next=n},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(n,i){return n===F.EXTERIOR&&i===F.INTERIOR?1:n===F.INTERIOR&&i===F.EXTERIOR?-1:0},t}(We),Pa=function(){};Pa.prototype.createNode=function(t){return new Pl(t,null)},Pa.prototype.interfaces_=function(){return[]},Pa.prototype.getClass=function(){return Pa};var he=function(){if(this._edges=new j,this._nodes=null,this._edgeEndList=new j,arguments.length===0)this._nodes=new Tn(new Pa);else if(arguments.length===1){var t=arguments[0];this._nodes=new Tn(t)}};he.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var n=0;n<this._edges.size();n++){t.println("edge "+n+":");var i=e._edges.get(n);i.print(t),i.eiList.print(t)}},he.prototype.find=function(t){return this._nodes.find(t)},he.prototype.addNode=function(){if(arguments[0]instanceof Pl){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this._nodes.addNode(e)}},he.prototype.getNodeIterator=function(){return this._nodes.iterator()},he.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},he.prototype.debugPrintln=function(t){De.out.println(t)},he.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(n===null)return!1;var i=n.getLabel();return i!==null&&i.getLocation(t)===F.BOUNDARY},he.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},he.prototype.matchInSameDirection=function(t,e,n,i){return t.equals(n)?K.computeOrientation(t,e,i)===K.COLLINEAR&&Jt.quadrant(t,e)===Jt.quadrant(n,i):!1},he.prototype.getEdgeEnds=function(){return this._edgeEndList},he.prototype.debugPrint=function(t){De.out.print(t)},he.prototype.getEdgeIterator=function(){return this._edges.iterator()},he.prototype.findEdgeInSameDirection=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),o=s.getCoordinates();if(n.matchInSameDirection(t,e,o[0],o[1])||n.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return s}return null},he.prototype.insertEdge=function(t){this._edges.add(t)},he.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},he.prototype.addEdges=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();e._edges.add(i);var s=new yf(i,!0),o=new yf(i,!1);s.setSym(o),o.setSym(s),e.add(s),e.add(o)}},he.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},he.prototype.getNodes=function(){return this._nodes.values()},he.prototype.findEdge=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),o=s.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return s}return null},he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he},he.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.getEdges().linkResultDirectedEdges()}};var mr=function(){this._geometryFactory=null,this._shellList=new j;var t=arguments[0];this._geometryFactory=t};mr.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?n.add(s):e.add(s)}},mr.prototype.computePolygons=function(t){for(var e=this,n=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(e._geometryFactory);n.add(o)}return n},mr.prototype.placeFreeHoles=function(t,e){for(var n=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=n.findEdgeRingContaining(s,t);if(o===null)throw new Di("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},mr.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=this,s=new j,o=t.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),h=i.findShell(u);h!==null?(i.placePolygonHoles(h,u),e.add(h)):n.addAll(u)}else s.add(a)}return s},mr.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1},mr.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new j,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new OP(s,e._geometryFactory);n.add(o),o.setInResult()}}return n},mr.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},mr.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},mr.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),s=n.getCoordinateN(0),o=null,a=null,u=e.iterator();u.hasNext();){var h=u.next(),l=h.getLinearRing(),c=l.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;c.contains(i)&&K.isPointInRing(s,l.getCoordinates())&&(f=!0),f&&(o===null||a.contains(c))&&(o=h)}return o},mr.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(n=s,e++)}return Pt.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},mr.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];he.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),s=new j,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var Ia=function(){};Ia.prototype.getBounds=function(){},Ia.prototype.interfaces_=function(){return[]},Ia.prototype.getClass=function(){return Ia};var hn=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};hn.prototype.getItem=function(){return this._item},hn.prototype.getBounds=function(){return this._bounds},hn.prototype.interfaces_=function(){return[Ia,Xr]},hn.prototype.getClass=function(){return hn};var Li=function(){this._size=null,this._items=null,this._size=0,this._items=new j,this._items.add(null)};Li.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Li.prototype.size=function(){return this._size},Li.prototype.reorder=function(t){for(var e=this,n=null,i=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(i)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,i)},Li.prototype.clear=function(){this._size=0,this._items.clear()},Li.prototype.isEmpty=function(){return this._size===0},Li.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li};var ns=function(){};ns.prototype.visitItem=function(t){},ns.prototype.interfaces_=function(){return[]},ns.prototype.getClass=function(){return ns};var yo=function(){};yo.prototype.insert=function(t,e){},yo.prototype.remove=function(t,e){},yo.prototype.query=function(){},yo.prototype.interfaces_=function(){return[]},yo.prototype.getClass=function(){return yo};var Ie=function(){if(this._childBoundables=new j,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},j0={serialVersionUID:{configurable:!0}};Ie.prototype.getLevel=function(){return this._level},Ie.prototype.size=function(){return this._childBoundables.size()},Ie.prototype.getChildBoundables=function(){return this._childBoundables},Ie.prototype.addChildBoundable=function(t){Pt.isTrue(this._bounds===null),this._childBoundables.add(t)},Ie.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Ie.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Ie.prototype.interfaces_=function(){return[Ia,Xr]},Ie.prototype.getClass=function(){return Ie},j0.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Ie,j0);var ln=function(){};ln.reverseOrder=function(){return{compare:function(e,n){return n.compareTo(e)}}},ln.min=function(t){return ln.sort(t),t.get(0)},ln.sort=function(t,e){var n=t.toArray();e?Ds.sort(n,e):Ds.sort(n);for(var i=t.iterator(),s=0,o=n.length;s<o;s++)i.next(),i.set(n[s])},ln.singletonList=function(t){var e=new j;return e.add(t),e};var _e=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};_e.prototype.expandToQueue=function(t,e){var n=_e.isComposite(this._boundable1),i=_e.isComposite(this._boundable2);if(n&&i)return _e.area(this._boundable1)>_e.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new se("neither boundable is composite")},_e.prototype.isLeaves=function(){return!(_e.isComposite(this._boundable1)||_e.isComposite(this._boundable2))},_e.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},_e.prototype.expand=function(t,e,n,i){for(var s=this,o=t.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),h=new _e(u,e,s._itemDistance);h.getDistance()<i&&n.add(h)}},_e.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},_e.prototype.getDistance=function(){return this._distance},_e.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},_e.prototype.interfaces_=function(){return[Wr]},_e.prototype.getClass=function(){return _e},_e.area=function(t){return t.getBounds().getArea()},_e.isComposite=function(t){return t instanceof Ie};var Ne=function r(){if(this._root=null,this._built=!1,this._itemBoundables=new j,this._nodeCapacity=null,arguments.length===0){var t=r.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];Pt.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},Il={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Ne.prototype.getNodeCapacity=function(){return this._nodeCapacity},Ne.prototype.lastNode=function(t){return t.get(t.size()-1)},Ne.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Ie?n+=t.size(s):s instanceof hn&&(n+=1)}return n}},Ne.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof hn&&s.getItem()===e&&(n=s)}return n!==null?(t.getChildBoundables().remove(n),!0):!1},Ne.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new j:e}else if(arguments.length===1){for(var n=arguments[0],i=new j,s=n.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof Ie){var a=t.itemsTree(o);a!==null&&i.add(a)}else o instanceof hn?i.add(o.getItem()):Pt.shouldNeverReachHere()}return i.size()<=0?null:i}},Ne.prototype.insert=function(t,e){Pt.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new hn(t,e))},Ne.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new j;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(Pt.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof Ie?t.boundablesAtLevel(i,u,o):(Pt.isTrue(u instanceof hn),i===-1&&o.add(u))}return null}},Ne.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new j;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(pt(arguments[2],ns)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie)for(var o=arguments[0],a=arguments[1],u=arguments[2],h=a.getChildBoundables(),l=0;l<h.size();l++){var c=h.get(l);t.getIntersectsOp().intersects(c.getBounds(),o)&&(c instanceof Ie?t.query(o,c,u):c instanceof hn?u.visitItem(c.getItem()):Pt.shouldNeverReachHere())}else if(pt(arguments[2],on)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie)for(var f=arguments[0],p=arguments[1],v=arguments[2],w=p.getChildBoundables(),E=0;E<w.size();E++){var I=w.get(E);t.getIntersectsOp().intersects(I.getBounds(),f)&&(I instanceof Ie?t.query(f,I,v):I instanceof hn?v.add(I.getItem()):Pt.shouldNeverReachHere())}}},Ne.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},Ne.prototype.getRoot=function(){return this.build(),this._root},Ne.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,n):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var u=null,h=s.getChildBoundables().iterator();h.hasNext();){var l=h.next();if(t.getIntersectsOp().intersects(l.getBounds(),i)&&l instanceof Ie&&(a=t.remove(i,l,o),a)){u=l;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},Ne.prototype.createHigherLevels=function(t,e){Pt.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return n.size()===1?n.get(0):this.createHigherLevels(n,e+1)},Ne.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof Ie){var o=t.depth(s);o>n&&(n=o)}}return n+1}},Ne.prototype.createParentBoundables=function(t,e){var n=this;Pt.isTrue(!t.isEmpty());var i=new j;i.add(this.createNode(e));var s=new j(t);ln.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();n.lastNode(i).getChildBoundables().size()===n.getNodeCapacity()&&i.add(n.createNode(e)),n.lastNode(i).addChildBoundable(a)}return i},Ne.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Ne.prototype.interfaces_=function(){return[Xr]},Ne.prototype.getClass=function(){return Ne},Ne.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},Il.IntersectsOp.get=function(){return DP},Il.serialVersionUID.get=function(){return-3886435814360241e3},Il.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(Ne,Il);var DP=function(){},Ma=function(){};Ma.prototype.distance=function(t,e){},Ma.prototype.interfaces_=function(){return[]},Ma.prototype.getClass=function(){return Ma};var Q0=function(r){function t(n){n=n||t.DEFAULT_NODE_CAPACITY,r.call(this,n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;Pt.isTrue(i.length>0);for(var a=new j,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},t.prototype.createNode=function(i){return new K0(i)},t.prototype.size=function(){return arguments.length===0?r.prototype.size.call(this):r.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;r.prototype.insert.call(this,i,s)}else return r.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),u=i.iterator(),h=0;h<s;h++){a[h]=new j;for(var l=0;u.hasNext()&&l<o;){var c=u.next();a[h].add(c),l++}}return a},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return r.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];r.prototype.query.call(this,s,o)}else if(arguments.length===3){if(pt(arguments[2],ns)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie){var a=arguments[0],u=arguments[1],h=arguments[2];r.prototype.query.call(this,a,u,h)}else if(pt(arguments[2],on)&&arguments[0]instanceof Object&&arguments[1]instanceof Ie){var l=arguments[0],c=arguments[1],f=arguments[2];r.prototype.query.call(this,l,c,f)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return r.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return r.prototype.remove.call(this,i,s)}else return r.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?r.prototype.depth.call(this):r.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){Pt.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new j(i);ln.sort(a,t.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(pt(arguments[0],Ma)){var i=arguments[0],s=new _e(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof _e){var o=arguments[0];return this.nearestNeighbour(o,yt.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&pt(arguments[1],Ma)){var a=arguments[0],u=arguments[1],h=new _e(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(h)}else if(arguments[0]instanceof _e&&typeof arguments[1]=="number"){var l=arguments[0],c=arguments[1],f=c,p=null,v=new Li;for(v.add(l);!v.isEmpty()&&f>0;){var w=v.poll(),E=w.getDistance();if(E>=f)break;w.isLeaves()?(f=E,p=w):w.expandToQueue(v,f)}return[p.getBoundable(0).getItem(),p.getBoundable(1).getItem()]}}else if(arguments.length===3){var I=arguments[0],y=arguments[1],_=arguments[2],m=new hn(I,y),S=new _e(this.getRoot(),m,_);return this.nearestNeighbour(S)[0]}},t.prototype.interfaces_=function(){return[yo,Xr]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return K0},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[fa]},compare:function(n,i){return r.compareDoubles(t.centreX(n.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[fa]},compare:function(n,i){return r.compareDoubles(t.centreY(n.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[r.IntersectsOp]},intersects:function(n,i){return n.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(Ne),K0=function(r){function t(){var e=arguments[0];r.call(this,e)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var n=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();n===null?n=new at(s.getBounds()):n.expandToInclude(s.getBounds())}return n},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ie),sr=function(){};sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},sr.relativeSign=function(t,e){return t<e?-1:t>e?1:0},sr.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=sr.relativeSign(e.x,n.x),s=sr.relativeSign(e.y,n.y);switch(t){case 0:return sr.compareValue(i,s);case 1:return sr.compareValue(s,i);case 2:return sr.compareValue(s,-i);case 3:return sr.compareValue(-i,s);case 4:return sr.compareValue(-i,-s);case 5:return sr.compareValue(-s,-i);case 6:return sr.compareValue(-s,i);case 7:return sr.compareValue(i,-s)}return Pt.shouldNeverReachHere("invalid octant value"),0},sr.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var is=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new D(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};is.prototype.getCoordinate=function(){return this.coord},is.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},is.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:sr.compare(this._segmentOctant,this.coord,e.coord)},is.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},is.prototype.isInterior=function(){return this._isInterior},is.prototype.interfaces_=function(){return[Wr]},is.prototype.getClass=function(){return is};var je=function(){this._nodeMap=new qe,this._edge=null;var t=arguments[0];this._edge=t};je.prototype.getSplitCoordinates=function(){var t=this,e=new $u;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},je.prototype.addCollapsedNodes=function(){var t=this,e=new j;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var i=n.next().intValue();t.add(t._edge.getCoordinate(i),i)}},je.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},je.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n<this._edge.size()-2;n++){var i=e._edge.getCoordinate(n),s=e._edge.getCoordinate(n+2);i.equals2D(s)&&t.add(new En(n+1))}},je.prototype.addEdgeCoordinates=function(t,e,n){var i=this,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);n.add(new D(t.coord),!1);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)n.add(i._edge.getCoordinate(a));o&&n.add(new D(e.coord))},je.prototype.iterator=function(){return this._nodeMap.values().iterator()},je.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},je.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(n[0]=t.segmentIndex+1,!0):!1},je.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,n=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=e.findCollapseIndex(s,o,n);a&&t.add(new En(n[0])),s=o}},je.prototype.getEdge=function(){return this._edge},je.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},je.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var h=t.segmentIndex+1;h<=e.segmentIndex;h++)a[u++]=n._edge.getCoordinate(h);return o&&(a[u]=new D(e.coord)),new pe(a,this._edge.getData())},je.prototype.add=function(t,e){var n=new is(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return i!==null?(Pt.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},je.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0),i=n.getCoordinate(0);if(!i.equals2D(e[0]))throw new bi("bad split edge start point at "+i);var s=t.get(t.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(e[e.length-1]))throw new bi("bad split edge end point at "+a)},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var _o=function(){};_o.prototype.interfaces_=function(){return[]},_o.prototype.getClass=function(){return _o},_o.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new se("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new se("Cannot compute the octant for two identical points "+s);return _o.octant(a,u)}};var oi=function(){};oi.prototype.getCoordinates=function(){},oi.prototype.size=function(){},oi.prototype.getCoordinate=function(t){},oi.prototype.isClosed=function(){},oi.prototype.setData=function(t){},oi.prototype.getData=function(){},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi};var ah=function(){};ah.prototype.addIntersection=function(t,e){},ah.prototype.interfaces_=function(){return[oi]},ah.prototype.getClass=function(){return ah};var pe=function(){this._nodeList=new je(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};pe.prototype.getCoordinates=function(){return this._pts},pe.prototype.size=function(){return this._pts.length},pe.prototype.getCoordinate=function(t){return this._pts[t]},pe.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},pe.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},pe.prototype.setData=function(t){this._data=t},pe.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:_o.octant(t,e)},pe.prototype.getData=function(){return this._data},pe.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[3],o=new D(n.getIntersection(s));this.addIntersection(o,i)}},pe.prototype.toString=function(){return sn.toLineString(new ge(this._pts))},pe.prototype.getNodeList=function(){return this._nodeList},pe.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(n=i)}var o=this._nodeList.add(t,n);return o},pe.prototype.addIntersections=function(t,e,n){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,n,s)},pe.prototype.interfaces_=function(){return[ah]},pe.prototype.getClass=function(){return pe},pe.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new j;return pe.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var n=arguments[0],i=arguments[1],s=n.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var ut=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new D,this.p1=new D;else if(arguments.length===1){var t=arguments[0];this.p0=new D(t.p0),this.p1=new D(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],n=arguments[1],i=arguments[2],s=arguments[3];this.p0=new D(e,n),this.p1=new D(i,s)}},$0={serialVersionUID:{configurable:!0}};ut.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},ut.prototype.orientationIndex=function(){if(arguments[0]instanceof ut){var t=arguments[0],e=K.orientationIndex(this.p0,this.p1,t.p0),n=K.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof D){var i=arguments[0];return K.orientationIndex(this.p0,this.p1,i)}},ut.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},ut.prototype.isVertical=function(){return this.p0.x===this.p1.x},ut.prototype.equals=function(t){if(!(t instanceof ut))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},ut.prototype.intersection=function(t){var e=new As;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},ut.prototype.project=function(){if(arguments[0]instanceof D){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new D(t);var e=this.projectionFactor(t),n=new D;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof ut){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new ut(a,u)}},ut.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},ut.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},ut.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},ut.prototype.distancePerpendicular=function(t){return K.distancePointLinePerpendicular(t,this.p0,this.p1)},ut.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},ut.prototype.midPoint=function(){return ut.midPoint(this.p0,this.p1)},ut.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;if(i<=0)return yt.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i;return s},ut.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),i=yt.MAX_VALUE,s=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var a=this.closestPoint(t.p1);s=a.distance(t.p1),s<i&&(i=s,n[0]=a,n[1]=t.p1);var u=t.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,n[0]=this.p0,n[1]=u);var h=t.closestPoint(this.p1);return s=h.distance(this.p1),s<i&&(i=s,n[0]=this.p1,n[1]=h),n},ut.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var n=this.p0.distance(t),i=this.p1.distance(t);return n<i?this.p0:this.p1},ut.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},ut.prototype.getLength=function(){return this.p0.distance(this.p1)},ut.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return n!==0?n:this.p1.compareTo(e.p1)},ut.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},ut.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},ut.prototype.lineIntersection=function(t){try{var e=nn.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(n){if(!(n instanceof ga))throw n}finally{}return null},ut.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},ut.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),u=0,h=0;if(e!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=e*s/a,h=e*o/a}var l=n-h,c=i+u,f=new D(l,c);return f},ut.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},ut.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||yt.isNaN(e))&&(e=1),e},ut.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},ut.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},ut.prototype.distance=function(){if(arguments[0]instanceof ut){var t=arguments[0];return K.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof D){var e=arguments[0];return K.distancePointLine(e,this.p0,this.p1)}},ut.prototype.pointAlong=function(t){var e=new D;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},ut.prototype.hashCode=function(){var t=yt.doubleToLongBits(this.p0.x);t^=yt.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=yt.doubleToLongBits(this.p1.x);n^=yt.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return e^i},ut.prototype.interfaces_=function(){return[Wr,Xr]},ut.prototype.getClass=function(){return ut},ut.midPoint=function(t,e){return new D((t.x+e.x)/2,(t.y+e.y)/2)},$0.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(ut,$0);var uh=function(){this.tempEnv1=new at,this.tempEnv2=new at,this._overlapSeg1=new ut,this._overlapSeg2=new ut};uh.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},uh.prototype.interfaces_=function(){return[]},uh.prototype.getClass=function(){return uh};var yr=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};yr.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},yr.prototype.computeSelect=function(t,e,n,i){var s=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(s,o),n-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+n)/2);e<a&&this.computeSelect(t,e,a,i),a<n&&this.computeSelect(t,a,n,i)},yr.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),n=0,i=this._start;i<=this._end;i++)e[n++]=t._pts[i];return e},yr.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},yr.prototype.setId=function(t){this._id=t},yr.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},yr.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new at(t,e)}return this._env},yr.prototype.getEndIndex=function(){return this._end},yr.prototype.getStartIndex=function(){return this._start},yr.prototype.getContext=function(){return this._context},yr.prototype.getId=function(){return this._id},yr.prototype.computeOverlapsInternal=function(t,e,n,i,s,o){var a=this._pts[t],u=this._pts[e],h=n._pts[i],l=n._pts[s];if(e-t===1&&s-i===1)return o.overlap(this,t,n,i),null;if(o.tempEnv1.init(a,u),o.tempEnv2.init(h,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),f=Math.trunc((i+s)/2);t<c&&(i<f&&this.computeOverlapsInternal(t,c,n,i,f,o),f<s&&this.computeOverlapsInternal(t,c,n,f,s,o)),c<e&&(i<f&&this.computeOverlapsInternal(c,e,n,i,f,o),f<s&&this.computeOverlapsInternal(c,e,n,f,s,o))},yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr};var An=function(){};An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An},An.getChainStartIndices=function(t){var e=0,n=new j;n.add(new En(e));do{var i=An.findChainEnd(t,e);n.add(new En(i)),e=i}while(e<t.length-1);var s=An.toIntArray(n);return s},An.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=Jt.quadrant(t[n],t[n+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var o=Jt.quadrant(t[s-1],t[s]);if(o!==i)break}s++}return s-1},An.getChains=function(){if(arguments.length===1){var t=arguments[0];return An.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],n=arguments[1],i=new j,s=An.getChainStartIndices(e),o=0;o<s.length-1;o++){var a=new yr(e,s[o],s[o+1],n);i.add(a)}return i}},An.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Rs=function(){};Rs.prototype.computeNodes=function(t){},Rs.prototype.getNodedSubstrings=function(){},Rs.prototype.interfaces_=function(){return[]},Rs.prototype.getClass=function(){return Rs};var hh=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};hh.prototype.setSegmentIntersector=function(t){this._segInt=t},hh.prototype.interfaces_=function(){return[Rs]},hh.prototype.getClass=function(){return hh};var _f=function(r){function t(n){n?r.call(this,n):r.call(this),this._monoChains=new j,this._index=new Q0,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return pe.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,o=An.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new Z0(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),h=u.iterator();h.hasNext();){var l=h.next();if(l.getId()>a.getId()&&(a.computeOverlaps(l,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return Z0},Object.defineProperties(t,e),t}(hh),Z0=function(r){function t(){r.call(this),this._si=null;var e=arguments[0];this._si=e}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=n.getContext(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return r.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(uh),zt=function r(){if(this._quadrantSegments=r.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=r.CAP_ROUND,this._joinStyle=r.JOIN_ROUND,this._mitreLimit=r.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=r.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},Ri={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};zt.prototype.getEndCapStyle=function(){return this._endCapStyle},zt.prototype.isSingleSided=function(){return this._isSingleSided},zt.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=zt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=zt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==zt.JOIN_ROUND&&(this._quadrantSegments=zt.DEFAULT_QUADRANT_SEGMENTS)},zt.prototype.getJoinStyle=function(){return this._joinStyle},zt.prototype.setJoinStyle=function(t){this._joinStyle=t},zt.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},zt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},zt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},zt.prototype.setEndCapStyle=function(t){this._endCapStyle=t},zt.prototype.getMitreLimit=function(){return this._mitreLimit},zt.prototype.setMitreLimit=function(t){this._mitreLimit=t},zt.prototype.setSingleSided=function(t){this._isSingleSided=t},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt},zt.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Ri.CAP_ROUND.get=function(){return 1},Ri.CAP_FLAT.get=function(){return 2},Ri.CAP_SQUARE.get=function(){return 3},Ri.JOIN_ROUND.get=function(){return 1},Ri.JOIN_MITRE.get=function(){return 2},Ri.JOIN_BEVEL.get=function(){return 3},Ri.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Ri.DEFAULT_MITRE_LIMIT.get=function(){return 5},Ri.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(zt,Ri);var ce=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=K.COUNTERCLOCKWISE,this._inputLine=t||null},lh={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};ce.prototype.isDeletable=function(t,e,n,i){var s=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,t,n,i)},ce.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(n),s=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(e,n,i,t._distanceTol)&&(t._isDeleted[n]=ce.DELETE,o=!0,s=!0),o?e=i:e=n,n=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(n)}return s},ce.prototype.isShallowConcavity=function(t,e,n,i){var s=K.computeOrientation(t,e,n),o=s===this._angleOrientation;if(!o)return!1;var a=K.distancePointLine(e,t,n);return a<i},ce.prototype.isShallowSampled=function(t,e,n,i,s){var o=this,a=Math.trunc((i-n)/ce.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=n;u<i;u+=a)if(!o.isShallow(t,e,o._inputLine[u],s))return!1;return!0},ce.prototype.isConcave=function(t,e,n){var i=K.computeOrientation(t,e,n),s=i===this._angleOrientation;return s},ce.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=K.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=e.deleteShallowConcavities();while(n);return this.collapseLine()},ce.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===ce.DELETE;)e++;return e},ce.prototype.isShallow=function(t,e,n,i){var s=K.distancePointLine(e,t,n);return s<i},ce.prototype.collapseLine=function(){for(var t=this,e=new $u,n=0;n<this._inputLine.length;n++)t._isDeleted[n]!==ce.DELETE&&e.add(t._inputLine[n]);return e.toCoordinateArray()},ce.prototype.interfaces_=function(){return[]},ce.prototype.getClass=function(){return ce},ce.simplify=function(t,e){var n=new ce(t);return n.simplify(e)},lh.INIT.get=function(){return 0},lh.DELETE.get=function(){return 1},lh.KEEP.get=function(){return 1},lh.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(ce,lh);var Dr=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new j},tv={COORDINATE_ARRAY_TYPE:{configurable:!0}};Dr.prototype.getCoordinates=function(){var t=this._ptList.toArray(Dr.COORDINATE_ARRAY_TYPE);return t},Dr.prototype.setPrecisionModel=function(t){this._precisionModel=t},Dr.prototype.addPt=function(t){var e=new D(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Dr.prototype.revere=function(){},Dr.prototype.addPts=function(t,e){var n=this;if(e)for(var i=0;i<t.length;i++)n.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)n.addPt(t[s])},Dr.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return n<this._minimimVertexDistance},Dr.prototype.toString=function(){var t=new xt,e=t.createLineString(this.getCoordinates());return e.toString()},Dr.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new D(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Dr.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},tv.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Dr,tv);var At=function(){},wo={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},At.toDegrees=function(t){return t*180/Math.PI},At.normalize=function(t){for(;t>Math.PI;)t-=At.PI_TIMES_2;for(;t<=-Math.PI;)t+=At.PI_TIMES_2;return t},At.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=n.x-e.x,s=n.y-e.y;return Math.atan2(s,i)}},At.isAcute=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,o=n.x-e.x,a=n.y-e.y,u=i*o+s*a;return u>0},At.isObtuse=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,o=n.x-e.x,a=n.y-e.y,u=i*o+s*a;return u<0},At.interiorAngle=function(t,e,n){var i=At.angle(e,t),s=At.angle(e,n);return Math.abs(s-i)},At.normalizePositive=function(t){if(t<0){for(;t<0;)t+=At.PI_TIMES_2;t>=At.PI_TIMES_2&&(t=0)}else{for(;t>=At.PI_TIMES_2;)t-=At.PI_TIMES_2;t<0&&(t=0)}return t},At.angleBetween=function(t,e,n){var i=At.angle(e,t),s=At.angle(e,n);return At.diff(i,s)},At.diff=function(t,e){var n=null;return t<e?n=e-t:n=t-e,n>Math.PI&&(n=2*Math.PI-n),n},At.toRadians=function(t){return t*Math.PI/180},At.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?At.COUNTERCLOCKWISE:n<0?At.CLOCKWISE:At.NONE},At.angleBetweenOriented=function(t,e,n){var i=At.angle(e,t),s=At.angle(e,n),o=s-i;return o<=-Math.PI?o+At.PI_TIMES_2:o>Math.PI?o-At.PI_TIMES_2:o},wo.PI_TIMES_2.get=function(){return 2*Math.PI},wo.PI_OVER_2.get=function(){return Math.PI/2},wo.PI_OVER_4.get=function(){return Math.PI/4},wo.COUNTERCLOCKWISE.get=function(){return K.COUNTERCLOCKWISE},wo.CLOCKWISE.get=function(){return K.CLOCKWISE},wo.NONE.get=function(){return K.COLLINEAR},Object.defineProperties(At,wo);var re=function r(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new ut,this._seg1=new ut,this._offset0=new ut,this._offset1=new ut,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new As,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===zt.JOIN_ROUND&&(this._closingSegLengthFactor=r.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},ch={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};re.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=K.computeOrientation(this._s0,this._s1,this._s2),i=n===K.CLOCKWISE&&this._side===B.LEFT||n===K.COUNTERCLOCKWISE&&this._side===B.RIGHT;n===0?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},re.prototype.addLineEndCap=function(t,e){var n=new ut(t,e),i=new ut;this.computeOffsetSegment(n,B.LEFT,this._distance,i);var s=new ut;this.computeOffsetSegment(n,B.RIGHT,this._distance,s);var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case zt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,u+Math.PI/2,u-Math.PI/2,K.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case zt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case zt.CAP_SQUARE:var h=new D;h.x=Math.abs(this._distance)*Math.cos(u),h.y=Math.abs(this._distance)*Math.sin(u);var l=new D(i.p1.x+h.x,i.p1.y+h.y),c=new D(s.p1.x+h.x,s.p1.y+h.y);this._segList.addPt(l),this._segList.addPt(c);break}},re.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},re.prototype.addMitreJoin=function(t,e,n,i){var s=!0,o=null;try{o=nn.intersection(e.p0,e.p1,n.p0,n.p1);var a=i<=0?1:o.distance(t)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(u){if(u instanceof ga)o=new D(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},re.prototype.addFilletCorner=function(t,e,n,i,s){var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o),h=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,h);i===K.CLOCKWISE?u<=c&&(u+=2*Math.PI):u>=c&&(u-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,u,c,i,s),this._segList.addPt(n)},re.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*re.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===zt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===zt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},re.prototype.createSquare=function(t){this._segList.addPt(new D(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new D(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},re.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},re.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},re.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},re.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},re.prototype.addLimitedMitreJoin=function(t,e,n,i){var s=this._seg0.p1,o=At.angle(s,this._seg0.p0),a=At.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,h=At.normalize(o+u),l=At.normalize(h+Math.PI),c=i*n,f=c*Math.abs(Math.sin(u)),p=n-f,v=s.x+c*Math.cos(l),w=s.y+c*Math.sin(l),E=new D(v,w),I=new ut(s,E),y=I.pointAlongOffset(1,p),_=I.pointAlongOffset(1,-p);this._side===B.LEFT?(this._segList.addPt(y),this._segList.addPt(_)):(this._segList.addPt(_),this._segList.addPt(y))},re.prototype.computeOffsetSegment=function(t,e,n,i){var s=e===B.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,u=Math.sqrt(o*o+a*a),h=s*n*o/u,l=s*n*a/u;i.p0.x=t.p0.x-l,i.p0.y=t.p0.y+h,i.p1.x=t.p1.x-l,i.p1.y=t.p1.y+h},re.prototype.addFilletArc=function(t,e,n,i,s){var o=this,a=i===K.CLOCKWISE?-1:1,u=Math.abs(e-n),h=Math.trunc(u/this._filletAngleQuantum+.5);if(h<1)return null;for(var l=0,c=u/h,f=l,p=new D;f<u;){var v=e+a*f;p.x=t.x+s*Math.cos(v),p.y=t.y+s*Math.sin(v),o._segList.addPt(p),f+=c}},re.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*re.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new D((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new D((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},re.prototype.createCircle=function(t){var e=new D(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},re.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},re.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Dr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*re.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},re.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===zt.JOIN_BEVEL||this._bufParams.getJoinStyle()===zt.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,K.CLOCKWISE,this._distance))},re.prototype.closeRing=function(){this._segList.closeRing()},re.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},re.prototype.interfaces_=function(){return[]},re.prototype.getClass=function(){return re},ch.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},ch.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},ch.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},ch.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(re,ch);var or=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};or.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,n,s);var o=s.getCoordinates();return n&&Nt.reverse(o),o},or.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var s=ce.simplify(t,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],B.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{n.addSegments(t,!1);var u=ce.simplify(t,i),h=u.length-1;n.initSideSegments(u[0],u[1],B.LEFT),n.addFirstSegment();for(var l=2;l<=h;l++)n.addNextSegment(u[l],!0)}n.addLastSegment(),n.closeRing()},or.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===B.RIGHT&&(i=-i);var s=ce.simplify(t,i),o=s.length-1;n.initSideSegments(s[o-1],s[0],e);for(var a=1;a<=o;a++){var u=a!==1;n.addNextSegment(s[a],u)}n.closeRing()},or.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=ce.simplify(t,n),s=i.length-1;e.initSideSegments(i[0],i[1],B.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var a=ce.simplify(t,-n),u=a.length-1;e.initSideSegments(a[u],a[u-1],B.LEFT);for(var h=u-2;h>=0;h--)e.addNextSegment(a[h],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},or.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case zt.CAP_ROUND:e.createCircle(t);break;case zt.CAP_SQUARE:e.createSquare(t);break}},or.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o},or.prototype.getBufferParameters=function(){return this._bufParams},or.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},or.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return or.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},or.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var s=ce.simplify(t,-i),o=s.length-1;n.initSideSegments(s[o],s[o-1],B.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(s[a],!0)}else{var u=ce.simplify(t,i),h=u.length-1;n.initSideSegments(u[0],u[1],B.LEFT),n.addFirstSegment();for(var l=2;l<=h;l++)n.addNextSegment(u[l],!0)}n.addLastSegment()},or.prototype.getSegGen=function(t){return new re(this._precisionModel,this._bufParams,t)},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new D(t[n]);return e};var Eo=function(){this._subgraphs=null,this._seg=new ut,this._cga=new K;var t=arguments[0];this._subgraphs=t},ev={DepthSegment:{configurable:!0}};Eo.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=new j,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(pt(arguments[2],on)&&arguments[0]instanceof D&&arguments[1]instanceof yf)for(var a=arguments[0],u=arguments[1],h=arguments[2],l=u.getEdge().getCoordinates(),c=0;c<l.length-1;c++){t._seg.p0=l[c],t._seg.p1=l[c+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var f=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(f<a.x)&&!t._seg.isHorizontal()&&!(a.y<t._seg.p0.y||a.y>t._seg.p1.y)&&K.computeOrientation(t._seg.p0,t._seg.p1,a)!==K.RIGHT){var p=u.getDepth(B.LEFT);t._seg.p0.equals(l[c])||(p=u.getDepth(B.RIGHT));var v=new Fs(t._seg,p);h.add(v)}}else if(pt(arguments[2],on)&&arguments[0]instanceof D&&pt(arguments[1],on))for(var w=arguments[0],E=arguments[1],I=arguments[2],y=E.iterator();y.hasNext();){var _=y.next();_.isForward()&&t.findStabbedSegments(w,_,I)}}},Eo.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=ln.min(e);return n._leftDepth},Eo.prototype.interfaces_=function(){return[]},Eo.prototype.getClass=function(){return Eo},ev.DepthSegment.get=function(){return Fs},Object.defineProperties(Eo,ev);var Fs=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new ut(t),this._leftDepth=e};Fs.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)},Fs.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)},Fs.prototype.toString=function(){return this._upwardSeg.toString()},Fs.prototype.interfaces_=function(){return[Wr]},Fs.prototype.getClass=function(){return Fs};var qt=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};qt.prototype.area=function(){return qt.area(this.p0,this.p1,this.p2)},qt.prototype.signedArea=function(){return qt.signedArea(this.p0,this.p1,this.p2)},qt.prototype.interpolateZ=function(t){if(t===null)throw new se("Supplied point is null.");return qt.interpolateZ(t,this.p0,this.p1,this.p2)},qt.prototype.longestSideLength=function(){return qt.longestSideLength(this.p0,this.p1,this.p2)},qt.prototype.isAcute=function(){return qt.isAcute(this.p0,this.p1,this.p2)},qt.prototype.circumcentre=function(){return qt.circumcentre(this.p0,this.p1,this.p2)},qt.prototype.area3D=function(){return qt.area3D(this.p0,this.p1,this.p2)},qt.prototype.centroid=function(){return qt.centroid(this.p0,this.p1,this.p2)},qt.prototype.inCentre=function(){return qt.inCentre(this.p0,this.p1,this.p2)},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},qt.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},qt.det=function(t,e,n,i){return t*i-e*n},qt.interpolateZ=function(t,e,n,i){var s=e.x,o=e.y,a=n.x-s,u=i.x-s,h=n.y-o,l=i.y-o,c=a*l-u*h,f=t.x-s,p=t.y-o,v=(l*f-u*p)/c,w=(-h*f+a*p)/c,E=e.z+v*(n.z-e.z)+w*(i.z-e.z);return E},qt.longestSideLength=function(t,e,n){var i=t.distance(e),s=e.distance(n),o=n.distance(t),a=i;return s>a&&(a=s),o>a&&(a=o),a},qt.isAcute=function(t,e,n){return!(!At.isAcute(t,e,n)||!At.isAcute(e,n,t)||!At.isAcute(n,t,e))},qt.circumcentre=function(t,e,n){var i=n.x,s=n.y,o=t.x-i,a=t.y-s,u=e.x-i,h=e.y-s,l=2*qt.det(o,a,u,h),c=qt.det(a,o*o+a*a,h,u*u+h*h),f=qt.det(o,o*o+a*a,u,u*u+h*h),p=i-c/l,v=s+f/l;return new D(p,v)},qt.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,s=new nn(t.x+n/2,t.y+i/2,1),o=new nn(t.x-i+n/2,t.y+n+i/2,1);return new nn(s,o)},qt.angleBisector=function(t,e,n){var i=e.distance(t),s=e.distance(n),o=i/(i+s),a=n.x-t.x,u=n.y-t.y,h=new D(t.x+o*a,t.y+o*u);return h},qt.area3D=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,o=e.z-t.z,a=n.x-t.x,u=n.y-t.y,h=n.z-t.z,l=s*h-o*u,c=o*a-i*h,f=i*u-s*a,p=l*l+c*c+f*f,v=Math.sqrt(p)/2;return v},qt.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,s=(t.y+e.y+n.y)/3;return new D(i,s)},qt.inCentre=function(t,e,n){var i=e.distance(n),s=t.distance(n),o=t.distance(e),a=i+s+o,u=(i*t.x+s*e.x+o*n.x)/a,h=(i*t.y+s*e.y+o*n.y)/a;return new D(u,h)};var jr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new j;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};jr.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},jr.prototype.addPolygon=function(t){var e=this,n=this._distance,i=B.LEFT;this._distance<0&&(n=-this._distance,i=B.RIGHT);var s=t.getExteriorRing(),o=Nt.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,n,i,F.EXTERIOR,F.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var u=t.getInteriorRingN(a),h=Nt.removeRepeatedPoints(u.getCoordinates());e._distance>0&&e.isErodedCompletely(u,-e._distance)||e.addPolygonRing(h,n,B.opposite(i),F.INTERIOR,F.EXTERIOR)}},jr.prototype.isTriangleErodedCompletely=function(t,e){var n=new qt(t[0],t[1],t[2]),i=n.inCentre(),s=K.distancePointLine(i,n.p0,n.p1);return s<Math.abs(e)},jr.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Nt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},jr.prototype.addCurve=function(t,e,n){if(t===null||t.length<2)return null;var i=new pe(t,new Yt(0,F.BOUNDARY,e,n));this._curveList.add(i)},jr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},jr.prototype.addPolygonRing=function(t,e,n,i,s){if(e===0&&t.length<ni.MINIMUM_VALID_SIZE)return null;var o=i,a=s;t.length>=ni.MINIMUM_VALID_SIZE&&K.isCCW(t)&&(o=s,a=i,n=B.opposite(n));var u=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(u,o,a)},jr.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Pe?this.addPolygon(t):t instanceof le?this.addLineString(t):t instanceof vr?this.addPoint(t):t instanceof Ca?this.addCollection(t):t instanceof Ls?this.addCollection(t):t instanceof ii?this.addCollection(t):t instanceof Ye&&this.addCollection(t)},jr.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},jr.prototype.addCollection=function(t){for(var e=this,n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);e.add(i)}},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr};var ba=function(){};ba.prototype.locate=function(t){},ba.prototype.interfaces_=function(){return[]},ba.prototype.getClass=function(){return ba};var ai=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};ai.prototype.next=function(){if(this._atStart)return this._atStart=!1,ai.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new Ea;var t=this._parent.getGeometryN(this._index++);return t instanceof Ye?(this._subcollectionIterator=new ai(t),this._subcollectionIterator.next()):t},ai.prototype.remove=function(){throw new Error(this.getClass().getName())},ai.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},ai.prototype.interfaces_=function(){return[wa]},ai.prototype.getClass=function(){return ai},ai.isAtomic=function(t){return!(t instanceof Ye)};var Lr=function(){this._geom=null;var t=arguments[0];this._geom=t};Lr.prototype.locate=function(t){return Lr.locate(t,this._geom)},Lr.prototype.interfaces_=function(){return[ba]},Lr.prototype.getClass=function(){return Lr},Lr.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?K.isPointInRing(t,e.getCoordinates()):!1},Lr.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Lr.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(Lr.isPointInRing(t,s))return!1}return!0},Lr.containsPoint=function(t,e){if(e instanceof Pe)return Lr.containsPointInPolygon(t,e);if(e instanceof Ye)for(var n=new ai(e);n.hasNext();){var i=n.next();if(i!==e&&Lr.containsPoint(t,i))return!0}return!1},Lr.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:Lr.containsPoint(t,e)?F.INTERIOR:F.EXTERIOR};var Xe=function(){this._edgeMap=new qe,this._edgeList=null,this._ptInAreaLocation=[F.NONE,F.NONE]};Xe.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return e===0&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Xe.prototype.propagateSideLabels=function(t){for(var e=F.NONE,n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,B.LEFT)!==F.NONE&&(e=s.getLocation(t,B.LEFT))}if(e===F.NONE)return null;for(var o=e,a=this.iterator();a.hasNext();){var u=a.next(),h=u.getLabel();if(h.getLocation(t,B.ON)===F.NONE&&h.setLocation(t,B.ON,o),h.isArea(t)){var l=h.getLocation(t,B.LEFT),c=h.getLocation(t,B.RIGHT);if(c!==F.NONE){if(c!==o)throw new Di("side location conflict",u.getCoordinate());l===F.NONE&&Pt.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=l}else Pt.isTrue(h.getLocation(t,B.LEFT)===F.NONE,"found single null side"),h.setLocation(t,B.RIGHT,o),h.setLocation(t,B.LEFT,o)}}},Xe.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},Xe.prototype.print=function(t){De.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},Xe.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Xe.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel(),s=i.getLocation(t,B.LEFT);Pt.isTrue(s!==F.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),h=u.getLabel();Pt.isTrue(h.isArea(t),"Found non-area edge");var l=h.getLocation(t,B.LEFT),c=h.getLocation(t,B.RIGHT);if(l===c||c!==o)return!1;o=l}return!0},Xe.prototype.findIndex=function(t){var e=this;this.iterator();for(var n=0;n<this._edgeList.size();n++){var i=e._edgeList.get(n);if(i===t)return n}return-1},Xe.prototype.iterator=function(){return this.getEdges().iterator()},Xe.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new j(this._edgeMap.values())),this._edgeList},Xe.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===F.NONE&&(this._ptInAreaLocation[t]=Lr.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Xe.prototype.toString=function(){var t=new wn;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
|
|
67
67
|
`);for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append(`
|
|
68
|
-
`)}return t.toString()},Xe.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.computeLabel(t)}},Xe.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===F.BOUNDARY&&(n[a]=!0);for(var u=this.iterator();u.hasNext();)for(var h=u.next(),l=h.getLabel(),c=0;c<2;c++)if(l.isAnyNull(c)){var f=F.NONE;if(n[c])f=F.EXTERIOR;else{var p=h.getCoordinate();f=e.getLocation(c,p,t)}l.setAllLocationsIfNull(c,f)}},Xe.prototype.getDegree=function(){return this._edgeMap.size()},Xe.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var OP=function(r){function t(){r.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=n._resultAreaEdgeList.get(a),h=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case n._SCANNING_FOR_INCOMING:if(!h.isInResult())continue;s=h,o=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=n._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Di("no outgoing dirEdge found",this.getCoordinate());Pt.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(n){var i=n;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var n=this.getEdges(),i=n.size();if(i<1)return null;var s=n.get(0);if(i===1)return s;var o=n.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return Jt.isNorthern(a)&&Jt.isNorthern(u)?s:!Jt.isNorthern(a)&&!Jt.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(Pt.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(n){De.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();n.print("out "),s.print(n),n.println(),n.print("in "),s.getSym().print(n),n.println()}},t.prototype.getResultAreaEdges=function(){var n=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new j;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&n._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(n){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,n.getLocation(0)),o.setAllLocationsIfNull(1,n.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var n=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=n._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(B.LEFT),a=i.getDepth(B.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),h=this.computeDepths(0,s,u);if(h!==a)throw new Di("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var l=arguments[0],c=arguments[1],f=arguments[2],p=f,v=l;v<c;v++){var w=n._edgeList.get(v);w.setEdgeDepths(B.RIGHT,p),p=w.getDepth(B.LEFT)}return p}},t.prototype.mergeSymLabels=function(){for(var n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(n){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var h=i._resultAreaEdgeList.get(u),l=h.getSym();switch(s===null&&h.getEdgeRing()===n&&(s=h),a){case i._SCANNING_FOR_INCOMING:if(l.getEdgeRing()!==n)continue;o=l,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(h.getEdgeRing()!==n)continue;o.setNextMin(h),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(Pt.isTrue(s!==null,"found null for first outgoing dirEdge"),Pt.isTrue(s.getEdgeRing()===n,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&n++}return n}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var h=u.next();h.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var n=F.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){n=F.INTERIOR;break}if(o.isInResult()){n=F.EXTERIOR;break}}}if(n===F.NONE)return null;for(var a=n,u=this.iterator();u.hasNext();){var h=u.next(),l=h.getSym();h.isLineEdge()?h.getEdge().setCovered(a===F.INTERIOR):(h.isInResult()&&(a=F.EXTERIOR),l.isInResult()&&(a=F.INTERIOR))}},t.prototype.computeLabelling=function(n){var i=this;r.prototype.computeLabelling.call(this,n),this._label=new Yt(F.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),h=0;h<2;h++){var l=u.getLocation(h);(l===F.INTERIOR||l===F.BOUNDARY)&&i._label.setLocation(h,F.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Xe),tv=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.createNode=function(n){return new Cl(n,new OP)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Pa),ss=function r(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=r.orientation(t)};ss.prototype.compareTo=function(t){var e=t,n=ss.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n},ss.prototype.interfaces_=function(){return[Wr]},ss.prototype.getClass=function(){return ss},ss.orientation=function(t){return Nt.increasingDirection(t)===1},ss.compareOriented=function(t,e,n,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?n.length:-1,h=e?0:t.length-1,l=i?0:n.length-1;;){var c=t[h].compareTo(n[l]);if(c!==0)return c;h+=s,l+=o;var f=h===a,p=l===u;if(f&&!p)return-1;if(!f&&p)return 1;if(f&&p)return 0}};var cn=function(){this._edges=new j,this._ocaMap=new qe};cn.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var i=e._edges.get(n);n>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},cn.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())},cn.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n<this._edges.size();n++)if(e._edges.get(n).equals(t))return n;return-1},cn.prototype.iterator=function(){return this._edges.iterator()},cn.prototype.getEdges=function(){return this._edges},cn.prototype.get=function(t){return this._edges.get(t)},cn.prototype.findEqualEdge=function(t){var e=new ss(t.getCoordinates()),n=this._ocaMap.get(e);return n},cn.prototype.add=function(t){this._edges.add(t);var e=new ss(t.getCoordinates());this._ocaMap.put(e,t)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var Gs=function(){};Gs.prototype.processIntersections=function(t,e,n,i){},Gs.prototype.isDone=function(){},Gs.prototype.interfaces_=function(){return[]},Gs.prototype.getClass=function(){return Gs};var Rr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Rr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(Rr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Rr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Rr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Rr.prototype.getLineIntersector=function(){return this._li},Rr.prototype.hasProperIntersection=function(){return this._hasProper},Rr.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Rr.prototype.hasIntersection=function(){return this._hasIntersection},Rr.prototype.isDone=function(){return!1},Rr.prototype.hasInteriorIntersection=function(){return this._hasInterior},Rr.prototype.interfaces_=function(){return[Gs]},Rr.prototype.getClass=function(){return Rr},Rr.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var On=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new D(t),this.segmentIndex=e,this.dist=n};On.prototype.getSegmentIndex=function(){return this.segmentIndex},On.prototype.getCoordinate=function(){return this.coord},On.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},On.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},On.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},On.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},On.prototype.getDistance=function(){return this.dist},On.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},On.prototype.interfaces_=function(){return[Wr]},On.prototype.getClass=function(){return On};var ui=function(){this._nodeMap=new qe,this.edge=null;var t=arguments[0];this.edge=t};ui.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},ui.prototype.iterator=function(){return this._nodeMap.values().iterator()},ui.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},ui.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},ui.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var h=t.segmentIndex+1;h<=e.segmentIndex;h++)a[u++]=n.edge.pts[h];return o&&(a[u]=e.coord),new Il(a,new Yt(this.edge._label))},ui.prototype.add=function(t,e,n){var i=new On(t,e,n),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},ui.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ks=function(){};ks.prototype.getChainStartIndices=function(t){var e=this,n=0,i=new j;i.add(new En(n));do{var s=e.findChainEnd(t,n);i.add(new En(s)),n=s}while(n<t.length-1);var o=ks.toIntArray(i);return o},ks.prototype.findChainEnd=function(t,e){for(var n=Jt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Jt.quadrant(t[i-1],t[i]);if(s!==n)break;i++}return i-1},ks.prototype.interfaces_=function(){return[]},ks.prototype.getClass=function(){return ks},ks.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Fi=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new at,this.env2=new at;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new ks;this.startIndex=e.getChainStartIndices(this.pts)};Fi.prototype.getCoordinates=function(){return this.pts},Fi.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},Fi.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},Fi.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],h=arguments[4],l=arguments[5],c=this.pts[s],f=this.pts[o],p=a.pts[u],v=a.pts[h];if(o-s===1&&h-u===1)return l.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(c,f),this.env2.init(p,v),!this.env1.intersects(this.env2))return null;var w=Math.trunc((s+o)/2),E=Math.trunc((u+h)/2);s<w&&(u<E&&this.computeIntersectsForChain(s,w,a,u,E,l),E<h&&this.computeIntersectsForChain(s,w,a,E,h,l)),w<o&&(u<E&&this.computeIntersectsForChain(w,o,a,u,E,l),E<h&&this.computeIntersectsForChain(w,o,a,E,h,l))}},Fi.prototype.getStartIndexes=function(){return this.startIndex},Fi.prototype.computeIntersects=function(t,e){for(var n=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)n.computeIntersectsForChain(i,t,s,e)},Fi.prototype.interfaces_=function(){return[]},Fi.prototype.getClass=function(){return Fi};var Le=function r(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)t._depth[e][n]=r.NULL_VALUE},ev={NULL_VALUE:{configurable:!0}};Le.prototype.getDepth=function(t,e){return this._depth[t][e]},Le.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},Le.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var n=0;n<3;n++)if(t._depth[e][n]!==Le.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===Le.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===Le.NULL_VALUE}},Le.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var n=t._depth[e][1];t._depth[e][2]<n&&(n=t._depth[e][2]),n<0&&(n=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>n&&(s=1),t._depth[e][i]=s}}},Le.prototype.getDelta=function(t){return this._depth[t][B.RIGHT]-this._depth[t][B.LEFT]},Le.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?F.EXTERIOR:F.INTERIOR},Le.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Le.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var i=1;i<3;i++){var s=e.getLocation(n,i);(s===F.EXTERIOR||s===F.INTERIOR)&&(t.isNull(n,i)?t._depth[n][i]=Le.depthAtLocation(s):t._depth[n][i]+=Le.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===F.INTERIOR&&this._depth[o][a]++}},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le},Le.depthAtLocation=function(t){return t===F.EXTERIOR?0:t===F.INTERIOR?1:Le.NULL_VALUE},ev.NULL_VALUE.get=function(){return-1},Object.defineProperties(Le,ev);var Il=function(r){function t(){if(r.call(this),this.pts=null,this._env=null,this.eiList=new ui(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Le,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var i=new t(n,Yt.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(n){this._isIsolated=n},t.prototype.setName=function(n){this._name=n},t.prototype.equals=function(n){var i=this;if(!(n instanceof t))return!1;var s=n;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,h=0;h<this.pts.length;h++)if(i.pts[h].equals2D(s.pts[h])||(o=!1),i.pts[h].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},t.prototype.print=function(n){var i=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&n.print(","),n.print(i.pts[s].x+" "+i.pts[s].y);n.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(n){t.updateIM(this._label,n)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(n){var i=this;n.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)n.print(i.pts[s]+" ");n.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Fi(this)),this._mce},t.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new at;for(var i=0;i<this.pts.length;i++)n._env.expandToInclude(n.pts[i])}return this._env},t.prototype.addIntersection=function(n,i,s,o){var a=new D(n.getIntersection(o)),u=i,h=n.getEdgeDistance(s,o),l=u+1;if(l<this.pts.length){var c=this.pts[l];a.equals2D(c)&&(u=l,h=0)}this.eiList.add(a,u,h)},t.prototype.toString=function(){var n=this,i=new wn;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(n.pts[s].x+" "+n.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(n){var i=this;if(this.pts.length!==n.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(n.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(n){this._depthDelta=n},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(n,i,s){for(var o=this,a=0;a<n.getIntersectionNum();a++)o.addIntersection(n,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];i.setAtLeastIfValid(n.getLocation(0,B.ON),n.getLocation(1,B.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,B.LEFT),n.getLocation(1,B.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,B.RIGHT),n.getLocation(1,B.RIGHT),2))}else return r.prototype.updateIM.apply(this,arguments)},t}(Or),Qe=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new cn,this._bufParams=t||null};Qe.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},Qe.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Yt(t.getLabel()),i.flip()),n.merge(i);var s=Qe.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(Qe.depthDelta(t.getLabel()))},Qe.prototype.buildSubgraphs=function(t,e){for(var n=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new Eo(n),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),n.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},Qe.prototype.createSubgraphs=function(t){for(var e=new j,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var s=new Je;s.create(i),e.add(s)}}return ln.sort(e,ln.reverseOrder()),e},Qe.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},Qe.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new mf,n=new As;return n.setPrecisionModel(t),e.setSegmentIntersector(new Rr(n)),e},Qe.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;n===null&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new or(n,this._bufParams),s=new jr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,n),this._graph=new he(new tv),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new mr(this._geomFact);this.buildSubgraphs(a,u);var h=u.getPolygons();if(h.size()<=0)return this.createEmptyResultGeometry();var l=this._geomFact.buildGeometry(h);return l},Qe.prototype.computeNodedEdges=function(t,e){var n=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var h=a.getData(),l=new Il(a.getCoordinates(),new Yt(h));n.insertUniqueEdge(l)}}},Qe.prototype.setNoder=function(t){this._workingNoder=t},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe},Qe.depthDelta=function(t){var e=t.getLocation(0,B.LEFT),n=t.getLocation(0,B.RIGHT);return e===F.INTERIOR&&n===F.EXTERIOR?1:e===F.EXTERIOR&&n===F.INTERIOR?-1:0},Qe.convertSegStrings=function(t){for(var e=new xt,n=new j;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());n.add(s)}return e.buildGeometry(n)};var os=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};os.prototype.rescale=function(){var t=this;if(pt(arguments[0],Ce))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&De.out.println(s)}},os.prototype.scale=function(){var t=this;if(pt(arguments[0],Ce)){for(var e=arguments[0],n=new j,i=e.iterator();i.hasNext();){var s=i.next();n.add(new pe(t.scale(s.getCoordinates()),s.getData()))}return n}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new D(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var h=Nt.removeRepeatedPoints(a);return h}},os.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},os.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},os.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},os.prototype.interfaces_=function(){return[Rs]},os.prototype.getClass=function(){return os};var Dn=function(){this._li=new As,this._segStrings=null;var t=arguments[0];this._segStrings=t},rv={fact:{configurable:!0}};Dn.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next(),i=n.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),h=u.getCoordinates(),l=1;l<h.length-1;l++)if(h[l].equals(s))throw new bi("found endpt/interior pt intersection at index "+l+" :pt "+s)}},Dn.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var n=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(n,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),h=a.getCoordinates(),l=0;l<u.length-1;l++)for(var c=0;c<h.length-1;c++)t.checkInteriorIntersections(o,l,a,c);else if(arguments.length===4){var f=arguments[0],p=arguments[1],v=arguments[2],w=arguments[3];if(f===v&&p===w)return null;var E=f.getCoordinates()[p],I=f.getCoordinates()[p+1],y=v.getCoordinates()[w],_=v.getCoordinates()[w+1];if(this._li.computeIntersection(E,I,y,_),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,E,I)||this.hasInteriorIntersection(this._li,y,_)))throw new bi("found non-noded intersection at "+E+"-"+I+" and "+y+"-"+_)}},Dn.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},Dn.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next();t.checkCollapses(n)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},Dn.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(n)))return!0}return!1},Dn.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new bi("found non-noded collapse at "+Dn.fact.createLineString([t,e,n]))},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},rv.fact.get=function(){return new xt},Object.defineProperties(Dn,rv);var ar=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new se("Scale factor must be non-zero");e!==1&&(this._pt=new D(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new D,this._p1Scaled=new D),this.initCorners(this._pt)},nv={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ar.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<n||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return Pt.isTrue(!(a&&u),"Found bad envelope test"),u},ar.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new D(this._maxx,this._maxy),this._corner[1]=new D(this._minx,this._maxy),this._corner[2]=new D(this._minx,this._miny),this._corner[3]=new D(this._maxx,this._miny)},ar.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ar.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ar.prototype.getCoordinate=function(){return this._originalPt},ar.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ar.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=ar.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new at(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ar.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},ar.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&i||t.equals(this._pt)||e.equals(this._pt))},ar.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(n,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},nv.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(ar,nv);var fh=function(){this.tempEnv1=new at,this.selectedSegment=new ut};fh.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},fh.prototype.interfaces_=function(){return[]},fh.prototype.getClass=function(){return fh};var Na=function(){this._index=null;var t=arguments[0];this._index=t},iv={HotPixelSnapAction:{configurable:!0}};Na.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new sv(e,n,i);return this._index.query(s,{interfaces_:function(){return[ns]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},Na.prototype.interfaces_=function(){return[]},Na.prototype.getClass=function(){return Na},iv.HotPixelSnapAction.get=function(){return sv},Object.defineProperties(Na,iv);var sv=function(r){function t(){r.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1],s=n.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return r.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fh),So=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new j};So.prototype.processIntersections=function(t,e,n,i){var s=this;if(t===n&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=n.getCoordinates()[i],h=n.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,h),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l<this._li.getIntersectionNum();l++)s._interiorIntersections.add(s._li.getIntersection(l));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},So.prototype.isDone=function(){return!1},So.prototype.getInteriorIntersections=function(){return this._interiorIntersections},So.prototype.interfaces_=function(){return[Gs]},So.prototype.getClass=function(){return So};var hi=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new As,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};hi.prototype.checkCorrectness=function(t){var e=pe.getNodedSubstrings(t),n=new Dn(e);try{n.checkValid()}catch(i){if(i instanceof k0)i.printStackTrace();else throw i}finally{}},hi.prototype.getNodedSubstrings=function(){return pe.getNodedSubstrings(this._nodedSegStrings)},hi.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},hi.prototype.findInteriorIntersections=function(t,e){var n=new So(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},hi.prototype.computeVertexSnaps=function(){var t=this;if(pt(arguments[0],Ce))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof pe)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new ar(o[a],t._scaleFactor,t._li),h=t._pointSnapper.snap(u,s,a);h&&s.addIntersection(o[a],a)}},hi.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new mf,this._pointSnapper=new Na(this._noder.getIndex()),this.snapRound(t,this._li)},hi.prototype.computeIntersectionSnaps=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=new ar(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},hi.prototype.interfaces_=function(){return[Rs]},hi.prototype.getClass=function(){return hi};var Re=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new zt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},xa={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Re.prototype.bufferFixedPrecision=function(t){var e=new os(new hi(new Ut(1)),t.getScale()),n=new Qe(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},Re.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=Re.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Di)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],i=Re.precisionScaleFactor(this._argGeom,this._distance,n),s=new Ut(i);this.bufferFixedPrecision(s)}},Re.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ut.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},Re.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},Re.prototype.bufferOriginalPrecision=function(){try{var t=new Qe(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof bi)this._saveException=e;else throw e}finally{}},Re.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},Re.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},Re.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Re(t),i=n.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Re(s);u.setQuadrantSegments(a);var h=u.getResultGeometry(o);return h}else if(arguments[2]instanceof zt&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var l=arguments[0],c=arguments[1],f=arguments[2],p=new Re(l,f),v=p.getResultGeometry(c);return v}}else if(arguments.length===4){var w=arguments[0],E=arguments[1],I=arguments[2],y=arguments[3],_=new Re(w);_.setQuadrantSegments(I),_.setEndCapStyle(y);var m=_.getResultGeometry(E);return m}},Re.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),s=Ar.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),h=n-u,l=Math.pow(10,h);return l},xa.CAP_ROUND.get=function(){return zt.CAP_ROUND},xa.CAP_BUTT.get=function(){return zt.CAP_FLAT},xa.CAP_FLAT.get=function(){return zt.CAP_FLAT},xa.CAP_SQUARE.get=function(){return zt.CAP_SQUARE},xa.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Re,xa);var Ke=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};Ke.prototype.getCoordinates=function(){return this._pt},Ke.prototype.getCoordinate=function(t){return this._pt[t]},Ke.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},Ke.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ke.prototype.getDistance=function(){return this._distance},Ke.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var li=function(){};li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li},li.computeDistance=function(){if(arguments[2]instanceof Ke&&arguments[0]instanceof le&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),s=new ut,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof Ke&&arguments[0]instanceof Pe&&arguments[1]instanceof D){var u=arguments[0],h=arguments[1],l=arguments[2];li.computeDistance(u.getExteriorRing(),h,l);for(var c=0;c<u.getNumInteriorRing();c++)li.computeDistance(u.getInteriorRingN(c),h,l)}else if(arguments[2]instanceof Ke&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],p=arguments[1],v=arguments[2];if(f instanceof le)li.computeDistance(f,p,v);else if(f instanceof Pe)li.computeDistance(f,p,v);else if(f instanceof Ye)for(var w=f,E=0;E<w.getNumGeometries();E++){var I=w.getGeometryN(E);li.computeDistance(I,p,v)}else v.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof Ke&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],_=arguments[1],m=arguments[2],S=y.closestPoint(_);m.setMinimum(S,_)}};var Vs=function(t){this._maxPtDist=new Ke,this._inputGeom=t||null},yf={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Vs.prototype.computeMaxMidpointDistance=function(t){var e=new as(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Vs.prototype.computeMaxVertexDistance=function(t){var e=new Co(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Vs.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},Vs.prototype.getDistancePoints=function(){return this._maxPtDist},Vs.prototype.interfaces_=function(){return[]},Vs.prototype.getClass=function(){return Vs},yf.MaxPointDistanceFilter.get=function(){return Co},yf.MaxMidpointDistanceFilter.get=function(){return as},Object.defineProperties(Vs,yf);var Co=function(t){this._maxPtDist=new Ke,this._minPtDist=new Ke,this._geom=t||null};Co.prototype.filter=function(t){this._minPtDist.initialize(),li.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Co.prototype.getMaxPointDistance=function(){return this._maxPtDist},Co.prototype.interfaces_=function(){return[ri]},Co.prototype.getClass=function(){return Co};var as=function(t){this._maxPtDist=new Ke,this._minPtDist=new Ke,this._geom=t||null};as.prototype.filter=function(t,e){if(e===0)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new D((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),li.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},as.prototype.isDone=function(){return!1},as.prototype.isGeometryChanged=function(){return!1},as.prototype.getMaxPointDistance=function(){return this._maxPtDist},as.prototype.interfaces_=function(){return[un]},as.prototype.getClass=function(){return as};var Gi=function(t){this._comps=t||null};Gi.prototype.filter=function(t){t instanceof Pe&&this._comps.add(t)},Gi.prototype.interfaces_=function(){return[In]},Gi.prototype.getClass=function(){return Gi},Gi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return Gi.getPolygons(t,new j)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Pe?n.add(e):e instanceof Ye&&e.apply(new Gi(n)),n}};var Fe=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Fe.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ni){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof le&&this._lines.add(t)},Fe.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Fe.prototype.interfaces_=function(){return[Ni]},Fe.prototype.getClass=function(){return Fe},Fe.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(Fe.getLines(t))}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Fe.getLines(e,n))}},Fe.getLines=function(){if(arguments.length===1){var t=arguments[0];return Fe.getLines(t,!1)}else if(arguments.length===2){if(pt(arguments[0],Ce)&&pt(arguments[1],Ce)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();Fe.getLines(s,n)}return n}else if(arguments[0]instanceof gt&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new j;return o.apply(new Fe(u,a)),u}else if(arguments[0]instanceof gt&&pt(arguments[1],Ce)){var h=arguments[0],l=arguments[1];return h instanceof le?l.add(h):h.apply(new Fe(l)),l}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&pt(arguments[0],Ce)&&pt(arguments[1],Ce)){for(var c=arguments[0],f=arguments[1],p=arguments[2],v=c.iterator();v.hasNext();){var w=v.next();Fe.getLines(w,f,p)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof gt&&pt(arguments[1],Ce)){var E=arguments[0],I=arguments[1],y=arguments[2];return E.apply(new Fe(I,y)),I}}};var fn=function(){if(this._boundaryRule=Hr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new se("Rule must be non-null");this._boundaryRule=t}}};fn.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof D&&arguments[1]instanceof Pe){var e=arguments[0],n=arguments[1];if(n.isEmpty())return F.EXTERIOR;var i=n.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===F.EXTERIOR)return F.EXTERIOR;if(s===F.BOUNDARY)return F.BOUNDARY;for(var o=0;o<n.getNumInteriorRing();o++){var a=n.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===F.INTERIOR)return F.EXTERIOR;if(u===F.BOUNDARY)return F.BOUNDARY}return F.INTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof le){var h=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(h))return F.EXTERIOR;var c=l.getCoordinates();return!l.isClosed()&&(h.equals(c[0])||h.equals(c[c.length-1]))?F.BOUNDARY:K.isOnLine(h,c)?F.INTERIOR:F.EXTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof vr){var f=arguments[0],p=arguments[1],v=p.getCoordinate();return v.equals2D(f)?F.INTERIOR:F.EXTERIOR}},fn.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?K.locatePointInRing(t,e.getCoordinates()):F.EXTERIOR},fn.prototype.intersects=function(t,e){return this.locate(t,e)!==F.EXTERIOR},fn.prototype.updateLocationInfo=function(t){t===F.INTERIOR&&(this._isIn=!0),t===F.BOUNDARY&&this._numBoundaries++},fn.prototype.computeLocation=function(t,e){var n=this;if(e instanceof vr&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof le)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Pe)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ls)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);n.updateLocationInfo(n.locateInternal(t,o))}else if(e instanceof ii)for(var a=e,u=0;u<a.getNumGeometries();u++){var h=a.getGeometryN(u);n.updateLocationInfo(n.locateInternal(t,h))}else if(e instanceof Ye)for(var l=new ai(e);l.hasNext();){var c=l.next();c!==e&&n.computeLocation(t,c)}},fn.prototype.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:e instanceof le?this.locateInternal(t,e):e instanceof Pe?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?F.BOUNDARY:this._numBoundaries>0||this._isIn?F.INTERIOR:F.EXTERIOR)},fn.prototype.interfaces_=function(){return[]},fn.prototype.getClass=function(){return fn};var $e=function r(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];r.call(this,t,r.INSIDE_AREA,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._component=n,this._segIndex=i,this._pt=s}},ov={INSIDE_AREA:{configurable:!0}};$e.prototype.isInsideArea=function(){return this._segIndex===$e.INSIDE_AREA},$e.prototype.getCoordinate=function(){return this._pt},$e.prototype.getGeometryComponent=function(){return this._component},$e.prototype.getSegmentIndex=function(){return this._segIndex},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e},ov.INSIDE_AREA.get=function(){return-1},Object.defineProperties($e,ov);var us=function(t){this._pts=t||null};us.prototype.filter=function(t){t instanceof vr&&this._pts.add(t)},us.prototype.interfaces_=function(){return[In]},us.prototype.getClass=function(){return us},us.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof vr?ln.singletonList(t):us.getPoints(t,new j)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof vr?n.add(e):e instanceof Ye&&e.apply(new us(n)),n}};var Po=function(){this._locations=null;var t=arguments[0];this._locations=t};Po.prototype.filter=function(t){(t instanceof vr||t instanceof le||t instanceof Pe)&&this._locations.add(new $e(t,0,t.getCoordinate()))},Po.prototype.interfaces_=function(){return[In]},Po.prototype.getClass=function(){return Po},Po.getLocations=function(t){var e=new j;return t.apply(new Po(e)),e};var Ge=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new fn,this._minDistanceLocation=null,this._minDistance=yt.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=s}};Ge.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=1-n,o=Gi.getPolygons(this._geom[n]);if(o.size()>0){var a=Po.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[n]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&pt(arguments[0],on)&&pt(arguments[1],on)){for(var u=arguments[0],h=arguments[1],l=arguments[2],c=0;c<u.size();c++)for(var f=u.get(c),p=0;p<h.size();p++)if(t.computeContainmentDistance(f,h.get(p),l),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof $e&&arguments[1]instanceof Pe){var v=arguments[0],w=arguments[1],E=arguments[2],I=v.getCoordinate();if(F.EXTERIOR!==this._ptLocator.locate(I,w))return this._minDistance=0,E[0]=v,E[1]=new $e(w,I),null}}},Ge.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,n),i._minDistance<=i._terminateDistance)return null}},Ge.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Fe.getLines(this._geom[0]),n=Fe.getLines(this._geom[1]),i=us.getPoints(this._geom[0]),s=us.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},Ge.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Ge.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Ge.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},Ge.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof le&&arguments[1]instanceof vr){var e=arguments[0],n=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=n.getCoordinate(),a=0;a<s.length-1;a++){var u=K.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var h=new ut(s[a],s[a+1]),l=h.closestPoint(o);i[0]=new $e(e,a,l),i[1]=new $e(n,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof le&&arguments[1]instanceof le){var c=arguments[0],f=arguments[1],p=arguments[2];if(c.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var v=c.getCoordinates(),w=f.getCoordinates(),E=0;E<v.length-1;E++)for(var I=0;I<w.length-1;I++){var y=K.distanceLineLine(v[E],v[E+1],w[I],w[I+1]);if(y<t._minDistance){t._minDistance=y;var _=new ut(v[E],v[E+1]),m=new ut(w[I],w[I+1]),S=_.closestPoints(m);p[0]=new $e(c,E,S[0]),p[1]=new $e(f,I,S[1])}if(t._minDistance<=t._terminateDistance)return null}}}},Ge.prototype.computeMinDistancePoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),h=o.getCoordinate().distance(u.getCoordinate());if(h<i._minDistance&&(i._minDistance=h,n[0]=new $e(o,0,o.getCoordinate()),n[1]=new $e(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},Ge.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new se("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Ge.prototype.computeMinDistanceLines=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,n),i._minDistance<=i._terminateDistance)return null}},Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge},Ge.distance=function(t,e){var n=new Ge(t,e);return n.distance()},Ge.isWithinDistance=function(t,e,n){var i=new Ge(t,e,n);return i.distance()<=n},Ge.nearestPoints=function(t,e){var n=new Ge(t,e);return n.nearestPoints()};var He=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};He.prototype.getCoordinates=function(){return this._pt},He.prototype.getCoordinate=function(t){return this._pt[t]},He.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},He.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},He.prototype.toString=function(){return sn.toLineString(this._pt[0],this._pt[1])},He.prototype.getDistance=function(){return this._distance},He.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Ln=function(){};Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln},Ln.computeDistance=function(){if(arguments[2]instanceof He&&arguments[0]instanceof le&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new ut,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof He&&arguments[0]instanceof Pe&&arguments[1]instanceof D){var u=arguments[0],h=arguments[1],l=arguments[2];Ln.computeDistance(u.getExteriorRing(),h,l);for(var c=0;c<u.getNumInteriorRing();c++)Ln.computeDistance(u.getInteriorRingN(c),h,l)}else if(arguments[2]instanceof He&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],p=arguments[1],v=arguments[2];if(f instanceof le)Ln.computeDistance(f,p,v);else if(f instanceof Pe)Ln.computeDistance(f,p,v);else if(f instanceof Ye)for(var w=f,E=0;E<w.getNumGeometries();E++){var I=w.getGeometryN(E);Ln.computeDistance(I,p,v)}else v.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof He&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],_=arguments[1],m=arguments[2],S=y.closestPoint(_);m.setMinimum(S,_)}};var Qr=function(){this._g0=null,this._g1=null,this._ptDist=new He,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},_f={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Qr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Qr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new se("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Qr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Qr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Qr.prototype.computeOrientedDistance=function(t,e,n){var i=new Io(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new hs(e,this._densifyFrac);t.apply(s),n.setMaximum(s.getMaxPointDistance())}},Qr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},Qr.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Qr(t,e);return n.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new Qr(i,s);return a.setDensifyFraction(o),a.distance()}},_f.MaxPointDistanceFilter.get=function(){return Io},_f.MaxDensifiedByFractionDistanceFilter.get=function(){return hs},Object.defineProperties(Qr,_f);var Io=function(){this._maxPtDist=new He,this._minPtDist=new He,this._euclideanDist=new Ln,this._geom=null;var t=arguments[0];this._geom=t};Io.prototype.filter=function(t){this._minPtDist.initialize(),Ln.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Io.prototype.getMaxPointDistance=function(){return this._maxPtDist},Io.prototype.interfaces_=function(){return[ri]},Io.prototype.getClass=function(){return Io};var hs=function(){this._maxPtDist=new He,this._minPtDist=new He,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};hs.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var h=i.x+u*o,l=i.y+u*a,c=new D(h,l);n._minPtDist.initialize(),Ln.computeDistance(n._geom,c,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},hs.prototype.isDone=function(){return!1},hs.prototype.isGeometryChanged=function(){return!1},hs.prototype.getMaxPointDistance=function(){return this._maxPtDist},hs.prototype.interfaces_=function(){return[un]},hs.prototype.getClass=function(){return hs};var _r=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},wf={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};_r.prototype.checkMaximumDistance=function(t,e,n){var i=new Qr(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+sn.toLineString(s[0],s[1])+")"}},_r.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=_r.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),_r.VERBOSE&&De.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},_r.prototype.checkNegativeValid=function(){if(!(this._input instanceof Pe||this._input instanceof ii||this._input instanceof Ye))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},_r.prototype.getErrorIndicator=function(){return this._errorIndicator},_r.prototype.checkMinimumDistance=function(t,e,n){var i=new Ge(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+sn.toLineString(s[0],s[1])+" )"}},_r.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},_r.prototype.getErrorLocation=function(){return this._errorLocation},_r.prototype.getPolygonLines=function(t){for(var e=new j,n=new Fe(e),i=Gi.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(n)}return t.getFactory().buildGeometry(e)},_r.prototype.getErrorMessage=function(){return this._errMsg},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r},wf.VERBOSE.get=function(){return!1},wf.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(_r,wf);var ke=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},Ef={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ke.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},ke.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*ke.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new at(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new at(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},ke.prototype.checkDistance=function(){var t=new _r(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},ke.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ke.prototype.checkPolygonal=function(){this._result instanceof Pe||this._result instanceof ii||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ke.prototype.getErrorIndicator=function(){return this._errorIndicator},ke.prototype.getErrorLocation=function(){return this._errorLocation},ke.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},ke.prototype.report=function(t){if(!ke.VERBOSE)return null;De.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},ke.prototype.getErrorMessage=function(){return this._errorMsg},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.isValidMsg=function(t,e,n){var i=new ke(t,e,n);return i.isValid()?null:i.getErrorMessage()},ke.isValid=function(t,e,n){var i=new ke(t,e,n);return!!i.isValid()},Ef.VERBOSE.get=function(){return!1},Ef.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(ke,Ef);var Rn=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Rn.prototype.getCoordinates=function(){return this._pts},Rn.prototype.size=function(){return this._pts.length},Rn.prototype.getCoordinate=function(t){return this._pts[t]},Rn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Rn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:_o.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Rn.prototype.setData=function(t){this._data=t},Rn.prototype.getData=function(){return this._data},Rn.prototype.toString=function(){return sn.toLineString(new ge(this._pts))},Rn.prototype.interfaces_=function(){return[oi]},Rn.prototype.getClass=function(){return Rn};var xe=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new j,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};xe.prototype.getInteriorIntersection=function(){return this._interiorIntersection},xe.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},xe.prototype.getIntersectionSegments=function(){return this._intSegments},xe.prototype.count=function(){return this._intersectionCount},xe.prototype.getIntersections=function(){return this._intersections},xe.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},xe.prototype.setKeepIntersections=function(t){this._keepIntersections=t},xe.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(n,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=n.getCoordinates()[i],h=n.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,h),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=h,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},xe.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},xe.prototype.hasIntersection=function(){return this._interiorIntersection!==null},xe.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},xe.prototype.interfaces_=function(){return[Gs]},xe.prototype.getClass=function(){return xe},xe.createAllIntersectionsFinder=function(t){var e=new xe(t);return e.setFindAllIntersections(!0),e},xe.createAnyIntersectionFinder=function(t){return new xe(t)},xe.createIntersectionCounter=function(t){var e=new xe(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var dn=function(){this._li=new As,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};dn.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},dn.prototype.getIntersections=function(){return this._segInt.getIntersections()},dn.prototype.isValid=function(){return this.execute(),this._isValid},dn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},dn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new xe(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new mf;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},dn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Di(this.getErrorMessage(),this._segInt.getInteriorIntersection())},dn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+sn.toLineString(t[0],t[1])+" and "+sn.toLineString(t[2],t[3])},dn.prototype.interfaces_=function(){return[]},dn.prototype.getClass=function(){return dn},dn.computeIntersections=function(t){var e=new dn(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Us=function r(){this._nv=null;var t=arguments[0];this._nv=new dn(r.toSegmentStrings(t))};Us.prototype.checkValid=function(){this._nv.checkValid()},Us.prototype.interfaces_=function(){return[]},Us.prototype.getClass=function(){return Us},Us.toSegmentStrings=function(t){for(var e=new j,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Rn(i.getCoordinates(),i))}return e},Us.checkValid=function(t){var e=new Us(t);e.checkValid()};var Mo=function(t){this._mapOp=t};Mo.prototype.map=function(t){for(var e=this,n=new j,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||n.add(s)}return t.getFactory().createGeometryCollection(xt.toGeometryArray(n))},Mo.prototype.interfaces_=function(){return[]},Mo.prototype.getClass=function(){return Mo},Mo.map=function(t,e){var n=new Mo(e);return n.map(t)};var Fn=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new j,this._resultLineList=new j;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Fn.prototype.collectLines=function(t){for(var e=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var i=n.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},Fn.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Fn.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Fn.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&St.isResultOfOp(i,e)&&!s.isCovered()&&(n.add(s),t.setVisitedEdge(!0))},Fn.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();n.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},Fn.prototype.labelIsolatedLines=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},Fn.prototype.buildLines=function(t){for(var e=this,n=this._lineEdgesList.iterator();n.hasNext();){var i=n.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},Fn.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;Pt.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),St.isResultOfOp(i,e)&&e===St.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))},Fn.prototype.interfaces_=function(){return[]},Fn.prototype.getClass=function(){return Fn};var bo=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new j;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};bo.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},bo.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===St.INTERSECTION)){var s=i.getLabel();St.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},bo.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},bo.prototype.interfaces_=function(){return[]},bo.prototype.getClass=function(){return bo};var ur=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};ur.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},ur.prototype.transformPolygon=function(t,e){var n=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof ni)||s.isEmpty())&&(i=!1);for(var o=new j,a=0;a<t.getNumInteriorRing();a++){var u=n.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof ni||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var h=new j;return s!==null&&h.add(s),h.addAll(o),this._factory.buildGeometry(h)},ur.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},ur.prototype.getInputGeometry=function(){return this._inputGeom},ur.prototype.transformMultiLineString=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ur.prototype.transformCoordinates=function(t,e){return this.copy(t)},ur.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},ur.prototype.transformMultiPoint=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ur.prototype.transformMultiPolygon=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ur.prototype.copy=function(t){return t.copy()},ur.prototype.transformGeometryCollection=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transform(t.getGeometryN(s));o!==null&&(n._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(xt.toGeometryArray(i)):this._factory.buildGeometry(i)},ur.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof vr)return this.transformPoint(t,null);if(t instanceof Ca)return this.transformMultiPoint(t,null);if(t instanceof ni)return this.transformLinearRing(t,null);if(t instanceof le)return this.transformLineString(t,null);if(t instanceof Ls)return this.transformMultiLineString(t,null);if(t instanceof Pe)return this.transformPolygon(t,null);if(t instanceof ii)return this.transformMultiPolygon(t,null);if(t instanceof Ye)return this.transformGeometryCollection(t,null);throw new se("Unknown Geometry subtype: "+t.getClass().getName())},ur.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(n===null)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur};var ci=function r(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new ut,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof le&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];r.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=r.isClosed(n),this._snapTolerance=i}};ci.prototype.snapVertices=function(t,e){for(var n=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=n.findSnapForVertex(o,e);a!==null&&(t.set(s,new D(a)),s===0&&n._isClosed&&t.set(t.size()-1,new D(a)))}},ci.prototype.findSnapForVertex=function(t,e){for(var n=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<n._snapTolerance)return e[i]}return null},ci.prototype.snapTo=function(t){var e=new $u(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var n=e.toCoordinateArray();return n},ci.prototype.snapSegments=function(t,e){var n=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=n.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new D(o),!1)}},ci.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,i=yt.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(n._seg.p0=e.get(o),n._seg.p1=e.get(o+1),n._seg.p0.equals2D(t)||n._seg.p1.equals2D(t)){if(n._allowSnappingToSourceVertices)continue;return-1}var a=n._seg.distance(t);a<n._snapTolerance&&a<i&&(i=a,s=o)}return s},ci.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},ci.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var ve=function(t){this._srcGeom=t||null},av={SNAP_PRECISION_FACTOR:{configurable:!0}};ve.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t),i=new uv(e,n);return i.transform(this._srcGeom)},ve.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new uv(t,n,!0),s=i.transform(this._srcGeom),o=s;return e&&pt(o,rs)&&(o=s.buffer(0)),o},ve.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),n=e/10;return n},ve.prototype.extractTargetCoordinates=function(t){for(var e=new Pn,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},ve.prototype.computeMinimumSegmentLength=function(t){for(var e=yt.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},ve.prototype.interfaces_=function(){return[]},ve.prototype.getClass=function(){return ve},ve.snap=function(t,e,n){var i=new Array(2).fill(null),s=new ve(t);i[0]=s.snapTo(e,n);var o=new ve(e);return i[1]=o.snapTo(i[0],n),i},ve.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=ve.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===Ut.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(ve.computeOverlaySnapTolerance(s),ve.computeOverlaySnapTolerance(o))}},ve.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),i=n*ve.SNAP_PRECISION_FACTOR;return i},ve.snapToSelf=function(t,e,n){var i=new ve(t);return i.snapToSelf(e,n)},av.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(ve,av);var uv=function(r){function t(e,n,i){r.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=i!==void 0?i:!1}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(n,i){var s=new ci(n,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(n,i){var s=n.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ur),Ze=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Ze.prototype.getCommon=function(){return yt.longBitsToDouble(this._commonBits)},Ze.prototype.add=function(t){var e=yt.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Ze.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Ze.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Ze.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Ze.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},Ze.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=yt.longBitsToDouble(t),n=yt.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+n,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze},Ze.getBit=function(t,e){var n=1<<e;return(t&n)!==0?1:0},Ze.signExpBits=function(t){return t>>52},Ze.zeroLowerBits=function(t,e){var n=(1<<e)-1,i=~n,s=t&i;return s},Ze.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if(Ze.getBit(t,i)!==Ze.getBit(e,i))return n;n++}return 52};var ls=function(){this._commonCoord=null,this._ccFilter=new No},Sf={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ls.prototype.addCommonBits=function(t){var e=new cs(this._commonCoord);t.apply(e),t.geometryChanged()},ls.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new D(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new cs(e);return t.apply(n),t.geometryChanged(),t},ls.prototype.getCommonCoordinate=function(){return this._commonCoord},ls.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ls.prototype.interfaces_=function(){return[]},ls.prototype.getClass=function(){return ls},Sf.CommonCoordinateFilter.get=function(){return No},Sf.Translater.get=function(){return cs},Object.defineProperties(ls,Sf);var No=function(){this._commonBitsX=new Ze,this._commonBitsY=new Ze};No.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},No.prototype.getCommonCoordinate=function(){return new D(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},No.prototype.interfaces_=function(){return[ri]},No.prototype.getClass=function(){return No};var cs=function(){this.trans=null;var t=arguments[0];this.trans=t};cs.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},cs.prototype.isDone=function(){return!1},cs.prototype.isGeometryChanged=function(){return!0},cs.prototype.interfaces_=function(){return[un]},cs.prototype.getClass=function(){return cs};var Te=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Te.prototype.selfSnap=function(t){var e=new ve(t),n=e.snapTo(t,this._snapTolerance);return n},Te.prototype.removeCommonBits=function(t){this._cbr=new ls,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},Te.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},Te.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=St.overlayOp(e[0],e[1],t);return this.prepareResult(n)},Te.prototype.checkValid=function(t){t.isValid()||De.out.println("Snapped geometry is invalid")},Te.prototype.computeSnapTolerance=function(){this._snapTolerance=ve.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Te.prototype.snap=function(t){var e=this.removeCommonBits(t),n=ve.snap(e[0],e[1],this._snapTolerance);return n},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te},Te.overlayOp=function(t,e,n){var i=new Te(t,e);return i.getResultGeometry(n)},Te.union=function(t,e){return Te.overlayOp(t,e,St.UNION)},Te.intersection=function(t,e){return Te.overlayOp(t,e,St.INTERSECTION)},Te.symDifference=function(t,e){return Te.overlayOp(t,e,St.SYMDIFFERENCE)},Te.difference=function(t,e){return Te.overlayOp(t,e,St.DIFFERENCE)};var tr=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};tr.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=St.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(n=!0)}catch(o){if(o instanceof bi)i=o;else throw o}finally{}if(!n)try{e=Te.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof bi?i:o}finally{}return e},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},tr.overlayOp=function(t,e,n){var i=new tr(t,e);return i.getResultGeometry(n)},tr.union=function(t,e){return tr.overlayOp(t,e,St.UNION)},tr.intersection=function(t,e){return tr.overlayOp(t,e,St.INTERSECTION)},tr.symDifference=function(t,e){return tr.overlayOp(t,e,St.SYMDIFFERENCE)},tr.difference=function(t,e){return tr.overlayOp(t,e,St.DIFFERENCE)};var dh=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};dh.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},dh.prototype.interfaces_=function(){return[]},dh.prototype.getClass=function(){return dh};var wr=function r(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=r.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._eventType=r.INSERT,this._label=n,this._xValue=i,this._obj=s}},Cf={INSERT:{configurable:!0},DELETE:{configurable:!0}};wr.prototype.isDelete=function(){return this._eventType===wr.DELETE},wr.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},wr.prototype.getObject=function(){return this._obj},wr.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},wr.prototype.getInsertEvent=function(){return this._insertEvent},wr.prototype.isInsert=function(){return this._eventType===wr.INSERT},wr.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},wr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},wr.prototype.interfaces_=function(){return[Wr]},wr.prototype.getClass=function(){return wr},Cf.INSERT.get=function(){return 1},Cf.DELETE.get=function(){return 2},Object.defineProperties(wr,Cf);var Ml=function(){};Ml.prototype.interfaces_=function(){return[]},Ml.prototype.getClass=function(){return Ml};var Ve=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};Ve.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(Ve.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Ve.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ve.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ve.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ve.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},Ve.prototype.hasProperIntersection=function(){return this._hasProper},Ve.prototype.hasIntersection=function(){return this._hasIntersection},Ve.prototype.isDone=function(){return this._isDone},Ve.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},Ve.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ve.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var DP=function(r){function t(){r.call(this),this.events=new j,this.nOverlaps=null}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var n=this;ln.sort(this.events);for(var i=0;i<this.events.size();i++){var s=n.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var n=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=n.events.get(s);if(o.isInsert()&&n.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ve&&pt(arguments[0],on)&&pt(arguments[1],on)){var a=arguments[0],u=arguments[1],h=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(h)}else if(typeof arguments[2]=="boolean"&&pt(arguments[0],on)&&arguments[1]instanceof Ve){var l=arguments[0],c=arguments[1],f=arguments[2];f?this.addEdges(l,null):this.addEdges(l),this.computeIntersections(c)}}},t.prototype.addEdge=function(n,i){for(var s=this,o=n.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var h=new dh(o,u),l=new wr(i,o.getMinX(u),h);s.events.add(l),s.events.add(new wr(o.getMaxX(u),l))}},t.prototype.processOverlaps=function(n,i,s,o){for(var a=this,u=s.getObject(),h=n;h<i;h++){var l=a.events.get(h);if(l.isInsert()){var c=l.getObject();s.isSameLabel(l)||(u.computeIntersections(c,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var n=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();n.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],h=a.iterator();h.hasNext();){var l=h.next();n.addEdge(l,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ml),fi=function(){this._min=yt.POSITIVE_INFINITY,this._max=yt.NEGATIVE_INFINITY},hv={NodeComparator:{configurable:!0}};fi.prototype.getMin=function(){return this._min},fi.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},fi.prototype.getMax=function(){return this._max},fi.prototype.toString=function(){return sn.toLineString(new D(this._min,0),new D(this._max,0))},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},hv.NodeComparator.get=function(){return gh},Object.defineProperties(fi,hv);var gh=function(){};gh.prototype.compare=function(t,e){var n=t,i=e,s=(n._min+n._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},gh.prototype.interfaces_=function(){return[fa]},gh.prototype.getClass=function(){return gh};var LP=function(r){function t(){r.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),RP=function(r){function t(){r.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(n,i){this._min=Math.min(n._min,i._min),this._max=Math.max(n._max,i._max)},t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;this._node1!==null&&this._node1.query(n,i,s),this._node2!==null&&this._node2.query(n,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),di=function(){this._leaves=new j,this._root=null,this._level=0};di.prototype.buildTree=function(){var t=this;ln.sort(this._leaves,new fi.NodeComparator);for(var e=this._leaves,n=null,i=new j;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);n=e,e=i,i=n}},di.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new LP(t,e,n))},di.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},di.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},di.prototype.printNode=function(t){De.out.println(sn.toLineString(new D(t._min,this._level),new D(t._max,this._level)))},di.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},di.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n),s=n+1<t.size()?t.get(n):null;if(s===null)e.add(i);else{var o=new RP(t.get(n),t.get(n+1));e.add(o)}}},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di};var Ta=function(){this._items=new j};Ta.prototype.visitItem=function(t){this._items.add(t)},Ta.prototype.getItems=function(){return this._items},Ta.prototype.interfaces_=function(){return[ns]},Ta.prototype.getClass=function(){return Ta};var Aa=function(){this._index=null;var t=arguments[0];if(!pt(t,rs))throw new se("Argument must be Polygonal");this._index=new zs(t)},Pf={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Aa.prototype.locate=function(t){var e=new Cn(t),n=new Oa(e);return this._index.query(t.y,t.y,n),e.getLocation()},Aa.prototype.interfaces_=function(){return[ba]},Aa.prototype.getClass=function(){return Aa},Pf.SegmentVisitor.get=function(){return Oa},Pf.IntervalIndexedGeometry.get=function(){return zs},Object.defineProperties(Aa,Pf);var Oa=function(){this._counter=null;var t=arguments[0];this._counter=t};Oa.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Oa.prototype.interfaces_=function(){return[ns]},Oa.prototype.getClass=function(){return Oa};var zs=function(){this._index=new di;var t=arguments[0];this.init(t)};zs.prototype.init=function(t){for(var e=this,n=Fe.getLines(t),i=n.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},zs.prototype.addLine=function(t){for(var e=this,n=1;n<t.length;n++){var i=new ut(t[n-1],t[n]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},zs.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Ta;return this._index.query(t,e,n),n.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},zs.prototype.interfaces_=function(){return[]},zs.prototype.getClass=function(){return zs};var ph=function(r){function t(){if(r.call(this),this._parentGeom=null,this._lineEdgeMap=new X0,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new fn,arguments.length===2){var e=arguments[0],n=arguments[1],i=Hr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,n!==null&&this.add(n)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(n,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=F.NONE;u=o.getLocation(n,B.ON),u===F.BOUNDARY&&a++;var h=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(n,h)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.computeSelfNodes(n,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Ve(s,!0,!1);u.setIsDoneIfProperInt(a);var h=this.createEdgeSetIntersector(),l=this._parentGeom instanceof ni||this._parentGeom instanceof Pe||this._parentGeom instanceof ii,c=o||!l;return h.computeIntersections(this._edges,u,c),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(n){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(n)}},t.prototype.computeEdgeIntersections=function(n,i,s){var o=new Ve(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),n.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,n._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof vr){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,F.INTERIOR)}else if(arguments[0]instanceof D){var s=arguments[0];this.insertPoint(this._argIndex,s,F.INTERIOR)}},t.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),F.EXTERIOR,F.INTERIOR);for(var s=0;s<n.getNumInteriorRing();s++){var o=n.getInteriorRingN(s);i.addPolygonRing(o,F.INTERIOR,F.EXTERIOR)}},t.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],F.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],F.BOUNDARY)},t.prototype.addLineString=function(n){var i=Nt.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Il(i,new Yt(this._argIndex,F.INTERIOR));this._lineEdgeMap.put(n,s),this.insertEdge(s),Pt.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),i=new Array(n.size()).fill(null),s=0,o=n.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(n,i,s){if(this.isBoundaryNode(n,i))return null;s===F.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,i):this.insertPoint(n,i,s)},t.prototype.addPolygonRing=function(n,i,s){if(n.isEmpty())return null;var o=Nt.removeRepeatedPoints(n.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;K.isCCW(o)&&(a=s,u=i);var h=new Il(o,new Yt(this._argIndex,F.BOUNDARY,a,u));this._lineEdgeMap.put(n,h),this.insertEdge(h),this.insertPoint(this._argIndex,o[0],F.BOUNDARY)},t.prototype.insertPoint=function(n,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Yt(n,s):a.setLocation(n,s)},t.prototype.createEdgeSetIntersector=function(){return new DP},t.prototype.addSelfIntersectionNodes=function(n){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(n),u=o.eiList.iterator();u.hasNext();){var h=u.next();i.addSelfIntersectionNode(n,h.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof ii&&(this._useBoundaryDeterminationRule=!1),n instanceof Pe)this.addPolygon(n);else if(n instanceof le)this.addLineString(n);else if(n instanceof vr)this.addPoint(n);else if(n instanceof Ca)this.addCollection(n);else if(n instanceof Ls)this.addCollection(n);else if(n instanceof ii)this.addCollection(n);else if(n instanceof Ye)this.addCollection(n);else throw new Error(n.getClass().getName())}else return r.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(n){for(var i=this,s=0;s<n.getNumGeometries();s++){var o=n.getGeometryN(s);i.add(o)}},t.prototype.locate=function(n){return pt(this._parentGeom,rs)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Aa(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return r.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(n,i){return n.isInBoundary(i)?F.BOUNDARY:F.INTERIOR},t}(he),Da=function(){if(this._li=new As,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new ph(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=Hr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ph(0,e,i),this._arg[1]=new ph(1,n,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ph(0,s,a),this._arg[1]=new ph(1,o,a)}};Da.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Da.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Da.prototype.interfaces_=function(){return[]},Da.prototype.getClass=function(){return Da};var qs=function(){};qs.prototype.interfaces_=function(){return[]},qs.prototype.getClass=function(){return qs},qs.map=function(){if(arguments[0]instanceof gt&&pt(arguments[1],qs.MapOp)){for(var t=arguments[0],e=arguments[1],n=new j,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&n.add(s)}return t.getFactory().buildGeometry(n)}else if(pt(arguments[0],Ce)&&pt(arguments[1],qs.MapOp)){for(var o=arguments[0],a=arguments[1],u=new j,h=o.iterator();h.hasNext();){var l=h.next(),c=a.map(l);c!==null&&u.add(c)}return u}},qs.MapOp=function(){};var St=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n),this._ptLocator=new fn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new cn,this._resultPolyList=new j,this._resultLineList=new j,this._resultPointList=new j,this._graph=new he(new tv),this._geomFact=e.getFactory()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(n){var i=this._edgeList.findEqualEdge(n);if(i!==null){var s=i.getLabel(),o=n.getLabel();i.isPointwiseEqual(n)||(o=new Yt(n.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(n)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(n){return!!(this.isCovered(n,this._resultLineList)||this.isCovered(n,this._resultPolyList))},t.prototype.computeGeometry=function(n,i,s,o){var a=new j;return a.addAll(n),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(n,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(n,a);if(u!==F.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var n=new j,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),n.add(s.getCollapsedEdge()))}this._edgeList.addAll(n)},t.prototype.updateNodeLabelling=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(n){return this.computeOverlay(n),this._resultGeom},t.prototype.insertUniqueEdges=function(n){for(var i=this,s=n.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(n){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new j;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Us.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var s=new mr(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new Fn(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(n);var a=new bo(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(n),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,n)},t.prototype.labelIncompleteNode=function(n,i){var s=this._ptLocator.locate(n.getCoordinate(),this._arg[i].getGeometry());n.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(n){for(var i=this,s=this._arg[n].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(n,o.getLabel().getLocation(n))}},t.prototype.findResultAreaEdges=function(n){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,B.RIGHT),o.getLocation(1,B.RIGHT),n)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var n=this._edgeList.iterator();n.hasNext();){var i=n.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(Pt.isTrue(!o.isNull(a,B.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,B.LEFT,o.getLocation(a,B.LEFT)),Pt.isTrue(!o.isNull(a,B.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,B.RIGHT,o.getLocation(a,B.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(n._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?n.labelIncompleteNode(s,0):n.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(n){return!!this.isCovered(n,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Da);St.overlayOp=function(r,t,e){var n=new St(r,t),i=n.getResultGeometry(e);return i},St.intersection=function(r,t){if(r.isEmpty()||t.isEmpty())return St.createEmptyResult(St.INTERSECTION,r,t,r.getFactory());if(r.isGeometryCollection()){var e=t;return Mo.map(r,{interfaces_:function(){return[qs.MapOp]},map:function(n){return n.intersection(e)}})}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),tr.overlayOp(r,t,St.INTERSECTION)},St.symDifference=function(r,t){if(r.isEmpty()||t.isEmpty()){if(r.isEmpty()&&t.isEmpty())return St.createEmptyResult(St.SYMDIFFERENCE,r,t,r.getFactory());if(r.isEmpty())return t.copy();if(t.isEmpty())return r.copy()}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),tr.overlayOp(r,t,St.SYMDIFFERENCE)},St.resultDimension=function(r,t,e){var n=t.getDimension(),i=e.getDimension(),s=-1;switch(r){case St.INTERSECTION:s=Math.min(n,i);break;case St.UNION:s=Math.max(n,i);break;case St.DIFFERENCE:s=n;break;case St.SYMDIFFERENCE:s=Math.max(n,i);break}return s},St.createEmptyResult=function(r,t,e,n){var i=null;switch(St.resultDimension(r,t,e)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon();break}return i},St.difference=function(r,t){return r.isEmpty()?St.createEmptyResult(St.DIFFERENCE,r,t,r.getFactory()):t.isEmpty()?r.copy():(r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),tr.overlayOp(r,t,St.DIFFERENCE))},St.isResultOfOp=function(){if(arguments.length===2){var r=arguments[0],t=arguments[1],e=r.getLocation(0),n=r.getLocation(1);return St.isResultOfOp(e,n,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===F.BOUNDARY&&(i=F.INTERIOR),s===F.BOUNDARY&&(s=F.INTERIOR),o){case St.INTERSECTION:return i===F.INTERIOR&&s===F.INTERIOR;case St.UNION:return i===F.INTERIOR||s===F.INTERIOR;case St.DIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR;case St.SYMDIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR||i!==F.INTERIOR&&s===F.INTERIOR}return!1}},St.INTERSECTION=1,St.UNION=2,St.DIFFERENCE=3,St.SYMDIFFERENCE=4;var fs=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new fn,this._seg=new ut;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};fs.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,n=0;n<this._linework.getNumGeometries();n++)for(var i=e._linework.getGeometryN(n),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},fs.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?F.BOUNDARY:this._ptLocator.locate(t,this._g)},fs.prototype.extractLinework=function(t){var e=new La;t.apply(e);var n=e.getLinework(),i=xt.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},fs.prototype.interfaces_=function(){return[]},fs.prototype.getClass=function(){return fs};var La=function(){this._linework=null,this._linework=new j};La.prototype.getLinework=function(){return this._linework},La.prototype.filter=function(t){var e=this;if(t instanceof Pe){var n=t;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)e._linework.add(n.getInteriorRingN(i))}},La.prototype.interfaces_=function(){return[In]},La.prototype.getClass=function(){return La};var Ws=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Ws.prototype.extractPoints=function(t,e,n){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,n)},Ws.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Ws.prototype.getPoints=function(t){for(var e=this,n=new j,i=Fe.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,n)}return n},Ws.prototype.computeOffsetPoints=function(t,e,n,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=n*s/a,h=n*o/a,l=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var f=new D(l-h,c+u);i.add(f)}if(this._doRight){var p=new D(l+h,c-u);i.add(p)}},Ws.prototype.interfaces_=function(){return[]},Ws.prototype.getClass=function(){return Ws};var Fr=function r(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=r.TOLERANCE,this._testCoords=new j;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=r.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,n],this._locFinder=[new fs(this._geom[0],this._boundaryDistanceTolerance),new fs(this._geom[1],this._boundaryDistanceTolerance),new fs(this._geom[2],this._boundaryDistanceTolerance)]},lv={TOLERANCE:{configurable:!0}};Fr.prototype.reportResult=function(t,e,n){De.out.println("Overlay result invalid - A:"+F.toLocationSymbol(e[0])+" B:"+F.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+F.toLocationSymbol(e[2]))},Fr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Fr.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=0;n<this._testCoords.size();n++){var i=t._testCoords.get(n);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),Fr.hasLocation(this._location,F.BOUNDARY)?!0:this.isValidResult(s,this._location)}},Fr.prototype.addTestPts=function(t){var e=new Ws(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Fr.prototype.isValidResult=function(t,e){var n=St.isResultOfOp(e[0],e[1],t),i=e[2]===F.INTERIOR,s=!(n^i);return s||this.reportResult(t,e,n),s},Fr.prototype.getInvalidLocation=function(){return this._invalidLocation},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Fr.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Fr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(ve.computeSizeBasedSnapTolerance(t),ve.computeSizeBasedSnapTolerance(e))},Fr.isValid=function(t,e,n,i){var s=new Fr(t,e,i);return s.isValid(n)},lv.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Fr,lv);var Gr=function r(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=r.extractFactory(t),this._inputGeoms=t};Gr.prototype.extractElements=function(t,e){var n=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);n._skipEmpty&&s.isEmpty()||e.add(s)}},Gr.prototype.combine=function(){for(var t=this,e=new j,n=this._inputGeoms.iterator();n.hasNext();){var i=n.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.combine=function(){if(arguments.length===1){var t=arguments[0],e=new Gr(t);return e.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Gr(Gr.createList(n,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],h=new Gr(Gr.createList(o,a,u));return h.combine()}},Gr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Gr.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new j;return n.add(t),n.add(e),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new j;return a.add(i),a.add(s),a.add(o),a}};var we=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new j)},cv={STRTREE_NODE_CAPACITY:{configurable:!0}};we.prototype.reduceToGeometries=function(t){for(var e=this,n=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=null;pt(s,on)?o=e.unionTree(s):s instanceof gt&&(o=s),n.add(o)}return n},we.prototype.extractByEnvelope=function(t,e,n){for(var i=new j,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):n.add(o)}return this._geomFactory.buildGeometry(i)},we.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i)){var s=Gr.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},we.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new J0(we.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},we.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var s=we.getGeometry(e,n);return this.unionSafe(s,null)}else{if(i-n===2)return this.unionSafe(we.getGeometry(e,n),we.getGeometry(e,n+1));var o=Math.trunc((i+n)/2),a=this.binaryUnion(e,n,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},we.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e===null?e=i.copy():e=e.union(i)}return e},we.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},we.prototype.unionActual=function(t,e){return we.restrictToPolygons(t.union(e))},we.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),n=this.binaryUnion(e);return n},we.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new j,s=this.extractByEnvelope(n,t,i),o=this.extractByEnvelope(n,e,i),a=this.unionActual(s,o);i.add(a);var u=Gr.combine(i);return u},we.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),n=e.buildGeometry(t),i=n.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),h=u.buffer(0);return h}},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we},we.restrictToPolygons=function(t){if(pt(t,rs))return t;var e=Gi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(xt.toPolygonArray(e))},we.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},we.union=function(t){var e=new we(t);return e.union()},cv.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(we,cv);var bl=function(){};bl.prototype.interfaces_=function(){return[]},bl.prototype.getClass=function(){return bl},bl.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return St.createEmptyResult(St.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),tr.overlayOp(t,e,St.UNION)};function Xs(){return new Nl}function Nl(){this.reset()}Nl.prototype={constructor:Nl,reset:function(){this.s=this.t=0},add:function(r){fv(xl,r,this.t),fv(this,xl.s,this.s),this.s?this.t+=xl.t:this.s=xl.t},valueOf:function(){return this.s}};var xl=new Nl;function fv(r,t,e){var n=r.s=t+e,i=n-t,s=n-i;r.t=t-s+(e-i)}var Ee=1e-6,jt=Math.PI,ki=jt/2,dv=jt/4,Vi=jt*2,Hs=180/jt,Gn=jt/180,er=Math.abs,FP=Math.atan,Ra=Math.atan2,Me=Math.cos,be=Math.sin,Fa=Math.sqrt;function gv(r){return r>1?0:r<-1?jt:Math.acos(r)}function xo(r){return r>1?ki:r<-1?-ki:Math.asin(r)}function vh(){}function Tl(r,t){r&&vv.hasOwnProperty(r.type)&&vv[r.type](r,t)}var pv={Feature:function(r,t){Tl(r.geometry,t)},FeatureCollection:function(r,t){for(var e=r.features,n=-1,i=e.length;++n<i;)Tl(e[n].geometry,t)}},vv={Sphere:function(r,t){t.sphere()},Point:function(r,t){r=r.coordinates,t.point(r[0],r[1],r[2])},MultiPoint:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)r=e[n],t.point(r[0],r[1],r[2])},LineString:function(r,t){If(r.coordinates,t,0)},MultiLineString:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)If(e[n],t,0)},Polygon:function(r,t){mv(r.coordinates,t)},MultiPolygon:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)mv(e[n],t)},GeometryCollection:function(r,t){for(var e=r.geometries,n=-1,i=e.length;++n<i;)Tl(e[n],t)}};function If(r,t,e){var n=-1,i=r.length-e,s;for(t.lineStart();++n<i;)s=r[n],t.point(s[0],s[1],s[2]);t.lineEnd()}function mv(r,t){var e=-1,n=r.length;for(t.polygonStart();++e<n;)If(r[e],t,1);t.polygonEnd()}function GP(r,t){r&&pv.hasOwnProperty(r.type)?pv[r.type](r,t):Tl(r,t)}Xs(),Xs();function Mf(r){return[Ra(r[1],r[0]),xo(r[2])]}function Ga(r){var t=r[0],e=r[1],n=Me(e);return[n*Me(t),n*be(t),be(e)]}function Al(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function Ol(r,t){return[r[1]*t[2]-r[2]*t[1],r[2]*t[0]-r[0]*t[2],r[0]*t[1]-r[1]*t[0]]}function bf(r,t){r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]}function Dl(r,t){return[r[0]*t,r[1]*t,r[2]*t]}function Nf(r){var t=Fa(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=t,r[1]/=t,r[2]/=t}Xs();function yv(r,t){function e(n,i){return n=r(n,i),t(n[0],n[1])}return r.invert&&t.invert&&(e.invert=function(n,i){return n=t.invert(n,i),n&&r.invert(n[0],n[1])}),e}function xf(r,t){return[r>jt?r-Vi:r<-jt?r+Vi:r,t]}xf.invert=xf;function kP(r,t,e){return(r%=Vi)?t||e?yv(wv(r),Ev(t,e)):wv(r):t||e?Ev(t,e):xf}function _v(r){return function(t,e){return t+=r,[t>jt?t-Vi:t<-jt?t+Vi:t,e]}}function wv(r){var t=_v(r);return t.invert=_v(-r),t}function Ev(r,t){var e=Me(r),n=be(r),i=Me(t),s=be(t);function o(a,u){var h=Me(u),l=Me(a)*h,c=be(a)*h,f=be(u),p=f*e+l*n;return[Ra(c*i-p*s,l*e-f*n),xo(p*i+c*s)]}return o.invert=function(a,u){var h=Me(u),l=Me(a)*h,c=be(a)*h,f=be(u),p=f*i-c*s;return[Ra(c*i+f*s,l*e+p*n),xo(p*e-l*n)]},o}function VP(r,t,e,n,i,s){if(e){var o=Me(t),a=be(t),u=n*e;i==null?(i=t+n*Vi,s=t-u/2):(i=Sv(o,i),s=Sv(o,s),(n>0?i<s:i>s)&&(i+=n*Vi));for(var h,l=i;n>0?l>s:l<s;l-=u)h=Mf([o,-a*Me(l),-a*be(l)]),r.point(h[0],h[1])}}function Sv(r,t){t=Ga(t),t[0]-=r,Nf(t);var e=gv(-t[1]);return((-t[2]<0?-e:e)+Vi-Ee)%Vi}function Cv(){var r=[],t;return{point:function(e,n){t.push([e,n])},lineStart:function(){r.push(t=[])},lineEnd:vh,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var e=r;return r=[],t=null,e}}}function UP(r,t,e,n,i,s){var o=r[0],a=r[1],u=t[0],h=t[1],l=0,c=1,f=u-o,p=h-a,v;if(v=e-o,!(!f&&v>0)){if(v/=f,f<0){if(v<l)return;v<c&&(c=v)}else if(f>0){if(v>c)return;v>l&&(l=v)}if(v=i-o,!(!f&&v<0)){if(v/=f,f<0){if(v>c)return;v>l&&(l=v)}else if(f>0){if(v<l)return;v<c&&(c=v)}if(v=n-a,!(!p&&v>0)){if(v/=p,p<0){if(v<l)return;v<c&&(c=v)}else if(p>0){if(v>c)return;v>l&&(l=v)}if(v=s-a,!(!p&&v<0)){if(v/=p,p<0){if(v>c)return;v>l&&(l=v)}else if(p>0){if(v<l)return;v<c&&(c=v)}return l>0&&(r[0]=o+l*f,r[1]=a+l*p),c<1&&(t[0]=o+c*f,t[1]=a+c*p),!0}}}}}function Ll(r,t){return er(r[0]-t[0])<Ee&&er(r[1]-t[1])<Ee}function Rl(r,t,e,n){this.x=r,this.z=t,this.o=e,this.e=n,this.v=!1,this.n=this.p=null}function Pv(r,t,e,n,i){var s=[],o=[],a,u;if(r.forEach(function(v){if(!((w=v.length-1)<=0)){var w,E=v[0],I=v[w],y;if(Ll(E,I)){for(i.lineStart(),a=0;a<w;++a)i.point((E=v[a])[0],E[1]);i.lineEnd();return}s.push(y=new Rl(E,v,null,!0)),o.push(y.o=new Rl(E,null,y,!1)),s.push(y=new Rl(I,v,null,!1)),o.push(y.o=new Rl(I,null,y,!0))}}),!!s.length){for(o.sort(t),Iv(s),Iv(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var h=s[0],l,c;;){for(var f=h,p=!0;f.v;)if((f=f.n)===h)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(a=0,u=l.length;a<u;++a)i.point((c=l[a])[0],c[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(l=f.p.z,a=l.length-1;a>=0;--a)i.point((c=l[a])[0],c[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Iv(r){if(t=r.length){for(var t,e=0,n=r[0],i;++e<t;)n.n=i=r[e],i.p=n,n=i;n.n=i=r[0],i.p=n}}function Mv(r,t){return r<t?-1:r>t?1:r>=t?0:NaN}function zP(r){return r.length===1&&(r=qP(r)),{left:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)<0?n=s+1:i=s}return n},right:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)>0?i=s:n=s+1}return n}}}function qP(r){return function(t,e){return Mv(r(t),e)}}zP(Mv);function bv(r){for(var t=r.length,e,n=-1,i=0,s,o;++n<t;)i+=r[n].length;for(s=new Array(i);--t>=0;)for(o=r[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var Fl=1e9,Gl=-1e9;function WP(r,t,e,n){function i(h,l){return r<=h&&h<=e&&t<=l&&l<=n}function s(h,l,c,f){var p=0,v=0;if(h==null||(p=o(h,c))!==(v=o(l,c))||u(h,l)<0^c>0)do f.point(p===0||p===3?r:e,p>1?n:t);while((p=(p+c+4)%4)!==v);else f.point(l[0],l[1])}function o(h,l){return er(h[0]-r)<Ee?l>0?0:3:er(h[0]-e)<Ee?l>0?2:1:er(h[1]-t)<Ee?l>0?1:0:l>0?3:2}function a(h,l){return u(h.x,l.x)}function u(h,l){var c=o(h,1),f=o(l,1);return c!==f?c-f:c===0?l[1]-h[1]:c===1?h[0]-l[0]:c===2?h[1]-l[1]:l[0]-h[0]}return function(h){var l=h,c=Cv(),f,p,v,w,E,I,y,_,m,S,C,P={point:b,lineStart:T,lineEnd:R,polygonStart:A,polygonEnd:N};function b($,J){i($,J)&&l.point($,J)}function x(){for(var $=0,J=0,st=p.length;J<st;++J)for(var G=p[J],W=1,k=G.length,U=G[0],O,q,H=U[0],et=U[1];W<k;++W)O=H,q=et,U=G[W],H=U[0],et=U[1],q<=n?et>n&&(H-O)*(n-q)>(et-q)*(r-O)&&++$:et<=n&&(H-O)*(n-q)<(et-q)*(r-O)&&--$;return $}function A(){l=c,f=[],p=[],C=!0}function N(){var $=x(),J=C&&$,st=(f=bv(f)).length;(J||st)&&(h.polygonStart(),J&&(h.lineStart(),s(null,null,1,h),h.lineEnd()),st&&Pv(f,a,$,s,h),h.polygonEnd()),l=h,f=p=v=null}function T(){P.point=V,p&&p.push(v=[]),S=!0,m=!1,y=_=NaN}function R(){f&&(V(w,E),I&&m&&c.rejoin(),f.push(c.result())),P.point=b,m&&l.lineEnd()}function V($,J){var st=i($,J);if(p&&v.push([$,J]),S)w=$,E=J,I=st,S=!1,st&&(l.lineStart(),l.point($,J));else if(st&&m)l.point($,J);else{var G=[y=Math.max(Gl,Math.min(Fl,y)),_=Math.max(Gl,Math.min(Fl,_))],W=[$=Math.max(Gl,Math.min(Fl,$)),J=Math.max(Gl,Math.min(Fl,J))];UP(G,W,r,t,e,n)?(m||(l.lineStart(),l.point(G[0],G[1])),l.point(W[0],W[1]),st||l.lineEnd(),C=!1):st&&(l.lineStart(),l.point($,J),C=!1)}y=$,_=J,m=st}return P}}var Tf=Xs();function XP(r,t){var e=t[0],n=t[1],i=[be(e),-Me(e),0],s=0,o=0;Tf.reset();for(var a=0,u=r.length;a<u;++a)if(l=(h=r[a]).length)for(var h,l,c=h[l-1],f=c[0],p=c[1]/2+dv,v=be(p),w=Me(p),E=0;E<l;++E,f=y,v=m,w=S,c=I){var I=h[E],y=I[0],_=I[1]/2+dv,m=be(_),S=Me(_),C=y-f,P=C>=0?1:-1,b=P*C,x=b>jt,A=v*m;if(Tf.add(Ra(A*P*be(b),w*S+A*Me(b))),s+=x?C+P*Vi:C,x^f>=e^y>=e){var N=Ol(Ga(c),Ga(I));Nf(N);var T=Ol(i,N);Nf(T);var R=(x^C>=0?-1:1)*xo(T[2]);(n>R||n===R&&(N[0]||N[1]))&&(o+=x^C>=0?1:-1)}}return(s<-1e-6||s<Ee&&Tf<-1e-6)^o&1}Xs();function Nv(r){return r}Xs(),Xs();var ka=1/0,kl=ka,mh=-ka,Vl=mh,xv={point:HP,lineStart:vh,lineEnd:vh,polygonStart:vh,polygonEnd:vh,result:function(){var r=[[ka,kl],[mh,Vl]];return mh=Vl=-(kl=ka=1/0),r}};function HP(r,t){r<ka&&(ka=r),r>mh&&(mh=r),t<kl&&(kl=t),t>Vl&&(Vl=t)}Xs();function Tv(r,t,e,n){return function(i,s){var o=t(s),a=i.invert(n[0],n[1]),u=Cv(),h=t(u),l=!1,c,f,p,v={point:w,lineStart:I,lineEnd:y,polygonStart:function(){v.point=_,v.lineStart=m,v.lineEnd=S,f=[],c=[]},polygonEnd:function(){v.point=w,v.lineStart=I,v.lineEnd=y,f=bv(f);var C=XP(c,a);f.length?(l||(s.polygonStart(),l=!0),Pv(f,YP,C,e,s)):C&&(l||(s.polygonStart(),l=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),l&&(s.polygonEnd(),l=!1),f=c=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function w(C,P){var b=i(C,P);r(C=b[0],P=b[1])&&s.point(C,P)}function E(C,P){var b=i(C,P);o.point(b[0],b[1])}function I(){v.point=E,o.lineStart()}function y(){v.point=w,o.lineEnd()}function _(C,P){p.push([C,P]);var b=i(C,P);h.point(b[0],b[1])}function m(){h.lineStart(),p=[]}function S(){_(p[0][0],p[0][1]),h.lineEnd();var C=h.clean(),P=u.result(),b,x=P.length,A,N,T;if(p.pop(),c.push(p),p=null,!!x){if(C&1){if(N=P[0],(A=N.length-1)>0){for(l||(s.polygonStart(),l=!0),s.lineStart(),b=0;b<A;++b)s.point((T=N[b])[0],T[1]);s.lineEnd()}return}x>1&&C&2&&P.push(P.pop().concat(P.shift())),f.push(P.filter(BP))}}return v}}function BP(r){return r.length>1}function YP(r,t){return((r=r.x)[0]<0?r[1]-ki-Ee:ki-r[1])-((t=t.x)[0]<0?t[1]-ki-Ee:ki-t[1])}const Av=Tv(function(){return!0},JP,QP,[-jt,-ki]);function JP(r){var t=NaN,e=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(s,o){var a=s>0?jt:-jt,u=er(s-t);er(u-jt)<Ee?(r.point(t,e=(e+o)/2>0?ki:-ki),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(a,e),r.point(s,e),i=0):n!==a&&u>=jt&&(er(t-n)<Ee&&(t-=n*Ee),er(s-a)<Ee&&(s-=a*Ee),e=jP(t,e,s,o),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(a,e),i=0),r.point(t=s,e=o),n=a},lineEnd:function(){r.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function jP(r,t,e,n){var i,s,o=be(r-e);return er(o)>Ee?FP((be(t)*(s=Me(n))*be(e)-be(n)*(i=Me(t))*be(r))/(i*s*o)):(t+n)/2}function QP(r,t,e,n){var i;if(r==null)i=e*ki,n.point(-jt,i),n.point(0,i),n.point(jt,i),n.point(jt,0),n.point(jt,-i),n.point(0,-i),n.point(-jt,-i),n.point(-jt,0),n.point(-jt,i);else if(er(r[0]-t[0])>Ee){var s=r[0]<t[0]?jt:-jt;i=e*s/2,n.point(-s,i),n.point(0,i),n.point(s,i)}else n.point(t[0],t[1])}function KP(r,t){var e=Me(r),n=e>0,i=er(e)>Ee;function s(l,c,f,p){VP(p,r,t,f,l,c)}function o(l,c){return Me(l)*Me(c)>e}function a(l){var c,f,p,v,w;return{lineStart:function(){v=p=!1,w=1},point:function(E,I){var y=[E,I],_,m=o(E,I),S=n?m?0:h(E,I):m?h(E+(E<0?jt:-jt),I):0;if(!c&&(v=p=m)&&l.lineStart(),m!==p&&(_=u(c,y),(!_||Ll(c,_)||Ll(y,_))&&(y[0]+=Ee,y[1]+=Ee,m=o(y[0],y[1]))),m!==p)w=0,m?(l.lineStart(),_=u(y,c),l.point(_[0],_[1])):(_=u(c,y),l.point(_[0],_[1]),l.lineEnd()),c=_;else if(i&&c&&n^m){var C;!(S&f)&&(C=u(y,c,!0))&&(w=0,n?(l.lineStart(),l.point(C[0][0],C[0][1]),l.point(C[1][0],C[1][1]),l.lineEnd()):(l.point(C[1][0],C[1][1]),l.lineEnd(),l.lineStart(),l.point(C[0][0],C[0][1])))}m&&(!c||!Ll(c,y))&&l.point(y[0],y[1]),c=y,p=m,f=S},lineEnd:function(){p&&l.lineEnd(),c=null},clean:function(){return w|(v&&p)<<1}}}function u(l,c,f){var p=Ga(l),v=Ga(c),w=[1,0,0],E=Ol(p,v),I=Al(E,E),y=E[0],_=I-y*y;if(!_)return!f&&l;var m=e*I/_,S=-e*y/_,C=Ol(w,E),P=Dl(w,m),b=Dl(E,S);bf(P,b);var x=C,A=Al(P,x),N=Al(x,x),T=A*A-N*(Al(P,P)-1);if(!(T<0)){var R=Fa(T),V=Dl(x,(-A-R)/N);if(bf(V,P),V=Mf(V),!f)return V;var $=l[0],J=c[0],st=l[1],G=c[1],W;J<$&&(W=$,$=J,J=W);var k=J-$,U=er(k-jt)<Ee,O=U||k<Ee;if(!U&&G<st&&(W=st,st=G,G=W),O?U?st+G>0^V[1]<(er(V[0]-$)<Ee?st:G):st<=V[1]&&V[1]<=G:k>jt^($<=V[0]&&V[0]<=J)){var q=Dl(x,(-A+R)/N);return bf(q,P),[V,Mf(q)]}}}function h(l,c){var f=n?r:jt-r,p=0;return l<-f?p|=1:l>f&&(p|=2),c<-f?p|=4:c>f&&(p|=8),p}return Tv(o,a,s,n?[0,-r]:[-jt,r-jt])}function Ov(r){return function(t){var e=new Af;for(var n in r)e[n]=r[n];return e.stream=t,e}}function Af(){}Af.prototype={constructor:Af,point:function(r,t){this.stream.point(r,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Dv(r,t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),s!=null&&r.clipExtent(null),GP(e,r.stream(xv));var o=xv.result(),a=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(n-a*(o[1][0]+o[0][0]))/2,h=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&r.clipExtent(s),r.scale(a*150).translate([u,h])}function $P(r,t,e){return Dv(r,[[0,0],t],e)}var Lv=16,ZP=Me(30*Gn);function Rv(r,t){return+t?eI(r,t):tI(r)}function tI(r){return Ov({point:function(t,e){t=r(t,e),this.stream.point(t[0],t[1])}})}function eI(r,t){function e(n,i,s,o,a,u,h,l,c,f,p,v,w,E){var I=h-n,y=l-i,_=I*I+y*y;if(_>4*t&&w--){var m=o+f,S=a+p,C=u+v,P=Fa(m*m+S*S+C*C),b=xo(C/=P),x=er(er(C)-1)<Ee||er(s-c)<Ee?(s+c)/2:Ra(S,m),A=r(x,b),N=A[0],T=A[1],R=N-n,V=T-i,$=y*R-I*V;($*$/_>t||er((I*R+y*V)/_-.5)>.3||o*f+a*p+u*v<ZP)&&(e(n,i,s,o,a,u,N,T,x,m/=P,S/=P,C,w,E),E.point(N,T),e(N,T,x,m,S,C,h,l,c,f,p,v,w,E))}}return function(n){var i,s,o,a,u,h,l,c,f,p,v,w,E={point:I,lineStart:y,lineEnd:m,polygonStart:function(){n.polygonStart(),E.lineStart=S},polygonEnd:function(){n.polygonEnd(),E.lineStart=y}};function I(b,x){b=r(b,x),n.point(b[0],b[1])}function y(){c=NaN,E.point=_,n.lineStart()}function _(b,x){var A=Ga([b,x]),N=r(b,x);e(c,f,l,p,v,w,c=N[0],f=N[1],l=b,p=A[0],v=A[1],w=A[2],Lv,n),n.point(c,f)}function m(){E.point=I,n.lineEnd()}function S(){y(),E.point=C,E.lineEnd=P}function C(b,x){_(i=b,x),s=c,o=f,a=p,u=v,h=w,E.point=_}function P(){e(c,f,l,p,v,w,s,o,i,a,u,h,Lv,n),E.lineEnd=m,m()}return E}}var rI=Ov({point:function(r,t){this.stream.point(r*Gn,t*Gn)}});function nI(r){return iI(function(){return r})()}function iI(r){var t,e=150,n=480,i=250,s,o,a=0,u=0,h=0,l=0,c=0,f,p,v=null,w=Av,E=null,I,y,_,m=Nv,S=.5,C=Rv(N,S),P,b;function x(V){return V=p(V[0]*Gn,V[1]*Gn),[V[0]*e+s,o-V[1]*e]}function A(V){return V=p.invert((V[0]-s)/e,(o-V[1])/e),V&&[V[0]*Hs,V[1]*Hs]}function N(V,$){return V=t(V,$),[V[0]*e+s,o-V[1]*e]}x.stream=function(V){return P&&b===V?P:P=rI(w(f,C(m(b=V))))},x.clipAngle=function(V){return arguments.length?(w=+V?KP(v=V*Gn,6*Gn):(v=null,Av),R()):v*Hs},x.clipExtent=function(V){return arguments.length?(m=V==null?(E=I=y=_=null,Nv):WP(E=+V[0][0],I=+V[0][1],y=+V[1][0],_=+V[1][1]),R()):E==null?null:[[E,I],[y,_]]},x.scale=function(V){return arguments.length?(e=+V,T()):e},x.translate=function(V){return arguments.length?(n=+V[0],i=+V[1],T()):[n,i]},x.center=function(V){return arguments.length?(a=V[0]%360*Gn,u=V[1]%360*Gn,T()):[a*Hs,u*Hs]},x.rotate=function(V){return arguments.length?(h=V[0]%360*Gn,l=V[1]%360*Gn,c=V.length>2?V[2]%360*Gn:0,T()):[h*Hs,l*Hs,c*Hs]},x.precision=function(V){return arguments.length?(C=Rv(N,S=V*V),R()):Fa(S)},x.fitExtent=function(V,$){return Dv(x,V,$)},x.fitSize=function(V,$){return $P(x,V,$)};function T(){p=yv(f=kP(h,l,c),t);var V=t(a,u);return s=n-V[0]*e,o=i+V[1]*e,R()}function R(){return P=b=null,x}return function(){return t=r.apply(this,arguments),x.invert=t.invert&&A,T()}}function Fv(r){return function(t,e){var n=Me(t),i=Me(e),s=r(n*i);return[s*i*be(t),s*be(e)]}}function Gv(r){return function(t,e){var n=Fa(t*t+e*e),i=r(n),s=be(i),o=Me(i);return[Ra(t*s,n*o),xo(n&&e*s/n)]}}var sI=Fv(function(r){return Fa(2/(1+r))});sI.invert=Gv(function(r){return 2*xo(r/2)});var kv=Fv(function(r){return(r=gv(r))&&r/be(r)});kv.invert=Gv(function(r){return r});function oI(){return nI(kv).scale(79.4188).clipAngle(179.999)}function Vv(r,t){return[r,t]}Vv.invert=Vv;function aI(r,t,e){e=e||{};var n=e.units||"kilometers",i=e.steps||8;if(!r)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(r.type){case"GeometryCollection":return nl(r,function(o){var a=Ul(o,t,n,i);a&&s.push(a)}),ua(s);case"FeatureCollection":return rl(r,function(o){var a=Ul(o,t,n,i);a&&rl(a,function(u){u&&s.push(u)})}),ua(s)}return Ul(r,t,n,i)}function Ul(r,t,e,n){var i=r.properties||{},s=r.type==="Feature"?r.geometry:r;if(s.type==="GeometryCollection"){var o=[];return nl(r,function(w){var E=Ul(w,t,e,n);E&&o.push(E)}),ua(o)}var a=uI(s),u={type:s.type,coordinates:zv(s.coordinates,a)},h=new pf,l=h.read(u),c=zc(qc(t,e),"meters"),f=Re.bufferOp(l,c,n),p=new B0;if(f=p.write(f),!Uv(f.coordinates)){var v={type:f.type,coordinates:qv(f.coordinates,a)};return Kn(v,i)}}function Uv(r){return Array.isArray(r[0])?Uv(r[0]):isNaN(r[0])}function zv(r,t){return typeof r[0]!="object"?t(r):r.map(function(e){return zv(e,t)})}function qv(r,t){return typeof r[0]!="object"?t.invert(r):r.map(function(e){return qv(e,t)})}function uI(r){var t=cC(r).geometry.coordinates,e=[-t[0],-t[1]];return oI().rotate(e).scale(nr)}function hI(r,t,e){e===void 0&&(e={});var n=en(r),i=en(t),s=of.union(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?dr(s[0],e.properties):Uc(s,e.properties)}function lI(r,t,e){e===void 0&&(e={});var n=en(r),i=en(t),s=of.intersection(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?dr(s[0],e.properties):Uc(s,e.properties)}function cI(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1])&&r.push(r[0]);const e=ie(t),n=dr([r]);return yn(e,n)}function fI(r,t){const e=$n(r);return IC(e,t,{units:"meters"}).geometry.coordinates}function Of(r){if((r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),r.length<=3)return 0;const t=dr([r]);return CC(t)}function dI(r){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]);const t=dr([r]),n=r0(t).geometry.coordinates;return[n[0],n[1],n[2]??r[0][2]??0]}function Wv(r,t,e,n){const[i,s,o]=r,a=la(ie([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return n=n||[0,0,0],n[0]=a.geometry.coordinates[0],n[1]=a.geometry.coordinates[1],n[2]=o,n}function zl(r,t){return $i(ie(r),ie(t),{units:"meters"})}function yh(r,t){return Hu(ie(r),ie(t))}function gI(r,t){return l0($n(r),$n(t))}function pI(r,t){const e=ie(r),n=ie(t),i=lC(e,n),s=(r[2]+t[2])/2;return[...i.geometry.coordinates,s]}function vI(r,t){const e=ie(t),n=$n(r);return _C(n,e,{units:"meters"})}function mI(r,t){const e=ie(r),n=$n(t);return EC(e,n,{units:"meters"})}function yI(r,t,e,n){const[i,s,o]=r,a=GC(ie([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return n=n||[0,0,0],n[0]=a.geometry.coordinates[0],n[1]=a.geometry.coordinates[1],n[2]=o,n}function Xv(r,t){return f0(ie(r),ie(t),{units:"meters"})}function _I(r,t){return FC(ie(r),ie(t))}function Hv(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=lI(dr([r]),dr([t]));if(e)return e.geometry.coordinates}function Bv(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=hI(dr([r]),dr([t]));if(e)return e.geometry.coordinates}function Yv(r,t=500,e="meters"){const n=aI($n(r),t,{units:e});if(n)return n.geometry.coordinates}function Jv(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=yP(dr([r]),dr([t]));if(e)return e.geometry.coordinates}function jv(r,t,e=10,n="meters"){return uC(r,t,{steps:e,units:n}).geometry.coordinates}function Df(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=dr([r]),n=dr([t]);return VC(e,n)?"oneBig":bC(e,n)?"twoBig":!1}function Qv(r){const t=g.min(g.objsIterator(r,["0"])),e=g.min(g.objsIterator(r,["1"])),n=g.min(g.objsIterator(r,["2"])),i=g.max(g.objsIterator(r,["0"])),s=g.max(g.objsIterator(r,["1"])),o=g.max(g.objsIterator(r,["2"]));return{minPos:[t,e,n],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(n+o)*.5]}}function wI(r){const{minPos:t,maxPos:e,center:n}=Qv(r);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||n.some(u=>!Number.isFinite(u)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=zl(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:n,radius:s}}function Kv(r,t){const e=Ii(r),n=Ii(t);return g.Vector.distance(e,n)}function _h(r,t){const e=[],n=r.length;let i=0;for(let s=0;s<n-1;++s){if(t===void 0||t==="GEODESIC"){const o=zl(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=Xv(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=Kv(r[s],r[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function Lf(r){const t="__getXyzFromPostion";let e=g.getExtProp(r,t);return(!e||!g.Vector.equals(e[0],r))&&(e=[[...r],Ii(r)],g.setExtProp(r,t,e)),e[1]}class $v extends g.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class Rf extends g.TreeItem{constructor(t,e,n){super(t,e),this._property=n}get property(){return this._property}}class Ff extends Rf{constructor(t,e){super(t,!1,e)}}class Gf extends Rf{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function Zv(r,t){const e=new $v(t),n=r.getProperties("chinese"),i=[];for(let s of n)if(s instanceof vt){const o=new Gf(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new Ff(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof vt))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof vt){const u=new Gf(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new Ff(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class Va extends ot{constructor(e){super();d(this,"_propTreeReact",this.dv(g.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new g.ObjResettingWithEvent(this.sceneObjectChanged,n=>{if(!n)return;const i=new ot;return i.d(n.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(n=>{this._propTreeReact.value=void 0,!(!n||!(n instanceof ft))&&(this._propTreeReact.value=Zv(n,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(r=>{r.createDefaultProps=()=>({sceneObject:void 0})})(Va||(Va={})),g.extendClassProps(Va.prototype,Va.createDefaultProps);function kf(r){return g.reactDeepArrayWithUndefined(r,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function tm(r,t){const e=new Array;for(let n of r)e.push(t(n));return e}function Vf(r,t){return r===void 0&&t===void 0?!0:!r||!t?!1:r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}function EI(r,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(r):r.dispose(t.createdEvent.don(()=>e.call(r)))}function SI(r,t,e,n=!0){n&&e(),r.dispose(t.disposableOn(e))}function CI(r,t){const{type:e,id:n}=r;if(e){const i=ft.create(e,n);if(i)return i.json=r,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function em(r){const t=r.children&&g.every(r.children,n=>{if(!(n instanceof Er))throw new Error("!(treeItem instanceof SceneTreeItem)");return!n.show})||!1,e=r.sceneTree.getSceneObjectShowFunc(r.sceneObject);return!t||e}class Er extends g.TreeItem{constructor(e,n=!1,i,s,o=!0){super(e,n,i);d(this,"_dragDrop");d(this,"_showChangedNotAffectChildren",!1);d(this,"_showChangedNotAffectParent",!1);d(this,"_type",this.dv(g.react("Unknown")));d(this,"_isExport",this.dv(g.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let u;const h=()=>{u&&(u(),u=void 0)};this.dispose(h),this.dispose(this.sceneObjectChanged.disposableOn(l=>{h(),l&&(u=g.bind([this,"name"],[l,"name"]))})),this.dispose(this.showChanged.disposableOn(l=>{if(e.setSceneObjectShowFunc(this.sceneObject,l),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let c of this.children)c instanceof Er&&(c._showChangedNotAffectParent=!0,c.show=l,c._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Er&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=em(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new g.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const l=new ot;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof X){const c=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};c(),l.dispose(this.sceneObject.showChanged.disposableOn(c))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof X){const c=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};c(),l.dispose(this.sceneObject.enabledChanged.disposableOn(c))}return l})),this.childrenChangedEvent.disposableOn(()=>{const l=em(this);this._showChangedNotAffectChildren=!0,this.show=l,this._showChangedNotAffectChildren=!1});{const l=()=>{let c="Unknown";this.sceneObject?c=this.sceneObject.typeName:this.children&&(c="Folder"),this._type.value=c};this.dispose(this.sceneObjectChanged.disposableOn(l)),this.dispose(this.childrenResetedEvent.disposableOn(l)),l()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(n){console.error(`sceneTreeItem.jsonStr error ${n}`,n)}}get json(){const e=this.children&&[...this.children].filter(n=>n.isExport).map(n=>n.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let n of e.children){const i=new Er(this.tree,!0);i.json=n,this.children.push(i)}}}clone(){try{const e=new Er(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,n){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(n&&n.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return n&&this.children.push(n),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",n);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",n);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,n)}}(r=>{r.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:g.reactJsonWithUndefined(void 0)})})(Er||(Er={})),g.extendClassProps(Er.prototype,Er.createDefaultProps);function rm(r,t,e){let{offsetY:n}=t;if(!t.target||!("clientTop"in t.target))return"none";n+=2,n+=t.target.clientTop;let i="none";return r.children?n<=e*.3?i="before":n>=e*.7?!r.uiTreeObject.collapsed&&r.children.length>0?i="inner":i="after":i="inner":n<=e*.5?i="before":i="after",i}class nm extends Wg{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let n="none";const i=this.disposeVar(g.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=n,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${n});`)},200));function s(o){n!==o&&(n=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,h=this._treeItem,{tree:l}=h;if(l){const c=[...l.selectedItems];~c.indexOf(u)||c.push(u);const f=rm(h,o,l.itemDivHeight);if(f!=="none"&&g.Tree.canMoveToTreeItems(c,h,f)){o.dataTransfer.dropEffect="move",s(f);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,h=this._treeItem,{tree:l}=h;if(!l)return;const c=[...l.selectedItems];~c.indexOf(u)||c.push(u);const f=rm(h,o,l.itemDivHeight);f!=="none"&&g.Tree.canMoveToTreeItems(c,h,f)&&(g.Tree.moveToTreeItems(c,h,f),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{n="none",i.restart()}))}}function PI(r){if(!(r instanceof Er))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new nm(r)}function II(r){let t=!1;return r&&("show"in r?t=r.show??!0:"enabled"in r&&(t=r.enabled??!0)),t}function MI(r,t){r&&("show"in r?r.show=t:"enabled"in r&&(r.enabled=t))}const bI=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function NI(r){const t=[],{root:e={}}=r,n=[e];for(;n.length>0;){const i=n.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&n.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&bI.includes(o)&&t.push(s.sceneObj)}}}return t}async function xI(r,t){const e=NI(r);let n=0;const i=e.length;for(let s of e)if(++n,t){const o=n/i;t(o,n,i)}}class im extends ot{constructor(e,n){super();d(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=n}get sceneTree(){return this._sceneTree}}class TI extends ot{constructor(e){super();d(this,"_jsonLoadingEvent",this.disposeVar(new X));d(this,"_setJsonProcessing",this.disposeVar(g.createProcessingFromAsyncFunc(async(e,n)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),n&&await e.promise(this._sceneTree.preloadFunc(n)),this._setJson(n),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=n=>{this._jsonLoadingEvent.emit({type:"error",error:n})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(n){console.error(`json数据装配时发生错误!error: ${n}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new g.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function AI(r){return r.name+"_clone"}function Uf(r,t,e){if(r instanceof Er)return r.insertNewTreeItem(t,e);{const n={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return r.insertNewTreeItem(n[t],e)}}function OI(r){[r,...r.getDescendants()].forEach(t=>t.destroy())}const $r=class $r extends g.Tree{constructor(e,n,i,s){super(i);d(this,"_jsonLoading",this.disposeVar(new TI(this)));d(this,"createSceneObjectFunc",$r.defaultCreateSceneObjectFunc);d(this,"createTreeItemDragDropFunc",$r.defaultCreateTreeItemDragDropFunc);d(this,"preloadFunc",$r.defaultPreload);d(this,"getSceneObjectShowFunc",$r.defaultGetSceneObjectShow);d(this,"setSceneObjectShowFunc",$r.defaultSetSceneObjectShow);d(this,"getSceneTreeItemCloneNameFunc",$r.defaultGetSceneTreeItemCloneNameFunc);d(this,"debug",!1);d(this,"_contextMenu",this.disposeVar(new im(this,this.projectManager)));d(this,"_showPropUiOnSelecting",this.disposeVar(g.react(!0)));this._name=e,this._dragStartDataManager=n,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const h=u,{sceneObject:l}=h;l&&o.deleteSceneObject(l)&&l.destroy()&&zh(l,void 0);for(let c of h.getDescendants()){const{sceneObject:f}=c;f&&o.deleteSceneObject(f)&&f.destroy()&&zh(f,void 0)}OI(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const h=u;h.sceneObject&&o.addSceneObject(h.sceneObject)&&zh(h.sceneObject,h)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const n=this.getDescendants();let i;for(let s of n)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const n=e.root.children??[];this.root.resetChildren(!0);for(let s of n){const o=new Er(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,n){const i=e||this.lastSelectedItem||this.root;return i?Uf(i,n):!1}addNewTreeItem(e,n,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&Uf(o,n)){const a=new Er(this,i);if(a.sceneObject=s,!Uf(o,n,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=ft.create(e,n);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=ft.createFromClass(e,n);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,n,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(n,s))return;const o=ft.createFromJson(e);return console.log(o),o?this.addNewTreeItem(n,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let n of e)this.destroySceneObjectTreeItem(n)}};d($r,"defaultCreateSceneObjectFunc",CI),d($r,"defaultCreateTreeItemDragDropFunc",PI),d($r,"defaultPreload",xI),d($r,"defaultGetSceneObjectShow",II),d($r,"defaultSetSceneObjectShow",MI),d($r,"defaultGetSceneTreeItemCloneNameFunc",AI);let wh=$r;const zf={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class DI extends ot{constructor(e){super();d(this,"_currentPosition",this.disposeVar(g.reactArrayWithUndefined(void 0)));d(this,"_currentRotation",this.disposeVar(g.reactArrayWithUndefined(void 0)));d(this,"_currentHeading",this.disposeVar(g.react(void 0)));d(this,"_isRotating",this.disposeVar(g.react(!1)));d(this,"_isGround",this.disposeVar(g.react(!1)));d(this,"_startPosition",[0,0,0]);d(this,"_startRotation",[0,0,0]);d(this,"_processing",this.disposeVar(g.createProcessingFromAsyncFunc(async(e,n,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=n,this._currentRotation.value=i;return}const u=this._startPosition;u.splice(0,3,...o);const h=this._startRotation;h.splice(0,3,...a);let l=Date.now();const c=yh(u,n);this._currentHeading.value=c;const p=zl(u,n)/s,v=[i[0]-h[0],i[1]-h[1],i[2]-h[2]],w=n[2]-u[2];await e.promise(new Promise(E=>{e.disposer.dispose(g.animateFrame(async()=>{let I=Date.now()-l;I=I<0?0:I,I=I>s?s:I;const y=I*p,_=Wv(u,y,c);if(this.isGround&&_){const m=await this._esviewer.getTerrainHeight([_[0],_[1]]);this._currentPosition.value=[_[0],_[1],m??0]}else _&&(_[2]+=w*(I/s)),this._currentPosition.value=_;if(this.isRotating){const[m,S,C]=v,P=I/s;this._currentRotation.value=[h[0]+m*P,h[1]+S*P,h[2]+C*P]}I===s&&(this._currentPosition.value=n,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,E())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,n,i){this._processing.restart(void 0,e,n,i)}cancel(){this._processing.cancel()}}function sm(r){let t=0;function e(n,i){i++,t=Math.max(i,t),n.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(r,0),t}const Ui=class Ui extends ne{constructor(e){super(e);d(this,"editingBindMode","lineString");d(this,"_area",this.dv(g.react(0)));d(this,"_perimeter",this.dv(g.react(0)));const n=()=>{this._updateArea(),this._updatePerimeter()};n(),this.d(this.pointsChanged.don(n))}updateEditing(){var n;const e=[];this.editingBindMode=="doublePoints"?e.push(ct.DoublePointsAppend,ct.DoublePointsModify):this.editingBindMode=="lineString"?e.push(ct.LineStringAppend,ct.LineStringInsert,ct.Translation):this.editingBindMode=="circular"?(e.push(ct.CircularAppend,ct.CircularInsert,ct.Translation),this.supportEditingModes().includes(ct.HeightModify)&&e.push(ct.HeightModify)):this.editingBindMode=="visibility"?e.push(ct.VisibilityAppend,ct.VisibilityModify):this.editingBindMode=="scatter"&&e.push(ct.ScatterAppend,ct.ScatterModify),(n=this.activeViewer)==null||n.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Of([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=_h(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],n=_h(e,"GEODESIC");return n[n.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=Hv(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],o=[];return s.forEach(a=>{const u=a[0].map(h=>[...h,0]);o.push(u)}),o}else return[[...n][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=Bv(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],o=[];return s.forEach(a=>{const u=a[0].map(h=>[...h,0]);o.push(u)}),o}else return[[...n][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let n=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||n.push(i);const o=Jv([...this.points,this.points[0]],[...n]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(sm(a)===3){const u=a.map(f=>f.map(p=>[...p,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const h=u[0],l=u[1];return Df([...h],[...l])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(sm(a)===4){const h=[...a.map(c=>c.map(f=>f.map(p=>[...p,0])))],l=[];return h.forEach(c=>{l.push(c[0])}),{status:"notIncluded",positions:l}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,n){if(this.points&&this.points.length>=2){const i=Yv(this.points,e,n);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=Df(this.points,e);return n==="oneBig"?!0:n==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new Z([this,"editing"],"编辑",!1),new lt([this,"points"],"位置数组",Ui.defaults.points,void 0,!0)],style:[...e.style,new vt([],"点样式"),new Z([this,"pointed"],"开启",!1),new L([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new Gt([this,"pointOutlineColor"],"轮廓颜色",Ui.defaults.pointStyle.outlineColor),new L([this,"pointOutlineWidth"],"轮廓宽度",Ui.defaults.pointStyle.outlineWidth),new vt([],"线样式"),new Z([this,"stroked"],"开启线样式",!0),new Z([this,"strokeGround"],"贴地",!1),new L([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式"),new Z([this,"filled"],"开启",!1),new Z([this,"fillGround"],"贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new vt([],"点样式集合"),new Et([this,"pointMaterial"],"点材质"),new lt([this,"pointMaterialParams"],"点材质参数"),new vt([],"线样式集合"),new Et([this,"strokeMaterial"],"线材质"),new lt([this,"strokeMaterialParams"],"线材质参数"),new vt([],"面样式集合"),new Et([this,"fillMaterial"],"面材质"),new lt([this,"fillMaterialParams"],"面材质参数")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};d(Ui,"createDefaultProps",()=>({...ne.createDefaultProps(),pointed:!1,pointStyle:g.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:g.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:g.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:g.reactPositions(void 0)})),d(Ui,"type",Ui.register("ESGeoVector",Ui,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),d(Ui,"supportEditingModes",[...ne.supportEditingModes,ct.Translation]);let Rt=Ui;const To=class To extends ne{constructor(){super(...arguments);d(this,"_statusDis",this.dv(g.react(!0)));d(this,"_smoothMoveEvent",this.dv(new X));d(this,"_smoothMoveWithRotationEvent",this.dv(new X));d(this,"_smoothMoveOnGroundEvent",this.dv(new X));d(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new X));d(this,"_automaticLandingEvent",this.dv(new X));d(this,"_smoothMoveKeepPitchEvent",this.dv(new X));d(this,"_smoothMoveRelativelyEvent",this.dv(new X));d(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new X));d(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var n;const e=[];this.editingBindMode=="singlePoint"?(e.push(ct.Place,ct.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(ct.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(ct.Scale)):this.editingBindMode=="doublePoints"&&e.push(ct.DoublePointsAppend,ct.DoublePointsModify),(n=this.activeViewer)==null||n.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,n){this._smoothMoveEvent.emit(e,n)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,n,i){this._smoothMoveWithRotationEvent.emit(e,n,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,n,i,s){this._smoothMoveOnGroundEvent.emit(e,n,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,n,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,n,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,n){this._smoothMoveKeepPitchEvent.emit(e,n)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,n){this._smoothMoveRelativelyEvent.emit(e,n)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,n,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,n,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new Z([this,"editing"],"是否编辑"),new mt([],()=>this.automaticLanding(),[],"自动落地"),new Ko([this,"position"],"位置数组",[0,0,0]),new yc([this,"rotation"],"姿态数组",[0,0,0]),new cr([this,"scale"],"缩放",[1,1,1]),new L([this,"minVisibleDistance"],"最小可见距离",0),new L([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new mt(["numbers","number"],(n,i)=>this.smoothMove(n,i),[[0,0,0],0],"平滑移动","smoothMove"),new mt(["numbers","number"],(n,i)=>this.smoothMoveKeepPitch(n,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new mt(["numbers","numbers","number"],(n,i,s)=>this.smoothMoveWithRotation(n,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new mt(["number","number","number","string"],(n,i,s,o)=>this.smoothMoveOnGround(n,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new mt(["numbers","number","number","number","string"],(n,i,s,o,a)=>this.smoothMoveWithRotationOnGround(n,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new mt(["numbers","number"],(n,i)=>this.smoothMoveRelatively(n,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new mt(["numbers","numbers","number"],(n,i,s)=>this.smoothMoveRelativelyWithRotation(n,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new Z([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};d(To,"createDefaultProps",()=>({...ne.createDefaultProps(),pointed:!1,pointStyle:g.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:g.reactArray([0,0,0]),rotation:g.reactArray([0,0,0]),scale:g.reactArray([1,1,1]),minVisibleDistance:g.react(0),maxVisibleDistance:g.react(0)})),d(To,"type",To.register("ESObjectWithLocation",To,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),d(To,"supportEditingModes",[...ne.supportEditingModes,ct.Place,ct.Translation,ct.Rotation,ct.Scale,ct.DoublePointsAppend,ct.DoublePointsModify]);let dt=To;const Wa=class Wa extends dt{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new vt([],"点样式集合"),new Z([this,"pointed"],"开启点样式",!1),new L([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new vt([],"线样式集合"),new Z([this,"stroked"],"开启线样式",!1),new Z([this,"strokeGround"],"是否贴地(线)",!1),new L([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式集合"),new Z([this,"filled"],"开启填充样式",!1),new Z([this,"fillGround"],"是否贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new vt([],"点样式"),new Et([this,"pointMaterial"],"点材质",""),new lt([this,"pointMaterialParams"],"点材质参数",{}),new vt([],"线样式"),new Et([this,"strokeMaterial"],"线材质",""),new lt([this,"strokeMaterialParams"],"线材质参数",{}),new vt([],"填充样式"),new Et([this,"fillMaterial"],"面材质",""),new lt([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};d(Wa,"createDefaultProps",()=>({...dt.createDefaultProps(),pointed:!1,pointStyle:g.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:g.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:g.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Wa,"type",Wa.register("ESLocalVector",Wa,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Ua=Wa;const xh=class xh extends Ua{};d(xh,"type",xh.register("ESLocalVector2D",xh,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let ds=xh;const LI=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],RI=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],Xa=class Xa extends dt{constructor(){super(...arguments);d(this,"_widgetEvent",this.dv(new X))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Z([this,"screenRender"],"屏幕渲染",!0),new Z([this,"sizeByContent"],"尺寸自适应",!0),new ze([this,"size"],"尺寸大小",[100,100]),new ze([this,"anchor"],"偏移比例",[.5,1]),new ze([this,"offset"],"像素偏移",[0,0]),new Tt([this,"renderMode"],RI,"渲染模式",0),new Tt([this,"rotationType"],LI,"漫游旋转类型",1),new Et([this,"actorTag"],"绑定对象"),new Et([this,"socketName"],"插槽名称"),new cr([this,"positionOffset"],"位置偏移"),new cr([this,"rotationOffset"],"相对姿态")],more:[...e.more,new L([this,"zOrder"],"排序",0)]}}};d(Xa,"createDefaultProps",()=>({...dt.createDefaultProps(),screenRender:!0,size:g.reactArray([100,100]),anchor:g.reactArray([.5,1]),offset:g.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:g.reactArray([0,0,0]),rotationOffset:g.reactArray([0,0,0])})),d(Xa,"type",Xa.register("ESLabel",Xa,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let gn=Xa;const Ha=class Ha extends ft{constructor(t){super(t)}};d(Ha,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,fillStyle:g.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ha,"type",Ha.register("ESTestObject",Ha,{chsName:"测试",tags:["ESObjects"],description:""}));let qf=Ha;const zi=class zi extends ne{constructor(e){super(e);d(this,"_refreshTilesetEvent",this.dv(new X));d(this,"_tilesetReadyEvent",this.dv(new X));d(this,"_supportEdit",this.dv(g.react(!0)));d(this,"_highlightFeatureEvent",this.dv(new X));d(this,"_highlightFeatureAndFlyToEvent",this.dv(new X));d(this,"_strokeFeatureEvent",this.disposeVar(new X));d(this,"_getFeatureTableEvent",this.dv(new X));d(this,"_featureTableResultEvent",this.dv(new X));d(this,"_getMaterialNameListEvent",this.disposeVar(new X));d(this,"_setFeatureStyleEvent",this.dv(new X));d(this,"_setFeatureColorEvent",this.dv(new X));d(this,"_setFeatureVisableEvent",this.dv(new X));d(this,"_resetFeatureStyleEvent",this.dv(new X));d(this,"setMaterialInfoEvent",this.ad(new X));d(this,"_setMaterialEvent",this.disposeVar(new X));d(this,"_clippingPlanesId",this.dv(g.react("")));d(this,"_clippingPlaneIds",this.dv(g.react([])));d(this,"_flattenedPlaneId",this.dv(g.react("")));d(this,"_flattenedPlaneEnabled",this.dv(g.react(!1)));d(this,"_clippingPlaneId",this.dv(g.react("")));d(this,"_excavateId",this.dv(g.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[ct.Translation,ct.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,n){this._highlightFeatureEvent.emit(e,n)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,n,i,s){this._highlightFeatureAndFlyToEvent.emit(e,n,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,n=[1,0,0,1]){this._strokeFeatureEvent.emit(e,n)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const n=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const n=new ot;n.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(n.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{n.isDestroyed()||(n.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,n){this._setFeatureColorEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,n){this._setFeatureVisableEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(n=>{const i=new ot;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...zf}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Be([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new Tt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new Tt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new lt([this,"materialOverrideMap"],"材质替换",zi.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new lt([this,"url"],"服务地址",zi.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new Z([this,"editing"],"编辑",!1,!0),new cr([this,"offset"],"偏移量",[0,0,0],!0),new yc([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new lt([this,"materialParams"],"materialParams",zi.defaults.materialParams),new mt(["string","string"],(n,i)=>this.highlightFeature(n,i),["","rgba(255,0,0,1)"],"highlightFeature"),new mt(["string","string"],(n,i)=>this.setFeatureColor(n,i),["",""],"setFeatureColor"),new mt(["string","string"],(n,i)=>this.setFeatureVisable(n,i),["",""],"setFeatureVisable"),new mt([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new vt([],"ue"),new mt([],()=>this.refreshTileset(),[],"refreshTileset"),new Et([this,"actorTag"]),new Z([this,"highlight"],"是否高亮"),new Gt([this,"highlightColor"]),new L([this,"highlightID"]),new vt([],"czm"),new vt([],"可视化"),new ze([this,"czmImageBasedLightingFactor"],"反射强度"),new L([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new lt([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new L([this,"czmMaximumMemoryUsage"],"最大内存"),new vt([],"常用"),new Tt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new lt([this,"czmStyleJson"],"czmStyle"),new Z([this,"czmBackFaceCulling"]),new Z([this,"czmSkipLevelOfDetail"]),new L([this,"cacheBytes"],"最大缓存",536870912),new vt([],"调试信息"),new Z([this,"czmDebugShowBoundingVolume"]),new Z([this,"czmDebugShowContentBoundingVolume"]),new vt([],"clippingPlanes"),new Z([this,"clippingPlaneEnabled"]),new Z([this,"unionClippingRegions"]),new Gt([this,"clippingPlaneEdgeColor"]),new L([this,"clippingPlaneEdgeWidth"])]}}};d(zi,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:g.reactArray([1,0,0,1]),offset:g.reactArrayWithUndefined([0,0,0]),rotation:g.reactArray([0,0,0]),czmImageBasedLightingFactor:g.reactArray([1,1]),czmEnvironmentMapManager:g.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:g.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:536870912,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:g.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:g.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),d(zi,"type",zi.register("ES3DTileset",zi,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),d(zi,"supportEditingModes",[...ne.supportEditingModes,ct.Translation,ct.Rotation]);let kn=zi;const Ba=class Ba extends dt{constructor(e){super(e);d(this,"_isFlyInCreated",this.dv(g.react(!1)));d(this,"_readyEvent",this.dv(new X));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(Su([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},"donce"));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new L([this,"radius"],"半径",10)]}}};d(Ba,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"cylinder",radius:10})),d(Ba,"type",Ba.register("ESAlarm",Ba,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let Wf=Ba;const Ao=class Ao extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"radius"],"半径",1),new Tt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Ao.defaults.mode)]}}};d(Ao,"createDefaultProps",()=>({...dt.createDefaultProps(),radius:1,mode:"scan",collision:!1})),d(Ao,"type",Ao.register("ESApertureEffect",Ao,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Xf=Ao;const Oo=class Oo extends Rt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Oo,"createDefaultProps",()=>({...Rt.createDefaultProps(),fillStyle:g.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:g.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),d(Oo,"type",Oo.register("ESGeoPolygon",Oo,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),d(Oo,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert]);let oe=Oo;const gs=class gs extends oe{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:gs.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??gs.defaults.fillStyle,materialParams:t??gs.defaults.fillStyle.materialParams}}constructor(t){super(t)}};d(gs,"createDefaultProps",()=>({...oe.createDefaultProps(),stroked:!0,filled:!0,units:g.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:g.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:g.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(gs,"type",gs.register("ESAreaMeasurement",gs,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let Hf=gs;const Ya=class Ya extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new vt([],"czm"),new Cu([this,"image"],"图片"),new cr([this,"translation"],"偏移")]}}};d(Ya,"createDefaultProps",()=>({...dt.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:g.reactArray([0,0,0])})),d(Ya,"type",Ya.register("ESBlastParticleSystem",Ya,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Bf=Ya;const pi=class pi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Z([this,"reverse"],"反转",pi.defaults.reverse),new cr([this,"size"],"尺寸",pi.defaults.size),new Gt([this,"edgeColor"],"边框颜色",pi.defaults.edgeColor),new L([this,"edgeWidth"],"边框宽度",pi.defaults.edgeWidth),new Et([this,"targetID"],"瓦片图层",pi.defaults.targetID)]}}};d(pi,"createDefaultProps",()=>({...dt.createDefaultProps(),reverse:!1,edgeColor:g.reactArray([1,1,1,1]),edgeWidth:2,size:g.reactArray([10,10,10]),targetID:""})),d(pi,"type",pi.register("ESBoxClipping",pi,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let Yf=pi;const Th=class Th extends dt{constructor(){super(...arguments);d(this,"_thumbnail",this.dv(g.react("")));d(this,"_duration",this.dv(g.react(1)));d(this,"_resetWithCurrentCameraEvent",this.dv(new X));d(this,"_captureEvent",this.dv(new X))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,n="default"){this.flyInEvent.emit(e,-1,n)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,n){this._captureEvent.emit(e,n)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESCameraView"),new mt([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new mt(["number","number"],(n,i)=>this.capture(n,i),[64,64],"获取缩略图"),new Et([this,"thumbnail"],"缩略图","",!0),new L([this,"duration"],"飞行时间",1,!0)]}}};d(Th,"type",Th.register("ESCameraView",Th,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let ql=Th;class Wl extends ot{constructor(e,n,i){super();d(this,"_view",this.dv(new ql));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,n){const a=this._view,u=n;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(g.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(g.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const Un=class Un extends ft{constructor(e){super(e);d(this,"_currentViewIndex",this.dv(g.react(-1)));d(this,"_viewWrappers",this.dv(new g.ObservableArray));d(this,"_currentViewWrapper",this.dv(g.react(void 0)));d(this,"_container",this.dv(g.react(void 0)));this.initProcessing();{const n=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};n(),this.d(this._viewWrappers.changedEvent.don(n))}{const n=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};n(),this.d(this._viewWrappers.changedEvent.don(n)),this.d(this._currentViewWrapper.changed.don(n))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return tm(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const n=this._viewWrappers;if(e.every((i,s)=>{const o=n.get(s).view;return i.duration===o.duration&&Vf(i.position,o.position)&&Vf(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let n of e)this._viewWrappers.push(new Wl(this,n))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,n=[64,64]){this._viewWrappers.push(new Wl(this,void 0,{name:e,size:n}))}update(e,n,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return n&&(s.view.name=n),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Wl(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Wl(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const n=this._viewWrappers.get(e);return this._currentViewWrapper.value=n,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const n=this._viewWrappers.get(e);n.view.resetWithCurrentCamera(),n.view.capture()}resetViewName(e,n){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=n}updateView(e,n){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=n.position,i.view.rotation=n.rotation??[0,0,0],i.view.duration=n.duration??1,i.view.thumbnail=n.thumbnail??"",i.view.name=n.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const n=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(n,this.flyMode??Un.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Un.defaults.loop?(this.flyToView((this._viewWrappers.length+n-1)%this._viewWrappers.length),!0):n-1<0?!1:(this.flyToView(n-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===0)return;const i=this._viewWrappers.splice(n-1,1,e)[0];this._viewWrappers.set(n,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(n+1,1,e)[0];this._viewWrappers.set(n,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Un.defaults.loop?(this.flyToView((n+1)%this._viewWrappers.length),!0):n+1>this._viewWrappers.length-1?!1:(this.flyToView(n+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const n=this._getIndex(e);if(n===-1){console.warn("index === -1");return}this.deleteView(n)}transitionImageUrl(e){return ft.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const n=this.intervalTime??Un.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+n)*1e3;return e.promise(g.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(g.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),n=()=>{this.playing?e.restart():e.cancel()};n(),this.d(this.playingChanged.don(n))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Tt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",Un.defaults.flyMode),new mt([],()=>this.addView(),[],"添加视角"),new mt(["number"],n=>this.insertView(n),[0],"插入视角"),new mt([],()=>this.clearAllViews(),[],"清空所有视角"),new mt([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new mt([],()=>this.flyToPrevView(),[],"上一个视角"),new mt([],()=>this.flyToNextView(),[],"下一个视角"),new mt([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new mt([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new mt(["number"],n=>this.flyToView(n),[0],"飞入指定视角"),new mt(["number"],n=>this.setCurrentView(n),[0],"设置当前视角"),new mt([],()=>this.deleteCurrentView(),[],"删除当前视角"),new mt(["number"],n=>this.deleteView(n),[0],"删除指定视角"),new mt(["number"],n=>this.resetView(n),[0],"重置视角"),new L([this,"currentViewIndex"],"当前序号",-1,!1,!0),new Gg([this,"playing"],()=>this.stop(),[this,"loop"],"播放",Un.defaults),new Z([this,"playing"],"是否播放"),new mt([],()=>this.stop(),[],"停止"),new Z([this,"loop"],"是否循环"),new L([this,"intervalTime"],"间隔时间"),new lt([this,"views"],"视角集合",[],void 0,!0)]}}};d(Un,"createDefaultProps",()=>({...ft.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),d(Un,"type",Un.register("ESCameraViewCollection",Un,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let Xl=Un;const Ja=class Ja extends dt{constructor(e){super(e);d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"aspectRatio"],"宽高比",1.77778),new L([this,"fov"],"横向夹角",90),new L([this,"far"],"视野长度",100),new L([this,"near"],"近面距离",5)]}}};d(Ja,"createDefaultProps",()=>({...dt.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),d(Ja,"type",Ja.register("ESCameraVisibleRange",Ja,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Jf=Ja;const ja=class ja extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};d(ja,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"policeCar",allowPicking:!0})),d(ja,"type",ja.register("ESCar",ja,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let jf=ja;const Do=class Do extends Rt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"height"],"高度",10)],coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Do,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,filled:!0,fillStyle:g.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),d(Do,"type",Do.register("ESClassification",Do,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),d(Do,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let Hl=Do;const Qa=class Qa extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Z([this,"showArrow"],"显示箭头",!0),new Gt([this,"edgeColor"],"线框颜色",[1,1,1,1]),new L([this,"edgetWidth"],"线框宽度",2),new L([this,"width"],"裁剪宽度",200),new L([this,"height"],"裁剪高度",200),new Et([this,"targetID"],"瓦片图层","")]}}};d(Qa,"createDefaultProps",()=>({...dt.createDefaultProps(),showArrow:!0,edgeColor:g.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),d(Qa,"type",Qa.register("ESClippingPlane",Qa,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let Qf=Qa;class FI extends ot{constructor(t,e,n){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container`);{const u=()=>{const l=` ${e.cssText}
|
|
68
|
+
`)}return t.toString()},Xe.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.computeLabel(t)}},Xe.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===F.BOUNDARY&&(n[a]=!0);for(var u=this.iterator();u.hasNext();)for(var h=u.next(),l=h.getLabel(),c=0;c<2;c++)if(l.isAnyNull(c)){var f=F.NONE;if(n[c])f=F.EXTERIOR;else{var p=h.getCoordinate();f=e.getLocation(c,p,t)}l.setAllLocationsIfNull(c,f)}},Xe.prototype.getDegree=function(){return this._edgeMap.size()},Xe.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var LP=function(r){function t(){r.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=n._resultAreaEdgeList.get(a),h=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case n._SCANNING_FOR_INCOMING:if(!h.isInResult())continue;s=h,o=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=n._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Di("no outgoing dirEdge found",this.getCoordinate());Pt.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(n){var i=n;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var n=this.getEdges(),i=n.size();if(i<1)return null;var s=n.get(0);if(i===1)return s;var o=n.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return Jt.isNorthern(a)&&Jt.isNorthern(u)?s:!Jt.isNorthern(a)&&!Jt.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(Pt.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(n){De.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();n.print("out "),s.print(n),n.println(),n.print("in "),s.getSym().print(n),n.println()}},t.prototype.getResultAreaEdges=function(){var n=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new j;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&n._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(n){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,n.getLocation(0)),o.setAllLocationsIfNull(1,n.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var n=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=n._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(B.LEFT),a=i.getDepth(B.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),h=this.computeDepths(0,s,u);if(h!==a)throw new Di("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var l=arguments[0],c=arguments[1],f=arguments[2],p=f,v=l;v<c;v++){var w=n._edgeList.get(v);w.setEdgeDepths(B.RIGHT,p),p=w.getDepth(B.LEFT)}return p}},t.prototype.mergeSymLabels=function(){for(var n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(n){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var h=i._resultAreaEdgeList.get(u),l=h.getSym();switch(s===null&&h.getEdgeRing()===n&&(s=h),a){case i._SCANNING_FOR_INCOMING:if(l.getEdgeRing()!==n)continue;o=l,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(h.getEdgeRing()!==n)continue;o.setNextMin(h),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(Pt.isTrue(s!==null,"found null for first outgoing dirEdge"),Pt.isTrue(s.getEdgeRing()===n,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&n++}return n}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var h=u.next();h.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var n=F.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){n=F.INTERIOR;break}if(o.isInResult()){n=F.EXTERIOR;break}}}if(n===F.NONE)return null;for(var a=n,u=this.iterator();u.hasNext();){var h=u.next(),l=h.getSym();h.isLineEdge()?h.getEdge().setCovered(a===F.INTERIOR):(h.isInResult()&&(a=F.EXTERIOR),l.isInResult()&&(a=F.INTERIOR))}},t.prototype.computeLabelling=function(n){var i=this;r.prototype.computeLabelling.call(this,n),this._label=new Yt(F.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),h=0;h<2;h++){var l=u.getLocation(h);(l===F.INTERIOR||l===F.BOUNDARY)&&i._label.setLocation(h,F.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Xe),rv=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.createNode=function(n){return new Pl(n,new LP)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Pa),ss=function r(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=r.orientation(t)};ss.prototype.compareTo=function(t){var e=t,n=ss.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n},ss.prototype.interfaces_=function(){return[Wr]},ss.prototype.getClass=function(){return ss},ss.orientation=function(t){return Nt.increasingDirection(t)===1},ss.compareOriented=function(t,e,n,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?n.length:-1,h=e?0:t.length-1,l=i?0:n.length-1;;){var c=t[h].compareTo(n[l]);if(c!==0)return c;h+=s,l+=o;var f=h===a,p=l===u;if(f&&!p)return-1;if(!f&&p)return 1;if(f&&p)return 0}};var cn=function(){this._edges=new j,this._ocaMap=new qe};cn.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var i=e._edges.get(n);n>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},cn.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())},cn.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n<this._edges.size();n++)if(e._edges.get(n).equals(t))return n;return-1},cn.prototype.iterator=function(){return this._edges.iterator()},cn.prototype.getEdges=function(){return this._edges},cn.prototype.get=function(t){return this._edges.get(t)},cn.prototype.findEqualEdge=function(t){var e=new ss(t.getCoordinates()),n=this._ocaMap.get(e);return n},cn.prototype.add=function(t){this._edges.add(t);var e=new ss(t.getCoordinates());this._ocaMap.put(e,t)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var Gs=function(){};Gs.prototype.processIntersections=function(t,e,n,i){},Gs.prototype.isDone=function(){},Gs.prototype.interfaces_=function(){return[]},Gs.prototype.getClass=function(){return Gs};var Rr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Rr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(Rr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Rr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Rr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Rr.prototype.getLineIntersector=function(){return this._li},Rr.prototype.hasProperIntersection=function(){return this._hasProper},Rr.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Rr.prototype.hasIntersection=function(){return this._hasIntersection},Rr.prototype.isDone=function(){return!1},Rr.prototype.hasInteriorIntersection=function(){return this._hasInterior},Rr.prototype.interfaces_=function(){return[Gs]},Rr.prototype.getClass=function(){return Rr},Rr.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var On=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new D(t),this.segmentIndex=e,this.dist=n};On.prototype.getSegmentIndex=function(){return this.segmentIndex},On.prototype.getCoordinate=function(){return this.coord},On.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},On.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},On.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},On.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},On.prototype.getDistance=function(){return this.dist},On.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},On.prototype.interfaces_=function(){return[Wr]},On.prototype.getClass=function(){return On};var ui=function(){this._nodeMap=new qe,this.edge=null;var t=arguments[0];this.edge=t};ui.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},ui.prototype.iterator=function(){return this._nodeMap.values().iterator()},ui.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},ui.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},ui.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var h=t.segmentIndex+1;h<=e.segmentIndex;h++)a[u++]=n.edge.pts[h];return o&&(a[u]=e.coord),new Ml(a,new Yt(this.edge._label))},ui.prototype.add=function(t,e,n){var i=new On(t,e,n),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},ui.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ks=function(){};ks.prototype.getChainStartIndices=function(t){var e=this,n=0,i=new j;i.add(new En(n));do{var s=e.findChainEnd(t,n);i.add(new En(s)),n=s}while(n<t.length-1);var o=ks.toIntArray(i);return o},ks.prototype.findChainEnd=function(t,e){for(var n=Jt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Jt.quadrant(t[i-1],t[i]);if(s!==n)break;i++}return i-1},ks.prototype.interfaces_=function(){return[]},ks.prototype.getClass=function(){return ks},ks.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Fi=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new at,this.env2=new at;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new ks;this.startIndex=e.getChainStartIndices(this.pts)};Fi.prototype.getCoordinates=function(){return this.pts},Fi.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},Fi.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},Fi.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],h=arguments[4],l=arguments[5],c=this.pts[s],f=this.pts[o],p=a.pts[u],v=a.pts[h];if(o-s===1&&h-u===1)return l.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(c,f),this.env2.init(p,v),!this.env1.intersects(this.env2))return null;var w=Math.trunc((s+o)/2),E=Math.trunc((u+h)/2);s<w&&(u<E&&this.computeIntersectsForChain(s,w,a,u,E,l),E<h&&this.computeIntersectsForChain(s,w,a,E,h,l)),w<o&&(u<E&&this.computeIntersectsForChain(w,o,a,u,E,l),E<h&&this.computeIntersectsForChain(w,o,a,E,h,l))}},Fi.prototype.getStartIndexes=function(){return this.startIndex},Fi.prototype.computeIntersects=function(t,e){for(var n=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)n.computeIntersectsForChain(i,t,s,e)},Fi.prototype.interfaces_=function(){return[]},Fi.prototype.getClass=function(){return Fi};var Le=function r(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)t._depth[e][n]=r.NULL_VALUE},nv={NULL_VALUE:{configurable:!0}};Le.prototype.getDepth=function(t,e){return this._depth[t][e]},Le.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},Le.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var n=0;n<3;n++)if(t._depth[e][n]!==Le.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===Le.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===Le.NULL_VALUE}},Le.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var n=t._depth[e][1];t._depth[e][2]<n&&(n=t._depth[e][2]),n<0&&(n=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>n&&(s=1),t._depth[e][i]=s}}},Le.prototype.getDelta=function(t){return this._depth[t][B.RIGHT]-this._depth[t][B.LEFT]},Le.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?F.EXTERIOR:F.INTERIOR},Le.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Le.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var i=1;i<3;i++){var s=e.getLocation(n,i);(s===F.EXTERIOR||s===F.INTERIOR)&&(t.isNull(n,i)?t._depth[n][i]=Le.depthAtLocation(s):t._depth[n][i]+=Le.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===F.INTERIOR&&this._depth[o][a]++}},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le},Le.depthAtLocation=function(t){return t===F.EXTERIOR?0:t===F.INTERIOR?1:Le.NULL_VALUE},nv.NULL_VALUE.get=function(){return-1},Object.defineProperties(Le,nv);var Ml=function(r){function t(){if(r.call(this),this.pts=null,this._env=null,this.eiList=new ui(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Le,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var i=new t(n,Yt.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(n){this._isIsolated=n},t.prototype.setName=function(n){this._name=n},t.prototype.equals=function(n){var i=this;if(!(n instanceof t))return!1;var s=n;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,h=0;h<this.pts.length;h++)if(i.pts[h].equals2D(s.pts[h])||(o=!1),i.pts[h].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},t.prototype.print=function(n){var i=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&n.print(","),n.print(i.pts[s].x+" "+i.pts[s].y);n.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(n){t.updateIM(this._label,n)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(n){var i=this;n.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)n.print(i.pts[s]+" ");n.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Fi(this)),this._mce},t.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new at;for(var i=0;i<this.pts.length;i++)n._env.expandToInclude(n.pts[i])}return this._env},t.prototype.addIntersection=function(n,i,s,o){var a=new D(n.getIntersection(o)),u=i,h=n.getEdgeDistance(s,o),l=u+1;if(l<this.pts.length){var c=this.pts[l];a.equals2D(c)&&(u=l,h=0)}this.eiList.add(a,u,h)},t.prototype.toString=function(){var n=this,i=new wn;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(n.pts[s].x+" "+n.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(n){var i=this;if(this.pts.length!==n.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(n.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(n){this._depthDelta=n},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(n,i,s){for(var o=this,a=0;a<n.getIntersectionNum();a++)o.addIntersection(n,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];i.setAtLeastIfValid(n.getLocation(0,B.ON),n.getLocation(1,B.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,B.LEFT),n.getLocation(1,B.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,B.RIGHT),n.getLocation(1,B.RIGHT),2))}else return r.prototype.updateIM.apply(this,arguments)},t}(Or),Qe=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new cn,this._bufParams=t||null};Qe.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},Qe.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Yt(t.getLabel()),i.flip()),n.merge(i);var s=Qe.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(Qe.depthDelta(t.getLabel()))},Qe.prototype.buildSubgraphs=function(t,e){for(var n=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new Eo(n),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),n.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},Qe.prototype.createSubgraphs=function(t){for(var e=new j,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var s=new Je;s.create(i),e.add(s)}}return ln.sort(e,ln.reverseOrder()),e},Qe.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},Qe.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new _f,n=new As;return n.setPrecisionModel(t),e.setSegmentIntersector(new Rr(n)),e},Qe.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;n===null&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new or(n,this._bufParams),s=new jr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,n),this._graph=new he(new rv),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new mr(this._geomFact);this.buildSubgraphs(a,u);var h=u.getPolygons();if(h.size()<=0)return this.createEmptyResultGeometry();var l=this._geomFact.buildGeometry(h);return l},Qe.prototype.computeNodedEdges=function(t,e){var n=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var h=a.getData(),l=new Ml(a.getCoordinates(),new Yt(h));n.insertUniqueEdge(l)}}},Qe.prototype.setNoder=function(t){this._workingNoder=t},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe},Qe.depthDelta=function(t){var e=t.getLocation(0,B.LEFT),n=t.getLocation(0,B.RIGHT);return e===F.INTERIOR&&n===F.EXTERIOR?1:e===F.EXTERIOR&&n===F.INTERIOR?-1:0},Qe.convertSegStrings=function(t){for(var e=new xt,n=new j;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());n.add(s)}return e.buildGeometry(n)};var os=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};os.prototype.rescale=function(){var t=this;if(pt(arguments[0],Ce))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&De.out.println(s)}},os.prototype.scale=function(){var t=this;if(pt(arguments[0],Ce)){for(var e=arguments[0],n=new j,i=e.iterator();i.hasNext();){var s=i.next();n.add(new pe(t.scale(s.getCoordinates()),s.getData()))}return n}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new D(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var h=Nt.removeRepeatedPoints(a);return h}},os.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},os.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},os.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},os.prototype.interfaces_=function(){return[Rs]},os.prototype.getClass=function(){return os};var Dn=function(){this._li=new As,this._segStrings=null;var t=arguments[0];this._segStrings=t},iv={fact:{configurable:!0}};Dn.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next(),i=n.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),h=u.getCoordinates(),l=1;l<h.length-1;l++)if(h[l].equals(s))throw new bi("found endpt/interior pt intersection at index "+l+" :pt "+s)}},Dn.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var n=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(n,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),h=a.getCoordinates(),l=0;l<u.length-1;l++)for(var c=0;c<h.length-1;c++)t.checkInteriorIntersections(o,l,a,c);else if(arguments.length===4){var f=arguments[0],p=arguments[1],v=arguments[2],w=arguments[3];if(f===v&&p===w)return null;var E=f.getCoordinates()[p],I=f.getCoordinates()[p+1],y=v.getCoordinates()[w],_=v.getCoordinates()[w+1];if(this._li.computeIntersection(E,I,y,_),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,E,I)||this.hasInteriorIntersection(this._li,y,_)))throw new bi("found non-noded intersection at "+E+"-"+I+" and "+y+"-"+_)}},Dn.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},Dn.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next();t.checkCollapses(n)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},Dn.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(n)))return!0}return!1},Dn.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new bi("found non-noded collapse at "+Dn.fact.createLineString([t,e,n]))},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},iv.fact.get=function(){return new xt},Object.defineProperties(Dn,iv);var ar=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new se("Scale factor must be non-zero");e!==1&&(this._pt=new D(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new D,this._p1Scaled=new D),this.initCorners(this._pt)},sv={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ar.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<n||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return Pt.isTrue(!(a&&u),"Found bad envelope test"),u},ar.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new D(this._maxx,this._maxy),this._corner[1]=new D(this._minx,this._maxy),this._corner[2]=new D(this._minx,this._miny),this._corner[3]=new D(this._maxx,this._miny)},ar.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ar.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ar.prototype.getCoordinate=function(){return this._originalPt},ar.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ar.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=ar.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new at(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ar.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},ar.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&i||t.equals(this._pt)||e.equals(this._pt))},ar.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(n,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},sv.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(ar,sv);var fh=function(){this.tempEnv1=new at,this.selectedSegment=new ut};fh.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},fh.prototype.interfaces_=function(){return[]},fh.prototype.getClass=function(){return fh};var Na=function(){this._index=null;var t=arguments[0];this._index=t},ov={HotPixelSnapAction:{configurable:!0}};Na.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new av(e,n,i);return this._index.query(s,{interfaces_:function(){return[ns]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},Na.prototype.interfaces_=function(){return[]},Na.prototype.getClass=function(){return Na},ov.HotPixelSnapAction.get=function(){return av},Object.defineProperties(Na,ov);var av=function(r){function t(){r.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1],s=n.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return r.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fh),So=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new j};So.prototype.processIntersections=function(t,e,n,i){var s=this;if(t===n&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=n.getCoordinates()[i],h=n.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,h),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l<this._li.getIntersectionNum();l++)s._interiorIntersections.add(s._li.getIntersection(l));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},So.prototype.isDone=function(){return!1},So.prototype.getInteriorIntersections=function(){return this._interiorIntersections},So.prototype.interfaces_=function(){return[Gs]},So.prototype.getClass=function(){return So};var hi=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new As,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};hi.prototype.checkCorrectness=function(t){var e=pe.getNodedSubstrings(t),n=new Dn(e);try{n.checkValid()}catch(i){if(i instanceof U0)i.printStackTrace();else throw i}finally{}},hi.prototype.getNodedSubstrings=function(){return pe.getNodedSubstrings(this._nodedSegStrings)},hi.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},hi.prototype.findInteriorIntersections=function(t,e){var n=new So(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},hi.prototype.computeVertexSnaps=function(){var t=this;if(pt(arguments[0],Ce))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof pe)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new ar(o[a],t._scaleFactor,t._li),h=t._pointSnapper.snap(u,s,a);h&&s.addIntersection(o[a],a)}},hi.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new _f,this._pointSnapper=new Na(this._noder.getIndex()),this.snapRound(t,this._li)},hi.prototype.computeIntersectionSnaps=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=new ar(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},hi.prototype.interfaces_=function(){return[Rs]},hi.prototype.getClass=function(){return hi};var Re=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new zt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},xa={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Re.prototype.bufferFixedPrecision=function(t){var e=new os(new hi(new Ut(1)),t.getScale()),n=new Qe(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},Re.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=Re.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Di)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],i=Re.precisionScaleFactor(this._argGeom,this._distance,n),s=new Ut(i);this.bufferFixedPrecision(s)}},Re.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ut.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},Re.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},Re.prototype.bufferOriginalPrecision=function(){try{var t=new Qe(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof bi)this._saveException=e;else throw e}finally{}},Re.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},Re.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},Re.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Re(t),i=n.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Re(s);u.setQuadrantSegments(a);var h=u.getResultGeometry(o);return h}else if(arguments[2]instanceof zt&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var l=arguments[0],c=arguments[1],f=arguments[2],p=new Re(l,f),v=p.getResultGeometry(c);return v}}else if(arguments.length===4){var w=arguments[0],E=arguments[1],I=arguments[2],y=arguments[3],_=new Re(w);_.setQuadrantSegments(I),_.setEndCapStyle(y);var m=_.getResultGeometry(E);return m}},Re.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),s=Ar.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),h=n-u,l=Math.pow(10,h);return l},xa.CAP_ROUND.get=function(){return zt.CAP_ROUND},xa.CAP_BUTT.get=function(){return zt.CAP_FLAT},xa.CAP_FLAT.get=function(){return zt.CAP_FLAT},xa.CAP_SQUARE.get=function(){return zt.CAP_SQUARE},xa.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Re,xa);var Ke=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};Ke.prototype.getCoordinates=function(){return this._pt},Ke.prototype.getCoordinate=function(t){return this._pt[t]},Ke.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},Ke.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ke.prototype.getDistance=function(){return this._distance},Ke.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var li=function(){};li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li},li.computeDistance=function(){if(arguments[2]instanceof Ke&&arguments[0]instanceof le&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),s=new ut,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof Ke&&arguments[0]instanceof Pe&&arguments[1]instanceof D){var u=arguments[0],h=arguments[1],l=arguments[2];li.computeDistance(u.getExteriorRing(),h,l);for(var c=0;c<u.getNumInteriorRing();c++)li.computeDistance(u.getInteriorRingN(c),h,l)}else if(arguments[2]instanceof Ke&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],p=arguments[1],v=arguments[2];if(f instanceof le)li.computeDistance(f,p,v);else if(f instanceof Pe)li.computeDistance(f,p,v);else if(f instanceof Ye)for(var w=f,E=0;E<w.getNumGeometries();E++){var I=w.getGeometryN(E);li.computeDistance(I,p,v)}else v.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof Ke&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],_=arguments[1],m=arguments[2],S=y.closestPoint(_);m.setMinimum(S,_)}};var Vs=function(t){this._maxPtDist=new Ke,this._inputGeom=t||null},wf={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Vs.prototype.computeMaxMidpointDistance=function(t){var e=new as(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Vs.prototype.computeMaxVertexDistance=function(t){var e=new Co(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Vs.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},Vs.prototype.getDistancePoints=function(){return this._maxPtDist},Vs.prototype.interfaces_=function(){return[]},Vs.prototype.getClass=function(){return Vs},wf.MaxPointDistanceFilter.get=function(){return Co},wf.MaxMidpointDistanceFilter.get=function(){return as},Object.defineProperties(Vs,wf);var Co=function(t){this._maxPtDist=new Ke,this._minPtDist=new Ke,this._geom=t||null};Co.prototype.filter=function(t){this._minPtDist.initialize(),li.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Co.prototype.getMaxPointDistance=function(){return this._maxPtDist},Co.prototype.interfaces_=function(){return[ri]},Co.prototype.getClass=function(){return Co};var as=function(t){this._maxPtDist=new Ke,this._minPtDist=new Ke,this._geom=t||null};as.prototype.filter=function(t,e){if(e===0)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new D((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),li.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},as.prototype.isDone=function(){return!1},as.prototype.isGeometryChanged=function(){return!1},as.prototype.getMaxPointDistance=function(){return this._maxPtDist},as.prototype.interfaces_=function(){return[un]},as.prototype.getClass=function(){return as};var Gi=function(t){this._comps=t||null};Gi.prototype.filter=function(t){t instanceof Pe&&this._comps.add(t)},Gi.prototype.interfaces_=function(){return[In]},Gi.prototype.getClass=function(){return Gi},Gi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return Gi.getPolygons(t,new j)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Pe?n.add(e):e instanceof Ye&&e.apply(new Gi(n)),n}};var Fe=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Fe.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ni){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof le&&this._lines.add(t)},Fe.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Fe.prototype.interfaces_=function(){return[Ni]},Fe.prototype.getClass=function(){return Fe},Fe.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(Fe.getLines(t))}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Fe.getLines(e,n))}},Fe.getLines=function(){if(arguments.length===1){var t=arguments[0];return Fe.getLines(t,!1)}else if(arguments.length===2){if(pt(arguments[0],Ce)&&pt(arguments[1],Ce)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();Fe.getLines(s,n)}return n}else if(arguments[0]instanceof gt&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new j;return o.apply(new Fe(u,a)),u}else if(arguments[0]instanceof gt&&pt(arguments[1],Ce)){var h=arguments[0],l=arguments[1];return h instanceof le?l.add(h):h.apply(new Fe(l)),l}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&pt(arguments[0],Ce)&&pt(arguments[1],Ce)){for(var c=arguments[0],f=arguments[1],p=arguments[2],v=c.iterator();v.hasNext();){var w=v.next();Fe.getLines(w,f,p)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof gt&&pt(arguments[1],Ce)){var E=arguments[0],I=arguments[1],y=arguments[2];return E.apply(new Fe(I,y)),I}}};var fn=function(){if(this._boundaryRule=Hr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new se("Rule must be non-null");this._boundaryRule=t}}};fn.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof D&&arguments[1]instanceof Pe){var e=arguments[0],n=arguments[1];if(n.isEmpty())return F.EXTERIOR;var i=n.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===F.EXTERIOR)return F.EXTERIOR;if(s===F.BOUNDARY)return F.BOUNDARY;for(var o=0;o<n.getNumInteriorRing();o++){var a=n.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===F.INTERIOR)return F.EXTERIOR;if(u===F.BOUNDARY)return F.BOUNDARY}return F.INTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof le){var h=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(h))return F.EXTERIOR;var c=l.getCoordinates();return!l.isClosed()&&(h.equals(c[0])||h.equals(c[c.length-1]))?F.BOUNDARY:K.isOnLine(h,c)?F.INTERIOR:F.EXTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof vr){var f=arguments[0],p=arguments[1],v=p.getCoordinate();return v.equals2D(f)?F.INTERIOR:F.EXTERIOR}},fn.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?K.locatePointInRing(t,e.getCoordinates()):F.EXTERIOR},fn.prototype.intersects=function(t,e){return this.locate(t,e)!==F.EXTERIOR},fn.prototype.updateLocationInfo=function(t){t===F.INTERIOR&&(this._isIn=!0),t===F.BOUNDARY&&this._numBoundaries++},fn.prototype.computeLocation=function(t,e){var n=this;if(e instanceof vr&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof le)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Pe)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ls)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);n.updateLocationInfo(n.locateInternal(t,o))}else if(e instanceof ii)for(var a=e,u=0;u<a.getNumGeometries();u++){var h=a.getGeometryN(u);n.updateLocationInfo(n.locateInternal(t,h))}else if(e instanceof Ye)for(var l=new ai(e);l.hasNext();){var c=l.next();c!==e&&n.computeLocation(t,c)}},fn.prototype.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:e instanceof le?this.locateInternal(t,e):e instanceof Pe?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?F.BOUNDARY:this._numBoundaries>0||this._isIn?F.INTERIOR:F.EXTERIOR)},fn.prototype.interfaces_=function(){return[]},fn.prototype.getClass=function(){return fn};var $e=function r(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];r.call(this,t,r.INSIDE_AREA,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._component=n,this._segIndex=i,this._pt=s}},uv={INSIDE_AREA:{configurable:!0}};$e.prototype.isInsideArea=function(){return this._segIndex===$e.INSIDE_AREA},$e.prototype.getCoordinate=function(){return this._pt},$e.prototype.getGeometryComponent=function(){return this._component},$e.prototype.getSegmentIndex=function(){return this._segIndex},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e},uv.INSIDE_AREA.get=function(){return-1},Object.defineProperties($e,uv);var us=function(t){this._pts=t||null};us.prototype.filter=function(t){t instanceof vr&&this._pts.add(t)},us.prototype.interfaces_=function(){return[In]},us.prototype.getClass=function(){return us},us.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof vr?ln.singletonList(t):us.getPoints(t,new j)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof vr?n.add(e):e instanceof Ye&&e.apply(new us(n)),n}};var Po=function(){this._locations=null;var t=arguments[0];this._locations=t};Po.prototype.filter=function(t){(t instanceof vr||t instanceof le||t instanceof Pe)&&this._locations.add(new $e(t,0,t.getCoordinate()))},Po.prototype.interfaces_=function(){return[In]},Po.prototype.getClass=function(){return Po},Po.getLocations=function(t){var e=new j;return t.apply(new Po(e)),e};var Ge=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new fn,this._minDistanceLocation=null,this._minDistance=yt.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=s}};Ge.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=1-n,o=Gi.getPolygons(this._geom[n]);if(o.size()>0){var a=Po.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[n]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&pt(arguments[0],on)&&pt(arguments[1],on)){for(var u=arguments[0],h=arguments[1],l=arguments[2],c=0;c<u.size();c++)for(var f=u.get(c),p=0;p<h.size();p++)if(t.computeContainmentDistance(f,h.get(p),l),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof $e&&arguments[1]instanceof Pe){var v=arguments[0],w=arguments[1],E=arguments[2],I=v.getCoordinate();if(F.EXTERIOR!==this._ptLocator.locate(I,w))return this._minDistance=0,E[0]=v,E[1]=new $e(w,I),null}}},Ge.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,n),i._minDistance<=i._terminateDistance)return null}},Ge.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Fe.getLines(this._geom[0]),n=Fe.getLines(this._geom[1]),i=us.getPoints(this._geom[0]),s=us.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},Ge.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Ge.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Ge.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},Ge.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof le&&arguments[1]instanceof vr){var e=arguments[0],n=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=n.getCoordinate(),a=0;a<s.length-1;a++){var u=K.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var h=new ut(s[a],s[a+1]),l=h.closestPoint(o);i[0]=new $e(e,a,l),i[1]=new $e(n,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof le&&arguments[1]instanceof le){var c=arguments[0],f=arguments[1],p=arguments[2];if(c.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var v=c.getCoordinates(),w=f.getCoordinates(),E=0;E<v.length-1;E++)for(var I=0;I<w.length-1;I++){var y=K.distanceLineLine(v[E],v[E+1],w[I],w[I+1]);if(y<t._minDistance){t._minDistance=y;var _=new ut(v[E],v[E+1]),m=new ut(w[I],w[I+1]),S=_.closestPoints(m);p[0]=new $e(c,E,S[0]),p[1]=new $e(f,I,S[1])}if(t._minDistance<=t._terminateDistance)return null}}}},Ge.prototype.computeMinDistancePoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),h=o.getCoordinate().distance(u.getCoordinate());if(h<i._minDistance&&(i._minDistance=h,n[0]=new $e(o,0,o.getCoordinate()),n[1]=new $e(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},Ge.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new se("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Ge.prototype.computeMinDistanceLines=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,n),i._minDistance<=i._terminateDistance)return null}},Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge},Ge.distance=function(t,e){var n=new Ge(t,e);return n.distance()},Ge.isWithinDistance=function(t,e,n){var i=new Ge(t,e,n);return i.distance()<=n},Ge.nearestPoints=function(t,e){var n=new Ge(t,e);return n.nearestPoints()};var He=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};He.prototype.getCoordinates=function(){return this._pt},He.prototype.getCoordinate=function(t){return this._pt[t]},He.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},He.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},He.prototype.toString=function(){return sn.toLineString(this._pt[0],this._pt[1])},He.prototype.getDistance=function(){return this._distance},He.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Ln=function(){};Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln},Ln.computeDistance=function(){if(arguments[2]instanceof He&&arguments[0]instanceof le&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new ut,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);n.setMinimum(a,e)}else if(arguments[2]instanceof He&&arguments[0]instanceof Pe&&arguments[1]instanceof D){var u=arguments[0],h=arguments[1],l=arguments[2];Ln.computeDistance(u.getExteriorRing(),h,l);for(var c=0;c<u.getNumInteriorRing();c++)Ln.computeDistance(u.getInteriorRingN(c),h,l)}else if(arguments[2]instanceof He&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],p=arguments[1],v=arguments[2];if(f instanceof le)Ln.computeDistance(f,p,v);else if(f instanceof Pe)Ln.computeDistance(f,p,v);else if(f instanceof Ye)for(var w=f,E=0;E<w.getNumGeometries();E++){var I=w.getGeometryN(E);Ln.computeDistance(I,p,v)}else v.setMinimum(f.getCoordinate(),p)}else if(arguments[2]instanceof He&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],_=arguments[1],m=arguments[2],S=y.closestPoint(_);m.setMinimum(S,_)}};var Qr=function(){this._g0=null,this._g1=null,this._ptDist=new He,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Ef={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Qr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Qr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new se("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Qr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Qr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Qr.prototype.computeOrientedDistance=function(t,e,n){var i=new Io(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new hs(e,this._densifyFrac);t.apply(s),n.setMaximum(s.getMaxPointDistance())}},Qr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},Qr.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Qr(t,e);return n.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new Qr(i,s);return a.setDensifyFraction(o),a.distance()}},Ef.MaxPointDistanceFilter.get=function(){return Io},Ef.MaxDensifiedByFractionDistanceFilter.get=function(){return hs},Object.defineProperties(Qr,Ef);var Io=function(){this._maxPtDist=new He,this._minPtDist=new He,this._euclideanDist=new Ln,this._geom=null;var t=arguments[0];this._geom=t};Io.prototype.filter=function(t){this._minPtDist.initialize(),Ln.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Io.prototype.getMaxPointDistance=function(){return this._maxPtDist},Io.prototype.interfaces_=function(){return[ri]},Io.prototype.getClass=function(){return Io};var hs=function(){this._maxPtDist=new He,this._minPtDist=new He,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};hs.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var h=i.x+u*o,l=i.y+u*a,c=new D(h,l);n._minPtDist.initialize(),Ln.computeDistance(n._geom,c,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},hs.prototype.isDone=function(){return!1},hs.prototype.isGeometryChanged=function(){return!1},hs.prototype.getMaxPointDistance=function(){return this._maxPtDist},hs.prototype.interfaces_=function(){return[un]},hs.prototype.getClass=function(){return hs};var _r=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Sf={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};_r.prototype.checkMaximumDistance=function(t,e,n){var i=new Qr(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+sn.toLineString(s[0],s[1])+")"}},_r.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=_r.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),_r.VERBOSE&&De.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},_r.prototype.checkNegativeValid=function(){if(!(this._input instanceof Pe||this._input instanceof ii||this._input instanceof Ye))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},_r.prototype.getErrorIndicator=function(){return this._errorIndicator},_r.prototype.checkMinimumDistance=function(t,e,n){var i=new Ge(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+sn.toLineString(s[0],s[1])+" )"}},_r.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},_r.prototype.getErrorLocation=function(){return this._errorLocation},_r.prototype.getPolygonLines=function(t){for(var e=new j,n=new Fe(e),i=Gi.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(n)}return t.getFactory().buildGeometry(e)},_r.prototype.getErrorMessage=function(){return this._errMsg},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r},Sf.VERBOSE.get=function(){return!1},Sf.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(_r,Sf);var ke=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},Cf={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ke.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},ke.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*ke.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new at(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new at(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},ke.prototype.checkDistance=function(){var t=new _r(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},ke.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ke.prototype.checkPolygonal=function(){this._result instanceof Pe||this._result instanceof ii||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ke.prototype.getErrorIndicator=function(){return this._errorIndicator},ke.prototype.getErrorLocation=function(){return this._errorLocation},ke.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},ke.prototype.report=function(t){if(!ke.VERBOSE)return null;De.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},ke.prototype.getErrorMessage=function(){return this._errorMsg},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.isValidMsg=function(t,e,n){var i=new ke(t,e,n);return i.isValid()?null:i.getErrorMessage()},ke.isValid=function(t,e,n){var i=new ke(t,e,n);return!!i.isValid()},Cf.VERBOSE.get=function(){return!1},Cf.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(ke,Cf);var Rn=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Rn.prototype.getCoordinates=function(){return this._pts},Rn.prototype.size=function(){return this._pts.length},Rn.prototype.getCoordinate=function(t){return this._pts[t]},Rn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Rn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:_o.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Rn.prototype.setData=function(t){this._data=t},Rn.prototype.getData=function(){return this._data},Rn.prototype.toString=function(){return sn.toLineString(new ge(this._pts))},Rn.prototype.interfaces_=function(){return[oi]},Rn.prototype.getClass=function(){return Rn};var xe=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new j,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};xe.prototype.getInteriorIntersection=function(){return this._interiorIntersection},xe.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},xe.prototype.getIntersectionSegments=function(){return this._intSegments},xe.prototype.count=function(){return this._intersectionCount},xe.prototype.getIntersections=function(){return this._intersections},xe.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},xe.prototype.setKeepIntersections=function(t){this._keepIntersections=t},xe.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(n,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=n.getCoordinates()[i],h=n.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,h),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=h,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},xe.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},xe.prototype.hasIntersection=function(){return this._interiorIntersection!==null},xe.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},xe.prototype.interfaces_=function(){return[Gs]},xe.prototype.getClass=function(){return xe},xe.createAllIntersectionsFinder=function(t){var e=new xe(t);return e.setFindAllIntersections(!0),e},xe.createAnyIntersectionFinder=function(t){return new xe(t)},xe.createIntersectionCounter=function(t){var e=new xe(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var dn=function(){this._li=new As,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};dn.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},dn.prototype.getIntersections=function(){return this._segInt.getIntersections()},dn.prototype.isValid=function(){return this.execute(),this._isValid},dn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},dn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new xe(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new _f;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},dn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Di(this.getErrorMessage(),this._segInt.getInteriorIntersection())},dn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+sn.toLineString(t[0],t[1])+" and "+sn.toLineString(t[2],t[3])},dn.prototype.interfaces_=function(){return[]},dn.prototype.getClass=function(){return dn},dn.computeIntersections=function(t){var e=new dn(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Us=function r(){this._nv=null;var t=arguments[0];this._nv=new dn(r.toSegmentStrings(t))};Us.prototype.checkValid=function(){this._nv.checkValid()},Us.prototype.interfaces_=function(){return[]},Us.prototype.getClass=function(){return Us},Us.toSegmentStrings=function(t){for(var e=new j,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Rn(i.getCoordinates(),i))}return e},Us.checkValid=function(t){var e=new Us(t);e.checkValid()};var Mo=function(t){this._mapOp=t};Mo.prototype.map=function(t){for(var e=this,n=new j,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||n.add(s)}return t.getFactory().createGeometryCollection(xt.toGeometryArray(n))},Mo.prototype.interfaces_=function(){return[]},Mo.prototype.getClass=function(){return Mo},Mo.map=function(t,e){var n=new Mo(e);return n.map(t)};var Fn=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new j,this._resultLineList=new j;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Fn.prototype.collectLines=function(t){for(var e=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var i=n.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},Fn.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Fn.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Fn.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&St.isResultOfOp(i,e)&&!s.isCovered()&&(n.add(s),t.setVisitedEdge(!0))},Fn.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();n.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},Fn.prototype.labelIsolatedLines=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},Fn.prototype.buildLines=function(t){for(var e=this,n=this._lineEdgesList.iterator();n.hasNext();){var i=n.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},Fn.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;Pt.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),St.isResultOfOp(i,e)&&e===St.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))},Fn.prototype.interfaces_=function(){return[]},Fn.prototype.getClass=function(){return Fn};var bo=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new j;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};bo.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},bo.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===St.INTERSECTION)){var s=i.getLabel();St.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},bo.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},bo.prototype.interfaces_=function(){return[]},bo.prototype.getClass=function(){return bo};var ur=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};ur.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},ur.prototype.transformPolygon=function(t,e){var n=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof ni)||s.isEmpty())&&(i=!1);for(var o=new j,a=0;a<t.getNumInteriorRing();a++){var u=n.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof ni||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var h=new j;return s!==null&&h.add(s),h.addAll(o),this._factory.buildGeometry(h)},ur.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},ur.prototype.getInputGeometry=function(){return this._inputGeom},ur.prototype.transformMultiLineString=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ur.prototype.transformCoordinates=function(t,e){return this.copy(t)},ur.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},ur.prototype.transformMultiPoint=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ur.prototype.transformMultiPolygon=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ur.prototype.copy=function(t){return t.copy()},ur.prototype.transformGeometryCollection=function(t,e){for(var n=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=n.transform(t.getGeometryN(s));o!==null&&(n._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(xt.toGeometryArray(i)):this._factory.buildGeometry(i)},ur.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof vr)return this.transformPoint(t,null);if(t instanceof Ca)return this.transformMultiPoint(t,null);if(t instanceof ni)return this.transformLinearRing(t,null);if(t instanceof le)return this.transformLineString(t,null);if(t instanceof Ls)return this.transformMultiLineString(t,null);if(t instanceof Pe)return this.transformPolygon(t,null);if(t instanceof ii)return this.transformMultiPolygon(t,null);if(t instanceof Ye)return this.transformGeometryCollection(t,null);throw new se("Unknown Geometry subtype: "+t.getClass().getName())},ur.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(n===null)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur};var ci=function r(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new ut,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof le&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];r.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=r.isClosed(n),this._snapTolerance=i}};ci.prototype.snapVertices=function(t,e){for(var n=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=n.findSnapForVertex(o,e);a!==null&&(t.set(s,new D(a)),s===0&&n._isClosed&&t.set(t.size()-1,new D(a)))}},ci.prototype.findSnapForVertex=function(t,e){for(var n=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<n._snapTolerance)return e[i]}return null},ci.prototype.snapTo=function(t){var e=new $u(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var n=e.toCoordinateArray();return n},ci.prototype.snapSegments=function(t,e){var n=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=n.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new D(o),!1)}},ci.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,i=yt.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(n._seg.p0=e.get(o),n._seg.p1=e.get(o+1),n._seg.p0.equals2D(t)||n._seg.p1.equals2D(t)){if(n._allowSnappingToSourceVertices)continue;return-1}var a=n._seg.distance(t);a<n._snapTolerance&&a<i&&(i=a,s=o)}return s},ci.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},ci.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var ve=function(t){this._srcGeom=t||null},hv={SNAP_PRECISION_FACTOR:{configurable:!0}};ve.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t),i=new lv(e,n);return i.transform(this._srcGeom)},ve.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new lv(t,n,!0),s=i.transform(this._srcGeom),o=s;return e&&pt(o,rs)&&(o=s.buffer(0)),o},ve.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),n=e/10;return n},ve.prototype.extractTargetCoordinates=function(t){for(var e=new Pn,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},ve.prototype.computeMinimumSegmentLength=function(t){for(var e=yt.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},ve.prototype.interfaces_=function(){return[]},ve.prototype.getClass=function(){return ve},ve.snap=function(t,e,n){var i=new Array(2).fill(null),s=new ve(t);i[0]=s.snapTo(e,n);var o=new ve(e);return i[1]=o.snapTo(i[0],n),i},ve.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=ve.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===Ut.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(ve.computeOverlaySnapTolerance(s),ve.computeOverlaySnapTolerance(o))}},ve.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),i=n*ve.SNAP_PRECISION_FACTOR;return i},ve.snapToSelf=function(t,e,n){var i=new ve(t);return i.snapToSelf(e,n)},hv.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(ve,hv);var lv=function(r){function t(e,n,i){r.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=i!==void 0?i:!1}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(n,i){var s=new ci(n,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(n,i){var s=n.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ur),Ze=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Ze.prototype.getCommon=function(){return yt.longBitsToDouble(this._commonBits)},Ze.prototype.add=function(t){var e=yt.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Ze.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Ze.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Ze.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Ze.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},Ze.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=yt.longBitsToDouble(t),n=yt.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+n,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze},Ze.getBit=function(t,e){var n=1<<e;return(t&n)!==0?1:0},Ze.signExpBits=function(t){return t>>52},Ze.zeroLowerBits=function(t,e){var n=(1<<e)-1,i=~n,s=t&i;return s},Ze.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if(Ze.getBit(t,i)!==Ze.getBit(e,i))return n;n++}return 52};var ls=function(){this._commonCoord=null,this._ccFilter=new No},Pf={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ls.prototype.addCommonBits=function(t){var e=new cs(this._commonCoord);t.apply(e),t.geometryChanged()},ls.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new D(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new cs(e);return t.apply(n),t.geometryChanged(),t},ls.prototype.getCommonCoordinate=function(){return this._commonCoord},ls.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ls.prototype.interfaces_=function(){return[]},ls.prototype.getClass=function(){return ls},Pf.CommonCoordinateFilter.get=function(){return No},Pf.Translater.get=function(){return cs},Object.defineProperties(ls,Pf);var No=function(){this._commonBitsX=new Ze,this._commonBitsY=new Ze};No.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},No.prototype.getCommonCoordinate=function(){return new D(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},No.prototype.interfaces_=function(){return[ri]},No.prototype.getClass=function(){return No};var cs=function(){this.trans=null;var t=arguments[0];this.trans=t};cs.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},cs.prototype.isDone=function(){return!1},cs.prototype.isGeometryChanged=function(){return!0},cs.prototype.interfaces_=function(){return[un]},cs.prototype.getClass=function(){return cs};var Te=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Te.prototype.selfSnap=function(t){var e=new ve(t),n=e.snapTo(t,this._snapTolerance);return n},Te.prototype.removeCommonBits=function(t){this._cbr=new ls,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},Te.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},Te.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=St.overlayOp(e[0],e[1],t);return this.prepareResult(n)},Te.prototype.checkValid=function(t){t.isValid()||De.out.println("Snapped geometry is invalid")},Te.prototype.computeSnapTolerance=function(){this._snapTolerance=ve.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Te.prototype.snap=function(t){var e=this.removeCommonBits(t),n=ve.snap(e[0],e[1],this._snapTolerance);return n},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te},Te.overlayOp=function(t,e,n){var i=new Te(t,e);return i.getResultGeometry(n)},Te.union=function(t,e){return Te.overlayOp(t,e,St.UNION)},Te.intersection=function(t,e){return Te.overlayOp(t,e,St.INTERSECTION)},Te.symDifference=function(t,e){return Te.overlayOp(t,e,St.SYMDIFFERENCE)},Te.difference=function(t,e){return Te.overlayOp(t,e,St.DIFFERENCE)};var tr=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};tr.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=St.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(n=!0)}catch(o){if(o instanceof bi)i=o;else throw o}finally{}if(!n)try{e=Te.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof bi?i:o}finally{}return e},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},tr.overlayOp=function(t,e,n){var i=new tr(t,e);return i.getResultGeometry(n)},tr.union=function(t,e){return tr.overlayOp(t,e,St.UNION)},tr.intersection=function(t,e){return tr.overlayOp(t,e,St.INTERSECTION)},tr.symDifference=function(t,e){return tr.overlayOp(t,e,St.SYMDIFFERENCE)},tr.difference=function(t,e){return tr.overlayOp(t,e,St.DIFFERENCE)};var dh=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};dh.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},dh.prototype.interfaces_=function(){return[]},dh.prototype.getClass=function(){return dh};var wr=function r(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=r.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._eventType=r.INSERT,this._label=n,this._xValue=i,this._obj=s}},If={INSERT:{configurable:!0},DELETE:{configurable:!0}};wr.prototype.isDelete=function(){return this._eventType===wr.DELETE},wr.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},wr.prototype.getObject=function(){return this._obj},wr.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},wr.prototype.getInsertEvent=function(){return this._insertEvent},wr.prototype.isInsert=function(){return this._eventType===wr.INSERT},wr.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},wr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},wr.prototype.interfaces_=function(){return[Wr]},wr.prototype.getClass=function(){return wr},If.INSERT.get=function(){return 1},If.DELETE.get=function(){return 2},Object.defineProperties(wr,If);var bl=function(){};bl.prototype.interfaces_=function(){return[]},bl.prototype.getClass=function(){return bl};var Ve=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};Ve.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(Ve.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Ve.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ve.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ve.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ve.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},Ve.prototype.hasProperIntersection=function(){return this._hasProper},Ve.prototype.hasIntersection=function(){return this._hasIntersection},Ve.prototype.isDone=function(){return this._isDone},Ve.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},Ve.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ve.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var RP=function(r){function t(){r.call(this),this.events=new j,this.nOverlaps=null}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var n=this;ln.sort(this.events);for(var i=0;i<this.events.size();i++){var s=n.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var n=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=n.events.get(s);if(o.isInsert()&&n.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ve&&pt(arguments[0],on)&&pt(arguments[1],on)){var a=arguments[0],u=arguments[1],h=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(h)}else if(typeof arguments[2]=="boolean"&&pt(arguments[0],on)&&arguments[1]instanceof Ve){var l=arguments[0],c=arguments[1],f=arguments[2];f?this.addEdges(l,null):this.addEdges(l),this.computeIntersections(c)}}},t.prototype.addEdge=function(n,i){for(var s=this,o=n.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var h=new dh(o,u),l=new wr(i,o.getMinX(u),h);s.events.add(l),s.events.add(new wr(o.getMaxX(u),l))}},t.prototype.processOverlaps=function(n,i,s,o){for(var a=this,u=s.getObject(),h=n;h<i;h++){var l=a.events.get(h);if(l.isInsert()){var c=l.getObject();s.isSameLabel(l)||(u.computeIntersections(c,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var n=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();n.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],h=a.iterator();h.hasNext();){var l=h.next();n.addEdge(l,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(bl),fi=function(){this._min=yt.POSITIVE_INFINITY,this._max=yt.NEGATIVE_INFINITY},cv={NodeComparator:{configurable:!0}};fi.prototype.getMin=function(){return this._min},fi.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},fi.prototype.getMax=function(){return this._max},fi.prototype.toString=function(){return sn.toLineString(new D(this._min,0),new D(this._max,0))},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},cv.NodeComparator.get=function(){return gh},Object.defineProperties(fi,cv);var gh=function(){};gh.prototype.compare=function(t,e){var n=t,i=e,s=(n._min+n._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},gh.prototype.interfaces_=function(){return[fa]},gh.prototype.getClass=function(){return gh};var FP=function(r){function t(){r.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),GP=function(r){function t(){r.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(n,i){this._min=Math.min(n._min,i._min),this._max=Math.max(n._max,i._max)},t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;this._node1!==null&&this._node1.query(n,i,s),this._node2!==null&&this._node2.query(n,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),di=function(){this._leaves=new j,this._root=null,this._level=0};di.prototype.buildTree=function(){var t=this;ln.sort(this._leaves,new fi.NodeComparator);for(var e=this._leaves,n=null,i=new j;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);n=e,e=i,i=n}},di.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new FP(t,e,n))},di.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},di.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},di.prototype.printNode=function(t){De.out.println(sn.toLineString(new D(t._min,this._level),new D(t._max,this._level)))},di.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},di.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n),s=n+1<t.size()?t.get(n):null;if(s===null)e.add(i);else{var o=new GP(t.get(n),t.get(n+1));e.add(o)}}},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di};var Ta=function(){this._items=new j};Ta.prototype.visitItem=function(t){this._items.add(t)},Ta.prototype.getItems=function(){return this._items},Ta.prototype.interfaces_=function(){return[ns]},Ta.prototype.getClass=function(){return Ta};var Aa=function(){this._index=null;var t=arguments[0];if(!pt(t,rs))throw new se("Argument must be Polygonal");this._index=new zs(t)},Mf={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Aa.prototype.locate=function(t){var e=new Cn(t),n=new Oa(e);return this._index.query(t.y,t.y,n),e.getLocation()},Aa.prototype.interfaces_=function(){return[ba]},Aa.prototype.getClass=function(){return Aa},Mf.SegmentVisitor.get=function(){return Oa},Mf.IntervalIndexedGeometry.get=function(){return zs},Object.defineProperties(Aa,Mf);var Oa=function(){this._counter=null;var t=arguments[0];this._counter=t};Oa.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Oa.prototype.interfaces_=function(){return[ns]},Oa.prototype.getClass=function(){return Oa};var zs=function(){this._index=new di;var t=arguments[0];this.init(t)};zs.prototype.init=function(t){for(var e=this,n=Fe.getLines(t),i=n.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},zs.prototype.addLine=function(t){for(var e=this,n=1;n<t.length;n++){var i=new ut(t[n-1],t[n]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},zs.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Ta;return this._index.query(t,e,n),n.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},zs.prototype.interfaces_=function(){return[]},zs.prototype.getClass=function(){return zs};var ph=function(r){function t(){if(r.call(this),this._parentGeom=null,this._lineEdgeMap=new B0,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new fn,arguments.length===2){var e=arguments[0],n=arguments[1],i=Hr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,n!==null&&this.add(n)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(n,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=F.NONE;u=o.getLocation(n,B.ON),u===F.BOUNDARY&&a++;var h=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(n,h)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.computeSelfNodes(n,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Ve(s,!0,!1);u.setIsDoneIfProperInt(a);var h=this.createEdgeSetIntersector(),l=this._parentGeom instanceof ni||this._parentGeom instanceof Pe||this._parentGeom instanceof ii,c=o||!l;return h.computeIntersections(this._edges,u,c),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(n){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(n)}},t.prototype.computeEdgeIntersections=function(n,i,s){var o=new Ve(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),n.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,n._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof vr){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,F.INTERIOR)}else if(arguments[0]instanceof D){var s=arguments[0];this.insertPoint(this._argIndex,s,F.INTERIOR)}},t.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),F.EXTERIOR,F.INTERIOR);for(var s=0;s<n.getNumInteriorRing();s++){var o=n.getInteriorRingN(s);i.addPolygonRing(o,F.INTERIOR,F.EXTERIOR)}},t.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],F.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],F.BOUNDARY)},t.prototype.addLineString=function(n){var i=Nt.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Ml(i,new Yt(this._argIndex,F.INTERIOR));this._lineEdgeMap.put(n,s),this.insertEdge(s),Pt.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),i=new Array(n.size()).fill(null),s=0,o=n.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(n,i,s){if(this.isBoundaryNode(n,i))return null;s===F.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,i):this.insertPoint(n,i,s)},t.prototype.addPolygonRing=function(n,i,s){if(n.isEmpty())return null;var o=Nt.removeRepeatedPoints(n.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;K.isCCW(o)&&(a=s,u=i);var h=new Ml(o,new Yt(this._argIndex,F.BOUNDARY,a,u));this._lineEdgeMap.put(n,h),this.insertEdge(h),this.insertPoint(this._argIndex,o[0],F.BOUNDARY)},t.prototype.insertPoint=function(n,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Yt(n,s):a.setLocation(n,s)},t.prototype.createEdgeSetIntersector=function(){return new RP},t.prototype.addSelfIntersectionNodes=function(n){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(n),u=o.eiList.iterator();u.hasNext();){var h=u.next();i.addSelfIntersectionNode(n,h.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof ii&&(this._useBoundaryDeterminationRule=!1),n instanceof Pe)this.addPolygon(n);else if(n instanceof le)this.addLineString(n);else if(n instanceof vr)this.addPoint(n);else if(n instanceof Ca)this.addCollection(n);else if(n instanceof Ls)this.addCollection(n);else if(n instanceof ii)this.addCollection(n);else if(n instanceof Ye)this.addCollection(n);else throw new Error(n.getClass().getName())}else return r.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(n){for(var i=this,s=0;s<n.getNumGeometries();s++){var o=n.getGeometryN(s);i.add(o)}},t.prototype.locate=function(n){return pt(this._parentGeom,rs)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Aa(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return r.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(n,i){return n.isInBoundary(i)?F.BOUNDARY:F.INTERIOR},t}(he),Da=function(){if(this._li=new As,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new ph(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=Hr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ph(0,e,i),this._arg[1]=new ph(1,n,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ph(0,s,a),this._arg[1]=new ph(1,o,a)}};Da.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Da.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Da.prototype.interfaces_=function(){return[]},Da.prototype.getClass=function(){return Da};var qs=function(){};qs.prototype.interfaces_=function(){return[]},qs.prototype.getClass=function(){return qs},qs.map=function(){if(arguments[0]instanceof gt&&pt(arguments[1],qs.MapOp)){for(var t=arguments[0],e=arguments[1],n=new j,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&n.add(s)}return t.getFactory().buildGeometry(n)}else if(pt(arguments[0],Ce)&&pt(arguments[1],qs.MapOp)){for(var o=arguments[0],a=arguments[1],u=new j,h=o.iterator();h.hasNext();){var l=h.next(),c=a.map(l);c!==null&&u.add(c)}return u}},qs.MapOp=function(){};var St=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n),this._ptLocator=new fn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new cn,this._resultPolyList=new j,this._resultLineList=new j,this._resultPointList=new j,this._graph=new he(new rv),this._geomFact=e.getFactory()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(n){var i=this._edgeList.findEqualEdge(n);if(i!==null){var s=i.getLabel(),o=n.getLabel();i.isPointwiseEqual(n)||(o=new Yt(n.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(n)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(n){return!!(this.isCovered(n,this._resultLineList)||this.isCovered(n,this._resultPolyList))},t.prototype.computeGeometry=function(n,i,s,o){var a=new j;return a.addAll(n),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(n,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(n,a);if(u!==F.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var n=new j,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),n.add(s.getCollapsedEdge()))}this._edgeList.addAll(n)},t.prototype.updateNodeLabelling=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(n){return this.computeOverlay(n),this._resultGeom},t.prototype.insertUniqueEdges=function(n){for(var i=this,s=n.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(n){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new j;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Us.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var s=new mr(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new Fn(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(n);var a=new bo(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(n),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,n)},t.prototype.labelIncompleteNode=function(n,i){var s=this._ptLocator.locate(n.getCoordinate(),this._arg[i].getGeometry());n.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(n){for(var i=this,s=this._arg[n].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(n,o.getLabel().getLocation(n))}},t.prototype.findResultAreaEdges=function(n){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,B.RIGHT),o.getLocation(1,B.RIGHT),n)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var n=this._edgeList.iterator();n.hasNext();){var i=n.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(Pt.isTrue(!o.isNull(a,B.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,B.LEFT,o.getLocation(a,B.LEFT)),Pt.isTrue(!o.isNull(a,B.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,B.RIGHT,o.getLocation(a,B.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(n._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?n.labelIncompleteNode(s,0):n.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(n){return!!this.isCovered(n,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Da);St.overlayOp=function(r,t,e){var n=new St(r,t),i=n.getResultGeometry(e);return i},St.intersection=function(r,t){if(r.isEmpty()||t.isEmpty())return St.createEmptyResult(St.INTERSECTION,r,t,r.getFactory());if(r.isGeometryCollection()){var e=t;return Mo.map(r,{interfaces_:function(){return[qs.MapOp]},map:function(n){return n.intersection(e)}})}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),tr.overlayOp(r,t,St.INTERSECTION)},St.symDifference=function(r,t){if(r.isEmpty()||t.isEmpty()){if(r.isEmpty()&&t.isEmpty())return St.createEmptyResult(St.SYMDIFFERENCE,r,t,r.getFactory());if(r.isEmpty())return t.copy();if(t.isEmpty())return r.copy()}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),tr.overlayOp(r,t,St.SYMDIFFERENCE)},St.resultDimension=function(r,t,e){var n=t.getDimension(),i=e.getDimension(),s=-1;switch(r){case St.INTERSECTION:s=Math.min(n,i);break;case St.UNION:s=Math.max(n,i);break;case St.DIFFERENCE:s=n;break;case St.SYMDIFFERENCE:s=Math.max(n,i);break}return s},St.createEmptyResult=function(r,t,e,n){var i=null;switch(St.resultDimension(r,t,e)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon();break}return i},St.difference=function(r,t){return r.isEmpty()?St.createEmptyResult(St.DIFFERENCE,r,t,r.getFactory()):t.isEmpty()?r.copy():(r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),tr.overlayOp(r,t,St.DIFFERENCE))},St.isResultOfOp=function(){if(arguments.length===2){var r=arguments[0],t=arguments[1],e=r.getLocation(0),n=r.getLocation(1);return St.isResultOfOp(e,n,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===F.BOUNDARY&&(i=F.INTERIOR),s===F.BOUNDARY&&(s=F.INTERIOR),o){case St.INTERSECTION:return i===F.INTERIOR&&s===F.INTERIOR;case St.UNION:return i===F.INTERIOR||s===F.INTERIOR;case St.DIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR;case St.SYMDIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR||i!==F.INTERIOR&&s===F.INTERIOR}return!1}},St.INTERSECTION=1,St.UNION=2,St.DIFFERENCE=3,St.SYMDIFFERENCE=4;var fs=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new fn,this._seg=new ut;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};fs.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,n=0;n<this._linework.getNumGeometries();n++)for(var i=e._linework.getGeometryN(n),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},fs.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?F.BOUNDARY:this._ptLocator.locate(t,this._g)},fs.prototype.extractLinework=function(t){var e=new La;t.apply(e);var n=e.getLinework(),i=xt.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},fs.prototype.interfaces_=function(){return[]},fs.prototype.getClass=function(){return fs};var La=function(){this._linework=null,this._linework=new j};La.prototype.getLinework=function(){return this._linework},La.prototype.filter=function(t){var e=this;if(t instanceof Pe){var n=t;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)e._linework.add(n.getInteriorRingN(i))}},La.prototype.interfaces_=function(){return[In]},La.prototype.getClass=function(){return La};var Ws=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Ws.prototype.extractPoints=function(t,e,n){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,n)},Ws.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Ws.prototype.getPoints=function(t){for(var e=this,n=new j,i=Fe.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,n)}return n},Ws.prototype.computeOffsetPoints=function(t,e,n,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=n*s/a,h=n*o/a,l=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var f=new D(l-h,c+u);i.add(f)}if(this._doRight){var p=new D(l+h,c-u);i.add(p)}},Ws.prototype.interfaces_=function(){return[]},Ws.prototype.getClass=function(){return Ws};var Fr=function r(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=r.TOLERANCE,this._testCoords=new j;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=r.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,n],this._locFinder=[new fs(this._geom[0],this._boundaryDistanceTolerance),new fs(this._geom[1],this._boundaryDistanceTolerance),new fs(this._geom[2],this._boundaryDistanceTolerance)]},fv={TOLERANCE:{configurable:!0}};Fr.prototype.reportResult=function(t,e,n){De.out.println("Overlay result invalid - A:"+F.toLocationSymbol(e[0])+" B:"+F.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+F.toLocationSymbol(e[2]))},Fr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Fr.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=0;n<this._testCoords.size();n++){var i=t._testCoords.get(n);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),Fr.hasLocation(this._location,F.BOUNDARY)?!0:this.isValidResult(s,this._location)}},Fr.prototype.addTestPts=function(t){var e=new Ws(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Fr.prototype.isValidResult=function(t,e){var n=St.isResultOfOp(e[0],e[1],t),i=e[2]===F.INTERIOR,s=!(n^i);return s||this.reportResult(t,e,n),s},Fr.prototype.getInvalidLocation=function(){return this._invalidLocation},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Fr.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Fr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(ve.computeSizeBasedSnapTolerance(t),ve.computeSizeBasedSnapTolerance(e))},Fr.isValid=function(t,e,n,i){var s=new Fr(t,e,i);return s.isValid(n)},fv.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Fr,fv);var Gr=function r(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=r.extractFactory(t),this._inputGeoms=t};Gr.prototype.extractElements=function(t,e){var n=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);n._skipEmpty&&s.isEmpty()||e.add(s)}},Gr.prototype.combine=function(){for(var t=this,e=new j,n=this._inputGeoms.iterator();n.hasNext();){var i=n.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.combine=function(){if(arguments.length===1){var t=arguments[0],e=new Gr(t);return e.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Gr(Gr.createList(n,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],h=new Gr(Gr.createList(o,a,u));return h.combine()}},Gr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Gr.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new j;return n.add(t),n.add(e),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new j;return a.add(i),a.add(s),a.add(o),a}};var we=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new j)},dv={STRTREE_NODE_CAPACITY:{configurable:!0}};we.prototype.reduceToGeometries=function(t){for(var e=this,n=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=null;pt(s,on)?o=e.unionTree(s):s instanceof gt&&(o=s),n.add(o)}return n},we.prototype.extractByEnvelope=function(t,e,n){for(var i=new j,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):n.add(o)}return this._geomFactory.buildGeometry(i)},we.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i)){var s=Gr.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},we.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new Q0(we.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},we.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var s=we.getGeometry(e,n);return this.unionSafe(s,null)}else{if(i-n===2)return this.unionSafe(we.getGeometry(e,n),we.getGeometry(e,n+1));var o=Math.trunc((i+n)/2),a=this.binaryUnion(e,n,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},we.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e===null?e=i.copy():e=e.union(i)}return e},we.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},we.prototype.unionActual=function(t,e){return we.restrictToPolygons(t.union(e))},we.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),n=this.binaryUnion(e);return n},we.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new j,s=this.extractByEnvelope(n,t,i),o=this.extractByEnvelope(n,e,i),a=this.unionActual(s,o);i.add(a);var u=Gr.combine(i);return u},we.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),n=e.buildGeometry(t),i=n.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),h=u.buffer(0);return h}},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we},we.restrictToPolygons=function(t){if(pt(t,rs))return t;var e=Gi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(xt.toPolygonArray(e))},we.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},we.union=function(t){var e=new we(t);return e.union()},dv.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(we,dv);var Nl=function(){};Nl.prototype.interfaces_=function(){return[]},Nl.prototype.getClass=function(){return Nl},Nl.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return St.createEmptyResult(St.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),tr.overlayOp(t,e,St.UNION)};function Xs(){return new xl}function xl(){this.reset()}xl.prototype={constructor:xl,reset:function(){this.s=this.t=0},add:function(r){gv(Tl,r,this.t),gv(this,Tl.s,this.s),this.s?this.t+=Tl.t:this.s=Tl.t},valueOf:function(){return this.s}};var Tl=new xl;function gv(r,t,e){var n=r.s=t+e,i=n-t,s=n-i;r.t=t-s+(e-i)}var Ee=1e-6,jt=Math.PI,ki=jt/2,pv=jt/4,Vi=jt*2,Hs=180/jt,Gn=jt/180,er=Math.abs,kP=Math.atan,Ra=Math.atan2,Me=Math.cos,be=Math.sin,Fa=Math.sqrt;function vv(r){return r>1?0:r<-1?jt:Math.acos(r)}function xo(r){return r>1?ki:r<-1?-ki:Math.asin(r)}function vh(){}function Al(r,t){r&&yv.hasOwnProperty(r.type)&&yv[r.type](r,t)}var mv={Feature:function(r,t){Al(r.geometry,t)},FeatureCollection:function(r,t){for(var e=r.features,n=-1,i=e.length;++n<i;)Al(e[n].geometry,t)}},yv={Sphere:function(r,t){t.sphere()},Point:function(r,t){r=r.coordinates,t.point(r[0],r[1],r[2])},MultiPoint:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)r=e[n],t.point(r[0],r[1],r[2])},LineString:function(r,t){bf(r.coordinates,t,0)},MultiLineString:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)bf(e[n],t,0)},Polygon:function(r,t){_v(r.coordinates,t)},MultiPolygon:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)_v(e[n],t)},GeometryCollection:function(r,t){for(var e=r.geometries,n=-1,i=e.length;++n<i;)Al(e[n],t)}};function bf(r,t,e){var n=-1,i=r.length-e,s;for(t.lineStart();++n<i;)s=r[n],t.point(s[0],s[1],s[2]);t.lineEnd()}function _v(r,t){var e=-1,n=r.length;for(t.polygonStart();++e<n;)bf(r[e],t,1);t.polygonEnd()}function VP(r,t){r&&mv.hasOwnProperty(r.type)?mv[r.type](r,t):Al(r,t)}Xs(),Xs();function Nf(r){return[Ra(r[1],r[0]),xo(r[2])]}function Ga(r){var t=r[0],e=r[1],n=Me(e);return[n*Me(t),n*be(t),be(e)]}function Ol(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function Dl(r,t){return[r[1]*t[2]-r[2]*t[1],r[2]*t[0]-r[0]*t[2],r[0]*t[1]-r[1]*t[0]]}function xf(r,t){r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]}function Ll(r,t){return[r[0]*t,r[1]*t,r[2]*t]}function Tf(r){var t=Fa(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=t,r[1]/=t,r[2]/=t}Xs();function wv(r,t){function e(n,i){return n=r(n,i),t(n[0],n[1])}return r.invert&&t.invert&&(e.invert=function(n,i){return n=t.invert(n,i),n&&r.invert(n[0],n[1])}),e}function Af(r,t){return[r>jt?r-Vi:r<-jt?r+Vi:r,t]}Af.invert=Af;function UP(r,t,e){return(r%=Vi)?t||e?wv(Sv(r),Cv(t,e)):Sv(r):t||e?Cv(t,e):Af}function Ev(r){return function(t,e){return t+=r,[t>jt?t-Vi:t<-jt?t+Vi:t,e]}}function Sv(r){var t=Ev(r);return t.invert=Ev(-r),t}function Cv(r,t){var e=Me(r),n=be(r),i=Me(t),s=be(t);function o(a,u){var h=Me(u),l=Me(a)*h,c=be(a)*h,f=be(u),p=f*e+l*n;return[Ra(c*i-p*s,l*e-f*n),xo(p*i+c*s)]}return o.invert=function(a,u){var h=Me(u),l=Me(a)*h,c=be(a)*h,f=be(u),p=f*i-c*s;return[Ra(c*i+f*s,l*e+p*n),xo(p*e-l*n)]},o}function zP(r,t,e,n,i,s){if(e){var o=Me(t),a=be(t),u=n*e;i==null?(i=t+n*Vi,s=t-u/2):(i=Pv(o,i),s=Pv(o,s),(n>0?i<s:i>s)&&(i+=n*Vi));for(var h,l=i;n>0?l>s:l<s;l-=u)h=Nf([o,-a*Me(l),-a*be(l)]),r.point(h[0],h[1])}}function Pv(r,t){t=Ga(t),t[0]-=r,Tf(t);var e=vv(-t[1]);return((-t[2]<0?-e:e)+Vi-Ee)%Vi}function Iv(){var r=[],t;return{point:function(e,n){t.push([e,n])},lineStart:function(){r.push(t=[])},lineEnd:vh,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var e=r;return r=[],t=null,e}}}function qP(r,t,e,n,i,s){var o=r[0],a=r[1],u=t[0],h=t[1],l=0,c=1,f=u-o,p=h-a,v;if(v=e-o,!(!f&&v>0)){if(v/=f,f<0){if(v<l)return;v<c&&(c=v)}else if(f>0){if(v>c)return;v>l&&(l=v)}if(v=i-o,!(!f&&v<0)){if(v/=f,f<0){if(v>c)return;v>l&&(l=v)}else if(f>0){if(v<l)return;v<c&&(c=v)}if(v=n-a,!(!p&&v>0)){if(v/=p,p<0){if(v<l)return;v<c&&(c=v)}else if(p>0){if(v>c)return;v>l&&(l=v)}if(v=s-a,!(!p&&v<0)){if(v/=p,p<0){if(v>c)return;v>l&&(l=v)}else if(p>0){if(v<l)return;v<c&&(c=v)}return l>0&&(r[0]=o+l*f,r[1]=a+l*p),c<1&&(t[0]=o+c*f,t[1]=a+c*p),!0}}}}}function Rl(r,t){return er(r[0]-t[0])<Ee&&er(r[1]-t[1])<Ee}function Fl(r,t,e,n){this.x=r,this.z=t,this.o=e,this.e=n,this.v=!1,this.n=this.p=null}function Mv(r,t,e,n,i){var s=[],o=[],a,u;if(r.forEach(function(v){if(!((w=v.length-1)<=0)){var w,E=v[0],I=v[w],y;if(Rl(E,I)){for(i.lineStart(),a=0;a<w;++a)i.point((E=v[a])[0],E[1]);i.lineEnd();return}s.push(y=new Fl(E,v,null,!0)),o.push(y.o=new Fl(E,null,y,!1)),s.push(y=new Fl(I,v,null,!1)),o.push(y.o=new Fl(I,null,y,!0))}}),!!s.length){for(o.sort(t),bv(s),bv(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var h=s[0],l,c;;){for(var f=h,p=!0;f.v;)if((f=f.n)===h)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(a=0,u=l.length;a<u;++a)i.point((c=l[a])[0],c[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(l=f.p.z,a=l.length-1;a>=0;--a)i.point((c=l[a])[0],c[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,p=!p}while(!f.v);i.lineEnd()}}}function bv(r){if(t=r.length){for(var t,e=0,n=r[0],i;++e<t;)n.n=i=r[e],i.p=n,n=i;n.n=i=r[0],i.p=n}}function Nv(r,t){return r<t?-1:r>t?1:r>=t?0:NaN}function WP(r){return r.length===1&&(r=XP(r)),{left:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)<0?n=s+1:i=s}return n},right:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)>0?i=s:n=s+1}return n}}}function XP(r){return function(t,e){return Nv(r(t),e)}}WP(Nv);function xv(r){for(var t=r.length,e,n=-1,i=0,s,o;++n<t;)i+=r[n].length;for(s=new Array(i);--t>=0;)for(o=r[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var Gl=1e9,kl=-1e9;function HP(r,t,e,n){function i(h,l){return r<=h&&h<=e&&t<=l&&l<=n}function s(h,l,c,f){var p=0,v=0;if(h==null||(p=o(h,c))!==(v=o(l,c))||u(h,l)<0^c>0)do f.point(p===0||p===3?r:e,p>1?n:t);while((p=(p+c+4)%4)!==v);else f.point(l[0],l[1])}function o(h,l){return er(h[0]-r)<Ee?l>0?0:3:er(h[0]-e)<Ee?l>0?2:1:er(h[1]-t)<Ee?l>0?1:0:l>0?3:2}function a(h,l){return u(h.x,l.x)}function u(h,l){var c=o(h,1),f=o(l,1);return c!==f?c-f:c===0?l[1]-h[1]:c===1?h[0]-l[0]:c===2?h[1]-l[1]:l[0]-h[0]}return function(h){var l=h,c=Iv(),f,p,v,w,E,I,y,_,m,S,C,P={point:b,lineStart:T,lineEnd:R,polygonStart:A,polygonEnd:N};function b($,J){i($,J)&&l.point($,J)}function x(){for(var $=0,J=0,st=p.length;J<st;++J)for(var G=p[J],W=1,k=G.length,U=G[0],O,q,H=U[0],et=U[1];W<k;++W)O=H,q=et,U=G[W],H=U[0],et=U[1],q<=n?et>n&&(H-O)*(n-q)>(et-q)*(r-O)&&++$:et<=n&&(H-O)*(n-q)<(et-q)*(r-O)&&--$;return $}function A(){l=c,f=[],p=[],C=!0}function N(){var $=x(),J=C&&$,st=(f=xv(f)).length;(J||st)&&(h.polygonStart(),J&&(h.lineStart(),s(null,null,1,h),h.lineEnd()),st&&Mv(f,a,$,s,h),h.polygonEnd()),l=h,f=p=v=null}function T(){P.point=V,p&&p.push(v=[]),S=!0,m=!1,y=_=NaN}function R(){f&&(V(w,E),I&&m&&c.rejoin(),f.push(c.result())),P.point=b,m&&l.lineEnd()}function V($,J){var st=i($,J);if(p&&v.push([$,J]),S)w=$,E=J,I=st,S=!1,st&&(l.lineStart(),l.point($,J));else if(st&&m)l.point($,J);else{var G=[y=Math.max(kl,Math.min(Gl,y)),_=Math.max(kl,Math.min(Gl,_))],W=[$=Math.max(kl,Math.min(Gl,$)),J=Math.max(kl,Math.min(Gl,J))];qP(G,W,r,t,e,n)?(m||(l.lineStart(),l.point(G[0],G[1])),l.point(W[0],W[1]),st||l.lineEnd(),C=!1):st&&(l.lineStart(),l.point($,J),C=!1)}y=$,_=J,m=st}return P}}var Of=Xs();function BP(r,t){var e=t[0],n=t[1],i=[be(e),-Me(e),0],s=0,o=0;Of.reset();for(var a=0,u=r.length;a<u;++a)if(l=(h=r[a]).length)for(var h,l,c=h[l-1],f=c[0],p=c[1]/2+pv,v=be(p),w=Me(p),E=0;E<l;++E,f=y,v=m,w=S,c=I){var I=h[E],y=I[0],_=I[1]/2+pv,m=be(_),S=Me(_),C=y-f,P=C>=0?1:-1,b=P*C,x=b>jt,A=v*m;if(Of.add(Ra(A*P*be(b),w*S+A*Me(b))),s+=x?C+P*Vi:C,x^f>=e^y>=e){var N=Dl(Ga(c),Ga(I));Tf(N);var T=Dl(i,N);Tf(T);var R=(x^C>=0?-1:1)*xo(T[2]);(n>R||n===R&&(N[0]||N[1]))&&(o+=x^C>=0?1:-1)}}return(s<-1e-6||s<Ee&&Of<-1e-6)^o&1}Xs();function Tv(r){return r}Xs(),Xs();var ka=1/0,Vl=ka,mh=-ka,Ul=mh,Av={point:YP,lineStart:vh,lineEnd:vh,polygonStart:vh,polygonEnd:vh,result:function(){var r=[[ka,Vl],[mh,Ul]];return mh=Ul=-(Vl=ka=1/0),r}};function YP(r,t){r<ka&&(ka=r),r>mh&&(mh=r),t<Vl&&(Vl=t),t>Ul&&(Ul=t)}Xs();function Ov(r,t,e,n){return function(i,s){var o=t(s),a=i.invert(n[0],n[1]),u=Iv(),h=t(u),l=!1,c,f,p,v={point:w,lineStart:I,lineEnd:y,polygonStart:function(){v.point=_,v.lineStart=m,v.lineEnd=S,f=[],c=[]},polygonEnd:function(){v.point=w,v.lineStart=I,v.lineEnd=y,f=xv(f);var C=BP(c,a);f.length?(l||(s.polygonStart(),l=!0),Mv(f,jP,C,e,s)):C&&(l||(s.polygonStart(),l=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),l&&(s.polygonEnd(),l=!1),f=c=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function w(C,P){var b=i(C,P);r(C=b[0],P=b[1])&&s.point(C,P)}function E(C,P){var b=i(C,P);o.point(b[0],b[1])}function I(){v.point=E,o.lineStart()}function y(){v.point=w,o.lineEnd()}function _(C,P){p.push([C,P]);var b=i(C,P);h.point(b[0],b[1])}function m(){h.lineStart(),p=[]}function S(){_(p[0][0],p[0][1]),h.lineEnd();var C=h.clean(),P=u.result(),b,x=P.length,A,N,T;if(p.pop(),c.push(p),p=null,!!x){if(C&1){if(N=P[0],(A=N.length-1)>0){for(l||(s.polygonStart(),l=!0),s.lineStart(),b=0;b<A;++b)s.point((T=N[b])[0],T[1]);s.lineEnd()}return}x>1&&C&2&&P.push(P.pop().concat(P.shift())),f.push(P.filter(JP))}}return v}}function JP(r){return r.length>1}function jP(r,t){return((r=r.x)[0]<0?r[1]-ki-Ee:ki-r[1])-((t=t.x)[0]<0?t[1]-ki-Ee:ki-t[1])}const Dv=Ov(function(){return!0},QP,$P,[-jt,-ki]);function QP(r){var t=NaN,e=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(s,o){var a=s>0?jt:-jt,u=er(s-t);er(u-jt)<Ee?(r.point(t,e=(e+o)/2>0?ki:-ki),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(a,e),r.point(s,e),i=0):n!==a&&u>=jt&&(er(t-n)<Ee&&(t-=n*Ee),er(s-a)<Ee&&(s-=a*Ee),e=KP(t,e,s,o),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(a,e),i=0),r.point(t=s,e=o),n=a},lineEnd:function(){r.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function KP(r,t,e,n){var i,s,o=be(r-e);return er(o)>Ee?kP((be(t)*(s=Me(n))*be(e)-be(n)*(i=Me(t))*be(r))/(i*s*o)):(t+n)/2}function $P(r,t,e,n){var i;if(r==null)i=e*ki,n.point(-jt,i),n.point(0,i),n.point(jt,i),n.point(jt,0),n.point(jt,-i),n.point(0,-i),n.point(-jt,-i),n.point(-jt,0),n.point(-jt,i);else if(er(r[0]-t[0])>Ee){var s=r[0]<t[0]?jt:-jt;i=e*s/2,n.point(-s,i),n.point(0,i),n.point(s,i)}else n.point(t[0],t[1])}function ZP(r,t){var e=Me(r),n=e>0,i=er(e)>Ee;function s(l,c,f,p){zP(p,r,t,f,l,c)}function o(l,c){return Me(l)*Me(c)>e}function a(l){var c,f,p,v,w;return{lineStart:function(){v=p=!1,w=1},point:function(E,I){var y=[E,I],_,m=o(E,I),S=n?m?0:h(E,I):m?h(E+(E<0?jt:-jt),I):0;if(!c&&(v=p=m)&&l.lineStart(),m!==p&&(_=u(c,y),(!_||Rl(c,_)||Rl(y,_))&&(y[0]+=Ee,y[1]+=Ee,m=o(y[0],y[1]))),m!==p)w=0,m?(l.lineStart(),_=u(y,c),l.point(_[0],_[1])):(_=u(c,y),l.point(_[0],_[1]),l.lineEnd()),c=_;else if(i&&c&&n^m){var C;!(S&f)&&(C=u(y,c,!0))&&(w=0,n?(l.lineStart(),l.point(C[0][0],C[0][1]),l.point(C[1][0],C[1][1]),l.lineEnd()):(l.point(C[1][0],C[1][1]),l.lineEnd(),l.lineStart(),l.point(C[0][0],C[0][1])))}m&&(!c||!Rl(c,y))&&l.point(y[0],y[1]),c=y,p=m,f=S},lineEnd:function(){p&&l.lineEnd(),c=null},clean:function(){return w|(v&&p)<<1}}}function u(l,c,f){var p=Ga(l),v=Ga(c),w=[1,0,0],E=Dl(p,v),I=Ol(E,E),y=E[0],_=I-y*y;if(!_)return!f&&l;var m=e*I/_,S=-e*y/_,C=Dl(w,E),P=Ll(w,m),b=Ll(E,S);xf(P,b);var x=C,A=Ol(P,x),N=Ol(x,x),T=A*A-N*(Ol(P,P)-1);if(!(T<0)){var R=Fa(T),V=Ll(x,(-A-R)/N);if(xf(V,P),V=Nf(V),!f)return V;var $=l[0],J=c[0],st=l[1],G=c[1],W;J<$&&(W=$,$=J,J=W);var k=J-$,U=er(k-jt)<Ee,O=U||k<Ee;if(!U&&G<st&&(W=st,st=G,G=W),O?U?st+G>0^V[1]<(er(V[0]-$)<Ee?st:G):st<=V[1]&&V[1]<=G:k>jt^($<=V[0]&&V[0]<=J)){var q=Ll(x,(-A+R)/N);return xf(q,P),[V,Nf(q)]}}}function h(l,c){var f=n?r:jt-r,p=0;return l<-f?p|=1:l>f&&(p|=2),c<-f?p|=4:c>f&&(p|=8),p}return Ov(o,a,s,n?[0,-r]:[-jt,r-jt])}function Lv(r){return function(t){var e=new Df;for(var n in r)e[n]=r[n];return e.stream=t,e}}function Df(){}Df.prototype={constructor:Df,point:function(r,t){this.stream.point(r,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Rv(r,t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),s!=null&&r.clipExtent(null),VP(e,r.stream(Av));var o=Av.result(),a=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(n-a*(o[1][0]+o[0][0]))/2,h=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&r.clipExtent(s),r.scale(a*150).translate([u,h])}function tI(r,t,e){return Rv(r,[[0,0],t],e)}var Fv=16,eI=Me(30*Gn);function Gv(r,t){return+t?nI(r,t):rI(r)}function rI(r){return Lv({point:function(t,e){t=r(t,e),this.stream.point(t[0],t[1])}})}function nI(r,t){function e(n,i,s,o,a,u,h,l,c,f,p,v,w,E){var I=h-n,y=l-i,_=I*I+y*y;if(_>4*t&&w--){var m=o+f,S=a+p,C=u+v,P=Fa(m*m+S*S+C*C),b=xo(C/=P),x=er(er(C)-1)<Ee||er(s-c)<Ee?(s+c)/2:Ra(S,m),A=r(x,b),N=A[0],T=A[1],R=N-n,V=T-i,$=y*R-I*V;($*$/_>t||er((I*R+y*V)/_-.5)>.3||o*f+a*p+u*v<eI)&&(e(n,i,s,o,a,u,N,T,x,m/=P,S/=P,C,w,E),E.point(N,T),e(N,T,x,m,S,C,h,l,c,f,p,v,w,E))}}return function(n){var i,s,o,a,u,h,l,c,f,p,v,w,E={point:I,lineStart:y,lineEnd:m,polygonStart:function(){n.polygonStart(),E.lineStart=S},polygonEnd:function(){n.polygonEnd(),E.lineStart=y}};function I(b,x){b=r(b,x),n.point(b[0],b[1])}function y(){c=NaN,E.point=_,n.lineStart()}function _(b,x){var A=Ga([b,x]),N=r(b,x);e(c,f,l,p,v,w,c=N[0],f=N[1],l=b,p=A[0],v=A[1],w=A[2],Fv,n),n.point(c,f)}function m(){E.point=I,n.lineEnd()}function S(){y(),E.point=C,E.lineEnd=P}function C(b,x){_(i=b,x),s=c,o=f,a=p,u=v,h=w,E.point=_}function P(){e(c,f,l,p,v,w,s,o,i,a,u,h,Fv,n),E.lineEnd=m,m()}return E}}var iI=Lv({point:function(r,t){this.stream.point(r*Gn,t*Gn)}});function sI(r){return oI(function(){return r})()}function oI(r){var t,e=150,n=480,i=250,s,o,a=0,u=0,h=0,l=0,c=0,f,p,v=null,w=Dv,E=null,I,y,_,m=Tv,S=.5,C=Gv(N,S),P,b;function x(V){return V=p(V[0]*Gn,V[1]*Gn),[V[0]*e+s,o-V[1]*e]}function A(V){return V=p.invert((V[0]-s)/e,(o-V[1])/e),V&&[V[0]*Hs,V[1]*Hs]}function N(V,$){return V=t(V,$),[V[0]*e+s,o-V[1]*e]}x.stream=function(V){return P&&b===V?P:P=iI(w(f,C(m(b=V))))},x.clipAngle=function(V){return arguments.length?(w=+V?ZP(v=V*Gn,6*Gn):(v=null,Dv),R()):v*Hs},x.clipExtent=function(V){return arguments.length?(m=V==null?(E=I=y=_=null,Tv):HP(E=+V[0][0],I=+V[0][1],y=+V[1][0],_=+V[1][1]),R()):E==null?null:[[E,I],[y,_]]},x.scale=function(V){return arguments.length?(e=+V,T()):e},x.translate=function(V){return arguments.length?(n=+V[0],i=+V[1],T()):[n,i]},x.center=function(V){return arguments.length?(a=V[0]%360*Gn,u=V[1]%360*Gn,T()):[a*Hs,u*Hs]},x.rotate=function(V){return arguments.length?(h=V[0]%360*Gn,l=V[1]%360*Gn,c=V.length>2?V[2]%360*Gn:0,T()):[h*Hs,l*Hs,c*Hs]},x.precision=function(V){return arguments.length?(C=Gv(N,S=V*V),R()):Fa(S)},x.fitExtent=function(V,$){return Rv(x,V,$)},x.fitSize=function(V,$){return tI(x,V,$)};function T(){p=wv(f=UP(h,l,c),t);var V=t(a,u);return s=n-V[0]*e,o=i+V[1]*e,R()}function R(){return P=b=null,x}return function(){return t=r.apply(this,arguments),x.invert=t.invert&&A,T()}}function kv(r){return function(t,e){var n=Me(t),i=Me(e),s=r(n*i);return[s*i*be(t),s*be(e)]}}function Vv(r){return function(t,e){var n=Fa(t*t+e*e),i=r(n),s=be(i),o=Me(i);return[Ra(t*s,n*o),xo(n&&e*s/n)]}}var aI=kv(function(r){return Fa(2/(1+r))});aI.invert=Vv(function(r){return 2*xo(r/2)});var Uv=kv(function(r){return(r=vv(r))&&r/be(r)});Uv.invert=Vv(function(r){return r});function uI(){return sI(Uv).scale(79.4188).clipAngle(179.999)}function zv(r,t){return[r,t]}zv.invert=zv;function hI(r,t,e){e=e||{};var n=e.units||"kilometers",i=e.steps||8;if(!r)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(r.type){case"GeometryCollection":return il(r,function(o){var a=zl(o,t,n,i);a&&s.push(a)}),ua(s);case"FeatureCollection":return nl(r,function(o){var a=zl(o,t,n,i);a&&nl(a,function(u){u&&s.push(u)})}),ua(s)}return zl(r,t,n,i)}function zl(r,t,e,n){var i=r.properties||{},s=r.type==="Feature"?r.geometry:r;if(s.type==="GeometryCollection"){var o=[];return il(r,function(w){var E=zl(w,t,e,n);E&&o.push(E)}),ua(o)}var a=lI(s),u={type:s.type,coordinates:Wv(s.coordinates,a)},h=new mf,l=h.read(u),c=Wc(Xc(t,e),"meters"),f=Re.bufferOp(l,c,n),p=new J0;if(f=p.write(f),!qv(f.coordinates)){var v={type:f.type,coordinates:Xv(f.coordinates,a)};return Kn(v,i)}}function qv(r){return Array.isArray(r[0])?qv(r[0]):isNaN(r[0])}function Wv(r,t){return typeof r[0]!="object"?t(r):r.map(function(e){return Wv(e,t)})}function Xv(r,t){return typeof r[0]!="object"?t.invert(r):r.map(function(e){return Xv(e,t)})}function lI(r){var t=dC(r).geometry.coordinates,e=[-t[0],-t[1]];return uI().rotate(e).scale(nr)}function cI(r,t,e){e===void 0&&(e={});var n=en(r),i=en(t),s=uf.union(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?dr(s[0],e.properties):qc(s,e.properties)}function fI(r,t,e){e===void 0&&(e={});var n=en(r),i=en(t),s=uf.intersection(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?dr(s[0],e.properties):qc(s,e.properties)}function dI(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1])&&r.push(r[0]);const e=ie(t),n=dr([r]);return yn(e,n)}function gI(r,t){const e=$n(r);return bC(e,t,{units:"meters"}).geometry.coordinates}function Lf(r){if((r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),r.length<=3)return 0;const t=dr([r]);return IC(t)}function pI(r){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]);const t=dr([r]),n=i0(t).geometry.coordinates;return[n[0],n[1],n[2]??r[0][2]??0]}function Hv(r,t,e,n){const[i,s,o]=r,a=la(ie([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return n=n||[0,0,0],n[0]=a.geometry.coordinates[0],n[1]=a.geometry.coordinates[1],n[2]=o,n}function ql(r,t){return $i(ie(r),ie(t),{units:"meters"})}function yh(r,t){return Hu(ie(r),ie(t))}function vI(r,t){return f0($n(r),$n(t))}function mI(r,t){const e=ie(r),n=ie(t),i=fC(e,n),s=(r[2]+t[2])/2;return[...i.geometry.coordinates,s]}function yI(r,t){const e=ie(t),n=$n(r);return EC(n,e,{units:"meters"})}function _I(r,t){const e=ie(r),n=$n(t);return CC(e,n,{units:"meters"})}function wI(r,t,e,n){const[i,s,o]=r,a=VC(ie([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return n=n||[0,0,0],n[0]=a.geometry.coordinates[0],n[1]=a.geometry.coordinates[1],n[2]=o,n}function Bv(r,t){return g0(ie(r),ie(t),{units:"meters"})}function EI(r,t){return kC(ie(r),ie(t))}function Yv(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=fI(dr([r]),dr([t]));if(e)return e.geometry.coordinates}function Jv(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=cI(dr([r]),dr([t]));if(e)return e.geometry.coordinates}function jv(r,t=500,e="meters"){const n=hI($n(r),t,{units:e});if(n)return n.geometry.coordinates}function Qv(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=wP(dr([r]),dr([t]));if(e)return e.geometry.coordinates}function Kv(r,t,e=10,n="meters"){return lC(r,t,{steps:e,units:n}).geometry.coordinates}function Rf(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=dr([r]),n=dr([t]);return zC(e,n)?"oneBig":xC(e,n)?"twoBig":!1}function $v(r){const t=g.min(g.objsIterator(r,["0"])),e=g.min(g.objsIterator(r,["1"])),n=g.min(g.objsIterator(r,["2"])),i=g.max(g.objsIterator(r,["0"])),s=g.max(g.objsIterator(r,["1"])),o=g.max(g.objsIterator(r,["2"]));return{minPos:[t,e,n],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(n+o)*.5]}}function SI(r){const{minPos:t,maxPos:e,center:n}=$v(r);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||n.some(u=>!Number.isFinite(u)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=ql(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:n,radius:s}}function Zv(r,t){const e=Ii(r),n=Ii(t);return g.Vector.distance(e,n)}function _h(r,t){const e=[],n=r.length;let i=0;for(let s=0;s<n-1;++s){if(t===void 0||t==="GEODESIC"){const o=ql(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=Bv(r[s],r[s+1]),a=Math.abs(r[s][2]-r[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=Zv(r[s],r[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function Ff(r){const t="__getXyzFromPostion";let e=g.getExtProp(r,t);return(!e||!g.Vector.equals(e[0],r))&&(e=[[...r],Ii(r)],g.setExtProp(r,t,e)),e[1]}class tm extends g.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class Gf extends g.TreeItem{constructor(t,e,n){super(t,e),this._property=n}get property(){return this._property}}class kf extends Gf{constructor(t,e){super(t,!1,e)}}class Vf extends Gf{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function em(r,t){const e=new tm(t),n=r.getProperties("chinese"),i=[];for(let s of n)if(s instanceof vt){const o=new Vf(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new kf(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof vt))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof vt){const u=new Vf(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new kf(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class Va extends ot{constructor(e){super();d(this,"_propTreeReact",this.dv(g.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new g.ObjResettingWithEvent(this.sceneObjectChanged,n=>{if(!n)return;const i=new ot;return i.d(n.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(n=>{this._propTreeReact.value=void 0,!(!n||!(n instanceof ft))&&(this._propTreeReact.value=em(n,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(r=>{r.createDefaultProps=()=>({sceneObject:void 0})})(Va||(Va={})),g.extendClassProps(Va.prototype,Va.createDefaultProps);function Uf(r){return g.reactDeepArrayWithUndefined(r,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function rm(r,t){const e=new Array;for(let n of r)e.push(t(n));return e}function zf(r,t){return r===void 0&&t===void 0?!0:!r||!t?!1:r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}function CI(r,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(r):r.dispose(t.createdEvent.don(()=>e.call(r)))}function PI(r,t,e,n=!0){n&&e(),r.dispose(t.disposableOn(e))}function II(r,t){const{type:e,id:n}=r;if(e){const i=ft.create(e,n);if(i)return i.json=r,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function nm(r){const t=r.children&&g.every(r.children,n=>{if(!(n instanceof Er))throw new Error("!(treeItem instanceof SceneTreeItem)");return!n.show})||!1,e=r.sceneTree.getSceneObjectShowFunc(r.sceneObject);return!t||e}class Er extends g.TreeItem{constructor(e,n=!1,i,s,o=!0){super(e,n,i);d(this,"_dragDrop");d(this,"_showChangedNotAffectChildren",!1);d(this,"_showChangedNotAffectParent",!1);d(this,"_type",this.dv(g.react("Unknown")));d(this,"_isExport",this.dv(g.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let u;const h=()=>{u&&(u(),u=void 0)};this.dispose(h),this.dispose(this.sceneObjectChanged.disposableOn(l=>{h(),l&&(u=g.bind([this,"name"],[l,"name"]))})),this.dispose(this.showChanged.disposableOn(l=>{if(e.setSceneObjectShowFunc(this.sceneObject,l),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let c of this.children)c instanceof Er&&(c._showChangedNotAffectParent=!0,c.show=l,c._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Er&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=nm(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new g.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const l=new ot;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof X){const c=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};c(),l.dispose(this.sceneObject.showChanged.disposableOn(c))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof X){const c=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};c(),l.dispose(this.sceneObject.enabledChanged.disposableOn(c))}return l})),this.childrenChangedEvent.disposableOn(()=>{const l=nm(this);this._showChangedNotAffectChildren=!0,this.show=l,this._showChangedNotAffectChildren=!1});{const l=()=>{let c="Unknown";this.sceneObject?c=this.sceneObject.typeName:this.children&&(c="Folder"),this._type.value=c};this.dispose(this.sceneObjectChanged.disposableOn(l)),this.dispose(this.childrenResetedEvent.disposableOn(l)),l()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(n){console.error(`sceneTreeItem.jsonStr error ${n}`,n)}}get json(){const e=this.children&&[...this.children].filter(n=>n.isExport).map(n=>n.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let n of e.children){const i=new Er(this.tree,!0);i.json=n,this.children.push(i)}}}clone(){try{const e=new Er(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,n){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(n&&n.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return n&&this.children.push(n),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",n);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",n);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,n)}}(r=>{r.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:g.reactJsonWithUndefined(void 0)})})(Er||(Er={})),g.extendClassProps(Er.prototype,Er.createDefaultProps);function im(r,t,e){let{offsetY:n}=t;if(!t.target||!("clientTop"in t.target))return"none";n+=2,n+=t.target.clientTop;let i="none";return r.children?n<=e*.3?i="before":n>=e*.7?!r.uiTreeObject.collapsed&&r.children.length>0?i="inner":i="after":i="inner":n<=e*.5?i="before":i="after",i}class sm extends Hg{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let n="none";const i=this.disposeVar(g.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=n,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${n});`)},200));function s(o){n!==o&&(n=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,h=this._treeItem,{tree:l}=h;if(l){const c=[...l.selectedItems];~c.indexOf(u)||c.push(u);const f=im(h,o,l.itemDivHeight);if(f!=="none"&&g.Tree.canMoveToTreeItems(c,h,f)){o.dataTransfer.dropEffect="move",s(f);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,h=this._treeItem,{tree:l}=h;if(!l)return;const c=[...l.selectedItems];~c.indexOf(u)||c.push(u);const f=im(h,o,l.itemDivHeight);f!=="none"&&g.Tree.canMoveToTreeItems(c,h,f)&&(g.Tree.moveToTreeItems(c,h,f),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{n="none",i.restart()}))}}function MI(r){if(!(r instanceof Er))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new sm(r)}function bI(r){let t=!1;return r&&("show"in r?t=r.show??!0:"enabled"in r&&(t=r.enabled??!0)),t}function NI(r,t){r&&("show"in r?r.show=t:"enabled"in r&&(r.enabled=t))}const xI=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function TI(r){const t=[],{root:e={}}=r,n=[e];for(;n.length>0;){const i=n.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&n.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&xI.includes(o)&&t.push(s.sceneObj)}}}return t}async function AI(r,t){const e=TI(r);let n=0;const i=e.length;for(let s of e)if(++n,t){const o=n/i;t(o,n,i)}}class om extends ot{constructor(e,n){super();d(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=n}get sceneTree(){return this._sceneTree}}class OI extends ot{constructor(e){super();d(this,"_jsonLoadingEvent",this.disposeVar(new X));d(this,"_setJsonProcessing",this.disposeVar(g.createProcessingFromAsyncFunc(async(e,n)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),n&&await e.promise(this._sceneTree.preloadFunc(n)),this._setJson(n),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=n=>{this._jsonLoadingEvent.emit({type:"error",error:n})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(n){console.error(`json数据装配时发生错误!error: ${n}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new g.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function DI(r){return r.name+"_clone"}function qf(r,t,e){if(r instanceof Er)return r.insertNewTreeItem(t,e);{const n={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return r.insertNewTreeItem(n[t],e)}}function LI(r){[r,...r.getDescendants()].forEach(t=>t.destroy())}const $r=class $r extends g.Tree{constructor(e,n,i,s){super(i);d(this,"_jsonLoading",this.disposeVar(new OI(this)));d(this,"createSceneObjectFunc",$r.defaultCreateSceneObjectFunc);d(this,"createTreeItemDragDropFunc",$r.defaultCreateTreeItemDragDropFunc);d(this,"preloadFunc",$r.defaultPreload);d(this,"getSceneObjectShowFunc",$r.defaultGetSceneObjectShow);d(this,"setSceneObjectShowFunc",$r.defaultSetSceneObjectShow);d(this,"getSceneTreeItemCloneNameFunc",$r.defaultGetSceneTreeItemCloneNameFunc);d(this,"debug",!1);d(this,"_contextMenu",this.disposeVar(new om(this,this.projectManager)));d(this,"_showPropUiOnSelecting",this.disposeVar(g.react(!0)));this._name=e,this._dragStartDataManager=n,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const h=u,{sceneObject:l}=h;l&&o.deleteSceneObject(l)&&l.destroy()&&qh(l,void 0);for(let c of h.getDescendants()){const{sceneObject:f}=c;f&&o.deleteSceneObject(f)&&f.destroy()&&qh(f,void 0)}LI(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const h=u;h.sceneObject&&o.addSceneObject(h.sceneObject)&&qh(h.sceneObject,h)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const n=this.getDescendants();let i;for(let s of n)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const n=e.root.children??[];this.root.resetChildren(!0);for(let s of n){const o=new Er(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,n){const i=e||this.lastSelectedItem||this.root;return i?qf(i,n):!1}addNewTreeItem(e,n,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&qf(o,n)){const a=new Er(this,i);if(a.sceneObject=s,!qf(o,n,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=ft.create(e,n);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,n,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=ft.createFromClass(e,n);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,n,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(n,s))return;const o=ft.createFromJson(e);return console.log(o),o?this.addNewTreeItem(n,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let n of e)this.destroySceneObjectTreeItem(n)}};d($r,"defaultCreateSceneObjectFunc",II),d($r,"defaultCreateTreeItemDragDropFunc",MI),d($r,"defaultPreload",AI),d($r,"defaultGetSceneObjectShow",bI),d($r,"defaultSetSceneObjectShow",NI),d($r,"defaultGetSceneTreeItemCloneNameFunc",DI);let wh=$r;const Wf={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class RI extends ot{constructor(e){super();d(this,"_currentPosition",this.disposeVar(g.reactArrayWithUndefined(void 0)));d(this,"_currentRotation",this.disposeVar(g.reactArrayWithUndefined(void 0)));d(this,"_currentHeading",this.disposeVar(g.react(void 0)));d(this,"_isRotating",this.disposeVar(g.react(!1)));d(this,"_isGround",this.disposeVar(g.react(!1)));d(this,"_startPosition",[0,0,0]);d(this,"_startRotation",[0,0,0]);d(this,"_processing",this.disposeVar(g.createProcessingFromAsyncFunc(async(e,n,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=n,this._currentRotation.value=i;return}const u=this._startPosition;u.splice(0,3,...o);const h=this._startRotation;h.splice(0,3,...a);let l=Date.now();const c=yh(u,n);this._currentHeading.value=c;const p=ql(u,n)/s,v=[i[0]-h[0],i[1]-h[1],i[2]-h[2]],w=n[2]-u[2];await e.promise(new Promise(E=>{e.disposer.dispose(g.animateFrame(async()=>{let I=Date.now()-l;I=I<0?0:I,I=I>s?s:I;const y=I*p,_=Hv(u,y,c);if(this.isGround&&_){const m=await this._esviewer.getTerrainHeight([_[0],_[1]]);this._currentPosition.value=[_[0],_[1],m??0]}else _&&(_[2]+=w*(I/s)),this._currentPosition.value=_;if(this.isRotating){const[m,S,C]=v,P=I/s;this._currentRotation.value=[h[0]+m*P,h[1]+S*P,h[2]+C*P]}I===s&&(this._currentPosition.value=n,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,E())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,n,i){this._processing.restart(void 0,e,n,i)}cancel(){this._processing.cancel()}}function am(r){let t=0;function e(n,i){i++,t=Math.max(i,t),n.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(r,0),t}const Ui=class Ui extends ne{constructor(e){super(e);d(this,"editingBindMode","lineString");d(this,"_area",this.dv(g.react(0)));d(this,"_perimeter",this.dv(g.react(0)));const n=()=>{this._updateArea(),this._updatePerimeter()};n(),this.d(this.pointsChanged.don(n))}updateEditing(){var n;const e=[];this.editingBindMode=="doublePoints"?e.push(ct.DoublePointsAppend,ct.DoublePointsModify):this.editingBindMode=="lineString"?e.push(ct.LineStringAppend,ct.LineStringInsert,ct.Translation):this.editingBindMode=="circular"?(e.push(ct.CircularAppend,ct.CircularInsert,ct.Translation),this.supportEditingModes().includes(ct.HeightModify)&&e.push(ct.HeightModify)):this.editingBindMode=="visibility"?e.push(ct.VisibilityAppend,ct.VisibilityModify):this.editingBindMode=="scatter"&&e.push(ct.ScatterAppend,ct.ScatterModify),(n=this.activeViewer)==null||n.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Lf([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=_h(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],n=_h(e,"GEODESIC");return n[n.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=Yv(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],o=[];return s.forEach(a=>{const u=a[0].map(h=>[...h,0]);o.push(u)}),o}else return[[...n][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=Jv(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],o=[];return s.forEach(a=>{const u=a[0].map(h=>[...h,0]);o.push(u)}),o}else return[[...n][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let n=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||n.push(i);const o=Qv([...this.points,this.points[0]],[...n]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(am(a)===3){const u=a.map(f=>f.map(p=>[...p,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const h=u[0],l=u[1];return Rf([...h],[...l])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(am(a)===4){const h=[...a.map(c=>c.map(f=>f.map(p=>[...p,0])))],l=[];return h.forEach(c=>{l.push(c[0])}),{status:"notIncluded",positions:l}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,n){if(this.points&&this.points.length>=2){const i=jv(this.points,e,n);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=Rf(this.points,e);return n==="oneBig"?!0:n==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new Z([this,"editing"],"编辑",!1),new lt([this,"points"],"位置数组",Ui.defaults.points,void 0,!0)],style:[...e.style,new vt([],"点样式"),new Z([this,"pointed"],"开启",!1),new L([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new Gt([this,"pointOutlineColor"],"轮廓颜色",Ui.defaults.pointStyle.outlineColor),new L([this,"pointOutlineWidth"],"轮廓宽度",Ui.defaults.pointStyle.outlineWidth),new vt([],"线样式"),new Z([this,"stroked"],"开启线样式",!0),new Z([this,"strokeGround"],"贴地",!1),new L([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式"),new Z([this,"filled"],"开启",!1),new Z([this,"fillGround"],"贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new vt([],"点样式集合"),new Et([this,"pointMaterial"],"点材质"),new lt([this,"pointMaterialParams"],"点材质参数"),new vt([],"线样式集合"),new Et([this,"strokeMaterial"],"线材质"),new lt([this,"strokeMaterialParams"],"线材质参数"),new vt([],"面样式集合"),new Et([this,"fillMaterial"],"面材质"),new lt([this,"fillMaterialParams"],"面材质参数")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};d(Ui,"createDefaultProps",()=>({...ne.createDefaultProps(),pointed:!1,pointStyle:g.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:g.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:g.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:g.reactPositions(void 0)})),d(Ui,"type",Ui.register("ESGeoVector",Ui,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),d(Ui,"supportEditingModes",[...ne.supportEditingModes,ct.Translation]);let Rt=Ui;const To=class To extends ne{constructor(){super(...arguments);d(this,"_statusDis",this.dv(g.react(!0)));d(this,"_smoothMoveEvent",this.dv(new X));d(this,"_smoothMoveWithRotationEvent",this.dv(new X));d(this,"_smoothMoveOnGroundEvent",this.dv(new X));d(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new X));d(this,"_automaticLandingEvent",this.dv(new X));d(this,"_smoothMoveKeepPitchEvent",this.dv(new X));d(this,"_smoothMoveRelativelyEvent",this.dv(new X));d(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new X));d(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var n;const e=[];this.editingBindMode=="singlePoint"?(e.push(ct.Place,ct.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(ct.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(ct.Scale)):this.editingBindMode=="doublePoints"&&e.push(ct.DoublePointsAppend,ct.DoublePointsModify),(n=this.activeViewer)==null||n.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,n){this._smoothMoveEvent.emit(e,n)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,n,i){this._smoothMoveWithRotationEvent.emit(e,n,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,n,i,s){this._smoothMoveOnGroundEvent.emit(e,n,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,n,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,n,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,n){this._smoothMoveKeepPitchEvent.emit(e,n)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,n){this._smoothMoveRelativelyEvent.emit(e,n)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,n,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,n,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new Z([this,"editing"],"是否编辑"),new mt([],()=>this.automaticLanding(),[],"自动落地"),new Ko([this,"position"],"位置数组",[0,0,0]),new wc([this,"rotation"],"姿态数组",[0,0,0]),new cr([this,"scale"],"缩放",[1,1,1]),new L([this,"minVisibleDistance"],"最小可见距离",0),new L([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new mt(["numbers","number"],(n,i)=>this.smoothMove(n,i),[[0,0,0],0],"平滑移动","smoothMove"),new mt(["numbers","number"],(n,i)=>this.smoothMoveKeepPitch(n,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new mt(["numbers","numbers","number"],(n,i,s)=>this.smoothMoveWithRotation(n,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new mt(["number","number","number","string"],(n,i,s,o)=>this.smoothMoveOnGround(n,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new mt(["numbers","number","number","number","string"],(n,i,s,o,a)=>this.smoothMoveWithRotationOnGround(n,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new mt(["numbers","number"],(n,i)=>this.smoothMoveRelatively(n,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new mt(["numbers","numbers","number"],(n,i,s)=>this.smoothMoveRelativelyWithRotation(n,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new Z([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};d(To,"createDefaultProps",()=>({...ne.createDefaultProps(),pointed:!1,pointStyle:g.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:g.reactArray([0,0,0]),rotation:g.reactArray([0,0,0]),scale:g.reactArray([1,1,1]),minVisibleDistance:g.react(0),maxVisibleDistance:g.react(0)})),d(To,"type",To.register("ESObjectWithLocation",To,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),d(To,"supportEditingModes",[...ne.supportEditingModes,ct.Place,ct.Translation,ct.Rotation,ct.Scale,ct.DoublePointsAppend,ct.DoublePointsModify]);let dt=To;const Wa=class Wa extends dt{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new vt([],"点样式集合"),new Z([this,"pointed"],"开启点样式",!1),new L([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new vt([],"线样式集合"),new Z([this,"stroked"],"开启线样式",!1),new Z([this,"strokeGround"],"是否贴地(线)",!1),new L([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式集合"),new Z([this,"filled"],"开启填充样式",!1),new Z([this,"fillGround"],"是否贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new vt([],"点样式"),new Et([this,"pointMaterial"],"点材质",""),new lt([this,"pointMaterialParams"],"点材质参数",{}),new vt([],"线样式"),new Et([this,"strokeMaterial"],"线材质",""),new lt([this,"strokeMaterialParams"],"线材质参数",{}),new vt([],"填充样式"),new Et([this,"fillMaterial"],"面材质",""),new lt([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};d(Wa,"createDefaultProps",()=>({...dt.createDefaultProps(),pointed:!1,pointStyle:g.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:g.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:g.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Wa,"type",Wa.register("ESLocalVector",Wa,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Ua=Wa;const xh=class xh extends Ua{};d(xh,"type",xh.register("ESLocalVector2D",xh,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let ds=xh;const FI=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],GI=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],Xa=class Xa extends dt{constructor(){super(...arguments);d(this,"_widgetEvent",this.dv(new X))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Z([this,"screenRender"],"屏幕渲染",!0),new Z([this,"sizeByContent"],"尺寸自适应",!0),new ze([this,"size"],"尺寸大小",[100,100]),new ze([this,"anchor"],"偏移比例",[.5,1]),new ze([this,"offset"],"像素偏移",[0,0]),new Tt([this,"renderMode"],GI,"渲染模式",0),new Tt([this,"rotationType"],FI,"漫游旋转类型",1),new Et([this,"actorTag"],"绑定对象"),new Et([this,"socketName"],"插槽名称"),new cr([this,"positionOffset"],"位置偏移"),new cr([this,"rotationOffset"],"相对姿态")],more:[...e.more,new L([this,"zOrder"],"排序",0)]}}};d(Xa,"createDefaultProps",()=>({...dt.createDefaultProps(),screenRender:!0,size:g.reactArray([100,100]),anchor:g.reactArray([.5,1]),offset:g.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:g.reactArray([0,0,0]),rotationOffset:g.reactArray([0,0,0])})),d(Xa,"type",Xa.register("ESLabel",Xa,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let gn=Xa;const Ha=class Ha extends ft{constructor(t){super(t)}};d(Ha,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,fillStyle:g.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ha,"type",Ha.register("ESTestObject",Ha,{chsName:"测试",tags:["ESObjects"],description:""}));let Xf=Ha;const zi=class zi extends ne{constructor(e){super(e);d(this,"_refreshTilesetEvent",this.dv(new X));d(this,"_tilesetReadyEvent",this.dv(new X));d(this,"_supportEdit",this.dv(g.react(!0)));d(this,"_highlightFeatureEvent",this.dv(new X));d(this,"_highlightFeatureAndFlyToEvent",this.dv(new X));d(this,"_strokeFeatureEvent",this.disposeVar(new X));d(this,"_getFeatureTableEvent",this.dv(new X));d(this,"_featureTableResultEvent",this.dv(new X));d(this,"_getMaterialNameListEvent",this.disposeVar(new X));d(this,"_setFeatureStyleEvent",this.dv(new X));d(this,"_setFeatureColorEvent",this.dv(new X));d(this,"_setFeatureVisableEvent",this.dv(new X));d(this,"_resetFeatureStyleEvent",this.dv(new X));d(this,"setMaterialInfoEvent",this.ad(new X));d(this,"_setMaterialEvent",this.disposeVar(new X));d(this,"_clippingPlanesId",this.dv(g.react("")));d(this,"_clippingPlaneIds",this.dv(g.react([])));d(this,"_flattenedPlaneId",this.dv(g.react("")));d(this,"_flattenedPlaneEnabled",this.dv(g.react(!1)));d(this,"_clippingPlaneId",this.dv(g.react("")));d(this,"_excavateId",this.dv(g.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[ct.Translation,ct.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,n){this._highlightFeatureEvent.emit(e,n)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,n,i,s){this._highlightFeatureAndFlyToEvent.emit(e,n,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,n=[1,0,0,1]){this._strokeFeatureEvent.emit(e,n)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const n=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const n=new ot;n.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(n.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{n.isDestroyed()||(n.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,n){this._setFeatureColorEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,n){this._setFeatureVisableEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(n=>{const i=new ot;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Wf}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Be([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new Tt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new Tt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new lt([this,"materialOverrideMap"],"材质替换",zi.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new lt([this,"url"],"服务地址",zi.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new Z([this,"editing"],"编辑",!1,!0),new cr([this,"offset"],"偏移量",[0,0,0],!0),new wc([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new lt([this,"materialParams"],"materialParams",zi.defaults.materialParams),new mt(["string","string"],(n,i)=>this.highlightFeature(n,i),["","rgba(255,0,0,1)"],"highlightFeature"),new mt(["string","string"],(n,i)=>this.setFeatureColor(n,i),["",""],"setFeatureColor"),new mt(["string","string"],(n,i)=>this.setFeatureVisable(n,i),["",""],"setFeatureVisable"),new mt([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new vt([],"ue"),new mt([],()=>this.refreshTileset(),[],"refreshTileset"),new Et([this,"actorTag"]),new Z([this,"highlight"],"是否高亮"),new Gt([this,"highlightColor"]),new L([this,"highlightID"]),new vt([],"czm"),new vt([],"可视化"),new ze([this,"czmImageBasedLightingFactor"],"反射强度"),new L([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new lt([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new L([this,"czmMaximumMemoryUsage"],"最大内存"),new vt([],"常用"),new Tt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new lt([this,"czmStyleJson"],"czmStyle"),new Z([this,"czmBackFaceCulling"]),new Z([this,"czmSkipLevelOfDetail"]),new L([this,"cacheBytes"],"最大缓存",536870912),new vt([],"调试信息"),new Z([this,"czmDebugShowBoundingVolume"]),new Z([this,"czmDebugShowContentBoundingVolume"]),new vt([],"clippingPlanes"),new Z([this,"clippingPlaneEnabled"]),new Z([this,"unionClippingRegions"]),new Gt([this,"clippingPlaneEdgeColor"]),new L([this,"clippingPlaneEdgeWidth"])]}}};d(zi,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:g.reactArray([1,0,0,1]),offset:g.reactArrayWithUndefined([0,0,0]),rotation:g.reactArray([0,0,0]),czmImageBasedLightingFactor:g.reactArray([1,1]),czmEnvironmentMapManager:g.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:g.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:536870912,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:g.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:g.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),d(zi,"type",zi.register("ES3DTileset",zi,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),d(zi,"supportEditingModes",[...ne.supportEditingModes,ct.Translation,ct.Rotation]);let kn=zi;const Ba=class Ba extends dt{constructor(e){super(e);d(this,"_isFlyInCreated",this.dv(g.react(!1)));d(this,"_readyEvent",this.dv(new X));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(Su([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new L([this,"radius"],"半径",10)]}}};d(Ba,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"cylinder",radius:10})),d(Ba,"type",Ba.register("ESAlarm",Ba,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let Hf=Ba;const Ao=class Ao extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"radius"],"半径",1),new Tt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Ao.defaults.mode)]}}};d(Ao,"createDefaultProps",()=>({...dt.createDefaultProps(),radius:1,mode:"scan",collision:!1})),d(Ao,"type",Ao.register("ESApertureEffect",Ao,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Bf=Ao;const Oo=class Oo extends Rt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Oo,"createDefaultProps",()=>({...Rt.createDefaultProps(),fillStyle:g.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:g.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),d(Oo,"type",Oo.register("ESGeoPolygon",Oo,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),d(Oo,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert]);let oe=Oo;const gs=class gs extends oe{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:gs.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??gs.defaults.fillStyle,materialParams:t??gs.defaults.fillStyle.materialParams}}constructor(t){super(t)}};d(gs,"createDefaultProps",()=>({...oe.createDefaultProps(),stroked:!0,filled:!0,units:g.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:g.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:g.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(gs,"type",gs.register("ESAreaMeasurement",gs,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let Yf=gs;const Ya=class Ya extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new vt([],"czm"),new Cu([this,"image"],"图片"),new cr([this,"translation"],"偏移")]}}};d(Ya,"createDefaultProps",()=>({...dt.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:g.reactArray([0,0,0])})),d(Ya,"type",Ya.register("ESBlastParticleSystem",Ya,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Jf=Ya;const pi=class pi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Z([this,"reverse"],"反转",pi.defaults.reverse),new cr([this,"size"],"尺寸",pi.defaults.size),new Gt([this,"edgeColor"],"边框颜色",pi.defaults.edgeColor),new L([this,"edgeWidth"],"边框宽度",pi.defaults.edgeWidth),new Et([this,"targetID"],"瓦片图层",pi.defaults.targetID)]}}};d(pi,"createDefaultProps",()=>({...dt.createDefaultProps(),reverse:!1,edgeColor:g.reactArray([1,1,1,1]),edgeWidth:2,size:g.reactArray([10,10,10]),targetID:""})),d(pi,"type",pi.register("ESBoxClipping",pi,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let jf=pi;const Th=class Th extends dt{constructor(){super(...arguments);d(this,"_thumbnail",this.dv(g.react("")));d(this,"_duration",this.dv(g.react(1)));d(this,"_resetWithCurrentCameraEvent",this.dv(new X));d(this,"_captureEvent",this.dv(new X))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,n="default"){this.flyInEvent.emit(e,-1,n)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,n){this._captureEvent.emit(e,n)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESCameraView"),new mt([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new mt(["number","number"],(n,i)=>this.capture(n,i),[64,64],"获取缩略图"),new Et([this,"thumbnail"],"缩略图","",!0),new L([this,"duration"],"飞行时间",1,!0)]}}};d(Th,"type",Th.register("ESCameraView",Th,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let Wl=Th;class Xl extends ot{constructor(e,n,i){super();d(this,"_view",this.dv(new Wl));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,n){const a=this._view,u=n;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(g.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(g.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const Un=class Un extends ft{constructor(e){super(e);d(this,"_currentViewIndex",this.dv(g.react(-1)));d(this,"_viewWrappers",this.dv(new g.ObservableArray));d(this,"_currentViewWrapper",this.dv(g.react(void 0)));d(this,"_container",this.dv(g.react(void 0)));this.initProcessing();{const n=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};n(),this.d(this._viewWrappers.changedEvent.don(n))}{const n=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};n(),this.d(this._viewWrappers.changedEvent.don(n)),this.d(this._currentViewWrapper.changed.don(n))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return rm(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const n=this._viewWrappers;if(e.every((i,s)=>{const o=n.get(s).view;return i.duration===o.duration&&zf(i.position,o.position)&&zf(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let n of e)this._viewWrappers.push(new Xl(this,n))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,n=[64,64]){this._viewWrappers.push(new Xl(this,void 0,{name:e,size:n}))}update(e,n,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return n&&(s.view.name=n),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Xl(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Xl(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const n=this._viewWrappers.get(e);return this._currentViewWrapper.value=n,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const n=this._viewWrappers.get(e);n.view.resetWithCurrentCamera(),n.view.capture()}resetViewName(e,n){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=n}updateView(e,n){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=n.position,i.view.rotation=n.rotation??[0,0,0],i.view.duration=n.duration??1,i.view.thumbnail=n.thumbnail??"",i.view.name=n.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const n=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(n,this.flyMode??Un.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Un.defaults.loop?(this.flyToView((this._viewWrappers.length+n-1)%this._viewWrappers.length),!0):n-1<0?!1:(this.flyToView(n-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===0)return;const i=this._viewWrappers.splice(n-1,1,e)[0];this._viewWrappers.set(n,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(n+1,1,e)[0];this._viewWrappers.set(n,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Un.defaults.loop?(this.flyToView((n+1)%this._viewWrappers.length),!0):n+1>this._viewWrappers.length-1?!1:(this.flyToView(n+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const n=this._getIndex(e);if(n===-1){console.warn("index === -1");return}this.deleteView(n)}transitionImageUrl(e){return ft.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const n=this.intervalTime??Un.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+n)*1e3;return e.promise(g.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(g.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),n=()=>{this.playing?e.restart():e.cancel()};n(),this.d(this.playingChanged.don(n))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Tt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",Un.defaults.flyMode),new mt([],()=>this.addView(),[],"添加视角"),new mt(["number"],n=>this.insertView(n),[0],"插入视角"),new mt([],()=>this.clearAllViews(),[],"清空所有视角"),new mt([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new mt([],()=>this.flyToPrevView(),[],"上一个视角"),new mt([],()=>this.flyToNextView(),[],"下一个视角"),new mt([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new mt([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new mt(["number"],n=>this.flyToView(n),[0],"飞入指定视角"),new mt(["number"],n=>this.setCurrentView(n),[0],"设置当前视角"),new mt([],()=>this.deleteCurrentView(),[],"删除当前视角"),new mt(["number"],n=>this.deleteView(n),[0],"删除指定视角"),new mt(["number"],n=>this.resetView(n),[0],"重置视角"),new L([this,"currentViewIndex"],"当前序号",-1,!1,!0),new Vg([this,"playing"],()=>this.stop(),[this,"loop"],"播放",Un.defaults),new Z([this,"playing"],"是否播放"),new mt([],()=>this.stop(),[],"停止"),new Z([this,"loop"],"是否循环"),new L([this,"intervalTime"],"间隔时间"),new lt([this,"views"],"视角集合",[],void 0,!0)]}}};d(Un,"createDefaultProps",()=>({...ft.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),d(Un,"type",Un.register("ESCameraViewCollection",Un,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let Hl=Un;const Ja=class Ja extends dt{constructor(e){super(e);d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"aspectRatio"],"宽高比",1.77778),new L([this,"fov"],"横向夹角",90),new L([this,"far"],"视野长度",100),new L([this,"near"],"近面距离",5)]}}};d(Ja,"createDefaultProps",()=>({...dt.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),d(Ja,"type",Ja.register("ESCameraVisibleRange",Ja,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Qf=Ja;const ja=class ja extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};d(ja,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"policeCar",allowPicking:!0})),d(ja,"type",ja.register("ESCar",ja,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let Kf=ja;const Do=class Do extends Rt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"height"],"高度",10)],coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Do,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,filled:!0,fillStyle:g.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),d(Do,"type",Do.register("ESClassification",Do,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),d(Do,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let Bl=Do;const Qa=class Qa extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Z([this,"showArrow"],"显示箭头",!0),new Gt([this,"edgeColor"],"线框颜色",[1,1,1,1]),new L([this,"edgetWidth"],"线框宽度",2),new L([this,"width"],"裁剪宽度",200),new L([this,"height"],"裁剪高度",200),new Et([this,"targetID"],"瓦片图层","")]}}};d(Qa,"createDefaultProps",()=>({...dt.createDefaultProps(),showArrow:!0,edgeColor:g.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),d(Qa,"type",Qa.register("ESClippingPlane",Qa,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let $f=Qa;class kI extends ot{constructor(t,e,n){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container`);{const u=()=>{const l=` ${e.cssText}
|
|
69
69
|
${e.cssAllInitial?"all: initial;":""}
|
|
70
70
|
${e.show?"":"display: none"}
|
|
71
|
-
`;i.style.cssText=l};u();const h=this.dv(g.createNextAnimateFrameEvent(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(h.don(u))}t.appendChild(i),this.d(()=>t.removeChild(i));const s=this.dv(g.createNextAnimateFrameEvent(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),o=this.dv(new g.ObjResettingWithEvent(s,()=>{const{instanceClass:u,container:h}=e;if(!u||h)return;let l=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const c=i.appendChild(document.createElement("div"));c.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container shadowDiv`),l=c.attachShadow({mode:"open"}).appendChild(document.createElement("div")),l.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container shadowDiv div`)}return new u(l,e,n)})),{_updateEvent:a}=e;this.d(a.don(u=>{if(o.obj)try{u(o.obj,e,n)}catch(h){console.error(`ESCustomDiv update error! ${h}`)}}))}}const
|
|
71
|
+
`;i.style.cssText=l};u();const h=this.dv(g.createNextAnimateFrameEvent(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(h.don(u))}t.appendChild(i),this.d(()=>t.removeChild(i));const s=this.dv(g.createNextAnimateFrameEvent(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),o=this.dv(new g.ObjResettingWithEvent(s,()=>{const{instanceClass:u,container:h}=e;if(!u||h)return;let l=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const c=i.appendChild(document.createElement("div"));c.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container shadowDiv`),l=c.attachShadow({mode:"open"}).appendChild(document.createElement("div")),l.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container shadowDiv div`)}return new u(l,e,n)})),{_updateEvent:a}=e;this.d(a.don(u=>{if(o.obj)try{u(o.obj,e,n)}catch(h){console.error(`ESCustomDiv update error! ${h}`)}}))}}const um=`class MyDiv {
|
|
72
72
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
73
73
|
// customDiv指向当前的CustomDiv场景对象
|
|
74
74
|
// viewer指定当前的视口
|
|
@@ -106,11 +106,11 @@ northing meters`+r;var f=c/2,p=0,v=0,w,E,I,y,_;return f>0&&(w=1e5/Math.pow(10,f)
|
|
|
106
106
|
destroy() {
|
|
107
107
|
this._container.removeChild(this._div);
|
|
108
108
|
}
|
|
109
|
-
}`,
|
|
109
|
+
}`,VI=`示例代码:
|
|
110
110
|
\`\`\`
|
|
111
|
-
${
|
|
111
|
+
${um}
|
|
112
112
|
\`\`\`
|
|
113
|
-
`,zn=class zn extends ft{constructor(e){super(e);d(this,"_updateEvent",this.dv(new X));d(this,"_instanceClassReact",this.dv(g.react(void 0)));d(this,"_innerHtmlMounted",this.dv(new X));d(this,"_container",this.dv(g.react(void 0)));this.registerAttachedObjectForContainer((i,s)=>new
|
|
113
|
+
`,zn=class zn extends ft{constructor(e){super(e);d(this,"_updateEvent",this.dv(new X));d(this,"_instanceClassReact",this.dv(g.react(void 0)));d(this,"_innerHtmlMounted",this.dv(new X));d(this,"_container",this.dv(g.react(void 0)));this.registerAttachedObjectForContainer((i,s)=>new kI(s,this,i));{const i=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};i(),this.d(this.instanceClassStrChanged.don(i))}{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
|
|
114
114
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
115
115
|
// customDiv指向当前的CustomDiv场景对象
|
|
116
116
|
// viewer指定当前的视口
|
|
@@ -131,13 +131,13 @@ ${om}
|
|
|
131
131
|
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}const n=document.createElement("div");n.setAttribute("xe2-div",`ESCustomDiv(${this.id}) container`);{const i=()=>{const o=` ${this.cssText};
|
|
132
132
|
${this.cssAllInitial?"all: initial;":""}
|
|
133
133
|
${this.show?"":"display: none;"}
|
|
134
|
-
`;n.style.cssText=o};i();const s=this.dv(g.createNextAnimateFrameEvent(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(s.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const s=document.getElementById(this.containerId);s instanceof HTMLElement?this.container=s:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends ot{constructor(o){super(),o.appendChild(n),this.d(()=>o.removeChild(n))}}this.dv(new g.ObjResettingWithEvent(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(g.createNextAnimateFrameEvent(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new g.ObjResettingWithEvent(i,()=>{if(!this.container||!this.instanceClass)return;let s=n;if(n.firstElementChild&&n.removeChild(n.firstElementChild),this.shadowDom){const o=n.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),s=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),s.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(s,this,void 0)}))}}update(e){this._updateEvent.emit(e)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}getESProperties(){const e={...super.getESProperties()},n=i=>{i||alert("evalFuncStr为空,无法执行!");try{const s=i&&Function(`"use strict";return (${i})`)();this.update(s)}catch(s){alert(`updateDivFunc error: ${s}`)}};return{...e,more:[...e.more,new vt([new Z([this,"show"],"显示"),new Es([this,"instanceClassStr"],"实例类",
|
|
134
|
+
`;n.style.cssText=o};i();const s=this.dv(g.createNextAnimateFrameEvent(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(s.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const s=document.getElementById(this.containerId);s instanceof HTMLElement?this.container=s:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends ot{constructor(o){super(),o.appendChild(n),this.d(()=>o.removeChild(n))}}this.dv(new g.ObjResettingWithEvent(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(g.createNextAnimateFrameEvent(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new g.ObjResettingWithEvent(i,()=>{if(!this.container||!this.instanceClass)return;let s=n;if(n.firstElementChild&&n.removeChild(n.firstElementChild),this.shadowDom){const o=n.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),s=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),s.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(s,this,void 0)}))}}update(e){this._updateEvent.emit(e)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}getESProperties(){const e={...super.getESProperties()},n=i=>{i||alert("evalFuncStr为空,无法执行!");try{const s=i&&Function(`"use strict";return (${i})`)();this.update(s)}catch(s){alert(`updateDivFunc error: ${s}`)}};return{...e,more:[...e.more,new vt([new Z([this,"show"],"显示"),new Es([this,"instanceClassStr"],"实例类",um,VI,!0),new Es([this,"innerHTML"],"innerHTML",zn.defaultInnerHTML,zn.innerHTMLReadMe,!0),new mt(["string"],n,["(divClass, dom, viewer) => divClass.update && divClass.update()"],"强制更新"),new Z([this,"allowPicking"],"允许拾取",!0),new Et([this,"containerId"],"容器ID",zn.defaults.containerId,!0),new Z([this,"shadowDom"],"shadowDom"),new Z([this,"cssAllInitial"],"cssAllInitial"),new Et([this,"cssText"],"cssText")],"ESCustomDiv")]}}};d(zn,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:"",shadowDom:!1,cssAllInitial:!1,cssText:""})),d(zn,"type",zn.register("ESCustomDiv",zn,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),d(zn,"defaultInnerHTML",` <!-- z-index样式需要设置,否则可能导致看不到!-->
|
|
135
135
|
<div style="width: 300px; height: 50px; z-index: 100; position: absolute; left: 10px; top: 10px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
|
|
136
136
|
`),d(zn,"innerHTMLReadMe",` 示例代码:
|
|
137
137
|
\`\`\`
|
|
138
138
|
${zn.defaultInnerHTML}
|
|
139
139
|
\`\`\`
|
|
140
|
-
`);let
|
|
140
|
+
`);let Yl=zn;const Lo=class Lo extends dt{constructor(e){super(e);d(this,"_maxTime",this.dv(g.react(23)))}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new lt([this,"url"]),new L([this,"maxTime"],"maxTime",23,!0,!0),new L([this,"currentTime"]),new L([this,"minPropValue"]),new L([this,"maxPropValue"]),new lt([this,"colorStops"],"colorStops",Lo.defaults.colorStops,void 0,!0)]}}};d(Lo,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:g.reactJsonWithUndefined([{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}])})),d(Lo,"type",Lo.register("ESDataMesh",Lo,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"}));let Zf=Lo;const Ro=class Ro extends Rt{constructor(e){super(e);d(this,"_distance",this.dv(g.react(0)));d(this,"editingBindMode","lineString");const n=()=>{this._distance.value=this.getDistance()??0};n(),this.d(this.pointsChanged.don(n))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"distance"],"长度",0,!1,!0)]}}};d(Ro,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:g.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ro,"type",Ro.register("ESGeoLineString",Ro,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),d(Ro,"supportEditingModes",[...Rt.supportEditingModes,ct.LineStringAppend,ct.LineStringInsert]);let Bs=Ro;const Ka=class Ka extends Bs{constructor(t){super(t)}};d(Ka,"createDefaultProps",()=>({...Bs.createDefaultProps(),strokeStyle:g.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Ka,"type",Ka.register("ESDistanceMeasurement",Ka,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"距离测量"}));let td=Ka;const js=class js extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"mode"],js.modes,"模式","in"),new Et([this,"targetID"],"瓦片图层","")]}}};d(js,"createDefaultProps",()=>({...oe.createDefaultProps(),mode:"in",targetID:"",filled:!1})),d(js,"type",js.register("ESExcavate",js,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),d(js,"modes",[["向内","in"],["向外","out"]]);let Eh=js;const $a=class $a extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new Cu([this,"image"],"图片"),new cr([this,"translation"],"偏移")]}}};d($a,"createDefaultProps",()=>({...dt.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:g.reactArray([0,0,0])})),d($a,"type",$a.register("ESFireParticleSystem",$a,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"}));let ed=$a;const UI=`
|
|
141
141
|
## 参数类型为 ESTreeType
|
|
142
142
|
\`\`\`js
|
|
143
143
|
type ESJVector2D = [number, number]
|
|
@@ -147,7 +147,7 @@ ${om}
|
|
|
147
147
|
space: number
|
|
148
148
|
}
|
|
149
149
|
\`\`\`
|
|
150
|
-
`,Fo=class Fo extends ne{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new lt([this,"url"],"路径",!0),new lt([this,"treeTypes"],"treeTypes",[],void 0,!0),new lt([this,"xiaoBanWidget"],"xiaoBanWidget",Fo.defaults.xiaoBanWidget,
|
|
150
|
+
`,Fo=class Fo extends ne{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new lt([this,"url"],"路径",!0),new lt([this,"treeTypes"],"treeTypes",[],void 0,!0),new lt([this,"xiaoBanWidget"],"xiaoBanWidget",Fo.defaults.xiaoBanWidget,UI,!0),new Et([this,"youShiSZ"]),new Et([this,"diLei"]),new Et([this,"senLinLB"]),new Et([this,"labelMaterial"]),new L([this,"heightOffset"])]}}};d(Fo,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",treeTypes:g.reactJsonWithUndefined([]),xiaoBanWidget:g.reactJsonWithUndefined({class:"WidgetBlueprint'/ESFoliage/ESDefaultXiaoBan.ESDefaultXiaoBan",pivot:[.5,1],space:1}),youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40})),d(Fo,"type",Fo.register("ESForestTileset",Fo,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"}));let rd=Fo;const hm=`class MyDiv {
|
|
151
151
|
// container是Poi的div
|
|
152
152
|
// geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
|
|
153
153
|
// viewer指定当前的视口
|
|
@@ -178,14 +178,14 @@ ${om}
|
|
|
178
178
|
destroy() {
|
|
179
179
|
this._container.removeChild(this._div);
|
|
180
180
|
}
|
|
181
|
-
}`,
|
|
181
|
+
}`,zI=`示例代码:
|
|
182
182
|
\`\`\`
|
|
183
|
-
${
|
|
183
|
+
${hm}
|
|
184
184
|
\`\`\`
|
|
185
|
-
`,
|
|
186
|
-
`,
|
|
185
|
+
`,lm=`<div style="width: 300px; height: 50px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
|
|
186
|
+
`,qI=`示例代码:
|
|
187
187
|
\`\`\`
|
|
188
|
-
${
|
|
188
|
+
${lm}
|
|
189
189
|
\`\`\`
|
|
190
190
|
`,vi=class vi extends dt{constructor(e){super(e);d(this,"_widgetEvent",this.dv(new X));d(this,"_echartsFunReact",this.dv(g.react(void 0)));d(this,"_instanceClassReact",this.dv(g.react(void 0)));const n=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};n(),this.d(this.instanceClassStrChanged.don(n));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
|
|
191
191
|
// container是Poi的div
|
|
@@ -203,7 +203,7 @@ ${um}
|
|
|
203
203
|
destroy() {
|
|
204
204
|
this._container.removeChild(this._div);
|
|
205
205
|
}
|
|
206
|
-
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"opacity"],"透明度",vi.defaults.opacity,!0),new L([this,"zOrder"],"zOrder",vi.defaults.zOrder,!0),new ze([this,"anchor"],"偏移比例",vi.defaults.anchor,!0),new Es([this,"innerHTML"],"innerHTML",vi.defaults.innerHTML,
|
|
206
|
+
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"opacity"],"透明度",vi.defaults.opacity,!0),new L([this,"zOrder"],"zOrder",vi.defaults.zOrder,!0),new ze([this,"anchor"],"偏移比例",vi.defaults.anchor,!0),new Es([this,"innerHTML"],"innerHTML",vi.defaults.innerHTML,qI,!0),new Es([this,"instanceClassStr"],"实例类",vi.defaults.instanceClassStr,zI,!0),new Z([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};d(vi,"createDefaultProps",()=>({...dt.createDefaultProps(),opacity:1,anchor:g.reactArray([.5,1]),instanceClassStr:hm,innerHTML:lm,zOrder:0,renderInUE:!1})),d(vi,"type",vi.register("ESGeoDiv",vi,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"}));let nd=vi;const Go=class Go extends Rt{constructor(e){super(e);d(this,"editingBindMode","doublePoints")}toPolygon(){if(this.points&&this.points.length>=2){const e=[...this.points][0],n=[...this.points][1];return[e,[e[0],n[1],e[2]],n,[n[0],e[1],n[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const e=[...this.points],n=e[0],i=e[1],s=[n,[n[0],i[1],n[2]],i,[i[0],n[1],i[2]]];this._area.value=Lf(s)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const e=[...this.points],n=e[0],i=e[1],s=[n,[n[0],i[1],n[2]],i,[i[0],n[1],i[2]]],o=[...s,s[0]],a=_h(o,"GEODESIC"),u=a[a.length-1];this._perimeter.value=u}else this._perimeter.value=0}getESProperties(){const e=super.getESProperties();return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(Go,"createDefaultProps",()=>({...Rt.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:g.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),d(Go,"type",Go.register("ESGeoRectangle",Go,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d(Go,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let id=Go;const sd={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},Qs=class Qs extends dt{constructor(e){super(e);d(this,"_nodeTransformations",this.dv(g.react(void 0)));d(this,"_czmModelReadyEvent",this.dv(new X));d(this,"_setNodePositionEvent",this.dv(new X));d(this,"_setNodeRotationEvent",this.dv(new X));d(this,"_setNodeScaleEvent",this.dv(new X));d(this,"_printDebugInfoEvent",this.dv(new X));d(this,"setMaterialInfoEvent",this.ad(new X));d(this,"_setMaterialEvent",this.disposeVar(new X))}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(e){this._nodeTransformations.value=e}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(e){if(!this.nodeTransformations||!this.nodeTransformations[e])return;const n={...this.nodeTransformations};delete n[e],this.nodeTransformations=n}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(e,n){this._setNodePositionEvent.emit(e,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...sd};if(n.some(s=>!Number.isFinite(s))){console.error(`setNodePosition error: ${e} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,translationX:n[0],translationY:n[1],translationZ:n[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(e,n){this._setNodeRotationEvent.emit(e,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...sd};if(n.some(s=>!Number.isFinite(s))){console.error(`setNodeRotation error: ${e} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,rotationHeading:n[0],rotationPitch:n[1],rotationRoll:n[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(e,n){this._setNodeScaleEvent.emit(e,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...sd};if(n.some(s=>!Number.isFinite(s)||s<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${e} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,scaleX:n[0],scaleY:n[1],scaleZ:n[2]}}}getNodePosition(e){if(!this.nodeTransformations)return;const n=this.nodeTransformations[e];if(n)return[n.translationX,n.translationY,n.translationZ]}getNodeRotation(e){if(!this.nodeTransformations)return;const n=this.nodeTransformations[e];if(n)return[n.rotationHeading,n.rotationPitch,n.rotationRoll]}getNodeScale(e){if(!this.nodeTransformations)return;const n=this.nodeTransformations[e];if(n)return[n.scaleX,n.scaleY,n.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(n=>{const i=new ot;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(e)})}setLight122(){this.czmEnvironmentMapManager={...Wf}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",dataSource:[...e.dataSource,new lt([this,"url"],"模型路径",Qs.defaults.url,void 0,!0),new lt([this,"instances"],"实例化矩阵",Qs.defaults.instances,void 0,!0)],more:[...e.more,new ze([this,"czmImageBasedLightingFactor"]),new L([this,"czmAtmosphereScatteringIntensity"]),new lt([this,"czmEnvironmentMapManager"]),new mt([],()=>this.printDebugInfo(),[],"控制台输出模型信息"),new L([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new L([this,"czmNativeScale"],"统一缩放值"),new L([this,"czmMinimumPixelSize"],"最小像素尺寸"),new Gt([this,"czmColor"],"颜色")]}}};d(Qs,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"${earthsdk3-assets-script-dir}/assets/glb/building.glb",czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:g.reactArray([1,1,1,1]),allowPicking:!0,instances:g.reactArrayWithUndefined([]),czmImageBasedLightingFactor:g.reactArray([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:g.reactJsonWithUndefined(void 0)})),d(Qs,"type",Qs.register("ESGltfModel",Qs,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"}));let od=Qs;const qn=class qn extends dt{constructor(e){super(e);d(this,"_aiMoveToEvent",this.dv(new X));d(this,"_stopAIMoveEvent",this.dv(new X))}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(e,n){this._aiMoveToEvent.emit(e,n)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],qn.modes,"模式",qn.defaults.mode,!0),new Tt([this,"animation"],qn.animations,"动画",qn.defaults.animation,!0)],more:[...e.more,new mt(["numbers","number"],(n,i)=>this.aiMoveTo(n,i),[[0,0,0],0],"自动寻路"),new mt([],()=>this.stopAIMove(),[],"停止自动寻路")]}}};d(qn,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0})),d(qn,"type",qn.register("ESHuman",qn,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),d(qn,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"]]),d(qn,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let za=qn;const ko=class ko extends gn{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"url"],"图片路径",ko.defaults.url),new Z([this,"isHoverZoom"],"悬浮放大")]}}};d(ko,"createDefaultProps",()=>({...gn.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,renderMode:4})),d(ko,"type",ko.register("ESImageLabel",ko,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"基础图片标签。"}));let ad=ko;const qi=class qi extends ne{constructor(t){super(t),this.ad(g.bind([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(g.bind([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new L([this,"zIndex"],"层级序号",qi.defaults.zIndex)],dataSource:[...t.dataSource,new lt([this,"url"],"影像服务地址"),new Yn([this,"rectangle"],"矩形范围",qi.defaults.rectangle,!0),new Be([this,"maximumLevel"],1,[1,24],"最大级别",qi.defaults.maximumLevel,!0),new lt([this,"options"],"options",qi.defaults.options,void 0,!0),new Et([this,"targetID"],"targetID"),new Be([this,"opacity"],.01,[0,1],"opacity",1)],more:[...t.more,new vt([],"通用"),new L([this,"height"],"高度"),new Et([this,"actorTag"]),new Et([this,"componentTag"]),new L([this,"minimumLevel"]),new vt([],"图像"),new L([this,"czmAlpha"],"透明度"),new L([this,"czmBrightness"],"亮度"),new L([this,"czmContrast"],"对比度"),new L([this,"czmHue"],"色相"),new L([this,"czmSaturation"],"饱和度"),new L([this,"czmGamma"],"伽马值")]}}};d(qi,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",rectangle:g.reactJsonWithUndefined([-180,-90,180,90]),options:g.reactJsonWithUndefined(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE"})),d(qi,"type",qi.register("ESImageryLayer",qi,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"}));let ud=qi;const WI=`
|
|
207
207
|
# 声明文件
|
|
208
208
|
### options 类型
|
|
209
209
|
\`\`\`javascript
|
|
@@ -309,14 +309,14 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
\`\`\`
|
|
312
|
-
`,mi=class mi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"size"],"尺寸",mi.defaults.size),new Z([this,"autoFollow"],"自动跟随",mi.defaults.autoFollow),new Tt([this,"mode"],mi.modes,"模式","blueSky")],more:[...t.more,new L([this,"autoOpacityFactor"],"自动消失系数",mi.defaults.autoOpacityFactor)]}}};d(mi,"createDefaultProps",()=>({...dt.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),d(mi,"type",mi.register("ESLocalSkyBox",mi,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),d(mi,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let ad=mi;const Ah=class Ah extends dt{constructor(e){super(e);d(this,"_location",this.disposeVar(g.react(void 0)));{const n=()=>{this.location=this.position};n(),this.ad(this.positionChanged.don(n))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};d(Ah,"type",Ah.register("ESLocationMeasurement",Ah,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let ud=Ah;const lr=class lr extends dt{constructor(e){super(e);d(this,"_player",this.dv(new Jn));{const n=lr.defaults;this.d(g.bind([this._player,"loop"],[this,"playingLoop"],i=>i??n.playingLoop,i=>i??n.playingLoop)),this.d(g.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??n.currentTime,i=>i??n.currentTime)),this.d(g.bind([this._player,"duration"],[this,"duration"],i=>i??n.duration,i=>i??n.duration)),this.d(g.bind([this._player,"playing"],[this,"playing"],i=>i??n.playing,i=>i??n.playing)),this.d(g.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??n.playingSpeed,i=>i??n.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new mt(["number"],n=>this.flyTo(n),[1e3],"飞入"),new Es([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new L([this,"emissionRate"],"发射率",5,!0),new Z([this,"loop"],"是否循环",!0,!0),new L([this,"particleScale"],"等级",1,!0),new L([this,"startScale"],"初始等级",void 0,!0),new L([this,"endScale"],"结束等级",lr.defaults.endScale,!0),new Gt([this,"color"],"颜色",void 0,!0),new Gt([this,"startColor"],"初始颜色",void 0,!0),new Gt([this,"endColor"],"结束颜色",void 0,!0),new Z([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new L([this,"speed"],"速度",1,!0),new L([this,"minimumSpeed"],"最小速度",void 0,!0),new L([this,"maximumSpeed"],"最大速度",void 0,!0),new L([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new L([this,"particleLife"],"粒子生命周期",lr.defaults.particleLife,!0),new L([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new L([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new L([this,"mass"],"块数量",1,!0),new L([this,"minimumMass"],"最小块数量",void 0,!0),new L([this,"maximumMass"],"最大块数量",void 0,!0),new ze([this,"imageSize"],"图片尺寸",lr.defaults.imageSize,!0),new ze([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new ze([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new Cu([this,"image"],"图片",lr.defaults.image,!0),new cr([this,"translation"],"偏移",[0,0,0],!0),new vc([this,"bursts"],"bursts",void 0,!0),new lt([this,"emitter"],"emitter",lr.defaults.emitter),new vt([],"播放器","播放器"),new L([this,"ratio"],"播放比率",0,!0),new Uh([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new Z([this,"playingLoop"],"是否循环",lr.defaults.playingLoop,!0),new L([this,"currentTime"],"当前时间",lr.defaults.currentTime,!0),new L([this,"duration"],"过渡时间",lr.defaults.duration,!0),new Z([this,"playing"],"是否播放",lr.defaults.playing,!0),new L([this,"playingSpeed"],"播放速度",lr.defaults.playingSpeed,!0)]}}};d(lr,"createDefaultProps",()=>({...dt.createDefaultProps(),emitter:g.reactJsonWithUndefined({type:"CircleEmitter",radius:.5}),bursts:g.reactArrayCollectionWithUndefined(void 0),translation:g.reactArrayWithUndefined(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:g.reactArrayWithUndefined([20,20]),minimumImageSize:g.reactArrayWithUndefined(void 0),maximumImageSize:g.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:g.reactArrayWithUndefined(void 0),startColor:g.reactArrayWithUndefined(void 0),endColor:g.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),d(lr,"type",lr.register("ESParticleSystemPrimitive",lr,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let hd=lr;const yi=class yi extends gn{constructor(e){super(e);d(this,"initialStyle",this.ad(g.reactJsonWithUndefined(void 0)));d(this,"_getInitialStyleEvent",this.disposeVar(new X))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const n=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],yi.modes,"模式",yi.defaults.mode),new lt([this,"style"],"样式",yi.defaults.style),new Z([this,"autoAnchor"],"自动锚点对齐",yi.defaults.autoAnchor)]}}};d(yi,"createDefaultProps",()=>({...gn.createDefaultProps(),mode:"SquareH01",style:g.reactJson({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),d(yi,"type",yi.register("ESPoi2D",yi,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(yi,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let Sh=yi;const Wi=class Wi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"mode"],Wi.modes,"模式",Wi.defaults.mode),new lt([this,"style"],"样式",Wi.defaults.style)]}}};d(Wi,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"triangle",style:g.reactJson({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),d(Wi,"type",Wi.register("ESPoi3D",Wi,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(Wi,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let ld=Wi;const Za=class Za extends oe{constructor(e){super(e);d(this,"_czmFlattenedPlaneId",this.dv(g.react("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"targetID"],"瓦片图层","")]}}};d(Za,"createDefaultProps",()=>({...oe.createDefaultProps(),targetID:"",filled:!1})),d(Za,"type",Za.register("ESPolygonFlattenedPlane",Za,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let cd=Za;const hm=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},lm=async(r,t)=>{const{viewer:e}=r;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const n=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return n.error&&console.error("RemoveAllTrees:",n.error),n},cm=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},fm=async(r,t,e,n)=>{const{viewer:i}=r;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:n}});return s.error&&console.error("CutDownTrees:",s.error),s},dm=async(r,t,e,n,i)=>{const{viewer:s}=r;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:n}});return o.error&&console.error("GrowthSimulation:",o.error),o},tu=class tu extends ne{constructor(e){super(e);d(this,"_addTreesEvent",this.dv(new X));d(this,"_removeAllTreesEvent",this.dv(new X));d(this,"_updateTreeParamsEvent",this.dv(new X));d(this,"_cutDownTreesEvent",this.dv(new X));d(this,"_growthSimulationEvent",this.dv(new X))}async addTreesCallFunc(e,n){return await hm(e,this.id,n)}async updateTreeParamsCallFunc(e,n){return await cm(e,this.id,n)}async cutDownTreesCallFunc(e,n,i){return await fm(e,this.id,n,i)}async removeAllTreesCallFunc(e){return await lm(e,this.id)}async growthSimulationCallFunc(e,n,i,s){return await dm(e,this.id,n,i,s)}async getIdByComponentNameAndHitItem(e,n,i){return await e.getIdByComponentNameAndHitItem(this.id,n,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,n){this._cutDownTreesEvent.emit(e,n)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,n,i){this._growthSimulationEvent.emit(e,n,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用"),new lt([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new L([this,"stumpId"],"树桩id"),new L([this,"intervalTime"],"动画间隔时间"),new L([this,"switchIntervalTime"],"切换间隔时间")]}}};d(tu,"createDefaultProps",()=>({...ne.createDefaultProps(),treeTypes:g.reactJsonWithUndefined([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),d(tu,"type",tu.register("ESSeparateFoliage",tu,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let fd=tu;function Yl(r,t,e){const n="buffer"in r,i=n?r.buffer:r;n&&(t+=r.byteOffset);const s=new Array(e),o=new DataView(i);for(let a=0;a<e;++a){const u=o.getUint8(t+a);s[a]=String.fromCharCode(u)}return s.join("")}function Jl(r,t){const e="buffer"in r,n=e?r.buffer:r;return e&&(t+=r.byteOffset),new DataView(n).getUint32(t,!0)}function gm(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function qI(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function WI(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function XI(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function pm(r){if(Yl(r,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=Jl(r,4);if(e!==2){console.error("Unsupported glTF version");return}const n=Jl(r,8);if(n!==r.byteLength){console.error("Invalid glTF length");return}const i=Jl(r,12);if(i+12+4>n){console.error("Invalid glTF chunk length");return}if(Yl(r,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=Yl(r,20,i),a={version:e,length:n,gltfJson:o};if(20+i<r.byteLength){const u=Jl(r,20+i);if(Yl(r,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const l=gm(r,20+i+8,u);a.gltfBinary=l}return a}window.parseGlb=pm;function vm(r){const t=pm(r);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(n=>{var i=e.meshes[n.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=e.accessors[s],u=e.bufferViews[a.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const h=XI(t.gltfBinary,u.byteOffset??0,u.byteLength/4);var l=e.accessors[o],c=e.bufferViews[l.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let f;return l.componentType===5121?f=gm(t.gltfBinary,c.byteOffset??0,c.byteLength/1):l.componentType===5123?f=qI(t.gltfBinary,c.byteOffset??0,c.byteLength/2):l.componentType===5125&&(f=WI(t.gltfBinary,c.byteOffset??0,c.byteLength/4)),{name:n.name,posBuffer:h,indicesBuffer:f}})}window.parseWaterGlb=vm;const Sr=class Sr extends dt{constructor(e){super(e);d(this,"_submergingData");d(this,"_allMoments",[]);d(this,"readyEvent",this.dv(new X));{const n=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=vm(s);const o=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};n(),this.d(this.urlChanged.don(()=>{n()}))}}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"url"],"Url地址",Sr.defaults.url),new Be([this,"amplitude"],.01,[0,1],"振幅",Sr.defaults.amplitude),new L([this,"frequency"],"频率",Sr.defaults.frequency),new L([this,"currentTime"],"当前时间",Sr.defaults.currentTime),new lt([this,"materialParams"],"材质参数",Sr.defaults.materialParams),new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new Gt([this,"waterColor"],"水的底色",Sr.defaults.waterColor),new Be([this,"waveVelocity"],.01,[0,1],"波动频率",Sr.defaults.waveVelocity),new L([this,"flowSpeed"],"水流速度",Sr.defaults.flowSpeed),new Be([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Sr.defaults.specularIntensity),new Be([this,"murkiness"],.01,[0,10],"水体浑浊度",Sr.defaults.murkiness)]}}};d(Sr,"createDefaultProps",()=>({...dt.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:g.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),d(Sr,"type",Sr.register("ESSubmergingAnalysis",Sr,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let dd=Sr;const Vo=class Vo extends oe{constructor(e){super(e);d(this,"_startEvent",this.dv(new X));d(this,"_stopEvent",this.dv(new X))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Gt([this,"startColor"],"起始颜色"),new Gt([this,"endColor"],"结束颜色"),new L([this,"progress"],"计算进度"),new L([this,"extrudedHeight"],"高度m"),new L([this,"height"],"底面高度"),new L([this,"sampleDistance"],"采样间距m"),new L([this,"startTime"],"起始时间,时间戳"),new L([this,"endTime"],"结束时间,时间戳"),new L([this,"spanTime"],"时间跨度,默认1小时时间戳"),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.stop(),[],"结束分析")]}}};d(Vo,"createDefaultProps",()=>({...oe.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:g.reactArray([1,1,0,1]),endColor:g.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),d(Vo,"type",Vo.register("ESSunshineAnalysis",Vo,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),d(Vo,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let gd=Vo;const Wn=class Wn extends ne{constructor(e){super(e);d(this,"_activateEvent",this.disposeVar(new X));d(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new L([this,"zIndex"],"层级序号",Wn.defaults.zIndex),new Tt([this,"renderMode"],Wn.renderModes,"渲染模式","default"),new L([this,"opacity"],"透明度",Wn.defaults.opacity)],dataSource:[...e.dataSource,new lt([this,"url"],"地形服务地址",Wn.defaults.url),new Yn([this,"rectangle"],"矩形范围",Wn.defaults.rectangle)],more:[...e.more,new L([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new L([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};d(Wn,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:g.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})),d(Wn,"type",Wn.register("ESTerrainLayer",Wn,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),d(Wn,"renderModes",[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]]);let pd=Wn;const Xi=class Xi extends gn{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Gt([this,"color"],"文本颜色",[1,1,1,1]),new L([this,"fontSize"],"文字大小",14),new mc([this,"text"],"内容",Xi.defaults.text,void 0,!0),new Gt([this,"backgroundColor"],"背景颜色",Xi.defaults.backgroundColor),new Yn([this,"padding"],"内边距",Xi.defaults.padding),new Gt([this,"borderColor"],"边界颜色"),new Yn([this,"borderRadius"],"边界圆角"),new L([this,"borderWidth"],"边界宽度")],more:[...t.more,new vt([],"czm","czm"),new Z([this,"textEditingInteraction"],"文本编辑交互"),new Z([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",Xi.defaults.width,!0),new L([this,"opacity"],"透明度"),new Tt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new Tt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(Xi,"createDefaultProps",()=>({...gn.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:g.reactArray([1,1,1,1]),backgroundColor:g.reactArray([0,0,0,.8]),padding:g.reactArray([5,5,5,5]),borderRadius:g.reactArray([6,6,6,6]),borderWidth:0,borderColor:g.reactArray([1,1,1,1]),borderStyle:"solid"})),d(Xi,"type",Xi.register("ESTextLabel",Xi,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let vd=Xi;const HI=`
|
|
312
|
+
`,mi=class mi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"size"],"尺寸",mi.defaults.size),new Z([this,"autoFollow"],"自动跟随",mi.defaults.autoFollow),new Tt([this,"mode"],mi.modes,"模式","blueSky")],more:[...t.more,new L([this,"autoOpacityFactor"],"自动消失系数",mi.defaults.autoOpacityFactor)]}}};d(mi,"createDefaultProps",()=>({...dt.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),d(mi,"type",mi.register("ESLocalSkyBox",mi,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),d(mi,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let hd=mi;const Ah=class Ah extends dt{constructor(e){super(e);d(this,"_location",this.disposeVar(g.react(void 0)));{const n=()=>{this.location=this.position};n(),this.ad(this.positionChanged.don(n))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};d(Ah,"type",Ah.register("ESLocationMeasurement",Ah,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let ld=Ah;const lr=class lr extends dt{constructor(e){super(e);d(this,"_player",this.dv(new Jn));{const n=lr.defaults;this.d(g.bind([this._player,"loop"],[this,"playingLoop"],i=>i??n.playingLoop,i=>i??n.playingLoop)),this.d(g.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??n.currentTime,i=>i??n.currentTime)),this.d(g.bind([this._player,"duration"],[this,"duration"],i=>i??n.duration,i=>i??n.duration)),this.d(g.bind([this._player,"playing"],[this,"playing"],i=>i??n.playing,i=>i??n.playing)),this.d(g.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??n.playingSpeed,i=>i??n.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new mt(["number"],n=>this.flyTo(n),[1e3],"飞入"),new Es([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new L([this,"emissionRate"],"发射率",5,!0),new Z([this,"loop"],"是否循环",!0,!0),new L([this,"particleScale"],"等级",1,!0),new L([this,"startScale"],"初始等级",void 0,!0),new L([this,"endScale"],"结束等级",lr.defaults.endScale,!0),new Gt([this,"color"],"颜色",void 0,!0),new Gt([this,"startColor"],"初始颜色",void 0,!0),new Gt([this,"endColor"],"结束颜色",void 0,!0),new Z([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new L([this,"speed"],"速度",1,!0),new L([this,"minimumSpeed"],"最小速度",void 0,!0),new L([this,"maximumSpeed"],"最大速度",void 0,!0),new L([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new L([this,"particleLife"],"粒子生命周期",lr.defaults.particleLife,!0),new L([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new L([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new L([this,"mass"],"块数量",1,!0),new L([this,"minimumMass"],"最小块数量",void 0,!0),new L([this,"maximumMass"],"最大块数量",void 0,!0),new ze([this,"imageSize"],"图片尺寸",lr.defaults.imageSize,!0),new ze([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new ze([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new Cu([this,"image"],"图片",lr.defaults.image,!0),new cr([this,"translation"],"偏移",[0,0,0],!0),new yc([this,"bursts"],"bursts",void 0,!0),new lt([this,"emitter"],"emitter",lr.defaults.emitter),new vt([],"播放器","播放器"),new L([this,"ratio"],"播放比率",0,!0),new zh([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new Z([this,"playingLoop"],"是否循环",lr.defaults.playingLoop,!0),new L([this,"currentTime"],"当前时间",lr.defaults.currentTime,!0),new L([this,"duration"],"过渡时间",lr.defaults.duration,!0),new Z([this,"playing"],"是否播放",lr.defaults.playing,!0),new L([this,"playingSpeed"],"播放速度",lr.defaults.playingSpeed,!0)]}}};d(lr,"createDefaultProps",()=>({...dt.createDefaultProps(),emitter:g.reactJsonWithUndefined({type:"CircleEmitter",radius:.5}),bursts:g.reactArrayCollectionWithUndefined(void 0),translation:g.reactArrayWithUndefined(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:g.reactArrayWithUndefined([20,20]),minimumImageSize:g.reactArrayWithUndefined(void 0),maximumImageSize:g.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:g.reactArrayWithUndefined(void 0),startColor:g.reactArrayWithUndefined(void 0),endColor:g.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),d(lr,"type",lr.register("ESParticleSystemPrimitive",lr,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let cd=lr;const yi=class yi extends gn{constructor(e){super(e);d(this,"initialStyle",this.ad(g.reactJsonWithUndefined(void 0)));d(this,"_getInitialStyleEvent",this.disposeVar(new X))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const n=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],yi.modes,"模式",yi.defaults.mode),new lt([this,"style"],"样式",yi.defaults.style),new Z([this,"autoAnchor"],"自动锚点对齐",yi.defaults.autoAnchor)]}}};d(yi,"createDefaultProps",()=>({...gn.createDefaultProps(),mode:"SquareH01",style:g.reactJson({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),d(yi,"type",yi.register("ESPoi2D",yi,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(yi,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let Sh=yi;const Wi=class Wi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"mode"],Wi.modes,"模式",Wi.defaults.mode),new lt([this,"style"],"样式",Wi.defaults.style)]}}};d(Wi,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"triangle",style:g.reactJson({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),d(Wi,"type",Wi.register("ESPoi3D",Wi,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),d(Wi,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let fd=Wi;const Za=class Za extends oe{constructor(e){super(e);d(this,"_czmFlattenedPlaneId",this.dv(g.react("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"targetID"],"瓦片图层","")]}}};d(Za,"createDefaultProps",()=>({...oe.createDefaultProps(),targetID:"",filled:!1})),d(Za,"type",Za.register("ESPolygonFlattenedPlane",Za,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let dd=Za;const cm=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},fm=async(r,t)=>{const{viewer:e}=r;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const n=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return n.error&&console.error("RemoveAllTrees:",n.error),n},dm=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},gm=async(r,t,e,n)=>{const{viewer:i}=r;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:n}});return s.error&&console.error("CutDownTrees:",s.error),s},pm=async(r,t,e,n,i)=>{const{viewer:s}=r;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:n}});return o.error&&console.error("GrowthSimulation:",o.error),o},tu=class tu extends ne{constructor(e){super(e);d(this,"_addTreesEvent",this.dv(new X));d(this,"_removeAllTreesEvent",this.dv(new X));d(this,"_updateTreeParamsEvent",this.dv(new X));d(this,"_cutDownTreesEvent",this.dv(new X));d(this,"_growthSimulationEvent",this.dv(new X))}async addTreesCallFunc(e,n){return await cm(e,this.id,n)}async updateTreeParamsCallFunc(e,n){return await dm(e,this.id,n)}async cutDownTreesCallFunc(e,n,i){return await gm(e,this.id,n,i)}async removeAllTreesCallFunc(e){return await fm(e,this.id)}async growthSimulationCallFunc(e,n,i,s){return await pm(e,this.id,n,i,s)}async getIdByComponentNameAndHitItem(e,n,i){return await e.getIdByComponentNameAndHitItem(this.id,n,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,n){this._cutDownTreesEvent.emit(e,n)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,n,i){this._growthSimulationEvent.emit(e,n,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用"),new lt([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new L([this,"stumpId"],"树桩id"),new L([this,"intervalTime"],"动画间隔时间"),new L([this,"switchIntervalTime"],"切换间隔时间")]}}};d(tu,"createDefaultProps",()=>({...ne.createDefaultProps(),treeTypes:g.reactJsonWithUndefined([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),d(tu,"type",tu.register("ESSeparateFoliage",tu,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let gd=tu;function Jl(r,t,e){const n="buffer"in r,i=n?r.buffer:r;n&&(t+=r.byteOffset);const s=new Array(e),o=new DataView(i);for(let a=0;a<e;++a){const u=o.getUint8(t+a);s[a]=String.fromCharCode(u)}return s.join("")}function jl(r,t){const e="buffer"in r,n=e?r.buffer:r;return e&&(t+=r.byteOffset),new DataView(n).getUint32(t,!0)}function vm(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function XI(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function HI(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function BI(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function mm(r){if(Jl(r,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=jl(r,4);if(e!==2){console.error("Unsupported glTF version");return}const n=jl(r,8);if(n!==r.byteLength){console.error("Invalid glTF length");return}const i=jl(r,12);if(i+12+4>n){console.error("Invalid glTF chunk length");return}if(Jl(r,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=Jl(r,20,i),a={version:e,length:n,gltfJson:o};if(20+i<r.byteLength){const u=jl(r,20+i);if(Jl(r,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const l=vm(r,20+i+8,u);a.gltfBinary=l}return a}window.parseGlb=mm;function ym(r){const t=mm(r);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(n=>{var i=e.meshes[n.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=e.accessors[s],u=e.bufferViews[a.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const h=BI(t.gltfBinary,u.byteOffset??0,u.byteLength/4);var l=e.accessors[o],c=e.bufferViews[l.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let f;return l.componentType===5121?f=vm(t.gltfBinary,c.byteOffset??0,c.byteLength/1):l.componentType===5123?f=XI(t.gltfBinary,c.byteOffset??0,c.byteLength/2):l.componentType===5125&&(f=HI(t.gltfBinary,c.byteOffset??0,c.byteLength/4)),{name:n.name,posBuffer:h,indicesBuffer:f}})}window.parseWaterGlb=ym;const Sr=class Sr extends dt{constructor(e){super(e);d(this,"_submergingData");d(this,"_allMoments",[]);d(this,"readyEvent",this.dv(new X));{const n=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=ym(s);const o=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};n(),this.d(this.urlChanged.don(()=>{n()}))}}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"url"],"Url地址",Sr.defaults.url),new Be([this,"amplitude"],.01,[0,1],"振幅",Sr.defaults.amplitude),new L([this,"frequency"],"频率",Sr.defaults.frequency),new L([this,"currentTime"],"当前时间",Sr.defaults.currentTime),new lt([this,"materialParams"],"材质参数",Sr.defaults.materialParams),new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new Gt([this,"waterColor"],"水的底色",Sr.defaults.waterColor),new Be([this,"waveVelocity"],.01,[0,1],"波动频率",Sr.defaults.waveVelocity),new L([this,"flowSpeed"],"水流速度",Sr.defaults.flowSpeed),new Be([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Sr.defaults.specularIntensity),new Be([this,"murkiness"],.01,[0,10],"水体浑浊度",Sr.defaults.murkiness)]}}};d(Sr,"createDefaultProps",()=>({...dt.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:g.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),d(Sr,"type",Sr.register("ESSubmergingAnalysis",Sr,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let pd=Sr;const Vo=class Vo extends oe{constructor(e){super(e);d(this,"_startEvent",this.dv(new X));d(this,"_stopEvent",this.dv(new X))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Gt([this,"startColor"],"起始颜色"),new Gt([this,"endColor"],"结束颜色"),new L([this,"progress"],"计算进度"),new L([this,"extrudedHeight"],"高度m"),new L([this,"height"],"底面高度"),new L([this,"sampleDistance"],"采样间距m"),new L([this,"startTime"],"起始时间,时间戳"),new L([this,"endTime"],"结束时间,时间戳"),new L([this,"spanTime"],"时间跨度,默认1小时时间戳"),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.stop(),[],"结束分析")]}}};d(Vo,"createDefaultProps",()=>({...oe.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:g.reactArray([1,1,0,1]),endColor:g.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),d(Vo,"type",Vo.register("ESSunshineAnalysis",Vo,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),d(Vo,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let vd=Vo;const Wn=class Wn extends ne{constructor(e){super(e);d(this,"_activateEvent",this.disposeVar(new X));d(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new L([this,"zIndex"],"层级序号",Wn.defaults.zIndex),new Tt([this,"renderMode"],Wn.renderModes,"渲染模式","default"),new L([this,"opacity"],"透明度",Wn.defaults.opacity)],dataSource:[...e.dataSource,new lt([this,"url"],"地形服务地址",Wn.defaults.url),new Yn([this,"rectangle"],"矩形范围",Wn.defaults.rectangle)],more:[...e.more,new L([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new L([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};d(Wn,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:g.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})),d(Wn,"type",Wn.register("ESTerrainLayer",Wn,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),d(Wn,"renderModes",[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]]);let md=Wn;const Xi=class Xi extends gn{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Gt([this,"color"],"文本颜色",[1,1,1,1]),new L([this,"fontSize"],"文字大小",14),new _c([this,"text"],"内容",Xi.defaults.text,void 0,!0),new Gt([this,"backgroundColor"],"背景颜色",Xi.defaults.backgroundColor),new Yn([this,"padding"],"内边距",Xi.defaults.padding),new Gt([this,"borderColor"],"边界颜色"),new Yn([this,"borderRadius"],"边界圆角"),new L([this,"borderWidth"],"边界宽度")],more:[...t.more,new vt([],"czm","czm"),new Z([this,"textEditingInteraction"],"文本编辑交互"),new Z([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",Xi.defaults.width,!0),new L([this,"opacity"],"透明度"),new Tt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new Tt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(Xi,"createDefaultProps",()=>({...gn.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:g.reactArray([1,1,1,1]),backgroundColor:g.reactArray([0,0,0,.8]),padding:g.reactArray([5,5,5,5]),borderRadius:g.reactArray([6,6,6,6]),borderWidth:0,borderColor:g.reactArray([1,1,1,1]),borderStyle:"solid"})),d(Xi,"type",Xi.register("ESTextLabel",Xi,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let yd=Xi;const YI=`
|
|
313
313
|
#### 默认值如下
|
|
314
314
|
\`\`\`js
|
|
315
315
|
{
|
|
316
316
|
"Title": "示例",
|
|
317
317
|
"Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
318
318
|
}
|
|
319
|
-
\`\`\``,Xn=class Xn extends gn{constructor(e){super(e);d(this,"_callFunctionEvent",this.disposeVar(new X));d(this,"_callFunctionResultEvent",this.dv(new X))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,n){return new Promise(i=>{const s=new ot,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(e,n)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new cr([this,"positionOffset"],"positionOffset",Xn.defaults.positionOffset),new cr([this,"rotationOffset"],"rotationOffset",Xn.defaults.rotationOffset),new Et([this,"actorTag"],"actorTag",Xn.defaults.actorTag),new Et([this,"widgetClass"],"widgetClass",Xn.defaults.widgetClass),new Et([this,"socketName"],"socketName",Xn.defaults.socketName),new lt([this,"info"],"info",Xn.defaults.info,
|
|
319
|
+
\`\`\``,Xn=class Xn extends gn{constructor(e){super(e);d(this,"_callFunctionEvent",this.disposeVar(new X));d(this,"_callFunctionResultEvent",this.dv(new X))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,n){return new Promise(i=>{const s=new ot,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(e,n)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new cr([this,"positionOffset"],"positionOffset",Xn.defaults.positionOffset),new cr([this,"rotationOffset"],"rotationOffset",Xn.defaults.rotationOffset),new Et([this,"actorTag"],"actorTag",Xn.defaults.actorTag),new Et([this,"widgetClass"],"widgetClass",Xn.defaults.widgetClass),new Et([this,"socketName"],"socketName",Xn.defaults.socketName),new lt([this,"info"],"info",Xn.defaults.info,YI,!0)],more:[...e.more,new mt(["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""],"callFunction")]}}};d(Xn,"createDefaultProps",()=>({...gn.createDefaultProps(),widgetClass:"",info:g.reactJsonWithUndefined({Title:"标题示例",Content:"内容示例"})})),d(Xn,"type",Xn.register("ESUEWidget",Xn,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"}));let _d=Xn;const eu=class eu extends dt{constructor(){super(...arguments);d(this,"_callFunctionEvent",this.dv(new X));d(this,"_callFunctionResultEvent",this.dv(new X));d(this,"_actorEvent",this.dv(new X));d(this,"_lastActorStatus",this.dv(g.react("null")))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,n){return new Promise(i=>{const s=new ot,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(e,n)})}getBoundSphereWithChildren(e){return new Promise((n,i)=>{n(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(e){this._lastActorStatus.value=e}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"actorTag"],"actorTag",""),new Et([this,"actorClass"],"actorClass",""),new Z([this,"highlight"],"是否高亮",!1)],more:[...e.more,new mt(["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""],"callFunction")]}}};d(eu,"createDefaultProps",()=>({...dt.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})),d(eu,"type",eu.register("ESUnrealActor",eu,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let wd=eu;const Cr=class Cr extends dt{constructor(e){super(e);d(this,"editingBindMode","doublePoints");d(this,"_resetWithCameraInfoEvent",this.dv(new X));this.collision=!1}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Z([this,"looping"],"循环",Cr.defaults.looping),new Z([this,"showFrustum"],"视椎体",Cr.defaults.showFrustum),new L([this,"aspectRatio"],"宽高比",Cr.defaults.aspectRatio),new L([this,"fov"],"横向夹角",Cr.defaults.fov),new L([this,"far"],"视野长度",Cr.defaults.far),new L([this,"near"],"近面距离",Cr.defaults.near),new lt([this,"videoStreamUrl"],"视频路径",Cr.defaults.videoStreamUrl),new L([this,"zIndex"],"显示优先级",Cr.defaults.zIndex),new Tt([this,"videoStreamType"],Cr.videoStreamTypes,"视频类型","video")],more:[...e.more,new mt([],()=>this.resetWithCameraInfo(),[],"以当前相机状态重置")]}}};d(Cr,"createDefaultProps",()=>({...dt.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})),d(Cr,"type",Cr.register("ESVideoFusion",Cr,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),d(Cr,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]);let Ed=Cr;const Hn=class Hn extends dt{constructor(e){super(e);d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Z([this,"showFrustum"],"视椎体",Hn.defaults.showFrustum),new L([this,"aspectRatio"],"宽高比",Hn.defaults.aspectRatio),new L([this,"fov"],"横向夹角",Hn.defaults.fov),new L([this,"near"],"近面距离",Hn.defaults.near),new L([this,"far"],"视野长度",Hn.defaults.far),new L([this,"zIndex"],"显示优先级",Hn.defaults.zIndex)]}}};d(Hn,"createDefaultProps",()=>({...dt.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0,collision:!1})),d(Hn,"type",Hn.register("ESViewShed",Hn,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"}));let Sd=Hn;const JI=`
|
|
320
320
|
#### 默认值如下
|
|
321
321
|
\`\`\`js
|
|
322
322
|
{
|
|
@@ -324,7 +324,7 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
324
324
|
"Key":"Value",
|
|
325
325
|
"内容": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
326
326
|
}
|
|
327
|
-
\`\`\``,Ks=class Ks extends gn{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"info"],"信息",Ks.defaults.info,
|
|
327
|
+
\`\`\``,Ks=class Ks extends gn{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"info"],"信息",Ks.defaults.info,JI,!0)],more:[...t.more,new vt([],"通用","通用"),new vt([],"ue","ue"),new Ko([this,"positionOffset"],"坐标偏移"),new Ko([this,"rotationOffset"],"旋转偏移"),new Et([this,"actorTag"]),new Et([this,"widgetClass"]),new Et([this,"socketName"]),new vt([],"czm","czm"),new L([this,"opacity"],"透明度",Ks.defaults.opacity,!0)]}}};d(Ks,"createDefaultProps",()=>({...gn.createDefaultProps(),info:g.reactJson({title:"标题示例",内容:"内容示例"}),widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:g.reactArray([0,0,0]),rotationOffset:g.reactArray([0,0,0]),opacity:1})),d(Ks,"type",Ks.register("ESWidget",Ks,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"}));let Cd=Ks;const Uo=class Uo extends Rt{constructor(e){super(e);d(this,"_direction",this.disposeVar(g.react(0)));d(this,"editingBindMode","doublePoints");{const n=()=>{this.direction=this.points&&this.points.length>=2?$o(yh(this.points[0],this.points[1])):0};n(),this.ad(this.pointsChanged.don(n))}}get direction(){return this._direction.value}set direction(e){this._direction.value=e}get directionChanged(){return this._direction.changed}};d(Uo,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:g.reactJson({width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(Uo,"type",Uo.register("ESDirectionMeasurement",Uo,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"方位角测量"})),d(Uo,"supportEditingModes",[...Rt.supportEditingModes,ct.Rotation,ct.Scale,ct.DoublePointsAppend,ct.DoublePointsModify]);let Pd=Uo;const _m=`// dataSource
|
|
328
328
|
(dataSource) => {
|
|
329
329
|
if (dataSource) {
|
|
330
330
|
dataSource.show = true;
|
|
@@ -350,11 +350,11 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
`,
|
|
353
|
+
`,jI=`示例代码
|
|
354
354
|
\`\`\`
|
|
355
|
-
${
|
|
355
|
+
${_m}
|
|
356
356
|
\`\`\`
|
|
357
|
-
`;function ym(r){try{return JSON.parse(r),!0}catch{return!1}}const JI="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Wt=class Wt extends ne{constructor(e){super(e);d(this,"_flyToFeatureEvent",this.dv(new X));d(this,"_flyToFeatureIndexEvent",this.dv(new X));d(this,"_features",this.disposeVar(g.reactJsonWithUndefined(void 0)));d(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,n,i){this._flyToFeatureEvent.emit(e,n,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,n){this._flyToFeatureIndexEvent.emit(e,n)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:ym(this.url)?this.features=JSON.parse(this.url):await fetch(ft.context.getStrFromEnv(this.url)).then(n=>n.json()).then(n=>{this.features=n}).catch(n=>{console.warn("ESEntityCluster数据加载失败",n)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new lt([this,"url"],"服务地址",Wt.defaults.url),new L([this,"minFeatureVisibleDistance"],"要素最小可视距离",Wt.defaults.minFeatureVisibleDistance),new L([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Wt.defaults.maxFeatureVisibleDistance),new Tt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new vt([],"点样式集合"),new Z([this,"textShow"],"是否显示",Wt.defaults.textShow),new ze([this,"textAnchor"],"锚点",Wt.defaults.anchor),new Et([this,"textProperty"],"标注显示属性",Wt.defaults.textStyle.textProperty),new Et([this,"textDefaultText"],"默认文本",Wt.defaults.textStyle.defaultText),new Gt([this,"textColor"],"文本颜色",Wt.defaults.textStyle.color),new Gt([this,"textBackgroundColor"],"文本背景颜色",Wt.defaults.textStyle.backgroundColor),new Et([this,"textFontStyle"],"字体样式",Wt.defaults.textStyle.fontStyle),new Et([this,"textFontWeight"],"字体粗细",Wt.defaults.textStyle.fontWeight),new L([this,"textFontSize"],"字体大小",Wt.defaults.textStyle.fontSize),new ze([this,"textOffset"],"像素偏移",Wt.defaults.textStyle.offset),new vt([],"点图片样式集合"),new Z([this,"imageShow"],"是否显示",Wt.defaults.imageShow),new ze([this,"imageAnchor"],"锚点",Wt.defaults.imageStyle.anchor),new lt([this,"imageUrl"],"图片地址",Wt.defaults.imageStyle.url),new ze([this,"imageSize"],"图片大小",Wt.defaults.imageStyle.size),new ze([this,"imageOffset"],"像素偏移",Wt.defaults.imageStyle.offset),new vt([],"线样式集合"),new Z([this,"stroked"],"是否显示",Wt.defaults.stroked),new Z([this,"strokeGround"],"贴地",Wt.defaults.strokeStyle.ground),new L([this,"strokeWidth"],"线宽",Wt.defaults.strokeStyle.width),new Tt([this,"strokeWidthType"],Wt.defaults.strokeStyle.widthTypes,"线宽类型"),new Gt([this,"strokeColor"],"线颜色",Wt.defaults.strokeStyle.color),new Et([this,"strokeMaterial"],"线材质",Wt.defaults.strokeStyle.material),new lt([this,"strokeMaterialParams"],"线材质参数",Wt.defaults.strokeStyle.materialParams),new vt([],"面样式集合"),new Z([this,"filled"],"是否显示",Wt.defaults.filled),new Z([this,"fillGround"],"贴地",Wt.defaults.fillStyle.ground),new Gt([this,"fillColor"],"填充颜色",Wt.defaults.fillStyle.color),new Et([this,"fillMaterial"],"填充材质",Wt.defaults.fillStyle.material),new lt([this,"fillMaterialParams"],"填充材质参数",Wt.defaults.fillStyle.materialParams)],more:[...e.more,new vt([],"标注文本样式"),new Et([this,"textFontFamily"],"字体",Wt.defaults.textStyle.fontFamily),new vt([],"通用"),new Es([this,"loadFuncStr"],"loadFnStr",mm,YI,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};d(Wt,"createDefaultProps",()=>({...ne.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:JI,stroked:!0,strokeStyle:g.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:g.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:g.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:g.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),d(Wt,"type",Wt.register("ESGeoJson",Wt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"}));let Cd=Wt;const zo=class zo extends Rt{constructor(e){super(e);d(this,"editingBindMode","doublePoints");d(this,"_height",this.disposeVar(g.react(0)));{const n=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};n(),this.ad(this.pointsChanged.don(n))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};d(zo,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:g.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(zo,"type",zo.register("ESHeightMeasurement",zo,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),d(zo,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Pd=zo;const ru=class ru extends ds{constructor(e){super(e);d(this,"_area",this.dv(g.react(0)));d(this,"_perimeter",this.dv(g.react(0)));d(this,"editingBindMode","doublePoints");const n=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};n(),this.d(this.radiusChanged.don(n))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,n){return jv([...this.position],this.radius,e,n)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new L([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new Z([this,"editing"],"是否编辑"),new Ko([this,"position"],"三维坐标",[0,0,0],!0),new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(ru,"createDefaultProps",()=>({...ds.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:g.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),d(ru,"type",ru.register("ESLocalCircle",ru,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let Id=ru;const nu=class nu extends ds{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Dg([this,"points"],"坐标",[])]}}};d(nu,"createDefaultProps",()=>({...ds.createDefaultProps(),points:kf([]),filled:!0})),d(nu,"type",nu.register("ESLocalPolygon",nu,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Ch=nu;const iu=class iu extends Ua{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new vc([this,"points"],"本地位置数组")]}}};d(iu,"createDefaultProps",()=>({...Ua.createDefaultProps(),points:g.reactPositions(void 0),filled:!0})),d(iu,"type",iu.register("ESLocalPolygonZ",iu,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Md=iu;const su=class su extends ds{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"width"],"宽度"),new L([this,"height"],"高度")]}}};d(su,"createDefaultProps",()=>({...ds.createDefaultProps(),width:5e5,height:3e5,filled:!0})),d(su,"type",su.register("ESLocalRectangle",su,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let bd=su;const ps=class ps extends Rt{constructor(e){super(e);d(this,"editingBindMode","lineString");d(this,"_distance",this.dv(g.react(0)));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const n=()=>{if(this.points&&this.points.length>=2){const i=_h(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};n(),this.d(this.pointsChanged.don(n))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"width"],"宽度",10),new Tt([this,"materialMode"],ps.materialModes,"模式","purple")],coordinate:[...e.coordinate,new L([this,"distance"],"距离",0,!1,!0)]}}};d(ps,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:g.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(ps,"type",ps.register("ESPipeFence",ps,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),d(ps,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),d(ps,"supportEditingModes",[...Rt.supportEditingModes,ct.LineStringAppend,ct.LineStringInsert]);let Nd=ps;const vs=class vs extends kn{constructor(e){super(e);d(this,"_setLayerVisibleEvent",this.dv(new X));d(this,"_setLayerColorEvent",this.dv(new X))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,n){this._setLayerVisibleEvent.emit(e,n)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,n){this._setLayerColorEvent.emit(e,n)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESPipeserTileset"),new mt(["string","string"],(n,i)=>this.setLayerVisible(n,i),["",""],"setLayerVisible"),new mt(["string","string"],(n,i)=>this.setLayerColor(n,i),["",""],"setLayerColor"),new Tt([this,"colorMode"],vs.colorModes,"colorMode",vs.defaults.colorMode,!0)]}}};d(vs,"createDefaultProps",()=>({...kn.createDefaultProps(),colorMode:"default"})),d(vs,"type",vs.register("ESPipeserTileset",vs,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),d(vs,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let xd=vs;const ms=class ms extends Rt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new L([this,"height"],"高度",10),new Tt([this,"materialMode"],ms.materialModes,"模式","danger")]}}};d(ms,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),d(ms,"type",ms.register("ESPolygonFence",ms,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),d(ms,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),d(ms,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let Td=ms;const $s=class $s extends Rt{constructor(e){super(e);d(this,"_deprecated",["ground"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new Z([this,"ground"],"是否贴地"),new Z([this,"outlineTranslucent"],"轮廓线半透明"),new L([this,"height"],"高度"),new L([this,"extrudedHeight"],"拉伸高度"),new Yn([this,"rectangle"],"范围",$s.defaults.rectangle,!0),new L([this,"stRotation"],"纹理旋转角度"),new L([this,"rotation"],"旋转角度"),new Z([this,"pointEditing"],"是否单点编辑")]}}};d($s,"createDefaultProps",()=>({...Rt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:g.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),d($s,"type",$s.register("ESRectangle",$s,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d($s,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Ad=$s;const ou=class ou extends oe{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};d(ou,"createDefaultProps",()=>({...oe.createDefaultProps(),innerRings:g.reactPositionsSet([])})),d(ou,"type",ou.register("ESPolygonWithHole",ou,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Od=ou;const Zs=class Zs extends oe{constructor(e){super(e);d(this,"_startEvent",this.disposeVar(new X));d(this,"_stopEvent",this.dv(new X));d(this,"_surfaceArea",this.disposeVar(g.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"表面积测量","表面积测量"),new mt([],()=>this.start(),[],"开始计算"),new L([this,"interpolation"],"插值距离",Zs.defaults.interpolation),new L([this,"offsetHeight"],"偏移高度",Zs.defaults.offsetHeight)]}}};d(Zs,"createDefaultProps",()=>({...oe.createDefaultProps(),interpolation:.5,offsetHeight:0,units:g.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:g.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),d(Zs,"type",Zs.register("ESSurfaceAreaMeasurement",Zs,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Dd=Zs;const to=class to extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",to.defaults.downloadProgress,!0,!0),new lt([this,"importOptions"],"导入参数",to.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new lt([this,"url"],"路径")]}}};d(to,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",importOptions:g.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),d(to,"type",to.register("ESDatasmithRuntimeModel",to,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Ld=to;const Pr=class Pr extends Ch{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Pr.defaults.waterType),new L([this,"frequency"],"频率",Pr.defaults.frequency),new Be([this,"amplitude"],.01,[0,1],"振幅",Pr.defaults.amplitude),new Be([this,"flowDirection"],1,[0,360],"流向",Pr.defaults.flowDirection),new Be([this,"waveVelocity"],.01,[0,1],"波动频率",Pr.defaults.waveVelocity),new Be([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Pr.defaults.specularIntensity),new Be([this,"murkiness"],.1,[0,10],"水体浑浊度",Pr.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Pr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Pr.defaults.waterColor),new lt([this,"waterImage"],"水的图片",Pr.defaults.waterImage)]}}};d(Pr,"createDefaultProps",()=>({...Ch.createDefaultProps(),allowPicking:!0,waterImage:g.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),d(Pr,"type",Pr.register("ESDynamicWater",Pr,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Rd=Pr;const Ir=class Ir extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Ir.defaults.waterType),new L([this,"frequency"],"频率",Ir.defaults.frequency),new Be([this,"amplitude"],.01,[0,1],"振幅",Ir.defaults.amplitude),new Be([this,"flowDirection"],1,[0,360],"流向",Ir.defaults.flowDirection),new Be([this,"waveVelocity"],.01,[0,1],"波动频率",Ir.defaults.waveVelocity),new Be([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ir.defaults.specularIntensity),new Be([this,"murkiness"],.1,[0,10],"水体浑浊度",Ir.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Ir.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Ir.defaults.waterColor),new lt([this,"waterImage"],"水的图片",Ir.defaults.waterImage)]}}};d(Ir,"createDefaultProps",()=>({...oe.createDefaultProps(),allowPicking:!0,waterImage:g.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),d(Ir,"type",Ir.register("ESGeoWater",Ir,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Fd=Ir;const qo=class qo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",qo.defaults.downloadProgress,!0,!0),new Et([this,"levelName"],"levelName",""),new L([this,"levelLoadDistance"],"levelLoadDistance",1e3),new cr([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new lt([this,"url"],"url","")]}}};d(qo,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:g.reactArray([0,0,0]),levelLoadDistance:1e3})),d(qo,"type",qo.register("ESLevelRuntimeModel",qo,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let Gd=qo;const pn=class pn extends Bs{constructor(e){super(e);d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"radius"],"半径",pn.defaults.radius),new L([this,"sides"],"圆边数",pn.defaults.sides),new L([this,"speed"],"材质速度",pn.defaults.speed),new Tt([this,"materialMode"],pn.materialModes,"材质模式",pn.defaults.materialMode),new lt([this,"materialImage"],"材质图片和重复度",pn.defaults.materialImage)]}}};d(pn,"createDefaultProps",()=>({...Bs.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:g.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:g.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(pn,"type",pn.register("ESPipeline",pn,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),d(pn,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let kd=pn;const Hi=class Hi extends Rt{constructor(e){super(e);d(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Gt([this,"visibleColor"],"可视区域颜色",Hi.defaults.visibleColor),new Gt([this,"invisibleColor"],"遮挡区域颜色",Hi.defaults.invisibleColor),new L([this,"heightOffset"],"视点高度偏移",Hi.defaults.heightOffset)]}}};d(Hi,"createDefaultProps",()=>({...Rt.createDefaultProps(),visibleColor:g.reactArray([0,1,0,1]),invisibleColor:g.reactArray([1,0,0,1]),heightOffset:0})),d(Hi,"type",Hi.register("ESVisibilityAnalysis",Hi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),d(Hi,"supportEditingModes",[...Rt.supportEditingModes,ct.VisibilityAppend,ct.VisibilityModify]);let Vd=Hi;const au=class au extends oe{constructor(e){super(e);d(this,"_startEvent",this.dv(new X));d(this,"_clearEvent",this.dv(new X));d(this,"_volume",this.disposeVar(g.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new L([this,"planeHeight"],"基准面高程",void 0,!0),new L([this,"gridWidth"],"采样间距 m"),new L([this,"cutVolume"],"挖方",0,!1,!0),new L([this,"fillVolume"],"填方",0,!1,!0),new L([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new L([this,"progress"],"计算进度",0,!1,!0),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清空分析结果"),new Z([this,"depthTest"],"是否开启深度检测")]}}};d(au,"createDefaultProps",()=>({...oe.createDefaultProps(),planeHeight:g.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:g.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(au,"type",au.register("ESVolumeMeasurement",au,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let Ud=au;const uu=class uu extends za{constructor(e){super(e);d(this,"_human",this.dv(new za));d(this,"_poi",this.dv(new Sh));this.mainClass=this._human,this.d(this.components.disposableAdd(this._human)),this.d(this.components.disposableAdd(this._poi));{const{_human:n,_poi:i}=this;this.d(g.track([n,"show"],[this,"show"])),this.d(g.track([i,"show"],[this,"show"])),this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([i,"allowPicking"],[this,"allowPicking"])),this.d(g.bind([n,"scale"],[this,"scale"])),this.d(g.bind([i,"scale"],[this,"scale"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.track([i,"collision"],[this,"collision"])),this.d(g.bind([n,"flyInParam"],[this,"flyInParam"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.track([n,"animation"],[this,"animation"])),this.d(g.track([n,"mode"],[this,"mode"])),this.d(g.track([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(g.track([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(g.track([i,"name"],[this,"name"])),this.d(g.track([i,"mode"],[this,"poiMode"])),this.d(g.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(g.track([i,"screenRender"],[this,"screenRender"])),this.d(g.track([i,"size"],[this,"size"])),this.d(g.track([i,"anchor"],[this,"anchor"])),this.d(g.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(g.track([i,"renderMode"],[this,"renderMode"])),this.d(g.track([i,"rotationType"],[this,"rotationType"])),this.d(g.track([i,"zOrder"],[this,"zOrder"])),this.d(g.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(g.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(g.bind([n,"position"],[this,"position"])),this.d(g.bind([n,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{n.flyIn(s)})),this.d(this.flyToEvent.don(s=>{n.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{n.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{n.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{n.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{n.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{n.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,h)=>{n.smoothMoveWithRotationOnGround(s,o,a,u,h)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"poiMode"],Sh.modes,"poi模式","SquareH01"),new L([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};d(uu,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:g.reactJson({}),autoAnchor:!0,screenRender:!0,size:g.reactArray([100,100]),anchor:g.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...za.createDefaultProps()})),d(uu,"type",uu.register("ESHumanPoi",uu,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let zd=uu;const _i=class _i extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"depth"],"深度",_i.defaults.depth),new L([this,"interpolation"],"插值",_i.defaults.interpolation),new L([this,"opacity"],"透明度",_i.defaults.opacity),new lt([this,"sideImage"],"侧面图片",_i.defaults.sideImage),new lt([this,"bottomImage"],"底面图片",_i.defaults.bottomImage)]}}};d(_i,"createDefaultProps",()=>({...oe.createDefaultProps(),depth:100,sideImage:g.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:g.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),d(_i,"type",_i.register("ESPit",_i,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let qa=_i;const hu=class hu extends qa{constructor(e){super(e);d(this,"_excavate",this.dv(new Eh));d(this,"_pit",this.dv(new qa));this.mainClass=this._pit,this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit));{const{_excavate:n,_pit:i}=this;this.d(g.track([n,"show"],[this,"show"])),this.d(g.track([i,"show"],[this,"show"])),this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([i,"allowPicking"],[this,"allowPicking"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.track([i,"collision"],[this,"collision"])),this.d(g.bind([i,"points"],[this,"points"])),this.d(g.track([n,"points"],[this,"points"])),this.d(g.track([i,"pointed"],[this,"pointed"])),this.d(g.track([n,"pointed"],[this,"pointed"])),this.d(g.track([i,"pointStyle"],[this,"pointStyle"])),this.d(g.track([n,"pointStyle"],[this,"pointStyle"])),this.d(g.track([i,"stroked"],[this,"stroked"])),this.d(g.track([n,"stroked"],[this,"stroked"])),this.d(g.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(g.track([n,"strokeStyle"],[this,"strokeStyle"])),this.d(g.track([i,"filled"],[this,"filled"])),this.d(g.track([i,"fillStyle"],[this,"fillStyle"])),this.d(g.track([n,"fillStyle"],[this,"fillStyle"])),this.d(g.track([n,"mode"],[this,"mode"])),this.d(g.track([n,"targetID"],[this,"targetID"])),this.d(g.track([i,"depth"],[this,"depth"])),this.d(g.track([i,"sideImage"],[this,"sideImage"])),this.d(g.track([i,"bottomImage"],[this,"bottomImage"])),this.d(g.track([i,"opacity"],[this,"opacity"])),this.d(g.track([i,"interpolation"],[this,"interpolation"])),this.d(g.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(g.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],Eh.modes,"模式","in"),new Et([this,"targetID"],"瓦片图层","")]}}};d(hu,"createDefaultProps",()=>({...qa.createDefaultProps(),mode:"in",targetID:""})),d(hu,"type",hu.register("ESHole",hu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let qd=hu;const Wd={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},jI=async(r,t,e,n)=>{try{const i=window.localStorage.getItem("Authorization");let s=r+`${Wd.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(n)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},QI=async(r,t,e,n,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=r+Wd.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(n)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},l=await(await fetch(o,u)).text();return JSON.parse(l)}catch(s){console.error(s)}},KI=async(r,t,e)=>{try{const n=window.localStorage.getItem("Authorization");let i=r;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&n?{Authorization:n}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(n){console.error(n)}},$I=async(r,t,e,n,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=r+Wd.featureproperty;n&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const h=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!n&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),l=JSON.parse(h);if(l.status=="ok")return l.data;console.error(l.data.status);return}catch(s){console.error(s)}},lu=class lu extends kn{constructor(e){super(e);d(this,"_es3DTileset",this.dv(new kn));d(this,"_ids",this.dv(g.reactJson([])));d(this,"_useEarthDSToken",this.dv(g.react(!1)));d(this,"_earthdstoken",this.dv(g.react("")));d(this,"_visJson",this.disposeVar(g.react({})));d(this,"_highlightInner3DtilesetEvent",this.dv(new X));d(this,"_removeHighlightInner3DtilesetEvent",this.dv(new X));d(this,"_tilesetServePort",this.dv(g.react("")));this.mainClass=this._es3DTileset;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.track([n,"actorTag"],[this,"actorTag"])),this.d(g.track([n,"materialMode"],[this,"materialMode"])),this.d(g.track([n,"highlight"],[this,"highlight"])),this.d(g.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(g.track([n,"highlightID"],[this,"highlightID"])),this.d(g.track([n,"highlightColor"],[this,"highlightColor"])),this.d(g.bind([n,"offset"],[this,"offset"])),this.d(g.bind([n,"rotation"],[this,"rotation"])),this.d(g.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(g.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(g.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(g.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(g.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(g.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(g.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(g.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(g.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(g.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(g.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(g.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(g.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(g.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(g.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(g.track([n,"materialParams"],[this,"materialParams"])),this.d(g.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(g.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(g.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(g.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(g.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(g.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(g.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{n.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,n){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[n[0].value]=n[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}async getFeatureProperty(e){return await $I(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await jI(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await QI(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,n){var a,u,h;const i=await e.pick(n),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(h=i==null?void 0:i.sceneObject)==null?void 0:h.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await KI(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};d(lu,"createDefaultProps",()=>({...kn.createDefaultProps(),layerConfig:g.reactJsonWithUndefined([])})),d(lu,"type",lu.register("ESRtsTileset",lu,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Xd=lu;function ZI(r){return typeof r=="number"&&!isNaN(r)}const cu=class cu extends kn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const n=await t.getFeatureProperty(e);this.uiShowprops=n.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:ZI(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=n.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};d(cu,"createDefaultProps",()=>({...kn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:g.reactJson({}),changeMaterial:g.reactJsonWithUndefined(void 0),uiShowprops:g.reactJson({}),props:g.reactJson({})})),d(cu,"type",cu.register("ESRtsFeatureEditing",cu,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Hd=cu;const t2=async(r,t,e)=>{try{const n=window.localStorage.getItem("Authorization");let i=r;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&n?{Authorization:n}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(n){console.error(n)}},Oh=class Oh extends kn{constructor(e){super(e);d(this,"_es3DTileset",this.dv(new kn));d(this,"_tilesetServePort",this.dv(g.react("")));d(this,"_useEarthDSToken",this.dv(g.react(!1)));d(this,"_earthdstoken",this.dv(g.react("")));this.mainClass=this._es3DTileset;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.track([n,"actorTag"],[this,"actorTag"])),this.d(g.track([n,"materialMode"],[this,"materialMode"])),this.d(g.track([n,"highlight"],[this,"highlight"])),this.d(g.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(g.track([n,"highlightID"],[this,"highlightID"])),this.d(g.track([n,"highlightColor"],[this,"highlightColor"])),this.d(g.bind([n,"offset"],[this,"offset"])),this.d(g.bind([n,"rotation"],[this,"rotation"])),this.d(g.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(g.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(g.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(g.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(g.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(g.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(g.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(g.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(g.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(g.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(g.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(g.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(g.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(g.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(g.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(g.track([n,"materialParams"],[this,"materialParams"])),this.d(g.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(g.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(g.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(g.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(g.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(g.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(g.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await t2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};d(Oh,"type",Oh.register("ESMsTileset",Oh,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Bd=Oh;const _m={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
357
|
+
`;function wm(r){try{return JSON.parse(r),!0}catch{return!1}}const QI="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Wt=class Wt extends ne{constructor(e){super(e);d(this,"_flyToFeatureEvent",this.dv(new X));d(this,"_flyToFeatureIndexEvent",this.dv(new X));d(this,"_features",this.disposeVar(g.reactJsonWithUndefined(void 0)));d(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,n,i){this._flyToFeatureEvent.emit(e,n,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,n){this._flyToFeatureIndexEvent.emit(e,n)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:wm(this.url)?this.features=JSON.parse(this.url):await fetch(ft.context.getStrFromEnv(this.url)).then(n=>n.json()).then(n=>{this.features=n}).catch(n=>{console.warn("ESEntityCluster数据加载失败",n)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new lt([this,"url"],"服务地址",Wt.defaults.url),new L([this,"minFeatureVisibleDistance"],"要素最小可视距离",Wt.defaults.minFeatureVisibleDistance),new L([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Wt.defaults.maxFeatureVisibleDistance),new Tt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new vt([],"点样式集合"),new Z([this,"textShow"],"是否显示",Wt.defaults.textShow),new ze([this,"textAnchor"],"锚点",Wt.defaults.anchor),new Et([this,"textProperty"],"标注显示属性",Wt.defaults.textStyle.textProperty),new Et([this,"textDefaultText"],"默认文本",Wt.defaults.textStyle.defaultText),new Gt([this,"textColor"],"文本颜色",Wt.defaults.textStyle.color),new Gt([this,"textBackgroundColor"],"文本背景颜色",Wt.defaults.textStyle.backgroundColor),new Et([this,"textFontStyle"],"字体样式",Wt.defaults.textStyle.fontStyle),new Et([this,"textFontWeight"],"字体粗细",Wt.defaults.textStyle.fontWeight),new L([this,"textFontSize"],"字体大小",Wt.defaults.textStyle.fontSize),new ze([this,"textOffset"],"像素偏移",Wt.defaults.textStyle.offset),new vt([],"点图片样式集合"),new Z([this,"imageShow"],"是否显示",Wt.defaults.imageShow),new ze([this,"imageAnchor"],"锚点",Wt.defaults.imageStyle.anchor),new lt([this,"imageUrl"],"图片地址",Wt.defaults.imageStyle.url),new ze([this,"imageSize"],"图片大小",Wt.defaults.imageStyle.size),new ze([this,"imageOffset"],"像素偏移",Wt.defaults.imageStyle.offset),new vt([],"线样式集合"),new Z([this,"stroked"],"是否显示",Wt.defaults.stroked),new Z([this,"strokeGround"],"贴地",Wt.defaults.strokeStyle.ground),new L([this,"strokeWidth"],"线宽",Wt.defaults.strokeStyle.width),new Tt([this,"strokeWidthType"],Wt.defaults.strokeStyle.widthTypes,"线宽类型"),new Gt([this,"strokeColor"],"线颜色",Wt.defaults.strokeStyle.color),new Et([this,"strokeMaterial"],"线材质",Wt.defaults.strokeStyle.material),new lt([this,"strokeMaterialParams"],"线材质参数",Wt.defaults.strokeStyle.materialParams),new vt([],"面样式集合"),new Z([this,"filled"],"是否显示",Wt.defaults.filled),new Z([this,"fillGround"],"贴地",Wt.defaults.fillStyle.ground),new Gt([this,"fillColor"],"填充颜色",Wt.defaults.fillStyle.color),new Et([this,"fillMaterial"],"填充材质",Wt.defaults.fillStyle.material),new lt([this,"fillMaterialParams"],"填充材质参数",Wt.defaults.fillStyle.materialParams)],more:[...e.more,new vt([],"标注文本样式"),new Et([this,"textFontFamily"],"字体",Wt.defaults.textStyle.fontFamily),new vt([],"通用"),new Es([this,"loadFuncStr"],"loadFnStr",_m,jI,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};d(Wt,"createDefaultProps",()=>({...ne.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:QI,stroked:!0,strokeStyle:g.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:g.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:g.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:g.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),d(Wt,"type",Wt.register("ESGeoJson",Wt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"}));let Id=Wt;const zo=class zo extends Rt{constructor(e){super(e);d(this,"editingBindMode","doublePoints");d(this,"_height",this.disposeVar(g.react(0)));{const n=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};n(),this.ad(this.pointsChanged.don(n))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};d(zo,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:g.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(zo,"type",zo.register("ESHeightMeasurement",zo,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),d(zo,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Md=zo;const ru=class ru extends ds{constructor(e){super(e);d(this,"_area",this.dv(g.react(0)));d(this,"_perimeter",this.dv(g.react(0)));d(this,"editingBindMode","doublePoints");const n=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};n(),this.d(this.radiusChanged.don(n))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,n){return Kv([...this.position],this.radius,e,n)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new L([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new Z([this,"editing"],"是否编辑"),new Ko([this,"position"],"三维坐标",[0,0,0],!0),new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};d(ru,"createDefaultProps",()=>({...ds.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:g.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),d(ru,"type",ru.register("ESLocalCircle",ru,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let bd=ru;const nu=class nu extends ds{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Rg([this,"points"],"坐标",[])]}}};d(nu,"createDefaultProps",()=>({...ds.createDefaultProps(),points:Uf([]),filled:!0})),d(nu,"type",nu.register("ESLocalPolygon",nu,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Ch=nu;const iu=class iu extends Ua{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new yc([this,"points"],"本地位置数组")]}}};d(iu,"createDefaultProps",()=>({...Ua.createDefaultProps(),points:g.reactPositions(void 0),filled:!0})),d(iu,"type",iu.register("ESLocalPolygonZ",iu,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Nd=iu;const su=class su extends ds{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"width"],"宽度"),new L([this,"height"],"高度")]}}};d(su,"createDefaultProps",()=>({...ds.createDefaultProps(),width:5e5,height:3e5,filled:!0})),d(su,"type",su.register("ESLocalRectangle",su,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let xd=su;const ps=class ps extends Rt{constructor(e){super(e);d(this,"editingBindMode","lineString");d(this,"_distance",this.dv(g.react(0)));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const n=()=>{if(this.points&&this.points.length>=2){const i=_h(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};n(),this.d(this.pointsChanged.don(n))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"width"],"宽度",10),new Tt([this,"materialMode"],ps.materialModes,"模式","purple")],coordinate:[...e.coordinate,new L([this,"distance"],"距离",0,!1,!0)]}}};d(ps,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:g.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(ps,"type",ps.register("ESPipeFence",ps,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),d(ps,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),d(ps,"supportEditingModes",[...Rt.supportEditingModes,ct.LineStringAppend,ct.LineStringInsert]);let Td=ps;const vs=class vs extends kn{constructor(e){super(e);d(this,"_setLayerVisibleEvent",this.dv(new X));d(this,"_setLayerColorEvent",this.dv(new X))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,n){this._setLayerVisibleEvent.emit(e,n)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,n){this._setLayerColorEvent.emit(e,n)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESPipeserTileset"),new mt(["string","string"],(n,i)=>this.setLayerVisible(n,i),["",""],"setLayerVisible"),new mt(["string","string"],(n,i)=>this.setLayerColor(n,i),["",""],"setLayerColor"),new Tt([this,"colorMode"],vs.colorModes,"colorMode",vs.defaults.colorMode,!0)]}}};d(vs,"createDefaultProps",()=>({...kn.createDefaultProps(),colorMode:"default"})),d(vs,"type",vs.register("ESPipeserTileset",vs,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),d(vs,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let Ad=vs;const ms=class ms extends Rt{constructor(e){super(e);d(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new L([this,"height"],"高度",10),new Tt([this,"materialMode"],ms.materialModes,"模式","danger")]}}};d(ms,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),d(ms,"type",ms.register("ESPolygonFence",ms,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),d(ms,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),d(ms,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let Od=ms;const $s=class $s extends Rt{constructor(e){super(e);d(this,"_deprecated",["ground"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());d(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new Z([this,"ground"],"是否贴地"),new Z([this,"outlineTranslucent"],"轮廓线半透明"),new L([this,"height"],"高度"),new L([this,"extrudedHeight"],"拉伸高度"),new Yn([this,"rectangle"],"范围",$s.defaults.rectangle,!0),new L([this,"stRotation"],"纹理旋转角度"),new L([this,"rotation"],"旋转角度"),new Z([this,"pointEditing"],"是否单点编辑")]}}};d($s,"createDefaultProps",()=>({...Rt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:g.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),d($s,"type",$s.register("ESRectangle",$s,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),d($s,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Dd=$s;const ou=class ou extends oe{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new lt([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};d(ou,"createDefaultProps",()=>({...oe.createDefaultProps(),innerRings:g.reactPositionsSet([])})),d(ou,"type",ou.register("ESPolygonWithHole",ou,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Ld=ou;const Zs=class Zs extends oe{constructor(e){super(e);d(this,"_startEvent",this.disposeVar(new X));d(this,"_stopEvent",this.dv(new X));d(this,"_surfaceArea",this.disposeVar(g.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"表面积测量","表面积测量"),new mt([],()=>this.start(),[],"开始计算"),new L([this,"interpolation"],"插值距离",Zs.defaults.interpolation),new L([this,"offsetHeight"],"偏移高度",Zs.defaults.offsetHeight)]}}};d(Zs,"createDefaultProps",()=>({...oe.createDefaultProps(),interpolation:.5,offsetHeight:0,units:g.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:g.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),d(Zs,"type",Zs.register("ESSurfaceAreaMeasurement",Zs,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Rd=Zs;const to=class to extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",to.defaults.downloadProgress,!0,!0),new lt([this,"importOptions"],"导入参数",to.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new lt([this,"url"],"路径")]}}};d(to,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",importOptions:g.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),d(to,"type",to.register("ESDatasmithRuntimeModel",to,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Fd=to;const Pr=class Pr extends Ch{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Pr.defaults.waterType),new L([this,"frequency"],"频率",Pr.defaults.frequency),new Be([this,"amplitude"],.01,[0,1],"振幅",Pr.defaults.amplitude),new Be([this,"flowDirection"],1,[0,360],"流向",Pr.defaults.flowDirection),new Be([this,"waveVelocity"],.01,[0,1],"波动频率",Pr.defaults.waveVelocity),new Be([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Pr.defaults.specularIntensity),new Be([this,"murkiness"],.1,[0,10],"水体浑浊度",Pr.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Pr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Pr.defaults.waterColor),new lt([this,"waterImage"],"水的图片",Pr.defaults.waterImage)]}}};d(Pr,"createDefaultProps",()=>({...Ch.createDefaultProps(),allowPicking:!0,waterImage:g.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),d(Pr,"type",Pr.register("ESDynamicWater",Pr,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Gd=Pr;const Ir=class Ir extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Ir.defaults.waterType),new L([this,"frequency"],"频率",Ir.defaults.frequency),new Be([this,"amplitude"],.01,[0,1],"振幅",Ir.defaults.amplitude),new Be([this,"flowDirection"],1,[0,360],"流向",Ir.defaults.flowDirection),new Be([this,"waveVelocity"],.01,[0,1],"波动频率",Ir.defaults.waveVelocity),new Be([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ir.defaults.specularIntensity),new Be([this,"murkiness"],.1,[0,10],"水体浑浊度",Ir.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Ir.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Ir.defaults.waterColor),new lt([this,"waterImage"],"水的图片",Ir.defaults.waterImage)]}}};d(Ir,"createDefaultProps",()=>({...oe.createDefaultProps(),allowPicking:!0,waterImage:g.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),d(Ir,"type",Ir.register("ESGeoWater",Ir,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let kd=Ir;const qo=class qo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",qo.defaults.downloadProgress,!0,!0),new Et([this,"levelName"],"levelName",""),new L([this,"levelLoadDistance"],"levelLoadDistance",1e3),new cr([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new lt([this,"url"],"url","")]}}};d(qo,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:g.reactArray([0,0,0]),levelLoadDistance:1e3})),d(qo,"type",qo.register("ESLevelRuntimeModel",qo,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let Vd=qo;const pn=class pn extends Bs{constructor(e){super(e);d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"radius"],"半径",pn.defaults.radius),new L([this,"sides"],"圆边数",pn.defaults.sides),new L([this,"speed"],"材质速度",pn.defaults.speed),new Tt([this,"materialMode"],pn.materialModes,"材质模式",pn.defaults.materialMode),new lt([this,"materialImage"],"材质图片和重复度",pn.defaults.materialImage)]}}};d(pn,"createDefaultProps",()=>({...Bs.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:g.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:g.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),d(pn,"type",pn.register("ESPipeline",pn,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),d(pn,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let Ud=pn;const Hi=class Hi extends Rt{constructor(e){super(e);d(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Gt([this,"visibleColor"],"可视区域颜色",Hi.defaults.visibleColor),new Gt([this,"invisibleColor"],"遮挡区域颜色",Hi.defaults.invisibleColor),new L([this,"heightOffset"],"视点高度偏移",Hi.defaults.heightOffset)]}}};d(Hi,"createDefaultProps",()=>({...Rt.createDefaultProps(),visibleColor:g.reactArray([0,1,0,1]),invisibleColor:g.reactArray([1,0,0,1]),heightOffset:0})),d(Hi,"type",Hi.register("ESVisibilityAnalysis",Hi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),d(Hi,"supportEditingModes",[...Rt.supportEditingModes,ct.VisibilityAppend,ct.VisibilityModify]);let zd=Hi;const au=class au extends oe{constructor(e){super(e);d(this,"_startEvent",this.dv(new X));d(this,"_clearEvent",this.dv(new X));d(this,"_volume",this.disposeVar(g.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new L([this,"planeHeight"],"基准面高程",void 0,!0),new L([this,"gridWidth"],"采样间距 m"),new L([this,"cutVolume"],"挖方",0,!1,!0),new L([this,"fillVolume"],"填方",0,!1,!0),new L([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new L([this,"progress"],"计算进度",0,!1,!0),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清空分析结果"),new Z([this,"depthTest"],"是否开启深度检测")]}}};d(au,"createDefaultProps",()=>({...oe.createDefaultProps(),planeHeight:g.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:g.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),d(au,"type",au.register("ESVolumeMeasurement",au,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let qd=au;const uu=class uu extends za{constructor(e){super(e);d(this,"_human",this.dv(new za));d(this,"_poi",this.dv(new Sh));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:n,_poi:i}=this;this.d(g.track([n,"show"],[this,"show"])),this.d(g.track([i,"show"],[this,"show"])),this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([i,"allowPicking"],[this,"allowPicking"])),this.d(g.bind([n,"scale"],[this,"scale"])),this.d(g.bind([i,"scale"],[this,"scale"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.track([i,"collision"],[this,"collision"])),this.d(g.bind([n,"flyInParam"],[this,"flyInParam"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.track([n,"animation"],[this,"animation"])),this.d(g.track([n,"mode"],[this,"mode"])),this.d(g.track([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(g.track([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(g.track([i,"name"],[this,"name"])),this.d(g.track([i,"mode"],[this,"poiMode"])),this.d(g.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(g.track([i,"screenRender"],[this,"screenRender"])),this.d(g.track([i,"size"],[this,"size"])),this.d(g.track([i,"anchor"],[this,"anchor"])),this.d(g.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(g.track([i,"renderMode"],[this,"renderMode"])),this.d(g.track([i,"rotationType"],[this,"rotationType"])),this.d(g.track([i,"zOrder"],[this,"zOrder"])),this.d(g.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(g.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(g.bind([n,"position"],[this,"position"])),this.d(g.bind([n,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{n.flyIn(s)})),this.d(this.flyToEvent.don(s=>{n.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{n.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{n.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{n.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{n.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{n.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,h)=>{n.smoothMoveWithRotationOnGround(s,o,a,u,h)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"poiMode"],Sh.modes,"poi模式","SquareH01"),new L([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};d(uu,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:g.reactJson({}),autoAnchor:!0,screenRender:!0,size:g.reactArray([100,100]),anchor:g.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...za.createDefaultProps()})),d(uu,"type",uu.register("ESHumanPoi",uu,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Wd=uu;const _i=class _i extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"depth"],"深度",_i.defaults.depth),new L([this,"interpolation"],"插值",_i.defaults.interpolation),new L([this,"opacity"],"透明度",_i.defaults.opacity),new lt([this,"sideImage"],"侧面图片",_i.defaults.sideImage),new lt([this,"bottomImage"],"底面图片",_i.defaults.bottomImage)]}}};d(_i,"createDefaultProps",()=>({...oe.createDefaultProps(),depth:100,sideImage:g.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:g.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),d(_i,"type",_i.register("ESPit",_i,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let qa=_i;const hu=class hu extends qa{constructor(e){super(e);d(this,"_excavate",this.dv(new Eh));d(this,"_pit",this.dv(new qa));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:n,_pit:i}=this;this.d(g.track([n,"show"],[this,"show"])),this.d(g.track([i,"show"],[this,"show"])),this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([i,"allowPicking"],[this,"allowPicking"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.track([i,"collision"],[this,"collision"])),this.d(g.bind([i,"points"],[this,"points"])),this.d(g.track([n,"points"],[this,"points"])),this.d(g.track([i,"pointed"],[this,"pointed"])),this.d(g.track([n,"pointed"],[this,"pointed"])),this.d(g.track([i,"pointStyle"],[this,"pointStyle"])),this.d(g.track([n,"pointStyle"],[this,"pointStyle"])),this.d(g.track([i,"stroked"],[this,"stroked"])),this.d(g.track([n,"stroked"],[this,"stroked"])),this.d(g.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(g.track([n,"strokeStyle"],[this,"strokeStyle"])),this.d(g.track([i,"filled"],[this,"filled"])),this.d(g.track([i,"fillStyle"],[this,"fillStyle"])),this.d(g.track([n,"fillStyle"],[this,"fillStyle"])),this.d(g.track([n,"mode"],[this,"mode"])),this.d(g.track([n,"targetID"],[this,"targetID"])),this.d(g.track([i,"depth"],[this,"depth"])),this.d(g.track([i,"sideImage"],[this,"sideImage"])),this.d(g.track([i,"bottomImage"],[this,"bottomImage"])),this.d(g.track([i,"opacity"],[this,"opacity"])),this.d(g.track([i,"interpolation"],[this,"interpolation"])),this.d(g.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(g.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],Eh.modes,"模式","in"),new Et([this,"targetID"],"瓦片图层","")]}}};d(hu,"createDefaultProps",()=>({...qa.createDefaultProps(),mode:"in",targetID:""})),d(hu,"type",hu.register("ESHole",hu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let Xd=hu;const Hd={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},KI=async(r,t,e,n)=>{try{const i=window.localStorage.getItem("Authorization");let s=r+`${Hd.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(n)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},$I=async(r,t,e,n,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=r+Hd.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(n)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},l=await(await fetch(o,u)).text();return JSON.parse(l)}catch(s){console.error(s)}},ZI=async(r,t,e)=>{try{const n=window.localStorage.getItem("Authorization");let i=r;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&n?{Authorization:n}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(n){console.error(n)}},t2=async(r,t,e,n,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=r+Hd.featureproperty;n&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const h=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!n&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),l=JSON.parse(h);if(l.status=="ok")return l.data;console.error(l.data.status);return}catch(s){console.error(s)}},lu=class lu extends kn{constructor(e){super(e);d(this,"_es3DTileset",this.dv(new kn));d(this,"_ids",this.dv(g.reactJson([])));d(this,"_useEarthDSToken",this.dv(g.react(!1)));d(this,"_earthdstoken",this.dv(g.react("")));d(this,"_visJson",this.disposeVar(g.react({})));d(this,"_highlightInner3DtilesetEvent",this.dv(new X));d(this,"_removeHighlightInner3DtilesetEvent",this.dv(new X));d(this,"_tilesetServePort",this.dv(g.react("")));{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const n=this._es3DTileset;this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.track([n,"actorTag"],[this,"actorTag"])),this.d(g.track([n,"materialMode"],[this,"materialMode"])),this.d(g.track([n,"highlight"],[this,"highlight"])),this.d(g.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(g.track([n,"highlightID"],[this,"highlightID"])),this.d(g.track([n,"highlightColor"],[this,"highlightColor"])),this.d(g.bind([n,"offset"],[this,"offset"])),this.d(g.bind([n,"rotation"],[this,"rotation"])),this.d(g.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(g.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(g.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(g.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(g.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(g.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(g.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(g.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(g.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(g.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(g.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(g.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(g.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(g.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(g.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(g.track([n,"materialParams"],[this,"materialParams"])),this.d(g.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(g.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(g.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(g.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(g.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(g.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(g.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{n.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,n){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[n[0].value]=n[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}async getFeatureProperty(e){return await t2(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await KI(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await $I(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,n){var a,u,h;const i=await e.pick(n),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(h=i==null?void 0:i.sceneObject)==null?void 0:h.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await ZI(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};d(lu,"createDefaultProps",()=>({...kn.createDefaultProps(),layerConfig:g.reactJsonWithUndefined([])})),d(lu,"type",lu.register("ESRtsTileset",lu,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Bd=lu;function e2(r){return typeof r=="number"&&!isNaN(r)}const cu=class cu extends kn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const n=await t.getFeatureProperty(e);this.uiShowprops=n.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:e2(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=n.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};d(cu,"createDefaultProps",()=>({...kn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:g.reactJson({}),changeMaterial:g.reactJsonWithUndefined(void 0),uiShowprops:g.reactJson({}),props:g.reactJson({})})),d(cu,"type",cu.register("ESRtsFeatureEditing",cu,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Yd=cu;const r2=async(r,t,e)=>{try{const n=window.localStorage.getItem("Authorization");let i=r;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&n?{Authorization:n}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(n){console.error(n)}},Oh=class Oh extends kn{constructor(e){super(e);d(this,"_es3DTileset",this.dv(new kn));d(this,"_tilesetServePort",this.dv(g.react("")));d(this,"_useEarthDSToken",this.dv(g.react(!1)));d(this,"_earthdstoken",this.dv(g.react("")));{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const n=this._es3DTileset;this.d(g.track([n,"allowPicking"],[this,"allowPicking"])),this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(g.track([n,"actorTag"],[this,"actorTag"])),this.d(g.track([n,"materialMode"],[this,"materialMode"])),this.d(g.track([n,"highlight"],[this,"highlight"])),this.d(g.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(g.track([n,"highlightID"],[this,"highlightID"])),this.d(g.track([n,"highlightColor"],[this,"highlightColor"])),this.d(g.bind([n,"offset"],[this,"offset"])),this.d(g.bind([n,"rotation"],[this,"rotation"])),this.d(g.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(g.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(g.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(g.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(g.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(g.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(g.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(g.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(g.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(g.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(g.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(g.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(g.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(g.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(g.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(g.track([n,"materialParams"],[this,"materialParams"])),this.d(g.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(g.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(g.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(g.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(g.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(g.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(g.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await r2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};d(Oh,"type",Oh.register("ESMsTileset",Oh,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Jd=Oh;const Em={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
358
358
|
## 参数类型为 ESPoiType[]
|
|
359
359
|
\`\`\`js
|
|
360
360
|
type Vector2D = [number, number]
|
|
@@ -367,7 +367,7 @@ ${mm}
|
|
|
367
367
|
hiddenDistance: number
|
|
368
368
|
}
|
|
369
369
|
\`\`\`
|
|
370
|
-
`},Wo=class Wo extends ne{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用"),new lt([this,"url"],"路径"),new lt([this,"poiTypes"],Wo.defaults.poiTypes,_m.sampleValue),new L([this,"heightOffset"])]}}};d(Wo,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",poiTypes:g.reactJsonWithUndefined(_m.defaultValue),heightOffset:40})),d(Wo,"type",Wo.register("ESPoiTileset",Wo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let Yd=Wo;const fu=class fu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new Z([this,"show"],"是否显示"),new Tt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new ze([this,"cssPosition"],"位置")]}}};d(fu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),d(fu,"type",fu.register("ESScale",fu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Jd=fu;const Bi=class Bi extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new L([this,"height"],"高度",Bi.defaults.height,!0),new L([this,"extrudedHeight"],"拉伸高度",Bi.defaults.extrudedHeight,!0),new Z([this,"perPositionHeight"],"应用每个位置高度",Bi.defaults.perPositionHeight,!0)]}}};d(Bi,"createDefaultProps",()=>({...oe.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),d(Bi,"type",Bi.register("ESGeoExtrudedPolygon",Bi,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),d(Bi,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let Ph=Bi;const Xo=class Xo extends oe{constructor(e){super(e);d(this,"_classification",this.dv(new Hl));d(this,"_geoExtrudedPolygon",this.dv(new Ph));this.mainClass=this._geoExtrudedPolygon,this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.track([i,"collision"],[this,"collision"])),this.d(g.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(g.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(g.bind([i,"points"],[this,"points"])),this.d(g.bind([i,"extrudedHeight"],[this,"height"])),this.d(g.bind([n,"fillColor"],[this,"overheightColor"])),this.d(g.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const h=a.map(l=>[l[0],l[1],o]);n.points=h,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(Su([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;n.show=o&&a,i.show=o&&a};s(),this.d(Su([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"maxHeight"],"最高高度",200),new Gt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Gt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};d(Xo,"createDefaultProps",()=>({...oe.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),d(Xo,"type",Xo.register("ESHeightLimitAnalysis",Xo,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),d(Xo,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let jd=Xo;const wi=class wi extends ne{constructor(e){super(e);d(this,"_widgetEvent",this.dv(new X));d(this,"_data",this.dv(g.react(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:ym(this.url)?this.data=JSON.parse(this.url):fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};n(),this.d(this.urlChanged.don(n))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"url"],"地址",wi.defaults.url),new L([this,"pixelRange"],"集合范围",wi.defaults.pixelRange),new L([this,"minimumClusterSize"],"最小数量",wi.defaults.minimumClusterSize),new Tt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new lt([this,"style"],"style",wi.defaults.style),new Z([this,"perspective"],"透视效果",wi.defaults.perspective)]}}};d(wi,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:g.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),d(wi,"type",wi.register("ESEntityCluster",wi,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Qd=wi;class Ih extends ot{constructor(){super();d(this,"_player",this.disposeVar(new Jn));const e=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(g.bind([e,"playing"],[this,"playing"])),this.d(g.bind([e,"loop"],[this,"loop"])),this.d(g.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;e.currentTime=g.clamp(n,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Ih||(Ih={})),g.extendClassProps(Ih.prototype,Ih.createDefaultProps);const du=class du extends ft{constructor(e){super(e);d(this,"_absolutePlayer",this.dv(new Ih));const n=this.absolutePlayer;this.d(g.bind([n,"currentTime"],[this,"currentTime"])),this.d(g.bind([n,"startTime"],[this,"startTime"])),this.d(g.bind([n,"stopTime"],[this,"stopTime"])),this.d(g.bind([n,"playing"],[this,"playing"])),this.d(g.bind([n,"loop"],[this,"loop"])),this.d(g.bind([n,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Uh([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new so([this,"currentTime"],"currentTime"),new so([this,"startTime"]),new so([this,"stopTime"]),new Z([this,"playing"]),new Z([this,"loop"]),new L([this,"speed"])]}}};d(du,"createDefaultProps",()=>({...ft.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),d(du,"type",du.register("ESPlayer",du,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let Mh=du;function wm(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<n;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=Ii(s),u=Ii(o),h=g.Vector.distance(a,u);if(h===0){e[i][2]=e[i-1][2];continue}const l=yh(s,o),c=o[2]-s[2],f=Math.asin(c/h)*180/Math.PI,p=Number.isFinite(l)?l:0,v=Number.isFinite(f)?f:0;e[i][2]=[p,v,0]}return(e[0][2]===void 0||t)&&(e[0][2]=n>1?e[1][2]:void 0),e}function Em(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=n-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=Ii(s),u=Ii(o),h=g.Vector.distance(a,u);if(h===0){e[i][2]=e[i+1][2];continue}const l=yh(s,o),c=o[2]-s[2],f=Math.asin(c/h)*180/Math.PI,p=Number.isFinite(l)?l:0,v=Number.isFinite(f)?f:0;e[i][2]=[p,v,0]}return(e[n-1][2]===void 0||t)&&(e[n-1][2]=n>1?e[n-2][2]:[0,0,0]),e}function e2(r,t=!1){const e=wm(r,t),n=Em(r,t);if(e.length!==n.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=n[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=_c(o,a,.5)}return e}function r2(r,t,e){let i;if(!r.timePosRots)return;const s=[],o=r.timePosRots.length;if(!(o<=2)){s.push(r.timePosRots[0]);for(let a=1;a<o-1;++a){const u=r.timePosRots[a-1][0],h=r.timePosRots[a][0],l=r.timePosRots[a+1][0],c=r.accumDistances[a-1],f=r.accumDistances[a],p=r.accumDistances[a+1],v=f-c;if(v!==0){const E=v-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let I=(E<0?0:E)/v;Number.isNaN(I)&&(I=0);const y=(1-I)*u+I*h,_=r.getCurrent(y);_&&s.push([y,_.position,_.rotation])}e&&s.push(r.timePosRots[a]);const w=p-f;if(w!==0){let E=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const I=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;E+I>w?(E=w*(E/(E+I)),i=w-E):i=void 0;let y=(E<0?0:E)/w;const _=(1-y)*h+y*l,m=r.getCurrent(_);m&&s.push([_,m.position,m.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function Sm(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];const e=[...r].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const n=t-e;return[r[n][2],n]}function Cm(r,t){if(t<0)return[void 0,0];if(t>=r.length)return[void 0,r.length-1];const e=r.slice(t).findIndex(([,,i])=>i!==void 0),n=e===-1?r.length-1:t+e;return[r[n][2],n]}function n2(r,t,e="Lerp"){let n,i,s,o;if(r.length!==0){if(t<=r[0][0])n=r[0][1],i=r[0][2],s=0,o=0;else if(t>=r[r.length-1][0]){const[u,h,l]=r[r.length-1];n=h,i=l,s=r.length-2,o=1}else{const u=r.findIndex(([h])=>t<=h);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[h,l]=r[s],[c,f]=r[u],p=(t-h)/(c-h),v=Lf(l),w=Lf(f),E=g.Vector.lerp(v,w,p);n=qp(E),o=p}{let[h,l]=Sm(r,s),[c,f]=Cm(r,u);if(e==="Lerp")if(h&&c){if(l<0||f>=r.length)throw new Error("Invalid rotation index");const p=(t-r[l][0])/(r[f][0]-r[l][0]);i=_c(h,c,p)}else h?i=h:c?i=c:i=void 0;else e==="Prev"?h&&(i=h):e==="Next"&&c&&(i=c)}}return{position:n,rotation:i,index:s,ratio:o}}}function i2(r){try{const t=JSON.parse(r);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",n=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&n?t:void 0}throw new Error("解析有问题")}catch{const e=r.split(/\n|\r\n/),n=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}function s2(r,t,e){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,n[0][0]),e=Math.min(e,n[n.length-1][0]);const i=r.getCurrent(t),s=r.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(n[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const o2=`
|
|
370
|
+
`},Wo=class Wo extends ne{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用"),new lt([this,"url"],"路径"),new lt([this,"poiTypes"],Wo.defaults.poiTypes,Em.sampleValue),new L([this,"heightOffset"])]}}};d(Wo,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",poiTypes:g.reactJsonWithUndefined(Em.defaultValue),heightOffset:40})),d(Wo,"type",Wo.register("ESPoiTileset",Wo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let jd=Wo;const fu=class fu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new Z([this,"show"],"是否显示"),new Tt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new ze([this,"cssPosition"],"位置")]}}};d(fu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),d(fu,"type",fu.register("ESScale",fu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Qd=fu;const Bi=class Bi extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new L([this,"height"],"高度",Bi.defaults.height,!0),new L([this,"extrudedHeight"],"拉伸高度",Bi.defaults.extrudedHeight,!0),new Z([this,"perPositionHeight"],"应用每个位置高度",Bi.defaults.perPositionHeight,!0)]}}};d(Bi,"createDefaultProps",()=>({...oe.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),d(Bi,"type",Bi.register("ESGeoExtrudedPolygon",Bi,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),d(Bi,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let Ph=Bi;const Xo=class Xo extends oe{constructor(e){super(e);d(this,"_classification",this.dv(new Bl));d(this,"_geoExtrudedPolygon",this.dv(new Ph));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(g.track([n,"collision"],[this,"collision"])),this.d(g.track([i,"collision"],[this,"collision"])),this.d(g.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(g.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(g.bind([i,"points"],[this,"points"])),this.d(g.bind([i,"extrudedHeight"],[this,"height"])),this.d(g.bind([n,"fillColor"],[this,"overheightColor"])),this.d(g.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const h=a.map(l=>[l[0],l[1],o]);n.points=h,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(Su([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;n.show=o&&a,i.show=o&&a};s(),this.d(Su([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"maxHeight"],"最高高度",200),new Gt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Gt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};d(Xo,"createDefaultProps",()=>({...oe.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),d(Xo,"type",Xo.register("ESHeightLimitAnalysis",Xo,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),d(Xo,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let Kd=Xo;const wi=class wi extends ne{constructor(e){super(e);d(this,"_widgetEvent",this.dv(new X));d(this,"_data",this.dv(g.react(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:wm(this.url)?this.data=JSON.parse(this.url):fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};n(),this.d(this.urlChanged.don(n))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new lt([this,"url"],"地址",wi.defaults.url),new L([this,"pixelRange"],"集合范围",wi.defaults.pixelRange),new L([this,"minimumClusterSize"],"最小数量",wi.defaults.minimumClusterSize),new Tt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new lt([this,"style"],"style",wi.defaults.style),new Z([this,"perspective"],"透视效果",wi.defaults.perspective)]}}};d(wi,"createDefaultProps",()=>({...ne.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:g.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),d(wi,"type",wi.register("ESEntityCluster",wi,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let $d=wi;class Ih extends ot{constructor(){super();d(this,"_player",this.disposeVar(new Jn));const e=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(g.bind([e,"playing"],[this,"playing"])),this.d(g.bind([e,"loop"],[this,"loop"])),this.d(g.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;e.currentTime=g.clamp(n,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Ih||(Ih={})),g.extendClassProps(Ih.prototype,Ih.createDefaultProps);const du=class du extends ft{constructor(e){super(e);d(this,"_absolutePlayer",this.dv(new Ih));const n=this.absolutePlayer;this.d(g.bind([n,"currentTime"],[this,"currentTime"])),this.d(g.bind([n,"startTime"],[this,"startTime"])),this.d(g.bind([n,"stopTime"],[this,"stopTime"])),this.d(g.bind([n,"playing"],[this,"playing"])),this.d(g.bind([n,"loop"],[this,"loop"])),this.d(g.bind([n,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new zh([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new so([this,"currentTime"],"currentTime"),new so([this,"startTime"]),new so([this,"stopTime"]),new Z([this,"playing"]),new Z([this,"loop"]),new L([this,"speed"])]}}};d(du,"createDefaultProps",()=>({...ft.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),d(du,"type",du.register("ESPlayer",du,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let Mh=du;function Sm(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<n;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=Ii(s),u=Ii(o),h=g.Vector.distance(a,u);if(h===0){e[i][2]=e[i-1][2];continue}const l=yh(s,o),c=o[2]-s[2],f=Math.asin(c/h)*180/Math.PI,p=Number.isFinite(l)?l:0,v=Number.isFinite(f)?f:0;e[i][2]=[p,v,0]}return(e[0][2]===void 0||t)&&(e[0][2]=n>1?e[1][2]:void 0),e}function Cm(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=n-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=Ii(s),u=Ii(o),h=g.Vector.distance(a,u);if(h===0){e[i][2]=e[i+1][2];continue}const l=yh(s,o),c=o[2]-s[2],f=Math.asin(c/h)*180/Math.PI,p=Number.isFinite(l)?l:0,v=Number.isFinite(f)?f:0;e[i][2]=[p,v,0]}return(e[n-1][2]===void 0||t)&&(e[n-1][2]=n>1?e[n-2][2]:[0,0,0]),e}function n2(r,t=!1){const e=Sm(r,t),n=Cm(r,t);if(e.length!==n.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=n[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=Ec(o,a,.5)}return e}function i2(r,t,e){let i;if(!r.timePosRots)return;const s=[],o=r.timePosRots.length;if(!(o<=2)){s.push(r.timePosRots[0]);for(let a=1;a<o-1;++a){const u=r.timePosRots[a-1][0],h=r.timePosRots[a][0],l=r.timePosRots[a+1][0],c=r.accumDistances[a-1],f=r.accumDistances[a],p=r.accumDistances[a+1],v=f-c;if(v!==0){const E=v-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let I=(E<0?0:E)/v;Number.isNaN(I)&&(I=0);const y=(1-I)*u+I*h,_=r.getCurrent(y);_&&s.push([y,_.position,_.rotation])}e&&s.push(r.timePosRots[a]);const w=p-f;if(w!==0){let E=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const I=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;E+I>w?(E=w*(E/(E+I)),i=w-E):i=void 0;let y=(E<0?0:E)/w;const _=(1-y)*h+y*l,m=r.getCurrent(_);m&&s.push([_,m.position,m.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function Pm(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];const e=[...r].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const n=t-e;return[r[n][2],n]}function Im(r,t){if(t<0)return[void 0,0];if(t>=r.length)return[void 0,r.length-1];const e=r.slice(t).findIndex(([,,i])=>i!==void 0),n=e===-1?r.length-1:t+e;return[r[n][2],n]}function s2(r,t,e="Lerp"){let n,i,s,o;if(r.length!==0){if(t<=r[0][0])n=r[0][1],i=r[0][2],s=0,o=0;else if(t>=r[r.length-1][0]){const[u,h,l]=r[r.length-1];n=h,i=l,s=r.length-2,o=1}else{const u=r.findIndex(([h])=>t<=h);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[h,l]=r[s],[c,f]=r[u],p=(t-h)/(c-h),v=Ff(l),w=Ff(f),E=g.Vector.lerp(v,w,p);n=Xp(E),o=p}{let[h,l]=Pm(r,s),[c,f]=Im(r,u);if(e==="Lerp")if(h&&c){if(l<0||f>=r.length)throw new Error("Invalid rotation index");const p=(t-r[l][0])/(r[f][0]-r[l][0]);i=Ec(h,c,p)}else h?i=h:c?i=c:i=void 0;else e==="Prev"?h&&(i=h):e==="Next"&&c&&(i=c)}}return{position:n,rotation:i,index:s,ratio:o}}}function o2(r){try{const t=JSON.parse(r);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",n=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&n?t:void 0}throw new Error("解析有问题")}catch{const e=r.split(/\n|\r\n/),n=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}function a2(r,t,e){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,n[0][0]),e=Math.min(e,n[n.length-1][0]);const i=r.getCurrent(t),s=r.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(n[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const u2=`
|
|
371
371
|
timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
|
|
372
372
|
\`\`\`
|
|
373
373
|
[
|
|
@@ -412,7 +412,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
412
412
|
]
|
|
413
413
|
]
|
|
414
414
|
\`\`\`
|
|
415
|
-
`,kr=class kr extends ot{constructor(e,n){super();d(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});d(this,"_currentInfo",this.disposeVar(g.react(void 0,(e,n)=>!1)));d(this,"_player");d(this,"_flyToEvent",this.disposeVar(new X));d(this,"_accumDistancesChanged",this.disposeVar(new X));d(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));d(this,"_accumDistancesDirty",!1);d(this,"_accumDistances",[]);d(this,"_getCurrentFunc",this.disposeVar(g.react(void 0)));this._player=this.disposeVar(new Jn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:u,ratio:h}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=h,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(g.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(g.bind([this._player,"duration"],[this,"duration"])),this.dispose(g.bind([this._player,"playing"],[this,"playing"])),this.dispose(g.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(g.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let h=0;h<u;++h){const l=o[h][0];if(l<0)console.warn("地理路径的时间戳不能小于0!");else if(l<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${h} time: ${l}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(g.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(g.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=kr.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=kr.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)return this._accumDistances=[],this._accumDistances;{const e=this.timePosRots.length;let n=0;const i=[];let s=Ii(this.timePosRots[0][1]);i.push(n);for(let o=1;o<e;++o){const a=Ii(this.timePosRots[o][1]),u=g.Vector.distance(a,s);s=a,n+=u,i.push(n)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&n2(this.timePosRots,e,this.rotLerpMode)}subPath(e,n){return this.timePosRots&&s2(this,e,n)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=kr.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=kr.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=kr.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,n){r2(this,e,n)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};d(kr,"computeRotIfUndefinedUsingPrevLine",wm),d(kr,"computeRotIfUndefinedUsingNextLine",Em),d(kr,"computeRotIfUndefinedUsingLerp",e2),d(kr,"getLeftRotation",Sm),d(kr,"getRightRotation",Cm),d(kr,"parseData",i2),d(kr,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),d(kr,"timePosRotsMd",o2);let Ys=kr;(r=>{r.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:g.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((n,i)=>n===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((n,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:g.reactArray([1,1,1,1]),hasDash:!1,gapColor:g.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(Ys||(Ys={})),g.extendClassProps(Ys.prototype,Ys.createDefaultProps);const gu=class gu extends Bs{constructor(e){super(e);d(this,"_path");d(this,"_currentPositionChanged",this.disposeVar(new X));d(this,"_currentRotationChanged",this.disposeVar(new X));d(this,"_currentChanged",this.disposeVar(new X));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new Ys),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const n=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),u=[];for(let h=0;h<a;++h)u.push([this.timeStamps[h],this.points[h]]);this._path.timePosRots=u,this.rotationRadius.some(h=>h>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(g.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));n(),this.dispose(i.disposableOn(n))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[$o(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new kg([this,"timeStamps"],"时间序列",[],!0),new L([this,"speed"],"线条流速",1),new Tt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new lt([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new cr([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};d(gu,"createDefaultProps",()=>({...Rt.createDefaultProps(),timeStamps:g.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:g.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),d(gu,"type",gu.register("ESPath",gu,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let bh=gu;const eo=class eo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new Z([this,"textEditingInteraction"],"文本编辑交互"),new Z([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",eo.defaults.width,!0),new mc([this,"text"],"内容",eo.defaults.text,void 0,!0),new Yn([this,"originRatioAndOffset"],"原点比例和偏移"),new L([this,"opacity"],"透明度"),new L([this,"fontSize"],"字体大小"),new Gt([this,"color"],"字体颜色"),new Gt([this,"backgroundColor"],"背景颜色"),new Yn([this,"padding"],"内边距"),new Yn([this,"borderRadius"],"边框圆角"),new Gt([this,"borderColor"],"边框颜色"),new L([this,"borderWidth"],"边框宽度"),new Tt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new Tt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(eo,"createDefaultProps",()=>({...dt.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:g.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:g.reactArray([1,1,1,1]),backgroundColor:g.reactArray([0,0,0,.8]),padding:g.reactArray([5,5,5,5]),borderRadius:g.reactArray([6,6,6,6]),borderWidth:0,borderColor:g.reactArray([1,1,1,1]),borderStyle:"solid"})),d(eo,"type",eo.register("ESGeoDivTextPoi",eo,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Kd=eo;const pu=class pu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Gt([this,"color"],"颜色",[1,1,0,1])]}}};d(pu,"createDefaultProps",()=>({...dt.createDefaultProps(),color:g.reactArray([1,1,0,1])})),d(pu,"type",pu.register("ESCityBasePoint",pu,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let $d=pu;const a2=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],u2=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
415
|
+
`,kr=class kr extends ot{constructor(e,n){super();d(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});d(this,"_currentInfo",this.disposeVar(g.react(void 0,(e,n)=>!1)));d(this,"_player");d(this,"_flyToEvent",this.disposeVar(new X));d(this,"_accumDistancesChanged",this.disposeVar(new X));d(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));d(this,"_accumDistancesDirty",!1);d(this,"_accumDistances",[]);d(this,"_getCurrentFunc",this.disposeVar(g.react(void 0)));this._player=this.disposeVar(new Jn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:u,ratio:h}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=h,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(g.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(g.bind([this._player,"duration"],[this,"duration"])),this.dispose(g.bind([this._player,"playing"],[this,"playing"])),this.dispose(g.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(g.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let h=0;h<u;++h){const l=o[h][0];if(l<0)console.warn("地理路径的时间戳不能小于0!");else if(l<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${h} time: ${l}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(g.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(g.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=kr.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=kr.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)return this._accumDistances=[],this._accumDistances;{const e=this.timePosRots.length;let n=0;const i=[];let s=Ii(this.timePosRots[0][1]);i.push(n);for(let o=1;o<e;++o){const a=Ii(this.timePosRots[o][1]),u=g.Vector.distance(a,s);s=a,n+=u,i.push(n)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&s2(this.timePosRots,e,this.rotLerpMode)}subPath(e,n){return this.timePosRots&&a2(this,e,n)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=kr.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=kr.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=kr.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,n){i2(this,e,n)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};d(kr,"computeRotIfUndefinedUsingPrevLine",Sm),d(kr,"computeRotIfUndefinedUsingNextLine",Cm),d(kr,"computeRotIfUndefinedUsingLerp",n2),d(kr,"getLeftRotation",Pm),d(kr,"getRightRotation",Im),d(kr,"parseData",o2),d(kr,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),d(kr,"timePosRotsMd",u2);let Ys=kr;(r=>{r.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:g.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((n,i)=>n===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((n,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:g.reactArray([1,1,1,1]),hasDash:!1,gapColor:g.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(Ys||(Ys={})),g.extendClassProps(Ys.prototype,Ys.createDefaultProps);const gu=class gu extends Bs{constructor(e){super(e);d(this,"_path");d(this,"_currentPositionChanged",this.disposeVar(new X));d(this,"_currentRotationChanged",this.disposeVar(new X));d(this,"_currentChanged",this.disposeVar(new X));d(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);d(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new Ys),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const n=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),u=[];for(let h=0;h<a;++h)u.push([this.timeStamps[h],this.points[h]]);this._path.timePosRots=u,this.rotationRadius.some(h=>h>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(g.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));n(),this.dispose(i.disposableOn(n))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[$o(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Ug([this,"timeStamps"],"时间序列",[],!0),new L([this,"speed"],"线条流速",1),new Tt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new lt([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new cr([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};d(gu,"createDefaultProps",()=>({...Rt.createDefaultProps(),timeStamps:g.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:g.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),d(gu,"type",gu.register("ESPath",gu,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let bh=gu;const eo=class eo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new Z([this,"textEditingInteraction"],"文本编辑交互"),new Z([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",eo.defaults.width,!0),new _c([this,"text"],"内容",eo.defaults.text,void 0,!0),new Yn([this,"originRatioAndOffset"],"原点比例和偏移"),new L([this,"opacity"],"透明度"),new L([this,"fontSize"],"字体大小"),new Gt([this,"color"],"字体颜色"),new Gt([this,"backgroundColor"],"背景颜色"),new Yn([this,"padding"],"内边距"),new Yn([this,"borderRadius"],"边框圆角"),new Gt([this,"borderColor"],"边框颜色"),new L([this,"borderWidth"],"边框宽度"),new Tt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new Tt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};d(eo,"createDefaultProps",()=>({...dt.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:g.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:g.reactArray([1,1,1,1]),backgroundColor:g.reactArray([0,0,0,.8]),padding:g.reactArray([5,5,5,5]),borderRadius:g.reactArray([6,6,6,6]),borderWidth:0,borderColor:g.reactArray([1,1,1,1]),borderStyle:"solid"})),d(eo,"type",eo.register("ESGeoDivTextPoi",eo,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Zd=eo;const pu=class pu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Gt([this,"color"],"颜色",[1,1,0,1])]}}};d(pu,"createDefaultProps",()=>({...dt.createDefaultProps(),color:g.reactArray([1,1,0,1])})),d(pu,"type",pu.register("ESCityBasePoint",pu,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let tg=pu;const h2=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],l2=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
416
416
|
\`\`\`
|
|
417
417
|
[{
|
|
418
418
|
"id": "document",
|
|
@@ -467,7 +467,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
467
467
|
}
|
|
468
468
|
}]
|
|
469
469
|
\`\`\`
|
|
470
|
-
`,
|
|
470
|
+
`,Mm=`(dataSource) => {
|
|
471
471
|
var entities = dataSource.entities.values;
|
|
472
472
|
|
|
473
473
|
for (var i = 0; i < entities.length; i++) {
|
|
@@ -482,12 +482,12 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
`,
|
|
485
|
+
`,c2=`data 路径都可以使用下面回调函数
|
|
486
486
|
\`\`\`
|
|
487
|
-
${
|
|
487
|
+
${Mm}
|
|
488
488
|
\`\`\`
|
|
489
489
|
|
|
490
|
-
`,Nh=Date.now();new Date(Nh).toISOString(),new Date(Nh+864e5).toISOString();const Ei=class Ei extends ft{constructor(e){super(e);d(this,"_flyToEvent",this.disposeVar(new X));d(this,"_resetClockEvent",this.disposeVar(new X))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new lt([this,"data"],Ei.defaults.data,u2,"数据",!0),new lt([this,"uri"],"路径",""),new Z([this,"clockEnabled"],"启用",!1),new L([this,"multiplier"],"倍速",Ei.defaults.multiplier),new Z([this,"autoResetClock"],"自动设置时钟",!0),new so([this,"startTime"],"开始时间",Ei.defaults.startTime,!0),new so([this,"stopTime"],"结束时间",Ei.defaults.stopTime,!0),new so([this,"currentTime"],"当前时间",Ei.defaults.currentTime,!0),new Tt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new Tt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new Z([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new Z([this,"show"],"是否显示",!0),new Z([this,"collision"],"开启碰撞",!1),new Z([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new mt(["number"],n=>this.flyTo(n),[1e3],"飞入"),new mt([],()=>this.resetClock(),[],"重设时钟"),new Es([this,"loadFuncStr"],"loadFnStr",Pm,h2,!0)]}}};d(Ei,"createDefaultProps",()=>({show:!0,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",allowPicking:!1,data:g.reactJsonWithUndefined(a2),autoResetClock:!0,clockEnabled:!1,startTime:Nh,stopTime:Nh+864e5,currentTime:Nh,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...ft.createDefaultProps()})),d(Ei,"type",Ei.register("ESCzml",Ei,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Zd=Ei;const vu=class vu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new Z([this,"show"],"是否显示"),new L([this,"cssSize"],"尺寸"),new ze([this,"cssPosition"],"位置"),new Cu([this,"imgUrl"],"图片地址")]}}};d(vu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),d(vu,"type",vu.register("ESNavigator",vu,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let tg=vu;const Yi=class Yi extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new Z([this,"show"],"是否显示",Yi.defaults.show),new L([this,"height"],"高度",Yi.defaults.height,!0),new L([this,"fontSize"],"文字大小",Yi.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",Yi.defaults.bgColor,!0)]}}};d(Yi,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:g.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),d(Yi,"type",Yi.register("ESViewerStatusBar",Yi,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let eg=Yi;const Ji=class Ji extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new Z([this,"show"],"是否显示",Ji.defaults.show),new L([this,"height"],"高度",Ji.defaults.height,!0),new L([this,"fontSize"],"文字大小",Ji.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",Ji.defaults.bgColor,!0)]}}};d(Ji,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:g.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),d(Ji,"type",Ji.register("ESViewerStatusBarScale",Ji,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let rg=Ji;const mu=class mu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"url"],"路径","",!0),new L([this,"progress"],"进度",0,!1,!0)]}}};d(mu,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",progress:0})),d(mu,"type",mu.register("ESGaussianSplatting",mu,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let ng=mu;const Ho=class Ho extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"mesh"],"mesh地址",Ho.defaults.mesh)]}}};d(Ho,"createDefaultProps",()=>({...dt.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),d(Ho,"type",Ho.register("ESStaticMesh",Ho,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let ig=Ho;const yu=class yu extends Rt{constructor(e){super(e);d(this,"_startEvent",this.dv(new X));d(this,"_clearEvent",this.dv(new X));d(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Ph),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(g.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清除分析"),new lt([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new lt([this,"depths"],"深度值",[],void 0,!1,!0),new L([this,"radius"],"半径",1e4,!0)]}}};d(yu,"createDefaultProps",()=>({...Rt.createDefaultProps(),windowPositions:kf([]),depths:g.reactArrayWithUndefined([]),radius:g.react(1e4)})),d(yu,"type",yu.register("ESSkylineAnalysis",yu,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let sg=yu;const ys=class ys extends ne{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new lt([this,"data"],"数据",[],void 0,!0),new lt([this,"gradient"],"渐变",ys.defaults.gradient,void 0,!0),new L([this,"radius"],"半径",ys.defaults.radius,void 0,!0),new L([this,"blur"],"模糊",ys.defaults.blur,!0),new Z([this,"is3D"],"is3D",!1,!0)]}}};d(ys,"createDefaultProps",()=>({...ne.createDefaultProps(),is3D:g.react(!1),data:g.reactPositions([]),gradient:g.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:g.react(10),blur:g.react(.85)})),d(ys,"type",ys.register("ESHeatMap",ys,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let og=ys;const Bo=class Bo extends Rt{constructor(e){super(e);d(this,"editingBindMode","scatter")}};d(Bo,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!0})),d(Bo,"type",Bo.register("ESGeoPoints",Bo,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),d(Bo,"supportEditingModes",[...Rt.supportEditingModes,ct.ScatterAppend,ct.ScatterModify]);let ag=Bo;function Im(r){return typeof r=="string"?document.getElementById(r):r}function ug(r){if(!r)throw new Error("container is not defined");r.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",r.appendChild(t),t}class Mm extends ot{constructor(e,n){super();d(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const h=i.get(u);h&&(h.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const l=this.createSceneObjectListeningFunc(u);l&&i.set(u,l)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class l2 extends ot{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class n extends ot{constructor(s){super(),this._esPath=s,this.dv(new g.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends ot{constructor(h){if(super(),this._esPath=h,!o)throw new Error("!viewer");const l=()=>{const c=e.activeViewer;c&&(this._esPath.path.currentTime=c.simulationTime)};l(),this.d(o.simulationTimeChanged.don(l))}}return new a(this._esPath)}))}}this.dv(new Mm(e.sceneObjectsManager,i=>{if(i instanceof bh)return new n(i)}))}{const e=this._esObjectsManager;class n extends ot{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new Mm(e.sceneObjectsManager,i=>{if(i instanceof Mh)return new n(i)}))}}}class c2 extends ot{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...n])})})),this.d(e.path.currentRotationChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...n])})}))})}}class f2 extends ot{constructor(e){super();d(this,"_player");d(this,"_channels",this.dv(g.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new g.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const n=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=ft.getSceneObjById(s.pathId);if(!o||!(o instanceof bh))continue;const u=s.sceneObjectIds.map(h=>ft.getSceneObjById(h)).filter(h=>h!==void 0);u.length!==0&&n.push({path:o,sceneObjects:u})}if(n.length!==0)return new c2(n)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function jl(r){if(r.data){const{type:t,value:e}=r.data;if(t==="UITreeA"&&e instanceof Er){const{sceneObject:n}=e;if(n)return n.id}}}function d2(r,t){const{property:e,customEventName:n,otherParams:i}=t,{dragstartDataMananger:s}=r;if(!(e instanceof Ko)){if(!(e instanceof Fg)){if(e instanceof Et){const[o,a]=g.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;jl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const h=jl(s);h!==void 0&&a(h)}}else if(e instanceof Ag){const[o,a]=g.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;jl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,h=i[0].strinsPropDom,l=i[0].index;u.preventDefault();const c=jl(s);if(c!==void 0){h[l].firstChild.value=c;const f=new Event("input",{bubbles:!0,cancelable:!0});h[l].firstChild.dispatchEvent(f)}}}else if(e instanceof Og){const[o,a]=g.getReactFuncs(e.reactVar)}}}}function bm(r,t,e,n){if(e)n.currentActiveEditing=[r,t];else if(n.currentActiveEditing){const[i,s]=n.currentActiveEditing;i===r&&s===t&&(e||(n.currentActiveEditing=void 0))}}const g2=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class p2 extends ot{constructor(t,e){super(),this._sceneObject=t;const n=this._sceneObject;for(let i of g2){const s=i+"Changed",o=n[s];if(o){{const a=n[i];bm(n,i,a,e)}this.dispose(o.disposableOn(a=>bm(n,i,a,e)))}}}get sceneObject(){return this._sceneObject}}class v2 extends ot{constructor(){super();d(this,"_currentActiveEditing",this.disposeVar(g.reactArrayWithUndefined(void 0)));d(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,n)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),n){const[i,s]=n;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),ft.context.sceneObjCreatedEvent.don(e=>{e.dv(new p2(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class m2 extends ot{constructor(){super();d(this,"_sceneObjects",new Set);d(this,"_sceneObjectsToChange",this.dv(new X));this.d(()=>{const e=g.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,n){const i=ft.context.createSceneObject(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,n){const i=ft.context.createSceneObjectFromClass(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const n=ft.context.createSceneObjectFromJson(e);return n&&this.addSceneObject(n),n}}function Nm(r,t){return r.length===t.length&&r.every((e,n)=>e===t[n])}class y2 extends ot{constructor(t){super(),this._viewer=t,this.d(g.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class _2 extends ot{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const n=gi.createCommonProps(),i=[];Object.keys(n).forEach(u=>{const h=this._activeViewer[u+"Changed"];i.push(h)});const s=this.dv(g.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(g.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),h=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:l,rotation:c}=u;h&&Nm(l,h.position)&&Nm(c,h.rotation)||this._viewer.flyIn(l,c,0)}),this.d(()=>a.cancel())}}const w2=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
490
|
+
`,Nh=Date.now();new Date(Nh).toISOString(),new Date(Nh+864e5).toISOString();const Ei=class Ei extends ft{constructor(e){super(e);d(this,"_flyToEvent",this.disposeVar(new X));d(this,"_resetClockEvent",this.disposeVar(new X))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new lt([this,"data"],Ei.defaults.data,l2,"数据",!0),new lt([this,"uri"],"路径",""),new Z([this,"clockEnabled"],"启用",!1),new L([this,"multiplier"],"倍速",Ei.defaults.multiplier),new Z([this,"autoResetClock"],"自动设置时钟",!0),new so([this,"startTime"],"开始时间",Ei.defaults.startTime,!0),new so([this,"stopTime"],"结束时间",Ei.defaults.stopTime,!0),new so([this,"currentTime"],"当前时间",Ei.defaults.currentTime,!0),new Tt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new Tt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new Z([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new Z([this,"show"],"是否显示",!0),new Z([this,"collision"],"开启碰撞",!1),new Z([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new mt(["number"],n=>this.flyTo(n),[1e3],"飞入"),new mt([],()=>this.resetClock(),[],"重设时钟"),new Es([this,"loadFuncStr"],"loadFnStr",Mm,c2,!0)]}}};d(Ei,"createDefaultProps",()=>({show:!0,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",allowPicking:!1,data:g.reactJsonWithUndefined(h2),autoResetClock:!0,clockEnabled:!1,startTime:Nh,stopTime:Nh+864e5,currentTime:Nh,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...ft.createDefaultProps()})),d(Ei,"type",Ei.register("ESCzml",Ei,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let eg=Ei;const vu=class vu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new Z([this,"show"],"是否显示"),new L([this,"cssSize"],"尺寸"),new ze([this,"cssPosition"],"位置"),new Cu([this,"imgUrl"],"图片地址")]}}};d(vu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),d(vu,"type",vu.register("ESNavigator",vu,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let rg=vu;const Yi=class Yi extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new Z([this,"show"],"是否显示",Yi.defaults.show),new L([this,"height"],"高度",Yi.defaults.height,!0),new L([this,"fontSize"],"文字大小",Yi.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",Yi.defaults.bgColor,!0)]}}};d(Yi,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:g.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),d(Yi,"type",Yi.register("ESViewerStatusBar",Yi,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let ng=Yi;const Ji=class Ji extends ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new Z([this,"show"],"是否显示",Ji.defaults.show),new L([this,"height"],"高度",Ji.defaults.height,!0),new L([this,"fontSize"],"文字大小",Ji.defaults.fontSize,!0),new Gt([this,"bgColor"],"背景颜色",Ji.defaults.bgColor,!0)]}}};d(Ji,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:g.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})),d(Ji,"type",Ji.register("ESViewerStatusBarScale",Ji,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let ig=Ji;const mu=class mu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"url"],"路径","",!0),new L([this,"progress"],"进度",0,!1,!0)]}}};d(mu,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",progress:0})),d(mu,"type",mu.register("ESGaussianSplatting",mu,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let sg=mu;const Ho=class Ho extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"mesh"],"mesh地址",Ho.defaults.mesh)]}}};d(Ho,"createDefaultProps",()=>({...dt.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),d(Ho,"type",Ho.register("ESStaticMesh",Ho,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let og=Ho;const yu=class yu extends Rt{constructor(e){super(e);d(this,"_startEvent",this.dv(new X));d(this,"_clearEvent",this.dv(new X));d(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Ph),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(g.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(g.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清除分析"),new lt([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new lt([this,"depths"],"深度值",[],void 0,!1,!0),new L([this,"radius"],"半径",1e4,!0)]}}};d(yu,"createDefaultProps",()=>({...Rt.createDefaultProps(),windowPositions:Uf([]),depths:g.reactArrayWithUndefined([]),radius:g.react(1e4)})),d(yu,"type",yu.register("ESSkylineAnalysis",yu,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let ag=yu;const ys=class ys extends ne{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new lt([this,"data"],"数据",[],void 0,!0),new lt([this,"gradient"],"渐变",ys.defaults.gradient,void 0,!0),new L([this,"radius"],"半径",ys.defaults.radius,void 0,!0),new L([this,"blur"],"模糊",ys.defaults.blur,!0),new Z([this,"is3D"],"is3D",!1,!0)]}}};d(ys,"createDefaultProps",()=>({...ne.createDefaultProps(),is3D:g.react(!1),data:g.reactPositions([]),gradient:g.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:g.react(10),blur:g.react(.85)})),d(ys,"type",ys.register("ESHeatMap",ys,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let ug=ys;const Bo=class Bo extends Rt{constructor(e){super(e);d(this,"editingBindMode","scatter")}};d(Bo,"createDefaultProps",()=>({...Rt.createDefaultProps(),pointed:!0})),d(Bo,"type",Bo.register("ESGeoPoints",Bo,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),d(Bo,"supportEditingModes",[...Rt.supportEditingModes,ct.ScatterAppend,ct.ScatterModify]);let hg=Bo;function bm(r){return typeof r=="string"?document.getElementById(r):r}function lg(r){if(!r)throw new Error("container is not defined");r.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",r.appendChild(t),t}class Nm extends ot{constructor(e,n){super();d(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const h=i.get(u);h&&(h.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const l=this.createSceneObjectListeningFunc(u);l&&i.set(u,l)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class f2 extends ot{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class n extends ot{constructor(s){super(),this._esPath=s,this.dv(new g.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends ot{constructor(h){if(super(),this._esPath=h,!o)throw new Error("!viewer");const l=()=>{const c=e.activeViewer;c&&(this._esPath.path.currentTime=c.simulationTime)};l(),this.d(o.simulationTimeChanged.don(l))}}return new a(this._esPath)}))}}this.dv(new Nm(e.sceneObjectsManager,i=>{if(i instanceof bh)return new n(i)}))}{const e=this._esObjectsManager;class n extends ot{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new Nm(e.sceneObjectsManager,i=>{if(i instanceof Mh)return new n(i)}))}}}class d2 extends ot{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...n])})})),this.d(e.path.currentRotationChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...n])})}))})}}class g2 extends ot{constructor(e){super();d(this,"_player");d(this,"_channels",this.dv(g.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new g.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const n=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=ft.getSceneObjById(s.pathId);if(!o||!(o instanceof bh))continue;const u=s.sceneObjectIds.map(h=>ft.getSceneObjById(h)).filter(h=>h!==void 0);u.length!==0&&n.push({path:o,sceneObjects:u})}if(n.length!==0)return new d2(n)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function Ql(r){if(r.data){const{type:t,value:e}=r.data;if(t==="UITreeA"&&e instanceof Er){const{sceneObject:n}=e;if(n)return n.id}}}function p2(r,t){const{property:e,customEventName:n,otherParams:i}=t,{dragstartDataMananger:s}=r;if(!(e instanceof Ko)){if(!(e instanceof kg)){if(e instanceof Et){const[o,a]=g.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;Ql(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const h=Ql(s);h!==void 0&&a(h)}}else if(e instanceof Dg){const[o,a]=g.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;Ql(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,h=i[0].strinsPropDom,l=i[0].index;u.preventDefault();const c=Ql(s);if(c!==void 0){h[l].firstChild.value=c;const f=new Event("input",{bubbles:!0,cancelable:!0});h[l].firstChild.dispatchEvent(f)}}}else if(e instanceof Lg){const[o,a]=g.getReactFuncs(e.reactVar)}}}}function xm(r,t,e,n){if(e)n.currentActiveEditing=[r,t];else if(n.currentActiveEditing){const[i,s]=n.currentActiveEditing;i===r&&s===t&&(e||(n.currentActiveEditing=void 0))}}const v2=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class m2 extends ot{constructor(t,e){super(),this._sceneObject=t;const n=this._sceneObject;for(let i of v2){const s=i+"Changed",o=n[s];if(o){{const a=n[i];xm(n,i,a,e)}this.dispose(o.disposableOn(a=>xm(n,i,a,e)))}}}get sceneObject(){return this._sceneObject}}class y2 extends ot{constructor(){super();d(this,"_currentActiveEditing",this.disposeVar(g.reactArrayWithUndefined(void 0)));d(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,n)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),n){const[i,s]=n;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),ft.context.sceneObjCreatedEvent.don(e=>{e.dv(new m2(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class _2 extends ot{constructor(){super();d(this,"_sceneObjects",new Set);d(this,"_sceneObjectsToChange",this.dv(new X));this.d(()=>{const e=g.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,n){const i=ft.context.createSceneObject(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,n){const i=ft.context.createSceneObjectFromClass(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const n=ft.context.createSceneObjectFromJson(e);return n&&this.addSceneObject(n),n}}function Tm(r,t){return r.length===t.length&&r.every((e,n)=>e===t[n])}class w2 extends ot{constructor(t){super(),this._viewer=t,this.d(g.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class E2 extends ot{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const n=gi.createCommonProps(),i=[];Object.keys(n).forEach(u=>{const h=this._activeViewer[u+"Changed"];i.push(h)});const s=this.dv(g.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(g.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),h=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:l,rotation:c}=u;h&&Tm(l,h.position)&&Tm(c,h.rotation)||this._viewer.flyIn(l,c,0)}),this.d(()=>a.cancel())}}const S2=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
491
491
|
<animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
|
|
492
492
|
</circle><g></g></g></svg>
|
|
493
|
-
`,E2='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',S2='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Yo=class Yo extends ot{constructor(t){super();const e=()=>{const n=this.dv(new Bl);this.d(g.track([n,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{n.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(n),this.d(()=>t.delete(n)),n.instanceClass=class extends ot{constructor(o,a,u){super();d(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const v=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};v(),this.d(a.showChanged.don(v))}let h,l,c,f,p;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",h=document.createElement("div"),this._div.appendChild(h),h.style.width="auto",h.style.position="absolute",h.style.left="50%",h.style.top="50%",h.style.transform="translate(-50%,-50%)",h.style.background="rgba(120, 120, 0, 0.7)",h.style.color="white",h.style.fontSize="10px",h.style.background="none",h.style.display="flex",h.style.justifyContent="center",h.style.alignItems="center",l=document.createElement("div"),h.appendChild(l),l.style.pointerEvents="none",l.style.display="block",l.style.width="40px",l.innerHTML=Yo.defaultsSvg.loadingSvg,l.style.filter="drop-shadow(0px 0px 1px black)",c=document.createElement("div"),h.appendChild(c),c.style.pointerEvents="none",c.style.marginLeft="10px",c.style.display="flex",c.style.flexFlow="column",c.style.maxWidth="300px",f=document.createElement("div"),c.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",p=document.createElement("div"),c.appendChild(p),p.style.fontWeight="400",p.style.textShadow="0 0 2px black";{const v=()=>{let E="Raw";u.status==="Raw"?E="初始状态":u.status==="Creating"?E="正在创建":u.status==="Created"?E="创建完成":u.status==="Error"?E="创建失败":u.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${u.status})`,p.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(l.innerHTML=Yo.defaultsSvg.loadingSvg),u.status==="Created"&&(l.innerHTML=Yo.defaultsSvg.successSvg),u.status==="Error"&&(l.innerHTML=Yo.defaultsSvg.warnSvg)};v();const w=this.dv(g.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(w.don(v))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};d(Yo,"defaultsSvg",{loadingSvg:w2,successSvg:E2,warnSvg:S2});let hg=Yo;class C2 extends ot{constructor(t,e,n){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=n;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const l=o.zIndex??"";i.style.zIndex=l,s.style.zIndex=l};a(),this.d(o.zIndexChanged.don(a));const u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const h=()=>{i.style.opacity=`${o.opacity??1}`};h(),this.d(o.opacityChanged.don(h))}}function Ql(r){let t=g.getExtProp(r,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",r.appendChild(t),g.setExtProp(r,"_relativeContainer",t)),t}class P2 extends ot{constructor(e,n){super();d(this,"_subContainer",document.createElement("div"));d(this,"_overlayContainer",document.createElement("div"));d(this,"_containerStyleController");this._container=e,this._viewer=n,this._containerStyleController=this.dv(new C2(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),Ql(this._container).appendChild(i),this.d(()=>Ql(this._container).removeChild(i)),Ql(this._container).appendChild(s),this.d(()=>Ql(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class I2 extends ot{constructor(){super(...arguments);d(this,"registerObjsMap",new Map)}register(e,n){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,n),e}getViewerConstructor(e){const n=this.registerObjsMap.get(e);if(!n){console.warn(`未找到${e}类!`);return}return n}createViewer(e){const n=e.type;console.log(e);const i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(e)}}class xm extends ot{constructor(t,e,n=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(g.DomElementEvent.create(e,"pointerdown")),o=this.dv(g.DomElementEvent.create(e,"pointermove")),a=this.dv(g.DomElementEvent.create(e,"pointerup")),u=this.dv(g.DomElementEvent.create(e,"pointerout")),h=this.dv(g.DomElementEvent.create(e,"pointerover")),l=this.dv(new g.PointerClick),c=this.dv(new g.PointerHover),f=()=>{const m=this._viewer.hoverTime*1e3;c.delayTime=m};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(m=>l.pointerDown(m))),this.d(o.don(m=>l.pointerMove(m))),this.d(a.don(m=>l.pointerUp(m))),this.d(u.don(m=>l.pointerOut(m))),this.d(s.don(m=>c.pointerDown(m))),this.d(o.don(m=>c.pointerMove(m))),this.d(a.don(m=>c.pointerUp(m))),this.d(u.don(m=>c.pointerOut(m)));const{x:p,y:v}=e.getBoundingClientRect(),w=i?p:0,E=i?v:0;this.d(c.hoverEvent.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.hoverEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(l.clickEvent.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.clickEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(l.dbclickEvent.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);m.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(s.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);m.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(a.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);m.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(o.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.pointerMoveEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(h.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.pointerOverEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(u.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.pointerOutEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})}));const I=this.dv(g.DomElementEvent.create(e,"keydown"));this.d(I.don(m=>this._viewer.keyDownEvent.emit(m)));const y=this.dv(g.DomElementEvent.create(e,"keyup"));this.d(y.don(m=>this._viewer.keyUpEvent.emit(m)));const _=this.dv(g.DomElementEvent.create(e,"wheel"));this.d(_.don(m=>this._viewer.wheelEvent.emit(m)))}}class M2 extends ot{constructor(e){super();d(this,"viewer");const n=this.viewer=e;this.ad(new g.ObjResettingWithEvent(n.rollerShutterChanged,()=>{const i=n.container;if(!i||!n.rollerShutter)return;const s=new ot;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const n=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",n)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",n)}),e}}class b2 extends ot{constructor(e){super();d(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new M2(e))}}const _s=class _s extends ot{constructor(e){super();d(this,"_forceRecreateEvent",this.dv(new X));d(this,"_container",this.dv(g.react(void 0)));d(this,"_containerSize",this.dv(g.react(void 0)));d(this,"_editingEvent",this.disposeVar(new X));d(this,"_status",this.dv(g.react("Raw")));d(this,"_statusLog",this.dv(g.react("")));d(this,"_statusContainer",this.dv(new hg(this)));d(this,"_useCustomInteraction",this.dv(g.react(!0)));d(this,"_resetInteractionEvent",this.dv(g.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));d(this,"_interactionResetting",this.dv(new g.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new xm(this,this.container)})));d(this,"_viewerChanged",this.dv(new X));d(this,"_cameraChanged",this.dv(new X));d(this,"_containerResetEvent",this.dv(g.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));d(this,"_containerResetting",this.dv(new g.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new P2(this.container,this)})));d(this,"_sceneObjectsMap",new Map);d(this,"_id");d(this,"_typeName");d(this,"_updateFuncReact",this.dv(g.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(g.react(void 0)));d(this,"_statusInfo",_s.defaults.statusInfo);d(this,"_navigationMode",this.dv(g.react("Map")));d(this,"_syncViewer",this.dv(g.react(void 0)));d(this,"_syncEventDon",this.dv(new g.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new _2(this,e)})));d(this,"_timeSyncdon",this.dv(new g.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new y2(this)})));d(this,"_hoverEvent",this.dv(new X));d(this,"_pointerOverEvent",this.dv(new X));d(this,"_pointerMoveEvent",this.dv(new X));d(this,"_pointerDownEvent",this.dv(new X));d(this,"_pointerUpEvent",this.dv(new X));d(this,"_pointerOutEvent",this.dv(new X));d(this,"_clickEvent",this.dv(new X));d(this,"_dblclickEvent",this.dv(new X));d(this,"_keyDownEvent",this.dv(new X));d(this,"_keyUpEvent",this.dv(new X));d(this,"_wheelEvent",this.dv(new X));d(this,"_actived",this.dv(g.react(!1)));this._id=e.id??g.createGuid();const n=Im(e.container);if(n)this._container.value=ug(n),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const h=io.context.createEngineObject(a,this);h&&i.set(a,h)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||g.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new b2(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const n=document.getElementById(e);n&&n instanceof HTMLDivElement?this._container.value=ug(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=ug(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let n of e)if(!this.has(n)){ft.context.addSceneObject(n);const i=io.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...e){for(let n of e)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),ft.context.deleteSceneObject(n),this._sceneObjectsMap.delete(n),n.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return _s.createDefaultProps()}_getJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof g.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof g.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(n){console.warn(`时间格式不正确! value: ${e} error: ${n}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}getProperties(e){const n={...this.getESProperties()},i=[];return n.general.length>0&&i.push(new vt(n.general,"general")),Object.keys(n).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&n[s].length>0&&i.push(new vt(n[s],s))}),i}};d(_s,"context",new I2),d(_s,"register",_s.context.register.bind(_s.context)),d(_s,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0});let gi=_s;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:g.reactJson(void 0),devTags:g.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),r.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:g.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:g.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:g.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:g.react(void 0),rollerShutter:!1}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(gi||(gi={})),g.extendClassProps(gi.prototype,gi.createDefaultProps);function Tm(r,t){const e=r._lastCameraInfo;if(e){const n=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),r._lastCameraInfo=void 0,n()})}}const N2=r=>{const t=gi.createCommonProps(),e={};try{Object.keys(t).forEach(n=>{e[n]=r[n]})}catch(n){console.warn(n)}return e},Am=(r,t)=>{const e=gi.createCommonProps();try{Object.keys(e).forEach(n=>{r[n]=t[n]})}catch(n){console.warn(n)}};class x2 extends ot{constructor(e){super();d(this,"_viewersChanged",this.disposeVar(new X));d(this,"_viewers",new Set);d(this,"_viewersToChange",this.dv(new X));this._sceneObjectsManager=e,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{Qi(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),n.forEach(o=>{Qi(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,Qi(o.devTags,s.devTags)),Qi(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)Qi(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),n.forEach(o=>{for(let a of s)Qi(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,Qi(o.devTags,u.devTags)),Qi(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const n=gi.context.createViewer(e);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Js extends ot{constructor(...e){super();d(this,"_drgm",this.dv(new qg));d(this,"_sobjm",this.dv(new m2));d(this,"_vrm",this.dv(new x2(this._sobjm)));d(this,"_sceneObjectEditingManager",this.disposeVar(new v2));d(this,"_activeViewer",this.dv(g.react(void 0)));d(this,"_syncOtherViewersToActived",this.dv(g.react(!1)));d(this,"_cmrvm",this.createSceneObjectFromClass(Xl));d(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));d(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});d(this,"_sceneTree",this.dv(new wh("default",this.dragstartDataMananger,24,this)));d(this,"_propUiTreeManager",this.dv(new Va(24)));d(this,"_sceneTreeMap",new Map);d(this,"_viewerCreatedEvent",this.dv(new X));d(this,"_lastCameraInfo");d(this,"_lastActiveViewerJson");d(this,"_syncEventDonFunc",this.d(Su([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(n=>{e?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));d(this,"_player",this.createSceneObjectFromClass(Mh));d(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));d(this,"_esPlyarAndPathTime",this.dv(new l2(this)));d(this,"_pathAnimationManager",this.dv(new f2(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.values().forEach(n=>n.actived=n===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var c;const e=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:n,name:i},a=this.sceneTree.json,u=this._cmrvm.views,h=[...this._vrm.viewers].map(f=>f.json),l=(c=this.activeViewer)==null?void 0:c.getCurrentCameraInfo();return{asset:o,viewers:h,sceneTree:a,viewCollection:u,lastView:l}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(n=>{const i=e.viewers.find(s=>s.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return d2(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,n=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new wh(e,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const n=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,n=!0,i=!0,s=!0){var h;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?N2(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(l=>l.id===o):[...this.getViewers()].find(l=>l.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),n&&Tm(this,a),i&&this._lastActiveViewerJson&&(Am(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===Im(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),n&&Tm(this,u),i&&this._lastActiveViewerJson&&(Am(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const n={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:h,app:l,token:c,viewSync:f,attributeSync:p,destroy:v,id:w}=e[0];n={type:"ESUeViewer",container:u,id:w,options:{uri:h,app:l,token:c}},i={viewSync:f??!0,attributeSync:p??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:h,esmsg:l,viewSync:c,attributeSync:f,id:p,destroy:v}=e[0];n={type:"ESUeViewer",container:u,id:p,options:{ws:h,esmsg:l}},i={viewSync:c??!0,attributeSync:f??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:h,baseUrl:l,viewSync:c,attributeSync:f,id:p,destroy:v}=e[0];n={type:"ESUeViewer",container:u,id:p,options:{project:h,baseUrl:l}},i={viewSync:c??!0,attributeSync:f??!0,destroy:v??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(n={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(n={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(n={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!n)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(n,s,o,a)}createCesiumViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createOpenLayersViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?n={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(e,n){return this._sobjm.createSceneObject(e,n)}createSceneObjectFromClass(e,n){return this._sobjm.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const n=this._sobjm.deleteSceneObject(e);return e.destroy(),n}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let n of e)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}return d(Js,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),d(Js,"getEnv",ft.context.getEnv.bind(ft.context)),d(Js,"setEnv",ft.context.setEnv.bind(ft.context)),(r=>{r.createDefaultProps=()=>({})})(Js||(Js={})),g.extendClassProps(Js.prototype,Js.createDefaultProps),M.BasePropTreeItem=Rf,M.Boolean2Property=hy,M.Boolean2sProperty=fy,M.Boolean3Property=ly,M.Boolean3sProperty=dy,M.Boolean4Property=cy,M.Boolean4sProperty=gy,M.BooleanProperty=Z,M.BooleansProperty=ey,M.ColorProperty=Gt,M.ColorRgbProperty=my,M.DashPatternProperty=yy,M.DateProperty=so,M.DatesProperty=kg,M.Destroyable=ot,M.DoublyLinkedList=Mg,M.DragStartDataManager=qg,M.ES3DTileset=kn,M.ESAlarm=Wf,M.ESApertureEffect=Xf,M.ESAreaMeasurement=Hf,M.ESBlastParticleSystem=Bf,M.ESBoxClipping=Yf,M.ESCameraView=ql,M.ESCameraViewCollection=Xl,M.ESCameraVisibleRange=Jf,M.ESCar=jf,M.ESCityBasePoint=$d,M.ESClassification=Hl,M.ESClippingPlane=Qf,M.ESCustomDiv=Bl,M.ESCzml=Zd,M.ESDataMesh=Kf,M.ESDatasmithRuntimeModel=Ld,M.ESDirectionMeasurement=Sd,M.ESDistanceMeasurement=$f,M.ESDynamicWater=Rd,M.ESEntityCluster=Qd,M.ESExcavate=Eh,M.ESFireParticleSystem=Zf,M.ESForestTileset=td,M.ESGaussianSplatting=ng,M.ESGeoDiv=ed,M.ESGeoDivTextPoi=Kd,M.ESGeoExtrudedPolygon=Ph,M.ESGeoJson=Cd,M.ESGeoLineString=Bs,M.ESGeoPoints=ag,M.ESGeoPolygon=oe,M.ESGeoRectangle=rd,M.ESGeoVector=Rt,M.ESGeoWater=Fd,M.ESGltfModel=id,M.ESHeatMap=og,M.ESHeightLimitAnalysis=jd,M.ESHeightMeasurement=Pd,M.ESHole=qd,M.ESHuman=za,M.ESHumanPoi=zd,M.ESImageLabel=sd,M.ESImageryLayer=od,M.ESJEditingMode=ct,M.ESJLonLatFormat=Vg,M.ESJPickedResult=My,M.ESLabel=gn,M.ESLevelRuntimeModel=Gd,M.ESLocalCircle=Id,M.ESLocalPolygon=Ch,M.ESLocalPolygonZ=Md,M.ESLocalRectangle=bd,M.ESLocalSkyBox=ad,M.ESLocalVector=Ua,M.ESLocalVector2D=ds,M.ESLocationMeasurement=ud,M.ESMsTileset=Bd,M.ESNavigator=tg,M.ESObjectWithLocation=dt,M.ESObjectsManager=Js,M.ESParticleSystemPrimitive=hd,M.ESPath=bh,M.ESPathImpl=Ys,M.ESPipeFence=Nd,M.ESPipeline=kd,M.ESPipeserTileset=xd,M.ESPit=qa,M.ESPlayer=Mh,M.ESPoi2D=Sh,M.ESPoi3D=ld,M.ESPoiTileset=Yd,M.ESPolygonFence=Td,M.ESPolygonFlattenedPlane=cd,M.ESPolygonWithHole=Od,M.ESRectangle=Ad,M.ESRtsFeatureEditing=Hd,M.ESRtsTileset=Xd,M.ESScale=Jd,M.ESSceneObject=ft,M.ESSceneObjectWithId=zy,M.ESSeparateFoliage=fd,M.ESSkylineAnalysis=sg,M.ESStaticMesh=ig,M.ESSubmergingAnalysis=dd,M.ESSunshineAnalysis=gd,M.ESSurfaceAreaMeasurement=Dd,M.ESTerrainLayer=pd,M.ESTestObject=qf,M.ESTextLabel=vd,M.ESUEWidget=md,M.ESUnrealActor=yd,M.ESVideoFusion=_d,M.ESViewShed=wd,M.ESViewer=gi,M.ESViewerStatusBar=eg,M.ESViewerStatusBarScale=rg,M.ESVisibilityAnalysis=Vd,M.ESVisualObject=ne,M.ESVolumeMeasurement=Ud,M.ESWidget=Ed,M.EngineObject=io,M.EnumProperty=Tt,M.EnumStringsProperty=_y,M.EvalStringProperty=Es,M.Event=X,M.EventListenerHandler=gc,M.FunctionProperty=mt,M.GroupPropTreeItem=Gf,M.GroupProperty=vt,M.JsonProperty=lt,M.LeafPropTreeItem=Ff,M.ListenerPipe=dc,M.LongStringProperty=mc,M.MaximumScreenSpaceErrorProperty=Zm,M.MinmaxProperty=wy,M.NearFarScalerProperty=Ey,M.NextAnimateFrameEvent=Tg,M.NonreactiveJsonStringProperty=Rg,M.Number2Property=ze,M.Number2sProperty=Dg,M.Number3Property=cr,M.Number3sProperty=vc,M.Number4Property=Yn,M.Number4WithUndefinedProperty=ay,M.Number4sProperty=uy,M.NumberProperty=L,M.NumberRangeProperty=Sy,M.NumberSliderProperty=Be,M.NumbersProperty=ty,M.ObjPool=lc,M.ParamsProperty=Lg,M.PickedInfo=Iy,M.Player=Jn,M.PlayerProperty=Uh,M.PositionProperty=Ko,M.PositionsProperty=Fg,M.PositionsSetPropety=Py,M.PropTree=$v,M.PropUiTreeManager=Va,M.Property=ws,M.ReactVarProperty=Ot,M.RotationProperty=yc,M.SceneObjectFromId=wc,M.SceneTree=wh,M.SceneTreeContextMenu=im,M.SceneTreeItem=Er,M.SceneTreeItemDragDrop=nm,M.SmartListenerHandler=Eu,M.SmartListenerPipe=Wm,M.SmoothMoveController=DI,M.String2Property=ry,M.String2sProperty=Og,M.String3Property=ny,M.String3sProperty=sy,M.String4Property=iy,M.String4sProperty=oy,M.StringNumberProperty=py,M.StringNumbersProperty=vy,M.StringProperty=Et,M.StringsProperty=Ag,M.TreeItemDragDrop=Wg,M.UriProperty=Cu,M.ViewPlayerProperty=Gg,M.ViewerCustomInteraction=xm,M.Watcher=Pu,M.WatcherTools=Yg,M.WithUndefinedProperty=pc,M.addTreesCallFunc=hm,M.animateFrame=Bm,M.bindCustomEditing=Bg,M.booleanPointInPolygon=cI,M.cartesianDistance=Kv,M.clamp0_360=$o,M.clampN180_180=Hg,M.createEventsCallFunc=Su,M.createPropTreeFromSceneObject=Zv,M.cutDownTreesCallFunc=fm,M.defaultFlyInParam=Ty,M.defaultFlyToParam=oo,M.defaultInitSceneObjectOnCreatingFunc=Oy,M.defaultLight122FromEnvironmentMapManager=zf,M.defaultUpdateSceneObjectOnPickingFunc=Ay,M.destroyObject=Sg,M.downloadLink=Qm,M.equalsN3=Vf,M.geoAlong=fI,M.geoArea=Of,M.geoBuffer=Yv,M.geoCenterOfMass=dI,M.geoDestination=Wv,M.geoDifference=Jv,M.geoDistance=zl,M.geoHeading=yh,M.geoIntersect=Hv,M.geoLineIntersect=gI,M.geoNearestPointOnLine=vI,M.geoPointToLineDistance=mI,M.geoPolygonFromCircle=jv,M.geoPolygonOverlap=Df,M.geoRhumbDestination=yI,M.geoRhumbDistance=Xv,M.geoRhumbHeading=_I,M.geoUnion=Bv,M.getDefaultValue=Fy,M.getDistancesFromPositions=_h,M.getGeoBoundingSphereFromPositions=wI,M.getMidpoint=pI,M.getMinMaxCorner=Qv,M.getSceneObjectTreeItem=Dy,M.getXyzFromPostion=Lf,M.growthSimulationCallFunc=dm,M.hasSameTags=Xg,M.hasSameViewerTags=Qi,M.inOrderRunning=Gy,M.interval=Xm,M.isJSONString=Ry,M.lbhToWebMerc=WS,M.lbhToXyz=Ii,M.lerpAngle=qh,M.lerpRotation=_c,M.map=tm,M.nextAnimateFrame=xg,M.nextMicroTask=Ym,M.oneTimeWarning=Ng,M.optionsStr=zI,M.reactPosition2Ds=kf,M.registerCreatedEventUpdate=EI,M.registerEventCtor=Cg,M.registerEventUpdate=SI,M.removeAllTreesCallFunc=lm,M.rpToap=Ly,M.saveOnBrowser=jm,M.setSceneObjectTreeItem=zh,M.timeout=Hm,M.updateTreeParamsCallFunc=cm,M.webMercToLbh=XS,M.xyzToLbh=qp,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({},xbsj_base);
|
|
493
|
+
`,C2='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',P2='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Yo=class Yo extends ot{constructor(t){super();const e=()=>{const n=this.dv(new Yl);this.d(g.track([n,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{n.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(n),this.d(()=>t.delete(n)),n.instanceClass=class extends ot{constructor(o,a,u){super();d(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const v=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};v(),this.d(a.showChanged.don(v))}let h,l,c,f,p;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",h=document.createElement("div"),this._div.appendChild(h),h.style.width="auto",h.style.position="absolute",h.style.left="50%",h.style.top="50%",h.style.transform="translate(-50%,-50%)",h.style.background="rgba(120, 120, 0, 0.7)",h.style.color="white",h.style.fontSize="10px",h.style.background="none",h.style.display="flex",h.style.justifyContent="center",h.style.alignItems="center",l=document.createElement("div"),h.appendChild(l),l.style.pointerEvents="none",l.style.display="block",l.style.width="40px",l.innerHTML=Yo.defaultsSvg.loadingSvg,l.style.filter="drop-shadow(0px 0px 1px black)",c=document.createElement("div"),h.appendChild(c),c.style.pointerEvents="none",c.style.marginLeft="10px",c.style.display="flex",c.style.flexFlow="column",c.style.maxWidth="300px",f=document.createElement("div"),c.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",p=document.createElement("div"),c.appendChild(p),p.style.fontWeight="400",p.style.textShadow="0 0 2px black";{const v=()=>{let E="Raw";u.status==="Raw"?E="初始状态":u.status==="Creating"?E="正在创建":u.status==="Created"?E="创建完成":u.status==="Error"?E="创建失败":u.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${u.status})`,p.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(l.innerHTML=Yo.defaultsSvg.loadingSvg),u.status==="Created"&&(l.innerHTML=Yo.defaultsSvg.successSvg),u.status==="Error"&&(l.innerHTML=Yo.defaultsSvg.warnSvg)};v();const w=this.dv(g.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(w.don(v))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};d(Yo,"defaultsSvg",{loadingSvg:S2,successSvg:C2,warnSvg:P2});let cg=Yo;class I2 extends ot{constructor(t,e,n){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=n;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const l=o.zIndex??"";i.style.zIndex=l,s.style.zIndex=l};a(),this.d(o.zIndexChanged.don(a));const u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const h=()=>{i.style.opacity=`${o.opacity??1}`};h(),this.d(o.opacityChanged.don(h))}}function Kl(r){let t=g.getExtProp(r,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",r.appendChild(t),g.setExtProp(r,"_relativeContainer",t)),t}class M2 extends ot{constructor(e,n){super();d(this,"_subContainer",document.createElement("div"));d(this,"_overlayContainer",document.createElement("div"));d(this,"_containerStyleController");this._container=e,this._viewer=n,this._containerStyleController=this.dv(new I2(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),Kl(this._container).appendChild(i),this.d(()=>Kl(this._container).removeChild(i)),Kl(this._container).appendChild(s),this.d(()=>Kl(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class b2 extends ot{constructor(){super(...arguments);d(this,"registerObjsMap",new Map)}register(e,n){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,n),e}getViewerConstructor(e){const n=this.registerObjsMap.get(e);if(!n){console.warn(`未找到${e}类!`);return}return n}createViewer(e){const n=e.type;console.log(e);const i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(e)}}class Am extends ot{constructor(t,e,n=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(g.DomElementEvent.create(e,"pointerdown")),o=this.dv(g.DomElementEvent.create(e,"pointermove")),a=this.dv(g.DomElementEvent.create(e,"pointerup")),u=this.dv(g.DomElementEvent.create(e,"pointerout")),h=this.dv(g.DomElementEvent.create(e,"pointerover")),l=this.dv(new g.PointerClick),c=this.dv(new g.PointerHover),f=()=>{const m=this._viewer.hoverTime*1e3;c.delayTime=m};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(m=>l.pointerDown(m))),this.d(o.don(m=>l.pointerMove(m))),this.d(a.don(m=>l.pointerUp(m))),this.d(u.don(m=>l.pointerOut(m))),this.d(s.don(m=>c.pointerDown(m))),this.d(o.don(m=>c.pointerMove(m))),this.d(a.don(m=>c.pointerUp(m))),this.d(u.don(m=>c.pointerOut(m)));const{x:p,y:v}=e.getBoundingClientRect(),w=i?p:0,E=i?v:0;this.d(c.hoverEvent.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.hoverEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(l.clickEvent.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.clickEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(l.dbclickEvent.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);m.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(s.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);m.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(a.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);m.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(o.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.pointerMoveEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(h.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.pointerOverEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})})),this.d(u.don(m=>{const[S,C]=g.getDomEventCurrentTargetPos(m,n);this._viewer.pointerOutEvent.emit({screenPosition:[S+w,C+E],pointerEvent:m})}));const I=this.dv(g.DomElementEvent.create(e,"keydown"));this.d(I.don(m=>this._viewer.keyDownEvent.emit(m)));const y=this.dv(g.DomElementEvent.create(e,"keyup"));this.d(y.don(m=>this._viewer.keyUpEvent.emit(m)));const _=this.dv(g.DomElementEvent.create(e,"wheel"));this.d(_.don(m=>this._viewer.wheelEvent.emit(m)))}}class N2 extends ot{constructor(e){super();d(this,"viewer");const n=this.viewer=e;this.ad(new g.ObjResettingWithEvent(n.rollerShutterChanged,()=>{const i=n.container;if(!i||!n.rollerShutter)return;const s=new ot;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const n=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",n)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",n)}),e}}class x2 extends ot{constructor(e){super();d(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new N2(e))}}const _s=class _s extends ot{constructor(e){super();d(this,"_forceRecreateEvent",this.dv(new X));d(this,"_container",this.dv(g.react(void 0)));d(this,"_containerSize",this.dv(g.react(void 0)));d(this,"_editingEvent",this.disposeVar(new X));d(this,"_status",this.dv(g.react("Raw")));d(this,"_statusLog",this.dv(g.react("")));d(this,"_statusContainer",this.dv(new cg(this)));d(this,"_useCustomInteraction",this.dv(g.react(!0)));d(this,"_resetInteractionEvent",this.dv(g.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));d(this,"_interactionResetting",this.dv(new g.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Am(this,this.container)})));d(this,"_viewerChanged",this.dv(new X));d(this,"_cameraChanged",this.dv(new X));d(this,"_containerResetEvent",this.dv(g.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));d(this,"_containerResetting",this.dv(new g.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new M2(this.container,this)})));d(this,"_sceneObjectsMap",new Map);d(this,"_id");d(this,"_typeName");d(this,"_updateFuncReact",this.dv(g.react(void 0)));d(this,"_toDestroyFuncReact",this.dv(g.react(void 0)));d(this,"_statusInfo",_s.defaults.statusInfo);d(this,"_navigationMode",this.dv(g.react("Map")));d(this,"_syncViewer",this.dv(g.react(void 0)));d(this,"_syncEventDon",this.dv(new g.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new E2(this,e)})));d(this,"_timeSyncdon",this.dv(new g.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new w2(this)})));d(this,"_hoverEvent",this.dv(new X));d(this,"_pointerOverEvent",this.dv(new X));d(this,"_pointerMoveEvent",this.dv(new X));d(this,"_pointerDownEvent",this.dv(new X));d(this,"_pointerUpEvent",this.dv(new X));d(this,"_pointerOutEvent",this.dv(new X));d(this,"_clickEvent",this.dv(new X));d(this,"_dblclickEvent",this.dv(new X));d(this,"_keyDownEvent",this.dv(new X));d(this,"_keyUpEvent",this.dv(new X));d(this,"_wheelEvent",this.dv(new X));d(this,"_actived",this.dv(g.react(!1)));this._id=e.id??g.createGuid();const n=bm(e.container);if(n)this._container.value=lg(n),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const h=io.context.createEngineObject(a,this);h&&i.set(a,h)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||g.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new x2(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const n=document.getElementById(e);n&&n instanceof HTMLDivElement?this._container.value=lg(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=lg(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let n of e)if(!this.has(n)){ft.context.addSceneObject(n);const i=io.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...e){for(let n of e)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),ft.context.deleteSceneObject(n),this._sceneObjectsMap.delete(n),n.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return _s.createDefaultProps()}_getJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof g.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof g.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(n){console.warn(`时间格式不正确! value: ${e} error: ${n}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}getProperties(e){const n={...this.getESProperties()},i=[];return n.general.length>0&&i.push(new vt(n.general,"general")),Object.keys(n).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&n[s].length>0&&i.push(new vt(n[s],s))}),i}};d(_s,"context",new b2),d(_s,"register",_s.context.register.bind(_s.context)),d(_s,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0]});let gi=_s;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:g.reactJson(void 0),devTags:g.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),r.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:g.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:g.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:g.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:g.react(void 0),rollerShutter:!1,cameraMovableRegion:g.reactArrayWithUndefined(void 0)}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(gi||(gi={})),g.extendClassProps(gi.prototype,gi.createDefaultProps);function Om(r,t){const e=r._lastCameraInfo;if(e){const n=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),r._lastCameraInfo=void 0,n()})}}const T2=r=>{const t=gi.createCommonProps(),e={};try{Object.keys(t).forEach(n=>{e[n]=r[n]})}catch(n){console.warn(n)}return e},Dm=(r,t)=>{const e=gi.createCommonProps();try{Object.keys(e).forEach(n=>{r[n]=t[n]})}catch(n){console.warn(n)}};class A2 extends ot{constructor(e){super();d(this,"_viewersChanged",this.disposeVar(new X));d(this,"_viewers",new Set);d(this,"_viewersToChange",this.dv(new X));this._sceneObjectsManager=e,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{Qi(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),n.forEach(o=>{Qi(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,Qi(o.devTags,s.devTags)),Qi(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)Qi(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),n.forEach(o=>{for(let a of s)Qi(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,Qi(o.devTags,u.devTags)),Qi(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const n=gi.context.createViewer(e);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Js extends ot{constructor(...e){super();d(this,"_drgm",this.dv(new Xg));d(this,"_sobjm",this.dv(new _2));d(this,"_vrm",this.dv(new A2(this._sobjm)));d(this,"_sceneObjectEditingManager",this.disposeVar(new y2));d(this,"_activeViewer",this.dv(g.react(void 0)));d(this,"_syncOtherViewersToActived",this.dv(g.react(!1)));d(this,"_cmrvm",this.createSceneObjectFromClass(Hl));d(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));d(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});d(this,"_sceneTree",this.dv(new wh("default",this.dragstartDataMananger,24,this)));d(this,"_propUiTreeManager",this.dv(new Va(24)));d(this,"_sceneTreeMap",new Map);d(this,"_viewerCreatedEvent",this.dv(new X));d(this,"_lastCameraInfo");d(this,"_lastActiveViewerJson");d(this,"_syncEventDonFunc",this.d(Su([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(n=>{e?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));d(this,"_player",this.createSceneObjectFromClass(Mh));d(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));d(this,"_esPlyarAndPathTime",this.dv(new f2(this)));d(this,"_pathAnimationManager",this.dv(new g2(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.values().forEach(n=>n.actived=n===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var c;const e=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:n,name:i},a=this.sceneTree.json,u=this._cmrvm.views,h=[...this._vrm.viewers].map(f=>f.json),l=(c=this.activeViewer)==null?void 0:c.getCurrentCameraInfo();return{asset:o,viewers:h,sceneTree:a,viewCollection:u,lastView:l}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(n=>{const i=e.viewers.find(s=>s.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return p2(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,n=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new wh(e,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const n=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,n=!0,i=!0,s=!0){var h;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?T2(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(l=>l.id===o):[...this.getViewers()].find(l=>l.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),n&&Om(this,a),i&&this._lastActiveViewerJson&&(Dm(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===bm(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),n&&Om(this,u),i&&this._lastActiveViewerJson&&(Dm(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const n={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:h,app:l,token:c,viewSync:f,attributeSync:p,destroy:v,id:w}=e[0];n={type:"ESUeViewer",container:u,id:w,options:{uri:h,app:l,token:c}},i={viewSync:f??!0,attributeSync:p??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:h,esmsg:l,viewSync:c,attributeSync:f,id:p,destroy:v}=e[0];n={type:"ESUeViewer",container:u,id:p,options:{ws:h,esmsg:l}},i={viewSync:c??!0,attributeSync:f??!0,destroy:v??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:h,baseUrl:l,viewSync:c,attributeSync:f,id:p,destroy:v}=e[0];n={type:"ESUeViewer",container:u,id:p,options:{project:h,baseUrl:l}},i={viewSync:c??!0,attributeSync:f??!0,destroy:v??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(n={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(n={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(n={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!n)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(n,s,o,a)}createCesiumViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createOpenLayersViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?n={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(e,n){return this._sobjm.createSceneObject(e,n)}createSceneObjectFromClass(e,n){return this._sobjm.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const n=this._sobjm.deleteSceneObject(e);return e.destroy(),n}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let n of e)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}return d(Js,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),d(Js,"getEnv",ft.context.getEnv.bind(ft.context)),d(Js,"setEnv",ft.context.setEnv.bind(ft.context)),(r=>{r.createDefaultProps=()=>({})})(Js||(Js={})),g.extendClassProps(Js.prototype,Js.createDefaultProps),M.BasePropTreeItem=Gf,M.Boolean2Property=cy,M.Boolean2sProperty=gy,M.Boolean3Property=fy,M.Boolean3sProperty=py,M.Boolean4Property=dy,M.Boolean4sProperty=vy,M.BooleanProperty=Z,M.BooleansProperty=ny,M.ColorProperty=Gt,M.ColorRgbProperty=_y,M.DashPatternProperty=wy,M.DateProperty=so,M.DatesProperty=Ug,M.Destroyable=ot,M.DoublyLinkedList=Ng,M.DragStartDataManager=Xg,M.ES3DTileset=kn,M.ESAlarm=Hf,M.ESApertureEffect=Bf,M.ESAreaMeasurement=Yf,M.ESBlastParticleSystem=Jf,M.ESBoxClipping=jf,M.ESCameraView=Wl,M.ESCameraViewCollection=Hl,M.ESCameraVisibleRange=Qf,M.ESCar=Kf,M.ESCityBasePoint=tg,M.ESClassification=Bl,M.ESClippingPlane=$f,M.ESCustomDiv=Yl,M.ESCzml=eg,M.ESDataMesh=Zf,M.ESDatasmithRuntimeModel=Fd,M.ESDirectionMeasurement=Pd,M.ESDistanceMeasurement=td,M.ESDynamicWater=Gd,M.ESEntityCluster=$d,M.ESExcavate=Eh,M.ESFireParticleSystem=ed,M.ESForestTileset=rd,M.ESGaussianSplatting=sg,M.ESGeoDiv=nd,M.ESGeoDivTextPoi=Zd,M.ESGeoExtrudedPolygon=Ph,M.ESGeoJson=Id,M.ESGeoLineString=Bs,M.ESGeoPoints=hg,M.ESGeoPolygon=oe,M.ESGeoRectangle=id,M.ESGeoVector=Rt,M.ESGeoWater=kd,M.ESGltfModel=od,M.ESHeatMap=ug,M.ESHeightLimitAnalysis=Kd,M.ESHeightMeasurement=Md,M.ESHole=Xd,M.ESHuman=za,M.ESHumanPoi=Wd,M.ESImageLabel=ad,M.ESImageryLayer=ud,M.ESJEditingMode=ct,M.ESJLonLatFormat=zg,M.ESJPickedResult=Ny,M.ESLabel=gn,M.ESLevelRuntimeModel=Vd,M.ESLocalCircle=bd,M.ESLocalPolygon=Ch,M.ESLocalPolygonZ=Nd,M.ESLocalRectangle=xd,M.ESLocalSkyBox=hd,M.ESLocalVector=Ua,M.ESLocalVector2D=ds,M.ESLocationMeasurement=ld,M.ESMsTileset=Jd,M.ESNavigator=rg,M.ESObjectWithLocation=dt,M.ESObjectsManager=Js,M.ESParticleSystemPrimitive=cd,M.ESPath=bh,M.ESPathImpl=Ys,M.ESPipeFence=Td,M.ESPipeline=Ud,M.ESPipeserTileset=Ad,M.ESPit=qa,M.ESPlayer=Mh,M.ESPoi2D=Sh,M.ESPoi3D=fd,M.ESPoiTileset=jd,M.ESPolygonFence=Od,M.ESPolygonFlattenedPlane=dd,M.ESPolygonWithHole=Ld,M.ESRectangle=Dd,M.ESRtsFeatureEditing=Yd,M.ESRtsTileset=Bd,M.ESScale=Qd,M.ESSceneObject=ft,M.ESSceneObjectWithId=Wy,M.ESSeparateFoliage=gd,M.ESSkylineAnalysis=ag,M.ESStaticMesh=og,M.ESSubmergingAnalysis=pd,M.ESSunshineAnalysis=vd,M.ESSurfaceAreaMeasurement=Rd,M.ESTerrainLayer=md,M.ESTestObject=Xf,M.ESTextLabel=yd,M.ESUEWidget=_d,M.ESUnrealActor=wd,M.ESVideoFusion=Ed,M.ESViewShed=Sd,M.ESViewer=gi,M.ESViewerStatusBar=ng,M.ESViewerStatusBarScale=ig,M.ESVisibilityAnalysis=zd,M.ESVisualObject=ne,M.ESVolumeMeasurement=qd,M.ESWidget=Cd,M.EngineObject=io,M.EnumProperty=Tt,M.EnumStringsProperty=Ey,M.EvalStringProperty=Es,M.Event=X,M.EventListenerHandler=vc,M.FunctionProperty=mt,M.GroupPropTreeItem=Vf,M.GroupProperty=vt,M.JsonProperty=lt,M.LeafPropTreeItem=kf,M.ListenerPipe=pc,M.LongStringProperty=_c,M.MaximumScreenSpaceErrorProperty=ey,M.MinmaxProperty=Sy,M.NearFarScalerProperty=Cy,M.NextAnimateFrameEvent=Og,M.NonreactiveJsonStringProperty=Gg,M.Number2Property=ze,M.Number2sProperty=Rg,M.Number3Property=cr,M.Number3sProperty=yc,M.Number4Property=Yn,M.Number4WithUndefinedProperty=hy,M.Number4sProperty=ly,M.NumberProperty=L,M.NumberRangeProperty=Py,M.NumberSliderProperty=Be,M.NumbersProperty=ry,M.ObjPool=fc,M.ObservableSet=Uh,M.ParamsProperty=Fg,M.PickedInfo=by,M.Player=Jn,M.PlayerProperty=zh,M.PositionProperty=Ko,M.PositionsProperty=kg,M.PositionsSetPropety=My,M.PropTree=tm,M.PropUiTreeManager=Va,M.Property=ws,M.ReactVarProperty=Ot,M.RotationProperty=wc,M.SceneObjectFromId=Sc,M.SceneTree=wh,M.SceneTreeContextMenu=om,M.SceneTreeItem=Er,M.SceneTreeItemDragDrop=sm,M.SmartListenerHandler=Eu,M.SmartListenerPipe=Hm,M.SmoothMoveController=RI,M.String2Property=iy,M.String2sProperty=Lg,M.String3Property=sy,M.String3sProperty=ay,M.String4Property=oy,M.String4sProperty=uy,M.StringNumberProperty=my,M.StringNumbersProperty=yy,M.StringProperty=Et,M.StringsProperty=Dg,M.TreeItemDragDrop=Hg,M.UriProperty=Cu,M.ViewPlayerProperty=Vg,M.ViewerCustomInteraction=Am,M.Watcher=Pu,M.WatcherTools=jg,M.WithUndefinedProperty=mc,M.addTreesCallFunc=cm,M.animateFrame=Jm,M.bindCustomEditing=Jg,M.booleanPointInPolygon=dI,M.cartesianDistance=Zv,M.clamp0_360=$o,M.clampN180_180=Yg,M.createEventsCallFunc=Su,M.createPropTreeFromSceneObject=em,M.cutDownTreesCallFunc=gm,M.defaultFlyInParam=Oy,M.defaultFlyToParam=oo,M.defaultInitSceneObjectOnCreatingFunc=Ly,M.defaultLight122FromEnvironmentMapManager=Wf,M.defaultUpdateSceneObjectOnPickingFunc=Dy,M.destroyObject=Pg,M.downloadLink=$m,M.equalsN3=zf,M.geoAlong=gI,M.geoArea=Lf,M.geoBuffer=jv,M.geoCenterOfMass=pI,M.geoDestination=Hv,M.geoDifference=Qv,M.geoDistance=ql,M.geoHeading=yh,M.geoIntersect=Yv,M.geoLineIntersect=vI,M.geoNearestPointOnLine=yI,M.geoPointToLineDistance=_I,M.geoPolygonFromCircle=Kv,M.geoPolygonOverlap=Rf,M.geoRhumbDestination=wI,M.geoRhumbDistance=Bv,M.geoRhumbHeading=EI,M.geoUnion=Jv,M.getDefaultValue=ky,M.getDistancesFromPositions=_h,M.getGeoBoundingSphereFromPositions=SI,M.getMidpoint=mI,M.getMinMaxCorner=$v,M.getSceneObjectTreeItem=Ry,M.getXyzFromPostion=Ff,M.growthSimulationCallFunc=pm,M.hasSameTags=Bg,M.hasSameViewerTags=Qi,M.inOrderRunning=Vy,M.interval=Bm,M.isJSONString=Gy,M.lbhToWebMerc=HS,M.lbhToXyz=Ii,M.lerpAngle=Wh,M.lerpRotation=Ec,M.map=rm,M.nextAnimateFrame=Ag,M.nextMicroTask=jm,M.oneTimeWarning=Tg,M.optionsStr=WI,M.reactPosition2Ds=Uf,M.registerCreatedEventUpdate=CI,M.registerEventCtor=Ig,M.registerEventUpdate=PI,M.removeAllTreesCallFunc=fm,M.rpToap=Fy,M.saveOnBrowser=Km,M.setSceneObjectTreeItem=qh,M.timeout=Ym,M.updateTreeParamsCallFunc=dm,M.webMercToLbh=BS,M.xyzToLbh=Xp,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({},xbsj_base);
|