(function(Xt,me){typeof exports=="object"&&typeof module<"u"?me(exports):typeof define=="function"&&define.amd?define(["exports"],me):(Xt=typeof globalThis<"u"?globalThis:Xt||self,me(Xt.TujuMap={}))})(this,function(Xt){"use strict";var wm=Object.defineProperty;var Am=(Xt,me,ri)=>me in Xt?wm(Xt,me,{enumerable:!0,configurable:!0,writable:!0,value:ri}):Xt[me]=ri;var rt=(Xt,me,ri)=>(Am(Xt,typeof me!="symbol"?me+"":me,ri),ri);var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}function gc(p){if(p.__esModule)return p;var c=p.default;if(typeof c=="function"){var f=function A(){if(this instanceof A){var M=[null];M.push.apply(M,arguments);var C=Function.bind.apply(c,M);return new C}return c.apply(this,arguments)};f.prototype=c.prototype}else f={};return Object.defineProperty(f,"__esModule",{value:!0}),Object.keys(p).forEach(function(A){var M=Object.getOwnPropertyDescriptor(p,A);Object.defineProperty(f,A,M.get?M:{enumerable:!0,get:function(){return p[A]}})}),f}var Fe={},vc={get exports(){return Fe},set exports(p){Fe=p}};(function(p,c){(function(f,A){A(c)})(me,function(f){function A(r){this.options=r||{},this.paneName=this.options.paneName||"labelPane",this.zIndex=this.options.zIndex||1,this._map=r.map,this._lastDrawTime=null,this.show()}function M(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function C(r,i){return i={exports:{}},r(i,i.exports),i.exports}function D(r,i){return function(t){return i(r(t))}}function W(r){var i=function(t){return t==null?t:(1"u"?"undefined":Je(e))==="object")for(var a=e.length,n=0;n"u")this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(r instanceof V)this.model=r.model,this.color=r.color.slice(),this.valpha=r.valpha;else if(typeof r=="string"){if(i=wn.get(r),i===null)throw Error("Unable to parse color from string: "+r);this.model=i.model;var t=er[this.model].channels;this.color=i.value.slice(0,t),this.valpha=typeof i.value[t]=="number"?i.value[t]:1}else if(r.length)this.model=i||"rgb",t=er[this.model].channels,i=Ms.call(r,0,t),this.color=nt(i,t),this.valpha=typeof r[t]=="number"?r[t]:1;else if(typeof r=="number")r&=16777215,this.model="rgb",this.color=[r>>16&255,r>>8&255,r&255],this.valpha=1;else{if(this.valpha=1,i=Te(r),"alpha"in r&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof r.alpha=="number"?r.alpha:0),i=i.sort().join(""),!(i in Es))throw Error("Unable to parse color from object: "+yn(r));this.model=Es[i],t=er[this.model].labels;var e=[];for(i=0;iMath.abs(r-i)}function H(r){var i=r[0],t=r[r.length-1];return Math.sqrt(Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2)+Math.pow((i[2]||0)-(t[2]||0),2))<(1r.windowBits&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new lf,this.strm.avail_out=0;var i=bn.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(i!==Wo)throw Error(vi[i]);if(r.header&&bn.deflateSetHeader(this.strm,r.header),r.dictionary){if(r=typeof r.dictionary=="string"?On.string2buf(r.dictionary):hf.call(r.dictionary)==="[object ArrayBuffer]"?new Uint8Array(r.dictionary):r.dictionary,i=bn.deflateSetDictionary(this.strm,r),i!==Wo)throw Error(vi[i]);this._dict_set=!0}}function zt(r,i){if(i=new St(i),i.push(r,!0),i.err)throw i.msg||vi[i.err];return i.result}function Vt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.total=this.check=this.dmax=this.flags=0,this.head=null,this.wnext=this.whave=this.wsize=this.wbits=0,this.window=null,this.extra=this.offset=this.length=this.bits=this.hold=0,this.distcode=this.lencode=null,this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.distdyn=this.lendyn=null,this.was=this.back=this.sane=0}function wt(r){var i=this.options=Ho.assign({chunkSize:65536,windowBits:15,to:""},r||{});if(i.raw&&0<=i.windowBits&&16>i.windowBits&&(i.windowBits=-i.windowBits,i.windowBits===0&&(i.windowBits=-15)),!(0<=i.windowBits&&16>i.windowBits)||r&&r.windowBits||(i.windowBits+=32),15i.windowBits&&!(i.windowBits&15)&&(i.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new lf,this.strm.avail_out=0,r=Ir.inflateInit2(this.strm,i.windowBits),r!==Bn||(this.header=new Pv,Ir.inflateGetHeader(this.strm,this.header),i.dictionary&&(typeof i.dictionary=="string"?i.dictionary=On.string2buf(i.dictionary):wf.call(i.dictionary)==="[object ArrayBuffer]"&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(r=Ir.inflateSetDictionary(this.strm,i.dictionary),r!==Bn))))throw Error(vi[r])}function Jt(r,i){if(i=new wt(i),i.push(r),i.err)throw i.msg||vi[i.err];return i.result}function Kt(r,i){for(var t=["webgl2","experimental-webgl2","webgl","experimental-webgl"],e=void 0,a=0;a"u"?"undefined":Je(i))==="object")i=ue(r,i,e,a),t(i.texture,null,i.data);else{var n=new Image;n.crossOrigin="anonymous",n.onload=function(){var s=N(n.width),o=N(n.height),u=document.createElement("canvas");u.width=s,u.height=o;var g=u.getContext("2d");g.drawImage(n,0,0,s,o),n=u,u=ue(r,n,e,a).texture,t(u,n,{width:s,height:o,data:g.getImageData(0,0,s,o),type:"RGBA"})},n.src=i}}function ee(r,i){if(i instanceof Array){var t={zero:r.ZERO,one:r.ONE,src_color:r.SRC_COLOR,one_minus_src_color:r.ONE_MINUS_SRC_COLOR,dst_color:r.DST_COLOR,one_minus_dst_color:r.ONE_MINUS_DST_COLOR,src_alpha:r.SRC_ALPHA,one_minus_src_alpha:r.ONE_MINUS_SRC_ALPHA,dst_alpha:r.DST_ALPHA,one_minus_dst_alpha:r.ONE_MINUS_DST_ALPHA,constant_color:r.CONSTANT_COLOR,one_minus_constant_color:r.ONE_MINUS_CONSTANT_COLOR,constant_alpha:r.CONSTANT_ALPHA,one_minus_constant_alpha:r.ONE_MINUS_CONSTANT_ALPHA,src_alpha_saturate:r.SRC_ALPHA_SATURATE};return i.map(function(e){return t[e]})}switch(i){case"default":return Uh?[r.SRC_ALPHA,r.ZERO,r.ONE,r.ZERO]:[r.ONE,r.ZERO];case"deeper":return[r.ONE,r.ONE_MINUS_SRC_ALPHA];case"normal":return[r.SRC_ALPHA,r.ONE];case"lighter":return[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA];default:return[r.ONE,r.ZERO]}}function qt(r,i){var t=2=r.length-i.length&&t.length===2&&(s.fillStyle=e||"#ccc",e=(t[0]-n)/(o-n),e=Math.floor(256*e),s.fillRect(0,0,e,a),e=(t[1]-n)/(o-n),e=Math.floor(256*e),s.fillRect(e,0,255,a)),{data:new Uint8Array(new Uint8ClampedArray(s.getImageData(0,0,256,a).data)),width:256,height:a}}function Gt(r,i,t){t=t||2;var e=i&&i.length,a=e?i[0]*t:r.length,n=Xe(r,0,a,t,!0),s=[];if(!n||n.next===n.prev)return s;var o;if(e){var u=t;e=[];var g,_=0;for(g=i.length;_80*t){var m=o=r[0],v=e=r[1];for(u=t;uo&&(o=_),i>e&&(e=i);o=Math.max(o-m,e-v),o=o!==0?1/o:0}return $e(n,s,t,m,v,o),s}function Xe(r,i,t,e,a){if(a===0=i;a-=e)n=Gl(a,r[a],r[a+1],n);return n&&po(n,n.next)&&(sn(n),n=n.next),n}function pe(r,i){if(!r)return r;i||(i=r);do{var t=!1;if(r.steiner||!po(r,r.next)&&ge(r.prev,r,r.next)!==0)r=r.next;else{if(sn(r),r=i=r.prev,r===r.next)break;t=!0}}while(t||r!==i);return i}function $e(r,i,t,e,a,n,s){if(r){if(!s&&n){var o=r,u=o;do u.z===null&&(u.z=on(u.x,u.y,e,a,n)),u.prevZ=u.prev,u=u.nextZ=u.next;while(u!==o);u.prevZ.nextZ=null,u.prevZ=null,o=u;var g,_,l,d,m=1;do{u=o;var v=o=null;for(_=0;u;){_++;var T=u;for(g=l=0;gm!=v.next.y>m&&v.next.y!==v.y&&l<(v.next.x-v.x)*(m-v.y)/(v.next.y-v.y)+v.x&&(_=!_),v=v.next;while(v!==u);v=_}v=v&&(ge(u.prev,u,T.prev)||ge(u,T.prev,T))||po(u,T)&&0r.x?a.x>n.x?a.x:n.x:r.x>n.x?r.x:n.x,o=a.y>r.y?a.y>n.y?a.y:n.y:r.y>n.y?r.y:n.y,u=on(a.x=u&&e&&e.z<=i;){if(t!==r.prev&&t!==r.next&&Di(a.x,a.y,r.x,r.y,n.x,n.y,t.x,t.y)&&0<=ge(t.prev,t,t.next)||(t=t.prevZ,e!==r.prev&&e!==r.next&&Di(a.x,a.y,r.x,r.y,n.x,n.y,e.x,e.y)&&0<=ge(e.prev,e,e.next)))return!1;e=e.nextZ}for(;t&&t.z>=u;){if(t!==r.prev&&t!==r.next&&Di(a.x,a.y,r.x,r.y,n.x,n.y,t.x,t.y)&&0<=ge(t.prev,t,t.next))return!1;t=t.prevZ}for(;e&&e.z<=i;){if(e!==r.prev&&e!==r.next&&Di(a.x,a.y,r.x,r.y,n.x,n.y,e.x,e.y)&&0<=ge(e.prev,e,e.next))return!1;e=e.nextZ}return!0}function nr(r,i){return r.x-i.x}function si(r,i){var t=i,e=r.x,a=r.y,n=-1/0;do{if(a<=t.y&&a>=t.next.y&&t.next.y!==t.y){var s=t.x+(a-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(s<=e&&s>n){if(n=s,s===e){if(a===t.y)return t;if(a===t.next.y)return t.next}var o=t.x=t.x&&t.x>=s&&e!==t.x&&Di(ao.x)&&(l=t.x===o.x)){l=o;var d=t;l=0>ge(l.prev,l,d.prev)&&0>ge(d.next,l,l.next)}l&&(o=t,g=_)}t=t.next}while(t!==i);return o}function on(r,i,t,e,a){return r=32767*(r-t)*a,i=32767*(i-e)*a,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,(r|r<<1)&1431655765|((i|i<<1)&1431655765)<<1}function Sp(r){var i=r,t=r;do(i.x=Math.min(r.x,t.x)&&i.y<=Math.max(r.y,t.y)&&i.y>=Math.min(r.y,t.y)}function vo(r){return 0r?-1:0}function an(r,i){return 0>ge(r.prev,r,r.next)?0<=ge(r,i,r.next)&&0<=ge(r,r.prev,i):0>ge(r,i,r.prev)||0>ge(r,r.next,i)}function jl(r,i){var t=new es(r.i,r.x,r.y),e=new es(i.i,i.x,i.y),a=r.next,n=i.prev;return r.next=i,i.prev=r,t.next=a,a.prev=t,e.next=t,t.prev=e,n.next=e,e.prev=n,e}function Gl(r,i,t,e){return r=new es(r,i,t),e?(r.next=e.next,r.prev=e,e.next.prev=r,e.next=r):(r.prev=r,r.next=r),r}function sn(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function es(r,i,t){this.i=r,this.x=i,this.y=t,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function rs(r,i,t,e){for(var a=0,n=t-e;im.w||l.h>m.h)){if(l.x=m.x,l.y=m.y,a=Math.max(a,l.y+l.h),e=Math.max(e,l.x+l.w),l.w===m.w&&l.h===m.h){var v=t.pop();di?0:i>t?t:i:il*l+d*d&&(m=L+(_&1?1:-1)/2,_=E)}v=m+"-"+_,(T=e[v])?(T.count+=r[g].count||1,u=Math.max(u,T.count)):(e[v]={center:{x:(m+(_&1)/2)*i,y:_*o},count:r[g].count||1},a.push(e[v]))}}return a.max=u,a.r=s,a}function Dp(r,i,t,e){switch(e){case 5122:return new Int16Array(r,i,t);case 5123:return new Uint16Array(r,i,t);case 5124:return new Int32Array(r,i,t);case 5125:return new Uint32Array(r,i,t);case 5126:return new Float32Array(r,i,t);default:return null}}function xo(r){return Dp(r.bufferView.data,r.byteOffset,r.count*fu[r.type],r.componentType)}function Bp(r){var i="",t=r.lastIndexOf("/");return t!==-1&&(i=r.substring(0,t+1)),i}function Fp(r,i){var t=new XMLHttpRequest;t.overrideMimeType("application/json"),t.open("GET",r,!0),t.onreadystatechange=function(){t.readyState==4&&t.status=="200"&&i(t.responseText,this)},t.send(null)}function Ip(r,i){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.open("GET",r,!0),t.onreadystatechange=function(){if(t.readyState==4&&t.status=="200"){var e=t.response;e&&i&&i(e)}},t.send(null)}function kp(r,i,t){var e=new Image;e.crossOrigin="Anonymous",e.src=r,e.onload=function(){t(e,i)}}function zp(r){function i(et,vt){t.uniform1i(et,vt.index),t.activeTexture(t.TEXTURE0+vt.index),et=k.glTF.textures[vt.index],t.bindTexture(t.TEXTURE_2D,et.texture),t.bindSampler(vt.index,et.sampler?et.sampler.sampler:s)}var t=r.gl,e=0,a=[];r=t.canvas;var n=function(et,vt,It){for(this.glTFScene=et,this.glTF=vt,this.id=It,this.rootTransform=Mt.create(),this.nodeMatrix=Array(vt.nodes.length),et=0,vt=this.nodeMatrix.length;ete?Yp(e+a,0):Zp(e,a),r&&t!=t){for(;a>e;)if(t=i[e++],t!=t)return!0}else for(;a>e;e++)if((r||e in i)&&i[e]===t)return r||e||0;return!r&&-1}}(!1),qp=as("IE_PROTO"),eh=function(r,i){r=Ar(r);var t=0,e=[],a;for(a in r)a!=qp&&oe(r,a)&&e.push(a);for(;i.length>t;)oe(r,a=i[t++])&&(~Kp(e,a)||e.push(a));return e},Ao="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Bi=Object.keys||function(r){return eh(r,Ao)},hi=function(r){if(typeof r!="function")throw TypeError(r+" is not a function!");return r},be=function(r,i,t){if(hi(r),i===void 0)return r;switch(t){case 1:return function(e){return r.call(i,e)};case 2:return function(e,a){return r.call(i,e,a)};case 3:return function(e,a,n){return r.call(i,e,a,n)}}return function(){return r.apply(i,arguments)}},ze=function(r){return typeof r=="object"?r!==null:typeof r=="function"},Ue=function(r){if(!ze(r))throw TypeError(r+" is not an object!");return r},Wr=function(r){try{return!!r()}catch{return!0}},ar=!Wr(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),Fi=Zt.document,To=ze(Fi)&&ze(Fi.createElement),rh=!ar&&!Wr(function(){return Object.defineProperty(To?Fi.createElement("div"):{},"a",{get:function(){return 7}}).a!=7}),ln=function(r,i){if(!ze(r))return r;var t,e;if(i&&typeof(t=r.toString)=="function"&&!ze(e=t.call(r))||typeof(t=r.valueOf)=="function"&&!ze(e=t.call(r))||!i&&typeof(t=r.toString)=="function"&&!ze(e=t.call(r)))return e;throw TypeError("Can't convert object to primitive value")},$p=Object.defineProperty,tr={f:ar?Object.defineProperty:function(r,i,t){if(Ue(r),i=ln(i,!0),Ue(t),rh)try{return $p(r,i,t)}catch{}if("get"in t||"set"in t)throw TypeError("Accessors not supported!");return"value"in t&&(r[i]=t.value),r}},Vr=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}},Or=ar?function(r,i,t){return tr.f(r,i,Vr(1,t))}:function(r,i,t){return r[i]=t,r},Ne=function(r,i,t){var e=r&Ne.F,a=r&Ne.G,n=r&Ne.S,s=r&Ne.P,o=r&Ne.B,u=r&Ne.W,g=a?ie:ie[i]||(ie[i]={}),_=g.prototype;n=a?Zt:n?Zt[i]:(Zt[i]||{}).prototype;var l;a&&(t=i);for(l in t)if(i=!e&&n&&n[l]!==void 0,!i||!oe(g,l)){var d=i?n[l]:t[l];g[l]=a&&typeof n[l]!="function"?t[l]:o&&i?be(d,Zt):u&&n[l]==d?function(m){var v=function(T,L,E){if(this instanceof m){switch(arguments.length){case 0:return new m;case 1:return new m(T);case 2:return new m(T,L)}return new m(T,L,E)}return m.apply(this,arguments)};return v.prototype=m.prototype,v}(d):s&&typeof d=="function"?be(Function.call,d):d,s&&((g.virtual||(g.virtual={}))[l]=d,r&Ne.R&&_&&!_[l]&&Or(_,l,d))}};Ne.F=1,Ne.G=2,Ne.S=4,Ne.P=8,Ne.B=16,Ne.W=32,Ne.U=64,Ne.R=128;var bt=Ne,Mo=function(r,i){var t=(ie.Object||{})[r]||Object[r],e={};e[r]=i(t),bt(bt.S+bt.F*Wr(function(){t(1)}),"Object",e)};Mo("keys",function(){return function(r){return Bi(Object(Hr(r)))}});var tg=ie.Object.keys,eg=C(function(r){r.exports={default:tg,__esModule:!0}}),Te=M(eg),ss=Object.getOwnPropertySymbols,Eo={}.propertyIsEnumerable,Lo=Object.assign,rg=!Lo||Wr(function(){var r={},i={},t=Symbol();return r[t]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),Lo({},r)[t]!=7||Object.keys(Lo({},i)).join("")!="abcdefghijklmnopqrst"})?function(r,i){for(var t=Object(Hr(r)),e=arguments.length,a=1,n=ss,s=Eo;e>a;)for(var o=ns(arguments[a++]),u=n?Bi(o).concat(n(o)):Bi(o),g=u.length,_=0,l;g>_;)s.call(o,l=u[_++])&&(t[l]=o[l]);return t}:Lo;bt(bt.S+bt.F,"Object",{assign:rg});var ig=ie.Object.assign,ng=C(function(r){r.exports={default:ig,__esModule:!0}}),Nt=M(ng),ih=as("IE_PROTO"),og=Object.prototype,nh=Object.getPrototypeOf||function(r){return r=Object(Hr(r)),oe(r,ih)?r[ih]:typeof r.constructor=="function"&&r instanceof r.constructor?r.constructor.prototype:r instanceof Object?og:null};Mo("getPrototypeOf",function(){return function(r){return nh(Object(Hr(r)))}});var ag=ie.Object.getPrototypeOf,hn=C(function(r){r.exports={default:ag,__esModule:!0}}),Ct=M(hn);bt(bt.S+bt.F*!ar,"Object",{defineProperty:tr.f});var sg=ie.Object,ug=function(r,i,t){return sg.defineProperty(r,i,t)},Dr=C(function(r){r.exports={default:ug,__esModule:!0}}),Me=M(Dr),lg=C(function(r,i){i.__esModule=!0;var t=Dr&&Dr.__esModule?Dr:{default:Dr};i.default=function(){function e(a,n){for(var s=0;sa;)tr.f(r,n=t[a++],i[n]);return r},oh=Zt.document,us=oh&&oh.documentElement,fg=as("IE_PROTO"),ls=function(){},Po=function(){var r=To?Fi.createElement("iframe"):{},i=Ao.length;for(r.style.display="none",us.appendChild(r),r.src="javascript:",r=r.contentWindow.document,r.open(),r.write("