@mappedin/mappedin-js 6.0.1-beta.0 → 6.0.1-beta.2
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/README.md +1 -1
- package/THIRD_PARTY_LICENSES.txt +58 -602
- package/lib/esm/{GLTFExporter-YC3NE427.js → GLTFExporter-KPBXVK2J.js} +1 -1
- package/lib/esm/{GLTFLoader-D47EWL22.js → GLTFLoader-WY3JJZTH.js} +1 -1
- package/lib/esm/{browser-QIMNSDZW.js → browser-YJRMCITR.js} +1 -1
- package/lib/esm/{chunk-GG5LPORK.js → chunk-4GHXJDEX.js} +1 -1
- package/lib/esm/{chunk-LWG6YXE4.js → chunk-BC5TNRJZ.js} +1 -1
- package/lib/esm/chunk-FOZIXWBX.js +950 -0
- package/lib/esm/{chunk-A6EX3TQG.js → chunk-GQMFEIP3.js} +1 -1
- package/lib/esm/{chunk-BGS3EEU5.js → chunk-HGQSHE2E.js} +1 -1
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +361 -103
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-2XM6P7XL.js → inspector-HU2N2RIA.js} +3 -3
- package/lib/esm/inspector-XYNFPRUR.css +1 -0
- package/lib/esm/{outdoor-context-v4-L46VWWFC.js → outdoor-context-v4-2EO5ZD2B.js} +1 -1
- package/lib/index.css +1 -1
- package/package.json +3 -3
- package/lib/esm/chunk-75MC2N2Z.js +0 -950
- package/lib/esm/inspector-BG5MSFCC.css +0 -1
|
@@ -1,950 +0,0 @@
|
|
|
1
|
-
import{h as ep,i as V1,j as ll}from"./chunk-GG5LPORK.js";import{a as ze}from"./chunk-LWG6YXE4.js";import{A as x1,B as S1,C as P1,D as W,E as dr,F as M1,G as fr,Ga as Tn,H as Pn,I as Ie,J as It,Ja as sl,Ka as B1,L as Fr,M as Fo,Na as F1,O as Ut,P as w1,Q as Go,Qa as Vr,R as T1,Ra as G1,S as I1,T as E1,U as Mn,X as L1,Y as D1,Z as nl,a as il,c as Bo,ca as _1,d as We,fa as ol,ga as al,ha as O1,ja as xi,m as b1,n as C1,pa as A1,qa as Gr,ra as tp,sa as k1,ta as Ue,u as Ci,ua as Ze,va as N1,w as nt,wa as R1,x as U,ya as wn}from"./chunk-A6EX3TQG.js";import{a as l,b as k,d as Br,e as v,f as c,g as P,h as E,i as X,j as d,k as b}from"./chunk-BGS3EEU5.js";var ny=k((up,cp)=>{d();(function(r,t){typeof up=="object"&&typeof cp<"u"?cp.exports=t():typeof define=="function"&&define.amd?define(t):(r=r||self).RBush=t()})(up,function(){"use strict";function r(g,C,I,T,w){l(function L(D,R,G,N,j){for(;N>G;){if(N-G>600){var H=N-G+1,$=R-G+1,ct=Math.log(H),yt=.5*Math.exp(2*ct/3),Ct=.5*Math.sqrt(ct*yt*(H-yt)/H)*($-H/2<0?-1:1),Rt=Math.max(G,Math.floor(R-$*yt/H+Ct)),Te=Math.min(N,Math.floor(R+(H-$)*yt/H+Ct));L(D,R,Rt,Te,j)}var gt=D[R],kt=G,Pt=N;for(t(D,G,R),j(D[N],gt)>0&&t(D,G,N);kt<Pt;){for(t(D,kt,Pt),kt++,Pt--;j(D[kt],gt)<0;)kt++;for(;j(D[Pt],gt)>0;)Pt--}j(D[G],gt)===0?t(D,G,Pt):t(D,++Pt,N),Pt<=R&&(G=Pt+1),R<=Pt&&(N=Pt-1)}},"t")(g,C,I||0,T||g.length-1,w||e)}l(r,"t");function t(g,C,I){var T=g[C];g[C]=g[I],g[I]=T}l(t,"i");function e(g,C){return g<C?-1:g>C?1:0}l(e,"n");var i=l(function(g){g===void 0&&(g=9),this._maxEntries=Math.max(4,g),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()},"r");function n(g,C,I){if(!I)return C.indexOf(g);for(var T=0;T<C.length;T++)if(I(g,C[T]))return T;return-1}l(n,"e");function o(g,C){a(g,0,g.children.length,C,g)}l(o,"a");function a(g,C,I,T,w){w||(w=S(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var L=C;L<I;L++){var D=g.children[L];u(w,g.leaf?T(D):D)}return w}l(a,"h");function u(g,C){return g.minX=Math.min(g.minX,C.minX),g.minY=Math.min(g.minY,C.minY),g.maxX=Math.max(g.maxX,C.maxX),g.maxY=Math.max(g.maxY,C.maxY),g}l(u,"o");function s(g,C){return g.minX-C.minX}l(s,"s");function p(g,C){return g.minY-C.minY}l(p,"l");function f(g){return(g.maxX-g.minX)*(g.maxY-g.minY)}l(f,"f");function m(g){return g.maxX-g.minX+(g.maxY-g.minY)}l(m,"u");function y(g,C){return g.minX<=C.minX&&g.minY<=C.minY&&C.maxX<=g.maxX&&C.maxY<=g.maxY}l(y,"m");function x(g,C){return C.minX<=g.maxX&&C.minY<=g.maxY&&C.maxX>=g.minX&&C.maxY>=g.minY}l(x,"c");function S(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}l(S,"p");function M(g,C,I,T,w){for(var L=[C,I];L.length;)if(!((I=L.pop())-(C=L.pop())<=T)){var D=C+Math.ceil((I-C)/T/2)*T;r(g,D,C,I,w),L.push(C,D,D,I)}}return l(M,"d"),i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(g){var C=this.data,I=[];if(!x(g,C))return I;for(var T=this.toBBox,w=[];C;){for(var L=0;L<C.children.length;L++){var D=C.children[L],R=C.leaf?T(D):D;x(g,R)&&(C.leaf?I.push(D):y(g,R)?this._all(D,I):w.push(D))}C=w.pop()}return I},i.prototype.collides=function(g){var C=this.data;if(!x(g,C))return!1;for(var I=[];C;){for(var T=0;T<C.children.length;T++){var w=C.children[T],L=C.leaf?this.toBBox(w):w;if(x(g,L)){if(C.leaf||y(g,L))return!0;I.push(w)}}C=I.pop()}return!1},i.prototype.load=function(g){if(!g||!g.length)return this;if(g.length<this._minEntries){for(var C=0;C<g.length;C++)this.insert(g[C]);return this}var I=this._build(g.slice(),0,g.length-1,0);if(this.data.children.length)if(this.data.height===I.height)this._splitRoot(this.data,I);else{if(this.data.height<I.height){var T=this.data;this.data=I,I=T}this._insert(I,this.data.height-I.height-1,!0)}else this.data=I;return this},i.prototype.insert=function(g){return g&&this._insert(g,this.data.height-1),this},i.prototype.clear=function(){return this.data=S([]),this},i.prototype.remove=function(g,C){if(!g)return this;for(var I,T,w,L=this.data,D=this.toBBox(g),R=[],G=[];L||R.length;){if(L||(L=R.pop(),T=R[R.length-1],I=G.pop(),w=!0),L.leaf){var N=n(g,L.children,C);if(N!==-1)return L.children.splice(N,1),R.push(L),this._condense(R),this}w||L.leaf||!y(L,D)?T?(I++,L=T.children[I],w=!1):L=null:(R.push(L),G.push(I),I=0,T=L,L=L.children[0])}return this},i.prototype.toBBox=function(g){return g},i.prototype.compareMinX=function(g,C){return g.minX-C.minX},i.prototype.compareMinY=function(g,C){return g.minY-C.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(g){return this.data=g,this},i.prototype._all=function(g,C){for(var I=[];g;)g.leaf?C.push.apply(C,g.children):I.push.apply(I,g.children),g=I.pop();return C},i.prototype._build=function(g,C,I,T){var w,L=I-C+1,D=this._maxEntries;if(L<=D)return o(w=S(g.slice(C,I+1)),this.toBBox),w;T||(T=Math.ceil(Math.log(L)/Math.log(D)),D=Math.ceil(L/Math.pow(D,T-1))),(w=S([])).leaf=!1,w.height=T;var R=Math.ceil(L/D),G=R*Math.ceil(Math.sqrt(D));M(g,C,I,G,this.compareMinX);for(var N=C;N<=I;N+=G){var j=Math.min(N+G-1,I);M(g,N,j,R,this.compareMinY);for(var H=N;H<=j;H+=R){var $=Math.min(H+R-1,j);w.children.push(this._build(g,H,$,T-1))}}return o(w,this.toBBox),w},i.prototype._chooseSubtree=function(g,C,I,T){for(;T.push(C),!C.leaf&&T.length-1!==I;){for(var w=1/0,L=1/0,D=void 0,R=0;R<C.children.length;R++){var G=C.children[R],N=f(G),j=(H=g,$=G,(Math.max($.maxX,H.maxX)-Math.min($.minX,H.minX))*(Math.max($.maxY,H.maxY)-Math.min($.minY,H.minY))-N);j<L?(L=j,w=N<w?N:w,D=G):j===L&&N<w&&(w=N,D=G)}C=D||C.children[0]}var H,$;return C},i.prototype._insert=function(g,C,I){var T=I?g:this.toBBox(g),w=[],L=this._chooseSubtree(T,this.data,C,w);for(L.children.push(g),u(L,T);C>=0&&w[C].children.length>this._maxEntries;)this._split(w,C),C--;this._adjustParentBBoxes(T,w,C)},i.prototype._split=function(g,C){var I=g[C],T=I.children.length,w=this._minEntries;this._chooseSplitAxis(I,w,T);var L=this._chooseSplitIndex(I,w,T),D=S(I.children.splice(L,I.children.length-L));D.height=I.height,D.leaf=I.leaf,o(I,this.toBBox),o(D,this.toBBox),C?g[C-1].children.push(D):this._splitRoot(I,D)},i.prototype._splitRoot=function(g,C){this.data=S([g,C]),this.data.height=g.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(g,C,I){for(var T,w,L,D,R,G,N,j=1/0,H=1/0,$=C;$<=I-C;$++){var ct=a(g,0,$,this.toBBox),yt=a(g,$,I,this.toBBox),Ct=(w=ct,L=yt,D=void 0,R=void 0,G=void 0,N=void 0,D=Math.max(w.minX,L.minX),R=Math.max(w.minY,L.minY),G=Math.min(w.maxX,L.maxX),N=Math.min(w.maxY,L.maxY),Math.max(0,G-D)*Math.max(0,N-R)),Rt=f(ct)+f(yt);Ct<j?(j=Ct,T=$,H=Rt<H?Rt:H):Ct===j&&Rt<H&&(H=Rt,T=$)}return T||I-C},i.prototype._chooseSplitAxis=function(g,C,I){var T=g.leaf?this.compareMinX:s,w=g.leaf?this.compareMinY:p;this._allDistMargin(g,C,I,T)<this._allDistMargin(g,C,I,w)&&g.children.sort(T)},i.prototype._allDistMargin=function(g,C,I,T){g.children.sort(T);for(var w=this.toBBox,L=a(g,0,C,w),D=a(g,I-C,I,w),R=m(L)+m(D),G=C;G<I-C;G++){var N=g.children[G];u(L,g.leaf?w(N):N),R+=m(L)}for(var j=I-C-1;j>=C;j--){var H=g.children[j];u(D,g.leaf?w(H):H),R+=m(D)}return R},i.prototype._adjustParentBBoxes=function(g,C,I){for(var T=I;T>=0;T--)u(C[T],g)},i.prototype._condense=function(g){for(var C=g.length-1,I=void 0;C>=0;C--)g[C].children.length===0?C>0?(I=g[C-1].children).splice(I.indexOf(g[C]),1):this.clear():o(g[C],this.toBBox)},i})});var mp=k(Y=>{"use strict";d();Object.defineProperty(Y,"__esModule",{value:!0});Y.earthRadius=63710088e-1;Y.factors={centimeters:Y.earthRadius*100,centimetres:Y.earthRadius*100,degrees:Y.earthRadius/111325,feet:Y.earthRadius*3.28084,inches:Y.earthRadius*39.37,kilometers:Y.earthRadius/1e3,kilometres:Y.earthRadius/1e3,meters:Y.earthRadius,metres:Y.earthRadius,miles:Y.earthRadius/1609.344,millimeters:Y.earthRadius*1e3,millimetres:Y.earthRadius*1e3,nauticalmiles:Y.earthRadius/1852,radians:1,yards:Y.earthRadius*1.0936};Y.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Y.earthRadius,yards:1.0936133};Y.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 jr(r,t,e){e===void 0&&(e={});var i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=t||{},i.geometry=r,i}l(jr,"feature");Y.feature=jr;function t7(r,t,e){switch(e===void 0&&(e={}),r){case"Point":return pp(t).geometry;case"LineString":return dp(t).geometry;case"Polygon":return hp(t).geometry;case"MultiPoint":return ay(t).geometry;case"MultiLineString":return oy(t).geometry;case"MultiPolygon":return sy(t).geometry;default:throw new Error(r+" is invalid")}}l(t7,"geometry");Y.geometry=t7;function pp(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(!vl(r[0])||!vl(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return jr(i,t,e)}l(pp,"point");Y.point=pp;function e7(r,t,e){return e===void 0&&(e={}),bl(r.map(function(i){return pp(i,t)}),e)}l(e7,"points");Y.points=e7;function hp(r,t,e){e===void 0&&(e={});for(var i=0,n=r;i<n.length;i++){var o=n[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var u={type:"Polygon",coordinates:r};return jr(u,t,e)}l(hp,"polygon");Y.polygon=hp;function r7(r,t,e){return e===void 0&&(e={}),bl(r.map(function(i){return hp(i,t)}),e)}l(r7,"polygons");Y.polygons=r7;function dp(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 i={type:"LineString",coordinates:r};return jr(i,t,e)}l(dp,"lineString");Y.lineString=dp;function i7(r,t,e){return e===void 0&&(e={}),bl(r.map(function(i){return dp(i,t)}),e)}l(i7,"lineStrings");Y.lineStrings=i7;function bl(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}l(bl,"featureCollection");Y.featureCollection=bl;function oy(r,t,e){e===void 0&&(e={});var i={type:"MultiLineString",coordinates:r};return jr(i,t,e)}l(oy,"multiLineString");Y.multiLineString=oy;function ay(r,t,e){e===void 0&&(e={});var i={type:"MultiPoint",coordinates:r};return jr(i,t,e)}l(ay,"multiPoint");Y.multiPoint=ay;function sy(r,t,e){e===void 0&&(e={});var i={type:"MultiPolygon",coordinates:r};return jr(i,t,e)}l(sy,"multiPolygon");Y.multiPolygon=sy;function n7(r,t,e){e===void 0&&(e={});var i={type:"GeometryCollection",geometries:r};return jr(i,t,e)}l(n7,"geometryCollection");Y.geometryCollection=n7;function o7(r,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var e=Math.pow(10,t||0);return Math.round(r*e)/e}l(o7,"round");Y.round=o7;function ly(r,t){t===void 0&&(t="kilometers");var e=Y.factors[t];if(!e)throw new Error(t+" units is invalid");return r*e}l(ly,"radiansToLength");Y.radiansToLength=ly;function fp(r,t){t===void 0&&(t="kilometers");var e=Y.factors[t];if(!e)throw new Error(t+" units is invalid");return r/e}l(fp,"lengthToRadians");Y.lengthToRadians=fp;function a7(r,t){return uy(fp(r,t))}l(a7,"lengthToDegrees");Y.lengthToDegrees=a7;function s7(r){var t=r%360;return t<0&&(t+=360),t}l(s7,"bearingToAzimuth");Y.bearingToAzimuth=s7;function uy(r){var t=r%(2*Math.PI);return t*180/Math.PI}l(uy,"radiansToDegrees");Y.radiansToDegrees=uy;function l7(r){var t=r%360;return t*Math.PI/180}l(l7,"degreesToRadians");Y.degreesToRadians=l7;function u7(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 ly(fp(r,t),e)}l(u7,"convertLength");Y.convertLength=u7;function c7(r,t,e){if(t===void 0&&(t="meters"),e===void 0&&(e="kilometers"),!(r>=0))throw new Error("area must be a positive number");var i=Y.areaFactors[t];if(!i)throw new Error("invalid original units");var n=Y.areaFactors[e];if(!n)throw new Error("invalid final units");return r/i*n}l(c7,"convertArea");Y.convertArea=c7;function vl(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}l(vl,"isNumber");Y.isNumber=vl;function p7(r){return!!r&&r.constructor===Object}l(p7,"isObject");Y.isObject=p7;function h7(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(t){if(!vl(t))throw new Error("bbox must only contain numbers")})}l(h7,"validateBBox");Y.validateBBox=h7;function d7(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}l(d7,"validateId");Y.validateId=d7});var fy=k(Et=>{"use strict";d();Object.defineProperty(Et,"__esModule",{value:!0});var Vt=mp();function Yo(r,t,e){if(r!==null)for(var i,n,o,a,u,s,p,f=0,m=0,y,x=r.type,S=x==="FeatureCollection",M=x==="Feature",g=S?r.features.length:1,C=0;C<g;C++){p=S?r.features[C].geometry:M?r.geometry:r,y=p?p.type==="GeometryCollection":!1,u=y?p.geometries.length:1;for(var I=0;I<u;I++){var T=0,w=0;if(a=y?p.geometries[I]:p,a!==null){s=a.coordinates;var L=a.type;switch(f=e&&(L==="Polygon"||L==="MultiPolygon")?1:0,L){case null:break;case"Point":if(t(s,m,C,T,w)===!1)return!1;m++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<s.length;i++){if(t(s[i],m,C,T,w)===!1)return!1;m++,L==="MultiPoint"&&T++}L==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<s.length;i++){for(n=0;n<s[i].length-f;n++){if(t(s[i][n],m,C,T,w)===!1)return!1;m++}L==="MultiLineString"&&T++,L==="Polygon"&&w++}L==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<s.length;i++){for(w=0,n=0;n<s[i].length;n++){for(o=0;o<s[i][n].length-f;o++){if(t(s[i][n][o],m,C,T,w)===!1)return!1;m++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(Yo(a.geometries[i],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}l(Yo,"coordEach");function f7(r,t,e,i){var n=e;return Yo(r,function(o,a,u,s,p){a===0&&e===void 0?n=o:n=t(n,o,a,u,s,p)},i),n}l(f7,"coordReduce");function cy(r,t){var e;switch(r.type){case"FeatureCollection":for(e=0;e<r.features.length&&t(r.features[e].properties,e)!==!1;e++);break;case"Feature":t(r.properties,0);break}}l(cy,"propEach");function m7(r,t,e){var i=e;return cy(r,function(n,o){o===0&&e===void 0?i=n:i=t(i,n,o)}),i}l(m7,"propReduce");function py(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++);}l(py,"featureEach");function y7(r,t,e){var i=e;return py(r,function(n,o){o===0&&e===void 0?i=n:i=t(i,n,o)}),i}l(y7,"featureReduce");function g7(r){var t=[];return Yo(r,function(e){t.push(e)}),t}l(g7,"coordAll");function yp(r,t){var e,i,n,o,a,u,s,p,f,m,y=0,x=r.type==="FeatureCollection",S=r.type==="Feature",M=x?r.features.length:1;for(e=0;e<M;e++){for(u=x?r.features[e].geometry:S?r.geometry:r,p=x?r.features[e].properties:S?r.properties:{},f=x?r.features[e].bbox:S?r.bbox:void 0,m=x?r.features[e].id:S?r.id:void 0,s=u?u.type==="GeometryCollection":!1,a=s?u.geometries.length:1,n=0;n<a;n++){if(o=s?u.geometries[n]:u,o===null){if(t(null,y,p,f,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,y,p,f,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],y,p,f,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}l(yp,"geomEach");function v7(r,t,e){var i=e;return yp(r,function(n,o,a,u,s){o===0&&e===void 0?i=n:i=t(i,n,o,a,u,s)}),i}l(v7,"geomReduce");function Cl(r,t){yp(r,function(e,i,n,o,a){var u=e===null?null:e.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return t(Vt.feature(e,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var s;switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon";break}for(var p=0;p<e.coordinates.length;p++){var f=e.coordinates[p],m={type:s,coordinates:f};if(t(Vt.feature(m,n),i,p)===!1)return!1}})}l(Cl,"flattenEach");function b7(r,t,e){var i=e;return Cl(r,function(n,o,a){o===0&&a===0&&e===void 0?i=n:i=t(i,n,o,a)}),i}l(b7,"flattenReduce");function hy(r,t){Cl(r,function(e,i,n){var o=0;if(e.geometry){var a=e.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var u,s=0,p=0,f=0;if(Yo(e,function(m,y,x,S,M){if(u===void 0||i>s||S>p||M>f){u=m,s=i,p=S,f=M,o=0;return}var g=Vt.lineString([u,m],e.properties);if(t(g,i,n,M,o)===!1)return!1;o++,u=m})===!1)return!1}}})}l(hy,"segmentEach");function C7(r,t,e){var i=e,n=!1;return hy(r,function(o,a,u,s,p){n===!1&&e===void 0?i=o:i=t(i,o,a,u,s,p),n=!0}),i}l(C7,"segmentReduce");function dy(r,t){if(!r)throw new Error("geojson is required");Cl(r,function(e,i,n){if(e.geometry!==null){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(t(e,i,n,0,0)===!1)return!1;break;case"Polygon":for(var u=0;u<a.length;u++)if(t(Vt.lineString(a[u],e.properties),i,n,u)===!1)return!1;break}}})}l(dy,"lineEach");function x7(r,t,e){var i=e;return dy(r,function(n,o,a,u){o===0&&e===void 0?i=n:i=t(i,n,o,a,u)}),i}l(x7,"lineReduce");function S7(r,t){if(t=t||{},!Vt.isObject(t))throw new Error("options is invalid");var e=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.segmentIndex||0,a=t.properties,u;switch(r.type){case"FeatureCollection":e<0&&(e=r.features.length+e),a=a||r.features[e].properties,u=r.features[e].geometry;break;case"Feature":a=a||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var s=u.coordinates;switch(u.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=s.length+o-1),Vt.lineString([s[o],s[o+1]],a,t);case"Polygon":return n<0&&(n=s.length+n),o<0&&(o=s[n].length+o-1),Vt.lineString([s[n][o],s[n][o+1]],a,t);case"MultiLineString":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o-1),Vt.lineString([s[i][o],s[i][o+1]],a,t);case"MultiPolygon":return i<0&&(i=s.length+i),n<0&&(n=s[i].length+n),o<0&&(o=s[i][n].length-o-1),Vt.lineString([s[i][n][o],s[i][n][o+1]],a,t)}throw new Error("geojson is invalid")}l(S7,"findSegment");function P7(r,t){if(t=t||{},!Vt.isObject(t))throw new Error("options is invalid");var e=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.coordIndex||0,a=t.properties,u;switch(r.type){case"FeatureCollection":e<0&&(e=r.features.length+e),a=a||r.features[e].properties,u=r.features[e].geometry;break;case"Feature":a=a||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var s=u.coordinates;switch(u.type){case"Point":return Vt.point(s,a,t);case"MultiPoint":return i<0&&(i=s.length+i),Vt.point(s[i],a,t);case"LineString":return o<0&&(o=s.length+o),Vt.point(s[o],a,t);case"Polygon":return n<0&&(n=s.length+n),o<0&&(o=s[n].length+o),Vt.point(s[n][o],a,t);case"MultiLineString":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o),Vt.point(s[i][o],a,t);case"MultiPolygon":return i<0&&(i=s.length+i),n<0&&(n=s[i].length+n),o<0&&(o=s[i][n].length-o),Vt.point(s[i][n][o],a,t)}throw new Error("geojson is invalid")}l(P7,"findPoint");Et.coordAll=g7;Et.coordEach=Yo;Et.coordReduce=f7;Et.featureEach=py;Et.featureReduce=y7;Et.findPoint=P7;Et.findSegment=S7;Et.flattenEach=Cl;Et.flattenReduce=b7;Et.geomEach=yp;Et.geomReduce=v7;Et.lineEach=dy;Et.lineReduce=x7;Et.propEach=cy;Et.propReduce=m7;Et.segmentEach=hy;Et.segmentReduce=C7});var gp=k((qI,yy)=>{"use strict";d();var my=Object.prototype.toString;yy.exports=l(function(t){var e=my.call(t),i=e==="[object Arguments]";return i||(i=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&my.call(t.callee)==="[object Function]"),i},"isArguments")});var wy=k((KI,My)=>{"use strict";d();var Py;Object.keys||(Wo=Object.prototype.hasOwnProperty,vp=Object.prototype.toString,gy=gp(),bp=Object.prototype.propertyIsEnumerable,vy=!bp.call({toString:null},"toString"),by=bp.call(function(){},"prototype"),Uo=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],xl=l(function(r){var t=r.constructor;return t&&t.prototype===r},"equalsConstructorPrototype"),Cy={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},xy=function(){if(typeof window>"u")return!1;for(var r in window)try{if(!Cy["$"+r]&&Wo.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{xl(window[r])}catch{return!0}}catch{return!0}return!1}(),Sy=l(function(r){if(typeof window>"u"||!xy)return xl(r);try{return xl(r)}catch{return!1}},"equalsConstructorPrototypeIfNotBuggy"),Py=l(function(t){var e=t!==null&&typeof t=="object",i=vp.call(t)==="[object Function]",n=gy(t),o=e&&vp.call(t)==="[object String]",a=[];if(!e&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var u=by&&i;if(o&&t.length>0&&!Wo.call(t,0))for(var s=0;s<t.length;++s)a.push(String(s));if(n&&t.length>0)for(var p=0;p<t.length;++p)a.push(String(p));else for(var f in t)!(u&&f==="prototype")&&Wo.call(t,f)&&a.push(String(f));if(vy)for(var m=Sy(t),y=0;y<Uo.length;++y)!(m&&Uo[y]==="constructor")&&Wo.call(t,Uo[y])&&a.push(Uo[y]);return a},"keys"));var Wo,vp,gy,bp,vy,by,Uo,xl,Cy,xy,Sy;My.exports=Py});var Pl=k((eE,Ey)=>{"use strict";d();var M7=Array.prototype.slice,w7=gp(),Ty=Object.keys,Sl=Ty?l(function(t){return Ty(t)},"keys"):wy(),Iy=Object.keys;Sl.shim=l(function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=l(function(i){return w7(i)?Iy(M7.call(i)):Iy(i)},"keys"))}else Object.keys=Sl;return Object.keys||Sl},"shimObjectKeys");Ey.exports=Sl});var Dy=k((nE,Ly)=>{"use strict";d();Ly.exports=Error});var Oy=k((aE,_y)=>{"use strict";d();_y.exports=EvalError});var ky=k((lE,Ay)=>{"use strict";d();Ay.exports=RangeError});var Ry=k((cE,Ny)=>{"use strict";d();Ny.exports=ReferenceError});var Cp=k((hE,By)=>{"use strict";d();By.exports=SyntaxError});var yr=k((fE,Fy)=>{"use strict";d();Fy.exports=TypeError});var Vy=k((yE,Gy)=>{"use strict";d();Gy.exports=URIError});var Zo=k((vE,Hy)=>{"use strict";d();Hy.exports=l(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),i=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[e]=n;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,e);if(a.value!==n||a.enumerable!==!0)return!1}return!0},"hasSymbols")});var Ml=k((xE,jy)=>{"use strict";d();var Xy=typeof Symbol<"u"&&Symbol,T7=Zo();jy.exports=l(function(){return typeof Xy!="function"||typeof Symbol!="function"||typeof Xy("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:T7()},"hasNativeSymbols")});var Wy=k((ME,Yy)=>{"use strict";d();var xp={__proto__:null,foo:{}},I7=Object;Yy.exports=l(function(){return{__proto__:xp}.foo===xp.foo&&!(xp instanceof I7)},"hasProto")});var zy=k((IE,Zy)=>{"use strict";d();var E7="Function.prototype.bind called on incompatible ",L7=Object.prototype.toString,D7=Math.max,_7="[object Function]",Uy=l(function(t,e){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var o=0;o<e.length;o+=1)i[o+t.length]=e[o];return i},"concatty"),O7=l(function(t,e){for(var i=[],n=e||0,o=0;n<t.length;n+=1,o+=1)i[o]=t[n];return i},"slicy"),A7=l(function(r,t){for(var e="",i=0;i<r.length;i+=1)e+=r[i],i+1<r.length&&(e+=t);return e},"joiny");Zy.exports=l(function(t){var e=this;if(typeof e!="function"||L7.apply(e)!==_7)throw new TypeError(E7+e);for(var i=O7(arguments,1),n,o=l(function(){if(this instanceof n){var f=e.apply(this,Uy(i,arguments));return Object(f)===f?f:this}return e.apply(t,Uy(i,arguments))},"binder"),a=D7(0,e.length-i.length),u=[],s=0;s<a;s++)u[s]="$"+s;if(n=Function("binder","return function ("+A7(u,",")+"){ return binder.apply(this,arguments); }")(o),e.prototype){var p=l(function(){},"Empty");p.prototype=e.prototype,n.prototype=new p,p.prototype=null}return n},"bind")});var wl=k((DE,qy)=>{"use strict";d();var k7=zy();qy.exports=Function.prototype.bind||k7});var Sp=k((OE,$y)=>{"use strict";d();var N7=Function.prototype.call,R7=Object.prototype.hasOwnProperty,B7=wl();$y.exports=B7.call(N7,R7)});var Le=k((kE,e0)=>{"use strict";d();var q,F7=Dy(),G7=Oy(),V7=ky(),H7=Ry(),Dn=Cp(),Ln=yr(),X7=Vy(),t0=Function,Pp=l(function(r){try{return t0('"use strict"; return ('+r+").constructor;")()}catch{}},"getEvalledConstructor"),Pi=Object.getOwnPropertyDescriptor;if(Pi)try{Pi({},"")}catch{Pi=null}var Mp=l(function(){throw new Ln},"throwTypeError"),j7=Pi?function(){try{return arguments.callee,Mp}catch{try{return Pi(arguments,"callee").get}catch{return Mp}}}():Mp,In=Ml()(),Y7=Wy()(),Nt=Object.getPrototypeOf||(Y7?function(r){return r.__proto__}:null),En={},W7=typeof Uint8Array>"u"||!Nt?q:Nt(Uint8Array),Mi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":In&&Nt?Nt([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":En,"%AsyncGenerator%":En,"%AsyncGeneratorFunction%":En,"%AsyncIteratorPrototype%":En,"%Atomics%":typeof Atomics>"u"?q:Atomics,"%BigInt%":typeof BigInt>"u"?q:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?q:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?q:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?q:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":F7,"%eval%":eval,"%EvalError%":G7,"%Float32Array%":typeof Float32Array>"u"?q:Float32Array,"%Float64Array%":typeof Float64Array>"u"?q:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?q:FinalizationRegistry,"%Function%":t0,"%GeneratorFunction%":En,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":In&&Nt?Nt(Nt([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!In||!Nt?q:Nt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?q:Promise,"%Proxy%":typeof Proxy>"u"?q:Proxy,"%RangeError%":V7,"%ReferenceError%":H7,"%Reflect%":typeof Reflect>"u"?q:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?q:Set,"%SetIteratorPrototype%":typeof Set>"u"||!In||!Nt?q:Nt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":In&&Nt?Nt(""[Symbol.iterator]()):q,"%Symbol%":In?Symbol:q,"%SyntaxError%":Dn,"%ThrowTypeError%":j7,"%TypedArray%":W7,"%TypeError%":Ln,"%Uint8Array%":typeof Uint8Array>"u"?q:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?q:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?q:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?q:Uint32Array,"%URIError%":X7,"%WeakMap%":typeof WeakMap>"u"?q:WeakMap,"%WeakRef%":typeof WeakRef>"u"?q:WeakRef,"%WeakSet%":typeof WeakSet>"u"?q:WeakSet};if(Nt)try{null.error}catch(r){Jy=Nt(Nt(r)),Mi["%Error.prototype%"]=Jy}var Jy,U7=l(function r(t){var e;if(t==="%AsyncFunction%")e=Pp("async function () {}");else if(t==="%GeneratorFunction%")e=Pp("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=Pp("async function* () {}");else if(t==="%AsyncGenerator%"){var i=r("%AsyncGeneratorFunction%");i&&(e=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=r("%AsyncGenerator%");n&&Nt&&(e=Nt(n.prototype))}return Mi[t]=e,e},"doEval"),Ky={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},zo=wl(),Tl=Sp(),Z7=zo.call(Function.call,Array.prototype.concat),z7=zo.call(Function.apply,Array.prototype.splice),Qy=zo.call(Function.call,String.prototype.replace),Il=zo.call(Function.call,String.prototype.slice),q7=zo.call(Function.call,RegExp.prototype.exec),$7=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J7=/\\(\\)?/g,K7=l(function(t){var e=Il(t,0,1),i=Il(t,-1);if(e==="%"&&i!=="%")throw new Dn("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&e!=="%")throw new Dn("invalid intrinsic syntax, expected opening `%`");var n=[];return Qy(t,$7,function(o,a,u,s){n[n.length]=u?Qy(s,J7,"$1"):a||o}),n},"stringToPath"),Q7=l(function(t,e){var i=t,n;if(Tl(Ky,i)&&(n=Ky[i],i="%"+n[0]+"%"),Tl(Mi,i)){var o=Mi[i];if(o===En&&(o=U7(i)),typeof o>"u"&&!e)throw new Ln("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new Dn("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");e0.exports=l(function(t,e){if(typeof t!="string"||t.length===0)throw new Ln("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Ln('"allowMissing" argument must be a boolean');if(q7(/^%?[^%]*%?$/,t)===null)throw new Dn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=K7(t),n=i.length>0?i[0]:"",o=Q7("%"+n+"%",e),a=o.name,u=o.value,s=!1,p=o.alias;p&&(n=p[0],z7(i,Z7([0,1],p)));for(var f=1,m=!0;f<i.length;f+=1){var y=i[f],x=Il(y,0,1),S=Il(y,-1);if((x==='"'||x==="'"||x==="`"||S==='"'||S==="'"||S==="`")&&x!==S)throw new Dn("property names with quotes must have matching quotes");if((y==="constructor"||!m)&&(s=!0),n+="."+y,a="%"+n+"%",Tl(Mi,a))u=Mi[a];else if(u!=null){if(!(y in u)){if(!e)throw new Ln("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pi&&f+1>=i.length){var M=Pi(u,y);m=!!M,m&&"get"in M&&!("originalValue"in M.get)?u=M.get:u=u[y]}else m=Tl(u,y),u=u[y];m&&!s&&(Mi[a]=u)}}return u},"GetIntrinsic")});var Ll=k((BE,r0)=>{"use strict";d();var t6=Le(),El=t6("%Object.defineProperty%",!0)||!1;if(El)try{El({},"a",{value:1})}catch{El=!1}r0.exports=El});var _l=k((GE,i0)=>{"use strict";d();var e6=Le(),Dl=e6("%Object.getOwnPropertyDescriptor%",!0);if(Dl)try{Dl([],"length")}catch{Dl=null}i0.exports=Dl});var Ol=k((HE,a0)=>{"use strict";d();var n0=Ll(),r6=Cp(),_n=yr(),o0=_l();a0.exports=l(function(t,e,i){if(!t||typeof t!="object"&&typeof t!="function")throw new _n("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new _n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new _n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new _n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new _n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new _n("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,s=!!o0&&o0(t,e);if(n0)n0(t,e,{configurable:a===null&&s?s.configurable:!a,enumerable:n===null&&s?s.enumerable:!n,value:i,writable:o===null&&s?s.writable:!o});else if(u||!n&&!o&&!a)t[e]=i;else throw new r6("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty")});var Al=k((YE,l0)=>{"use strict";d();var wp=Ll(),s0=l(function(){return!!wp},"hasPropertyDescriptors");s0.hasArrayLengthDefineBug=l(function(){if(!wp)return null;try{return wp([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug");l0.exports=s0});var Yr=k((ZE,h0)=>{"use strict";d();var i6=Pl(),n6=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",o6=Object.prototype.toString,a6=Array.prototype.concat,u0=Ol(),s6=l(function(r){return typeof r=="function"&&o6.call(r)==="[object Function]"},"isFunction"),c0=Al()(),l6=l(function(r,t,e,i){if(t in r){if(i===!0){if(r[t]===e)return}else if(!s6(i)||!i())return}c0?u0(r,t,e,!0):u0(r,t,e)},"defineProperty"),p0=l(function(r,t){var e=arguments.length>2?arguments[2]:{},i=i6(t);n6&&(i=a6.call(i,Object.getOwnPropertySymbols(t)));for(var n=0;n<i.length;n+=1)l6(r,i[n],t[i[n]],e[i[n]])},"defineProperties");p0.supportsDescriptors=!!c0;h0.exports=p0});var g0=k(($E,y0)=>{"use strict";d();var u6=Le(),d0=Ol(),c6=Al()(),f0=_l(),m0=yr(),p6=u6("%Math.floor%");y0.exports=l(function(t,e){if(typeof t!="function")throw new m0("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||p6(e)!==e)throw new m0("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in t&&f0){var a=f0(t,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(o=!1)}return(n||o||!i)&&(c6?d0(t,"length",e,!0,!0):d0(t,"length",e)),t},"setFunctionLength")});var wi=k((QE,kl)=>{"use strict";d();var Tp=wl(),Nl=Le(),h6=g0(),d6=yr(),C0=Nl("%Function.prototype.apply%"),x0=Nl("%Function.prototype.call%"),S0=Nl("%Reflect.apply%",!0)||Tp.call(x0,C0),v0=Ll(),f6=Nl("%Math.max%");kl.exports=l(function(t){if(typeof t!="function")throw new d6("a function is required");var e=S0(Tp,x0,arguments);return h6(e,1+f6(0,t.length-(arguments.length-1)),!0)},"callBind");var b0=l(function(){return S0(Tp,C0,arguments)},"applyBind");v0?v0(kl.exports,"apply",{value:b0}):kl.exports.apply=b0});var pe=k((rL,w0)=>{"use strict";d();var P0=Le(),M0=wi(),m6=M0(P0("String.prototype.indexOf"));w0.exports=l(function(t,e){var i=P0(t,!!e);return typeof i=="function"&&m6(t,".prototype.")>-1?M0(i):i},"callBoundIntrinsic")});var Ip=k((oL,D0)=>{"use strict";d();var y6=Pl(),E0=Zo()(),L0=pe(),T0=Object,g6=L0("Array.prototype.push"),I0=L0("Object.prototype.propertyIsEnumerable"),v6=E0?Object.getOwnPropertySymbols:null;D0.exports=l(function(t,e){if(t==null)throw new TypeError("target must be an object");var i=T0(t);if(arguments.length===1)return i;for(var n=1;n<arguments.length;++n){var o=T0(arguments[n]),a=y6(o),u=E0&&(Object.getOwnPropertySymbols||v6);if(u)for(var s=u(o),p=0;p<s.length;++p){var f=s[p];I0(o,f)&&g6(a,f)}for(var m=0;m<a.length;++m){var y=a[m];if(I0(o,y)){var x=o[y];i[y]=x}}}return i},"assign")});var Lp=k((lL,_0)=>{"use strict";d();var Ep=Ip(),b6=l(function(){if(!Object.assign)return!1;for(var r="abcdefghijklmnopqrst",t=r.split(""),e={},i=0;i<t.length;++i)e[t[i]]=t[i];var n=Object.assign({},e),o="";for(var a in n)o+=a;return r!==o},"lacksProperEnumerationOrder"),C6=l(function(){if(!Object.assign||!Object.preventExtensions)return!1;var r=Object.preventExtensions({1:2});try{Object.assign(r,"xy")}catch{return r[1]==="y"}return!1},"assignHasPendingExceptions");_0.exports=l(function(){return!Object.assign||b6()||C6()?Ep:Object.assign},"getPolyfill")});var A0=k((pL,O0)=>{"use strict";d();var x6=Yr(),S6=Lp();O0.exports=l(function(){var t=S6();return x6(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},"shimAssign")});var B0=k((fL,R0)=>{"use strict";d();var P6=Yr(),M6=wi(),w6=Ip(),k0=Lp(),T6=A0(),I6=M6.apply(k0()),N0=l(function(t,e){return I6(Object,arguments)},"assign");P6(N0,{getPolyfill:k0,implementation:w6,shim:T6});R0.exports=N0});var G0=k((gL,F0)=>{"use strict";d();var $o=l(function(){return typeof l(function(){},"f").name=="string"},"functionsHaveNames"),qo=Object.getOwnPropertyDescriptor;if(qo)try{qo([],"length")}catch{qo=null}$o.functionsHaveConfigurableNames=l(function(){if(!$o()||!qo)return!1;var t=qo(function(){},"name");return!!t&&!!t.configurable},"functionsHaveConfigurableNames");var E6=Function.prototype.bind;$o.boundFunctionsHaveNames=l(function(){return $o()&&typeof E6=="function"&&l(function(){},"f").bind().name!==""},"boundFunctionsHaveNames");F0.exports=$o});var X0=k((CL,H0)=>{"use strict";d();var V0=Ol(),L6=Al()(),D6=G0().functionsHaveConfigurableNames(),_6=yr();H0.exports=l(function(t,e){if(typeof t!="function")throw new _6("`fn` is not a function");var i=arguments.length>2&&!!arguments[2];return(!i||D6)&&(L6?V0(t,"name",e,!0,!0):V0(t,"name",e)),t},"setFunctionName")});var Dp=k((PL,j0)=>{"use strict";d();var O6=X0(),A6=yr(),k6=Object;j0.exports=O6(l(function(){if(this==null||this!==k6(this))throw new A6("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"flags"),"get flags",!0)});var _p=k((TL,Y0)=>{"use strict";d();var N6=Dp(),R6=Yr().supportsDescriptors,B6=Object.getOwnPropertyDescriptor;Y0.exports=l(function(){if(R6&&/a/mig.flags==="gim"){var t=B6(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var e="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(i,"sticky",{get:function(){e+="y"}}),e==="dy")return t.get}}return N6},"getPolyfill")});var Z0=k((LL,U0)=>{"use strict";d();var F6=Yr().supportsDescriptors,G6=_p(),V6=Object.getOwnPropertyDescriptor,H6=Object.defineProperty,X6=TypeError,W0=Object.getPrototypeOf,j6=/a/;U0.exports=l(function(){if(!F6||!W0)throw new X6("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=G6(),e=W0(j6),i=V6(e,"flags");return(!i||i.get!==t)&&H6(e,"flags",{configurable:!0,enumerable:!1,get:t}),t},"shimFlags")});var J0=k((OL,$0)=>{"use strict";d();var Y6=Yr(),W6=wi(),U6=Dp(),z0=_p(),Z6=Z0(),q0=W6(z0());Y6(q0,{getPolyfill:z0,implementation:U6,shim:Z6});$0.exports=q0});var Wr=k((kL,K0)=>{"use strict";d();var z6=Zo();K0.exports=l(function(){return z6()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ap=k((BL,tg)=>{"use strict";d();var q6=Wr()(),$6=pe(),Op=$6("Object.prototype.toString"),Rl=l(function(t){return q6&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Op(t)==="[object Arguments]"},"isArguments"),Q0=l(function(t){return Rl(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Op(t)!=="[object Array]"&&Op(t.callee)==="[object Function]"},"isArguments"),J6=function(){return Rl(arguments)}();Rl.isLegacyArguments=Q0;tg.exports=J6?Rl:Q0});var eg=k(()=>{d()});var xg=k((jL,Cg)=>{d();var jp=typeof Map=="function"&&Map.prototype,kp=Object.getOwnPropertyDescriptor&&jp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Fl=jp&&kp&&typeof kp.get=="function"?kp.get:null,rg=jp&&Map.prototype.forEach,Yp=typeof Set=="function"&&Set.prototype,Np=Object.getOwnPropertyDescriptor&&Yp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Gl=Yp&&Np&&typeof Np.get=="function"?Np.get:null,ig=Yp&&Set.prototype.forEach,K6=typeof WeakMap=="function"&&WeakMap.prototype,Ko=K6?WeakMap.prototype.has:null,Q6=typeof WeakSet=="function"&&WeakSet.prototype,Qo=Q6?WeakSet.prototype.has:null,tC=typeof WeakRef=="function"&&WeakRef.prototype,ng=tC?WeakRef.prototype.deref:null,eC=Boolean.prototype.valueOf,rC=Object.prototype.toString,iC=Function.prototype.toString,nC=String.prototype.match,Wp=String.prototype.slice,Zr=String.prototype.replace,oC=String.prototype.toUpperCase,og=String.prototype.toLowerCase,fg=RegExp.prototype.test,ag=Array.prototype.concat,qe=Array.prototype.join,aC=Array.prototype.slice,sg=Math.floor,Fp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Rp=Object.getOwnPropertySymbols,Gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,On=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ht=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===On||!0)?Symbol.toStringTag:null,mg=Object.prototype.propertyIsEnumerable,lg=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ug(r,t){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||fg.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-sg(-r):sg(r);if(i!==r){var n=String(i),o=Wp.call(t,n.length+1);return Zr.call(n,e,"$&_")+"."+Zr.call(Zr.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Zr.call(t,e,"$&_")}l(ug,"addNumericSeparator");var Vp=eg(),cg=Vp.custom,pg=gg(cg)?cg:null;Cg.exports=l(function r(t,e,i,n){var o=e||{};if(Ur(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ur(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Ur(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ur(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ur(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return bg(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var s=String(t);return u?ug(t,s):s}if(typeof t=="bigint"){var p=String(t)+"n";return u?ug(t,p):p}var f=typeof o.depth>"u"?5:o.depth;if(typeof i>"u"&&(i=0),i>=f&&f>0&&typeof t=="object")return Hp(t)?"[Array]":"[Object]";var m=MC(o,i);if(typeof n>"u")n=[];else if(vg(n,t)>=0)return"[Circular]";function y(ct,yt,Ct){if(yt&&(n=aC.call(n),n.push(yt)),Ct){var Rt={depth:o.depth};return Ur(o,"quoteStyle")&&(Rt.quoteStyle=o.quoteStyle),r(ct,Rt,i+1,n)}return r(ct,o,i+1,n)}if(l(y,"inspect"),typeof t=="function"&&!hg(t)){var x=mC(t),S=Bl(t,y);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(S.length>0?" { "+qe.call(S,", ")+" }":"")}if(gg(t)){var M=On?Zr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Gp.call(t);return typeof t=="object"&&!On?Jo(M):M}if(xC(t)){for(var g="<"+og.call(String(t.nodeName)),C=t.attributes||[],I=0;I<C.length;I++)g+=" "+C[I].name+"="+yg(sC(C[I].value),"double",o);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+og.call(String(t.nodeName))+">",g}if(Hp(t)){if(t.length===0)return"[]";var T=Bl(t,y);return m&&!PC(T)?"["+Xp(T,m)+"]":"[ "+qe.call(T,", ")+" ]"}if(uC(t)){var w=Bl(t,y);return!("cause"in Error.prototype)&&"cause"in t&&!mg.call(t,"cause")?"{ ["+String(t)+"] "+qe.call(ag.call("[cause]: "+y(t.cause),w),", ")+" }":w.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+qe.call(w,", ")+" }"}if(typeof t=="object"&&a){if(pg&&typeof t[pg]=="function"&&Vp)return Vp(t,{depth:f-i});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(yC(t)){var L=[];return rg&&rg.call(t,function(ct,yt){L.push(y(yt,t,!0)+" => "+y(ct,t))}),dg("Map",Fl.call(t),L,m)}if(bC(t)){var D=[];return ig&&ig.call(t,function(ct){D.push(y(ct,t))}),dg("Set",Gl.call(t),D,m)}if(gC(t))return Bp("WeakMap");if(CC(t))return Bp("WeakSet");if(vC(t))return Bp("WeakRef");if(pC(t))return Jo(y(Number(t)));if(dC(t))return Jo(y(Fp.call(t)));if(hC(t))return Jo(eC.call(t));if(cC(t))return Jo(y(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===global)return"{ [object globalThis] }";if(!lC(t)&&!hg(t)){var R=Bl(t,y),G=lg?lg(t)===Object.prototype:t instanceof Object||t.constructor===Object,N=t instanceof Object?"":"null prototype",j=!G&&Ht&&Object(t)===t&&Ht in t?Wp.call(zr(t),8,-1):N?"Object":"",H=G||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$=H+(j||N?"["+qe.call(ag.call([],j||[],N||[]),": ")+"] ":"");return R.length===0?$+"{}":m?$+"{"+Xp(R,m)+"}":$+"{ "+qe.call(R,", ")+" }"}return String(t)},"inspect_");function yg(r,t,e){var i=(e.quoteStyle||t)==="double"?'"':"'";return i+r+i}l(yg,"wrapQuotes");function sC(r){return Zr.call(String(r),/"/g,""")}l(sC,"quote");function Hp(r){return zr(r)==="[object Array]"&&(!Ht||!(typeof r=="object"&&Ht in r))}l(Hp,"isArray");function lC(r){return zr(r)==="[object Date]"&&(!Ht||!(typeof r=="object"&&Ht in r))}l(lC,"isDate");function hg(r){return zr(r)==="[object RegExp]"&&(!Ht||!(typeof r=="object"&&Ht in r))}l(hg,"isRegExp");function uC(r){return zr(r)==="[object Error]"&&(!Ht||!(typeof r=="object"&&Ht in r))}l(uC,"isError");function cC(r){return zr(r)==="[object String]"&&(!Ht||!(typeof r=="object"&&Ht in r))}l(cC,"isString");function pC(r){return zr(r)==="[object Number]"&&(!Ht||!(typeof r=="object"&&Ht in r))}l(pC,"isNumber");function hC(r){return zr(r)==="[object Boolean]"&&(!Ht||!(typeof r=="object"&&Ht in r))}l(hC,"isBoolean");function gg(r){if(On)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Gp)return!1;try{return Gp.call(r),!0}catch{}return!1}l(gg,"isSymbol");function dC(r){if(!r||typeof r!="object"||!Fp)return!1;try{return Fp.call(r),!0}catch{}return!1}l(dC,"isBigInt");var fC=Object.prototype.hasOwnProperty||function(r){return r in this};function Ur(r,t){return fC.call(r,t)}l(Ur,"has");function zr(r){return rC.call(r)}l(zr,"toStr");function mC(r){if(r.name)return r.name;var t=nC.call(iC.call(r),/^function\s*([\w$]+)/);return t?t[1]:null}l(mC,"nameOf");function vg(r,t){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e;return-1}l(vg,"indexOf");function yC(r){if(!Fl||!r||typeof r!="object")return!1;try{Fl.call(r);try{Gl.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}l(yC,"isMap");function gC(r){if(!Ko||!r||typeof r!="object")return!1;try{Ko.call(r,Ko);try{Qo.call(r,Qo)}catch{return!0}return r instanceof WeakMap}catch{}return!1}l(gC,"isWeakMap");function vC(r){if(!ng||!r||typeof r!="object")return!1;try{return ng.call(r),!0}catch{}return!1}l(vC,"isWeakRef");function bC(r){if(!Gl||!r||typeof r!="object")return!1;try{Gl.call(r);try{Fl.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}l(bC,"isSet");function CC(r){if(!Qo||!r||typeof r!="object")return!1;try{Qo.call(r,Qo);try{Ko.call(r,Ko)}catch{return!0}return r instanceof WeakSet}catch{}return!1}l(CC,"isWeakSet");function xC(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}l(xC,"isElement");function bg(r,t){if(r.length>t.maxStringLength){var e=r.length-t.maxStringLength,i="... "+e+" more character"+(e>1?"s":"");return bg(Wp.call(r,0,t.maxStringLength),t)+i}var n=Zr.call(Zr.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,SC);return yg(n,"single",t)}l(bg,"inspectString");function SC(r){var t=r.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+oC.call(t.toString(16))}l(SC,"lowbyte");function Jo(r){return"Object("+r+")"}l(Jo,"markBoxed");function Bp(r){return r+" { ? }"}l(Bp,"weakCollectionOf");function dg(r,t,e,i){var n=i?Xp(e,i):qe.call(e,", ");return r+" ("+t+") {"+n+"}"}l(dg,"collectionOf");function PC(r){for(var t=0;t<r.length;t++)if(vg(r[t],`
|
|
2
|
-
`)>=0)return!1;return!0}l(PC,"singleLineValues");function MC(r,t){var e;if(r.indent===" ")e=" ";else if(typeof r.indent=="number"&&r.indent>0)e=qe.call(Array(r.indent+1)," ");else return null;return{base:e,prev:qe.call(Array(t+1),e)}}l(MC,"getIndent");function Xp(r,t){if(r.length===0)return"";var e=`
|
|
3
|
-
`+t.prev+t.base;return e+qe.call(r,","+e)+`
|
|
4
|
-
`+t.prev}l(Xp,"indentedJoin");function Bl(r,t){var e=Hp(r),i=[];if(e){i.length=r.length;for(var n=0;n<r.length;n++)i[n]=Ur(r,n)?t(r[n],r):""}var o=typeof Rp=="function"?Rp(r):[],a;if(On){a={};for(var u=0;u<o.length;u++)a["$"+o[u]]=o[u]}for(var s in r)Ur(r,s)&&(e&&String(Number(s))===s&&s<r.length||On&&a["$"+s]instanceof Symbol||(fg.call(/[^\w$]/,s)?i.push(t(s,r)+": "+t(r[s],r)):i.push(s+": "+t(r[s],r))));if(typeof Rp=="function")for(var p=0;p<o.length;p++)mg.call(r,o[p])&&i.push("["+t(o[p])+"]: "+t(r[o[p]],r));return i}l(Bl,"arrObjKeys")});var Zp=k((UL,Pg)=>{"use strict";d();var Sg=Le(),An=pe(),wC=xg(),TC=yr(),Vl=Sg("%WeakMap%",!0),Hl=Sg("%Map%",!0),IC=An("WeakMap.prototype.get",!0),EC=An("WeakMap.prototype.set",!0),LC=An("WeakMap.prototype.has",!0),DC=An("Map.prototype.get",!0),_C=An("Map.prototype.set",!0),OC=An("Map.prototype.has",!0),Up=l(function(r,t){for(var e=r,i;(i=e.next)!==null;e=i)if(i.key===t)return e.next=i.next,i.next=r.next,r.next=i,i},"listGetNode"),AC=l(function(r,t){var e=Up(r,t);return e&&e.value},"listGet"),kC=l(function(r,t,e){var i=Up(r,t);i?i.value=e:r.next={key:t,next:r.next,value:e}},"listSet"),NC=l(function(r,t){return!!Up(r,t)},"listHas");Pg.exports=l(function(){var t,e,i,n={assert:function(o){if(!n.has(o))throw new TC("Side channel does not contain "+wC(o))},get:function(o){if(Vl&&o&&(typeof o=="object"||typeof o=="function")){if(t)return IC(t,o)}else if(Hl){if(e)return DC(e,o)}else if(i)return AC(i,o)},has:function(o){if(Vl&&o&&(typeof o=="object"||typeof o=="function")){if(t)return LC(t,o)}else if(Hl){if(e)return OC(e,o)}else if(i)return NC(i,o);return!1},set:function(o,a){Vl&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new Vl),EC(t,o,a)):Hl?(e||(e=new Hl),_C(e,o,a)):(i||(i={key:{},next:null}),kC(i,o,a))}};return n},"getSideChannel")});var wg=k((qL,Mg)=>{"use strict";d();var RC=Sp(),ta=Zp()(),gr=yr(),zp={assert:function(r,t){if(!r||typeof r!="object"&&typeof r!="function")throw new gr("`O` is not an object");if(typeof t!="string")throw new gr("`slot` must be a string");if(ta.assert(r),!zp.has(r,t))throw new gr("`"+t+"` is not present on `O`")},get:function(r,t){if(!r||typeof r!="object"&&typeof r!="function")throw new gr("`O` is not an object");if(typeof t!="string")throw new gr("`slot` must be a string");var e=ta.get(r);return e&&e["$"+t]},has:function(r,t){if(!r||typeof r!="object"&&typeof r!="function")throw new gr("`O` is not an object");if(typeof t!="string")throw new gr("`slot` must be a string");var e=ta.get(r);return!!e&&RC(e,"$"+t)},set:function(r,t,e){if(!r||typeof r!="object"&&typeof r!="function")throw new gr("`O` is not an object");if(typeof t!="string")throw new gr("`slot` must be a string");var i=ta.get(r);i||(i={},ta.set(r,i)),i["$"+t]=e}};Object.freeze&&Object.freeze(zp);Mg.exports=zp});var Eg=k((JL,Ig)=>{"use strict";d();var ea=wg(),BC=SyntaxError,Tg=typeof StopIteration=="object"?StopIteration:null;Ig.exports=l(function(t){if(!Tg)throw new BC("this environment lacks StopIteration");ea.set(t,"[[Done]]",!1);var e={next:l(function(){var n=ea.get(this,"[[Iterator]]"),o=ea.get(n,"[[Done]]");try{return{done:o,value:o?void 0:n.next()}}catch(a){if(ea.set(n,"[[Done]]",!0),a!==Tg)throw a;return{done:!0,value:void 0}}},"next")};return ea.set(e,"[[Iterator]]",t),e},"getStopIterationIterator")});var qp=k((tD,Lg)=>{d();var FC={}.toString;Lg.exports=Array.isArray||function(r){return FC.call(r)=="[object Array]"}});var $p=k((rD,Dg)=>{"use strict";d();var GC=String.prototype.valueOf,VC=l(function(t){try{return GC.call(t),!0}catch{return!1}},"tryStringObject"),HC=Object.prototype.toString,XC="[object String]",jC=Wr()();Dg.exports=l(function(t){return typeof t=="string"?!0:typeof t!="object"?!1:jC?VC(t):HC.call(t)===XC},"isString")});var Kp=k((oD,Ag)=>{"use strict";d();var Jp=typeof Map=="function"&&Map.prototype?Map:null,YC=typeof Set=="function"&&Set.prototype?Set:null,Xl;Jp||(Xl=l(function(t){return!1},"isMap"));var Og=Jp?Map.prototype.has:null,_g=YC?Set.prototype.has:null;!Xl&&!Og&&(Xl=l(function(t){return!1},"isMap"));Ag.exports=Xl||l(function(t){if(!t||typeof t!="object")return!1;try{if(Og.call(t),_g)try{_g.call(t)}catch{return!0}return t instanceof Jp}catch{}return!1},"isMap")});var th=k((lD,Rg)=>{"use strict";d();var WC=typeof Map=="function"&&Map.prototype?Map:null,Qp=typeof Set=="function"&&Set.prototype?Set:null,jl;Qp||(jl=l(function(t){return!1},"isSet"));var kg=WC?Map.prototype.has:null,Ng=Qp?Set.prototype.has:null;!jl&&!Ng&&(jl=l(function(t){return!1},"isSet"));Rg.exports=jl||l(function(t){if(!t||typeof t!="object")return!1;try{if(Ng.call(t),kg)try{kg.call(t)}catch{return!0}return t instanceof Qp}catch{}return!1},"isSet")});var zg=k((pD,Ul)=>{"use strict";d();var Bg=Ap(),Fg=Eg();Ml()()||Zo()()?(Yl=Symbol.iterator,Ul.exports=l(function(t){if(t!=null&&typeof t[Yl]<"u")return t[Yl]();if(Bg(t))return Array.prototype[Yl].call(t)},"getIterator")):(Gg=qp(),Vg=$p(),eh=Le(),Hg=eh("%Map%",!0),Xg=eh("%Set%",!0),ve=pe(),rh=ve("Array.prototype.push"),ih=ve("String.prototype.charCodeAt"),jg=ve("String.prototype.slice"),Yg=l(function(t,e){var i=t.length;if(e+1>=i)return e+1;var n=ih(t,e);if(n<55296||n>56319)return e+1;var o=ih(t,e+1);return o<56320||o>57343?e+1:e+2},"advanceStringIndex"),Wl=l(function(t){var e=0;return{next:l(function(){var n=e>=t.length,o;return n||(o=t[e],e+=1),{done:n,value:o}},"next")}},"getArrayIterator"),nh=l(function(t,e){if(Gg(t)||Bg(t))return Wl(t);if(Vg(t)){var i=0;return{next:l(function(){var o=Yg(t,i),a=jg(t,i,o);return i=o,{done:o>t.length,value:a}},"next")}}if(e&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()},"getNonCollectionIterator"),!Hg&&!Xg?Ul.exports=l(function(t){if(t!=null)return nh(t,!0)},"getIterator"):(Wg=Kp(),Ug=th(),oh=ve("Map.prototype.forEach",!0),ah=ve("Set.prototype.forEach",!0),(typeof b>"u"||!b.versions||!b.versions.node)&&(sh=ve("Map.prototype.iterator",!0),lh=ve("Set.prototype.iterator",!0)),uh=ve("Map.prototype.@@iterator",!0)||ve("Map.prototype._es6-shim iterator_",!0),ch=ve("Set.prototype.@@iterator",!0)||ve("Set.prototype._es6-shim iterator_",!0),Zg=l(function(t){if(Wg(t)){if(sh)return Fg(sh(t));if(uh)return uh(t);if(oh){var e=[];return oh(t,function(n,o){rh(e,[o,n])}),Wl(e)}}if(Ug(t)){if(lh)return Fg(lh(t));if(ch)return ch(t);if(ah){var i=[];return ah(t,function(n){rh(i,n)}),Wl(i)}}},"getCollectionIterator"),Ul.exports=l(function(t){return Zg(t)||nh(t)},"getIterator")));var Yl,Gg,Vg,eh,Hg,Xg,ve,rh,ih,jg,Yg,Wl,nh,Wg,Ug,oh,ah,sh,lh,uh,ch,Zg});var ph=k((fD,$g)=>{"use strict";d();var qg=l(function(r){return r!==r},"numberIsNaN");$g.exports=l(function(t,e){return t===0&&e===0?1/t===1/e:!!(t===e||qg(t)&&qg(e))},"is")});var hh=k((gD,Jg)=>{"use strict";d();var UC=ph();Jg.exports=l(function(){return typeof Object.is=="function"?Object.is:UC},"getPolyfill")});var Qg=k((CD,Kg)=>{"use strict";d();var ZC=hh(),zC=Yr();Kg.exports=l(function(){var t=ZC();return zC(Object,{is:t},{is:l(function(){return Object.is!==t},"testObjectIs")}),t},"shimObjectIs")});var i2=k((PD,r2)=>{"use strict";d();var qC=Yr(),$C=wi(),JC=ph(),t2=hh(),KC=Qg(),e2=$C(t2(),Object);qC(e2,{getPolyfill:t2,implementation:JC,shim:KC});r2.exports=e2});var fh=k((wD,s2)=>{"use strict";d();var QC=wi(),a2=pe(),t8=Le(),dh=t8("%ArrayBuffer%",!0),Zl=a2("ArrayBuffer.prototype.byteLength",!0),e8=a2("Object.prototype.toString"),n2=!!dh&&!Zl&&new dh(0).slice,o2=!!n2&&QC(n2);s2.exports=l(Zl||o2?function(t){if(!t||typeof t!="object")return!1;try{return Zl?Zl(t):o2(t,0),!0}catch{return!1}}:dh?function(t){return e8(t)==="[object ArrayBuffer]"}:function(t){return!1},"isArrayBuffer")});var u2=k((ED,l2)=>{"use strict";d();var r8=Date.prototype.getDay,i8=l(function(t){try{return r8.call(t),!0}catch{return!1}},"tryDateGetDayCall"),n8=Object.prototype.toString,o8="[object Date]",a8=Wr()();l2.exports=l(function(t){return typeof t!="object"||t===null?!1:a8?i8(t):n8.call(t)===o8},"isDateObject")});var f2=k((_D,d2)=>{"use strict";d();var mh=pe(),c2=Wr()(),p2,h2,yh,gh;c2&&(p2=mh("Object.prototype.hasOwnProperty"),h2=mh("RegExp.prototype.exec"),yh={},zl=l(function(){throw yh},"throwRegexMarker"),gh={toString:zl,valueOf:zl},typeof Symbol.toPrimitive=="symbol"&&(gh[Symbol.toPrimitive]=zl));var zl,s8=mh("Object.prototype.toString"),l8=Object.getOwnPropertyDescriptor,u8="[object RegExp]";d2.exports=l(c2?function(t){if(!t||typeof t!="object")return!1;var e=l8(t,"lastIndex"),i=e&&p2(e,"value");if(!i)return!1;try{h2(t,gh)}catch(n){return n===yh}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:s8(t)===u8},"isRegex")});var g2=k((kD,y2)=>{"use strict";d();var c8=pe(),m2=c8("SharedArrayBuffer.prototype.byteLength",!0);y2.exports=l(m2?function(t){if(!t||typeof t!="object")return!1;try{return m2(t),!0}catch{return!1}}:function(t){return!1},"isSharedArrayBuffer")});var b2=k((BD,v2)=>{"use strict";d();var p8=Number.prototype.toString,h8=l(function(t){try{return p8.call(t),!0}catch{return!1}},"tryNumberObject"),d8=Object.prototype.toString,f8="[object Number]",m8=Wr()();v2.exports=l(function(t){return typeof t=="number"?!0:typeof t!="object"?!1:m8?h8(t):d8.call(t)===f8},"isNumberObject")});var S2=k((VD,x2)=>{"use strict";d();var C2=pe(),y8=C2("Boolean.prototype.toString"),g8=C2("Object.prototype.toString"),v8=l(function(t){try{return y8(t),!0}catch{return!1}},"booleanBrandCheck"),b8="[object Boolean]",C8=Wr()();x2.exports=l(function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:C8&&Symbol.toStringTag in t?v8(t):g8(t)===b8},"isBoolean")});var T2=k((jD,vh)=>{"use strict";d();var x8=Object.prototype.toString,S8=Ml()();S8?(P2=Symbol.prototype.toString,M2=/^Symbol\(.*\)$/,w2=l(function(t){return typeof t.valueOf()!="symbol"?!1:M2.test(P2.call(t))},"isRealSymbolObject"),vh.exports=l(function(t){if(typeof t=="symbol")return!0;if(x8.call(t)!=="[object Symbol]")return!1;try{return w2(t)}catch{return!1}},"isSymbol")):vh.exports=l(function(t){return!1},"isSymbol");var P2,M2,w2});var L2=k((UD,E2)=>{"use strict";d();var I2=typeof BigInt<"u"&&BigInt;E2.exports=l(function(){return typeof I2=="function"&&typeof BigInt=="function"&&typeof I2(42)=="bigint"&&typeof BigInt(42)=="bigint"},"hasNativeBigInts")});var O2=k((qD,bh)=>{"use strict";d();var P8=L2()();P8?(D2=BigInt.prototype.valueOf,_2=l(function(t){try{return D2.call(t),!0}catch{}return!1},"tryBigIntObject"),bh.exports=l(function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:_2(t)},"isBigInt")):bh.exports=l(function(t){return!1},"isBigInt");var D2,_2});var k2=k((KD,A2)=>{"use strict";d();var M8=$p(),w8=b2(),T8=S2(),I8=T2(),E8=O2();A2.exports=l(function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(M8(t))return"String";if(w8(t))return"Number";if(T8(t))return"Boolean";if(I8(t))return"Symbol";if(E8(t))return"BigInt"},"whichBoxedPrimitive")});var B2=k((e_,R2)=>{"use strict";d();var ql=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,N2=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,$l;ql||($l=l(function(t){return!1},"isWeakMap"));var xh=ql?ql.prototype.has:null,Ch=N2?N2.prototype.has:null;!$l&&!xh&&($l=l(function(t){return!1},"isWeakMap"));R2.exports=$l||l(function(t){if(!t||typeof t!="object")return!1;try{if(xh.call(t,xh),Ch)try{Ch.call(t,Ch)}catch{return!0}return t instanceof ql}catch{}return!1},"isWeakMap")});var G2=k((n_,Ph)=>{"use strict";d();var L8=Le(),F2=pe(),D8=L8("%WeakSet%",!0),Sh=F2("WeakSet.prototype.has",!0);Sh?(Jl=F2("WeakMap.prototype.has",!0),Ph.exports=l(function(t){if(!t||typeof t!="object")return!1;try{if(Sh(t,Sh),Jl)try{Jl(t,Jl)}catch{return!0}return t instanceof D8}catch{}return!1},"isWeakSet")):Ph.exports=l(function(t){return!1},"isWeakSet");var Jl});var H2=k((s_,V2)=>{"use strict";d();var _8=Kp(),O8=th(),A8=B2(),k8=G2();V2.exports=l(function(t){if(t&&typeof t=="object"){if(_8(t))return"Map";if(O8(t))return"Set";if(A8(t))return"WeakMap";if(k8(t))return"WeakSet"}return!1},"whichCollection")});var W2=k((c_,Y2)=>{"use strict";d();var j2=Function.prototype.toString,kn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,wh,Kl;if(typeof kn=="function"&&typeof Object.defineProperty=="function")try{wh=Object.defineProperty({},"length",{get:function(){throw Kl}}),Kl={},kn(function(){throw 42},null,wh)}catch(r){r!==Kl&&(kn=null)}else kn=null;var N8=/^\s*class\b/,Th=l(function(t){try{var e=j2.call(t);return N8.test(e)}catch{return!1}},"isES6ClassFunction"),Mh=l(function(t){try{return Th(t)?!1:(j2.call(t),!0)}catch{return!1}},"tryFunctionToStr"),Ql=Object.prototype.toString,R8="[object Object]",B8="[object Function]",F8="[object GeneratorFunction]",G8="[object HTMLAllCollection]",V8="[object HTML document.all class]",H8="[object HTMLCollection]",X8=typeof Symbol=="function"&&!!Symbol.toStringTag,j8=!(0 in[,]),Ih=l(function(){return!1},"isDocumentDotAll");typeof document=="object"&&(X2=document.all,Ql.call(X2)===Ql.call(document.all)&&(Ih=l(function(t){if((j8||!t)&&(typeof t>"u"||typeof t=="object"))try{var e=Ql.call(t);return(e===G8||e===V8||e===H8||e===R8)&&t("")==null}catch{}return!1},"isDocumentDotAll")));var X2;Y2.exports=l(kn?function(t){if(Ih(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{kn(t,null,wh)}catch(e){if(e!==Kl)return!1}return!Th(t)&&Mh(t)}:function(t){if(Ih(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(X8)return Mh(t);if(Th(t))return!1;var e=Ql.call(t);return e!==B8&&e!==F8&&!/^\[object HTML/.test(e)?!1:Mh(t)},"isCallable")});var z2=k((d_,Z2)=>{"use strict";d();var Y8=W2(),W8=Object.prototype.toString,U2=Object.prototype.hasOwnProperty,U8=l(function(t,e,i){for(var n=0,o=t.length;n<o;n++)U2.call(t,n)&&(i==null?e(t[n],n,t):e.call(i,t[n],n,t))},"forEachArray"),Z8=l(function(t,e,i){for(var n=0,o=t.length;n<o;n++)i==null?e(t.charAt(n),n,t):e.call(i,t.charAt(n),n,t)},"forEachString"),z8=l(function(t,e,i){for(var n in t)U2.call(t,n)&&(i==null?e(t[n],n,t):e.call(i,t[n],n,t))},"forEachObject"),q8=l(function(t,e,i){if(!Y8(e))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),W8.call(t)==="[object Array]"?U8(t,e,n):typeof t=="string"?Z8(t,e,n):z8(t,e,n)},"forEach");Z2.exports=q8});var $2=k((y_,q2)=>{"use strict";d();q2.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var K2=k((v_,J2)=>{"use strict";d();var Eh=$2(),$8=typeof globalThis>"u"?global:globalThis;J2.exports=l(function(){for(var t=[],e=0;e<Eh.length;e++)typeof $8[Eh[e]]=="function"&&(t[t.length]=Eh[e]);return t},"availableTypedArrays")});var iv=k((x_,rv)=>{"use strict";d();var eu=z2(),J8=K2(),Q2=wi(),_h=pe(),tu=_l(),K8=_h("Object.prototype.toString"),ev=Wr()(),tv=typeof globalThis>"u"?global:globalThis,Dh=J8(),Oh=_h("String.prototype.slice"),Lh=Object.getPrototypeOf,Q8=_h("Array.prototype.indexOf",!0)||l(function(t,e){for(var i=0;i<t.length;i+=1)if(t[i]===e)return i;return-1},"indexOf"),ru={__proto__:null};ev&&tu&&Lh?eu(Dh,function(r){var t=new tv[r];if(Symbol.toStringTag in t){var e=Lh(t),i=tu(e,Symbol.toStringTag);if(!i){var n=Lh(e);i=tu(n,Symbol.toStringTag)}ru["$"+r]=Q2(i.get)}}):eu(Dh,function(r){var t=new tv[r],e=t.slice||t.set;e&&(ru["$"+r]=Q2(e))});var t9=l(function(t){var e=!1;return eu(ru,function(i,n){if(!e)try{"$"+i(t)===n&&(e=Oh(n,1))}catch{}}),e},"tryAllTypedArrays"),e9=l(function(t){var e=!1;return eu(ru,function(i,n){if(!e)try{i(t),e=Oh(n,1)}catch{}}),e},"tryAllSlices");rv.exports=l(function(t){if(!t||typeof t!="object")return!1;if(!ev){var e=Oh(K8(t),8,-1);return Q8(Dh,e)>-1?e:e!=="Object"?!1:e9(t)}return tu?t9(t):null},"whichTypedArray")});var av=k((M_,ov)=>{"use strict";d();var r9=pe(),nv=r9("ArrayBuffer.prototype.byteLength",!0),i9=fh();ov.exports=l(function(t){return i9(t)?nv?nv(t):t.byteLength:NaN},"byteLength")});var _v=k((I_,Dv)=>{"use strict";d();var Iv=B0(),$e=pe(),sv=J0(),n9=Le(),Nn=zg(),o9=Zp(),lv=i2(),uv=Ap(),cv=qp(),pv=fh(),hv=u2(),dv=f2(),fv=g2(),mv=Pl(),yv=k2(),gv=H2(),vv=iv(),bv=av(),Cv=$e("SharedArrayBuffer.prototype.byteLength",!0),xv=$e("Date.prototype.getTime"),Ah=Object.getPrototypeOf,Sv=$e("Object.prototype.toString"),nu=n9("%Set%",!0),kh=$e("Map.prototype.has",!0),ou=$e("Map.prototype.get",!0),Pv=$e("Map.prototype.size",!0),au=$e("Set.prototype.add",!0),Ev=$e("Set.prototype.delete",!0),su=$e("Set.prototype.has",!0),iu=$e("Set.prototype.size",!0);function Mv(r,t,e,i){for(var n=Nn(r),o;(o=n.next())&&!o.done;)if(De(t,o.value,e,i))return Ev(r,o.value),!0;return!1}l(Mv,"setHasEqualElement");function Lv(r){if(typeof r>"u")return null;if(typeof r!="object")return typeof r=="symbol"?!1:typeof r=="string"||typeof r=="number"?+r==+r:!0}l(Lv,"findLooseMatchingPrimitives");function a9(r,t,e,i,n,o){var a=Lv(e);if(a!=null)return a;var u=ou(t,a),s=Iv({},n,{strict:!1});return typeof u>"u"&&!kh(t,a)||!De(i,u,s,o)?!1:!kh(r,a)&&De(i,u,s,o)}l(a9,"mapMightHaveLoosePrim");function s9(r,t,e){var i=Lv(e);return i!=null?i:su(t,i)&&!su(r,i)}l(s9,"setMightHaveLoosePrim");function wv(r,t,e,i,n,o){for(var a=Nn(r),u,s;(u=a.next())&&!u.done;)if(s=u.value,De(e,s,n,o)&&De(i,ou(t,s),n,o))return Ev(r,s),!0;return!1}l(wv,"mapHasEqualEntry");function De(r,t,e,i){var n=e||{};if(n.strict?lv(r,t):r===t)return!0;var o=yv(r),a=yv(t);if(o!==a)return!1;if(!r||!t||typeof r!="object"&&typeof t!="object")return n.strict?lv(r,t):r==t;var u=i.has(r),s=i.has(t),p;if(u&&s){if(i.get(r)===i.get(t))return!0}else p={};return u||i.set(r,p),s||i.set(t,p),c9(r,t,n,i)}l(De,"internalDeepEqual");function Tv(r){return!r||typeof r!="object"||typeof r.length!="number"||typeof r.copy!="function"||typeof r.slice!="function"||r.length>0&&typeof r[0]!="number"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))}l(Tv,"isBuffer");function l9(r,t,e,i){if(iu(r)!==iu(t))return!1;for(var n=Nn(r),o=Nn(t),a,u,s;(a=n.next())&&!a.done;)if(a.value&&typeof a.value=="object")s||(s=new nu),au(s,a.value);else if(!su(t,a.value)){if(e.strict||!s9(r,t,a.value))return!1;s||(s=new nu),au(s,a.value)}if(s){for(;(u=o.next())&&!u.done;)if(u.value&&typeof u.value=="object"){if(!Mv(s,u.value,e.strict,i))return!1}else if(!e.strict&&!su(r,u.value)&&!Mv(s,u.value,e.strict,i))return!1;return iu(s)===0}return!0}l(l9,"setEquiv");function u9(r,t,e,i){if(Pv(r)!==Pv(t))return!1;for(var n=Nn(r),o=Nn(t),a,u,s,p,f,m;(a=n.next())&&!a.done;)if(p=a.value[0],f=a.value[1],p&&typeof p=="object")s||(s=new nu),au(s,p);else if(m=ou(t,p),typeof m>"u"&&!kh(t,p)||!De(f,m,e,i)){if(e.strict||!a9(r,t,p,f,e,i))return!1;s||(s=new nu),au(s,p)}if(s){for(;(u=o.next())&&!u.done;)if(p=u.value[0],m=u.value[1],p&&typeof p=="object"){if(!wv(s,r,p,m,e,i))return!1}else if(!e.strict&&(!r.has(p)||!De(ou(r,p),m,e,i))&&!wv(s,r,p,m,Iv({},e,{strict:!1}),i))return!1;return iu(s)===0}return!0}l(u9,"mapEquiv");function c9(r,t,e,i){var n,o;if(typeof r!=typeof t||r==null||t==null||Sv(r)!==Sv(t)||uv(r)!==uv(t))return!1;var a=cv(r),u=cv(t);if(a!==u)return!1;var s=r instanceof Error,p=t instanceof Error;if(s!==p||(s||p)&&(r.name!==t.name||r.message!==t.message))return!1;var f=dv(r),m=dv(t);if(f!==m||(f||m)&&(r.source!==t.source||sv(r)!==sv(t)))return!1;var y=hv(r),x=hv(t);if(y!==x||(y||x)&&xv(r)!==xv(t)||e.strict&&Ah&&Ah(r)!==Ah(t))return!1;var S=vv(r),M=vv(t);if(S!==M)return!1;if(S||M){if(r.length!==t.length)return!1;for(n=0;n<r.length;n++)if(r[n]!==t[n])return!1;return!0}var g=Tv(r),C=Tv(t);if(g!==C)return!1;if(g||C){if(r.length!==t.length)return!1;for(n=0;n<r.length;n++)if(r[n]!==t[n])return!1;return!0}var I=pv(r),T=pv(t);if(I!==T)return!1;if(I||T)return bv(r)!==bv(t)?!1:typeof Uint8Array=="function"&&De(new Uint8Array(r),new Uint8Array(t),e,i);var w=fv(r),L=fv(t);if(w!==L)return!1;if(w||L)return Cv(r)!==Cv(t)?!1:typeof Uint8Array=="function"&&De(new Uint8Array(r),new Uint8Array(t),e,i);if(typeof r!=typeof t)return!1;var D=mv(r),R=mv(t);if(D.length!==R.length)return!1;for(D.sort(),R.sort(),n=D.length-1;n>=0;n--)if(D[n]!=R[n])return!1;for(n=D.length-1;n>=0;n--)if(o=D[n],!De(r[o],t[o],e,i))return!1;var G=gv(r),N=gv(t);return G!==N?!1:G==="Set"||N==="Set"?l9(r,t,e,i):G==="Map"?u9(r,t,e,i):!0}l(c9,"objEquiv");Dv.exports=l(function(t,e,i){return De(t,e,i,o9())},"deepEqual")});var Zv=k(it=>{"use strict";d();Object.defineProperty(it,"__esModule",{value:!0});function p9(r){return r&&r.__esModule?r:{default:r}}l(p9,"_interopRequireDefault");var h9=Object.defineProperty,ot=l((r,t)=>h9(r,"name",{value:t,configurable:!0}),"__name"),d9=_v(),f9=p9(d9),na,Ov=(na=class{constructor(t){this.direction=!1,this.compareProperties=!0;var e,i,n;this.precision=10**-((e=t==null?void 0:t.precision)!=null?e:17),this.direction=(i=t==null?void 0:t.direction)!=null?i:!1,this.compareProperties=(n=t==null?void 0:t.compareProperties)!=null?n:!0}compare(t,e){if(t.type!==e.type||!ra(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates);case"Polygon":return this.comparePolygon(t,e);case"GeometryCollection":return this.compareGeometryCollection(t,e);case"Feature":return this.compareFeature(t,e);case"FeatureCollection":return this.compareFeatureCollection(t,e);default:if(t.type.startsWith("Multi")){let i=Nh(t),n=Nh(e);return i.every(o=>n.some(a=>this.compare(o,a)))}}return!1}compareCoord(t,e){return t.length===e.length&&t.every((i,n)=>Math.abs(i-e[n])<this.precision)}compareLine(t,e,i=0,n=!1){if(!ra(t,e))return!1;let o=t,a=e;if(n&&!this.compareCoord(o[0],a[0])){let s=this.fixStartIndex(a,o);if(s)a=s;else return!1}let u=this.compareCoord(o[i],a[i]);return this.direction||u?this.comparePath(o,a):this.compareCoord(o[i],a[a.length-(1+i)])?this.comparePath(o.slice().reverse(),a):!1}fixStartIndex(t,e){let i,n=-1;for(let o=0;o<t.length;o++)if(this.compareCoord(t[o],e[0])){n=o;break}return n>=0&&(i=[].concat(t.slice(n,t.length),t.slice(1,n+1))),i}comparePath(t,e){return t.every((i,n)=>this.compareCoord(i,e[n]))}comparePolygon(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){let i=t.coordinates.slice(1,t.coordinates.length),n=e.coordinates.slice(1,e.coordinates.length);return i.every(o=>n.some(a=>this.compareLine(o,a,1,!0)))}return!1}compareGeometryCollection(t,e){return ra(t.geometries,e.geometries)&&this.compareBBox(t,e)&&t.geometries.every((i,n)=>this.compare(i,e.geometries[n]))}compareFeature(t,e){return t.id===e.id&&(this.compareProperties?f9.default.call(void 0,t.properties,e.properties):!0)&&this.compareBBox(t,e)&&this.compare(t.geometry,e.geometry)}compareFeatureCollection(t,e){return ra(t.features,e.features)&&this.compareBBox(t,e)&&t.features.every((i,n)=>this.compare(i,e.features[n]))}compareBBox(t,e){return!t.bbox&&!e.bbox||(t.bbox&&e.bbox?this.compareCoord(t.bbox,e.bbox):!1)}},l(na,"_GeojsonEquality"),na);ot(Ov,"GeojsonEquality");var m9=Ov;function ra(r,t){return r.coordinates?r.coordinates.length===t.coordinates.length:r.length===t.length}l(ra,"sameLength");ot(ra,"sameLength");function Nh(r){return r.coordinates.map(t=>({type:r.type.replace("Multi",""),coordinates:t}))}l(Nh,"explode");ot(Nh,"explode");var ie=63710088e-1,Bh={centimeters:ie*100,centimetres:ie*100,degrees:360/(2*Math.PI),feet:ie*3.28084,inches:ie*39.37,kilometers:ie/1e3,kilometres:ie/1e3,meters:ie,metres:ie,miles:ie/1609.344,millimeters:ie*1e3,millimetres:ie*1e3,nauticalmiles:ie/1852,radians:1,yards:ie*1.0936},Rh={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,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function vr(r,t,e={}){let i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=t||{},i.geometry=r,i}l(vr,"feature");ot(vr,"feature");function Av(r,t,e={}){switch(r){case"Point":return lu(t).geometry;case"LineString":return cu(t).geometry;case"Polygon":return uu(t).geometry;case"MultiPoint":return Gh(t).geometry;case"MultiLineString":return Fh(t).geometry;case"MultiPolygon":return Vh(t).geometry;default:throw new Error(r+" is invalid")}}l(Av,"geometry");ot(Av,"geometry");function lu(r,t,e={}){if(!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(!ia(r[0])||!ia(r[1]))throw new Error("coordinates must contain numbers");return vr({type:"Point",coordinates:r},t,e)}l(lu,"point");ot(lu,"point");function kv(r,t,e={}){return oa(r.map(i=>lu(i,t)),e)}l(kv,"points");ot(kv,"points");function uu(r,t,e={}){for(let n of r){if(n.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(n[n.length-1].length!==n[0].length)throw new Error("First and last Position are not equivalent.");for(let o=0;o<n[n.length-1].length;o++)if(n[n.length-1][o]!==n[0][o])throw new Error("First and last Position are not equivalent.")}return vr({type:"Polygon",coordinates:r},t,e)}l(uu,"polygon");ot(uu,"polygon");function Nv(r,t,e={}){return oa(r.map(i=>uu(i,t)),e)}l(Nv,"polygons");ot(Nv,"polygons");function cu(r,t,e={}){if(r.length<2)throw new Error("coordinates must be an array of two or more positions");return vr({type:"LineString",coordinates:r},t,e)}l(cu,"lineString");ot(cu,"lineString");function Rv(r,t,e={}){return oa(r.map(i=>cu(i,t)),e)}l(Rv,"lineStrings");ot(Rv,"lineStrings");function oa(r,t={}){let e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=r,e}l(oa,"featureCollection");ot(oa,"featureCollection");function Fh(r,t,e={}){return vr({type:"MultiLineString",coordinates:r},t,e)}l(Fh,"multiLineString");ot(Fh,"multiLineString");function Gh(r,t,e={}){return vr({type:"MultiPoint",coordinates:r},t,e)}l(Gh,"multiPoint");ot(Gh,"multiPoint");function Vh(r,t,e={}){return vr({type:"MultiPolygon",coordinates:r},t,e)}l(Vh,"multiPolygon");ot(Vh,"multiPolygon");function Bv(r,t,e={}){return vr({type:"GeometryCollection",geometries:r},t,e)}l(Bv,"geometryCollection");ot(Bv,"geometryCollection");function Fv(r,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let e=Math.pow(10,t||0);return Math.round(r*e)/e}l(Fv,"round");ot(Fv,"round");function Hh(r,t="kilometers"){let e=Bh[t];if(!e)throw new Error(t+" units is invalid");return r*e}l(Hh,"radiansToLength");ot(Hh,"radiansToLength");function pu(r,t="kilometers"){let e=Bh[t];if(!e)throw new Error(t+" units is invalid");return r/e}l(pu,"lengthToRadians");ot(pu,"lengthToRadians");function Gv(r,t){return Xh(pu(r,t))}l(Gv,"lengthToDegrees");ot(Gv,"lengthToDegrees");function Vv(r){let t=r%360;return t<0&&(t+=360),t}l(Vv,"bearingToAzimuth");ot(Vv,"bearingToAzimuth");function Xh(r){return r%(2*Math.PI)*180/Math.PI}l(Xh,"radiansToDegrees");ot(Xh,"radiansToDegrees");function Hv(r){return r%360*Math.PI/180}l(Hv,"degreesToRadians");ot(Hv,"degreesToRadians");function Xv(r,t="kilometers",e="kilometers"){if(!(r>=0))throw new Error("length must be a positive number");return Hh(pu(r,t),e)}l(Xv,"convertLength");ot(Xv,"convertLength");function jv(r,t="meters",e="kilometers"){if(!(r>=0))throw new Error("area must be a positive number");let i=Rh[t];if(!i)throw new Error("invalid original units");let n=Rh[e];if(!n)throw new Error("invalid final units");return r/i*n}l(jv,"convertArea");ot(jv,"convertArea");function ia(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}l(ia,"isNumber");ot(ia,"isNumber");function Yv(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}l(Yv,"isObject");ot(Yv,"isObject");function Wv(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(t=>{if(!ia(t))throw new Error("bbox must only contain numbers")})}l(Wv,"validateBBox");ot(Wv,"validateBBox");function Uv(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}l(Uv,"validateId");ot(Uv,"validateId");it.GeojsonEquality=m9;it.areaFactors=Rh;it.bearingToAzimuth=Vv;it.convertArea=jv;it.convertLength=Xv;it.degreesToRadians=Hv;it.earthRadius=ie;it.factors=Bh;it.feature=vr;it.featureCollection=oa;it.geometry=Av;it.geometryCollection=Bv;it.isNumber=ia;it.isObject=Yv;it.lengthToDegrees=Gv;it.lengthToRadians=pu;it.lineString=cu;it.lineStrings=Rv;it.multiLineString=Fh;it.multiPoint=Gh;it.multiPolygon=Vh;it.point=lu;it.points=kv;it.polygon=uu;it.polygons=Nv;it.radiansToDegrees=Xh;it.radiansToLength=Hh;it.round=Fv;it.validateBBox=Wv;it.validateId=Uv});var n3=k(Lt=>{"use strict";d();Object.defineProperty(Lt,"__esModule",{value:!0});var y9=Object.defineProperty,Bt=l((r,t)=>y9(r,"name",{value:t,configurable:!0}),"__name"),Xt=Zv();function Rn(r,t,e){if(r!==null)for(var i,n,o,a,u,s,p,f=0,m=0,y,x=r.type,S=x==="FeatureCollection",M=x==="Feature",g=S?r.features.length:1,C=0;C<g;C++){p=S?r.features[C].geometry:M?r.geometry:r,y=p?p.type==="GeometryCollection":!1,u=y?p.geometries.length:1;for(var I=0;I<u;I++){var T=0,w=0;if(a=y?p.geometries[I]:p,a!==null){s=a.coordinates;var L=a.type;switch(f=e&&(L==="Polygon"||L==="MultiPolygon")?1:0,L){case null:break;case"Point":if(t(s,m,C,T,w)===!1)return!1;m++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<s.length;i++){if(t(s[i],m,C,T,w)===!1)return!1;m++,L==="MultiPoint"&&T++}L==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<s.length;i++){for(n=0;n<s[i].length-f;n++){if(t(s[i][n],m,C,T,w)===!1)return!1;m++}L==="MultiLineString"&&T++,L==="Polygon"&&w++}L==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<s.length;i++){for(w=0,n=0;n<s[i].length;n++){for(o=0;o<s[i][n].length-f;o++){if(t(s[i][n][o],m,C,T,w)===!1)return!1;m++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(Rn(a.geometries[i],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}l(Rn,"coordEach");Bt(Rn,"coordEach");function zv(r,t,e,i){var n=e;return Rn(r,function(o,a,u,s,p){a===0&&e===void 0?n=o:n=t(n,o,a,u,s,p)},i),n}l(zv,"coordReduce");Bt(zv,"coordReduce");function jh(r,t){var e;switch(r.type){case"FeatureCollection":for(e=0;e<r.features.length&&t(r.features[e].properties,e)!==!1;e++);break;case"Feature":t(r.properties,0);break}}l(jh,"propEach");Bt(jh,"propEach");function qv(r,t,e){var i=e;return jh(r,function(n,o){o===0&&e===void 0?i=n:i=t(i,n,o)}),i}l(qv,"propReduce");Bt(qv,"propReduce");function Yh(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++);}l(Yh,"featureEach");Bt(Yh,"featureEach");function $v(r,t,e){var i=e;return Yh(r,function(n,o){o===0&&e===void 0?i=n:i=t(i,n,o)}),i}l($v,"featureReduce");Bt($v,"featureReduce");function Jv(r){var t=[];return Rn(r,function(e){t.push(e)}),t}l(Jv,"coordAll");Bt(Jv,"coordAll");function hu(r,t){var e,i,n,o,a,u,s,p,f,m,y=0,x=r.type==="FeatureCollection",S=r.type==="Feature",M=x?r.features.length:1;for(e=0;e<M;e++){for(u=x?r.features[e].geometry:S?r.geometry:r,p=x?r.features[e].properties:S?r.properties:{},f=x?r.features[e].bbox:S?r.bbox:void 0,m=x?r.features[e].id:S?r.id:void 0,s=u?u.type==="GeometryCollection":!1,a=s?u.geometries.length:1,n=0;n<a;n++){if(o=s?u.geometries[n]:u,o===null){if(t(null,y,p,f,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,y,p,f,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],y,p,f,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}l(hu,"geomEach");Bt(hu,"geomEach");function Kv(r,t,e){var i=e;return hu(r,function(n,o,a,u,s){o===0&&e===void 0?i=n:i=t(i,n,o,a,u,s)}),i}l(Kv,"geomReduce");Bt(Kv,"geomReduce");function aa(r,t){hu(r,function(e,i,n,o,a){var u=e===null?null:e.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return t(Xt.feature.call(void 0,e,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var s;switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon";break}for(var p=0;p<e.coordinates.length;p++){var f=e.coordinates[p],m={type:s,coordinates:f};if(t(Xt.feature.call(void 0,m,n),i,p)===!1)return!1}})}l(aa,"flattenEach");Bt(aa,"flattenEach");function Qv(r,t,e){var i=e;return aa(r,function(n,o,a){o===0&&a===0&&e===void 0?i=n:i=t(i,n,o,a)}),i}l(Qv,"flattenReduce");Bt(Qv,"flattenReduce");function Wh(r,t){aa(r,function(e,i,n){var o=0;if(e.geometry){var a=e.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var u,s=0,p=0,f=0;if(Rn(e,function(m,y,x,S,M){if(u===void 0||i>s||S>p||M>f){u=m,s=i,p=S,f=M,o=0;return}var g=Xt.lineString.call(void 0,[u,m],e.properties);if(t(g,i,n,M,o)===!1)return!1;o++,u=m})===!1)return!1}}})}l(Wh,"segmentEach");Bt(Wh,"segmentEach");function t3(r,t,e){var i=e,n=!1;return Wh(r,function(o,a,u,s,p){n===!1&&e===void 0?i=o:i=t(i,o,a,u,s,p),n=!0}),i}l(t3,"segmentReduce");Bt(t3,"segmentReduce");function Uh(r,t){if(!r)throw new Error("geojson is required");aa(r,function(e,i,n){if(e.geometry!==null){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(t(e,i,n,0,0)===!1)return!1;break;case"Polygon":for(var u=0;u<a.length;u++)if(t(Xt.lineString.call(void 0,a[u],e.properties),i,n,u)===!1)return!1;break}}})}l(Uh,"lineEach");Bt(Uh,"lineEach");function e3(r,t,e){var i=e;return Uh(r,function(n,o,a,u){o===0&&e===void 0?i=n:i=t(i,n,o,a,u)}),i}l(e3,"lineReduce");Bt(e3,"lineReduce");function r3(r,t){if(t=t||{},!Xt.isObject.call(void 0,t))throw new Error("options is invalid");var e=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.segmentIndex||0,a=t.properties,u;switch(r.type){case"FeatureCollection":e<0&&(e=r.features.length+e),a=a||r.features[e].properties,u=r.features[e].geometry;break;case"Feature":a=a||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var s=u.coordinates;switch(u.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=s.length+o-1),Xt.lineString.call(void 0,[s[o],s[o+1]],a,t);case"Polygon":return n<0&&(n=s.length+n),o<0&&(o=s[n].length+o-1),Xt.lineString.call(void 0,[s[n][o],s[n][o+1]],a,t);case"MultiLineString":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o-1),Xt.lineString.call(void 0,[s[i][o],s[i][o+1]],a,t);case"MultiPolygon":return i<0&&(i=s.length+i),n<0&&(n=s[i].length+n),o<0&&(o=s[i][n].length-o-1),Xt.lineString.call(void 0,[s[i][n][o],s[i][n][o+1]],a,t)}throw new Error("geojson is invalid")}l(r3,"findSegment");Bt(r3,"findSegment");function i3(r,t){if(t=t||{},!Xt.isObject.call(void 0,t))throw new Error("options is invalid");var e=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,o=t.coordIndex||0,a=t.properties,u;switch(r.type){case"FeatureCollection":e<0&&(e=r.features.length+e),a=a||r.features[e].properties,u=r.features[e].geometry;break;case"Feature":a=a||r.properties,u=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":u=r;break;default:throw new Error("geojson is invalid")}if(u===null)return null;var s=u.coordinates;switch(u.type){case"Point":return Xt.point.call(void 0,s,a,t);case"MultiPoint":return i<0&&(i=s.length+i),Xt.point.call(void 0,s[i],a,t);case"LineString":return o<0&&(o=s.length+o),Xt.point.call(void 0,s[o],a,t);case"Polygon":return n<0&&(n=s.length+n),o<0&&(o=s[n].length+o),Xt.point.call(void 0,s[n][o],a,t);case"MultiLineString":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o),Xt.point.call(void 0,s[i][o],a,t);case"MultiPolygon":return i<0&&(i=s.length+i),n<0&&(n=s[i].length+n),o<0&&(o=s[i][n].length-o),Xt.point.call(void 0,s[i][n][o],a,t)}throw new Error("geojson is invalid")}l(i3,"findPoint");Bt(i3,"findPoint");Lt.coordAll=Jv;Lt.coordEach=Rn;Lt.coordReduce=zv;Lt.featureEach=Yh;Lt.featureReduce=$v;Lt.findPoint=i3;Lt.findSegment=r3;Lt.flattenEach=aa;Lt.flattenReduce=Qv;Lt.geomEach=hu;Lt.geomReduce=Kv;Lt.lineEach=Uh;Lt.lineReduce=e3;Lt.propEach=jh;Lt.propReduce=qv;Lt.segmentEach=Wh;Lt.segmentReduce=t3});var o3=k(du=>{"use strict";d();Object.defineProperty(du,"__esModule",{value:!0});var g9=Object.defineProperty,v9=l((r,t)=>g9(r,"name",{value:t,configurable:!0}),"__name"),b9=n3();function Zh(r,t={}){if(r.bbox!=null&&t.recompute!==!0)return r.bbox;let e=[1/0,1/0,-1/0,-1/0];return b9.coordEach.call(void 0,r,i=>{e[0]>i[0]&&(e[0]=i[0]),e[1]>i[1]&&(e[1]=i[1]),e[2]<i[0]&&(e[2]=i[0]),e[3]<i[1]&&(e[3]=i[1])}),e}l(Zh,"bbox");v9(Zh,"bbox");var C9=Zh;du.bbox=Zh;du.default=C9});var c3=k((H_,zh)=>{d();var Je=ny(),s3=mp(),l3=fy(),Bn=o3().default,x9=l3.featureEach,G_=l3.coordEach,V_=s3.polygon,a3=s3.featureCollection;function u3(r){var t=new Je(r);return t.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Bn(e),Je.prototype.insert.call(this,e)},t.load=function(e){var i=[];return Array.isArray(e)?e.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Bn(n),i.push(n)}):x9(e,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Bn(n),i.push(n)}),Je.prototype.load.call(this,i)},t.remove=function(e,i){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Bn(e),Je.prototype.remove.call(this,e,i)},t.clear=function(){return Je.prototype.clear.call(this)},t.search=function(e){var i=Je.prototype.search.call(this,this.toBBox(e));return a3(i)},t.collides=function(e){return Je.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=Je.prototype.all.call(this);return a3(e)},t.toJSON=function(){return Je.prototype.toJSON.call(this)},t.fromJSON=function(e){return Je.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var i;if(e.bbox)i=e.bbox;else if(Array.isArray(e)&&e.length===4)i=e;else if(Array.isArray(e)&&e.length===6)i=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")i=Bn(e);else if(e.type==="FeatureCollection")i=Bn(e);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},t}l(u3,"geojsonRbush");zh.exports=u3;zh.exports.default=u3});var lo=k((rf,nf)=>{d();var of=l(function(){this._tweens={},this._tweensAddedDuringUpdate={}},"_Group");of.prototype={getAll:function(){return Object.keys(this._tweens).map(function(r){return this._tweens[r]}.bind(this))},removeAll:function(){this._tweens={}},add:function(r){this._tweens[r.getId()]=r,this._tweensAddedDuringUpdate[r.getId()]=r},remove:function(r){delete this._tweens[r.getId()],delete this._tweensAddedDuringUpdate[r.getId()]},update:function(r,t){var e=Object.keys(this._tweens);if(e.length===0)return!1;for(r=r!==void 0?r:st.now();e.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<e.length;i++){var n=this._tweens[e[i]];n&&n.update(r)===!1&&(n._isPlaying=!1,t||delete this._tweens[e[i]])}e=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var st=new of;st.Group=of;st._nextId=0;st.nextId=function(){return st._nextId++};typeof self>"u"&&typeof b<"u"&&b.hrtime?st.now=function(){var r=b.hrtime();return r[0]*1e3+r[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?st.now=self.performance.now.bind(self.performance):Date.now!==void 0?st.now=Date.now:st.now=function(){return new Date().getTime()};st.Tween=function(r,t){this._object=r,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=st.Easing.Linear.None,this._interpolationFunction=st.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||st,this._id=st.nextId()};st.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(r,t){return this._valuesEnd=r,t!==void 0&&(this._duration=t),this},duration:l(function(t){return this._duration=t,this},"duration"),start:function(r){this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=r!==void 0?typeof r=="string"?st.now()+parseFloat(r):r:st.now(),this._startTime+=this._delayTime;for(var t in this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(this._valuesEnd[t].length===0)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}this._object[t]!==void 0&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array||(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,this._onStopCallback!==null&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var r=0,t=this._chainedTweens.length;r<t;r++)this._chainedTweens[r].stop()},group:function(r){return this._group=r,this},delay:function(r){return this._delayTime=r,this},repeat:function(r){return this._repeat=r,this},repeatDelay:function(r){return this._repeatDelayTime=r,this},yoyo:function(r){return this._yoyo=r,this},easing:function(r){return this._easingFunction=r,this},interpolation:function(r){return this._interpolationFunction=r,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(r){return this._onStartCallback=r,this},onUpdate:function(r){return this._onUpdateCallback=r,this},onRepeat:l(function(t){return this._onRepeatCallback=t,this},"onRepeat"),onComplete:function(r){return this._onCompleteCallback=r,this},onStop:function(r){return this._onStopCallback=r,this},update:function(r){var t,e,i;if(r<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback!==null&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),e=(r-this._startTime)/this._duration,e=this._duration===0||e>1?1:e,i=this._easingFunction(e);for(t in this._valuesEnd)if(this._valuesStart[t]!==void 0){var n=this._valuesStart[t]||0,o=this._valuesEnd[t];o instanceof Array?this._object[t]=this._interpolationFunction(o,i):(typeof o=="string"&&(o.charAt(0)==="+"||o.charAt(0)==="-"?o=n+parseFloat(o):o=parseFloat(o)),typeof o=="number"&&(this._object[t]=n+(o-n)*i))}if(this._onUpdateCallback!==null&&this._onUpdateCallback(this._object,e),e===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(t in this._valuesStartRepeat){if(typeof this._valuesEnd[t]=="string"&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo){var a=this._valuesStartRepeat[t];this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=a}this._valuesStart[t]=this._valuesStartRepeat[t]}return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=r+this._repeatDelayTime:this._startTime=r+this._delayTime,this._onRepeatCallback!==null&&this._onRepeatCallback(this._object),!0}else{this._onCompleteCallback!==null&&this._onCompleteCallback(this._object);for(var u=0,s=this._chainedTweens.length;u<s;u++)this._chainedTweens[u].start(this._startTime+this._duration);return!1}return!0}};st.Easing={Linear:{None:function(r){return r}},Quadratic:{In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}},Cubic:{In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}},Quartic:{In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}},Quintic:{In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}},Sinusoidal:{In:function(r){return 1-Math.cos(r*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.cos(Math.PI*r))}},Exponential:{In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}},Circular:{In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}},Elastic:{In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}},Back:{In:function(r){var t=1.70158;return r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}},Bounce:{In:function(r){return 1-st.Easing.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?st.Easing.Bounce.In(r*2)*.5:st.Easing.Bounce.Out(r*2-1)*.5+.5}}};st.Interpolation={Linear:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),o=st.Interpolation.Utils.Linear;return t<0?o(r[0],r[1],i):t>1?o(r[e],r[e-1],e-i):o(r[n],r[n+1>e?e:n+1],i-n)},Bezier:function(r,t){for(var e=0,i=r.length-1,n=Math.pow,o=st.Interpolation.Utils.Bernstein,a=0;a<=i;a++)e+=n(1-t,i-a)*n(t,a)*r[a]*o(i,a);return e},CatmullRom:function(r,t){var e=r.length-1,i=e*t,n=Math.floor(i),o=st.Interpolation.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(n=Math.floor(i=e*(1+t))),o(r[(n-1+e)%e],r[n],r[(n+1)%e],r[(n+2)%e],i-n)):t<0?r[0]-(o(r[0],r[0],r[1],r[1],-i)-r[0]):t>1?r[e]-(o(r[e],r[e],r[e-1],r[e-1],i-e)-r[e]):o(r[n?n-1:0],r[n],r[e<n+1?e:n+1],r[e<n+2?e:n+2],i-n)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=st.Interpolation.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}}(),CatmullRom:function(r,t,e,i,n){var o=(e-r)*.5,a=(i-t)*.5,u=n*n,s=n*u;return(2*t-2*e+o+a)*s+(-3*t+3*e-2*o-a)*u+o*n+t}}};(function(r){typeof define=="function"&&define.amd?define([],function(){return st}):typeof nf<"u"&&typeof rf=="object"?nf.exports=st:r!==void 0&&(r.TWEEN=st)})(rf)});var o4=k((Ka,ho)=>{d();var Ix=200,Fb="__lodash_hash_undefined__",Ex=800,Lx=16,Gb=9007199254740991,Vb="[object Arguments]",Dx="[object Array]",_x="[object AsyncFunction]",Ox="[object Boolean]",Ax="[object Date]",kx="[object Error]",Hb="[object Function]",Nx="[object GeneratorFunction]",Rx="[object Map]",Bx="[object Number]",Fx="[object Null]",Xb="[object Object]",Gx="[object Proxy]",Vx="[object RegExp]",Hx="[object Set]",Xx="[object String]",jx="[object Undefined]",Yx="[object WeakMap]",Wx="[object ArrayBuffer]",Ux="[object DataView]",Zx="[object Float32Array]",zx="[object Float64Array]",qx="[object Int8Array]",$x="[object Int16Array]",Jx="[object Int32Array]",Kx="[object Uint8Array]",Qx="[object Uint8ClampedArray]",tS="[object Uint16Array]",eS="[object Uint32Array]",rS=/[\\^$.*+?()[\]{}|]/g,iS=/^\[object .+?Constructor\]$/,nS=/^(?:0|[1-9]\d*)$/,ht={};ht[Zx]=ht[zx]=ht[qx]=ht[$x]=ht[Jx]=ht[Kx]=ht[Qx]=ht[tS]=ht[eS]=!0;ht[Vb]=ht[Dx]=ht[Wx]=ht[Ox]=ht[Ux]=ht[Ax]=ht[kx]=ht[Hb]=ht[Rx]=ht[Bx]=ht[Xb]=ht[Vx]=ht[Hx]=ht[Xx]=ht[Yx]=!1;var jb=typeof global=="object"&&global&&global.Object===Object&&global,oS=typeof self=="object"&&self&&self.Object===Object&&self,es=jb||oS||Function("return this")(),Yb=typeof Ka=="object"&&Ka&&!Ka.nodeType&&Ka,Qa=Yb&&typeof ho=="object"&&ho&&!ho.nodeType&&ho,Wb=Qa&&Qa.exports===Yb,Of=Wb&&jb.process,Lb=function(){try{var r=Qa&&Qa.require&&Qa.require("util").types;return r||Of&&Of.binding&&Of.binding("util")}catch{}}(),Db=Lb&&Lb.isTypedArray;function Ub(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}l(Ub,"apply");function aS(r,t){for(var e=-1,i=Array(r);++e<r;)i[e]=t(e);return i}l(aS,"baseTimes");function sS(r){return function(t){return r(t)}}l(sS,"baseUnary");function lS(r,t){return r==null?void 0:r[t]}l(lS,"getValue");function uS(r,t){return function(e){return r(t(e))}}l(uS,"overArg");var cS=Array.prototype,pS=Function.prototype,Qu=Object.prototype,Af=es["__core-js_shared__"],tc=pS.toString,_r=Qu.hasOwnProperty,_b=function(){var r=/[^.]+$/.exec(Af&&Af.keys&&Af.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Zb=Qu.toString,hS=tc.call(Object),dS=RegExp("^"+tc.call(_r).replace(rS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ju=Wb?es.Buffer:void 0,Ob=es.Symbol,Ab=es.Uint8Array,kb=Ju?Ju.allocUnsafe:void 0,zb=uS(Object.getPrototypeOf,Object),Nb=Object.create,fS=Qu.propertyIsEnumerable,mS=cS.splice,Qi=Ob?Ob.toStringTag:void 0,Ku=function(){try{var r=Vf(Object,"defineProperty");return r({},"",{}),r}catch{}}(),yS=Ju?Ju.isBuffer:void 0,Rb=Math.max,gS=Date.now,qb=Vf(es,"Map"),ts=Vf(Object,"create"),vS=function(){function r(){}return l(r,"object"),function(t){if(!Dr(t))return{};if(Nb)return Nb(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}();function tn(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var i=r[t];this.set(i[0],i[1])}}l(tn,"Hash");function bS(){this.__data__=ts?ts(null):{},this.size=0}l(bS,"hashClear");function CS(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}l(CS,"hashDelete");function xS(r){var t=this.__data__;if(ts){var e=t[r];return e===Fb?void 0:e}return _r.call(t,r)?t[r]:void 0}l(xS,"hashGet");function SS(r){var t=this.__data__;return ts?t[r]!==void 0:_r.call(t,r)}l(SS,"hashHas");function PS(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=ts&&t===void 0?Fb:t,this}l(PS,"hashSet");tn.prototype.clear=bS;tn.prototype.delete=CS;tn.prototype.get=xS;tn.prototype.has=SS;tn.prototype.set=PS;function Or(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var i=r[t];this.set(i[0],i[1])}}l(Or,"ListCache");function MS(){this.__data__=[],this.size=0}l(MS,"listCacheClear");function wS(r){var t=this.__data__,e=ec(t,r);if(e<0)return!1;var i=t.length-1;return e==i?t.pop():mS.call(t,e,1),--this.size,!0}l(wS,"listCacheDelete");function TS(r){var t=this.__data__,e=ec(t,r);return e<0?void 0:t[e][1]}l(TS,"listCacheGet");function IS(r){return ec(this.__data__,r)>-1}l(IS,"listCacheHas");function ES(r,t){var e=this.__data__,i=ec(e,r);return i<0?(++this.size,e.push([r,t])):e[i][1]=t,this}l(ES,"listCacheSet");Or.prototype.clear=MS;Or.prototype.delete=wS;Or.prototype.get=TS;Or.prototype.has=IS;Or.prototype.set=ES;function fo(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var i=r[t];this.set(i[0],i[1])}}l(fo,"MapCache");function LS(){this.size=0,this.__data__={hash:new tn,map:new(qb||Or),string:new tn}}l(LS,"mapCacheClear");function DS(r){var t=ic(this,r).delete(r);return this.size-=t?1:0,t}l(DS,"mapCacheDelete");function _S(r){return ic(this,r).get(r)}l(_S,"mapCacheGet");function OS(r){return ic(this,r).has(r)}l(OS,"mapCacheHas");function AS(r,t){var e=ic(this,r),i=e.size;return e.set(r,t),this.size+=e.size==i?0:1,this}l(AS,"mapCacheSet");fo.prototype.clear=LS;fo.prototype.delete=DS;fo.prototype.get=_S;fo.prototype.has=OS;fo.prototype.set=AS;function mo(r){var t=this.__data__=new Or(r);this.size=t.size}l(mo,"Stack");function kS(){this.__data__=new Or,this.size=0}l(kS,"stackClear");function NS(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}l(NS,"stackDelete");function RS(r){return this.__data__.get(r)}l(RS,"stackGet");function BS(r){return this.__data__.has(r)}l(BS,"stackHas");function FS(r,t){var e=this.__data__;if(e instanceof Or){var i=e.__data__;if(!qb||i.length<Ix-1)return i.push([r,t]),this.size=++e.size,this;e=this.__data__=new fo(i)}return e.set(r,t),this.size=e.size,this}l(FS,"stackSet");mo.prototype.clear=kS;mo.prototype.delete=NS;mo.prototype.get=RS;mo.prototype.has=BS;mo.prototype.set=FS;function GS(r,t){var e=Bf(r),i=!e&&Rf(r),n=!e&&!i&&t4(r),o=!e&&!i&&!n&&r4(r),a=e||i||n||o,u=a?aS(r.length,String):[],s=u.length;for(var p in r)(t||_r.call(r,p))&&!(a&&(p=="length"||n&&(p=="offset"||p=="parent")||o&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Kb(p,s)))&&u.push(p);return u}l(GS,"arrayLikeKeys");function kf(r,t,e){(e!==void 0&&!nc(r[t],e)||e===void 0&&!(t in r))&&Ff(r,t,e)}l(kf,"assignMergeValue");function VS(r,t,e){var i=r[t];(!(_r.call(r,t)&&nc(i,e))||e===void 0&&!(t in r))&&Ff(r,t,e)}l(VS,"assignValue");function ec(r,t){for(var e=r.length;e--;)if(nc(r[e][0],t))return e;return-1}l(ec,"assocIndexOf");function Ff(r,t,e){t=="__proto__"&&Ku?Ku(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}l(Ff,"baseAssignValue");var HS=QS();function rc(r){return r==null?r===void 0?jx:Fx:Qi&&Qi in Object(r)?tP(r):aP(r)}l(rc,"baseGetTag");function Bb(r){return rs(r)&&rc(r)==Vb}l(Bb,"baseIsArguments");function XS(r){if(!Dr(r)||nP(r))return!1;var t=Xf(r)?dS:iS;return t.test(cP(r))}l(XS,"baseIsNative");function jS(r){return rs(r)&&e4(r.length)&&!!ht[rc(r)]}l(jS,"baseIsTypedArray");function YS(r){if(!Dr(r))return oP(r);var t=Qb(r),e=[];for(var i in r)i=="constructor"&&(t||!_r.call(r,i))||e.push(i);return e}l(YS,"baseKeysIn");function Gf(r,t,e,i,n){r!==t&&HS(t,function(o,a){if(n||(n=new mo),Dr(o))WS(r,t,a,e,Gf,i,n);else{var u=i?i(Nf(r,a),o,a+"",r,t,n):void 0;u===void 0&&(u=o),kf(r,a,u)}},i4)}l(Gf,"baseMerge");function WS(r,t,e,i,n,o,a){var u=Nf(r,e),s=Nf(t,e),p=a.get(s);if(p){kf(r,e,p);return}var f=o?o(u,s,e+"",r,t,a):void 0,m=f===void 0;if(m){var y=Bf(s),x=!y&&t4(s),S=!y&&!x&&r4(s);f=s,y||x||S?Bf(u)?f=u:pP(u)?f=$S(u):x?(m=!1,f=ZS(s,!0)):S?(m=!1,f=qS(s,!0)):f=[]:hP(s)||Rf(s)?(f=u,Rf(u)?f=dP(u):(!Dr(u)||Xf(u))&&(f=eP(s))):m=!1}m&&(a.set(s,f),n(f,s,i,o,a),a.delete(s)),kf(r,e,f)}l(WS,"baseMergeDeep");function $b(r,t){return lP(sP(r,t,n4),r+"")}l($b,"baseRest");var US=Ku?function(r,t){return Ku(r,"toString",{configurable:!0,enumerable:!1,value:yP(t),writable:!0})}:n4;function ZS(r,t){if(t)return r.slice();var e=r.length,i=kb?kb(e):new r.constructor(e);return r.copy(i),i}l(ZS,"cloneBuffer");function zS(r){var t=new r.constructor(r.byteLength);return new Ab(t).set(new Ab(r)),t}l(zS,"cloneArrayBuffer");function qS(r,t){var e=t?zS(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}l(qS,"cloneTypedArray");function $S(r,t){var e=-1,i=r.length;for(t||(t=Array(i));++e<i;)t[e]=r[e];return t}l($S,"copyArray");function JS(r,t,e,i){var n=!e;e||(e={});for(var o=-1,a=t.length;++o<a;){var u=t[o],s=i?i(e[u],r[u],u,e,r):void 0;s===void 0&&(s=r[u]),n?Ff(e,u,s):VS(e,u,s)}return e}l(JS,"copyObject");function KS(r){return $b(function(t,e){var i=-1,n=e.length,o=n>1?e[n-1]:void 0,a=n>2?e[2]:void 0;for(o=r.length>3&&typeof o=="function"?(n--,o):void 0,a&&rP(e[0],e[1],a)&&(o=n<3?void 0:o,n=1),t=Object(t);++i<n;){var u=e[i];u&&r(t,u,i,o)}return t})}l(KS,"createAssigner");function QS(r){return function(t,e,i){for(var n=-1,o=Object(t),a=i(t),u=a.length;u--;){var s=a[r?u:++n];if(e(o[s],s,o)===!1)break}return t}}l(QS,"createBaseFor");function Jb(r,t,e,i,n,o){return Dr(r)&&Dr(t)&&(o.set(t,r),Gf(r,t,void 0,Jb,o),o.delete(t)),r}l(Jb,"customDefaultsMerge");function ic(r,t){var e=r.__data__;return iP(t)?e[typeof t=="string"?"string":"hash"]:e.map}l(ic,"getMapData");function Vf(r,t){var e=lS(r,t);return XS(e)?e:void 0}l(Vf,"getNative");function tP(r){var t=_r.call(r,Qi),e=r[Qi];try{r[Qi]=void 0;var i=!0}catch{}var n=Zb.call(r);return i&&(t?r[Qi]=e:delete r[Qi]),n}l(tP,"getRawTag");function eP(r){return typeof r.constructor=="function"&&!Qb(r)?vS(zb(r)):{}}l(eP,"initCloneObject");function Kb(r,t){var e=typeof r;return t=t==null?Gb:t,!!t&&(e=="number"||e!="symbol"&&nS.test(r))&&r>-1&&r%1==0&&r<t}l(Kb,"isIndex");function rP(r,t,e){if(!Dr(e))return!1;var i=typeof t;return(i=="number"?Hf(e)&&Kb(t,e.length):i=="string"&&t in e)?nc(e[t],r):!1}l(rP,"isIterateeCall");function iP(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}l(iP,"isKeyable");function nP(r){return!!_b&&_b in r}l(nP,"isMasked");function Qb(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Qu;return r===e}l(Qb,"isPrototype");function oP(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}l(oP,"nativeKeysIn");function aP(r){return Zb.call(r)}l(aP,"objectToString");function sP(r,t,e){return t=Rb(t===void 0?r.length-1:t,0),function(){for(var i=arguments,n=-1,o=Rb(i.length-t,0),a=Array(o);++n<o;)a[n]=i[t+n];n=-1;for(var u=Array(t+1);++n<t;)u[n]=i[n];return u[t]=e(a),Ub(r,this,u)}}l(sP,"overRest");function Nf(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}l(Nf,"safeGet");var lP=uP(US);function uP(r){var t=0,e=0;return function(){var i=gS(),n=Lx-(i-e);if(e=i,n>0){if(++t>=Ex)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}l(uP,"shortOut");function cP(r){if(r!=null){try{return tc.call(r)}catch{}try{return r+""}catch{}}return""}l(cP,"toSource");function nc(r,t){return r===t||r!==r&&t!==t}l(nc,"eq");var Rf=Bb(function(){return arguments}())?Bb:function(r){return rs(r)&&_r.call(r,"callee")&&!fS.call(r,"callee")},Bf=Array.isArray;function Hf(r){return r!=null&&e4(r.length)&&!Xf(r)}l(Hf,"isArrayLike");function pP(r){return rs(r)&&Hf(r)}l(pP,"isArrayLikeObject");var t4=yS||gP;function Xf(r){if(!Dr(r))return!1;var t=rc(r);return t==Hb||t==Nx||t==_x||t==Gx}l(Xf,"isFunction");function e4(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Gb}l(e4,"isLength");function Dr(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}l(Dr,"isObject");function rs(r){return r!=null&&typeof r=="object"}l(rs,"isObjectLike");function hP(r){if(!rs(r)||rc(r)!=Xb)return!1;var t=zb(r);if(t===null)return!0;var e=_r.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&tc.call(e)==hS}l(hP,"isPlainObject");var r4=Db?sS(Db):jS;function dP(r){return JS(r,i4(r))}l(dP,"toPlainObject");var fP=$b(function(r){return r.push(void 0,Jb),Ub(mP,void 0,r)});function i4(r){return Hf(r)?GS(r,!0):YS(r)}l(i4,"keysIn");var mP=KS(function(r,t,e,i){Gf(r,t,e,i)});function yP(r){return function(){return r}}l(yP,"constant");function n4(r){return r}l(n4,"identity");function gP(){return!1}l(gP,"stubFalse");ho.exports=fP});var G4=k((Dj,cs)=>{"use strict";d();var RP=!1,an=!1,O4=!0,A4=!1,h={},k4=!1;typeof cs<"u"&&cs.exports?(cs.exports=h,k4=!0):typeof document<"u"?window.ClipperLib=h:self.ClipperLib=h;var yc;k4?(At="chrome",yc="Netscape"):(At=navigator.userAgent.toString().toLowerCase(),yc=navigator.appName);var At,z={};At.indexOf("chrome")!=-1&&At.indexOf("chromium")==-1?z.chrome=1:z.chrome=0;At.indexOf("chromium")!=-1?z.chromium=1:z.chromium=0;At.indexOf("safari")!=-1&&At.indexOf("chrome")==-1&&At.indexOf("chromium")==-1?z.safari=1:z.safari=0;At.indexOf("firefox")!=-1?z.firefox=1:z.firefox=0;At.indexOf("firefox/17")!=-1?z.firefox17=1:z.firefox17=0;At.indexOf("firefox/15")!=-1?z.firefox15=1:z.firefox15=0;At.indexOf("firefox/3")!=-1?z.firefox3=1:z.firefox3=0;At.indexOf("opera")!=-1?z.opera=1:z.opera=0;At.indexOf("msie 10")!=-1?z.msie10=1:z.msie10=0;At.indexOf("msie 9")!=-1?z.msie9=1:z.msie9=0;At.indexOf("msie 8")!=-1?z.msie8=1:z.msie8=0;At.indexOf("msie 7")!=-1?z.msie7=1:z.msie7=0;At.indexOf("msie ")!=-1?z.msie=1:z.msie=0;h.biginteger_used=null;var di,BP=0xdeadbeefcafe,D4=(BP&16777215)==15715070;function O(r,t,e){h.biginteger_used=1,r!=null&&(typeof r=="number"&&typeof t>"u"?this.fromInt(r):typeof r=="number"?this.fromNumber(r,t,e):t==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,t))}l(O,"BigInteger");function K(){return new O(null)}l(K,"nbi");function FP(r,t,e,i,n,o){for(;--o>=0;){var a=t*this[r++]+e[i]+n;n=Math.floor(a/67108864),e[i++]=a&67108863}return n}l(FP,"am1");function GP(r,t,e,i,n,o){for(var a=t&32767,u=t>>15;--o>=0;){var s=this[r]&32767,p=this[r++]>>15,f=u*s+p*a;s=a*s+((f&32767)<<15)+e[i]+(n&1073741823),n=(s>>>30)+(f>>>15)+u*p+(n>>>30),e[i++]=s&1073741823}return n}l(GP,"am2");function VP(r,t,e,i,n,o){for(var a=t&16383,u=t>>14;--o>=0;){var s=this[r]&16383,p=this[r++]>>14,f=u*s+p*a;s=a*s+((f&16383)<<14)+e[i]+n,n=(s>>28)+(f>>14)+u*p,e[i++]=s&268435455}return n}l(VP,"am3");D4&&yc=="Microsoft Internet Explorer"?(O.prototype.am=GP,di=30):D4&&yc!="Netscape"?(O.prototype.am=FP,di=26):(O.prototype.am=VP,di=28);O.prototype.DB=di;O.prototype.DM=(1<<di)-1;O.prototype.DV=1<<di;var om=52;O.prototype.FV=Math.pow(2,om);O.prototype.F1=om-di;O.prototype.F2=2*di-om;var HP="0123456789abcdefghijklmnopqrstuvwxyz",vc=new Array,Co,Se;Co=48;for(Se=0;Se<=9;++Se)vc[Co++]=Se;Co=97;for(Se=10;Se<36;++Se)vc[Co++]=Se;Co=65;for(Se=10;Se<36;++Se)vc[Co++]=Se;function _4(r){return HP.charAt(r)}l(_4,"int2char");function N4(r,t){var e=vc[r.charCodeAt(t)];return e==null?-1:e}l(N4,"intAt");function XP(r){for(var t=this.t-1;t>=0;--t)r[t]=this[t];r.t=this.t,r.s=this.s}l(XP,"bnpCopyTo");function jP(r){this.t=1,this.s=r<0?-1:0,r>0?this[0]=r:r<-1?this[0]=r+this.DV:this.t=0}l(jP,"bnpFromInt");function hi(r){var t=K();return t.fromInt(r),t}l(hi,"nbv");function YP(r,t){var e;if(t==16)e=4;else if(t==8)e=3;else if(t==256)e=8;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else{this.fromRadix(r,t);return}this.t=0,this.s=0;for(var i=r.length,n=!1,o=0;--i>=0;){var a=e==8?r[i]&255:N4(r,i);if(a<0){r.charAt(i)=="-"&&(n=!0);continue}n=!1,o==0?this[this.t++]=a:o+e>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,o+=e,o>=this.DB&&(o-=this.DB)}e==8&&r[0]&128&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),n&&O.ZERO.subTo(this,this)}l(YP,"bnpFromString");function WP(){for(var r=this.s&this.DM;this.t>0&&this[this.t-1]==r;)--this.t}l(WP,"bnpClamp");function UP(r){if(this.s<0)return"-"+this.negate().toString(r);var t;if(r==16)t=4;else if(r==8)t=3;else if(r==2)t=1;else if(r==32)t=5;else if(r==4)t=2;else return this.toRadix(r);var e=(1<<t)-1,i,n=!1,o="",a=this.t,u=this.DB-a*this.DB%t;if(a-- >0)for(u<this.DB&&(i=this[a]>>u)>0&&(n=!0,o=_4(i));a>=0;)u<t?(i=(this[a]&(1<<u)-1)<<t-u,i|=this[--a]>>(u+=this.DB-t)):(i=this[a]>>(u-=t)&e,u<=0&&(u+=this.DB,--a)),i>0&&(n=!0),n&&(o+=_4(i));return n?o:"0"}l(UP,"bnToString");function ZP(){var r=K();return O.ZERO.subTo(this,r),r}l(ZP,"bnNegate");function zP(){return this.s<0?this.negate():this}l(zP,"bnAbs");function qP(r){var t=this.s-r.s;if(t!=0)return t;var e=this.t;if(t=e-r.t,t!=0)return this.s<0?-t:t;for(;--e>=0;)if((t=this[e]-r[e])!=0)return t;return 0}l(qP,"bnCompareTo");function bc(r){var t=1,e;return(e=r>>>16)!=0&&(r=e,t+=16),(e=r>>8)!=0&&(r=e,t+=8),(e=r>>4)!=0&&(r=e,t+=4),(e=r>>2)!=0&&(r=e,t+=2),(e=r>>1)!=0&&(r=e,t+=1),t}l(bc,"nbits");function $P(){return this.t<=0?0:this.DB*(this.t-1)+bc(this[this.t-1]^this.s&this.DM)}l($P,"bnBitLength");function JP(r,t){var e;for(e=this.t-1;e>=0;--e)t[e+r]=this[e];for(e=r-1;e>=0;--e)t[e]=0;t.t=this.t+r,t.s=this.s}l(JP,"bnpDLShiftTo");function KP(r,t){for(var e=r;e<this.t;++e)t[e-r]=this[e];t.t=Math.max(this.t-r,0),t.s=this.s}l(KP,"bnpDRShiftTo");function QP(r,t){var e=r%this.DB,i=this.DB-e,n=(1<<i)-1,o=Math.floor(r/this.DB),a=this.s<<e&this.DM,u;for(u=this.t-1;u>=0;--u)t[u+o+1]=this[u]>>i|a,a=(this[u]&n)<<e;for(u=o-1;u>=0;--u)t[u]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()}l(QP,"bnpLShiftTo");function tM(r,t){t.s=this.s;var e=Math.floor(r/this.DB);if(e>=this.t){t.t=0;return}var i=r%this.DB,n=this.DB-i,o=(1<<i)-1;t[0]=this[e]>>i;for(var a=e+1;a<this.t;++a)t[a-e-1]|=(this[a]&o)<<n,t[a-e]=this[a]>>i;i>0&&(t[this.t-e-1]|=(this.s&o)<<n),t.t=this.t-e,t.clamp()}l(tM,"bnpRShiftTo");function eM(r,t){for(var e=0,i=0,n=Math.min(r.t,this.t);e<n;)i+=this[e]-r[e],t[e++]=i&this.DM,i>>=this.DB;if(r.t<this.t){for(i-=r.s;e<this.t;)i+=this[e],t[e++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;e<r.t;)i-=r[e],t[e++]=i&this.DM,i>>=this.DB;i-=r.s}t.s=i<0?-1:0,i<-1?t[e++]=this.DV+i:i>0&&(t[e++]=i),t.t=e,t.clamp()}l(eM,"bnpSubTo");function rM(r,t){var e=this.abs(),i=r.abs(),n=e.t;for(t.t=n+i.t;--n>=0;)t[n]=0;for(n=0;n<i.t;++n)t[n+e.t]=e.am(0,i[n],t,n,0,e.t);t.s=0,t.clamp(),this.s!=r.s&&O.ZERO.subTo(t,t)}l(rM,"bnpMultiplyTo");function iM(r){for(var t=this.abs(),e=r.t=2*t.t;--e>=0;)r[e]=0;for(e=0;e<t.t-1;++e){var i=t.am(e,t[e],r,2*e,0,1);(r[e+t.t]+=t.am(e+1,2*t[e],r,2*e+1,i,t.t-e-1))>=t.DV&&(r[e+t.t]-=t.DV,r[e+t.t+1]=1)}r.t>0&&(r[r.t-1]+=t.am(e,t[e],r,2*e,0,1)),r.s=0,r.clamp()}l(iM,"bnpSquareTo");function nM(r,t,e){var i=r.abs();if(!(i.t<=0)){var n=this.abs();if(n.t<i.t){t!=null&&t.fromInt(0),e!=null&&this.copyTo(e);return}e==null&&(e=K());var o=K(),a=this.s,u=r.s,s=this.DB-bc(i[i.t-1]);s>0?(i.lShiftTo(s,o),n.lShiftTo(s,e)):(i.copyTo(o),n.copyTo(e));var p=o.t,f=o[p-1];if(f!=0){var m=f*(1<<this.F1)+(p>1?o[p-2]>>this.F2:0),y=this.FV/m,x=(1<<this.F1)/m,S=1<<this.F2,M=e.t,g=M-p,C=t==null?K():t;for(o.dlShiftTo(g,C),e.compareTo(C)>=0&&(e[e.t++]=1,e.subTo(C,e)),O.ONE.dlShiftTo(p,C),C.subTo(o,o);o.t<p;)o[o.t++]=0;for(;--g>=0;){var I=e[--M]==f?this.DM:Math.floor(e[M]*y+(e[M-1]+S)*x);if((e[M]+=o.am(0,I,e,g,0,p))<I)for(o.dlShiftTo(g,C),e.subTo(C,e);e[M]<--I;)e.subTo(C,e)}t!=null&&(e.drShiftTo(p,t),a!=u&&O.ZERO.subTo(t,t)),e.t=p,e.clamp(),s>0&&e.rShiftTo(s,e),a<0&&O.ZERO.subTo(e,e)}}}l(nM,"bnpDivRemTo");function oM(r){var t=K();return this.abs().divRemTo(r,null,t),this.s<0&&t.compareTo(O.ZERO)>0&&r.subTo(t,t),t}l(oM,"bnMod");function sn(r){this.m=r}l(sn,"Classic");function aM(r){return r.s<0||r.compareTo(this.m)>=0?r.mod(this.m):r}l(aM,"cConvert");function sM(r){return r}l(sM,"cRevert");function lM(r){r.divRemTo(this.m,null,r)}l(lM,"cReduce");function uM(r,t,e){r.multiplyTo(t,e),this.reduce(e)}l(uM,"cMulTo");function cM(r,t){r.squareTo(t),this.reduce(t)}l(cM,"cSqrTo");sn.prototype.convert=aM;sn.prototype.revert=sM;sn.prototype.reduce=lM;sn.prototype.mulTo=uM;sn.prototype.sqrTo=cM;function pM(){if(this.t<1)return 0;var r=this[0];if(!(r&1))return 0;var t=r&3;return t=t*(2-(r&15)*t)&15,t=t*(2-(r&255)*t)&255,t=t*(2-((r&65535)*t&65535))&65535,t=t*(2-r*t%this.DV)%this.DV,t>0?this.DV-t:-t}l(pM,"bnpInvDigit");function ln(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<r.DB-15)-1,this.mt2=2*r.t}l(ln,"Montgomery");function hM(r){var t=K();return r.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),r.s<0&&t.compareTo(O.ZERO)>0&&this.m.subTo(t,t),t}l(hM,"montConvert");function dM(r){var t=K();return r.copyTo(t),this.reduce(t),t}l(dM,"montRevert");function fM(r){for(;r.t<=this.mt2;)r[r.t++]=0;for(var t=0;t<this.m.t;++t){var e=r[t]&32767,i=e*this.mpl+((e*this.mph+(r[t]>>15)*this.mpl&this.um)<<15)&r.DM;for(e=t+this.m.t,r[e]+=this.m.am(0,i,r,t,0,this.m.t);r[e]>=r.DV;)r[e]-=r.DV,r[++e]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)}l(fM,"montReduce");function mM(r,t){r.squareTo(t),this.reduce(t)}l(mM,"montSqrTo");function yM(r,t,e){r.multiplyTo(t,e),this.reduce(e)}l(yM,"montMulTo");ln.prototype.convert=hM;ln.prototype.revert=dM;ln.prototype.reduce=fM;ln.prototype.mulTo=yM;ln.prototype.sqrTo=mM;function gM(){return(this.t>0?this[0]&1:this.s)==0}l(gM,"bnpIsEven");function vM(r,t){if(r>4294967295||r<1)return O.ONE;var e=K(),i=K(),n=t.convert(this),o=bc(r)-1;for(n.copyTo(e);--o>=0;)if(t.sqrTo(e,i),(r&1<<o)>0)t.mulTo(i,n,e);else{var a=e;e=i,i=a}return t.revert(e)}l(vM,"bnpExp");function bM(r,t){var e;return r<256||t.isEven()?e=new sn(t):e=new ln(t),this.exp(r,e)}l(bM,"bnModPowInt");O.prototype.copyTo=XP;O.prototype.fromInt=jP;O.prototype.fromString=YP;O.prototype.clamp=WP;O.prototype.dlShiftTo=JP;O.prototype.drShiftTo=KP;O.prototype.lShiftTo=QP;O.prototype.rShiftTo=tM;O.prototype.subTo=eM;O.prototype.multiplyTo=rM;O.prototype.squareTo=iM;O.prototype.divRemTo=nM;O.prototype.invDigit=pM;O.prototype.isEven=gM;O.prototype.exp=vM;O.prototype.toString=UP;O.prototype.negate=ZP;O.prototype.abs=zP;O.prototype.compareTo=qP;O.prototype.bitLength=$P;O.prototype.mod=oM;O.prototype.modPowInt=bM;O.ZERO=hi(0);O.ONE=hi(1);function CM(){var r=K();return this.copyTo(r),r}l(CM,"bnClone");function xM(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}l(xM,"bnIntValue");function SM(){return this.t==0?this.s:this[0]<<24>>24}l(SM,"bnByteValue");function PM(){return this.t==0?this.s:this[0]<<16>>16}l(PM,"bnShortValue");function MM(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}l(MM,"bnpChunkSize");function wM(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}l(wM,"bnSigNum");function TM(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var t=this.chunkSize(r),e=Math.pow(r,t),i=hi(e),n=K(),o=K(),a="";for(this.divRemTo(i,n,o);n.signum()>0;)a=(e+o.intValue()).toString(r).substr(1)+a,n.divRemTo(i,n,o);return o.intValue().toString(r)+a}l(TM,"bnpToRadix");function IM(r,t){this.fromInt(0),t==null&&(t=10);for(var e=this.chunkSize(t),i=Math.pow(t,e),n=!1,o=0,a=0,u=0;u<r.length;++u){var s=N4(r,u);if(s<0){r.charAt(u)=="-"&&this.signum()==0&&(n=!0);continue}a=t*a+s,++o>=e&&(this.dMultiply(i),this.dAddOffset(a,0),o=0,a=0)}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(a,0)),n&&O.ZERO.subTo(this,this)}l(IM,"bnpFromRadix");function EM(r,t,e){if(typeof t=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,e),this.testBit(r-1)||this.bitwiseTo(O.ONE.shiftLeft(r-1),am,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(O.ONE.shiftLeft(r-1),this);else{var i=new Array,n=r&7;i.length=(r>>3)+1,t.nextBytes(i),n>0?i[0]&=(1<<n)-1:i[0]=0,this.fromString(i,256)}}l(EM,"bnpFromNumber");function LM(){var r=this.t,t=new Array;t[0]=this.s;var e=this.DB-r*this.DB%8,i,n=0;if(r-- >0)for(e<this.DB&&(i=this[r]>>e)!=(this.s&this.DM)>>e&&(t[n++]=i|this.s<<this.DB-e);r>=0;)e<8?(i=(this[r]&(1<<e)-1)<<8-e,i|=this[--r]>>(e+=this.DB-8)):(i=this[r]>>(e-=8)&255,e<=0&&(e+=this.DB,--r)),i&128&&(i|=-256),n==0&&(this.s&128)!=(i&128)&&++n,(n>0||i!=this.s)&&(t[n++]=i);return t}l(LM,"bnToByteArray");function DM(r){return this.compareTo(r)==0}l(DM,"bnEquals");function _M(r){return this.compareTo(r)<0?this:r}l(_M,"bnMin");function OM(r){return this.compareTo(r)>0?this:r}l(OM,"bnMax");function AM(r,t,e){var i,n,o=Math.min(r.t,this.t);for(i=0;i<o;++i)e[i]=t(this[i],r[i]);if(r.t<this.t){for(n=r.s&this.DM,i=o;i<this.t;++i)e[i]=t(this[i],n);e.t=this.t}else{for(n=this.s&this.DM,i=o;i<r.t;++i)e[i]=t(n,r[i]);e.t=r.t}e.s=t(this.s,r.s),e.clamp()}l(AM,"bnpBitwiseTo");function kM(r,t){return r&t}l(kM,"op_and");function NM(r){var t=K();return this.bitwiseTo(r,kM,t),t}l(NM,"bnAnd");function am(r,t){return r|t}l(am,"op_or");function RM(r){var t=K();return this.bitwiseTo(r,am,t),t}l(RM,"bnOr");function R4(r,t){return r^t}l(R4,"op_xor");function BM(r){var t=K();return this.bitwiseTo(r,R4,t),t}l(BM,"bnXor");function B4(r,t){return r&~t}l(B4,"op_andnot");function FM(r){var t=K();return this.bitwiseTo(r,B4,t),t}l(FM,"bnAndNot");function GM(){for(var r=K(),t=0;t<this.t;++t)r[t]=this.DM&~this[t];return r.t=this.t,r.s=~this.s,r}l(GM,"bnNot");function VM(r){var t=K();return r<0?this.rShiftTo(-r,t):this.lShiftTo(r,t),t}l(VM,"bnShiftLeft");function HM(r){var t=K();return r<0?this.lShiftTo(-r,t):this.rShiftTo(r,t),t}l(HM,"bnShiftRight");function XM(r){if(r==0)return-1;var t=0;return r&65535||(r>>=16,t+=16),r&255||(r>>=8,t+=8),r&15||(r>>=4,t+=4),r&3||(r>>=2,t+=2),r&1||++t,t}l(XM,"lbit");function jM(){for(var r=0;r<this.t;++r)if(this[r]!=0)return r*this.DB+XM(this[r]);return this.s<0?this.t*this.DB:-1}l(jM,"bnGetLowestSetBit");function YM(r){for(var t=0;r!=0;)r&=r-1,++t;return t}l(YM,"cbit");function WM(){for(var r=0,t=this.s&this.DM,e=0;e<this.t;++e)r+=YM(this[e]^t);return r}l(WM,"bnBitCount");function UM(r){var t=Math.floor(r/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<r%this.DB)!=0}l(UM,"bnTestBit");function ZM(r,t){var e=O.ONE.shiftLeft(r);return this.bitwiseTo(e,t,e),e}l(ZM,"bnpChangeBit");function zM(r){return this.changeBit(r,am)}l(zM,"bnSetBit");function qM(r){return this.changeBit(r,B4)}l(qM,"bnClearBit");function $M(r){return this.changeBit(r,R4)}l($M,"bnFlipBit");function JM(r,t){for(var e=0,i=0,n=Math.min(r.t,this.t);e<n;)i+=this[e]+r[e],t[e++]=i&this.DM,i>>=this.DB;if(r.t<this.t){for(i+=r.s;e<this.t;)i+=this[e],t[e++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;e<r.t;)i+=r[e],t[e++]=i&this.DM,i>>=this.DB;i+=r.s}t.s=i<0?-1:0,i>0?t[e++]=i:i<-1&&(t[e++]=this.DV+i),t.t=e,t.clamp()}l(JM,"bnpAddTo");function KM(r){var t=K();return this.addTo(r,t),t}l(KM,"bnAdd");function QM(r){var t=K();return this.subTo(r,t),t}l(QM,"bnSubtract");function tw(r){var t=K();return this.multiplyTo(r,t),t}l(tw,"bnMultiply");function ew(){var r=K();return this.squareTo(r),r}l(ew,"bnSquare");function rw(r){var t=K();return this.divRemTo(r,t,null),t}l(rw,"bnDivide");function iw(r){var t=K();return this.divRemTo(r,null,t),t}l(iw,"bnRemainder");function nw(r){var t=K(),e=K();return this.divRemTo(r,t,e),new Array(t,e)}l(nw,"bnDivideAndRemainder");function ow(r){this[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()}l(ow,"bnpDMultiply");function aw(r,t){if(r!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=r;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}l(aw,"bnpDAddOffset");function ps(){}l(ps,"NullExp");function F4(r){return r}l(F4,"nNop");function sw(r,t,e){r.multiplyTo(t,e)}l(sw,"nMulTo");function lw(r,t){r.squareTo(t)}l(lw,"nSqrTo");ps.prototype.convert=F4;ps.prototype.revert=F4;ps.prototype.mulTo=sw;ps.prototype.sqrTo=lw;function uw(r){return this.exp(r,new ps)}l(uw,"bnPow");function cw(r,t,e){var i=Math.min(this.t+r.t,t);for(e.s=0,e.t=i;i>0;)e[--i]=0;var n;for(n=e.t-this.t;i<n;++i)e[i+this.t]=this.am(0,r[i],e,i,0,this.t);for(n=Math.min(r.t,t);i<n;++i)this.am(0,r[i],e,i,0,t-i);e.clamp()}l(cw,"bnpMultiplyLowerTo");function pw(r,t,e){--t;var i=e.t=this.t+r.t-t;for(e.s=0;--i>=0;)e[i]=0;for(i=Math.max(t-this.t,0);i<r.t;++i)e[this.t+i-t]=this.am(t-i,r[i],e,0,0,this.t+i-t);e.clamp(),e.drShiftTo(1,e)}l(pw,"bnpMultiplyUpperTo");function xo(r){this.r2=K(),this.q3=K(),O.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r),this.m=r}l(xo,"Barrett");function hw(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var t=K();return r.copyTo(t),this.reduce(t),t}l(hw,"barrettConvert");function dw(r){return r}l(dw,"barrettRevert");function fw(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)}l(fw,"barrettReduce");function mw(r,t){r.squareTo(t),this.reduce(t)}l(mw,"barrettSqrTo");function yw(r,t,e){r.multiplyTo(t,e),this.reduce(e)}l(yw,"barrettMulTo");xo.prototype.convert=hw;xo.prototype.revert=dw;xo.prototype.reduce=fw;xo.prototype.mulTo=yw;xo.prototype.sqrTo=mw;function gw(r,t){var e=r.bitLength(),i,n=hi(1),o;if(e<=0)return n;e<18?i=1:e<48?i=3:e<144?i=4:e<768?i=5:i=6,e<8?o=new sn(t):t.isEven()?o=new xo(t):o=new ln(t);var a=new Array,u=3,s=i-1,p=(1<<i)-1;if(a[1]=o.convert(this),i>1){var f=K();for(o.sqrTo(a[1],f);u<=p;)a[u]=K(),o.mulTo(f,a[u-2],a[u]),u+=2}var m=r.t-1,y,x=!0,S=K(),M;for(e=bc(r[m])-1;m>=0;){for(e>=s?y=r[m]>>e-s&p:(y=(r[m]&(1<<e+1)-1)<<s-e,m>0&&(y|=r[m-1]>>this.DB+e-s)),u=i;!(y&1);)y>>=1,--u;if((e-=u)<0&&(e+=this.DB,--m),x)a[y].copyTo(n),x=!1;else{for(;u>1;)o.sqrTo(n,S),o.sqrTo(S,n),u-=2;u>0?o.sqrTo(n,S):(M=n,n=S,S=M),o.mulTo(S,a[y],n)}for(;m>=0&&!(r[m]&1<<e);)o.sqrTo(n,S),M=n,n=S,S=M,--e<0&&(e=this.DB-1,--m)}return o.revert(n)}l(gw,"bnModPow");function vw(r){var t=this.s<0?this.negate():this.clone(),e=r.s<0?r.negate():r.clone();if(t.compareTo(e)<0){var i=t;t=e,e=i}var n=t.getLowestSetBit(),o=e.getLowestSetBit();if(o<0)return t;for(n<o&&(o=n),o>0&&(t.rShiftTo(o,t),e.rShiftTo(o,e));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),t.compareTo(e)>=0?(t.subTo(e,t),t.rShiftTo(1,t)):(e.subTo(t,e),e.rShiftTo(1,e));return o>0&&e.lShiftTo(o,e),e}l(vw,"bnGCD");function bw(r){if(r<=0)return 0;var t=this.DV%r,e=this.s<0?r-1:0;if(this.t>0)if(t==0)e=this[0]%r;else for(var i=this.t-1;i>=0;--i)e=(t*e+this[i])%r;return e}l(bw,"bnpModInt");function Cw(r){var t=r.isEven();if(this.isEven()&&t||r.signum()==0)return O.ZERO;for(var e=r.clone(),i=this.clone(),n=hi(1),o=hi(0),a=hi(0),u=hi(1);e.signum()!=0;){for(;e.isEven();)e.rShiftTo(1,e),t?((!n.isEven()||!o.isEven())&&(n.addTo(this,n),o.subTo(r,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(r,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),t?((!a.isEven()||!u.isEven())&&(a.addTo(this,a),u.subTo(r,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(r,u),u.rShiftTo(1,u);e.compareTo(i)>=0?(e.subTo(i,e),t&&n.subTo(a,n),o.subTo(u,o)):(i.subTo(e,i),t&&a.subTo(n,a),u.subTo(o,u))}if(i.compareTo(O.ONE)!=0)return O.ZERO;if(u.compareTo(r)>=0)return u.subtract(r);if(u.signum()<0)u.addTo(r,u);else return u;return u.signum()<0?u.add(r):u}l(Cw,"bnModInverse");var Jt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],xw=(1<<26)/Jt[Jt.length-1];function Sw(r){var t,e=this.abs();if(e.t==1&&e[0]<=Jt[Jt.length-1]){for(t=0;t<Jt.length;++t)if(e[0]==Jt[t])return!0;return!1}if(e.isEven())return!1;for(t=1;t<Jt.length;){for(var i=Jt[t],n=t+1;n<Jt.length&&i<xw;)i*=Jt[n++];for(i=e.modInt(i);t<n;)if(i%Jt[t++]==0)return!1}return e.millerRabin(r)}l(Sw,"bnIsProbablePrime");function Pw(r){var t=this.subtract(O.ONE),e=t.getLowestSetBit();if(e<=0)return!1;var i=t.shiftRight(e);r=r+1>>1,r>Jt.length&&(r=Jt.length);for(var n=K(),o=0;o<r;++o){n.fromInt(Jt[Math.floor(Math.random()*Jt.length)]);var a=n.modPow(i,this);if(a.compareTo(O.ONE)!=0&&a.compareTo(t)!=0){for(var u=1;u++<e&&a.compareTo(t)!=0;)if(a=a.modPowInt(2,this),a.compareTo(O.ONE)==0)return!1;if(a.compareTo(t)!=0)return!1}}return!0}l(Pw,"bnpMillerRabin");O.prototype.chunkSize=MM;O.prototype.toRadix=TM;O.prototype.fromRadix=IM;O.prototype.fromNumber=EM;O.prototype.bitwiseTo=AM;O.prototype.changeBit=ZM;O.prototype.addTo=JM;O.prototype.dMultiply=ow;O.prototype.dAddOffset=aw;O.prototype.multiplyLowerTo=cw;O.prototype.multiplyUpperTo=pw;O.prototype.modInt=bw;O.prototype.millerRabin=Pw;O.prototype.clone=CM;O.prototype.intValue=xM;O.prototype.byteValue=SM;O.prototype.shortValue=PM;O.prototype.signum=wM;O.prototype.toByteArray=LM;O.prototype.equals=DM;O.prototype.min=_M;O.prototype.max=OM;O.prototype.and=NM;O.prototype.or=RM;O.prototype.xor=BM;O.prototype.andNot=FM;O.prototype.not=GM;O.prototype.shiftLeft=VM;O.prototype.shiftRight=HM;O.prototype.getLowestSetBit=jM;O.prototype.bitCount=WM;O.prototype.testBit=UM;O.prototype.setBit=zM;O.prototype.clearBit=qM;O.prototype.flipBit=$M;O.prototype.add=KM;O.prototype.subtract=QM;O.prototype.multiply=tw;O.prototype.divide=rw;O.prototype.remainder=iw;O.prototype.divideAndRemainder=nw;O.prototype.modPow=gw;O.prototype.modInverse=Cw;O.prototype.pow=uw;O.prototype.gcd=vw;O.prototype.isProbablePrime=Sw;O.prototype.square=ew;var Z=O;Z.prototype.IsNegative=function(){return this.compareTo(Z.ZERO)==-1};Z.op_Equality=function(r,t){return r.compareTo(t)==0};Z.op_Inequality=function(r,t){return r.compareTo(t)!=0};Z.op_GreaterThan=function(r,t){return r.compareTo(t)>0};Z.op_LessThan=function(r,t){return r.compareTo(t)<0};Z.op_Addition=function(r,t){return new Z(r).add(new Z(t))};Z.op_Subtraction=function(r,t){return new Z(r).subtract(new Z(t))};Z.Int128Mul=function(r,t){return new Z(r).multiply(new Z(t))};Z.op_Division=function(r,t){return r.divide(t)};Z.prototype.ToDouble=function(){return parseFloat(this.toString())};typeof gc>"u"&&(gc=l(function(r,t){var e;if(typeof Object.getOwnPropertyNames>"u"){for(e in t.prototype)(typeof r.prototype[e]>"u"||r.prototype[e]==Object.prototype[e])&&(r.prototype[e]=t.prototype[e]);for(e in t)typeof r[e]>"u"&&(r[e]=t[e]);r.$baseCtor=t}else{for(var i=Object.getOwnPropertyNames(t.prototype),n=0;n<i.length;n++)typeof Object.getOwnPropertyDescriptor(r.prototype,i[n])>"u"&&Object.defineProperty(r.prototype,i[n],Object.getOwnPropertyDescriptor(t.prototype,i[n]));for(e in t)typeof r[e]>"u"&&(r[e]=t[e]);r.$baseCtor=t}},"Inherit"));var gc;h.Path=function(){return[]};h.Paths=function(){return[]};h.DoublePoint=function(){var r=arguments;this.X=0,this.Y=0,r.length==1?(this.X=r[0].X,this.Y=r[0].Y):r.length==2&&(this.X=r[0],this.Y=r[1])};h.DoublePoint0=function(){this.X=0,this.Y=0};h.DoublePoint1=function(r){this.X=r.X,this.Y=r.Y};h.DoublePoint2=function(r,t){this.X=r,this.Y=t};h.PolyNode=function(){this.m_Parent=null,this.m_polygon=new h.Path,this.m_Index=0,this.m_jointype=0,this.m_endtype=0,this.m_Childs=[],this.IsOpen=!1};h.PolyNode.prototype.IsHoleNode=function(){for(var r=!0,t=this.m_Parent;t!==null;)r=!r,t=t.m_Parent;return r};h.PolyNode.prototype.ChildCount=function(){return this.m_Childs.length};h.PolyNode.prototype.Contour=function(){return this.m_polygon};h.PolyNode.prototype.AddChild=function(r){var t=this.m_Childs.length;this.m_Childs.push(r),r.m_Parent=this,r.m_Index=t};h.PolyNode.prototype.GetNext=function(){return this.m_Childs.length>0?this.m_Childs[0]:this.GetNextSiblingUp()};h.PolyNode.prototype.GetNextSiblingUp=function(){return this.m_Parent===null?null:this.m_Index==this.m_Parent.m_Childs.length-1?this.m_Parent.GetNextSiblingUp():this.m_Parent.m_Childs[this.m_Index+1]};h.PolyNode.prototype.Childs=function(){return this.m_Childs};h.PolyNode.prototype.Parent=function(){return this.m_Parent};h.PolyNode.prototype.IsHole=function(){return this.IsHoleNode()};h.PolyTree=function(){this.m_AllPolys=[],h.PolyNode.call(this)};h.PolyTree.prototype.Clear=function(){for(var r=0,t=this.m_AllPolys.length;r<t;r++)this.m_AllPolys[r]=null;this.m_AllPolys.length=0,this.m_Childs.length=0};h.PolyTree.prototype.GetFirst=function(){return this.m_Childs.length>0?this.m_Childs[0]:null};h.PolyTree.prototype.Total=function(){return this.m_AllPolys.length};gc(h.PolyTree,h.PolyNode);h.Math_Abs_Int64=h.Math_Abs_Int32=h.Math_Abs_Double=function(r){return Math.abs(r)};h.Math_Max_Int32_Int32=function(r,t){return Math.max(r,t)};z.msie||z.opera||z.safari?h.Cast_Int32=function(r){return r|0}:h.Cast_Int32=function(r){return~~r};z.chrome?h.Cast_Int64=function(r){return r<-2147483648||r>2147483647?r<0?Math.ceil(r):Math.floor(r):~~r}:z.firefox&&typeof Number.toInteger=="function"?h.Cast_Int64=function(r){return Number.toInteger(r)}:z.msie7||z.msie8?h.Cast_Int64=function(r){return parseInt(r,10)}:z.msie?h.Cast_Int64=function(r){return r<-2147483648||r>2147483647?r<0?Math.ceil(r):Math.floor(r):r|0}:h.Cast_Int64=function(r){return r<0?Math.ceil(r):Math.floor(r)};h.Clear=function(r){r.length=0};h.PI=3.141592653589793;h.PI2=2*3.141592653589793;h.IntPoint=function(){var r=arguments,t=r.length;if(this.X=0,this.Y=0,an)if(this.Z=0,t==3)this.X=r[0],this.Y=r[1],this.Z=r[2];else if(t==2)this.X=r[0],this.Y=r[1],this.Z=0;else if(t==1)if(r[0]instanceof h.DoublePoint){var e=r[0];this.X=h.Clipper.Round(e.X),this.Y=h.Clipper.Round(e.Y),this.Z=0}else{var i=r[0];typeof i.Z>"u"&&(i.Z=0),this.X=i.X,this.Y=i.Y,this.Z=i.Z}else this.X=0,this.Y=0,this.Z=0;else if(t==2)this.X=r[0],this.Y=r[1];else if(t==1)if(r[0]instanceof h.DoublePoint){var e=r[0];this.X=h.Clipper.Round(e.X),this.Y=h.Clipper.Round(e.Y)}else{var i=r[0];this.X=i.X,this.Y=i.Y}else this.X=0,this.Y=0};h.IntPoint.op_Equality=function(r,t){return r.X==t.X&&r.Y==t.Y};h.IntPoint.op_Inequality=function(r,t){return r.X!=t.X||r.Y!=t.Y};an?(h.IntPoint0=function(){this.X=0,this.Y=0,this.Z=0},h.IntPoint1=function(r){this.X=r.X,this.Y=r.Y,this.Z=r.Z},h.IntPoint1dp=function(r){this.X=h.Clipper.Round(r.X),this.Y=h.Clipper.Round(r.Y),this.Z=0},h.IntPoint2=function(r,t){this.X=r,this.Y=t,this.Z=0},h.IntPoint3=function(r,t,e){this.X=r,this.Y=t,this.Z=e}):(h.IntPoint0=function(){this.X=0,this.Y=0},h.IntPoint1=function(r){this.X=r.X,this.Y=r.Y},h.IntPoint1dp=function(r){this.X=h.Clipper.Round(r.X),this.Y=h.Clipper.Round(r.Y)},h.IntPoint2=function(r,t){this.X=r,this.Y=t});h.IntRect=function(){var r=arguments,t=r.length;t==4?(this.left=r[0],this.top=r[1],this.right=r[2],this.bottom=r[3]):t==1?(this.left=ir.left,this.top=ir.top,this.right=ir.right,this.bottom=ir.bottom):(this.left=0,this.top=0,this.right=0,this.bottom=0)};h.IntRect0=function(){this.left=0,this.top=0,this.right=0,this.bottom=0};h.IntRect1=function(r){this.left=r.left,this.top=r.top,this.right=r.right,this.bottom=r.bottom};h.IntRect4=function(r,t,e,i){this.left=r,this.top=t,this.right=e,this.bottom=i};h.ClipType={ctIntersection:0,ctUnion:1,ctDifference:2,ctXor:3};h.PolyType={ptSubject:0,ptClip:1};h.PolyFillType={pftEvenOdd:0,pftNonZero:1,pftPositive:2,pftNegative:3};h.JoinType={jtSquare:0,jtRound:1,jtMiter:2};h.EndType={etOpenSquare:0,etOpenRound:1,etOpenButt:2,etClosedLine:3,etClosedPolygon:4};A4&&(h.EndType_={etSquare:0,etRound:1,etButt:2,etClosed:3});h.EdgeSide={esLeft:0,esRight:1};h.Direction={dRightToLeft:0,dLeftToRight:1};h.TEdge=function(){this.Bot=new h.IntPoint,this.Curr=new h.IntPoint,this.Top=new h.IntPoint,this.Delta=new h.IntPoint,this.Dx=0,this.PolyTyp=h.PolyType.ptSubject,this.Side=h.EdgeSide.esLeft,this.WindDelta=0,this.WindCnt=0,this.WindCnt2=0,this.OutIdx=0,this.Next=null,this.Prev=null,this.NextInLML=null,this.NextInAEL=null,this.PrevInAEL=null,this.NextInSEL=null,this.PrevInSEL=null};h.IntersectNode=function(){this.Edge1=null,this.Edge2=null,this.Pt=new h.IntPoint};h.MyIntersectNodeSort=function(){};h.MyIntersectNodeSort.Compare=function(r,t){return t.Pt.Y-r.Pt.Y};h.LocalMinima=function(){this.Y=0,this.LeftBound=null,this.RightBound=null,this.Next=null};h.Scanbeam=function(){this.Y=0,this.Next=null};h.OutRec=function(){this.Idx=0,this.IsHole=!1,this.IsOpen=!1,this.FirstLeft=null,this.Pts=null,this.BottomPt=null,this.PolyNode=null};h.OutPt=function(){this.Idx=0,this.Pt=new h.IntPoint,this.Next=null,this.Prev=null};h.Join=function(){this.OutPt1=null,this.OutPt2=null,this.OffPt=new h.IntPoint};h.ClipperBase=function(){this.m_MinimaList=null,this.m_CurrentLM=null,this.m_edges=new Array,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1,this.PreserveCollinear=!1,this.m_MinimaList=null,this.m_CurrentLM=null,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1};h.ClipperBase.horizontal=-9007199254740992;h.ClipperBase.Skip=-2;h.ClipperBase.Unassigned=-1;h.ClipperBase.tolerance=1e-20;RP?(h.ClipperBase.loRange=46340,h.ClipperBase.hiRange=46340):(h.ClipperBase.loRange=47453132,h.ClipperBase.hiRange=0xfffffffffffff);h.ClipperBase.near_zero=function(r){return r>-h.ClipperBase.tolerance&&r<h.ClipperBase.tolerance};h.ClipperBase.IsHorizontal=function(r){return r.Delta.Y===0};h.ClipperBase.prototype.PointIsVertex=function(r,t){var e=t;do{if(h.IntPoint.op_Equality(e.Pt,r))return!0;e=e.Next}while(e!=t);return!1};h.ClipperBase.prototype.PointOnLineSegment=function(r,t,e,i){return i?r.X==t.X&&r.Y==t.Y||r.X==e.X&&r.Y==e.Y||r.X>t.X==r.X<e.X&&r.Y>t.Y==r.Y<e.Y&&Z.op_Equality(Z.Int128Mul(r.X-t.X,e.Y-t.Y),Z.Int128Mul(e.X-t.X,r.Y-t.Y)):r.X==t.X&&r.Y==t.Y||r.X==e.X&&r.Y==e.Y||r.X>t.X==r.X<e.X&&r.Y>t.Y==r.Y<e.Y&&(r.X-t.X)*(e.Y-t.Y)==(e.X-t.X)*(r.Y-t.Y)};h.ClipperBase.prototype.PointOnPolygon=function(r,t,e){for(var i=t;;){if(this.PointOnLineSegment(r,i.Pt,i.Next.Pt,e))return!0;if(i=i.Next,i==t)break}return!1};h.ClipperBase.prototype.SlopesEqual=h.ClipperBase.SlopesEqual=function(){var r=arguments,t=r.length,e,i,n,o,a,u,s;return t==3?(e=r[0],i=r[1],s=r[2],s?Z.op_Equality(Z.Int128Mul(e.Delta.Y,i.Delta.X),Z.Int128Mul(e.Delta.X,i.Delta.Y)):h.Cast_Int64(e.Delta.Y*i.Delta.X)==h.Cast_Int64(e.Delta.X*i.Delta.Y)):t==4?(n=r[0],o=r[1],a=r[2],s=r[3],s?Z.op_Equality(Z.Int128Mul(n.Y-o.Y,o.X-a.X),Z.Int128Mul(n.X-o.X,o.Y-a.Y)):h.Cast_Int64((n.Y-o.Y)*(o.X-a.X))-h.Cast_Int64((n.X-o.X)*(o.Y-a.Y))===0):(n=r[0],o=r[1],a=r[2],u=r[3],s=r[4],s?Z.op_Equality(Z.Int128Mul(n.Y-o.Y,a.X-u.X),Z.Int128Mul(n.X-o.X,a.Y-u.Y)):h.Cast_Int64((n.Y-o.Y)*(a.X-u.X))-h.Cast_Int64((n.X-o.X)*(a.Y-u.Y))===0)};h.ClipperBase.SlopesEqual3=function(r,t,e){return e?Z.op_Equality(Z.Int128Mul(r.Delta.Y,t.Delta.X),Z.Int128Mul(r.Delta.X,t.Delta.Y)):h.Cast_Int64(r.Delta.Y*t.Delta.X)==h.Cast_Int64(r.Delta.X*t.Delta.Y)};h.ClipperBase.SlopesEqual4=function(r,t,e,i){return i?Z.op_Equality(Z.Int128Mul(r.Y-t.Y,t.X-e.X),Z.Int128Mul(r.X-t.X,t.Y-e.Y)):h.Cast_Int64((r.Y-t.Y)*(t.X-e.X))-h.Cast_Int64((r.X-t.X)*(t.Y-e.Y))===0};h.ClipperBase.SlopesEqual5=function(r,t,e,i,n){return n?Z.op_Equality(Z.Int128Mul(r.Y-t.Y,e.X-i.X),Z.Int128Mul(r.X-t.X,e.Y-i.Y)):h.Cast_Int64((r.Y-t.Y)*(e.X-i.X))-h.Cast_Int64((r.X-t.X)*(e.Y-i.Y))===0};h.ClipperBase.prototype.Clear=function(){this.DisposeLocalMinimaList();for(var r=0,t=this.m_edges.length;r<t;++r){for(var e=0,i=this.m_edges[r].length;e<i;++e)this.m_edges[r][e]=null;h.Clear(this.m_edges[r])}h.Clear(this.m_edges),this.m_UseFullRange=!1,this.m_HasOpenPaths=!1};h.ClipperBase.prototype.DisposeLocalMinimaList=function(){for(;this.m_MinimaList!==null;){var r=this.m_MinimaList.Next;this.m_MinimaList=null,this.m_MinimaList=r}this.m_CurrentLM=null};h.ClipperBase.prototype.RangeTest=function(r,t){t.Value?(r.X>h.ClipperBase.hiRange||r.Y>h.ClipperBase.hiRange||-r.X>h.ClipperBase.hiRange||-r.Y>h.ClipperBase.hiRange)&&h.Error("Coordinate outside allowed range in RangeTest()."):(r.X>h.ClipperBase.loRange||r.Y>h.ClipperBase.loRange||-r.X>h.ClipperBase.loRange||-r.Y>h.ClipperBase.loRange)&&(t.Value=!0,this.RangeTest(r,t))};h.ClipperBase.prototype.InitEdge=function(r,t,e,i){r.Next=t,r.Prev=e,r.Curr.X=i.X,r.Curr.Y=i.Y,r.OutIdx=-1};h.ClipperBase.prototype.InitEdge2=function(r,t){r.Curr.Y>=r.Next.Curr.Y?(r.Bot.X=r.Curr.X,r.Bot.Y=r.Curr.Y,r.Top.X=r.Next.Curr.X,r.Top.Y=r.Next.Curr.Y):(r.Top.X=r.Curr.X,r.Top.Y=r.Curr.Y,r.Bot.X=r.Next.Curr.X,r.Bot.Y=r.Next.Curr.Y),this.SetDx(r),r.PolyTyp=t};h.ClipperBase.prototype.FindNextLocMin=function(r){for(var t;;){for(;h.IntPoint.op_Inequality(r.Bot,r.Prev.Bot)||h.IntPoint.op_Equality(r.Curr,r.Top);)r=r.Next;if(r.Dx!=h.ClipperBase.horizontal&&r.Prev.Dx!=h.ClipperBase.horizontal)break;for(;r.Prev.Dx==h.ClipperBase.horizontal;)r=r.Prev;for(t=r;r.Dx==h.ClipperBase.horizontal;)r=r.Next;if(r.Top.Y!=r.Prev.Bot.Y){t.Prev.Bot.X<r.Bot.X&&(r=t);break}}return r};h.ClipperBase.prototype.ProcessBound=function(r,t){var e=r,i=r,n,o;if(r.Dx==h.ClipperBase.horizontal&&(t?o=r.Prev.Bot.X:o=r.Next.Bot.X,r.Bot.X!=o&&this.ReverseHorizontal(r)),i.OutIdx!=h.ClipperBase.Skip)if(t){for(;i.Top.Y==i.Next.Bot.Y&&i.Next.OutIdx!=h.ClipperBase.Skip;)i=i.Next;if(i.Dx==h.ClipperBase.horizontal&&i.Next.OutIdx!=h.ClipperBase.Skip){for(n=i;n.Prev.Dx==h.ClipperBase.horizontal;)n=n.Prev;n.Prev.Top.X==i.Next.Top.X?t||(i=n.Prev):n.Prev.Top.X>i.Next.Top.X&&(i=n.Prev)}for(;r!=i;)r.NextInLML=r.Next,r.Dx==h.ClipperBase.horizontal&&r!=e&&r.Bot.X!=r.Prev.Top.X&&this.ReverseHorizontal(r),r=r.Next;r.Dx==h.ClipperBase.horizontal&&r!=e&&r.Bot.X!=r.Prev.Top.X&&this.ReverseHorizontal(r),i=i.Next}else{for(;i.Top.Y==i.Prev.Bot.Y&&i.Prev.OutIdx!=h.ClipperBase.Skip;)i=i.Prev;if(i.Dx==h.ClipperBase.horizontal&&i.Prev.OutIdx!=h.ClipperBase.Skip){for(n=i;n.Next.Dx==h.ClipperBase.horizontal;)n=n.Next;n.Next.Top.X==i.Prev.Top.X?t||(i=n.Next):n.Next.Top.X>i.Prev.Top.X&&(i=n.Next)}for(;r!=i;)r.NextInLML=r.Prev,r.Dx==h.ClipperBase.horizontal&&r!=e&&r.Bot.X!=r.Next.Top.X&&this.ReverseHorizontal(r),r=r.Prev;r.Dx==h.ClipperBase.horizontal&&r!=e&&r.Bot.X!=r.Next.Top.X&&this.ReverseHorizontal(r),i=i.Prev}if(i.OutIdx==h.ClipperBase.Skip){if(r=i,t){for(;r.Top.Y==r.Next.Bot.Y;)r=r.Next;for(;r!=i&&r.Dx==h.ClipperBase.horizontal;)r=r.Prev}else{for(;r.Top.Y==r.Prev.Bot.Y;)r=r.Prev;for(;r!=i&&r.Dx==h.ClipperBase.horizontal;)r=r.Next}if(r==i)t?i=r.Next:i=r.Prev;else{t?r=i.Next:r=i.Prev;var a=new h.LocalMinima;a.Next=null,a.Y=r.Bot.Y,a.LeftBound=null,a.RightBound=r,a.RightBound.WindDelta=0,i=this.ProcessBound(a.RightBound,t),this.InsertLocalMinima(a)}}return i};h.ClipperBase.prototype.AddPath=function(r,t,e){O4?!e&&t==h.PolyType.ptClip&&h.Error("AddPath: Open paths must be subject."):e||h.Error("AddPath: Open paths have been disabled.");var i=r.length-1;if(e)for(;i>0&&h.IntPoint.op_Equality(r[i],r[0]);)--i;for(;i>0&&h.IntPoint.op_Equality(r[i],r[i-1]);)--i;if(e&&i<2||!e&&i<1)return!1;for(var n=new Array,o=0;o<=i;o++)n.push(new h.TEdge);var a=!0;n[1].Curr.X=r[1].X,n[1].Curr.Y=r[1].Y;var u={Value:this.m_UseFullRange};this.RangeTest(r[0],u),this.m_UseFullRange=u.Value,u.Value=this.m_UseFullRange,this.RangeTest(r[i],u),this.m_UseFullRange=u.Value,this.InitEdge(n[0],n[1],n[i],r[0]),this.InitEdge(n[i],n[0],n[i-1],r[i]);for(var o=i-1;o>=1;--o)u.Value=this.m_UseFullRange,this.RangeTest(r[o],u),this.m_UseFullRange=u.Value,this.InitEdge(n[o],n[o+1],n[o-1],r[o]);for(var s=n[0],p=s,f=s;;){if(h.IntPoint.op_Equality(p.Curr,p.Next.Curr)){if(p==p.Next)break;p==s&&(s=p.Next),p=this.RemoveEdge(p),f=p;continue}if(p.Prev==p.Next)break;if(e&&h.ClipperBase.SlopesEqual(p.Prev.Curr,p.Curr,p.Next.Curr,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(p.Prev.Curr,p.Curr,p.Next.Curr))){p==s&&(s=p.Next),p=this.RemoveEdge(p),p=p.Prev,f=p;continue}if(p=p.Next,p==f)break}if(!e&&p==p.Next||e&&p.Prev==p.Next)return!1;e||(this.m_HasOpenPaths=!0,s.Prev.OutIdx=h.ClipperBase.Skip);var m=s;p=s;do this.InitEdge2(p,t),p=p.Next,a&&p.Curr.Y!=s.Curr.Y&&(a=!1);while(p!=s);if(a){if(e)return!1;p.Prev.OutIdx=h.ClipperBase.Skip,p.Prev.Bot.X<p.Prev.Top.X&&this.ReverseHorizontal(p.Prev);var y=new h.LocalMinima;for(y.Next=null,y.Y=p.Bot.Y,y.LeftBound=null,y.RightBound=p,y.RightBound.Side=h.EdgeSide.esRight,y.RightBound.WindDelta=0;p.Next.OutIdx!=h.ClipperBase.Skip;)p.NextInLML=p.Next,p.Bot.X!=p.Prev.Top.X&&this.ReverseHorizontal(p),p=p.Next;return this.InsertLocalMinima(y),this.m_edges.push(n),!0}this.m_edges.push(n);for(var x,S=null;p=this.FindNextLocMin(p),p!=S;){S==null&&(S=p);var y=new h.LocalMinima;y.Next=null,y.Y=p.Bot.Y,p.Dx<p.Prev.Dx?(y.LeftBound=p.Prev,y.RightBound=p,x=!1):(y.LeftBound=p,y.RightBound=p.Prev,x=!0),y.LeftBound.Side=h.EdgeSide.esLeft,y.RightBound.Side=h.EdgeSide.esRight,e?y.LeftBound.Next==y.RightBound?y.LeftBound.WindDelta=-1:y.LeftBound.WindDelta=1:y.LeftBound.WindDelta=0,y.RightBound.WindDelta=-y.LeftBound.WindDelta,p=this.ProcessBound(y.LeftBound,x);var M=this.ProcessBound(y.RightBound,!x);y.LeftBound.OutIdx==h.ClipperBase.Skip?y.LeftBound=null:y.RightBound.OutIdx==h.ClipperBase.Skip&&(y.RightBound=null),this.InsertLocalMinima(y),x||(p=M)}return!0};h.ClipperBase.prototype.AddPaths=function(r,t,e){for(var i=!1,n=0,o=r.length;n<o;++n)this.AddPath(r[n],t,e)&&(i=!0);return i};h.ClipperBase.prototype.Pt2IsBetweenPt1AndPt3=function(r,t,e){return h.IntPoint.op_Equality(r,e)||h.IntPoint.op_Equality(r,t)||h.IntPoint.op_Equality(e,t)?!1:r.X!=e.X?t.X>r.X==t.X<e.X:t.Y>r.Y==t.Y<e.Y};h.ClipperBase.prototype.RemoveEdge=function(r){r.Prev.Next=r.Next,r.Next.Prev=r.Prev;var t=r.Next;return r.Prev=null,t};h.ClipperBase.prototype.SetDx=function(r){r.Delta.X=r.Top.X-r.Bot.X,r.Delta.Y=r.Top.Y-r.Bot.Y,r.Delta.Y===0?r.Dx=h.ClipperBase.horizontal:r.Dx=r.Delta.X/r.Delta.Y};h.ClipperBase.prototype.InsertLocalMinima=function(r){if(this.m_MinimaList===null)this.m_MinimaList=r;else if(r.Y>=this.m_MinimaList.Y)r.Next=this.m_MinimaList,this.m_MinimaList=r;else{for(var t=this.m_MinimaList;t.Next!==null&&r.Y<t.Next.Y;)t=t.Next;r.Next=t.Next,t.Next=r}};h.ClipperBase.prototype.PopLocalMinima=function(){this.m_CurrentLM!==null&&(this.m_CurrentLM=this.m_CurrentLM.Next)};h.ClipperBase.prototype.ReverseHorizontal=function(r){var t=r.Top.X;r.Top.X=r.Bot.X,r.Bot.X=t,an&&(t=r.Top.Z,r.Top.Z=r.Bot.Z,r.Bot.Z=t)};h.ClipperBase.prototype.Reset=function(){if(this.m_CurrentLM=this.m_MinimaList,this.m_CurrentLM!=null)for(var r=this.m_MinimaList;r!=null;){var t=r.LeftBound;t!=null&&(t.Curr.X=t.Bot.X,t.Curr.Y=t.Bot.Y,t.Side=h.EdgeSide.esLeft,t.OutIdx=h.ClipperBase.Unassigned),t=r.RightBound,t!=null&&(t.Curr.X=t.Bot.X,t.Curr.Y=t.Bot.Y,t.Side=h.EdgeSide.esRight,t.OutIdx=h.ClipperBase.Unassigned),r=r.Next}};h.Clipper=function(r){typeof r>"u"&&(r=0),this.m_PolyOuts=null,this.m_ClipType=h.ClipType.ctIntersection,this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=null,this.m_IntersectNodeComparer=null,this.m_ExecuteLocked=!1,this.m_ClipFillType=h.PolyFillType.pftEvenOdd,this.m_SubjFillType=h.PolyFillType.pftEvenOdd,this.m_Joins=null,this.m_GhostJoins=null,this.m_UsingPolyTree=!1,this.ReverseSolution=!1,this.StrictlySimple=!1,h.ClipperBase.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=new Array,this.m_IntersectNodeComparer=h.MyIntersectNodeSort.Compare,this.m_ExecuteLocked=!1,this.m_UsingPolyTree=!1,this.m_PolyOuts=new Array,this.m_Joins=new Array,this.m_GhostJoins=new Array,this.ReverseSolution=(1&r)!==0,this.StrictlySimple=(2&r)!==0,this.PreserveCollinear=(4&r)!==0,an&&(this.ZFillFunction=null)};h.Clipper.ioReverseSolution=1;h.Clipper.ioStrictlySimple=2;h.Clipper.ioPreserveCollinear=4;h.Clipper.prototype.Clear=function(){this.m_edges.length!==0&&(this.DisposeAllPolyPts(),h.ClipperBase.prototype.Clear.call(this))};h.Clipper.prototype.DisposeScanbeamList=function(){for(;this.m_Scanbeam!==null;){var r=this.m_Scanbeam.Next;this.m_Scanbeam=null,this.m_Scanbeam=r}};h.Clipper.prototype.Reset=function(){h.ClipperBase.prototype.Reset.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null;for(var r=this.m_MinimaList;r!==null;)this.InsertScanbeam(r.Y),r=r.Next};h.Clipper.prototype.InsertScanbeam=function(r){if(this.m_Scanbeam===null)this.m_Scanbeam=new h.Scanbeam,this.m_Scanbeam.Next=null,this.m_Scanbeam.Y=r;else if(r>this.m_Scanbeam.Y){var t=new h.Scanbeam;t.Y=r,t.Next=this.m_Scanbeam,this.m_Scanbeam=t}else{for(var e=this.m_Scanbeam;e.Next!==null&&r<=e.Next.Y;)e=e.Next;if(r==e.Y)return;var t=new h.Scanbeam;t.Y=r,t.Next=e.Next,e.Next=t}};h.Clipper.prototype.Execute=function(){var r=arguments,t=r.length,e=r[1]instanceof h.PolyTree;if(t==4&&!e){var i=r[0],n=r[1],o=r[2],a=r[3];if(this.m_ExecuteLocked)return!1;this.m_HasOpenPaths&&h.Error("Error: PolyTree struct is need for open path clipping."),this.m_ExecuteLocked=!0,h.Clear(n),this.m_SubjFillType=o,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!1;try{var u=this.ExecuteInternal();u&&this.BuildResult(n)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return u}else if(t==4&&e){var i=r[0],s=r[1],o=r[2],a=r[3];if(this.m_ExecuteLocked)return!1;this.m_ExecuteLocked=!0,this.m_SubjFillType=o,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!0;try{var u=this.ExecuteInternal();u&&this.BuildResult2(s)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return u}else if(t==2&&!e){var i=r[0],n=r[1];return this.Execute(i,n,h.PolyFillType.pftEvenOdd,h.PolyFillType.pftEvenOdd)}else if(t==2&&e){var i=r[0],s=r[1];return this.Execute(i,s,h.PolyFillType.pftEvenOdd,h.PolyFillType.pftEvenOdd)}};h.Clipper.prototype.FixHoleLinkage=function(r){if(!(r.FirstLeft===null||r.IsHole!=r.FirstLeft.IsHole&&r.FirstLeft.Pts!==null)){for(var t=r.FirstLeft;t!==null&&(t.IsHole==r.IsHole||t.Pts===null);)t=t.FirstLeft;r.FirstLeft=t}};h.Clipper.prototype.ExecuteInternal=function(){try{if(this.Reset(),this.m_CurrentLM===null)return!1;var r=this.PopScanbeam();do{if(this.InsertLocalMinimaIntoAEL(r),h.Clear(this.m_GhostJoins),this.ProcessHorizontals(!1),this.m_Scanbeam===null)break;var t=this.PopScanbeam();if(!this.ProcessIntersections(r,t))return!1;this.ProcessEdgesAtTopOfScanbeam(t),r=t}while(this.m_Scanbeam!==null||this.m_CurrentLM!==null);for(var e=0,i=this.m_PolyOuts.length;e<i;e++){var n=this.m_PolyOuts[e];n.Pts===null||n.IsOpen||(n.IsHole^this.ReverseSolution)==this.Area(n)>0&&this.ReversePolyPtLinks(n.Pts)}this.JoinCommonEdges();for(var e=0,i=this.m_PolyOuts.length;e<i;e++){var n=this.m_PolyOuts[e];n.Pts!==null&&!n.IsOpen&&this.FixupOutPolygon(n)}return this.StrictlySimple&&this.DoSimplePolygons(),!0}finally{h.Clear(this.m_Joins),h.Clear(this.m_GhostJoins)}};h.Clipper.prototype.PopScanbeam=function(){var r=this.m_Scanbeam.Y,t=this.m_Scanbeam;return this.m_Scanbeam=this.m_Scanbeam.Next,t=null,r};h.Clipper.prototype.DisposeAllPolyPts=function(){for(var r=0,t=this.m_PolyOuts.length;r<t;++r)this.DisposeOutRec(r);h.Clear(this.m_PolyOuts)};h.Clipper.prototype.DisposeOutRec=function(r){var t=this.m_PolyOuts[r];t.Pts!==null&&this.DisposeOutPts(t.Pts),t=null,this.m_PolyOuts[r]=null};h.Clipper.prototype.DisposeOutPts=function(r){if(r!==null){var t=null;for(r.Prev.Next=null;r!==null;)t=r,r=r.Next,t=null}};h.Clipper.prototype.AddJoin=function(r,t,e){var i=new h.Join;i.OutPt1=r,i.OutPt2=t,i.OffPt.X=e.X,i.OffPt.Y=e.Y,this.m_Joins.push(i)};h.Clipper.prototype.AddGhostJoin=function(r,t){var e=new h.Join;e.OutPt1=r,e.OffPt.X=t.X,e.OffPt.Y=t.Y,this.m_GhostJoins.push(e)};an&&(h.Clipper.prototype.SetZ=function(r,t){r.Z=0,this.ZFillFunction!==null&&(t.OutIdx<0?this.ZFillFunction(t.Bot,t.Top,r):this.ZFillFunction(t.Top,t.Bot,r))});h.Clipper.prototype.InsertLocalMinimaIntoAEL=function(r){for(;this.m_CurrentLM!==null&&this.m_CurrentLM.Y==r;){var t=this.m_CurrentLM.LeftBound,e=this.m_CurrentLM.RightBound;this.PopLocalMinima();var i=null;if(t===null?(this.InsertEdgeIntoAEL(e,null),this.SetWindingCount(e),this.IsContributing(e)&&(i=this.AddOutPt(e,e.Bot))):e==null?(this.InsertEdgeIntoAEL(t,null),this.SetWindingCount(t),this.IsContributing(t)&&(i=this.AddOutPt(t,t.Bot)),this.InsertScanbeam(t.Top.Y)):(this.InsertEdgeIntoAEL(t,null),this.InsertEdgeIntoAEL(e,t),this.SetWindingCount(t),e.WindCnt=t.WindCnt,e.WindCnt2=t.WindCnt2,this.IsContributing(t)&&(i=this.AddLocalMinPoly(t,e,t.Bot)),this.InsertScanbeam(t.Top.Y)),e!=null&&(h.ClipperBase.IsHorizontal(e)?this.AddEdgeToSEL(e):this.InsertScanbeam(e.Top.Y)),!(t==null||e==null)){if(i!==null&&h.ClipperBase.IsHorizontal(e)&&this.m_GhostJoins.length>0&&e.WindDelta!==0)for(var n=0,o=this.m_GhostJoins.length;n<o;n++){var a=this.m_GhostJoins[n];this.HorzSegmentsOverlap(a.OutPt1.Pt,a.OffPt,e.Bot,e.Top)&&this.AddJoin(a.OutPt1,i,a.OffPt)}if(t.OutIdx>=0&&t.PrevInAEL!==null&&t.PrevInAEL.Curr.X==t.Bot.X&&t.PrevInAEL.OutIdx>=0&&h.ClipperBase.SlopesEqual(t.PrevInAEL,t,this.m_UseFullRange)&&t.WindDelta!==0&&t.PrevInAEL.WindDelta!==0){var u=this.AddOutPt(t.PrevInAEL,t.Bot);this.AddJoin(i,u,t.Top)}if(t.NextInAEL!=e){if(e.OutIdx>=0&&e.PrevInAEL.OutIdx>=0&&h.ClipperBase.SlopesEqual(e.PrevInAEL,e,this.m_UseFullRange)&&e.WindDelta!==0&&e.PrevInAEL.WindDelta!==0){var u=this.AddOutPt(e.PrevInAEL,e.Bot);this.AddJoin(i,u,e.Top)}var s=t.NextInAEL;if(s!==null)for(;s!=e;)this.IntersectEdges(e,s,t.Curr,!1),s=s.NextInAEL}}}};h.Clipper.prototype.InsertEdgeIntoAEL=function(r,t){if(this.m_ActiveEdges===null)r.PrevInAEL=null,r.NextInAEL=null,this.m_ActiveEdges=r;else if(t===null&&this.E2InsertsBeforeE1(this.m_ActiveEdges,r))r.PrevInAEL=null,r.NextInAEL=this.m_ActiveEdges,this.m_ActiveEdges.PrevInAEL=r,this.m_ActiveEdges=r;else{for(t===null&&(t=this.m_ActiveEdges);t.NextInAEL!==null&&!this.E2InsertsBeforeE1(t.NextInAEL,r);)t=t.NextInAEL;r.NextInAEL=t.NextInAEL,t.NextInAEL!==null&&(t.NextInAEL.PrevInAEL=r),r.PrevInAEL=t,t.NextInAEL=r}};h.Clipper.prototype.E2InsertsBeforeE1=function(r,t){return t.Curr.X==r.Curr.X?t.Top.Y>r.Top.Y?t.Top.X<h.Clipper.TopX(r,t.Top.Y):r.Top.X>h.Clipper.TopX(t,r.Top.Y):t.Curr.X<r.Curr.X};h.Clipper.prototype.IsEvenOddFillType=function(r){return r.PolyTyp==h.PolyType.ptSubject?this.m_SubjFillType==h.PolyFillType.pftEvenOdd:this.m_ClipFillType==h.PolyFillType.pftEvenOdd};h.Clipper.prototype.IsEvenOddAltFillType=function(r){return r.PolyTyp==h.PolyType.ptSubject?this.m_ClipFillType==h.PolyFillType.pftEvenOdd:this.m_SubjFillType==h.PolyFillType.pftEvenOdd};h.Clipper.prototype.IsContributing=function(r){var t,e;switch(r.PolyTyp==h.PolyType.ptSubject?(t=this.m_SubjFillType,e=this.m_ClipFillType):(t=this.m_ClipFillType,e=this.m_SubjFillType),t){case h.PolyFillType.pftEvenOdd:if(r.WindDelta===0&&r.WindCnt!=1)return!1;break;case h.PolyFillType.pftNonZero:if(Math.abs(r.WindCnt)!=1)return!1;break;case h.PolyFillType.pftPositive:if(r.WindCnt!=1)return!1;break;default:if(r.WindCnt!=-1)return!1;break}switch(this.m_ClipType){case h.ClipType.ctIntersection:switch(e){case h.PolyFillType.pftEvenOdd:case h.PolyFillType.pftNonZero:return r.WindCnt2!==0;case h.PolyFillType.pftPositive:return r.WindCnt2>0;default:return r.WindCnt2<0}case h.ClipType.ctUnion:switch(e){case h.PolyFillType.pftEvenOdd:case h.PolyFillType.pftNonZero:return r.WindCnt2===0;case h.PolyFillType.pftPositive:return r.WindCnt2<=0;default:return r.WindCnt2>=0}case h.ClipType.ctDifference:if(r.PolyTyp==h.PolyType.ptSubject)switch(e){case h.PolyFillType.pftEvenOdd:case h.PolyFillType.pftNonZero:return r.WindCnt2===0;case h.PolyFillType.pftPositive:return r.WindCnt2<=0;default:return r.WindCnt2>=0}else switch(e){case h.PolyFillType.pftEvenOdd:case h.PolyFillType.pftNonZero:return r.WindCnt2!==0;case h.PolyFillType.pftPositive:return r.WindCnt2>0;default:return r.WindCnt2<0}case h.ClipType.ctXor:if(r.WindDelta===0)switch(e){case h.PolyFillType.pftEvenOdd:case h.PolyFillType.pftNonZero:return r.WindCnt2===0;case h.PolyFillType.pftPositive:return r.WindCnt2<=0;default:return r.WindCnt2>=0}else return!0}return!0};h.Clipper.prototype.SetWindingCount=function(r){for(var t=r.PrevInAEL;t!==null&&(t.PolyTyp!=r.PolyTyp||t.WindDelta===0);)t=t.PrevInAEL;if(t===null)r.WindCnt=r.WindDelta===0?1:r.WindDelta,r.WindCnt2=0,t=this.m_ActiveEdges;else if(r.WindDelta===0&&this.m_ClipType!=h.ClipType.ctUnion)r.WindCnt=1,r.WindCnt2=t.WindCnt2,t=t.NextInAEL;else if(this.IsEvenOddFillType(r)){if(r.WindDelta===0){for(var e=!0,i=t.PrevInAEL;i!==null;)i.PolyTyp==t.PolyTyp&&i.WindDelta!==0&&(e=!e),i=i.PrevInAEL;r.WindCnt=e?0:1}else r.WindCnt=r.WindDelta;r.WindCnt2=t.WindCnt2,t=t.NextInAEL}else t.WindCnt*t.WindDelta<0?Math.abs(t.WindCnt)>1?t.WindDelta*r.WindDelta<0?r.WindCnt=t.WindCnt:r.WindCnt=t.WindCnt+r.WindDelta:r.WindCnt=r.WindDelta===0?1:r.WindDelta:r.WindDelta===0?r.WindCnt=t.WindCnt<0?t.WindCnt-1:t.WindCnt+1:t.WindDelta*r.WindDelta<0?r.WindCnt=t.WindCnt:r.WindCnt=t.WindCnt+r.WindDelta,r.WindCnt2=t.WindCnt2,t=t.NextInAEL;if(this.IsEvenOddAltFillType(r))for(;t!=r;)t.WindDelta!==0&&(r.WindCnt2=r.WindCnt2===0?1:0),t=t.NextInAEL;else for(;t!=r;)r.WindCnt2+=t.WindDelta,t=t.NextInAEL};h.Clipper.prototype.AddEdgeToSEL=function(r){this.m_SortedEdges===null?(this.m_SortedEdges=r,r.PrevInSEL=null,r.NextInSEL=null):(r.NextInSEL=this.m_SortedEdges,r.PrevInSEL=null,this.m_SortedEdges.PrevInSEL=r,this.m_SortedEdges=r)};h.Clipper.prototype.CopyAELToSEL=function(){var r=this.m_ActiveEdges;for(this.m_SortedEdges=r;r!==null;)r.PrevInSEL=r.PrevInAEL,r.NextInSEL=r.NextInAEL,r=r.NextInAEL};h.Clipper.prototype.SwapPositionsInAEL=function(r,t){if(!(r.NextInAEL==r.PrevInAEL||t.NextInAEL==t.PrevInAEL)){if(r.NextInAEL==t){var e=t.NextInAEL;e!==null&&(e.PrevInAEL=r);var i=r.PrevInAEL;i!==null&&(i.NextInAEL=t),t.PrevInAEL=i,t.NextInAEL=r,r.PrevInAEL=t,r.NextInAEL=e}else if(t.NextInAEL==r){var e=r.NextInAEL;e!==null&&(e.PrevInAEL=t);var i=t.PrevInAEL;i!==null&&(i.NextInAEL=r),r.PrevInAEL=i,r.NextInAEL=t,t.PrevInAEL=r,t.NextInAEL=e}else{var e=r.NextInAEL,i=r.PrevInAEL;r.NextInAEL=t.NextInAEL,r.NextInAEL!==null&&(r.NextInAEL.PrevInAEL=r),r.PrevInAEL=t.PrevInAEL,r.PrevInAEL!==null&&(r.PrevInAEL.NextInAEL=r),t.NextInAEL=e,t.NextInAEL!==null&&(t.NextInAEL.PrevInAEL=t),t.PrevInAEL=i,t.PrevInAEL!==null&&(t.PrevInAEL.NextInAEL=t)}r.PrevInAEL===null?this.m_ActiveEdges=r:t.PrevInAEL===null&&(this.m_ActiveEdges=t)}};h.Clipper.prototype.SwapPositionsInSEL=function(r,t){if(!(r.NextInSEL===null&&r.PrevInSEL===null)&&!(t.NextInSEL===null&&t.PrevInSEL===null)){if(r.NextInSEL==t){var e=t.NextInSEL;e!==null&&(e.PrevInSEL=r);var i=r.PrevInSEL;i!==null&&(i.NextInSEL=t),t.PrevInSEL=i,t.NextInSEL=r,r.PrevInSEL=t,r.NextInSEL=e}else if(t.NextInSEL==r){var e=r.NextInSEL;e!==null&&(e.PrevInSEL=t);var i=t.PrevInSEL;i!==null&&(i.NextInSEL=r),r.PrevInSEL=i,r.NextInSEL=t,t.PrevInSEL=r,t.NextInSEL=e}else{var e=r.NextInSEL,i=r.PrevInSEL;r.NextInSEL=t.NextInSEL,r.NextInSEL!==null&&(r.NextInSEL.PrevInSEL=r),r.PrevInSEL=t.PrevInSEL,r.PrevInSEL!==null&&(r.PrevInSEL.NextInSEL=r),t.NextInSEL=e,t.NextInSEL!==null&&(t.NextInSEL.PrevInSEL=t),t.PrevInSEL=i,t.PrevInSEL!==null&&(t.PrevInSEL.NextInSEL=t)}r.PrevInSEL===null?this.m_SortedEdges=r:t.PrevInSEL===null&&(this.m_SortedEdges=t)}};h.Clipper.prototype.AddLocalMaxPoly=function(r,t,e){this.AddOutPt(r,e),t.WindDelta==0&&this.AddOutPt(t,e),r.OutIdx==t.OutIdx?(r.OutIdx=-1,t.OutIdx=-1):r.OutIdx<t.OutIdx?this.AppendPolygon(r,t):this.AppendPolygon(t,r)};h.Clipper.prototype.AddLocalMinPoly=function(r,t,e){var i,n,o;if(h.ClipperBase.IsHorizontal(t)||r.Dx>t.Dx?(i=this.AddOutPt(r,e),t.OutIdx=r.OutIdx,r.Side=h.EdgeSide.esLeft,t.Side=h.EdgeSide.esRight,n=r,n.PrevInAEL==t?o=t.PrevInAEL:o=n.PrevInAEL):(i=this.AddOutPt(t,e),r.OutIdx=t.OutIdx,r.Side=h.EdgeSide.esRight,t.Side=h.EdgeSide.esLeft,n=t,n.PrevInAEL==r?o=r.PrevInAEL:o=n.PrevInAEL),o!==null&&o.OutIdx>=0&&h.Clipper.TopX(o,e.Y)==h.Clipper.TopX(n,e.Y)&&h.ClipperBase.SlopesEqual(n,o,this.m_UseFullRange)&&n.WindDelta!==0&&o.WindDelta!==0){var a=this.AddOutPt(o,e);this.AddJoin(i,a,n.Top)}return i};h.Clipper.prototype.CreateOutRec=function(){var r=new h.OutRec;return r.Idx=-1,r.IsHole=!1,r.IsOpen=!1,r.FirstLeft=null,r.Pts=null,r.BottomPt=null,r.PolyNode=null,this.m_PolyOuts.push(r),r.Idx=this.m_PolyOuts.length-1,r};h.Clipper.prototype.AddOutPt=function(r,t){var e=r.Side==h.EdgeSide.esLeft;if(r.OutIdx<0){var i=this.CreateOutRec();i.IsOpen=r.WindDelta===0;var n=new h.OutPt;return i.Pts=n,n.Idx=i.Idx,n.Pt.X=t.X,n.Pt.Y=t.Y,n.Next=n,n.Prev=n,i.IsOpen||this.SetHoleState(r,i),an&&(h.IntPoint.op_Equality(t,r.Bot)?(n.Pt.X=r.Bot.X,n.Pt.Y=r.Bot.Y,n.Pt.Z=r.Bot.Z):h.IntPoint.op_Equality(t,r.Top)?(n.Pt.X=r.Top.X,n.Pt.Y=r.Top.Y,n.Pt.Z=r.Top.Z):this.SetZ(n.Pt,r)),r.OutIdx=i.Idx,n}else{var i=this.m_PolyOuts[r.OutIdx],o=i.Pts;if(e&&h.IntPoint.op_Equality(t,o.Pt))return o;if(!e&&h.IntPoint.op_Equality(t,o.Prev.Pt))return o.Prev;var n=new h.OutPt;return n.Idx=i.Idx,n.Pt.X=t.X,n.Pt.Y=t.Y,n.Next=o,n.Prev=o.Prev,n.Prev.Next=n,o.Prev=n,e&&(i.Pts=n),an&&(h.IntPoint.op_Equality(t,r.Bot)?(n.Pt.X=r.Bot.X,n.Pt.Y=r.Bot.Y,n.Pt.Z=r.Bot.Z):h.IntPoint.op_Equality(t,r.Top)?(n.Pt.X=r.Top.X,n.Pt.Y=r.Top.Y,n.Pt.Z=r.Top.Z):this.SetZ(n.Pt,r)),n}};h.Clipper.prototype.SwapPoints=function(r,t){var e=new h.IntPoint(r.Value);r.Value.X=t.Value.X,r.Value.Y=t.Value.Y,t.Value.X=e.X,t.Value.Y=e.Y};h.Clipper.prototype.HorzSegmentsOverlap=function(r,t,e,i){return r.X>e.X==r.X<i.X||t.X>e.X==t.X<i.X||e.X>r.X==e.X<t.X||i.X>r.X==i.X<t.X||r.X==e.X&&t.X==i.X?!0:r.X==i.X&&t.X==e.X};h.Clipper.prototype.InsertPolyPtBetween=function(r,t,e){var i=new h.OutPt;return i.Pt.X=e.X,i.Pt.Y=e.Y,t==r.Next?(r.Next=i,t.Prev=i,i.Next=t,i.Prev=r):(t.Next=i,r.Prev=i,i.Next=r,i.Prev=t),i};h.Clipper.prototype.SetHoleState=function(r,t){for(var e=!1,i=r.PrevInAEL;i!==null;)i.OutIdx>=0&&i.WindDelta!=0&&(e=!e,t.FirstLeft===null&&(t.FirstLeft=this.m_PolyOuts[i.OutIdx])),i=i.PrevInAEL;e&&(t.IsHole=!0)};h.Clipper.prototype.GetDx=function(r,t){return r.Y==t.Y?h.ClipperBase.horizontal:(t.X-r.X)/(t.Y-r.Y)};h.Clipper.prototype.FirstIsBottomPt=function(r,t){for(var e=r.Prev;h.IntPoint.op_Equality(e.Pt,r.Pt)&&e!=r;)e=e.Prev;var i=Math.abs(this.GetDx(r.Pt,e.Pt));for(e=r.Next;h.IntPoint.op_Equality(e.Pt,r.Pt)&&e!=r;)e=e.Next;var n=Math.abs(this.GetDx(r.Pt,e.Pt));for(e=t.Prev;h.IntPoint.op_Equality(e.Pt,t.Pt)&&e!=t;)e=e.Prev;var o=Math.abs(this.GetDx(t.Pt,e.Pt));for(e=t.Next;h.IntPoint.op_Equality(e.Pt,t.Pt)&&e!=t;)e=e.Next;var a=Math.abs(this.GetDx(t.Pt,e.Pt));return i>=o&&i>=a||n>=o&&n>=a};h.Clipper.prototype.GetBottomPt=function(r){for(var t=null,e=r.Next;e!=r;)e.Pt.Y>r.Pt.Y?(r=e,t=null):e.Pt.Y==r.Pt.Y&&e.Pt.X<=r.Pt.X&&(e.Pt.X<r.Pt.X?(t=null,r=e):e.Next!=r&&e.Prev!=r&&(t=e)),e=e.Next;if(t!==null)for(;t!=e;)for(this.FirstIsBottomPt(e,t)||(r=t),t=t.Next;h.IntPoint.op_Inequality(t.Pt,r.Pt);)t=t.Next;return r};h.Clipper.prototype.GetLowermostRec=function(r,t){r.BottomPt===null&&(r.BottomPt=this.GetBottomPt(r.Pts)),t.BottomPt===null&&(t.BottomPt=this.GetBottomPt(t.Pts));var e=r.BottomPt,i=t.BottomPt;return e.Pt.Y>i.Pt.Y?r:e.Pt.Y<i.Pt.Y?t:e.Pt.X<i.Pt.X?r:e.Pt.X>i.Pt.X||e.Next==e?t:i.Next==i||this.FirstIsBottomPt(e,i)?r:t};h.Clipper.prototype.Param1RightOfParam2=function(r,t){do if(r=r.FirstLeft,r==t)return!0;while(r!==null);return!1};h.Clipper.prototype.GetOutRec=function(r){for(var t=this.m_PolyOuts[r];t!=this.m_PolyOuts[t.Idx];)t=this.m_PolyOuts[t.Idx];return t};h.Clipper.prototype.AppendPolygon=function(r,t){var e=this.m_PolyOuts[r.OutIdx],i=this.m_PolyOuts[t.OutIdx],n;this.Param1RightOfParam2(e,i)?n=i:this.Param1RightOfParam2(i,e)?n=e:n=this.GetLowermostRec(e,i);var o=e.Pts,a=o.Prev,u=i.Pts,s=u.Prev,p;r.Side==h.EdgeSide.esLeft?(t.Side==h.EdgeSide.esLeft?(this.ReversePolyPtLinks(u),u.Next=o,o.Prev=u,a.Next=s,s.Prev=a,e.Pts=s):(s.Next=o,o.Prev=s,u.Prev=a,a.Next=u,e.Pts=u),p=h.EdgeSide.esLeft):(t.Side==h.EdgeSide.esRight?(this.ReversePolyPtLinks(u),a.Next=s,s.Prev=a,u.Next=o,o.Prev=u):(a.Next=u,u.Prev=a,o.Prev=s,s.Next=o),p=h.EdgeSide.esRight),e.BottomPt=null,n==i&&(i.FirstLeft!=e&&(e.FirstLeft=i.FirstLeft),e.IsHole=i.IsHole),i.Pts=null,i.BottomPt=null,i.FirstLeft=e;var f=r.OutIdx,m=t.OutIdx;r.OutIdx=-1,t.OutIdx=-1;for(var y=this.m_ActiveEdges;y!==null;){if(y.OutIdx==m){y.OutIdx=f,y.Side=p;break}y=y.NextInAEL}i.Idx=e.Idx};h.Clipper.prototype.ReversePolyPtLinks=function(r){if(r!==null){var t,e;t=r;do e=t.Next,t.Next=t.Prev,t.Prev=e,t=e;while(t!=r)}};h.Clipper.SwapSides=function(r,t){var e=r.Side;r.Side=t.Side,t.Side=e};h.Clipper.SwapPolyIndexes=function(r,t){var e=r.OutIdx;r.OutIdx=t.OutIdx,t.OutIdx=e};h.Clipper.prototype.IntersectEdges=function(r,t,e,i){var n=!i&&r.NextInLML===null&&r.Top.X==e.X&&r.Top.Y==e.Y,o=!i&&t.NextInLML===null&&t.Top.X==e.X&&t.Top.Y==e.Y,a=r.OutIdx>=0,u=t.OutIdx>=0;if(O4&&(r.WindDelta===0||t.WindDelta===0)){r.WindDelta===0&&t.WindDelta===0?(n||o)&&a&&u&&this.AddLocalMaxPoly(r,t,e):r.PolyTyp==t.PolyTyp&&r.WindDelta!=t.WindDelta&&this.m_ClipType==h.ClipType.ctUnion?r.WindDelta===0?u&&(this.AddOutPt(r,e),a&&(r.OutIdx=-1)):a&&(this.AddOutPt(t,e),u&&(t.OutIdx=-1)):r.PolyTyp!=t.PolyTyp&&(r.WindDelta===0&&Math.abs(t.WindCnt)==1&&(this.m_ClipType!=h.ClipType.ctUnion||t.WindCnt2===0)?(this.AddOutPt(r,e),a&&(r.OutIdx=-1)):t.WindDelta===0&&Math.abs(r.WindCnt)==1&&(this.m_ClipType!=h.ClipType.ctUnion||r.WindCnt2===0)&&(this.AddOutPt(t,e),u&&(t.OutIdx=-1))),n&&(r.OutIdx<0?this.DeleteFromAEL(r):h.Error("Error intersecting polylines")),o&&(t.OutIdx<0?this.DeleteFromAEL(t):h.Error("Error intersecting polylines"));return}if(r.PolyTyp==t.PolyTyp)if(this.IsEvenOddFillType(r)){var s=r.WindCnt;r.WindCnt=t.WindCnt,t.WindCnt=s}else r.WindCnt+t.WindDelta===0?r.WindCnt=-r.WindCnt:r.WindCnt+=t.WindDelta,t.WindCnt-r.WindDelta===0?t.WindCnt=-t.WindCnt:t.WindCnt-=r.WindDelta;else this.IsEvenOddFillType(t)?r.WindCnt2=r.WindCnt2===0?1:0:r.WindCnt2+=t.WindDelta,this.IsEvenOddFillType(r)?t.WindCnt2=t.WindCnt2===0?1:0:t.WindCnt2-=r.WindDelta;var p,f,m,y;r.PolyTyp==h.PolyType.ptSubject?(p=this.m_SubjFillType,m=this.m_ClipFillType):(p=this.m_ClipFillType,m=this.m_SubjFillType),t.PolyTyp==h.PolyType.ptSubject?(f=this.m_SubjFillType,y=this.m_ClipFillType):(f=this.m_ClipFillType,y=this.m_SubjFillType);var x,S;switch(p){case h.PolyFillType.pftPositive:x=r.WindCnt;break;case h.PolyFillType.pftNegative:x=-r.WindCnt;break;default:x=Math.abs(r.WindCnt);break}switch(f){case h.PolyFillType.pftPositive:S=t.WindCnt;break;case h.PolyFillType.pftNegative:S=-t.WindCnt;break;default:S=Math.abs(t.WindCnt);break}if(a&&u)n||o||x!==0&&x!=1||S!==0&&S!=1||r.PolyTyp!=t.PolyTyp&&this.m_ClipType!=h.ClipType.ctXor?this.AddLocalMaxPoly(r,t,e):(this.AddOutPt(r,e),this.AddOutPt(t,e),h.Clipper.SwapSides(r,t),h.Clipper.SwapPolyIndexes(r,t));else if(a)(S===0||S==1)&&(this.AddOutPt(r,e),h.Clipper.SwapSides(r,t),h.Clipper.SwapPolyIndexes(r,t));else if(u)(x===0||x==1)&&(this.AddOutPt(t,e),h.Clipper.SwapSides(r,t),h.Clipper.SwapPolyIndexes(r,t));else if((x===0||x==1)&&(S===0||S==1)&&!n&&!o){var M,g;switch(m){case h.PolyFillType.pftPositive:M=r.WindCnt2;break;case h.PolyFillType.pftNegative:M=-r.WindCnt2;break;default:M=Math.abs(r.WindCnt2);break}switch(y){case h.PolyFillType.pftPositive:g=t.WindCnt2;break;case h.PolyFillType.pftNegative:g=-t.WindCnt2;break;default:g=Math.abs(t.WindCnt2);break}if(r.PolyTyp!=t.PolyTyp)this.AddLocalMinPoly(r,t,e);else if(x==1&&S==1)switch(this.m_ClipType){case h.ClipType.ctIntersection:M>0&&g>0&&this.AddLocalMinPoly(r,t,e);break;case h.ClipType.ctUnion:M<=0&&g<=0&&this.AddLocalMinPoly(r,t,e);break;case h.ClipType.ctDifference:(r.PolyTyp==h.PolyType.ptClip&&M>0&&g>0||r.PolyTyp==h.PolyType.ptSubject&&M<=0&&g<=0)&&this.AddLocalMinPoly(r,t,e);break;case h.ClipType.ctXor:this.AddLocalMinPoly(r,t,e);break}else h.Clipper.SwapSides(r,t)}n!=o&&(n&&r.OutIdx>=0||o&&t.OutIdx>=0)&&(h.Clipper.SwapSides(r,t),h.Clipper.SwapPolyIndexes(r,t)),n&&this.DeleteFromAEL(r),o&&this.DeleteFromAEL(t)};h.Clipper.prototype.DeleteFromAEL=function(r){var t=r.PrevInAEL,e=r.NextInAEL;t===null&&e===null&&r!=this.m_ActiveEdges||(t!==null?t.NextInAEL=e:this.m_ActiveEdges=e,e!==null&&(e.PrevInAEL=t),r.NextInAEL=null,r.PrevInAEL=null)};h.Clipper.prototype.DeleteFromSEL=function(r){var t=r.PrevInSEL,e=r.NextInSEL;t===null&&e===null&&r!=this.m_SortedEdges||(t!==null?t.NextInSEL=e:this.m_SortedEdges=e,e!==null&&(e.PrevInSEL=t),r.NextInSEL=null,r.PrevInSEL=null)};h.Clipper.prototype.UpdateEdgeIntoAEL=function(r){r.NextInLML===null&&h.Error("UpdateEdgeIntoAEL: invalid call");var t=r.PrevInAEL,e=r.NextInAEL;return r.NextInLML.OutIdx=r.OutIdx,t!==null?t.NextInAEL=r.NextInLML:this.m_ActiveEdges=r.NextInLML,e!==null&&(e.PrevInAEL=r.NextInLML),r.NextInLML.Side=r.Side,r.NextInLML.WindDelta=r.WindDelta,r.NextInLML.WindCnt=r.WindCnt,r.NextInLML.WindCnt2=r.WindCnt2,r=r.NextInLML,r.Curr.X=r.Bot.X,r.Curr.Y=r.Bot.Y,r.PrevInAEL=t,r.NextInAEL=e,h.ClipperBase.IsHorizontal(r)||this.InsertScanbeam(r.Top.Y),r};h.Clipper.prototype.ProcessHorizontals=function(r){for(var t=this.m_SortedEdges;t!==null;)this.DeleteFromSEL(t),this.ProcessHorizontal(t,r),t=this.m_SortedEdges};h.Clipper.prototype.GetHorzDirection=function(r,t){r.Bot.X<r.Top.X?(t.Left=r.Bot.X,t.Right=r.Top.X,t.Dir=h.Direction.dLeftToRight):(t.Left=r.Top.X,t.Right=r.Bot.X,t.Dir=h.Direction.dRightToLeft)};h.Clipper.prototype.PrepareHorzJoins=function(r,t){var e=this.m_PolyOuts[r.OutIdx].Pts;r.Side!=h.EdgeSide.esLeft&&(e=e.Prev),t&&(h.IntPoint.op_Equality(e.Pt,r.Top)?this.AddGhostJoin(e,r.Bot):this.AddGhostJoin(e,r.Top))};h.Clipper.prototype.ProcessHorizontal=function(r,t){var e={Dir:null,Left:null,Right:null};this.GetHorzDirection(r,e);for(var i=e.Dir,n=e.Left,o=e.Right,a=r,u=null;a.NextInLML!==null&&h.ClipperBase.IsHorizontal(a.NextInLML);)a=a.NextInLML;for(a.NextInLML===null&&(u=this.GetMaximaPair(a));;){for(var s=r==a,p=this.GetNextInAEL(r,i);p!==null&&!(p.Curr.X==r.Top.X&&r.NextInLML!==null&&p.Dx<r.NextInLML.Dx);){var f=this.GetNextInAEL(p,i);if(i==h.Direction.dLeftToRight&&p.Curr.X<=o||i==h.Direction.dRightToLeft&&p.Curr.X>=n){if(r.OutIdx>=0&&r.WindDelta!=0&&this.PrepareHorzJoins(r,t),p==u&&s){i==h.Direction.dLeftToRight?this.IntersectEdges(r,p,p.Top,!1):this.IntersectEdges(p,r,p.Top,!1),u.OutIdx>=0&&h.Error("ProcessHorizontal error");return}else if(i==h.Direction.dLeftToRight){var m=new h.IntPoint(p.Curr.X,r.Curr.Y);this.IntersectEdges(r,p,m,!0)}else{var m=new h.IntPoint(p.Curr.X,r.Curr.Y);this.IntersectEdges(p,r,m,!0)}this.SwapPositionsInAEL(r,p)}else if(i==h.Direction.dLeftToRight&&p.Curr.X>=o||i==h.Direction.dRightToLeft&&p.Curr.X<=n)break;p=f}if(r.OutIdx>=0&&r.WindDelta!==0&&this.PrepareHorzJoins(r,t),r.NextInLML!==null&&h.ClipperBase.IsHorizontal(r.NextInLML)){r=this.UpdateEdgeIntoAEL(r),r.OutIdx>=0&&this.AddOutPt(r,r.Bot);var e={Dir:i,Left:n,Right:o};this.GetHorzDirection(r,e),i=e.Dir,n=e.Left,o=e.Right}else break}if(r.NextInLML!==null)if(r.OutIdx>=0){var y=this.AddOutPt(r,r.Top);if(r=this.UpdateEdgeIntoAEL(r),r.WindDelta===0)return;var x=r.PrevInAEL,f=r.NextInAEL;if(x!==null&&x.Curr.X==r.Bot.X&&x.Curr.Y==r.Bot.Y&&x.WindDelta!==0&&x.OutIdx>=0&&x.Curr.Y>x.Top.Y&&h.ClipperBase.SlopesEqual(r,x,this.m_UseFullRange)){var S=this.AddOutPt(x,r.Bot);this.AddJoin(y,S,r.Top)}else if(f!==null&&f.Curr.X==r.Bot.X&&f.Curr.Y==r.Bot.Y&&f.WindDelta!==0&&f.OutIdx>=0&&f.Curr.Y>f.Top.Y&&h.ClipperBase.SlopesEqual(r,f,this.m_UseFullRange)){var S=this.AddOutPt(f,r.Bot);this.AddJoin(y,S,r.Top)}}else r=this.UpdateEdgeIntoAEL(r);else u!==null?u.OutIdx>=0?(i==h.Direction.dLeftToRight?this.IntersectEdges(r,u,r.Top,!1):this.IntersectEdges(u,r,r.Top,!1),u.OutIdx>=0&&h.Error("ProcessHorizontal error")):(this.DeleteFromAEL(r),this.DeleteFromAEL(u)):(r.OutIdx>=0&&this.AddOutPt(r,r.Top),this.DeleteFromAEL(r))};h.Clipper.prototype.GetNextInAEL=function(r,t){return t==h.Direction.dLeftToRight?r.NextInAEL:r.PrevInAEL};h.Clipper.prototype.IsMinima=function(r){return r!==null&&r.Prev.NextInLML!=r&&r.Next.NextInLML!=r};h.Clipper.prototype.IsMaxima=function(r,t){return r!==null&&r.Top.Y==t&&r.NextInLML===null};h.Clipper.prototype.IsIntermediate=function(r,t){return r.Top.Y==t&&r.NextInLML!==null};h.Clipper.prototype.GetMaximaPair=function(r){var t=null;return h.IntPoint.op_Equality(r.Next.Top,r.Top)&&r.Next.NextInLML===null?t=r.Next:h.IntPoint.op_Equality(r.Prev.Top,r.Top)&&r.Prev.NextInLML===null&&(t=r.Prev),t!==null&&(t.OutIdx==-2||t.NextInAEL==t.PrevInAEL&&!h.ClipperBase.IsHorizontal(t))?null:t};h.Clipper.prototype.ProcessIntersections=function(r,t){if(this.m_ActiveEdges==null)return!0;try{if(this.BuildIntersectList(r,t),this.m_IntersectList.length==0)return!0;if(this.m_IntersectList.length==1||this.FixupIntersectionOrder())this.ProcessIntersectList();else return!1}catch{this.m_SortedEdges=null,this.m_IntersectList.length=0,h.Error("ProcessIntersections error")}return this.m_SortedEdges=null,!0};h.Clipper.prototype.BuildIntersectList=function(r,t){if(this.m_ActiveEdges!==null){var e=this.m_ActiveEdges;for(this.m_SortedEdges=e;e!==null;)e.PrevInSEL=e.PrevInAEL,e.NextInSEL=e.NextInAEL,e.Curr.X=h.Clipper.TopX(e,t),e=e.NextInAEL;for(var i=!0;i&&this.m_SortedEdges!==null;){for(i=!1,e=this.m_SortedEdges;e.NextInSEL!==null;){var n=e.NextInSEL,o=new h.IntPoint;if(e.Curr.X>n.Curr.X){!this.IntersectPoint(e,n,o)&&e.Curr.X>n.Curr.X+1&&h.Error("Intersection error"),o.Y>r&&(o.Y=r,Math.abs(e.Dx)>Math.abs(n.Dx)?o.X=h.Clipper.TopX(n,r):o.X=h.Clipper.TopX(e,r));var a=new h.IntersectNode;a.Edge1=e,a.Edge2=n,a.Pt.X=o.X,a.Pt.Y=o.Y,this.m_IntersectList.push(a),this.SwapPositionsInSEL(e,n),i=!0}else e=n}if(e.PrevInSEL!==null)e.PrevInSEL.NextInSEL=null;else break}this.m_SortedEdges=null}};h.Clipper.prototype.EdgesAdjacent=function(r){return r.Edge1.NextInSEL==r.Edge2||r.Edge1.PrevInSEL==r.Edge2};h.Clipper.IntersectNodeSort=function(r,t){return t.Pt.Y-r.Pt.Y};h.Clipper.prototype.FixupIntersectionOrder=function(){this.m_IntersectList.sort(this.m_IntersectNodeComparer),this.CopyAELToSEL();for(var r=this.m_IntersectList.length,t=0;t<r;t++){if(!this.EdgesAdjacent(this.m_IntersectList[t])){for(var e=t+1;e<r&&!this.EdgesAdjacent(this.m_IntersectList[e]);)e++;if(e==r)return!1;var i=this.m_IntersectList[t];this.m_IntersectList[t]=this.m_IntersectList[e],this.m_IntersectList[e]=i}this.SwapPositionsInSEL(this.m_IntersectList[t].Edge1,this.m_IntersectList[t].Edge2)}return!0};h.Clipper.prototype.ProcessIntersectList=function(){for(var r=0,t=this.m_IntersectList.length;r<t;r++){var e=this.m_IntersectList[r];this.IntersectEdges(e.Edge1,e.Edge2,e.Pt,!0),this.SwapPositionsInAEL(e.Edge1,e.Edge2)}this.m_IntersectList.length=0};var Mw=l(function(r){return r<0?Math.ceil(r-.5):Math.round(r)},"R1"),ww=l(function(r){return r<0?Math.ceil(r-.5):Math.floor(r+.5)},"R2"),Tw=l(function(r){return r<0?-Math.round(Math.abs(r)):Math.round(r)},"R3"),Iw=l(function(r){return r<0?(r-=.5,r<-2147483648?Math.ceil(r):r|0):(r+=.5,r>2147483647?Math.floor(r):r|0)},"R4");z.msie?h.Clipper.Round=Mw:z.chromium?h.Clipper.Round=Tw:z.safari?h.Clipper.Round=Iw:h.Clipper.Round=ww;h.Clipper.TopX=function(r,t){return t==r.Top.Y?r.Top.X:r.Bot.X+h.Clipper.Round(r.Dx*(t-r.Bot.Y))};h.Clipper.prototype.IntersectPoint=function(r,t,e){e.X=0,e.Y=0;var i,n;if(h.ClipperBase.SlopesEqual(r,t,this.m_UseFullRange)||r.Dx==t.Dx)return t.Bot.Y>r.Bot.Y?(e.X=t.Bot.X,e.Y=t.Bot.Y):(e.X=r.Bot.X,e.Y=r.Bot.Y),!1;if(r.Delta.X===0)e.X=r.Bot.X,h.ClipperBase.IsHorizontal(t)?e.Y=t.Bot.Y:(n=t.Bot.Y-t.Bot.X/t.Dx,e.Y=h.Clipper.Round(e.X/t.Dx+n));else if(t.Delta.X===0)e.X=t.Bot.X,h.ClipperBase.IsHorizontal(r)?e.Y=r.Bot.Y:(i=r.Bot.Y-r.Bot.X/r.Dx,e.Y=h.Clipper.Round(e.X/r.Dx+i));else{i=r.Bot.X-r.Bot.Y*r.Dx,n=t.Bot.X-t.Bot.Y*t.Dx;var o=(n-i)/(r.Dx-t.Dx);e.Y=h.Clipper.Round(o),Math.abs(r.Dx)<Math.abs(t.Dx)?e.X=h.Clipper.Round(r.Dx*o+i):e.X=h.Clipper.Round(t.Dx*o+n)}if(e.Y<r.Top.Y||e.Y<t.Top.Y){if(r.Top.Y>t.Top.Y)return e.Y=r.Top.Y,e.X=h.Clipper.TopX(t,r.Top.Y),e.X<r.Top.X;e.Y=t.Top.Y,Math.abs(r.Dx)<Math.abs(t.Dx)?e.X=h.Clipper.TopX(r,e.Y):e.X=h.Clipper.TopX(t,e.Y)}return!0};h.Clipper.prototype.ProcessEdgesAtTopOfScanbeam=function(r){for(var t=this.m_ActiveEdges;t!==null;){var e=this.IsMaxima(t,r);if(e){var i=this.GetMaximaPair(t);e=i===null||!h.ClipperBase.IsHorizontal(i)}if(e){var n=t.PrevInAEL;this.DoMaxima(t),n===null?t=this.m_ActiveEdges:t=n.NextInAEL}else{if(this.IsIntermediate(t,r)&&h.ClipperBase.IsHorizontal(t.NextInLML)?(t=this.UpdateEdgeIntoAEL(t),t.OutIdx>=0&&this.AddOutPt(t,t.Bot),this.AddEdgeToSEL(t)):(t.Curr.X=h.Clipper.TopX(t,r),t.Curr.Y=r),this.StrictlySimple){var n=t.PrevInAEL;if(t.OutIdx>=0&&t.WindDelta!==0&&n!==null&&n.OutIdx>=0&&n.Curr.X==t.Curr.X&&n.WindDelta!==0){var o=this.AddOutPt(n,t.Curr),a=this.AddOutPt(t,t.Curr);this.AddJoin(o,a,t.Curr)}}t=t.NextInAEL}}for(this.ProcessHorizontals(!0),t=this.m_ActiveEdges;t!==null;){if(this.IsIntermediate(t,r)){var o=null;t.OutIdx>=0&&(o=this.AddOutPt(t,t.Top)),t=this.UpdateEdgeIntoAEL(t);var n=t.PrevInAEL,u=t.NextInAEL;if(n!==null&&n.Curr.X==t.Bot.X&&n.Curr.Y==t.Bot.Y&&o!==null&&n.OutIdx>=0&&n.Curr.Y>n.Top.Y&&h.ClipperBase.SlopesEqual(t,n,this.m_UseFullRange)&&t.WindDelta!==0&&n.WindDelta!==0){var a=this.AddOutPt(n,t.Bot);this.AddJoin(o,a,t.Top)}else if(u!==null&&u.Curr.X==t.Bot.X&&u.Curr.Y==t.Bot.Y&&o!==null&&u.OutIdx>=0&&u.Curr.Y>u.Top.Y&&h.ClipperBase.SlopesEqual(t,u,this.m_UseFullRange)&&t.WindDelta!==0&&u.WindDelta!==0){var a=this.AddOutPt(u,t.Bot);this.AddJoin(o,a,t.Top)}}t=t.NextInAEL}};h.Clipper.prototype.DoMaxima=function(r){var t=this.GetMaximaPair(r);if(t===null){r.OutIdx>=0&&this.AddOutPt(r,r.Top),this.DeleteFromAEL(r);return}for(var e=r.NextInAEL,i=!0;e!==null&&e!=t;)this.IntersectEdges(r,e,r.Top,!0),this.SwapPositionsInAEL(r,e),e=r.NextInAEL;r.OutIdx==-1&&t.OutIdx==-1?(this.DeleteFromAEL(r),this.DeleteFromAEL(t)):r.OutIdx>=0&&t.OutIdx>=0?this.IntersectEdges(r,t,r.Top,!1):i&&r.WindDelta===0?(r.OutIdx>=0&&(this.AddOutPt(r,r.Top),r.OutIdx=-1),this.DeleteFromAEL(r),t.OutIdx>=0&&(this.AddOutPt(t,r.Top),t.OutIdx=-1),this.DeleteFromAEL(t)):h.Error("DoMaxima error")};h.Clipper.ReversePaths=function(r){for(var t=0,e=r.length;t<e;t++)r[t].reverse()};h.Clipper.Orientation=function(r){return h.Clipper.Area(r)>=0};h.Clipper.prototype.PointCount=function(r){if(r===null)return 0;var t=0,e=r;do t++,e=e.Next;while(e!=r);return t};h.Clipper.prototype.BuildResult=function(r){h.Clear(r);for(var t=0,e=this.m_PolyOuts.length;t<e;t++){var i=this.m_PolyOuts[t];if(i.Pts!==null){var n=i.Pts.Prev,o=this.PointCount(n);if(!(o<2)){for(var a=new Array(o),u=0;u<o;u++)a[u]=n.Pt,n=n.Prev;r.push(a)}}}};h.Clipper.prototype.BuildResult2=function(r){r.Clear();for(var t=0,e=this.m_PolyOuts.length;t<e;t++){var i=this.m_PolyOuts[t],n=this.PointCount(i.Pts);if(!(i.IsOpen&&n<2||!i.IsOpen&&n<3)){this.FixHoleLinkage(i);var o=new h.PolyNode;r.m_AllPolys.push(o),i.PolyNode=o,o.m_polygon.length=n;for(var a=i.Pts.Prev,u=0;u<n;u++)o.m_polygon[u]=a.Pt,a=a.Prev}}for(var t=0,e=this.m_PolyOuts.length;t<e;t++){var i=this.m_PolyOuts[t];i.PolyNode!==null&&(i.IsOpen?(i.PolyNode.IsOpen=!0,r.AddChild(i.PolyNode)):i.FirstLeft!==null&&i.FirstLeft.PolyNode!=null?i.FirstLeft.PolyNode.AddChild(i.PolyNode):r.AddChild(i.PolyNode))}};h.Clipper.prototype.FixupOutPolygon=function(r){var t=null;r.BottomPt=null;for(var e=r.Pts;;){if(e.Prev==e||e.Prev==e.Next){this.DisposeOutPts(e),r.Pts=null;return}if(h.IntPoint.op_Equality(e.Pt,e.Next.Pt)||h.IntPoint.op_Equality(e.Pt,e.Prev.Pt)||h.ClipperBase.SlopesEqual(e.Prev.Pt,e.Pt,e.Next.Pt,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(e.Prev.Pt,e.Pt,e.Next.Pt))){t=null;var i=e;e.Prev.Next=e.Next,e.Next.Prev=e.Prev,e=e.Prev,i=null}else{if(e==t)break;t===null&&(t=e),e=e.Next}}r.Pts=e};h.Clipper.prototype.DupOutPt=function(r,t){var e=new h.OutPt;return e.Pt.X=r.Pt.X,e.Pt.Y=r.Pt.Y,e.Idx=r.Idx,t?(e.Next=r.Next,e.Prev=r,r.Next.Prev=e,r.Next=e):(e.Prev=r.Prev,e.Next=r,r.Prev.Next=e,r.Prev=e),e};h.Clipper.prototype.GetOverlap=function(r,t,e,i,n){return r<t?e<i?(n.Left=Math.max(r,e),n.Right=Math.min(t,i)):(n.Left=Math.max(r,i),n.Right=Math.min(t,e)):e<i?(n.Left=Math.max(t,e),n.Right=Math.min(r,i)):(n.Left=Math.max(t,i),n.Right=Math.min(r,e)),n.Left<n.Right};h.Clipper.prototype.JoinHorz=function(r,t,e,i,n,o){var a=r.Pt.X>t.Pt.X?h.Direction.dRightToLeft:h.Direction.dLeftToRight,u=e.Pt.X>i.Pt.X?h.Direction.dRightToLeft:h.Direction.dLeftToRight;if(a==u)return!1;if(a==h.Direction.dLeftToRight){for(;r.Next.Pt.X<=n.X&&r.Next.Pt.X>=r.Pt.X&&r.Next.Pt.Y==n.Y;)r=r.Next;o&&r.Pt.X!=n.X&&(r=r.Next),t=this.DupOutPt(r,!o),h.IntPoint.op_Inequality(t.Pt,n)&&(r=t,r.Pt.X=n.X,r.Pt.Y=n.Y,t=this.DupOutPt(r,!o))}else{for(;r.Next.Pt.X>=n.X&&r.Next.Pt.X<=r.Pt.X&&r.Next.Pt.Y==n.Y;)r=r.Next;!o&&r.Pt.X!=n.X&&(r=r.Next),t=this.DupOutPt(r,o),h.IntPoint.op_Inequality(t.Pt,n)&&(r=t,r.Pt.X=n.X,r.Pt.Y=n.Y,t=this.DupOutPt(r,o))}if(u==h.Direction.dLeftToRight){for(;e.Next.Pt.X<=n.X&&e.Next.Pt.X>=e.Pt.X&&e.Next.Pt.Y==n.Y;)e=e.Next;o&&e.Pt.X!=n.X&&(e=e.Next),i=this.DupOutPt(e,!o),h.IntPoint.op_Inequality(i.Pt,n)&&(e=i,e.Pt.X=n.X,e.Pt.Y=n.Y,i=this.DupOutPt(e,!o))}else{for(;e.Next.Pt.X>=n.X&&e.Next.Pt.X<=e.Pt.X&&e.Next.Pt.Y==n.Y;)e=e.Next;!o&&e.Pt.X!=n.X&&(e=e.Next),i=this.DupOutPt(e,o),h.IntPoint.op_Inequality(i.Pt,n)&&(e=i,e.Pt.X=n.X,e.Pt.Y=n.Y,i=this.DupOutPt(e,o))}return a==h.Direction.dLeftToRight==o?(r.Prev=e,e.Next=r,t.Next=i,i.Prev=t):(r.Next=e,e.Prev=r,t.Prev=i,i.Next=t),!0};h.Clipper.prototype.JoinPoints=function(r,t,e){var i=r.OutPt1,n=new h.OutPt,o=r.OutPt2,a=new h.OutPt,u=r.OutPt1.Pt.Y==r.OffPt.Y;if(u&&h.IntPoint.op_Equality(r.OffPt,r.OutPt1.Pt)&&h.IntPoint.op_Equality(r.OffPt,r.OutPt2.Pt)){for(n=r.OutPt1.Next;n!=i&&h.IntPoint.op_Equality(n.Pt,r.OffPt);)n=n.Next;var s=n.Pt.Y>r.OffPt.Y;for(a=r.OutPt2.Next;a!=o&&h.IntPoint.op_Equality(a.Pt,r.OffPt);)a=a.Next;var p=a.Pt.Y>r.OffPt.Y;return s==p?!1:s?(n=this.DupOutPt(i,!1),a=this.DupOutPt(o,!0),i.Prev=o,o.Next=i,n.Next=a,a.Prev=n,r.OutPt1=i,r.OutPt2=n,!0):(n=this.DupOutPt(i,!0),a=this.DupOutPt(o,!1),i.Next=o,o.Prev=i,n.Prev=a,a.Next=n,r.OutPt1=i,r.OutPt2=n,!0)}else if(u){for(n=i;i.Prev.Pt.Y==i.Pt.Y&&i.Prev!=n&&i.Prev!=o;)i=i.Prev;for(;n.Next.Pt.Y==n.Pt.Y&&n.Next!=i&&n.Next!=o;)n=n.Next;if(n.Next==i||n.Next==o)return!1;for(a=o;o.Prev.Pt.Y==o.Pt.Y&&o.Prev!=a&&o.Prev!=n;)o=o.Prev;for(;a.Next.Pt.Y==a.Pt.Y&&a.Next!=o&&a.Next!=i;)a=a.Next;if(a.Next==o||a.Next==i)return!1;var f={Left:null,Right:null};if(!this.GetOverlap(i.Pt.X,n.Pt.X,o.Pt.X,a.Pt.X,f))return!1;var m=f.Left,y=f.Right,x=new h.IntPoint,S;return i.Pt.X>=m&&i.Pt.X<=y?(x.X=i.Pt.X,x.Y=i.Pt.Y,S=i.Pt.X>n.Pt.X):o.Pt.X>=m&&o.Pt.X<=y?(x.X=o.Pt.X,x.Y=o.Pt.Y,S=o.Pt.X>a.Pt.X):n.Pt.X>=m&&n.Pt.X<=y?(x.X=n.Pt.X,x.Y=n.Pt.Y,S=n.Pt.X>i.Pt.X):(x.X=a.Pt.X,x.Y=a.Pt.Y,S=a.Pt.X>o.Pt.X),r.OutPt1=i,r.OutPt2=o,this.JoinHorz(i,n,o,a,x,S)}else{for(n=i.Next;h.IntPoint.op_Equality(n.Pt,i.Pt)&&n!=i;)n=n.Next;var M=n.Pt.Y>i.Pt.Y||!h.ClipperBase.SlopesEqual(i.Pt,n.Pt,r.OffPt,this.m_UseFullRange);if(M){for(n=i.Prev;h.IntPoint.op_Equality(n.Pt,i.Pt)&&n!=i;)n=n.Prev;if(n.Pt.Y>i.Pt.Y||!h.ClipperBase.SlopesEqual(i.Pt,n.Pt,r.OffPt,this.m_UseFullRange))return!1}for(a=o.Next;h.IntPoint.op_Equality(a.Pt,o.Pt)&&a!=o;)a=a.Next;var g=a.Pt.Y>o.Pt.Y||!h.ClipperBase.SlopesEqual(o.Pt,a.Pt,r.OffPt,this.m_UseFullRange);if(g){for(a=o.Prev;h.IntPoint.op_Equality(a.Pt,o.Pt)&&a!=o;)a=a.Prev;if(a.Pt.Y>o.Pt.Y||!h.ClipperBase.SlopesEqual(o.Pt,a.Pt,r.OffPt,this.m_UseFullRange))return!1}return n==i||a==o||n==a||t==e&&M==g?!1:M?(n=this.DupOutPt(i,!1),a=this.DupOutPt(o,!0),i.Prev=o,o.Next=i,n.Next=a,a.Prev=n,r.OutPt1=i,r.OutPt2=n,!0):(n=this.DupOutPt(i,!0),a=this.DupOutPt(o,!1),i.Next=o,o.Prev=i,n.Prev=a,a.Next=n,r.OutPt1=i,r.OutPt2=n,!0)}};h.Clipper.GetBounds=function(r){for(var t=0,e=r.length;t<e&&r[t].length==0;)t++;if(t==e)return new h.IntRect(0,0,0,0);var i=new h.IntRect;for(i.left=r[t][0].X,i.right=i.left,i.top=r[t][0].Y,i.bottom=i.top;t<e;t++)for(var n=0,o=r[t].length;n<o;n++)r[t][n].X<i.left?i.left=r[t][n].X:r[t][n].X>i.right&&(i.right=r[t][n].X),r[t][n].Y<i.top?i.top=r[t][n].Y:r[t][n].Y>i.bottom&&(i.bottom=r[t][n].Y);return i};h.Clipper.prototype.GetBounds2=function(r){var t=r,e=new h.IntRect;for(e.left=r.Pt.X,e.right=r.Pt.X,e.top=r.Pt.Y,e.bottom=r.Pt.Y,r=r.Next;r!=t;)r.Pt.X<e.left&&(e.left=r.Pt.X),r.Pt.X>e.right&&(e.right=r.Pt.X),r.Pt.Y<e.top&&(e.top=r.Pt.Y),r.Pt.Y>e.bottom&&(e.bottom=r.Pt.Y),r=r.Next;return e};h.Clipper.PointInPolygon=function(r,t){var e=0,i=t.length;if(i<3)return 0;for(var n=t[0],o=1;o<=i;++o){var a=o==i?t[0]:t[o];if(a.Y==r.Y&&(a.X==r.X||n.Y==r.Y&&a.X>r.X==n.X<r.X))return-1;if(n.Y<r.Y!=a.Y<r.Y){if(n.X>=r.X)if(a.X>r.X)e=1-e;else{var u=(n.X-r.X)*(a.Y-r.Y)-(a.X-r.X)*(n.Y-r.Y);if(u==0)return-1;u>0==a.Y>n.Y&&(e=1-e)}else if(a.X>r.X){var u=(n.X-r.X)*(a.Y-r.Y)-(a.X-r.X)*(n.Y-r.Y);if(u==0)return-1;u>0==a.Y>n.Y&&(e=1-e)}}n=a}return e};h.Clipper.prototype.PointInPolygon=function(r,t){for(var e=0,i=t;;){var n=t.Pt.X,o=t.Pt.Y,a=t.Next.Pt.X,u=t.Next.Pt.Y;if(u==r.Y&&(a==r.X||o==r.Y&&a>r.X==n<r.X))return-1;if(o<r.Y!=u<r.Y){if(n>=r.X)if(a>r.X)e=1-e;else{var s=(n-r.X)*(u-r.Y)-(a-r.X)*(o-r.Y);if(s==0)return-1;s>0==u>o&&(e=1-e)}else if(a>r.X){var s=(n-r.X)*(u-r.Y)-(a-r.X)*(o-r.Y);if(s==0)return-1;s>0==u>o&&(e=1-e)}}if(t=t.Next,i==t)break}return e};h.Clipper.prototype.Poly2ContainsPoly1=function(r,t){var e=r;do{var i=this.PointInPolygon(e.Pt,t);if(i>=0)return i!=0;e=e.Next}while(e!=r);return!0};h.Clipper.prototype.FixupFirstLefts1=function(r,t){for(var e=0,i=this.m_PolyOuts.length;e<i;e++){var n=this.m_PolyOuts[e];n.Pts!==null&&n.FirstLeft==r&&this.Poly2ContainsPoly1(n.Pts,t.Pts)&&(n.FirstLeft=t)}};h.Clipper.prototype.FixupFirstLefts2=function(r,t){for(var e=0,i=this.m_PolyOuts,n=i.length,o=i[e];e<n;e++,o=i[e])o.FirstLeft==r&&(o.FirstLeft=t)};h.Clipper.ParseFirstLeft=function(r){for(;r!=null&&r.Pts==null;)r=r.FirstLeft;return r};h.Clipper.prototype.JoinCommonEdges=function(){for(var r=0,t=this.m_Joins.length;r<t;r++){var e=this.m_Joins[r],i=this.GetOutRec(e.OutPt1.Idx),n=this.GetOutRec(e.OutPt2.Idx);if(!(i.Pts==null||n.Pts==null)){var o;if(i==n?o=i:this.Param1RightOfParam2(i,n)?o=n:this.Param1RightOfParam2(n,i)?o=i:o=this.GetLowermostRec(i,n),!!this.JoinPoints(e,i,n))if(i==n){if(i.Pts=e.OutPt1,i.BottomPt=null,n=this.CreateOutRec(),n.Pts=e.OutPt2,this.UpdateOutPtIdxs(n),this.m_UsingPolyTree)for(var a=0,u=this.m_PolyOuts.length;a<u-1;a++){var s=this.m_PolyOuts[a];s.Pts==null||h.Clipper.ParseFirstLeft(s.FirstLeft)!=i||s.IsHole==i.IsHole||this.Poly2ContainsPoly1(s.Pts,e.OutPt2)&&(s.FirstLeft=n)}this.Poly2ContainsPoly1(n.Pts,i.Pts)?(n.IsHole=!i.IsHole,n.FirstLeft=i,this.m_UsingPolyTree&&this.FixupFirstLefts2(n,i),(n.IsHole^this.ReverseSolution)==this.Area(n)>0&&this.ReversePolyPtLinks(n.Pts)):this.Poly2ContainsPoly1(i.Pts,n.Pts)?(n.IsHole=i.IsHole,i.IsHole=!n.IsHole,n.FirstLeft=i.FirstLeft,i.FirstLeft=n,this.m_UsingPolyTree&&this.FixupFirstLefts2(i,n),(i.IsHole^this.ReverseSolution)==this.Area(i)>0&&this.ReversePolyPtLinks(i.Pts)):(n.IsHole=i.IsHole,n.FirstLeft=i.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(i,n))}else n.Pts=null,n.BottomPt=null,n.Idx=i.Idx,i.IsHole=o.IsHole,o==n&&(i.FirstLeft=n.FirstLeft),n.FirstLeft=i,this.m_UsingPolyTree&&this.FixupFirstLefts2(n,i)}}};h.Clipper.prototype.UpdateOutPtIdxs=function(r){var t=r.Pts;do t.Idx=r.Idx,t=t.Prev;while(t!=r.Pts)};h.Clipper.prototype.DoSimplePolygons=function(){for(var r=0;r<this.m_PolyOuts.length;){var t=this.m_PolyOuts[r++],e=t.Pts;if(e!==null)do{for(var i=e.Next;i!=t.Pts;){if(h.IntPoint.op_Equality(e.Pt,i.Pt)&&i.Next!=e&&i.Prev!=e){var n=e.Prev,o=i.Prev;e.Prev=o,o.Next=e,i.Prev=n,n.Next=i,t.Pts=e;var a=this.CreateOutRec();a.Pts=i,this.UpdateOutPtIdxs(a),this.Poly2ContainsPoly1(a.Pts,t.Pts)?(a.IsHole=!t.IsHole,a.FirstLeft=t):this.Poly2ContainsPoly1(t.Pts,a.Pts)?(a.IsHole=t.IsHole,t.IsHole=!a.IsHole,a.FirstLeft=t.FirstLeft,t.FirstLeft=a):(a.IsHole=t.IsHole,a.FirstLeft=t.FirstLeft),i=e}i=i.Next}e=e.Next}while(e!=t.Pts)}};h.Clipper.Area=function(r){var t=r.length;if(t<3)return 0;for(var e=0,i=0,n=t-1;i<t;++i)e+=(r[n].X+r[i].X)*(r[n].Y-r[i].Y),n=i;return-e*.5};h.Clipper.prototype.Area=function(r){var t=r.Pts;if(t==null)return 0;var e=0;do e=e+(t.Prev.Pt.X+t.Pt.X)*(t.Prev.Pt.Y-t.Pt.Y),t=t.Next;while(t!=r.Pts);return e*.5};A4&&(h.Clipper.OffsetPaths=function(r,t,e,i,n){var o=new h.Paths,a=new h.ClipperOffset(n,n);return a.AddPaths(r,e,i),a.Execute(o,t),o});h.Clipper.SimplifyPolygon=function(r,t){var e=new Array,i=new h.Clipper(0);return i.StrictlySimple=!0,i.AddPath(r,h.PolyType.ptSubject,!0),i.Execute(h.ClipType.ctUnion,e,t,t),e};h.Clipper.SimplifyPolygons=function(r,t){typeof t>"u"&&(t=h.PolyFillType.pftEvenOdd);var e=new Array,i=new h.Clipper(0);return i.StrictlySimple=!0,i.AddPaths(r,h.PolyType.ptSubject,!0),i.Execute(h.ClipType.ctUnion,e,t,t),e};h.Clipper.DistanceSqrd=function(r,t){var e=r.X-t.X,i=r.Y-t.Y;return e*e+i*i};h.Clipper.DistanceFromLineSqrd=function(r,t,e){var i=t.Y-e.Y,n=e.X-t.X,o=i*t.X+n*t.Y;return o=i*r.X+n*r.Y-o,o*o/(i*i+n*n)};h.Clipper.SlopesNearCollinear=function(r,t,e,i){return h.Clipper.DistanceFromLineSqrd(t,r,e)<i};h.Clipper.PointsAreClose=function(r,t,e){var i=r.X-t.X,n=r.Y-t.Y;return i*i+n*n<=e};h.Clipper.ExcludeOp=function(r){var t=r.Prev;return t.Next=r.Next,r.Next.Prev=t,t.Idx=0,t};h.Clipper.CleanPolygon=function(r,t){typeof t>"u"&&(t=1.415);var e=r.length;if(e==0)return new Array;for(var i=new Array(e),n=0;n<e;++n)i[n]=new h.OutPt;for(var n=0;n<e;++n)i[n].Pt=r[n],i[n].Next=i[(n+1)%e],i[n].Next.Prev=i[n],i[n].Idx=0;for(var o=t*t,a=i[0];a.Idx==0&&a.Next!=a.Prev;)h.Clipper.PointsAreClose(a.Pt,a.Prev.Pt,o)?(a=h.Clipper.ExcludeOp(a),e--):h.Clipper.PointsAreClose(a.Prev.Pt,a.Next.Pt,o)?(h.Clipper.ExcludeOp(a.Next),a=h.Clipper.ExcludeOp(a),e-=2):h.Clipper.SlopesNearCollinear(a.Prev.Pt,a.Pt,a.Next.Pt,o)?(a=h.Clipper.ExcludeOp(a),e--):(a.Idx=1,a=a.Next);e<3&&(e=0);for(var u=new Array(e),n=0;n<e;++n)u[n]=new h.IntPoint(a.Pt),a=a.Next;return i=null,u};h.Clipper.CleanPolygons=function(r,t){for(var e=new Array(r.length),i=0,n=r.length;i<n;i++)e[i]=h.Clipper.CleanPolygon(r[i],t);return e};h.Clipper.Minkowski=function(r,t,e,i){var n=i?1:0,o=r.length,a=t.length,u=new Array;if(e)for(var s=0;s<a;s++){for(var p=new Array(o),f=0,m=r.length,y=r[f];f<m;f++,y=r[f])p[f]=new h.IntPoint(t[s].X+y.X,t[s].Y+y.Y);u.push(p)}else for(var s=0;s<a;s++){for(var p=new Array(o),f=0,m=r.length,y=r[f];f<m;f++,y=r[f])p[f]=new h.IntPoint(t[s].X-y.X,t[s].Y-y.Y);u.push(p)}for(var x=new Array,s=0;s<a-1+n;s++)for(var f=0;f<o;f++){var S=new Array;S.push(u[s%a][f%o]),S.push(u[(s+1)%a][f%o]),S.push(u[(s+1)%a][(f+1)%o]),S.push(u[s%a][(f+1)%o]),h.Clipper.Orientation(S)||S.reverse(),x.push(S)}var M=new h.Clipper(0);return M.AddPaths(x,h.PolyType.ptSubject,!0),M.Execute(h.ClipType.ctUnion,u,h.PolyFillType.pftNonZero,h.PolyFillType.pftNonZero),u};h.Clipper.MinkowskiSum=function(){var r=arguments,t=r.length;if(t==3){var e=r[0],i=r[1],n=r[2];return h.Clipper.Minkowski(e,i,!0,n)}else if(t==4){for(var e=r[0],o=r[1],a=r[2],n=r[3],u=new h.Clipper,s,p=0,f=o.length;p<f;++p){var s=h.Clipper.Minkowski(e,o[p],!0,n);u.AddPaths(s,h.PolyType.ptSubject,!0)}n&&u.AddPaths(o,h.PolyType.ptClip,!0);var m=new h.Paths;return u.Execute(h.ClipType.ctUnion,m,a,a),m}};h.Clipper.MinkowskiDiff=function(r,t,e){return h.Clipper.Minkowski(r,t,!1,e)};h.Clipper.PolyTreeToPaths=function(r){var t=new Array;return h.Clipper.AddPolyNodeToPaths(r,h.Clipper.NodeType.ntAny,t),t};h.Clipper.AddPolyNodeToPaths=function(r,t,e){var i=!0;switch(t){case h.Clipper.NodeType.ntOpen:return;case h.Clipper.NodeType.ntClosed:i=!r.IsOpen;break;default:break}r.m_polygon.length>0&&i&&e.push(r.m_polygon);for(var n=0,o=r.Childs(),a=o.length,u=o[n];n<a;n++,u=o[n])h.Clipper.AddPolyNodeToPaths(u,t,e)};h.Clipper.OpenPathsFromPolyTree=function(r){for(var t=new h.Paths,e=0,i=r.ChildCount();e<i;e++)r.Childs()[e].IsOpen&&t.push(r.Childs()[e].m_polygon);return t};h.Clipper.ClosedPathsFromPolyTree=function(r){var t=new h.Paths;return h.Clipper.AddPolyNodeToPaths(r,h.Clipper.NodeType.ntClosed,t),t};gc(h.Clipper,h.ClipperBase);h.Clipper.NodeType={ntAny:0,ntOpen:1,ntClosed:2};h.ClipperOffset=function(r,t){typeof r>"u"&&(r=2),typeof t>"u"&&(t=h.ClipperOffset.def_arc_tolerance),this.m_destPolys=new h.Paths,this.m_srcPoly=new h.Path,this.m_destPoly=new h.Path,this.m_normals=new Array,this.m_delta=0,this.m_sinA=0,this.m_sin=0,this.m_cos=0,this.m_miterLim=0,this.m_StepsPerRad=0,this.m_lowest=new h.IntPoint,this.m_polyNodes=new h.PolyNode,this.MiterLimit=r,this.ArcTolerance=t,this.m_lowest.X=-1};h.ClipperOffset.two_pi=6.28318530717959;h.ClipperOffset.def_arc_tolerance=.25;h.ClipperOffset.prototype.Clear=function(){h.Clear(this.m_polyNodes.Childs()),this.m_lowest.X=-1};h.ClipperOffset.Round=h.Clipper.Round;h.ClipperOffset.prototype.AddPath=function(r,t,e){var i=r.length-1;if(!(i<0)){var n=new h.PolyNode;if(n.m_jointype=t,n.m_endtype=e,e==h.EndType.etClosedLine||e==h.EndType.etClosedPolygon)for(;i>0&&h.IntPoint.op_Equality(r[0],r[i]);)i--;n.m_polygon.push(r[0]);for(var o=0,a=0,u=1;u<=i;u++)h.IntPoint.op_Inequality(n.m_polygon[o],r[u])&&(o++,n.m_polygon.push(r[u]),(r[u].Y>n.m_polygon[a].Y||r[u].Y==n.m_polygon[a].Y&&r[u].X<n.m_polygon[a].X)&&(a=o));if(!(e==h.EndType.etClosedPolygon&&o<2||e!=h.EndType.etClosedPolygon&&o<0)&&(this.m_polyNodes.AddChild(n),e==h.EndType.etClosedPolygon))if(this.m_lowest.X<0)this.m_lowest=new h.IntPoint(0,a);else{var s=this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon[this.m_lowest.Y];(n.m_polygon[a].Y>s.Y||n.m_polygon[a].Y==s.Y&&n.m_polygon[a].X<s.X)&&(this.m_lowest=new h.IntPoint(this.m_polyNodes.ChildCount()-1,a))}}};h.ClipperOffset.prototype.AddPaths=function(r,t,e){for(var i=0,n=r.length;i<n;i++)this.AddPath(r[i],t,e)};h.ClipperOffset.prototype.FixOrientations=function(){if(this.m_lowest.X>=0&&!h.Clipper.Orientation(this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon))for(var r=0;r<this.m_polyNodes.ChildCount();r++){var t=this.m_polyNodes.Childs()[r];(t.m_endtype==h.EndType.etClosedPolygon||t.m_endtype==h.EndType.etClosedLine&&h.Clipper.Orientation(t.m_polygon))&&t.m_polygon.reverse()}else for(var r=0;r<this.m_polyNodes.ChildCount();r++){var t=this.m_polyNodes.Childs()[r];t.m_endtype==h.EndType.etClosedLine&&!h.Clipper.Orientation(t.m_polygon)&&t.m_polygon.reverse()}};h.ClipperOffset.GetUnitNormal=function(r,t){var e=t.X-r.X,i=t.Y-r.Y;if(e==0&&i==0)return new h.DoublePoint(0,0);var n=1/Math.sqrt(e*e+i*i);return e*=n,i*=n,new h.DoublePoint(i,-e)};h.ClipperOffset.prototype.DoOffset=function(r){if(this.m_destPolys=new Array,this.m_delta=r,h.ClipperBase.near_zero(r)){for(var t=0;t<this.m_polyNodes.ChildCount();t++){var e=this.m_polyNodes.Childs()[t];e.m_endtype==h.EndType.etClosedPolygon&&this.m_destPolys.push(e.m_polygon)}return}this.MiterLimit>2?this.m_miterLim=2/(this.MiterLimit*this.MiterLimit):this.m_miterLim=.5;var i;this.ArcTolerance<=0?i=h.ClipperOffset.def_arc_tolerance:this.ArcTolerance>Math.abs(r)*h.ClipperOffset.def_arc_tolerance?i=Math.abs(r)*h.ClipperOffset.def_arc_tolerance:i=this.ArcTolerance;var n=3.14159265358979/Math.acos(1-i/Math.abs(r));this.m_sin=Math.sin(h.ClipperOffset.two_pi/n),this.m_cos=Math.cos(h.ClipperOffset.two_pi/n),this.m_StepsPerRad=n/h.ClipperOffset.two_pi,r<0&&(this.m_sin=-this.m_sin);for(var t=0;t<this.m_polyNodes.ChildCount();t++){var e=this.m_polyNodes.Childs()[t];this.m_srcPoly=e.m_polygon;var o=this.m_srcPoly.length;if(!(o==0||r<=0&&(o<3||e.m_endtype!=h.EndType.etClosedPolygon))){if(this.m_destPoly=new Array,o==1){if(e.m_jointype==h.JoinType.jtRound)for(var a=1,u=0,s=1;s<=n;s++){this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[0].X+a*r),h.ClipperOffset.Round(this.m_srcPoly[0].Y+u*r)));var p=a;a=a*this.m_cos-this.m_sin*u,u=p*this.m_sin+u*this.m_cos}else for(var a=-1,u=-1,s=0;s<4;++s)this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[0].X+a*r),h.ClipperOffset.Round(this.m_srcPoly[0].Y+u*r))),a<0?a=1:u<0?u=1:a=-1;this.m_destPolys.push(this.m_destPoly);continue}this.m_normals.length=0;for(var s=0;s<o-1;s++)this.m_normals.push(h.ClipperOffset.GetUnitNormal(this.m_srcPoly[s],this.m_srcPoly[s+1]));if(e.m_endtype==h.EndType.etClosedLine||e.m_endtype==h.EndType.etClosedPolygon?this.m_normals.push(h.ClipperOffset.GetUnitNormal(this.m_srcPoly[o-1],this.m_srcPoly[0])):this.m_normals.push(new h.DoublePoint(this.m_normals[o-2])),e.m_endtype==h.EndType.etClosedPolygon){for(var f=o-1,s=0;s<o;s++)f=this.OffsetPoint(s,f,e.m_jointype);this.m_destPolys.push(this.m_destPoly)}else if(e.m_endtype==h.EndType.etClosedLine){for(var f=o-1,s=0;s<o;s++)f=this.OffsetPoint(s,f,e.m_jointype);this.m_destPolys.push(this.m_destPoly),this.m_destPoly=new Array;for(var m=this.m_normals[o-1],s=o-1;s>0;s--)this.m_normals[s]=new h.DoublePoint(-this.m_normals[s-1].X,-this.m_normals[s-1].Y);this.m_normals[0]=new h.DoublePoint(-m.X,-m.Y),f=0;for(var s=o-1;s>=0;s--)f=this.OffsetPoint(s,f,e.m_jointype);this.m_destPolys.push(this.m_destPoly)}else{for(var f=0,s=1;s<o-1;++s)f=this.OffsetPoint(s,f,e.m_jointype);var y;if(e.m_endtype==h.EndType.etOpenButt){var s=o-1;y=new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[s].X+this.m_normals[s].X*r),h.ClipperOffset.Round(this.m_srcPoly[s].Y+this.m_normals[s].Y*r)),this.m_destPoly.push(y),y=new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[s].X-this.m_normals[s].X*r),h.ClipperOffset.Round(this.m_srcPoly[s].Y-this.m_normals[s].Y*r)),this.m_destPoly.push(y)}else{var s=o-1;f=o-2,this.m_sinA=0,this.m_normals[s]=new h.DoublePoint(-this.m_normals[s].X,-this.m_normals[s].Y),e.m_endtype==h.EndType.etOpenSquare?this.DoSquare(s,f):this.DoRound(s,f)}for(var s=o-1;s>0;s--)this.m_normals[s]=new h.DoublePoint(-this.m_normals[s-1].X,-this.m_normals[s-1].Y);this.m_normals[0]=new h.DoublePoint(-this.m_normals[1].X,-this.m_normals[1].Y),f=o-1;for(var s=f-1;s>0;--s)f=this.OffsetPoint(s,f,e.m_jointype);e.m_endtype==h.EndType.etOpenButt?(y=new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[0].X-this.m_normals[0].X*r),h.ClipperOffset.Round(this.m_srcPoly[0].Y-this.m_normals[0].Y*r)),this.m_destPoly.push(y),y=new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[0].X+this.m_normals[0].X*r),h.ClipperOffset.Round(this.m_srcPoly[0].Y+this.m_normals[0].Y*r)),this.m_destPoly.push(y)):(f=1,this.m_sinA=0,e.m_endtype==h.EndType.etOpenSquare?this.DoSquare(0,1):this.DoRound(0,1)),this.m_destPolys.push(this.m_destPoly)}}}};h.ClipperOffset.prototype.Execute=function(){var r=arguments,t=r[0]instanceof h.PolyTree;if(t){var e=r[0],i=r[1];e.Clear(),this.FixOrientations(),this.DoOffset(i);var n=new h.Clipper(0);if(n.AddPaths(this.m_destPolys,h.PolyType.ptSubject,!0),i>0)n.Execute(h.ClipType.ctUnion,e,h.PolyFillType.pftPositive,h.PolyFillType.pftPositive);else{var o=h.Clipper.GetBounds(this.m_destPolys),a=new h.Path;if(a.push(new h.IntPoint(o.left-10,o.bottom+10)),a.push(new h.IntPoint(o.right+10,o.bottom+10)),a.push(new h.IntPoint(o.right+10,o.top-10)),a.push(new h.IntPoint(o.left-10,o.top-10)),n.AddPath(a,h.PolyType.ptSubject,!0),n.ReverseSolution=!0,n.Execute(h.ClipType.ctUnion,e,h.PolyFillType.pftNegative,h.PolyFillType.pftNegative),e.ChildCount()==1&&e.Childs()[0].ChildCount()>0){var u=e.Childs()[0];e.Childs()[0]=u.Childs()[0];for(var s=1;s<u.ChildCount();s++)e.AddChild(u.Childs()[s])}else e.Clear()}}else{var e=r[0],i=r[1];h.Clear(e),this.FixOrientations(),this.DoOffset(i);var n=new h.Clipper(0);if(n.AddPaths(this.m_destPolys,h.PolyType.ptSubject,!0),i>0)n.Execute(h.ClipType.ctUnion,e,h.PolyFillType.pftPositive,h.PolyFillType.pftPositive);else{var o=h.Clipper.GetBounds(this.m_destPolys),a=new h.Path;a.push(new h.IntPoint(o.left-10,o.bottom+10)),a.push(new h.IntPoint(o.right+10,o.bottom+10)),a.push(new h.IntPoint(o.right+10,o.top-10)),a.push(new h.IntPoint(o.left-10,o.top-10)),n.AddPath(a,h.PolyType.ptSubject,!0),n.ReverseSolution=!0,n.Execute(h.ClipType.ctUnion,e,h.PolyFillType.pftNegative,h.PolyFillType.pftNegative),e.length>0&&e.splice(0,1)}}};h.ClipperOffset.prototype.OffsetPoint=function(r,t,e){if(this.m_sinA=this.m_normals[t].X*this.m_normals[r].Y-this.m_normals[r].X*this.m_normals[t].Y,this.m_sinA<5e-5&&this.m_sinA>-5e-5)return t;if(this.m_sinA>1?this.m_sinA=1:this.m_sinA<-1&&(this.m_sinA=-1),this.m_sinA*this.m_delta<0)this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[r].X+this.m_normals[t].X*this.m_delta),h.ClipperOffset.Round(this.m_srcPoly[r].Y+this.m_normals[t].Y*this.m_delta))),this.m_destPoly.push(new h.IntPoint(this.m_srcPoly[r])),this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[r].X+this.m_normals[r].X*this.m_delta),h.ClipperOffset.Round(this.m_srcPoly[r].Y+this.m_normals[r].Y*this.m_delta)));else switch(e){case h.JoinType.jtMiter:{var i=1+(this.m_normals[r].X*this.m_normals[t].X+this.m_normals[r].Y*this.m_normals[t].Y);i>=this.m_miterLim?this.DoMiter(r,t,i):this.DoSquare(r,t);break}case h.JoinType.jtSquare:this.DoSquare(r,t);break;case h.JoinType.jtRound:this.DoRound(r,t);break}return t=r,t};h.ClipperOffset.prototype.DoSquare=function(r,t){var e=Math.tan(Math.atan2(this.m_sinA,this.m_normals[t].X*this.m_normals[r].X+this.m_normals[t].Y*this.m_normals[r].Y)/4);this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[r].X+this.m_delta*(this.m_normals[t].X-this.m_normals[t].Y*e)),h.ClipperOffset.Round(this.m_srcPoly[r].Y+this.m_delta*(this.m_normals[t].Y+this.m_normals[t].X*e)))),this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[r].X+this.m_delta*(this.m_normals[r].X+this.m_normals[r].Y*e)),h.ClipperOffset.Round(this.m_srcPoly[r].Y+this.m_delta*(this.m_normals[r].Y-this.m_normals[r].X*e))))};h.ClipperOffset.prototype.DoMiter=function(r,t,e){var i=this.m_delta/e;this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[r].X+(this.m_normals[t].X+this.m_normals[r].X)*i),h.ClipperOffset.Round(this.m_srcPoly[r].Y+(this.m_normals[t].Y+this.m_normals[r].Y)*i)))};h.ClipperOffset.prototype.DoRound=function(r,t){for(var e=Math.atan2(this.m_sinA,this.m_normals[t].X*this.m_normals[r].X+this.m_normals[t].Y*this.m_normals[r].Y),i=h.Cast_Int32(h.ClipperOffset.Round(this.m_StepsPerRad*Math.abs(e))),n=this.m_normals[t].X,o=this.m_normals[t].Y,a,u=0;u<i;++u)this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[r].X+n*this.m_delta),h.ClipperOffset.Round(this.m_srcPoly[r].Y+o*this.m_delta))),a=n,n=n*this.m_cos-this.m_sin*o,o=a*this.m_sin+o*this.m_cos;this.m_destPoly.push(new h.IntPoint(h.ClipperOffset.Round(this.m_srcPoly[r].X+this.m_normals[r].X*this.m_delta),h.ClipperOffset.Round(this.m_srcPoly[r].Y+this.m_normals[r].Y*this.m_delta)))};h.Error=function(r){try{throw new Error(r)}catch(t){alert(t.message)}};h.JS={};h.JS.AreaOfPolygon=function(r,t){return t||(t=1),h.Clipper.Area(r)/(t*t)};h.JS.AreaOfPolygons=function(r,t){t||(t=1);for(var e=0,i=0;i<r.length;i++)e+=h.Clipper.Area(r[i]);return e/(t*t)};h.JS.BoundsOfPath=function(r,t){return h.JS.BoundsOfPaths([r],t)};h.JS.BoundsOfPaths=function(r,t){t||(t=1);var e=h.Clipper.GetBounds(r);return e.left/=t,e.bottom/=t,e.right/=t,e.top/=t,e};h.JS.Clean=function(i,t){if(!(i instanceof Array))return[];var e=i[0]instanceof Array,i=h.JS.Clone(i);if(typeof t!="number"||t===null)return h.Error("Delta is not a number in Clean()."),i;if(i.length===0||i.length==1&&i[0].length===0||t<0)return i;e||(i=[i]);for(var n=i.length,o,a,u,s,p,f,m,y=[],x=0;x<n;x++)if(a=i[x],o=a.length,o!==0){if(o<3){u=a,y.push(u);continue}for(u=a,s=t*t,p=a[0],f=1,m=1;m<o;m++)(a[m].X-p.X)*(a[m].X-p.X)+(a[m].Y-p.Y)*(a[m].Y-p.Y)<=s||(u[f]=a[m],p=a[m],f++);p=a[f-1],(a[0].X-p.X)*(a[0].X-p.X)+(a[0].Y-p.Y)*(a[0].Y-p.Y)<=s&&f--,f<o&&u.splice(f,o-f),u.length&&y.push(u)}return!e&&y.length?y=y[0]:!e&&y.length===0?y=[]:e&&y.length===0&&(y=[[]]),y};h.JS.Clone=function(r){if(!(r instanceof Array))return[];if(r.length===0)return[];if(r.length==1&&r[0].length===0)return[[]];var t=r[0]instanceof Array;t||(r=[r]);var e=r.length,i,n,o,a,u=new Array(e);for(n=0;n<e;n++){for(i=r[n].length,a=new Array(i),o=0;o<i;o++)a[o]={X:r[n][o].X,Y:r[n][o].Y};u[n]=a}return t||(u=u[0]),u};h.JS.Lighten=function(r,t){if(!(r instanceof Array))return[];if(typeof t!="number"||t===null)return h.Error("Tolerance is not a number in Lighten()."),h.JS.Clone(r);if(r.length===0||r.length==1&&r[0].length===0||t<0)return h.JS.Clone(r);r[0]instanceof Array||(r=[r]);var e,i,n,o,a,u,s,p,f,m,y,x,S,M,g,C,I,T=r.length,w=t*t,L=[];for(e=0;e<T;e++)if(n=r[e],u=n.length,u!=0){for(o=0;o<1e6;o++){for(a=[],u=n.length,n[u-1].X!=n[0].X||n[u-1].Y!=n[0].Y?(x=1,n.push({X:n[0].X,Y:n[0].Y}),u=n.length):x=0,y=[],i=0;i<u-2;i++)s=n[i],f=n[i+1],p=n[i+2],C=s.X,I=s.Y,S=p.X-C,M=p.Y-I,(S!==0||M!==0)&&(g=((f.X-C)*S+(f.Y-I)*M)/(S*S+M*M),g>1?(C=p.X,I=p.Y):g>0&&(C+=S*g,I+=M*g)),S=f.X-C,M=f.Y-I,m=S*S+M*M,m<=w&&(y[i+1]=1,i++);for(a.push({X:n[0].X,Y:n[0].Y}),i=1;i<u-1;i++)y[i]||a.push({X:n[i].X,Y:n[i].Y});if(a.push({X:n[u-1].X,Y:n[u-1].Y}),x&&n.pop(),y.length)n=a;else break}u=a.length,a[u-1].X==a[0].X&&a[u-1].Y==a[0].Y&&a.pop(),a.length>2&&L.push(a)}return!r[0]instanceof Array&&(L=L[0]),typeof L>"u"&&(L=[[]]),L};h.JS.PerimeterOfPath=function(r,t,e){if(typeof r>"u")return 0;var i=Math.sqrt,n=0,o,a,u=0,s=0,p=0,f=0,m=r.length;if(m<2)return 0;for(t&&(r[m]=r[0],m++);--m;)o=r[m],u=o.X,s=o.Y,a=r[m-1],p=a.X,f=a.Y,n+=i((u-p)*(u-p)+(s-f)*(s-f));return t&&r.pop(),n/e};h.JS.PerimeterOfPaths=function(r,t,e){e||(e=1);for(var i=0,n=0;n<r.length;n++)i+=h.JS.PerimeterOfPath(r[n],t,e);return i};h.JS.ScaleDownPath=function(r,t){var e,i;for(t||(t=1),e=r.length;e--;)i=r[e],i.X=i.X/t,i.Y=i.Y/t};h.JS.ScaleDownPaths=function(r,t){var e,i,n,o=Math.round;for(t||(t=1),e=r.length;e--;)for(i=r[e].length;i--;)n=r[e][i],n.X=n.X/t,n.Y=n.Y/t};h.JS.ScaleUpPath=function(r,t){var e,i,n=Math.round;for(t||(t=1),e=r.length;e--;)i=r[e],i.X=n(i.X*t),i.Y=n(i.Y*t)};h.JS.ScaleUpPaths=function(r,t){var e,i,n,o=Math.round;for(t||(t=1),e=r.length;e--;)for(i=r[e].length;i--;)n=r[e][i],n.X=o(n.X*t),n.Y=o(n.Y*t)};h.ExPolygons=function(){return[]};h.ExPolygon=function(){this.outer=null,this.holes=null};h.JS.AddOuterPolyNodeToExPolygons=function(r,t){var e=new h.ExPolygon;e.outer=r.Contour();var i=r.Childs(),n=i.length;e.holes=new Array(n);var o,a,u,s,p,f;for(u=0;u<n;u++)for(o=i[u],e.holes[u]=o.Contour(),s=0,p=o.Childs(),f=p.length;s<f;s++)a=p[s],h.JS.AddOuterPolyNodeToExPolygons(a,t);t.push(e)};h.JS.ExPolygonsToPaths=function(r){var t,e,i,n,o=new h.Paths;for(t=0,i=r.length;t<i;t++)for(o.push(r[t].outer),e=0,n=r[t].holes.length;e<n;e++)o.push(r[t].holes[e]);return o};h.JS.PolyTreeToExPolygons=function(r){var t=new h.ExPolygons,e,i,n,o;for(i=0,n=r.Childs(),o=n.length;i<o;i++)e=n[i],h.JS.AddOuterPolyNodeToExPolygons(e,t);return t};cs.exports=h});d();d();var ul=new WeakMap,Gt,ip=class ip{constructor(t){P(this,Gt,void 0);E(this,Gt,t),ul.set(this,t)}get mapName(){return c(this,Gt).mapName}get mapCenter(){return c(this,Gt).mapCenter}get organizationId(){return c(this,Gt).organizationId}get outdoorViewToken(){return c(this,Gt).outdoorViewToken}getByType(t){switch(t){case"space":return c(this,Gt).spaces;case"door":return c(this,Gt).doors;case"floor":return c(this,Gt).floors;case"connection":return c(this,Gt).connections;case"object":return c(this,Gt).objects;case"point-of-interest":return c(this,Gt).pointsOfInterest;case"annotation":return c(this,Gt).annotations;default:return[]}}getById(t,e){return c(this,Gt).getById(t,e)}};Gt=new WeakMap,l(ip,"MapData");var rp=ip,cl=rp;d();d();d();var H1=(n=>(n[n.LOG=0]="LOG",n[n.WARN=1]="WARN",n[n.ERROR=2]="ERROR",n[n.SILENT=3]="SILENT",n))(H1||{});function R5(r){0<=r&&r<=3&&(X1.logState=r)}l(R5,"setLoggerLevel");var X1={logState:b.env.NODE_ENV==="test"?3:0,log(...r){this.logState<=0&&console.log("[MappedInJS]",...r)},warn(...r){this.logState<=1&&console.warn("[MappedInJS]",...r)},error(...r){this.logState<=2&&console.error("[MappedInJS]",...r)},assert(...r){console.assert(...r)},time(r){console.time(r)},timeEnd(r){console.timeEnd(r)}},B=X1;var j1=globalThis.fetch,Y1,B5=(Y1=b==null?void 0:b.env)==null?void 0:Y1.npm_package_version,W1="https://app.mappedin.com/";function Vo(){if(j1==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return j1}l(Vo,"isomorphicFetch");var U1={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};function Z1(r){var e;let t={...U1,...r};return t.headers={...t.headers,"mappedin-sdk-version":B5},t.things=[],"platformString"in r&&(t.headers={...t.headers,"mappedin-platform-version":r.platformString}),t.noAuth||(t.accessToken?t.authorization=`Bearer ${t.accessToken}`:t.clientId&&t.clientSecret&&(t.authorization=`Basic ${globalThis.btoa(`${t.clientId}:${t.clientSecret}`)}`)),t.language=(e=t.language)==null?void 0:e.toLowerCase(),t}l(Z1,"parseOptions");function F5(r,t,e=!1){let i={language:r.language,clientId:r.clientId,clientSecret:r.clientSecret};e&&delete i.language,i.language&&(t+=`&lang=${encodeURIComponent(i.language)}`);let{headers:n}=r;n["Content-Type"]=n["Content-Type"]||"text/json",r.accessToken?n.Authorization=`Bearer ${r.accessToken}`:r.noAuth||r.clientId&&r.clientSecret&&(n["x-mappedin-key"]=btoa(r.clientId),n["x-mappedin-secret"]=btoa(r.clientSecret)),i.language&&(n["Accept-Language"]=i.language);let o={method:"GET",headers:n};return r.secure&&(t+="&withcdntoken"),{req:o,url:t}}l(F5,"constructParamsForRequest");async function G5(r,t,e=!1){let i=F5(r,t,e),n=await Vo()(i.url,i.req);if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);return n.json()}l(G5,"generateAPIRequest");async function V5(r,t="exports/mvf/1/bundle"){var o;let e=Z1({baseUri:"https://api-gateway.mappedin.com/",...U1,...r}),i=`${e.baseUri+t}?venue=${e.venue}&version=${(o=e.version)!=null?o:"2.0.0"}`;return e.headers["Content-Type"]="application/zip",await G5(e,i)}l(V5,"getVenueMVFURL");async function z1(r){return new Promise(async(t,e)=>{try{let{url:i}=await V5(r,"exports/mvf2/1/bundle"),n=await Vo()(i).then(a=>a.arrayBuffer()),o=new Uint8Array(n);t(o)}catch(i){e(i)}})}l(z1,"downloadVenueBundleMVFAPIGateway");async function np(r,t){return new Promise(async(e,i)=>{try{let{url:n}=await H5(r,t),o=await Vo()(n).then(u=>u.arrayBuffer()),a=new Uint8Array(o);e(a)}catch(n){i(n)}})}l(np,"downloadMVF");function q1(r){return r.endsWith("/")?r:`${r}/`}l(q1,"normalizeUrl");async function H5(r,t){let e=`${r.baseUri?q1(r.baseUri):W1}api/venue/${r.mapId}/mvf${r.viewId?`?configId=${r.viewId}`:""}`,i=await Vo()(e,{headers:{Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`${i.status} ${i.statusText}`);return i.json()}l(H5,"getMakerBundleURL");async function pl(r){let t=`${r.baseUri?q1(r.baseUri):W1}api/api-key/token`,e=await Vo()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:r.key,secret:r.secret})});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);return e.json()}l(pl,"getAccessToken");function hl(r){let t=new TextDecoder,e=t.decode.bind(t);try{let i={"connection.json":JSON.parse(e(r["connection.json"])),"manifest.geojson":JSON.parse(e(r["manifest.geojson"])),"map.geojson":JSON.parse(e(r["map.geojson"])),"mapstack.geojson":r["mapstack.geojson"]?JSON.parse(e(r["mapstack.geojson"])):void 0,"node.geojson":JSON.parse(e(r["node.geojson"])),obstruction:{},space:{},entrance:{}};if((i["mapstack.geojson"]==null||"mapstack.json"in r)&&(i["mapstack.json"]=JSON.parse(e(r["mapstack.json"]))),"styles.json"in r&&(i["styles.json"]=JSON.parse(e(r["styles.json"]))),"shapes.json"in r&&(i["shapes.json"]=JSON.parse(e(r["shapes.json"]))),r.annotation!=null){i.annotation={};let o=Object.keys(r.annotation);for(let a of o){let u=a.replace(/\.json|\.geojson/g,"");i.annotation[u]=JSON.parse(e(r.annotation[a]))}}let n=Object.keys(r.space);for(let o of n){let a=o.replace(/\.json|\.geojson/g,"");i.space[a]=JSON.parse(e(r.space[o]))}if(r.obstruction!=null){let o=Object.keys(r.obstruction);for(let a of o){let u=a.replace(/\.json|\.geojson/g,"");i.obstruction[u]=JSON.parse(e(r.obstruction[a]))}}else i.obstruction={};if(r.entrance!=null){let o=Object.keys(r.entrance);for(let a of o){let u=a.replace(/\.json|\.geojson/g,"");i.entrance[u]=JSON.parse(e(r.entrance[a]))}}else i.entrance={};return i}catch(i){throw B.error(i),new Error("MVF parsing failed! Probably encountered a bad file.")}}l(hl,"parseMVF");function X5(r){if(r==null||typeof r!="object")return!1;let t=["connection.json","manifest.geojson","map.geojson","node.geojson","mapstack.json"in r?"mapstack.json":"mapstack.geojson"];"styles.json"in r&&t.push("styles.json"),"shapes.json"in r&&t.push("shapes.json");for(let e of t)if(r[e]==null||r[e][Symbol.toStringTag]!=="Uint8Array")return!1;return!0}l(X5,"validateStaticMVFFiles");async function dl(r){return new Promise(async(t,e)=>{try{if(r==null||typeof r!="object")throw new Error("Error parsing data! Unzipping failed.");if(r[Symbol.toStringTag]!=="Uint8Array")throw new Error("Unexpected file type! Unzipping failed.");let n=(await import("./browser-QIMNSDZW.js")).unzipSync(r);if(!X5(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let o={},a=Object.keys(n);for(let u of a){if(n[u].length===0)continue;let s=u.split("/");if(s.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(s.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(s.length===1){o[s[0]]=n[u];continue}if(s[0]==="image"){B.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}else o[s[0]]==null&&(o[s[0]]={}),o[s[0]][s[1]]=n[u]}t(o)}catch(i){e(i)}})}l(dl,"unzipMVF");d();d();d();d();var Zt=63710088e-1,$1={centimeters:Zt*100,centimetres:Zt*100,degrees:Zt/111325,feet:Zt*3.28084,inches:Zt*39.37,kilometers:Zt/1e3,kilometres:Zt/1e3,meters:Zt,metres:Zt,miles:Zt/1609.344,millimeters:Zt*1e3,millimetres:Zt*1e3,nauticalmiles:Zt/1852,radians:1,yards:Zt*1.0936},jT={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Zt,yards:1.0936133};function Hr(r,t,e){e===void 0&&(e={});var i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=t||{},i.geometry=r,i}l(Hr,"feature");function Ee(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(!op(r[0])||!op(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Hr(i,t,e)}l(Ee,"point");function mr(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 i={type:"LineString",coordinates:r};return Hr(i,t,e)}l(mr,"lineString");function Ho(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}l(Ho,"featureCollection");function J1(r,t){t===void 0&&(t="kilometers");var e=$1[t];if(!e)throw new Error(t+" units is invalid");return r*e}l(J1,"radiansToLength");function K1(r,t){t===void 0&&(t="kilometers");var e=$1[t];if(!e)throw new Error(t+" units is invalid");return r/e}l(K1,"lengthToRadians");function Xo(r){var t=r%(2*Math.PI);return t*180/Math.PI}l(Xo,"radiansToDegrees");function re(r){var t=r%360;return t*Math.PI/180}l(re,"degreesToRadians");function op(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}l(op,"isNumber");function ge(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")}l(ge,"getCoord");function ce(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")}l(ce,"getCoords");function Q1(r){return r.type==="Feature"?r.geometry:r}l(Q1,"getGeom");function ty(r,t){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}l(ty,"getType");function j5(r,t,e){e===void 0&&(e={});for(var i=ge(r),n=ce(t),o=0;o<n.length-1;o++){var a=!1;if(e.ignoreEndVertices&&(o===0&&(a="start"),o===n.length-2&&(a="end"),o===0&&o+1===n.length-1&&(a="both")),Y5(n[o],n[o+1],i,a,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}l(j5,"booleanPointOnLine");function Y5(r,t,e,i,n){var o=e[0],a=e[1],u=r[0],s=r[1],p=t[0],f=t[1],m=e[0]-u,y=e[1]-s,x=p-u,S=f-s,M=m*S-y*x;if(n!==null){if(Math.abs(M)>n)return!1}else if(M!==0)return!1;if(i){if(i==="start")return Math.abs(x)>=Math.abs(S)?x>0?u<o&&o<=p:p<=o&&o<u:S>0?s<a&&a<=f:f<=a&&a<s;if(i==="end")return Math.abs(x)>=Math.abs(S)?x>0?u<=o&&o<p:p<o&&o<=u:S>0?s<=a&&a<f:f<a&&a<=s;if(i==="both")return Math.abs(x)>=Math.abs(S)?x>0?u<o&&o<p:p<o&&o<u:S>0?s<a&&a<f:f<a&&a<s}else return Math.abs(x)>=Math.abs(S)?x>0?u<=o&&o<=p:p<=o&&o<=u:S>0?s<=a&&a<=f:f<=a&&a<=s;return!1}l(Y5,"isPointOnLineSegment");var ey=j5;d();d();d();function fl(r,t,e){if(r!==null)for(var i,n,o,a,u,s,p,f=0,m=0,y,x=r.type,S=x==="FeatureCollection",M=x==="Feature",g=S?r.features.length:1,C=0;C<g;C++){p=S?r.features[C].geometry:M?r.geometry:r,y=p?p.type==="GeometryCollection":!1,u=y?p.geometries.length:1;for(var I=0;I<u;I++){var T=0,w=0;if(a=y?p.geometries[I]:p,a!==null){s=a.coordinates;var L=a.type;switch(f=e&&(L==="Polygon"||L==="MultiPolygon")?1:0,L){case null:break;case"Point":if(t(s,m,C,T,w)===!1)return!1;m++,T++;break;case"LineString":case"MultiPoint":for(i=0;i<s.length;i++){if(t(s[i],m,C,T,w)===!1)return!1;m++,L==="MultiPoint"&&T++}L==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(i=0;i<s.length;i++){for(n=0;n<s[i].length-f;n++){if(t(s[i][n],m,C,T,w)===!1)return!1;m++}L==="MultiLineString"&&T++,L==="Polygon"&&w++}L==="Polygon"&&T++;break;case"MultiPolygon":for(i=0;i<s.length;i++){for(w=0,n=0;n<s[i].length;n++){for(o=0;o<s[i][n].length-f;o++){if(t(s[i][n][o],m,C,T,w)===!1)return!1;m++}w++}T++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(fl(a.geometries[i],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}l(fl,"coordEach");function ap(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++);}l(ap,"featureEach");function W5(r,t){var e,i,n,o,a,u,s,p,f,m,y=0,x=r.type==="FeatureCollection",S=r.type==="Feature",M=x?r.features.length:1;for(e=0;e<M;e++){for(u=x?r.features[e].geometry:S?r.geometry:r,p=x?r.features[e].properties:S?r.properties:{},f=x?r.features[e].bbox:S?r.bbox:void 0,m=x?r.features[e].id:S?r.id:void 0,s=u?u.type==="GeometryCollection":!1,a=s?u.geometries.length:1,n=0;n<a;n++){if(o=s?u.geometries[n]:u,o===null){if(t(null,y,p,f,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,y,p,f,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<o.geometries.length;i++)if(t(o.geometries[i],y,p,f,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}l(W5,"geomEach");function jo(r,t){W5(r,function(e,i,n,o,a){var u=e===null?null:e.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return t(Hr(e,n,{bbox:o,id:a}),i,0)===!1?!1:void 0}var s;switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon";break}for(var p=0;p<e.coordinates.length;p++){var f=e.coordinates[p],m={type:s,coordinates:f};if(t(Hr(m,n),i,p)===!1)return!1}})}l(jo,"flattenEach");function U5(r,t){jo(r,function(e,i,n){var o=0;if(e.geometry){var a=e.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var u,s=0,p=0,f=0;if(fl(e,function(m,y,x,S,M){if(u===void 0||i>s||S>p||M>f){u=m,s=i,p=S,f=M,o=0;return}var g=mr([u,m],e.properties);if(t(g,i,n,M,o)===!1)return!1;o++,u=m})===!1)return!1}}})}l(U5,"segmentEach");function ry(r,t,e){var i=e,n=!1;return U5(r,function(o,a,u,s,p){n===!1&&e===void 0?i=o:i=t(i,o,a,u,s,p),n=!0}),i}l(ry,"segmentReduce");function sp(r){var t=[1/0,1/0,-1/0,-1/0];return fl(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}l(sp,"bbox");sp.default=sp;var ml=sp;function Z5(r,t){t===void 0&&(t={});var e=ml(r),i=(e[0]+e[2])/2,n=(e[1]+e[3])/2;return Ee([i,n],t.properties,t)}l(Z5,"center");var iy=Z5;d();d();function z5(r,t,e){e===void 0&&(e={});var i=ge(r),n=ge(t),o=re(n[1]-i[1]),a=re(n[0]-i[0]),u=re(i[1]),s=re(n[1]),p=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(u)*Math.cos(s);return J1(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),e.units)}l(z5,"distance");var Xr=z5;function yl(r,t){return t===void 0&&(t={}),ry(r,function(e,i){var n=i.geometry.coordinates;return e+Xr(n[0],n[1],t)},0)}l(yl,"length");d();d();d();function gl(r,t,e){if(e===void 0&&(e={}),e.final===!0)return q5(r,t);var i=ge(r),n=ge(t),o=re(i[0]),a=re(n[0]),u=re(i[1]),s=re(n[1]),p=Math.sin(a-o)*Math.cos(s),f=Math.cos(u)*Math.sin(s)-Math.sin(u)*Math.cos(s)*Math.cos(a-o);return Xo(Math.atan2(p,f))}l(gl,"bearing");function q5(r,t){var e=gl(t,r);return e=(e+180)%360,e}l(q5,"calculateFinalBearing");d();function Si(r,t,e,i){i===void 0&&(i={});var n=ge(r),o=re(n[0]),a=re(n[1]),u=re(e),s=K1(t,i.units),p=Math.asin(Math.sin(a)*Math.cos(s)+Math.cos(a)*Math.sin(s)*Math.cos(u)),f=o+Math.atan2(Math.sin(u)*Math.sin(s)*Math.cos(a),Math.cos(s)-Math.sin(a)*Math.sin(p)),m=Xo(f),y=Xo(p);return Ee([m,y],i.properties)}l(Si,"destination");d();d();function $5(r){if(!r)throw new Error("geojson is required");var t=[];return jo(r,function(e){J5(e,t)}),Ho(t)}l($5,"lineSegment");function J5(r,t){var e=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":e=ce(i);break;case"LineString":e=[ce(i)]}e.forEach(function(n){var o=K5(n,r.properties);o.forEach(function(a){a.id=t.length,t.push(a)})})}}l(J5,"lineSegmentFeature");function K5(r,t){var e=[];return r.reduce(function(i,n){var o=mr([i,n],t);return o.bbox=Q5(i,n),e.push(o),n}),e}l(K5,"createSegments");function Q5(r,t){var e=r[0],i=r[1],n=t[0],o=t[1],a=e<n?e:n,u=i<o?i:o,s=e>n?e:n,p=i>o?i:o;return[a,u,s,p]}l(Q5,"bbox");var lp=$5;var h3=Br(c3(),1);function S9(r,t){var e={},i=[];if(r.type==="LineString"&&(r=Hr(r)),t.type==="LineString"&&(t=Hr(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 n=p3(r,t);return n&&i.push(n),Ho(i)}var o=(0,h3.default)();return o.load(lp(t)),ap(lp(r),function(a){ap(o.search(a),function(u){var s=p3(a,u);if(s){var p=ce(s).join(",");e[p]||(e[p]=!0,i.push(s))}})}),Ho(i)}l(S9,"lineIntersect");function p3(r,t){var e=ce(r),i=ce(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=e[0][0],o=e[0][1],a=e[1][0],u=e[1][1],s=i[0][0],p=i[0][1],f=i[1][0],m=i[1][1],y=(m-p)*(a-n)-(f-s)*(u-o),x=(f-s)*(o-p)-(m-p)*(n-s),S=(a-n)*(o-p)-(u-o)*(n-s);if(y===0)return null;var M=x/y,g=S/y;if(M>=0&&M<=1&&g>=0&&g<=1){var C=n+M*(a-n),I=o+M*(u-o);return Ee([C,I])}return null}l(p3,"intersects");var d3=S9;function P9(r,t,e){e===void 0&&(e={});var i=Ee([1/0,1/0],{dist:1/0}),n=0;return jo(r,function(o){for(var a=ce(o),u=0;u<a.length-1;u++){var s=Ee(a[u]);s.properties.dist=Xr(t,s,e);var p=Ee(a[u+1]);p.properties.dist=Xr(t,p,e);var f=Xr(s,p,e),m=Math.max(s.properties.dist,p.properties.dist),y=gl(s,p),x=Si(t,m,y+90,e),S=Si(t,m,y-90,e),M=d3(mr([x.geometry.coordinates,S.geometry.coordinates]),mr([s.geometry.coordinates,p.geometry.coordinates])),g=null;M.features.length>0&&(g=M.features[0],g.properties.dist=Xr(t,g,e),g.properties.location=n+Xr(s,g,e)),s.properties.dist<i.properties.dist&&(i=s,i.properties.index=u,i.properties.location=n),p.properties.dist<i.properties.dist&&(i=p,i.properties.index=u+1,i.properties.location=n+f),g&&g.properties.dist<i.properties.dist&&(i=g,i.properties.index=u),n+=f}}),i}l(P9,"nearestPointOnLine");var sa=P9;function M9(r,t,e){var i=ce(e);if(ty(e)!=="LineString")throw new Error("line must be a LineString");var n=sa(e,r),o=sa(e,t),a;n.properties.index<=o.properties.index?a=[n,o]:a=[o,n];for(var u=[a[0].geometry.coordinates],s=a[0].properties.index+1;s<a[1].properties.index+1;s++)u.push(i[s]);return u.push(a[1].geometry.coordinates),mr(u,e.properties)}l(M9,"lineSlice");var qh=M9;var w9=1e-7;function $h(r){return{type:"Point",coordinates:r}}l($h,"point");function T9(r,t){let{coordinates:e}=t.geometry,{coordinates:i}=r.geometry,n=e.map(o=>sa(r,$h(o)));return i.reduce((o,a)=>{let u=qh($h(a),n[0],r),s=qh($h(a),n[1],r),p=yl(u)<yl(s)?u:s;return p.properties={...r.properties,entrances:[]},o.concat([p])},[])}l(T9,"splitObstructionByEntrance");function Jh(r,t){return t.reduce((e,i)=>{let n={epsilon:w9},o=e.findIndex(u=>ey(iy(i),u,n)),a=e[o];if(a){let[u,s]=T9(a,i);e.splice(o,1,u,s)}return e},[r])}l(Jh,"splitObstructionByAllEntrances");d();d();d();d();var Kh=[0,4,6,8,10],Q=l(()=>{let r=new Array(16).fill(0),t=Math.random()*4294967296;for(let i=0;i<r.length;i++)i>0&&!(i&3)&&(t=Math.random()*4294967296),r[i]=t>>>((i&3)<<3)&255;let e=r.map(i=>i.toString(16).padStart(2,"0"));return e[6]="4"+e[6][1],e[8]=["8","9","a","b"].includes(e[7][0])?e[7]:"a"+e[7][1],Kh.map((i,n)=>e.slice(i,n===Kh.length-1?void 0:Kh[n+1]).join("")).join("-")},"randomId");var Fn=class Fn{__type=Fn.__type;id=Q();latitude;longitude;floorId;static is(t){return t.__type===Fn.__type}constructor(t,e,i){this.latitude=t,this.longitude=e,this.floorId=i}isEqual(t){return this.latitude===t.latitude&&this.longitude===t.longitude&&this.floorId===t.floorId}toJSON(){return{latitude:this.latitude,longitude:this.longitude,floor:this.floorId}}destroy(){}};l(Fn,"Coordinate"),v(Fn,"__type","coordinate");var Qh=Fn,tt=Qh;d();d();d();d();var td=class td{id;constructor(t){this.id=t}};l(td,"BaseMetaData");var Ti=td;var ua,Gn,la=class la extends Ti{constructor(e){super(String(Q()));P(this,ua,{});P(this,Gn,void 0);E(this,Gn,e.mvfData)}static is(e){return e.__type===la.__type}get url(){return c(this,Gn).url}get name(){return c(this,Gn).displayName}toJSON(){return{id:this.id,url:this.url,name:this.name}}destroy(){for(let e of globalThis.Object.keys(c(this,ua)))delete c(this,ua)[e]}};ua=new WeakMap,Gn=new WeakMap,l(la,"Hyperlink"),v(la,"__type","hyperlink");var ed=la,fu=ed;var rd=class rd{id;constructor(t,e){var n;this.id=t;let i=(n=e==null?void 0:e.links)!=null?n:[];i.length>0&&(this.links=i.map(o=>new fu({mvfData:o})))}links=[]};l(rd,"BaseMapData");var Dt=rd;var Ii,br,Ei,qr,Vn=class Vn extends Dt{constructor(e,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",Vn.__type);P(this,Ii,void 0);P(this,br,void 0);P(this,Ei,void 0);P(this,qr,void 0);E(this,br,{}),E(this,qr,i.mvfData),E(this,Ii,e),E(this,Ei,i.floorId)}static is(e){return e.__type===Vn.__type}get name(){var e,i;return(i=(e=c(this,qr).properties.details)==null?void 0:e.name)!=null?i:""}get description(){var e,i;return(i=(e=c(this,qr).properties.details)==null?void 0:e.description)!=null?i:""}get images(){var e,i;return(i=(e=c(this,qr).properties.details)==null?void 0:e.images)!=null?i:[]}get floor(){let e=c(this,Ii).getById("floor",c(this,Ei));if(e==null)throw new Error(`Floor ${c(this,Ei)} not found!`);return e}get center(){if(c(this,br).center==null){let[[e,i],[n,o]]=c(this,qr).geometry.coordinates,a=(e+n)/2,u=(i+o)/2;c(this,br).center=new tt(u,a,c(this,Ei))}return c(this,br).center}get isExterior(){var n;let e=c(this,Ii).obstructionIdByEntranceId[this.id],i=c(this,Ii).getMVFFeatureById("obstruction",e);return(n=i==null?void 0:i.properties.footprintComponent)!=null?n:!1}toJSON(){return{id:this.id,name:this.name,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let e of Object.keys(c(this,br)))delete c(this,br)[e]}};Ii=new WeakMap,br=new WeakMap,Ei=new WeakMap,qr=new WeakMap,l(Vn,"Door"),v(Vn,"__type","door");var id=Vn,$r=id;d();var ca,Li,Jr,Cr,Hn=class Hn extends Dt{constructor(e,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",Hn.__type);P(this,ca,void 0);P(this,Li,void 0);P(this,Jr,{});P(this,Cr,void 0);E(this,ca,e),E(this,Li,i.floorId),E(this,Cr,i.mvfData)}static is(e){return e.__type===Hn.__type}get name(){var i,n;let{properties:e}=c(this,Cr);return(n=(i=e.details)==null?void 0:i.name)!=null?n:e.externalId}get type(){return E9(c(this,Cr).properties.kind)}get description(){var e,i;return(i=(e=c(this,Cr).properties.details)==null?void 0:e.description)!=null?i:""}get images(){var e,i;return(i=(e=c(this,Cr).properties.details)==null?void 0:e.images)!=null?i:[]}get floor(){let e=c(this,ca).getById("floor",c(this,Li));if(e==null)throw new Error(`Floor ${c(this,Li)} not found!`);return e}get center(){var e;if(c(this,Jr).center==null){let[i,n]=(e=c(this,Cr).properties.center)!=null?e:[0,0];c(this,Jr).center=new tt(n,i,c(this,Li))}return c(this,Jr).center}toJSON(){return{id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let e of Object.keys(c(this,Jr)))delete c(this,Jr)[e]}};ca=new WeakMap,Li=new WeakMap,Jr=new WeakMap,Cr=new WeakMap,l(Hn,"Space"),v(Hn,"__type","space");var nd=Hn,I9=["room","hallway","exterior","void","connection.stairs","connection.elevator","poi"];function E9(r){if(r==null||r==="default")return"room";let t=r.toLowerCase();return I9.includes(t)?t:"room"}l(E9,"validateSpaceType");var _e=nd;d();var Ke,vt,jn,Xn=class Xn extends Dt{constructor(e,i){super(i.mvfData.id);v(this,"__type",Xn.__type);P(this,Ke,void 0);P(this,vt,{});P(this,jn,void 0);E(this,Ke,e),E(this,jn,i.mvfData)}static is(e){return e.__type===Xn.__type}get name(){return c(this,jn).externalId}get elevation(){return c(this,jn).elevation}get spaces(){if(c(this,vt).spaces==null){let e=c(this,Ke).spaces.filter(i=>i.floor.id===this.id);c(this,vt).spaces=e}return c(this,vt).spaces}get objects(){if(c(this,vt).objects==null){let e=c(this,Ke).objects.filter(i=>i.floor.id===this.id);c(this,vt).objects=e}return c(this,vt).objects}get connections(){if(c(this,vt).connections==null){let e=c(this,Ke).connections.filter(i=>i.floors.includes(this));c(this,vt).connections=e}return c(this,vt).connections}get doors(){if(c(this,vt).doors==null){let e=c(this,Ke).doors.filter(i=>i.floor.id===this.id);c(this,vt).doors=e}return c(this,vt).doors}get annotations(){if(c(this,vt).annotations==null){let e=c(this,Ke).annotations.filter(i=>i.floor.id===this.id);c(this,vt).annotations=e}return c(this,vt).annotations}get pois(){if(c(this,vt).pois==null){let e=c(this,Ke).pointsOfInterest.filter(i=>i.floor.id===this.id);c(this,vt).pois=e}return c(this,vt).pois}toJSON(){return{id:this.id,name:this.name,elevation:this.elevation,spaces:this.spaces.map(e=>e.id),objects:this.objects.map(e=>e.id),connections:this.connections.map(e=>e.id),doors:this.doors.map(e=>e.id),annotations:this.annotations.map(e=>e.id),pois:this.pois.map(e=>e.id)}}destroy(){for(let e of globalThis.Object.keys(c(this,vt)))delete c(this,vt)[e]}};Ke=new WeakMap,vt=new WeakMap,jn=new WeakMap,l(Xn,"Floor"),v(Xn,"__type","floor");var od=Xn,Kr=od;d();d();d();var pa=l(r=>r!=null,"notNull");d();d();function Qe(r){let t;if(_e.is(r)||$r.is(r)||Oe.is(r))t=r.center;else if(Qr.is(r)||Yn.is(r))t=r.coordinate;else if(tt.is(r))t=r;else return;return t}l(Qe,"getCoordinateFromStuffs");d();d();var ha={auto:!0,debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building","building-top"]}},Di="ExteriorWalls",mu="Walls",f3=0;function ad(r){var t,e;if((t=r.outdoorView)!=null&&t.enabled&&!((e=r.outdoorView)!=null&&e.token)){let i=new Error("Missing outdoorView token");throw i.name="MissingOutdoorViewToken",i}}l(ad,"validateOptions");function sd(r,t){var n,o,a,u;let e=((n=r==null?void 0:r.outdoorView)==null?void 0:n.token)||t.outdoorViewToken,i={...ha,...r!=null?r:{},outdoorView:{enabled:((o=r==null?void 0:r.outdoorView)==null?void 0:o.enabled)===void 0?!!e:(a=r==null?void 0:r.outdoorView)==null?void 0:a.enabled,layersHiddenByGeometry:(u=ha.outdoorView)==null?void 0:u.layersHiddenByGeometry,...r==null?void 0:r.outdoorView}};return e&&i.outdoorView&&(i.outdoorView.token=e),i}l(sd,"handleDefault");var da,xr,Sr,Wn=class Wn extends Dt{constructor(e,i){let n=Object.values(i.mvfDataByFloorId)[0];super(n.properties.id,n.properties.details);v(this,"__type",Wn.__type);P(this,da,void 0);P(this,xr,void 0);P(this,Sr,void 0);E(this,xr,{}),E(this,da,e),E(this,Sr,i.mvfDataByFloorId)}static is(e){return e.__type===Wn.__type}get name(){var e,i;return(i=(e=Object.values(c(this,Sr))[0].properties.details)==null?void 0:e.name)!=null?i:""}get description(){var e,i;return(i=(e=Object.values(c(this,Sr))[0].properties.details)==null?void 0:e.description)!=null?i:""}get images(){var e,i;return(i=(e=Object.values(c(this,Sr))[0].properties.details)==null?void 0:e.images)!=null?i:[]}get type(){var e,i;return(i=(e=Object.values(c(this,Sr))[0].properties.kind)==null?void 0:e.split(".")[1])!=null?i:"unknown"}get coordinates(){return c(this,xr).coordinates==null&&(c(this,xr).coordinates=Object.entries(c(this,Sr)).map(([e,i])=>new tt(i.geometry.coordinates[1],i.geometry.coordinates[0],e))),c(this,xr).coordinates}get floors(){return this.coordinates.map(e=>e.floorId?c(this,da).getById("floor",e.floorId):void 0).filter(pa)}toJSON(){return{id:this.id,name:this.name,type:this.type,coordinates:this.coordinates.map(e=>e.toJSON()),floors:this.floors.map(e=>e.id)}}destroy(){for(let e of Object.keys(c(this,xr)))delete c(this,xr)[e]}};da=new WeakMap,xr=new WeakMap,Sr=new WeakMap,l(Wn,"Connection"),v(Wn,"__type","connection");var ld=Wn,ti=ld;d();var fa,_i,ei,Pr,Un=class Un extends Dt{constructor(e,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",Un.__type);P(this,fa,void 0);P(this,_i,void 0);P(this,ei,{});P(this,Pr,void 0);E(this,fa,e),E(this,_i,i.floorId),E(this,Pr,i.mvfData)}static is(e){return e.__type===Un.__type}get name(){var e,i;return(i=(e=c(this,Pr).properties.details)==null?void 0:e.name)!=null?i:""}get description(){var e,i;return(i=(e=c(this,Pr).properties.details)==null?void 0:e.description)!=null?i:""}get images(){var e,i;return(i=(e=c(this,Pr).properties.details)==null?void 0:e.images)!=null?i:[]}get type(){let e=c(this,Pr).properties.kind;return e==null&&(e="object"),e==="Desks"&&(e="desk"),e.toLowerCase()}get floor(){let e=c(this,fa).getById("floor",c(this,_i));if(e==null)throw new Error(`Floor ${c(this,_i)} not found!`);return e}get center(){var e;if(c(this,ei).center==null){let[i,n]=(e=c(this,Pr).properties.center)!=null?e:[0,0];c(this,ei).center=new tt(n,i,c(this,_i))}return c(this,ei).center}toJSON(){return{id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let e of globalThis.Object.keys(c(this,ei)))c(this,ei)[e]=null}};fa=new WeakMap,_i=new WeakMap,ei=new WeakMap,Pr=new WeakMap,l(Un,"MapObject"),v(Un,"__type","object");var ud=Un,Oe=ud;d();d();var ya,Zn,ma=class ma extends Ti{constructor(e){super(String(Q()));P(this,ya,{});P(this,Zn,void 0);E(this,Zn,e.mvfData)}static is(e){return e.__type===ma.__type}get url(){return c(this,Zn).url}get name(){return c(this,Zn).altText}toJSON(){return{id:this.id,url:this.url,name:this.name}}destroy(){for(let e of globalThis.Object.keys(c(this,ya)))delete c(this,ya)[e]}};ya=new WeakMap,Zn=new WeakMap,l(ma,"Image"),v(ma,"__type","image");var cd=ma,yu=cd;var ga,Oi,Ae,ri,zn=class zn extends Dt{constructor(e,i){super(i.mvfData.properties.id,i.mvfData.properties.details);v(this,"__type",zn.__type);P(this,ga,void 0);P(this,Oi,void 0);P(this,Ae,{});P(this,ri,void 0);E(this,ga,e),E(this,ri,i.mvfData),E(this,Oi,i.floorId)}static is(e){return e.__type===zn.__type}get name(){var e,i;return(i=(e=c(this,ri).properties.details)==null?void 0:e.name)!=null?i:""}get description(){var e,i;return(i=(e=c(this,ri).properties.details)==null?void 0:e.description)!=null?i:""}get images(){var e,i;if(c(this,Ae).images==null){let n=(i=(e=c(this,ri).properties.details)==null?void 0:e.images)!=null?i:[];c(this,Ae).images=n.map(o=>new yu({mvfData:o}))}return c(this,Ae).images}get floor(){let e=c(this,ga).getById("floor",c(this,Oi));if(e==null)throw new Error(`Floor ${c(this,Oi)} not found!`);return e}get coordinate(){var e;if(c(this,Ae).coordinate==null){let[i,n]=(e=c(this,ri).geometry.coordinates)!=null?e:[0,0];c(this,Ae).coordinate=new tt(n,i,c(this,Oi))}return c(this,Ae).coordinate}toJSON(){return{id:this.id,name:this.name,floor:this.floor.id,coordinate:this.coordinate.toJSON()}}destroy(){for(let e in c(this,Ae))c(this,Ae)[e]=null}};ga=new WeakMap,Oi=new WeakMap,Ae=new WeakMap,ri=new WeakMap,l(zn,"PointOfInterest"),v(zn,"__type","point-of-interest");var pd=zn,Qr=pd;d();var va,Ai,ii,$n,ba,dd,qn=class qn extends Dt{constructor(e,i){super(i.mvfData.properties.id);P(this,ba);v(this,"__type",qn.__type);P(this,va,void 0);P(this,Ai,void 0);P(this,ii,{});P(this,$n,void 0);E(this,va,e),E(this,Ai,i.floorId),E(this,$n,i.mvfData)}static is(e){return e.__type===qn.__type}get group(){return X(this,ba,dd).call(this).group}get type(){return X(this,ba,dd).call(this).type}get coordinate(){if(c(this,ii).coordinate==null){let[e,i]=c(this,$n).geometry.coordinates;c(this,ii).coordinate=new tt(i,e,c(this,Ai))}return c(this,ii).coordinate}get floor(){let e=c(this,va).getById("floor",c(this,Ai));if(e==null)throw new Error(`Floor ${c(this,Ai)} not found!`);return e}toJSON(){return{id:this.id,group:this.group,type:this.type,coordinate:this.coordinate.toJSON()}}destroy(){for(let e of Object.keys(c(this,ii)))delete c(this,ii)[e]}};va=new WeakMap,Ai=new WeakMap,ii=new WeakMap,$n=new WeakMap,ba=new WeakSet,dd=l(function(){let[e,i]=c(this,$n).properties.symbolId.split("--");return{group:e,type:i}},"#getGroupAndTypeFromSymbolId"),l(qn,"Annotation"),v(qn,"__type","annotation");var hd=qn,Yn=hd;d();d();var Kn,ke,ki,Qn,Jn=class Jn extends Dt{constructor(e,i){super(i.mvfData.properties.id);v(this,"__type",Jn.__type);P(this,Kn,void 0);P(this,ke,{});P(this,ki,void 0);P(this,Qn,void 0);E(this,Kn,e),E(this,ki,i.floorId),E(this,Qn,i.mvfData)}static is(e){return e.__type===Jn.__type}get floor(){let e=c(this,Kn).getById("floor",c(this,ki));if(e==null)throw new Error(`Floor ${c(this,ki)} not found!`);return e}get coordinate(){if(c(this,ke).coordinate==null){let[e,i]=c(this,Qn).geometry.coordinates;c(this,ke).coordinate=new tt(i,e,c(this,ki))}return c(this,ke).coordinate}get neighbors(){if(c(this,ke).neighbours==null){let e=c(this,Qn).properties.neighbors.map(i=>{let n=c(this,Kn).getById("node",i.id);if(n==null)throw new Error(`Node ${i.id} not found!`);return n});c(this,ke).neighbours=e}return c(this,ke).neighbours}toJSON(){return{id:this.id,floor:this.floor.id,coordinate:this.coordinate.toJSON(),neighbors:this.neighbors.map(e=>e.id)}}destroy(){for(let e of Object.keys(c(this,ke)))delete c(this,ke)[e]}};Kn=new WeakMap,ke=new WeakMap,ki=new WeakMap,Qn=new WeakMap,l(Jn,"Node"),v(Jn,"__type","node");var fd=Jn,m3=fd;var L9=l((r,t)=>{var m,y;let e={},i={},n={},o={},a={},u={},s={},p={},f=globalThis.Object.keys(r.space);for(let x of f){let S=r.space[x];if(S!=null)for(let M of S.features){p[M.properties.id]=x,a[M.properties.id]=M;for(let g of M.properties.destinationNodes)n[g]==null&&(n[g]=[]),n[g].push(M.properties.id);if(M.properties.kind==="desk-entrance"&&(o[M.properties.externalId]==null&&(o[M.properties.externalId]=[]),o[M.properties.externalId].push(...M.properties.destinationNodes)),!["void","desk-entrance"].includes((m=M.properties.kind)!=null?m:"")){if((y=M.properties.kind)!=null&&y.includes("connection")){let g=`${M.geometry.coordinates[1]}-${M.geometry.coordinates[0]}`;u[g]==null&&(u[g]=[]),u[g].push(M.properties.id);continue}if(M.properties.kind==="poi"){let g=new Qr(t,{floorId:x,mvfData:M});i[M.properties.id]=g}else{let g=new _e(t,{floorId:x,mvfData:M});e[M.properties.id]=g}}}}for(let x in u){let S=u[x],M={};for(let C of S){let I=p[C],T=a[C];M[I]=T}let g=new ti(t,{mvfDataByFloorId:M});s[g.id]=g}return{spacesById:e,poisById:i,connectionsById:s,spaceIdsByDestinationNodeId:n,objectEntranceNodeIdsByObstructionId:o,mvfSpacesById:a,connectionIdsByLatLon:u}},"processMVFSpaces"),D9=l((r,t)=>{let e={},i={};for(let n of r["node.geojson"].features){i[n.properties.id]=n;let o=new m3(t,{mvfData:n,floorId:n.properties.map});e[n.properties.id]=o}return{nodesById:e,mvfNodesById:i}},"processMVFNodes"),_9=l((r,t)=>{let e={},i={},n={},o=globalThis.Object.keys(r.obstruction);for(let a of o){let u=r.obstruction[a];if(u!=null)for(let s of u.features){i[s.properties.id]=s;for(let f of s.properties.entrances)n[f]=s.properties.id;if(s.properties.kind==="Wall")continue;let p=new Oe(t,{floorId:a,mvfData:s});e[s.properties.id]=p}}return{objectsById:e,mvfObstructionById:i,obstructionIdByEntranceId:n}},"processMVFObstructions"),O9=l((r,t)=>{let e={},i={};for(let n of r["map.geojson"]){i[n.id]=n;let o=new Kr(t,{mvfData:n});e[n.id]=o}return{floorsById:e,mvfMapsById:i}},"processMVFMaps"),A9=l((r,t)=>{let e={},i=r["connection.json"].reduce((n,o)=>(o.nodes.forEach(a=>n[a]=o),e[o.id]=o,n),{});return{mvfConnectionsById:e,mvfConnectionsByNodeId:i}},"processMVFConnections"),k9=l((r,t)=>{let e={},i={},n=globalThis.Object.keys(r.entrance);for(let o of n){let a=r.entrance[o];if(a!=null)for(let u of a.features){i[u.properties.id]=u;let s=new $r(t,{floorId:o,mvfData:u});e[u.properties.id]=s}}return{doorsById:e,mvfEntrancesById:i}},"processMVFEntrances"),N9=l((r,t)=>{let e={},i={};if(r.annotation==null)return{annotationsById:e,mvfAnnotationsById:i};let n=globalThis.Object.keys(r.annotation);for(let o of n){let a=r.annotation[o];if(a!=null)for(let u of a.features){i[u.properties.id]=u;let s=new Yn(t,{floorId:o,mvfData:u});e[u.properties.id]=s}}return{annotationsById:e,mvfAnnotationsById:i}},"processMVFAnnotations"),y3=l((r,t)=>{let{spacesById:e,spaceIdsByDestinationNodeId:i,poisById:n,mvfSpacesById:o,objectEntranceNodeIdsByObstructionId:a,connectionsById:u,connectionIdsByLatLon:s}=L9(r,t),{nodesById:p,mvfNodesById:f}=D9(r,t),{objectsById:m,mvfObstructionById:y,obstructionIdByEntranceId:x}=_9(r,t),{floorsById:S,mvfMapsById:M}=O9(r,t),{mvfConnectionsById:g,mvfConnectionsByNodeId:C}=A9(r,t),{doorsById:I,mvfEntrancesById:T}=k9(r,t),{annotationsById:w,mvfAnnotationsById:L}=N9(r,t);return{spacesById:e,nodesById:p,objectsById:m,floorsById:S,connectionsById:u,doorsById:I,poisById:n,annotationsById:w,spaceIdsByDestinationNodeId:i,objectEntranceNodeIdsByObstructionId:a,obstructionIdByEntranceId:x,connectionIdsByLatLon:s,mvfSpacesById:o,mvfNodesById:f,mvfObstructionById:y,mvfMapsById:M,mvfConnectionsById:g,mvfConnectionsByNodeId:C,mvfEntrancesById:T,mvfAnnotationsById:L}},"createDataFromMVF");var at,Ni,Ri,Bi,Fi,Gi,Vi,Hi,Xi,Ca,xa,Sa,Pa,Ma,wa,Ta,Ia,md=class md{constructor(t,e){P(this,at,{});v(this,"mvf");v(this,"outdoorViewToken");v(this,"spaceIdsByDestinationNodeId");v(this,"objectEntranceNodeIdsByObstructionId");v(this,"obstructionIdByEntranceId");P(this,Ni,void 0);P(this,Ri,void 0);P(this,Bi,void 0);P(this,Fi,void 0);P(this,Gi,void 0);P(this,Vi,void 0);P(this,Hi,void 0);P(this,Xi,void 0);P(this,Ca,void 0);P(this,xa,void 0);P(this,Sa,void 0);P(this,Pa,void 0);P(this,Ma,void 0);P(this,wa,void 0);P(this,Ta,void 0);P(this,Ia,void 0);this.mvf=t,this.outdoorViewToken=e;let i=y3(t,this);E(this,Ni,i.nodesById),E(this,Ri,i.spacesById),E(this,Bi,i.floorsById),E(this,Fi,i.connectionsById),E(this,Gi,i.objectsById),E(this,Vi,i.doorsById),E(this,Hi,i.poisById),E(this,Xi,i.annotationsById),E(this,Ca,i.mvfAnnotationsById),E(this,xa,i.mvfConnectionsById),E(this,Sa,i.mvfConnectionsByNodeId),E(this,Pa,i.mvfEntrancesById),E(this,Ma,i.mvfNodesById),E(this,wa,i.mvfObstructionById),E(this,Ta,i.mvfSpacesById),E(this,Ia,i.mvfMapsById),this.spaceIdsByDestinationNodeId=i.spaceIdsByDestinationNodeId,this.objectEntranceNodeIdsByObstructionId=i.objectEntranceNodeIdsByObstructionId,this.obstructionIdByEntranceId=i.obstructionIdByEntranceId}get mapName(){return this.mvf["manifest.geojson"].features[0].properties.name}get organizationId(){var t;return(t=this.mvf["manifest.geojson"].features[0].properties.org_id)!=null?t:""}get mapCenter(){return new tt(this.mvf["manifest.geojson"].features[0].geometry.coordinates[1],this.mvf["manifest.geojson"].features[0].geometry.coordinates[0])}get spaces(){return c(this,at).spaces==null&&(c(this,at).spaces=globalThis.Object.values(c(this,Ri))),c(this,at).spaces}get objects(){return c(this,at).objects==null&&(c(this,at).objects=globalThis.Object.values(c(this,Gi))),c(this,at).objects}get connections(){return c(this,at).connections==null&&(c(this,at).connections=globalThis.Object.values(c(this,Fi))),c(this,at).connections}get floors(){return c(this,at).floors==null&&(c(this,at).floors=globalThis.Object.values(c(this,Bi))),c(this,at).floors}get doors(){return c(this,at).doors==null&&(c(this,at).doors=globalThis.Object.values(c(this,Vi))),c(this,at).doors}get pointsOfInterest(){return c(this,at).pointsOfInterest==null&&(c(this,at).pointsOfInterest=globalThis.Object.values(c(this,Hi))),c(this,at).pointsOfInterest}get annotations(){return c(this,at).annotations==null&&(c(this,at).annotations=globalThis.Object.values(c(this,Xi))),c(this,at).annotations}get nodes(){return c(this,at).nodes==null&&(c(this,at).nodes=globalThis.Object.values(c(this,Ni))),c(this,at).nodes}getById(t,e){switch(t){case"space":return c(this,Ri)[e];case"floor":return c(this,Bi)[e];case"node":return c(this,Ni)[e];case"door":return c(this,Vi)[e];case"connection":return c(this,Fi)[e];case"object":return c(this,Gi)[e];case"point-of-interest":return c(this,Hi)[e];case"annotation":return c(this,Xi)[e];default:throw new Error(`Unknown type: ${t}`)}}getMapDataById(t){var e,i,n,o,a,u,s;return(s=(u=(a=(o=(n=(i=(e=c(this,Ri)[t])!=null?e:c(this,Bi)[t])!=null?i:c(this,Ni)[t])!=null?n:c(this,Vi)[t])!=null?o:c(this,Fi)[t])!=null?a:c(this,Gi)[t])!=null?u:c(this,Hi)[t])!=null?s:c(this,Xi)[t]}getMVFFeatureById(t,e){switch(t){case"space":return c(this,Ta)[e];case"node":return c(this,Ma)[e];case"obstruction":return c(this,wa)[e];case"map":return c(this,Ia)[e];case"connection":return c(this,xa)[e];case"entrance":return c(this,Pa)[e];case"annotation":return c(this,Ca)[e];default:throw new Error(`Unknown MVF feature type: ${t}`)}}getMVFFeatureByNodeId(t,e){switch(t){case"connection":return c(this,Sa)[e];default:throw new Error(`Unsupported MVF feature type: ${t}`)}}destroy(){for(let t of globalThis.Object.keys(c(this,at)))c(this,at)[t]=null}};at=new WeakMap,Ni=new WeakMap,Ri=new WeakMap,Bi=new WeakMap,Fi=new WeakMap,Gi=new WeakMap,Vi=new WeakMap,Hi=new WeakMap,Xi=new WeakMap,Ca=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Pa=new WeakMap,Ma=new WeakMap,wa=new WeakMap,Ta=new WeakMap,Ia=new WeakMap,l(md,"MapDataInternal");var to=md;d();d();d();d();var yd=class yd{_subscribers={};publish(t,e){!this._subscribers||!this._subscribers[t]||this._subscribers[t].forEach(function(i){typeof i=="function"&&i(e)})}on(t,e){this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(e)}off(t,e){if(!this._subscribers||this._subscribers[t]==null)return;let i=this._subscribers[t].indexOf(e);i!==-1&&this._subscribers[t].splice(i,1)}destroy(){this._subscribers={}}};l(yd,"PubSub");var J=yd;d();var g3="mi-session-data",v3="mi-local-data",ji,Ne,Re,Ea=class Ea{constructor(){P(this,Ne,void 0);P(this,Re,void 0);try{let t=sessionStorage.getItem(g3);t?E(this,Ne,JSON.parse(t)):E(this,Ne,{id:Q()})}catch{E(this,Ne,{id:Q()})}try{let t=localStorage.getItem(v3);t?E(this,Re,JSON.parse(t)):E(this,Re,{deviceId:Q()})}catch{E(this,Re,{deviceId:Q()})}c(this,Ne).id||(c(this,Ne).id=Q()),c(this,Re).deviceId||(c(this,Re).deviceId=Q())}static getInstance(){return c(this,ji)||E(this,ji,new Ea),c(this,ji)}static ___clearInstance(){E(this,ji,void 0)}saveSessionData(t,e){c(this,Ne)[t]=e;try{return sessionStorage.setItem(g3,JSON.stringify(c(this,Ne))),!0}catch{return!1}}loadSessionData(t){let e=c(this,Ne)[t];if(e!=null)return e}saveLocalData(t,e){c(this,Re)[t]=e;try{return localStorage.setItem(v3,JSON.stringify(c(this,Re))),!0}catch{return!1}}loadLocalData(t){let e=c(this,Re)[t];if(e!=null)return e}};ji=new WeakMap,Ne=new WeakMap,Re=new WeakMap,l(Ea,"SafeStorage"),P(Ea,ji,void 0);var eo=Ea;d();d();d();d();var ro=class ro{id;text;__type=ro.__type;static is(t){return t.__type===ro.__type}constructor(t,e){this.id=t,this.text=e}};l(ro,"Label"),v(ro,"__type","Label");var ni=ro;d();var io=class io{id;__type=io.__type;contentEl;static is(t){return t.__type===io.__type}constructor(t,e){this.id=t,this.contentEl=e}};l(io,"Marker"),v(io,"__type","Marker");var Yi=io;d();var no=class no{id;groupId;__type=no.__type;static is(t){return t.__type===no.__type}constructor(t,e){this.id=t,this.groupId=e}};l(no,"Model"),v(no,"__type","Model");var La=no;d();var gd=class gd{id;__type;constructor(t){this.id=t,this.__type="Path"}};l(gd,"Path");var Da=gd;d();var oi,vd=class vd{constructor(t){P(this,oi,void 0);E(this,oi,t)}get center(){return c(this,oi).center}get bearing(){return c(this,oi).bearing}get pitch(){return c(this,oi).pitch}get zoomLevel(){return c(this,oi).zoomLevel}};oi=new WeakMap,l(vd,"CameraTransform");var _a=vd;d();var oo=class oo{id;__type=oo.__type;static is(t){return t.__type===oo.__type}constructor(t){this.id=t}};l(oo,"CustomGeometry"),v(oo,"__type","CustomGeometry");var Oa=oo;d();d();d();var R9=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
|
|
5
|
-
<path
|
|
6
|
-
fillRule="evenodd"
|
|
7
|
-
clipRule="evenodd"
|
|
8
|
-
d="M1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7C13 8.29583 12.5892 9.49572 11.8907 10.4765L15.4614 14.0472C15.6567 14.2425 15.6567 14.559 15.4614 14.7543L14.7543 15.4614C14.559 15.6567 14.2424 15.6567 14.0472 15.4614L10.4765 11.8907C9.49571 12.5892 8.29583 13 7 13C3.68629 13 1 10.3137 1 7ZM7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3C9.20914 3 11 4.79086 11 7C11 9.20914 9.20914 11 7 11Z"
|
|
9
|
-
stroke="none"
|
|
10
|
-
/>
|
|
11
|
-
</svg>`],["close-16x16",`<svg viewBox="0 0 16 16">
|
|
12
|
-
<path
|
|
13
|
-
d="M12.5963 1.98959C12.7916 1.79433 13.1082 1.79433 13.3034 1.98959L14.0105 2.6967C14.2058 2.89196 14.2058 3.20855 14.0105 3.40381L3.40392 14.0104C3.20866 14.2057 2.89208 14.2057 2.69682 14.0104L1.98971 13.3033C1.79445 13.108 1.79445 12.7915 1.98971 12.5962L12.5963 1.98959Z"
|
|
14
|
-
stroke="none"
|
|
15
|
-
/>
|
|
16
|
-
<path
|
|
17
|
-
d="M1.98971 3.40381C1.79445 3.20855 1.79445 2.89196 1.98971 2.6967L2.69682 1.98959C2.89208 1.79433 3.20866 1.79433 3.40392 1.98959L14.0105 12.5962C14.2058 12.7915 14.2058 13.108 14.0105 13.3033L13.3034 14.0104C13.1082 14.2057 12.7916 14.2057 12.5963 14.0104L1.98971 3.40381Z"
|
|
18
|
-
stroke="none"
|
|
19
|
-
/>
|
|
20
|
-
</svg>`],["empty-64x40",`<svg viewBox="0 0 64 40">
|
|
21
|
-
<g>
|
|
22
|
-
<g clipPath="url(#clip0_499_175492)">
|
|
23
|
-
<path
|
|
24
|
-
d="M32 39.7032C49.6731 39.7032 64 36.5925 64 32.7552C64 28.9179 49.6731 25.8071 32 25.8071C14.3269 25.8071 0 28.9179 0 32.7552C0 36.5925 14.3269 39.7032 32 39.7032Z"
|
|
25
|
-
stroke="none"
|
|
26
|
-
fill="#F5F5F5"
|
|
27
|
-
/>
|
|
28
|
-
<path
|
|
29
|
-
d="M55 13.6653L44.854 2.24866C44.367 1.47048 43.656 1 42.907 1H21.093C20.344 1 19.633 1.47048 19.146 2.24767L9 13.6663V22.8367H55V13.6653Z"
|
|
30
|
-
fill="none"
|
|
31
|
-
/>
|
|
32
|
-
<path
|
|
33
|
-
d="M41.613 16.8128C41.613 15.2197 42.607 13.9046 43.84 13.9036H55V31.9059C55 34.0132 53.68 35.7402 52.05 35.7402H11.95C10.32 35.7402 9 34.0122 9 31.9059V13.9036H20.16C21.393 13.9036 22.387 15.2167 22.387 16.8098V16.8317C22.387 18.4248 23.392 19.7111 24.624 19.7111H39.376C40.608 19.7111 41.613 18.4128 41.613 16.8198V16.8128Z"
|
|
34
|
-
fill="#FAFAFA"
|
|
35
|
-
/>
|
|
36
|
-
</g>
|
|
37
|
-
<defs>
|
|
38
|
-
<clipPath id="clip0_499_175492">
|
|
39
|
-
<rect width="64" height="40" fill="white" />
|
|
40
|
-
</clipPath>
|
|
41
|
-
</defs>
|
|
42
|
-
</g>
|
|
43
|
-
</svg>`],["caret-12x12",`<svg viewBox="0 0 12 12">
|
|
44
|
-
<path
|
|
45
|
-
stroke="none"
|
|
46
|
-
d="M8.38828 5.78337L3.92578 1.93493C3.75938 1.79196 3.51562 1.92087 3.51562 2.15173V9.84861C3.51562 10.0795 3.75938 10.2084 3.92578 10.0654L8.38828 6.21696C8.51602 6.10681 8.51602 5.89353 8.38828 5.78337Z"
|
|
47
|
-
/>
|
|
48
|
-
</svg>`],["plus-16x16",`<svg viewBox="0 0 16 16">
|
|
49
|
-
<path
|
|
50
|
-
d="M7.5 1C7.22386 1 7 1.22386 7 1.5V7H1.5C1.22386 7 1 7.22386 1 7.5L1 8.5C1 8.77614 1.22386 9 1.5 9H7V14.5C7 14.7761 7.22386 15 7.5 15H8.5C8.77614 15 9 14.7761 9 14.5V9H14.5C14.7761 9 15 8.77614 15 8.5V7.5C15 7.22386 14.7761 7 14.5 7H9V1.5C9 1.22386 8.77614 1 8.5 1H7.5Z"
|
|
51
|
-
stroke="none"
|
|
52
|
-
/>
|
|
53
|
-
</svg>`],["recenter-16x16",`<svg viewBox="0 0 16 16">
|
|
54
|
-
<g stroke="none">
|
|
55
|
-
<path d="M0 2.5C0 2.22386 0.223858 2 0.5 2H1.5C1.77614 2 2 2.22386 2 2.5V13.5C2 13.7761 1.77614 14 1.5 14H0.5C0.223858 14 0 13.7761 0 13.5V2.5Z" />
|
|
56
|
-
<path
|
|
57
|
-
fillRule="evenodd"
|
|
58
|
-
clipRule="evenodd"
|
|
59
|
-
d="M4.5 4C4.22386 4 4 4.22386 4 4.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5ZM6 6V10H10V6H6Z"
|
|
60
|
-
/>
|
|
61
|
-
<path d="M14.5 2C14.2239 2 14 2.22386 14 2.5V13.5C14 13.7761 14.2239 14 14.5 14H15.5C15.7761 14 16 13.7761 16 13.5V2.5C16 2.22386 15.7761 2 15.5 2H14.5Z" />
|
|
62
|
-
</g>
|
|
63
|
-
</svg>`],["minus-16x16",`<svg viewBox="0 0 16 16">
|
|
64
|
-
<path
|
|
65
|
-
d="M1.5 9C1.22386 9 1 8.77614 1 8.5L1 7.5C1 7.22386 1.22386 7 1.5 7L14.5 7C14.7761 7 15 7.22386 15 7.5V8.5C15 8.77614 14.7761 9 14.5 9L1.5 9Z"
|
|
66
|
-
stroke="none"
|
|
67
|
-
/>
|
|
68
|
-
</svg>`],["logo-horizontal-206x48",`<svg viewBox="0 0 206 48">
|
|
69
|
-
<path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z" />
|
|
70
|
-
<path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z" />
|
|
71
|
-
<path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z" />
|
|
72
|
-
<path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z" />
|
|
73
|
-
</svg>`],["share-16x16",`<svg viewBox="0 0 16 16">
|
|
74
|
-
<path
|
|
75
|
-
fillRule="evenodd"
|
|
76
|
-
clipRule="evenodd"
|
|
77
|
-
d="M13 6C14.6569 6 16 4.65685 16 3C16 1.34315 14.6569 0 13 0C11.3431 0 10 1.34315 10 3C10 3.13463 10.0089 3.26719 10.0261 3.39712L6.82972 5.17286C6.10576 4.44825 5.10523 4 4 4C1.79086 4 0 5.79086 0 8C0 10.2091 1.79086 12 4 12C5.10523 12 6.10576 11.5518 6.82972 10.8271L10.0261 12.6029C10.0089 12.7328 10 12.8654 10 13C10 14.6569 11.3431 16 13 16C14.6569 16 16 14.6569 16 13C16 11.3431 14.6569 10 13 10C12.2011 10 11.4752 10.3123 10.9376 10.8214L7.84579 9.1037C7.94622 8.75313 8 8.38284 8 8C8 7.61716 7.94622 7.24687 7.84579 6.8963L10.9376 5.17864C11.4752 5.68775 12.2011 6 13 6ZM13 4C13.5523 4 14 3.55228 14 3C14 2.44772 13.5523 2 13 2C12.4477 2 12 2.44772 12 3C12 3.55228 12.4477 4 13 4ZM4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10ZM14 13C14 13.5523 13.5523 14 13 14C12.4477 14 12 13.5523 12 13C12 12.4477 12.4477 12 13 12C13.5523 12 14 12.4477 14 13Z"
|
|
78
|
-
stroke="none"
|
|
79
|
-
/>
|
|
80
|
-
</svg>`],["checkmark-16x16",`<svg viewBox="0 0 16 16">
|
|
81
|
-
<path
|
|
82
|
-
fillRule="evenodd"
|
|
83
|
-
clipRule="evenodd"
|
|
84
|
-
d="M15.387 3.31662C15.6008 3.49148 15.6323 3.80649 15.4574 4.02021L6.77402 14.6332C6.58509 14.8642 6.30292 14.9986 6.00457 15C5.70622 15.0013 5.42285 14.8694 5.23184 14.6402L0.551937 9.02429C0.375155 8.81215 0.403817 8.49687 0.615956 8.32009L1.38418 7.67991C1.59632 7.50312 1.9116 7.53179 2.08838 7.74392L5.99299 12.4295L13.9095 2.75374C14.0844 2.54002 14.3994 2.50852 14.6131 2.68338L15.387 3.31662Z"
|
|
85
|
-
stroke="none"
|
|
86
|
-
/>
|
|
87
|
-
</svg>`],["arrow-right-16x16",`<svg viewBox="0 0 16 16">
|
|
88
|
-
<path
|
|
89
|
-
fillRule="evenodd"
|
|
90
|
-
clipRule="evenodd"
|
|
91
|
-
d="M8.35355 1.64645C8.54881 1.45118 8.8654 1.45118 9.06066 1.64645L14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L9.06066 14.3536C8.8654 14.5488 8.54882 14.5488 8.35355 14.3536L7.64645 13.6464C7.45118 13.4512 7.45118 13.1346 7.64645 12.9393L11.5858 9H0.5C0.223858 9 0 8.77614 0 8.5V7.5C0 7.22386 0.223858 7 0.5 7H11.5858L7.64645 3.06066C7.45118 2.8654 7.45118 2.54882 7.64645 2.35355L8.35355 1.64645Z"
|
|
92
|
-
stroke="none"
|
|
93
|
-
/>
|
|
94
|
-
</svg>`],["arrow-up-16x16",`<svg viewBox="0 0 16 16">
|
|
95
|
-
<path
|
|
96
|
-
fillRule="evenodd"
|
|
97
|
-
clipRule="evenodd"
|
|
98
|
-
d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"
|
|
99
|
-
stroke="none"
|
|
100
|
-
/>
|
|
101
|
-
</svg>`],["connection-stairs-16x16",`<svg viewBox="0 0 16 16">
|
|
102
|
-
<g stroke="none">
|
|
103
|
-
<path d="M1 11.5C1 11.2239 1.22386 11 1.5 11H6V13.5C6 13.7761 5.77614 14 5.5 14H1.5C1.22386 14 1 13.7761 1 13.5V11.5Z" />
|
|
104
|
-
<path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />
|
|
105
|
-
<path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />
|
|
106
|
-
<path d="M10 2.5C10 2.22386 10.2239 2 10.5 2H14.5C14.7761 2 15 2.22386 15 2.5V4.5C15 4.77614 14.7761 5 14.5 5H10V2.5Z" />
|
|
107
|
-
</g>
|
|
108
|
-
</svg>`],["connection-stairs-14x14",`<svg viewBox="0 0 14 14">
|
|
109
|
-
<path
|
|
110
|
-
d="M5.25 12H2.5C2.225 12 2 11.7429 2 11.4286C2 11.1143 2.225 10.8571 2.5 10.8571H4.25V7.91429H6.5V4.94286H8.75V2H11.5C11.775 2 12 2.25714 12 2.57143C12 2.88571 11.775 3.14286 11.5 3.14286H9.75V6.08571H7.5V9.02857H5.25V12Z"
|
|
111
|
-
stroke="none"
|
|
112
|
-
/>
|
|
113
|
-
</svg>`],["connection-stairs-12x12",`<svg viewBox="0 0 12 12" stroke="none">
|
|
114
|
-
<path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />
|
|
115
|
-
<path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />
|
|
116
|
-
<path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />
|
|
117
|
-
<path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />
|
|
118
|
-
</svg>`],["connection-escalator-16x16",`<svg viewBox="0 0 16 16">
|
|
119
|
-
<g stroke="none">
|
|
120
|
-
<path d="M3.63008 12H2C0.895431 12 0 12.8954 0 14C0 15.1046 0.89543 16 2 16H4.63008C4.86879 16 5.09962 15.9146 5.28087 15.7593L11.7191 10.2407C11.9004 10.0854 12.1312 10 12.3699 10H14C15.1046 10 16 9.10457 16 8C16 6.89543 15.1046 6 14 6H11.3699C11.1312 6 10.9004 6.08539 10.7191 6.24074L4.28087 11.7593C4.09962 11.9146 3.86879 12 3.63008 12Z" />
|
|
121
|
-
<path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />
|
|
122
|
-
<path d="M9 2C9 3.10457 8.10457 4 7 4C5.89543 4 5 3.10457 5 2C5 0.89543 5.89543 0 7 0C8.10457 0 9 0.89543 9 2Z" />
|
|
123
|
-
</g>
|
|
124
|
-
</svg>`],["connection-escalator-14x14",`<svg viewBox="0 0 14 14">
|
|
125
|
-
<path
|
|
126
|
-
d="M5.26686 2.98522C5.26686 2.44335 5.71573 2 6.26436 2C6.81299 2 7.26187 2.44335 7.26187 2.98522C7.26187 3.5271 6.81299 3.97045 6.26436 3.97045C5.71573 3.97045 5.26686 3.50246 5.26686 2.98522Z"
|
|
127
|
-
stroke="none"
|
|
128
|
-
/>
|
|
129
|
-
<path
|
|
130
|
-
d="M7.26188 5.48588V5.25125C7.26188 4.85716 6.91275 4.53696 6.48881 4.53696H6.03993C5.61599 4.53696 5.26687 4.88179 5.26687 5.25125V7.66458L4.3192 8.6995H3.67082C2.74813 8.6995 2 9.43842 2 10.3498C2 11.2611 2.74813 12 3.67082 12H4.61845C5.36658 12 6.11471 11.6798 6.61347 11.1133L9.6808 7.76354H10.3292C11.2519 7.76354 12 7.02463 12 6.11329C12 5.20196 11.2519 4.46305 10.3292 4.46305H9.38155C8.60848 4.46305 7.88529 4.78324 7.38653 5.34975L7.26188 5.48588ZM4.61846 11.0148H3.67083C3.29677 11.0148 2.99751 10.7192 2.99751 10.3498C2.99751 9.9803 3.29677 9.68473 3.67083 9.68473H4.61846C4.71821 9.68473 4.81796 9.63547 4.86784 9.56158L8.13467 5.99015C8.45886 5.64532 8.90774 5.44828 9.38155 5.44828H10.3292C10.7032 5.44828 11.0025 5.74384 11.0025 6.1133C11.0025 6.48276 10.7032 6.77833 10.3292 6.77833H9.38155C9.2818 6.77833 9.18205 6.82759 9.13218 6.87685L5.86534 10.4729C5.54115 10.8177 5.09228 11.0148 4.61846 11.0148Z"
|
|
131
|
-
stroke="none"
|
|
132
|
-
/>
|
|
133
|
-
</svg>`],["connection-elevator-16x16",`<svg viewBox="0 0 16 16">
|
|
134
|
-
<g stroke="none">
|
|
135
|
-
<path d="M3 5.5C3 6.32843 2.32843 7 1.5 7C0.671573 7 0 6.32843 0 5.5C0 4.67157 0.671573 4 1.5 4C2.32843 4 3 4.67157 3 5.5Z" />
|
|
136
|
-
<path d="M3 10.5C3 11.3284 2.32843 12 1.5 12C0.671573 12 0 11.3284 0 10.5C0 9.67157 0.671573 9 1.5 9C2.32843 9 3 9.67157 3 10.5Z" />
|
|
137
|
-
<path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />
|
|
138
|
-
<path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />
|
|
139
|
-
</g>
|
|
140
|
-
</svg>`],["connection-elevator-14x14",`<svg viewBox="0 0 14 14">
|
|
141
|
-
<path
|
|
142
|
-
d="M7.476 2H2.72693C1.77095 2 1 2.72464 1 3.62319V10.3768C1 11.2754 1.77095 12 2.72693 12H7.476C8.43198 12 9.20293 11.2754 9.20293 10.3768V3.62319C9.17209 2.72464 8.40114 2 7.476 2ZM7.476 3.15942C7.75354 3.15942 7.96941 3.36232 7.96941 3.62319V10.3768C7.96941 10.6377 7.75354 10.8406 7.476 10.8406H5.71824V3.15942H7.476ZM4.48472 3.15942V10.8406H2.72693C2.44939 10.8406 2.23352 10.6377 2.23352 10.3768V3.62319C2.23352 3.36232 2.44939 3.15942 2.72693 3.15942H4.48472Z"
|
|
143
|
-
stroke="none"
|
|
144
|
-
/>
|
|
145
|
-
<path
|
|
146
|
-
d="M12.4643 6.19064H10.6638C10.4456 6.19064 10.2546 6.06243 10.1728 5.88294C10.0909 5.70346 10.1455 5.47269 10.2819 5.31884L11.1821 4.47269C11.4004 4.26756 11.755 4.26756 11.946 4.47269L12.8462 5.31884C13.0099 5.47269 13.0371 5.67781 12.9553 5.88294C12.8735 6.08807 12.6825 6.19064 12.4643 6.19064Z"
|
|
147
|
-
stroke="none"
|
|
148
|
-
/>
|
|
149
|
-
<path
|
|
150
|
-
d="M11.564 9.65216C11.4276 9.65216 11.2912 9.60088 11.1821 9.49831L10.2819 8.65216C10.1182 8.49831 10.0909 8.29319 10.1728 8.08806C10.2546 7.90857 10.4456 7.78036 10.6638 7.78036H12.4643C12.6825 7.78036 12.8735 7.90857 12.9553 8.08806C13.0371 8.26754 12.9826 8.49831 12.8462 8.65216L11.9459 9.49831C11.8641 9.60088 11.7004 9.65216 11.564 9.65216Z"
|
|
151
|
-
stroke="none"
|
|
152
|
-
/>
|
|
153
|
-
</svg>`],["connection-elevator-12x12",`<svg viewBox="0 0 12 12" stroke="none">
|
|
154
|
-
<circle cx="1.9375" cy="4.4375" r="0.9375" />
|
|
155
|
-
<circle cx="1.9375" cy="7.5625" r="0.9375" />
|
|
156
|
-
<path
|
|
157
|
-
fillRule="evenodd"
|
|
158
|
-
clipRule="evenodd"
|
|
159
|
-
d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"
|
|
160
|
-
/>
|
|
161
|
-
</svg>`],["new-tab-14x14",`<svg viewBox="0 0 14 14">
|
|
162
|
-
<g stroke="none">
|
|
163
|
-
<path d="M2.625 2.625H5.6875C5.92913 2.625 6.125 2.42912 6.125 2.1875V1.3125C6.125 1.07088 5.92913 0.875 5.6875 0.875H1.3125C1.07088 0.875 0.875 1.07088 0.875 1.3125V12.6875C0.875 12.9291 1.07088 13.125 1.3125 13.125H12.6875C12.9291 13.125 13.125 12.9291 13.125 12.6875V8.3125C13.125 8.07088 12.9291 7.875 12.6875 7.875H11.8125C11.5709 7.875 11.375 8.07088 11.375 8.3125V11.375H2.625V2.625Z" />
|
|
164
|
-
<path d="M12.9063 0.875H8.40311C8.20822 0.875 8.11063 1.11062 8.24843 1.24843L9.88124 2.88124L5.8156 6.94688C5.64475 7.11774 5.64475 7.39475 5.8156 7.5656L6.43432 8.18432C6.60517 8.35517 6.88218 8.35517 7.05304 8.18432L11.1187 4.11868L12.7516 5.75157C12.8894 5.88938 13.125 5.79178 13.125 5.59689V1.09375C13.125 0.972938 13.0271 0.875 12.9063 0.875Z" />
|
|
165
|
-
</g>
|
|
166
|
-
</svg>`],["compress-16x16",`<svg viewBox="0 0 16 16">
|
|
167
|
-
<g stroke="none">
|
|
168
|
-
<path
|
|
169
|
-
id="Vector"
|
|
170
|
-
d="M4.67773 10.7154H0.713449C0.556306 10.7154 0.427734 10.844 0.427734 11.0011V11.8583C0.427734 12.0154 0.556306 12.144 0.713449 12.144H3.82059V15.2868C3.82059 15.444 3.94916 15.5725 4.10631 15.5725H4.96345C5.12059 15.5725 5.24916 15.444 5.24916 15.2868V11.2868C5.24916 10.9708 4.99381 10.7154 4.67773 10.7154ZM4.96345 0.429688H4.10631C3.94916 0.429688 3.82059 0.558259 3.82059 0.715402V3.85826H0.713449C0.556306 3.85826 0.427734 3.98683 0.427734 4.14397V5.00112C0.427734 5.15826 0.556306 5.28683 0.713449 5.28683H4.67773C4.99381 5.28683 5.24916 5.03147 5.24916 4.7154V0.715402C5.24916 0.558259 5.12059 0.429688 4.96345 0.429688ZM15.2849 10.7154H11.3206C11.0045 10.7154 10.7492 10.9708 10.7492 11.2868V15.2868C10.7492 15.444 10.8777 15.5725 11.0349 15.5725H11.892C12.0492 15.5725 12.1777 15.444 12.1777 15.2868V12.144H15.2849C15.442 12.144 15.5706 12.0154 15.5706 11.8583V11.0011C15.5706 10.844 15.442 10.7154 15.2849 10.7154ZM15.2849 3.85826H12.1777V0.715402C12.1777 0.558259 12.0492 0.429688 11.892 0.429688H11.0349C10.8777 0.429688 10.7492 0.558259 10.7492 0.715402V4.7154C10.7492 5.03147 11.0045 5.28683 11.3206 5.28683H15.2849C15.442 5.28683 15.5706 5.15826 15.5706 5.00112V4.14397C15.5706 3.98683 15.442 3.85826 15.2849 3.85826Z"
|
|
171
|
-
/>
|
|
172
|
-
</g>
|
|
173
|
-
</svg>`],["washroom-14x14",`<svg viewBox="0 0 14 14" stroke="none">
|
|
174
|
-
<path d="M4.55125 3.09062C4.55125 3.69326 4.07639 4.18176 3.49058 4.18176C2.90525 4.18176 2.43039 3.69326 2.43039 3.09062C2.43039 2.4885 2.90525 2 3.49058 2C4.07639 2 4.55125 2.4885 4.55125 3.09062Z" />
|
|
175
|
-
<path d="M5.1193 5.48047C4.81653 4.83116 4.17252 4.41571 3.47822 4.41571C2.78392 4.41571 2.13986 4.83116 1.83714 5.48047L1.04175 7.22034C0.940664 7.441 1.02893 7.70073 1.24393 7.81791C1.47077 7.90871 1.72324 7.81791 1.82433 7.59725L2.49349 6.15554L2.21587 11.4407C2.20305 11.7263 2.41805 11.9734 2.69567 11.9993C2.97329 12.0124 3.21344 11.7913 3.23859 11.5057L3.4028 8.285H3.567L3.73121 11.5057C3.74403 11.7913 3.97086 11.9993 4.23616 11.9993H4.26131C4.53893 11.9861 4.75343 11.7395 4.74111 11.4407L4.46349 6.15554L5.13265 7.59725C5.20858 7.75298 5.35997 7.85697 5.52418 7.85697C5.5873 7.85697 5.65042 7.84379 5.71354 7.81792C5.92804 7.71393 6.0163 7.44153 5.91572 7.22035L5.1193 5.48047Z" />
|
|
176
|
-
<path d="M12.9582 7.22034L12.1505 5.48047C11.8477 4.83116 11.2037 4.41571 10.5094 4.41571C9.81513 4.41571 9.17107 4.83116 8.86836 5.48047L8.06064 7.22034C7.95955 7.441 8.04782 7.70073 8.26282 7.81791C8.47732 7.9219 8.7298 7.8311 8.84371 7.60993L9.52519 6.12977L9.46207 7.2204L8.57842 8.92184C8.47733 9.11663 8.61638 9.36316 8.83089 9.36316H9.33584L9.22242 11.4668C9.2096 11.7397 9.41177 11.9862 9.68939 11.9994C9.95469 12.0126 10.1943 11.8046 10.2072 11.519L10.3581 9.33723H10.6737L10.7871 11.5058C10.7999 11.7787 11.0144 11.9862 11.2792 11.9862H11.3043C11.5696 11.973 11.7841 11.7396 11.7713 11.4535L11.6579 9.33718H12.1628C12.3773 9.33718 12.5287 9.09066 12.4153 8.89586L11.5317 7.19442L11.4685 6.1038L12.1757 7.5972C12.2516 7.75293 12.403 7.85692 12.5672 7.85692C12.6303 7.85692 12.6934 7.84373 12.7566 7.81786C12.9711 7.70068 13.0593 7.44102 12.9582 7.22034Z" />
|
|
177
|
-
<path d="M11.5696 3.09062C11.5696 3.69326 11.0948 4.18176 10.5094 4.18176C9.92363 4.18176 9.44876 3.69326 9.44876 3.09062C9.44876 2.4885 9.92363 2 10.5094 2C11.0948 2 11.5696 2.4885 11.5696 3.09062Z" />
|
|
178
|
-
<path d="M6.99996 2.00006C6.76031 2.00006 6.57095 2.19485 6.57095 2.44138V11.5575C6.57095 11.804 6.76031 11.9988 6.99996 11.9988C7.2396 11.9988 7.42896 11.804 7.42896 11.5575V2.44138C7.42896 2.19485 7.2396 2.00006 6.99996 2.00006Z" />
|
|
179
|
-
</svg>`],["point-of-interest-12x12",`<svg viewBox="0 0 12 12" stroke="none">
|
|
180
|
-
<path
|
|
181
|
-
stroke="none"
|
|
182
|
-
id="Subtract"
|
|
183
|
-
// Do not change these to fillRule or clipRule, since they need to be rendered as actual SVGs in labels, not React SVGs
|
|
184
|
-
fill-rule="evenodd"
|
|
185
|
-
clip-rule="evenodd"
|
|
186
|
-
d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"
|
|
187
|
-
/>
|
|
188
|
-
</svg>`],["flag-20x20",`<svg viewBox="0 0 20 20" stroke="none">
|
|
189
|
-
<path
|
|
190
|
-
d="M16.9987 4.27111C16.936 5.06715 16.3836 5.93162 15.5238 6.57845C14.7549 7.15682 13.0885 8.04927 10.5434 7.55174C8.32167 7.1164 6.82156 8.02129 6.08085 10.2416L8.24615 17.3998C8.31833 17.6471 8.17711 17.9059 7.9292 17.9813C7.88527 17.9938 7.83976 18 7.79426 18C7.58634 18 7.40277 17.8647 7.34236 17.6673L5.1644 10.4686C5.13773 10.4173 5.12125 10.3613 5.11419 10.3038L3.41956 4.70042C3.38112 4.63512 3.35994 4.56127 3.3568 4.48587L3.02101 3.37886C2.98413 3.25992 2.9959 3.13165 3.05553 3.02203C3.11437 2.91242 3.21479 2.83079 3.33482 2.79504C3.45564 2.75928 3.5851 2.7725 3.69494 2.83235C3.80477 2.89144 3.88637 2.99172 3.92167 3.11143L3.9813 3.31355C4.38847 2.85956 4.90472 2.51439 5.48136 2.30915C6.97201 1.75566 8.95216 1.95467 10.6469 2.83156C11.6888 3.36951 14.3374 4.54493 16.3647 3.79553C16.5154 3.74111 16.684 3.76599 16.8127 3.86239C16.9406 3.95879 17.0105 4.11251 16.9987 4.27111Z"
|
|
191
|
-
stroke="none"
|
|
192
|
-
/>
|
|
193
|
-
</svg>`],["link-16x16",`<svg viewBox="0 0 16 16" stroke="none">
|
|
194
|
-
<path
|
|
195
|
-
d="M9.10678 11.2433C9.07993 11.2167 9.04367 11.2018 9.00589 11.2018C8.9681 11.2018 8.93184 11.2167 8.90499 11.2433L6.82999 13.3183C5.86928 14.279 4.24785 14.3808 3.18714 13.3183C2.12464 12.2558 2.22642 10.6362 3.18714 9.67546L5.26214 7.60046C5.31749 7.5451 5.31749 7.45403 5.26214 7.39868L4.55142 6.68796C4.52457 6.66138 4.48832 6.64646 4.45053 6.64646C4.41274 6.64646 4.37649 6.66138 4.34964 6.68796L2.27464 8.76296C0.763923 10.2737 0.763923 12.7183 2.27464 14.2272C3.78535 15.7362 6.22999 15.738 7.73892 14.2272L9.81392 12.1522C9.86928 12.0969 9.86928 12.0058 9.81392 11.9505L9.10678 11.2433ZM13.7246 2.77903C12.2139 1.26832 9.76928 1.26832 8.26035 2.77903L6.18357 4.85403C6.15698 4.88088 6.14207 4.91714 6.14207 4.95493C6.14207 4.99271 6.15698 5.02897 6.18357 5.05582L6.89249 5.76475C6.94785 5.8201 7.03892 5.8201 7.09428 5.76475L9.16928 3.68975C10.13 2.72903 11.7514 2.62725 12.8121 3.68975C13.8746 4.75225 13.7729 6.37189 12.8121 7.3326L10.7371 9.4076C10.7106 9.43445 10.6956 9.47071 10.6956 9.5085C10.6956 9.54628 10.7106 9.58254 10.7371 9.60939L11.4479 10.3201C11.5032 10.3755 11.5943 10.3755 11.6496 10.3201L13.7246 8.2451C15.2336 6.73439 15.2336 4.28975 13.7246 2.77903ZM9.75142 6.00939C9.72457 5.9828 9.68832 5.96789 9.65053 5.96789C9.61275 5.96789 9.57649 5.9828 9.54964 6.00939L5.50499 10.0522C5.47841 10.0791 5.46349 10.1154 5.46349 10.1531C5.46349 10.1909 5.47841 10.2272 5.50499 10.254L6.21214 10.9612C6.26749 11.0165 6.35857 11.0165 6.41392 10.9612L10.4568 6.91832C10.5121 6.86296 10.5121 6.77189 10.4568 6.71653L9.75142 6.00939Z"
|
|
196
|
-
stroke="none"
|
|
197
|
-
/>
|
|
198
|
-
</svg>`]]),B9=/<svg([^>]*)>/g;function b3(r,t,e){let i=R9.get(r);return i?i.replace(B9,`<svg$1 style="fill:${t}; width:${e}px; height:${e}px">`):""}l(b3,"getStyledIcon");var F9=l(r=>`
|
|
199
|
-
<div class="pin-shadow" style="background: ${r}"></div>
|
|
200
|
-
<svg width="${20*.9}px" height="${48*.9}px" viewBox="0 0 20 48">
|
|
201
|
-
<path
|
|
202
|
-
d="M1.37965 29.3246C1.5778 31.2167 2.27661 33.0694 3.83078 33.775C4.0998 37.1861 4.7451 40.2227 5.65918 42.4784C6.14556 43.6787 6.72883 44.71 7.41453 45.4578C8.10027 46.2056 8.97065 46.7527 9.99989 46.7527C11.0292 46.7527 11.8995 46.2055 12.585 45.4576C13.2706 44.7098 13.8536 43.6785 14.3398 42.4783C15.2536 40.2226 15.8988 37.186 16.1688 33.7752C17.7232 33.0697 18.422 31.2169 18.6201 29.3247C18.8386 27.2385 18.5165 24.6502 17.6475 22.0285L17.6473 22.0278C16.9657 19.9761 16.0319 18.1622 14.9848 16.7474C17.0884 15.1587 18.4471 12.5964 18.4471 9.7152C18.4471 4.93539 14.6967 1 9.99966 1C5.30272 1 1.54993 4.93527 1.54993 9.7152C1.54993 12.5961 2.90839 15.1583 5.01167 16.747C3.9635 18.1625 3.03185 19.977 2.3522 22.0286C1.48319 24.6503 1.16118 27.2385 1.37965 29.3246Z"
|
|
203
|
-
fill={color}
|
|
204
|
-
stroke="white"
|
|
205
|
-
strokeWidth="2"
|
|
206
|
-
/>
|
|
207
|
-
</svg>
|
|
208
|
-
`,"getDeparturePin"),G9=l(r=>`
|
|
209
|
-
<div class="pin-shadow" style="background: ${r}"></div>
|
|
210
|
-
<svg width="36" height="42" viewBox="-2 -2 40 46">
|
|
211
|
-
<path
|
|
212
|
-
d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"
|
|
213
|
-
fill="none"
|
|
214
|
-
stroke="white"
|
|
215
|
-
strokeWidth="4"
|
|
216
|
-
/>
|
|
217
|
-
<path
|
|
218
|
-
d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"
|
|
219
|
-
fill={color}
|
|
220
|
-
/>
|
|
221
|
-
</svg>
|
|
222
|
-
`,"getDestinationPin"),bd="#722ED1",Cd="#1890FF",xd=l(({type:r="departure",destinationColor:t=bd,departureColor:e=Cd})=>`<div class="dropped-pin-wrapper">
|
|
223
|
-
${r==="departure"?F9(e):G9(t)}
|
|
224
|
-
</div>`,"DroppedPin"),V9=l(r=>{switch(r){case"default":return 28;case"selection":return 28;case"navigation":return 32}},"getSize"),C3=l(({type:r="stairs",color:t="#722ED1",direction:e="up"})=>{let i=V9("default"),n=i/2+2;return`<div style="position: relative; width: 56px;" class="mappedin-connection-marker">
|
|
225
|
-
${e!=null?`<div style="position: absolute; top: 0px; left:${i*.9}px; zIndex: -1">
|
|
226
|
-
<div class="bouncey">
|
|
227
|
-
<div class="connection-circle"
|
|
228
|
-
role="button"
|
|
229
|
-
style="background: #595959; width: ${i}px; height: ${i}px;">
|
|
230
|
-
<div class="${e==="up"?"":"arrow--down"}">
|
|
231
|
-
<svg viewBox="0 0 16 16" style="fill: white; width: ${n}px; height: ${n}px">
|
|
232
|
-
<path
|
|
233
|
-
fillRule="evenodd"
|
|
234
|
-
clipRule="evenodd"
|
|
235
|
-
d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"
|
|
236
|
-
stroke="none"
|
|
237
|
-
/>
|
|
238
|
-
</svg>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
</div>`:""}
|
|
243
|
-
<div class="connection-circle"
|
|
244
|
-
role="button"
|
|
245
|
-
style="background:${t}; width:${i}px; height:${i}px;"
|
|
246
|
-
>
|
|
247
|
-
${b3("connection-"+r+"-16x16","white",n)||""}
|
|
248
|
-
</div>
|
|
249
|
-
</div>`},"ConnectionMarker");d();var x3=l(async r=>new Promise(t=>setTimeout(t,r)),"ms");var gu={createMarkers:{departure:!0,destination:!0,connection:!0},pathOptions:{color:"#40A9FF",nearRadius:.25,farRadius:.25*4,displayArrowsOnPath:!1},polygons:{departure:"#40A9FF"}},Mr,wr,Wi,jt,ai,bu,S3,Aa,Sd=class Sd{constructor(t){P(this,bu);P(this,Mr,void 0);P(this,wr,new Map);P(this,Wi,void 0);P(this,jt,void 0);P(this,ai,gu);v(this,"draw",async(t,e={})=>{var u,s,p;if(t.coordinates.length<2){B.warn("Directions must have at least 2 coordinates");return}c(this,Mr)&&this.clear();let i={pathOptions:{...gu.pathOptions,...e.pathOptions},createMarkers:{...gu.createMarkers,...e.createMarkers},polygons:{...gu.polygons,...e.polygons}};E(this,ai,i),E(this,Mr,t);let n=t.coordinates[0],o=t.coordinates[t.coordinates.length-1],a=c(this,jt).getMapData()[Object.keys(c(this,jt).getMapData())[0]];if(n.floorId&&c(this,jt).setFloor(a.getById("floor",n.floorId)),(u=c(this,ai).createMarkers)!=null&&u.departure){let f=c(this,jt).Markers.add(n,xd({type:"departure"}),{anchor:"top",rank:"always-visible"});c(this,wr).set(f,void 0)}if(await x3(500),!!c(this,Mr)&&(E(this,Wi,await c(this,jt).Paths.add(t.coordinates,c(this,ai).pathOptions)),!!c(this,Mr))){if((s=c(this,ai).createMarkers)!=null&&s.destination){let f=c(this,jt).Markers.add(o,xd({type:"destination"}),{anchor:"top",rank:"always-visible"});c(this,wr).set(f,void 0)}(p=c(this,ai).createMarkers)!=null&&p.connection&&(t.instructions.filter(m=>X(this,bu,S3).call(this,m.action)).forEach(m=>{let y=c(this,jt).Markers.add(m.coordinate,C3({type:m.action.connectionType,color:m.action.type==="ExitConnection"?Cd:bd,direction:m.action.direction}),{interactive:!0,anchor:"top",rank:"always-visible"});c(this,wr).set(y,m)}),c(this,jt).on("click",c(this,Aa)))}});P(this,Aa,l(t=>{if(t.markers.length>0){let e=c(this,wr).get(t.markers[0]);e!=null&&e.action.toFloor&&c(this,jt).setFloor(e.action.toFloor)}},"#handleClick"));v(this,"clear",()=>{c(this,Mr)&&(c(this,wr).forEach((t,e)=>{c(this,jt).Markers.remove(e)}),c(this,wr).clear(),c(this,Wi)&&(c(this,jt).Paths.remove(c(this,Wi)),E(this,Wi,void 0)),c(this,jt).off("click",c(this,Aa)),E(this,Mr,void 0))});E(this,jt,t)}};Mr=new WeakMap,wr=new WeakMap,Wi=new WeakMap,jt=new WeakMap,ai=new WeakMap,bu=new WeakSet,S3=l(function(t){return t!=null&&["TakeConnection","ExitConnection"].includes(t.type)},"#isVortexAction"),Aa=new WeakMap,l(Sd,"Navigation");var vu=Sd;d();d();d();var H9=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
|
|
250
|
-
<path
|
|
251
|
-
fillRule="evenodd"
|
|
252
|
-
clipRule="evenodd"
|
|
253
|
-
d="M1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7C13 8.29583 12.5892 9.49572 11.8907 10.4765L15.4614 14.0472C15.6567 14.2425 15.6567 14.559 15.4614 14.7543L14.7543 15.4614C14.559 15.6567 14.2424 15.6567 14.0472 15.4614L10.4765 11.8907C9.49571 12.5892 8.29583 13 7 13C3.68629 13 1 10.3137 1 7ZM7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3C9.20914 3 11 4.79086 11 7C11 9.20914 9.20914 11 7 11Z"
|
|
254
|
-
stroke="none"
|
|
255
|
-
/>
|
|
256
|
-
</svg>`],["close-16x16",`<svg viewBox="0 0 16 16">
|
|
257
|
-
<path
|
|
258
|
-
d="M12.5963 1.98959C12.7916 1.79433 13.1082 1.79433 13.3034 1.98959L14.0105 2.6967C14.2058 2.89196 14.2058 3.20855 14.0105 3.40381L3.40392 14.0104C3.20866 14.2057 2.89208 14.2057 2.69682 14.0104L1.98971 13.3033C1.79445 13.108 1.79445 12.7915 1.98971 12.5962L12.5963 1.98959Z"
|
|
259
|
-
stroke="none"
|
|
260
|
-
/>
|
|
261
|
-
<path
|
|
262
|
-
d="M1.98971 3.40381C1.79445 3.20855 1.79445 2.89196 1.98971 2.6967L2.69682 1.98959C2.89208 1.79433 3.20866 1.79433 3.40392 1.98959L14.0105 12.5962C14.2058 12.7915 14.2058 13.108 14.0105 13.3033L13.3034 14.0104C13.1082 14.2057 12.7916 14.2057 12.5963 14.0104L1.98971 3.40381Z"
|
|
263
|
-
stroke="none"
|
|
264
|
-
/>
|
|
265
|
-
</svg>`],["empty-64x40",`<svg viewBox="0 0 64 40">
|
|
266
|
-
<g>
|
|
267
|
-
<g clipPath="url(#clip0_499_175492)">
|
|
268
|
-
<path
|
|
269
|
-
d="M32 39.7032C49.6731 39.7032 64 36.5925 64 32.7552C64 28.9179 49.6731 25.8071 32 25.8071C14.3269 25.8071 0 28.9179 0 32.7552C0 36.5925 14.3269 39.7032 32 39.7032Z"
|
|
270
|
-
stroke="none"
|
|
271
|
-
fill="#F5F5F5"
|
|
272
|
-
/>
|
|
273
|
-
<path
|
|
274
|
-
d="M55 13.6653L44.854 2.24866C44.367 1.47048 43.656 1 42.907 1H21.093C20.344 1 19.633 1.47048 19.146 2.24767L9 13.6663V22.8367H55V13.6653Z"
|
|
275
|
-
fill="none"
|
|
276
|
-
/>
|
|
277
|
-
<path
|
|
278
|
-
d="M41.613 16.8128C41.613 15.2197 42.607 13.9046 43.84 13.9036H55V31.9059C55 34.0132 53.68 35.7402 52.05 35.7402H11.95C10.32 35.7402 9 34.0122 9 31.9059V13.9036H20.16C21.393 13.9036 22.387 15.2167 22.387 16.8098V16.8317C22.387 18.4248 23.392 19.7111 24.624 19.7111H39.376C40.608 19.7111 41.613 18.4128 41.613 16.8198V16.8128Z"
|
|
279
|
-
fill="#FAFAFA"
|
|
280
|
-
/>
|
|
281
|
-
</g>
|
|
282
|
-
<defs>
|
|
283
|
-
<clipPath id="clip0_499_175492">
|
|
284
|
-
<rect width="64" height="40" fill="white" />
|
|
285
|
-
</clipPath>
|
|
286
|
-
</defs>
|
|
287
|
-
</g>
|
|
288
|
-
</svg>`],["caret-12x12",`<svg viewBox="0 0 12 12">
|
|
289
|
-
<path
|
|
290
|
-
stroke="none"
|
|
291
|
-
d="M8.38828 5.78337L3.92578 1.93493C3.75938 1.79196 3.51562 1.92087 3.51562 2.15173V9.84861C3.51562 10.0795 3.75938 10.2084 3.92578 10.0654L8.38828 6.21696C8.51602 6.10681 8.51602 5.89353 8.38828 5.78337Z"
|
|
292
|
-
/>
|
|
293
|
-
</svg>`],["plus-16x16",`<svg viewBox="0 0 16 16">
|
|
294
|
-
<path
|
|
295
|
-
d="M7.5 1C7.22386 1 7 1.22386 7 1.5V7H1.5C1.22386 7 1 7.22386 1 7.5L1 8.5C1 8.77614 1.22386 9 1.5 9H7V14.5C7 14.7761 7.22386 15 7.5 15H8.5C8.77614 15 9 14.7761 9 14.5V9H14.5C14.7761 9 15 8.77614 15 8.5V7.5C15 7.22386 14.7761 7 14.5 7H9V1.5C9 1.22386 8.77614 1 8.5 1H7.5Z"
|
|
296
|
-
stroke="none"
|
|
297
|
-
/>
|
|
298
|
-
</svg>`],["recenter-16x16",`<svg viewBox="0 0 16 16">
|
|
299
|
-
<g stroke="none">
|
|
300
|
-
<path d="M0 2.5C0 2.22386 0.223858 2 0.5 2H1.5C1.77614 2 2 2.22386 2 2.5V13.5C2 13.7761 1.77614 14 1.5 14H0.5C0.223858 14 0 13.7761 0 13.5V2.5Z" />
|
|
301
|
-
<path
|
|
302
|
-
fillRule="evenodd"
|
|
303
|
-
clipRule="evenodd"
|
|
304
|
-
d="M4.5 4C4.22386 4 4 4.22386 4 4.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5ZM6 6V10H10V6H6Z"
|
|
305
|
-
/>
|
|
306
|
-
<path d="M14.5 2C14.2239 2 14 2.22386 14 2.5V13.5C14 13.7761 14.2239 14 14.5 14H15.5C15.7761 14 16 13.7761 16 13.5V2.5C16 2.22386 15.7761 2 15.5 2H14.5Z" />
|
|
307
|
-
</g>
|
|
308
|
-
</svg>`],["minus-16x16",`<svg viewBox="0 0 16 16">
|
|
309
|
-
<path
|
|
310
|
-
d="M1.5 9C1.22386 9 1 8.77614 1 8.5L1 7.5C1 7.22386 1.22386 7 1.5 7L14.5 7C14.7761 7 15 7.22386 15 7.5V8.5C15 8.77614 14.7761 9 14.5 9L1.5 9Z"
|
|
311
|
-
stroke="none"
|
|
312
|
-
/>
|
|
313
|
-
</svg>`],["logo-horizontal-206x48",`<svg viewBox="0 0 206 48">
|
|
314
|
-
<path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z" />
|
|
315
|
-
<path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z" />
|
|
316
|
-
<path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z" />
|
|
317
|
-
<path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z" />
|
|
318
|
-
</svg>`],["share-16x16",`<svg viewBox="0 0 16 16">
|
|
319
|
-
<path
|
|
320
|
-
fillRule="evenodd"
|
|
321
|
-
clipRule="evenodd"
|
|
322
|
-
d="M13 6C14.6569 6 16 4.65685 16 3C16 1.34315 14.6569 0 13 0C11.3431 0 10 1.34315 10 3C10 3.13463 10.0089 3.26719 10.0261 3.39712L6.82972 5.17286C6.10576 4.44825 5.10523 4 4 4C1.79086 4 0 5.79086 0 8C0 10.2091 1.79086 12 4 12C5.10523 12 6.10576 11.5518 6.82972 10.8271L10.0261 12.6029C10.0089 12.7328 10 12.8654 10 13C10 14.6569 11.3431 16 13 16C14.6569 16 16 14.6569 16 13C16 11.3431 14.6569 10 13 10C12.2011 10 11.4752 10.3123 10.9376 10.8214L7.84579 9.1037C7.94622 8.75313 8 8.38284 8 8C8 7.61716 7.94622 7.24687 7.84579 6.8963L10.9376 5.17864C11.4752 5.68775 12.2011 6 13 6ZM13 4C13.5523 4 14 3.55228 14 3C14 2.44772 13.5523 2 13 2C12.4477 2 12 2.44772 12 3C12 3.55228 12.4477 4 13 4ZM4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10ZM14 13C14 13.5523 13.5523 14 13 14C12.4477 14 12 13.5523 12 13C12 12.4477 12.4477 12 13 12C13.5523 12 14 12.4477 14 13Z"
|
|
323
|
-
stroke="none"
|
|
324
|
-
/>
|
|
325
|
-
</svg>`],["checkmark-16x16",`<svg viewBox="0 0 16 16">
|
|
326
|
-
<path
|
|
327
|
-
fillRule="evenodd"
|
|
328
|
-
clipRule="evenodd"
|
|
329
|
-
d="M15.387 3.31662C15.6008 3.49148 15.6323 3.80649 15.4574 4.02021L6.77402 14.6332C6.58509 14.8642 6.30292 14.9986 6.00457 15C5.70622 15.0013 5.42285 14.8694 5.23184 14.6402L0.551937 9.02429C0.375155 8.81215 0.403817 8.49687 0.615956 8.32009L1.38418 7.67991C1.59632 7.50312 1.9116 7.53179 2.08838 7.74392L5.99299 12.4295L13.9095 2.75374C14.0844 2.54002 14.3994 2.50852 14.6131 2.68338L15.387 3.31662Z"
|
|
330
|
-
stroke="none"
|
|
331
|
-
/>
|
|
332
|
-
</svg>`],["arrow-right-16x16",`<svg viewBox="0 0 16 16">
|
|
333
|
-
<path
|
|
334
|
-
fillRule="evenodd"
|
|
335
|
-
clipRule="evenodd"
|
|
336
|
-
d="M8.35355 1.64645C8.54881 1.45118 8.8654 1.45118 9.06066 1.64645L14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L9.06066 14.3536C8.8654 14.5488 8.54882 14.5488 8.35355 14.3536L7.64645 13.6464C7.45118 13.4512 7.45118 13.1346 7.64645 12.9393L11.5858 9H0.5C0.223858 9 0 8.77614 0 8.5V7.5C0 7.22386 0.223858 7 0.5 7H11.5858L7.64645 3.06066C7.45118 2.8654 7.45118 2.54882 7.64645 2.35355L8.35355 1.64645Z"
|
|
337
|
-
stroke="none"
|
|
338
|
-
/>
|
|
339
|
-
</svg>`],["arrow-up-16x16",`<svg viewBox="0 0 16 16">
|
|
340
|
-
<path
|
|
341
|
-
fillRule="evenodd"
|
|
342
|
-
clipRule="evenodd"
|
|
343
|
-
d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"
|
|
344
|
-
stroke="none"
|
|
345
|
-
/>
|
|
346
|
-
</svg>`],["connection-stairs-16x16",`<svg viewBox="0 0 16 16">
|
|
347
|
-
<g stroke="none">
|
|
348
|
-
<path d="M1 11.5C1 11.2239 1.22386 11 1.5 11H6V13.5C6 13.7761 5.77614 14 5.5 14H1.5C1.22386 14 1 13.7761 1 13.5V11.5Z" />
|
|
349
|
-
<path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />
|
|
350
|
-
<path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />
|
|
351
|
-
<path d="M10 2.5C10 2.22386 10.2239 2 10.5 2H14.5C14.7761 2 15 2.22386 15 2.5V4.5C15 4.77614 14.7761 5 14.5 5H10V2.5Z" />
|
|
352
|
-
</g>
|
|
353
|
-
</svg>`],["connection-stairs-14x14",`<svg viewBox="0 0 14 14">
|
|
354
|
-
<path
|
|
355
|
-
d="M5.25 12H2.5C2.225 12 2 11.7429 2 11.4286C2 11.1143 2.225 10.8571 2.5 10.8571H4.25V7.91429H6.5V4.94286H8.75V2H11.5C11.775 2 12 2.25714 12 2.57143C12 2.88571 11.775 3.14286 11.5 3.14286H9.75V6.08571H7.5V9.02857H5.25V12Z"
|
|
356
|
-
stroke="none"
|
|
357
|
-
/>
|
|
358
|
-
</svg>`],["connection-stairs-12x12",`<svg viewBox="0 0 12 12" stroke="none">
|
|
359
|
-
<path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />
|
|
360
|
-
<path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />
|
|
361
|
-
<path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />
|
|
362
|
-
<path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />
|
|
363
|
-
</svg>`],["connection-escalator-16x16",`<svg viewBox="0 0 16 16">
|
|
364
|
-
<g stroke="none">
|
|
365
|
-
<path d="M3.63008 12H2C0.895431 12 0 12.8954 0 14C0 15.1046 0.89543 16 2 16H4.63008C4.86879 16 5.09962 15.9146 5.28087 15.7593L11.7191 10.2407C11.9004 10.0854 12.1312 10 12.3699 10H14C15.1046 10 16 9.10457 16 8C16 6.89543 15.1046 6 14 6H11.3699C11.1312 6 10.9004 6.08539 10.7191 6.24074L4.28087 11.7593C4.09962 11.9146 3.86879 12 3.63008 12Z" />
|
|
366
|
-
<path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />
|
|
367
|
-
<path d="M9 2C9 3.10457 8.10457 4 7 4C5.89543 4 5 3.10457 5 2C5 0.89543 5.89543 0 7 0C8.10457 0 9 0.89543 9 2Z" />
|
|
368
|
-
</g>
|
|
369
|
-
</svg>`],["connection-escalator-14x14",`<svg viewBox="0 0 14 14">
|
|
370
|
-
<path
|
|
371
|
-
d="M5.26686 2.98522C5.26686 2.44335 5.71573 2 6.26436 2C6.81299 2 7.26187 2.44335 7.26187 2.98522C7.26187 3.5271 6.81299 3.97045 6.26436 3.97045C5.71573 3.97045 5.26686 3.50246 5.26686 2.98522Z"
|
|
372
|
-
stroke="none"
|
|
373
|
-
/>
|
|
374
|
-
<path
|
|
375
|
-
d="M7.26188 5.48588V5.25125C7.26188 4.85716 6.91275 4.53696 6.48881 4.53696H6.03993C5.61599 4.53696 5.26687 4.88179 5.26687 5.25125V7.66458L4.3192 8.6995H3.67082C2.74813 8.6995 2 9.43842 2 10.3498C2 11.2611 2.74813 12 3.67082 12H4.61845C5.36658 12 6.11471 11.6798 6.61347 11.1133L9.6808 7.76354H10.3292C11.2519 7.76354 12 7.02463 12 6.11329C12 5.20196 11.2519 4.46305 10.3292 4.46305H9.38155C8.60848 4.46305 7.88529 4.78324 7.38653 5.34975L7.26188 5.48588ZM4.61846 11.0148H3.67083C3.29677 11.0148 2.99751 10.7192 2.99751 10.3498C2.99751 9.9803 3.29677 9.68473 3.67083 9.68473H4.61846C4.71821 9.68473 4.81796 9.63547 4.86784 9.56158L8.13467 5.99015C8.45886 5.64532 8.90774 5.44828 9.38155 5.44828H10.3292C10.7032 5.44828 11.0025 5.74384 11.0025 6.1133C11.0025 6.48276 10.7032 6.77833 10.3292 6.77833H9.38155C9.2818 6.77833 9.18205 6.82759 9.13218 6.87685L5.86534 10.4729C5.54115 10.8177 5.09228 11.0148 4.61846 11.0148Z"
|
|
376
|
-
stroke="none"
|
|
377
|
-
/>
|
|
378
|
-
</svg>`],["connection-elevator-16x16",`<svg viewBox="0 0 16 16">
|
|
379
|
-
<g stroke="none">
|
|
380
|
-
<path d="M3 5.5C3 6.32843 2.32843 7 1.5 7C0.671573 7 0 6.32843 0 5.5C0 4.67157 0.671573 4 1.5 4C2.32843 4 3 4.67157 3 5.5Z" />
|
|
381
|
-
<path d="M3 10.5C3 11.3284 2.32843 12 1.5 12C0.671573 12 0 11.3284 0 10.5C0 9.67157 0.671573 9 1.5 9C2.32843 9 3 9.67157 3 10.5Z" />
|
|
382
|
-
<path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />
|
|
383
|
-
<path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />
|
|
384
|
-
</g>
|
|
385
|
-
</svg>`],["connection-elevator-14x14",`<svg viewBox="0 0 14 14">
|
|
386
|
-
<path
|
|
387
|
-
d="M7.476 2H2.72693C1.77095 2 1 2.72464 1 3.62319V10.3768C1 11.2754 1.77095 12 2.72693 12H7.476C8.43198 12 9.20293 11.2754 9.20293 10.3768V3.62319C9.17209 2.72464 8.40114 2 7.476 2ZM7.476 3.15942C7.75354 3.15942 7.96941 3.36232 7.96941 3.62319V10.3768C7.96941 10.6377 7.75354 10.8406 7.476 10.8406H5.71824V3.15942H7.476ZM4.48472 3.15942V10.8406H2.72693C2.44939 10.8406 2.23352 10.6377 2.23352 10.3768V3.62319C2.23352 3.36232 2.44939 3.15942 2.72693 3.15942H4.48472Z"
|
|
388
|
-
stroke="none"
|
|
389
|
-
/>
|
|
390
|
-
<path
|
|
391
|
-
d="M12.4643 6.19064H10.6638C10.4456 6.19064 10.2546 6.06243 10.1728 5.88294C10.0909 5.70346 10.1455 5.47269 10.2819 5.31884L11.1821 4.47269C11.4004 4.26756 11.755 4.26756 11.946 4.47269L12.8462 5.31884C13.0099 5.47269 13.0371 5.67781 12.9553 5.88294C12.8735 6.08807 12.6825 6.19064 12.4643 6.19064Z"
|
|
392
|
-
stroke="none"
|
|
393
|
-
/>
|
|
394
|
-
<path
|
|
395
|
-
d="M11.564 9.65216C11.4276 9.65216 11.2912 9.60088 11.1821 9.49831L10.2819 8.65216C10.1182 8.49831 10.0909 8.29319 10.1728 8.08806C10.2546 7.90857 10.4456 7.78036 10.6638 7.78036H12.4643C12.6825 7.78036 12.8735 7.90857 12.9553 8.08806C13.0371 8.26754 12.9826 8.49831 12.8462 8.65216L11.9459 9.49831C11.8641 9.60088 11.7004 9.65216 11.564 9.65216Z"
|
|
396
|
-
stroke="none"
|
|
397
|
-
/>
|
|
398
|
-
</svg>`],["connection-elevator-12x12",`<svg viewBox="0 0 12 12" stroke="none">
|
|
399
|
-
<circle cx="1.9375" cy="4.4375" r="0.9375" />
|
|
400
|
-
<circle cx="1.9375" cy="7.5625" r="0.9375" />
|
|
401
|
-
<path
|
|
402
|
-
fillRule="evenodd"
|
|
403
|
-
clipRule="evenodd"
|
|
404
|
-
d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"
|
|
405
|
-
/>
|
|
406
|
-
</svg>`],["new-tab-14x14",`<svg viewBox="0 0 14 14">
|
|
407
|
-
<g stroke="none">
|
|
408
|
-
<path d="M2.625 2.625H5.6875C5.92913 2.625 6.125 2.42912 6.125 2.1875V1.3125C6.125 1.07088 5.92913 0.875 5.6875 0.875H1.3125C1.07088 0.875 0.875 1.07088 0.875 1.3125V12.6875C0.875 12.9291 1.07088 13.125 1.3125 13.125H12.6875C12.9291 13.125 13.125 12.9291 13.125 12.6875V8.3125C13.125 8.07088 12.9291 7.875 12.6875 7.875H11.8125C11.5709 7.875 11.375 8.07088 11.375 8.3125V11.375H2.625V2.625Z" />
|
|
409
|
-
<path d="M12.9063 0.875H8.40311C8.20822 0.875 8.11063 1.11062 8.24843 1.24843L9.88124 2.88124L5.8156 6.94688C5.64475 7.11774 5.64475 7.39475 5.8156 7.5656L6.43432 8.18432C6.60517 8.35517 6.88218 8.35517 7.05304 8.18432L11.1187 4.11868L12.7516 5.75157C12.8894 5.88938 13.125 5.79178 13.125 5.59689V1.09375C13.125 0.972938 13.0271 0.875 12.9063 0.875Z" />
|
|
410
|
-
</g>
|
|
411
|
-
</svg>`],["compress-16x16",`<svg viewBox="0 0 16 16">
|
|
412
|
-
<g stroke="none">
|
|
413
|
-
<path
|
|
414
|
-
id="Vector"
|
|
415
|
-
d="M4.67773 10.7154H0.713449C0.556306 10.7154 0.427734 10.844 0.427734 11.0011V11.8583C0.427734 12.0154 0.556306 12.144 0.713449 12.144H3.82059V15.2868C3.82059 15.444 3.94916 15.5725 4.10631 15.5725H4.96345C5.12059 15.5725 5.24916 15.444 5.24916 15.2868V11.2868C5.24916 10.9708 4.99381 10.7154 4.67773 10.7154ZM4.96345 0.429688H4.10631C3.94916 0.429688 3.82059 0.558259 3.82059 0.715402V3.85826H0.713449C0.556306 3.85826 0.427734 3.98683 0.427734 4.14397V5.00112C0.427734 5.15826 0.556306 5.28683 0.713449 5.28683H4.67773C4.99381 5.28683 5.24916 5.03147 5.24916 4.7154V0.715402C5.24916 0.558259 5.12059 0.429688 4.96345 0.429688ZM15.2849 10.7154H11.3206C11.0045 10.7154 10.7492 10.9708 10.7492 11.2868V15.2868C10.7492 15.444 10.8777 15.5725 11.0349 15.5725H11.892C12.0492 15.5725 12.1777 15.444 12.1777 15.2868V12.144H15.2849C15.442 12.144 15.5706 12.0154 15.5706 11.8583V11.0011C15.5706 10.844 15.442 10.7154 15.2849 10.7154ZM15.2849 3.85826H12.1777V0.715402C12.1777 0.558259 12.0492 0.429688 11.892 0.429688H11.0349C10.8777 0.429688 10.7492 0.558259 10.7492 0.715402V4.7154C10.7492 5.03147 11.0045 5.28683 11.3206 5.28683H15.2849C15.442 5.28683 15.5706 5.15826 15.5706 5.00112V4.14397C15.5706 3.98683 15.442 3.85826 15.2849 3.85826Z"
|
|
416
|
-
/>
|
|
417
|
-
</g>
|
|
418
|
-
</svg>`],["washroom-14x14",`<svg viewBox="0 0 14 14" stroke="none">
|
|
419
|
-
<path d="M4.55125 3.09062C4.55125 3.69326 4.07639 4.18176 3.49058 4.18176C2.90525 4.18176 2.43039 3.69326 2.43039 3.09062C2.43039 2.4885 2.90525 2 3.49058 2C4.07639 2 4.55125 2.4885 4.55125 3.09062Z" />
|
|
420
|
-
<path d="M5.1193 5.48047C4.81653 4.83116 4.17252 4.41571 3.47822 4.41571C2.78392 4.41571 2.13986 4.83116 1.83714 5.48047L1.04175 7.22034C0.940664 7.441 1.02893 7.70073 1.24393 7.81791C1.47077 7.90871 1.72324 7.81791 1.82433 7.59725L2.49349 6.15554L2.21587 11.4407C2.20305 11.7263 2.41805 11.9734 2.69567 11.9993C2.97329 12.0124 3.21344 11.7913 3.23859 11.5057L3.4028 8.285H3.567L3.73121 11.5057C3.74403 11.7913 3.97086 11.9993 4.23616 11.9993H4.26131C4.53893 11.9861 4.75343 11.7395 4.74111 11.4407L4.46349 6.15554L5.13265 7.59725C5.20858 7.75298 5.35997 7.85697 5.52418 7.85697C5.5873 7.85697 5.65042 7.84379 5.71354 7.81792C5.92804 7.71393 6.0163 7.44153 5.91572 7.22035L5.1193 5.48047Z" />
|
|
421
|
-
<path d="M12.9582 7.22034L12.1505 5.48047C11.8477 4.83116 11.2037 4.41571 10.5094 4.41571C9.81513 4.41571 9.17107 4.83116 8.86836 5.48047L8.06064 7.22034C7.95955 7.441 8.04782 7.70073 8.26282 7.81791C8.47732 7.9219 8.7298 7.8311 8.84371 7.60993L9.52519 6.12977L9.46207 7.2204L8.57842 8.92184C8.47733 9.11663 8.61638 9.36316 8.83089 9.36316H9.33584L9.22242 11.4668C9.2096 11.7397 9.41177 11.9862 9.68939 11.9994C9.95469 12.0126 10.1943 11.8046 10.2072 11.519L10.3581 9.33723H10.6737L10.7871 11.5058C10.7999 11.7787 11.0144 11.9862 11.2792 11.9862H11.3043C11.5696 11.973 11.7841 11.7396 11.7713 11.4535L11.6579 9.33718H12.1628C12.3773 9.33718 12.5287 9.09066 12.4153 8.89586L11.5317 7.19442L11.4685 6.1038L12.1757 7.5972C12.2516 7.75293 12.403 7.85692 12.5672 7.85692C12.6303 7.85692 12.6934 7.84373 12.7566 7.81786C12.9711 7.70068 13.0593 7.44102 12.9582 7.22034Z" />
|
|
422
|
-
<path d="M11.5696 3.09062C11.5696 3.69326 11.0948 4.18176 10.5094 4.18176C9.92363 4.18176 9.44876 3.69326 9.44876 3.09062C9.44876 2.4885 9.92363 2 10.5094 2C11.0948 2 11.5696 2.4885 11.5696 3.09062Z" />
|
|
423
|
-
<path d="M6.99996 2.00006C6.76031 2.00006 6.57095 2.19485 6.57095 2.44138V11.5575C6.57095 11.804 6.76031 11.9988 6.99996 11.9988C7.2396 11.9988 7.42896 11.804 7.42896 11.5575V2.44138C7.42896 2.19485 7.2396 2.00006 6.99996 2.00006Z" />
|
|
424
|
-
</svg>`],["point-of-interest-12x12",`<svg viewBox="0 0 12 12" stroke="none">
|
|
425
|
-
<path
|
|
426
|
-
stroke="none"
|
|
427
|
-
id="Subtract"
|
|
428
|
-
fill-rule="evenodd"
|
|
429
|
-
clip-rule="evenodd"
|
|
430
|
-
d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"
|
|
431
|
-
/>
|
|
432
|
-
</svg>`],["flag-20x20",`<svg viewBox="0 0 20 20" stroke="none">
|
|
433
|
-
<path
|
|
434
|
-
d="M16.9987 4.27111C16.936 5.06715 16.3836 5.93162 15.5238 6.57845C14.7549 7.15682 13.0885 8.04927 10.5434 7.55174C8.32167 7.1164 6.82156 8.02129 6.08085 10.2416L8.24615 17.3998C8.31833 17.6471 8.17711 17.9059 7.9292 17.9813C7.88527 17.9938 7.83976 18 7.79426 18C7.58634 18 7.40277 17.8647 7.34236 17.6673L5.1644 10.4686C5.13773 10.4173 5.12125 10.3613 5.11419 10.3038L3.41956 4.70042C3.38112 4.63512 3.35994 4.56127 3.3568 4.48587L3.02101 3.37886C2.98413 3.25992 2.9959 3.13165 3.05553 3.02203C3.11437 2.91242 3.21479 2.83079 3.33482 2.79504C3.45564 2.75928 3.5851 2.7725 3.69494 2.83235C3.80477 2.89144 3.88637 2.99172 3.92167 3.11143L3.9813 3.31355C4.38847 2.85956 4.90472 2.51439 5.48136 2.30915C6.97201 1.75566 8.95216 1.95467 10.6469 2.83156C11.6888 3.36951 14.3374 4.54493 16.3647 3.79553C16.5154 3.74111 16.684 3.76599 16.8127 3.86239C16.9406 3.95879 17.0105 4.11251 16.9987 4.27111Z"
|
|
435
|
-
stroke="none"
|
|
436
|
-
/>
|
|
437
|
-
</svg>`],["link-16x16",`<svg viewBox="0 0 16 16" stroke="none">
|
|
438
|
-
<path
|
|
439
|
-
d="M9.10678 11.2433C9.07993 11.2167 9.04367 11.2018 9.00589 11.2018C8.9681 11.2018 8.93184 11.2167 8.90499 11.2433L6.82999 13.3183C5.86928 14.279 4.24785 14.3808 3.18714 13.3183C2.12464 12.2558 2.22642 10.6362 3.18714 9.67546L5.26214 7.60046C5.31749 7.5451 5.31749 7.45403 5.26214 7.39868L4.55142 6.68796C4.52457 6.66138 4.48832 6.64646 4.45053 6.64646C4.41274 6.64646 4.37649 6.66138 4.34964 6.68796L2.27464 8.76296C0.763923 10.2737 0.763923 12.7183 2.27464 14.2272C3.78535 15.7362 6.22999 15.738 7.73892 14.2272L9.81392 12.1522C9.86928 12.0969 9.86928 12.0058 9.81392 11.9505L9.10678 11.2433ZM13.7246 2.77903C12.2139 1.26832 9.76928 1.26832 8.26035 2.77903L6.18357 4.85403C6.15698 4.88088 6.14207 4.91714 6.14207 4.95493C6.14207 4.99271 6.15698 5.02897 6.18357 5.05582L6.89249 5.76475C6.94785 5.8201 7.03892 5.8201 7.09428 5.76475L9.16928 3.68975C10.13 2.72903 11.7514 2.62725 12.8121 3.68975C13.8746 4.75225 13.7729 6.37189 12.8121 7.3326L10.7371 9.4076C10.7106 9.43445 10.6956 9.47071 10.6956 9.5085C10.6956 9.54628 10.7106 9.58254 10.7371 9.60939L11.4479 10.3201C11.5032 10.3755 11.5943 10.3755 11.6496 10.3201L13.7246 8.2451C15.2336 6.73439 15.2336 4.28975 13.7246 2.77903ZM9.75142 6.00939C9.72457 5.9828 9.68832 5.96789 9.65053 5.96789C9.61275 5.96789 9.57649 5.9828 9.54964 6.00939L5.50499 10.0522C5.47841 10.0791 5.46349 10.1154 5.46349 10.1531C5.46349 10.1909 5.47841 10.2272 5.50499 10.254L6.21214 10.9612C6.26749 11.0165 6.35857 11.0165 6.41392 10.9612L10.4568 6.91832C10.5121 6.86296 10.5121 6.77189 10.4568 6.71653L9.75142 6.00939Z"
|
|
440
|
-
stroke="none"
|
|
441
|
-
/>
|
|
442
|
-
</svg>`]]),X9=/<svg([^>]*)>/g;function P3(r,t,e){let i=H9.get(r);return i?i.replace(X9,`<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:${t}; width:${e}px; height:${e}px">`):""}l(P3,"getStyledIcon");var Ui,ao,ka,Pd,xu,M3,Su,w3,Na,Md,Pu,T3,wd=class wd{constructor(t,e){P(this,ka);P(this,xu);P(this,Su);P(this,Na);P(this,Pu);P(this,Ui,void 0);P(this,ao,void 0);v(this,"colors",{default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F"});E(this,Ui,t),E(this,ao,e)}auto(){let t=c(this,ao)[Object.keys(c(this,ao))[0]];[...t.getByType("connection"),...t.getByType("point-of-interest"),...t.getByType("space")].forEach(e=>{e.__type==="connection"?e.coordinates.forEach(i=>{c(this,Ui).Labels.add(i,e.name,X(this,ka,Pd).call(this,e))}):(e.__type==="space"&&e.name!==""&&c(this,Ui).updateState(e,{interactive:!0,hoverColor:"#F0F0F0"}),c(this,Ui).Labels.add(e,e.name,X(this,ka,Pd).call(this,e)))})}};Ui=new WeakMap,ao=new WeakMap,ka=new WeakSet,Pd=l(function(t){let e=P3(X(this,xu,M3).call(this,t),"white",12);return{appearance:{text:{foregroundColor:X(this,Na,Md).call(this,t)},marker:{foregroundColor:{active:X(this,Na,Md).call(this,t)},icon:e,iconSize:12}},interactive:!0,rank:X(this,Pu,T3).call(this,t)}},"#generatLabelAppearance"),xu=new WeakSet,M3=l(function(t){return t.__type==="connection"?X(this,Su,w3).call(this,t.type):t.name.includes("Washroom")?"washroom-14x14":t.__type==="point-of-interest"?"point-of-interest-12x12":""},"#getIconName"),Su=new WeakSet,w3=l(function(t){let e="";switch(t){case"elevator":e="connection-elevator-12x12";break;case"escalator":e="connection-escalator-12x12";break;case"stairs":e="connection-stairs-12x12";break}return e},"#attemptIconNameForConnection"),Na=new WeakSet,Md=l(function(t){return t.__type==="connection"?this.colors.connection:t.__type==="point-of-interest"?this.colors.point:"name"in t&&t.name.includes("Washroom")?this.colors.washroom:this.colors.default},"#getLabelColor"),Pu=new WeakSet,T3=l(function(t){return t.__type==="connection"?"high":(t.__type==="point-of-interest","medium")},"#getDefaultLabelRank"),l(wd,"Labels");var Cu=wd;var Td=class Td{Labels;constructor(t,e){this.Labels=new Cu(t,e)}auto=()=>{this.Labels.auto()}};l(Td,"DefaultTheme");var Mu=Td;d();var pt,Id=class Id{constructor(t){P(this,pt,void 0);v(this,"setMinPitch",t=>{c(this,pt).camera.setMinPitch(t)});v(this,"setMaxPitch",t=>{c(this,pt).camera.setMaxPitch(t)});v(this,"setMinZoomLevel",t=>{c(this,pt).camera.setMinZoomLevel(t)});v(this,"setMaxZoomLevel",t=>{c(this,pt).camera.setMaxZoomLevel(t)});E(this,pt,t)}setScreenOffsets(t){c(this,pt).camera.setInsetPadding(t)}focusOn(t,e){var o;let i=[],n=Array.isArray(t)?t:[t];for(let a of n)if(ti.is(a)){let u;for(u of a.coordinates)i.push([u.longitude,u.latitude])}else if(Kr.is(a)){let u=c(this,pt).getBoundingArea(a.id);u&&i.push(...u)}else{let u=Qe(a);if(u){let s=0;u.floorId&&(s=((o=c(this,pt).getState(u.floorId))==null?void 0:o.altitude)||0),i.push([u.longitude,u.latitude,s])}}return c(this,pt).camera.focusOn(i,{pitch:e==null?void 0:e.pitch,bearing:e==null?void 0:e.bearing,padding:e==null?void 0:e.screenOffsets,maxZoomLevel:e==null?void 0:e.maxZoomLevel,minZoomLevel:e==null?void 0:e.minZoomLevel,duration:e==null?void 0:e.duration,easing:e==null?void 0:e.easing})}animateTo(t,e){var p;let{center:i,zoomLevel:n,bearing:o,pitch:a}=t,u=i!=null?i:this.center,s=[u.longitude,u.latitude];return c(this,pt).camera.animateTo({center:s,zoomLevel:n!=null?n:this.zoomLevel,bearing:o!=null?o:this.bearing,pitch:a!=null?a:this.pitch,duration:(p=e==null?void 0:e.duration)!=null?p:600,easing:e==null?void 0:e.easing})}set(t){let{center:e=this.center,zoomLevel:i=this.zoomLevel,bearing:n=this.bearing,pitch:o=this.pitch}=t,a=[e.longitude,e.latitude];c(this,pt).camera.setCenter(a),c(this,pt).camera.setZoomLevel(i),c(this,pt).camera.setBearing(n),c(this,pt).camera.setPitch(o)}get center(){let t=c(this,pt).camera.center;return new tt(t[1],t[0],void 0)}get zoomLevel(){return c(this,pt).camera.zoomLevel}get pitch(){return c(this,pt).camera.pitch}get minPitch(){return c(this,pt).camera.minPitch}get maxPitch(){return c(this,pt).camera.maxPitch}get bearing(){let t=c(this,pt).camera.bearing;return(t<0?t+360:t)%360}get minZoomLevel(){return c(this,pt).camera.minZoomLevel}get maxZoomLevel(){return c(this,pt).camera.maxZoomLevel}};pt=new WeakMap,l(Id,"Camera");var Ra=Id;d();d();d();d();d();d();d();d();function Ed(r){let t=+this._x.call(null,r),e=+this._y.call(null,r);return I3(this.cover(t,e),t,e,r)}l(Ed,"default");function I3(r,t,e,i){if(isNaN(t)||isNaN(e))return r;var n,o=r._root,a={data:i},u=r._x0,s=r._y0,p=r._x1,f=r._y1,m,y,x,S,M,g,C,I;if(!o)return r._root=a,r;for(;o.length;)if((M=t>=(m=(u+p)/2))?u=m:p=m,(g=e>=(y=(s+f)/2))?s=y:f=y,n=o,!(o=o[C=g<<1|M]))return n[C]=a,r;if(x=+r._x.call(null,o.data),S=+r._y.call(null,o.data),t===x&&e===S)return a.next=o,n?n[C]=a:r._root=a,r;do n=n?n[C]=new Array(4):r._root=new Array(4),(M=t>=(m=(u+p)/2))?u=m:p=m,(g=e>=(y=(s+f)/2))?s=y:f=y;while((C=g<<1|M)===(I=(S>=y)<<1|x>=m));return n[I]=o,n[C]=a,r}l(I3,"add");function E3(r){var t,e,i=r.length,n,o,a=new Array(i),u=new Array(i),s=1/0,p=1/0,f=-1/0,m=-1/0;for(e=0;e<i;++e)isNaN(n=+this._x.call(null,t=r[e]))||isNaN(o=+this._y.call(null,t))||(a[e]=n,u[e]=o,n<s&&(s=n),n>f&&(f=n),o<p&&(p=o),o>m&&(m=o));if(s>f||p>m)return this;for(this.cover(s,p).cover(f,m),e=0;e<i;++e)I3(this,a[e],u[e],r[e]);return this}l(E3,"addAll");d();function Ld(r,t){if(isNaN(r=+r)||isNaN(t=+t))return this;var e=this._x0,i=this._y0,n=this._x1,o=this._y1;if(isNaN(e))n=(e=Math.floor(r))+1,o=(i=Math.floor(t))+1;else{for(var a=n-e||1,u=this._root,s,p;e>r||r>=n||i>t||t>=o;)switch(p=(t<i)<<1|r<e,s=new Array(4),s[p]=u,u=s,a*=2,p){case 0:n=e+a,o=i+a;break;case 1:e=n-a,o=i+a;break;case 2:n=e+a,i=o-a;break;case 3:e=n-a,i=o-a;break}this._root&&this._root.length&&(this._root=u)}return this._x0=e,this._y0=i,this._x1=n,this._y1=o,this}l(Ld,"default");d();function Dd(){var r=[];return this.visit(function(t){if(!t.length)do r.push(t.data);while(t=t.next)}),r}l(Dd,"default");d();function _d(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}l(_d,"default");d();d();function _t(r,t,e,i,n){this.node=r,this.x0=t,this.y0=e,this.x1=i,this.y1=n}l(_t,"default");function Od(r,t,e){var i,n=this._x0,o=this._y0,a,u,s,p,f=this._x1,m=this._y1,y=[],x=this._root,S,M;for(x&&y.push(new _t(x,n,o,f,m)),e==null?e=1/0:(n=r-e,o=t-e,f=r+e,m=t+e,e*=e);S=y.pop();)if(!(!(x=S.node)||(a=S.x0)>f||(u=S.y0)>m||(s=S.x1)<n||(p=S.y1)<o))if(x.length){var g=(a+s)/2,C=(u+p)/2;y.push(new _t(x[3],g,C,s,p),new _t(x[2],a,C,g,p),new _t(x[1],g,u,s,C),new _t(x[0],a,u,g,C)),(M=(t>=C)<<1|r>=g)&&(S=y[y.length-1],y[y.length-1]=y[y.length-1-M],y[y.length-1-M]=S)}else{var I=r-+this._x.call(null,x.data),T=t-+this._y.call(null,x.data),w=I*I+T*T;if(w<e){var L=Math.sqrt(e=w);n=r-L,o=t-L,f=r+L,m=t+L,i=x.data}}return i}l(Od,"default");d();function Ad(r){if(isNaN(f=+this._x.call(null,r))||isNaN(m=+this._y.call(null,r)))return this;var t,e=this._root,i,n,o,a=this._x0,u=this._y0,s=this._x1,p=this._y1,f,m,y,x,S,M,g,C;if(!e)return this;if(e.length)for(;;){if((S=f>=(y=(a+s)/2))?a=y:s=y,(M=m>=(x=(u+p)/2))?u=x:p=x,t=e,!(e=e[g=M<<1|S]))return this;if(!e.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(i=t,C=g)}for(;e.data!==r;)if(n=e,!(e=e.next))return this;return(o=e.next)&&delete e.next,n?(o?n.next=o:delete n.next,this):t?(o?t[g]=o:delete t[g],(e=t[0]||t[1]||t[2]||t[3])&&e===(t[3]||t[2]||t[1]||t[0])&&!e.length&&(i?i[C]=e:this._root=e),this):(this._root=o,this)}l(Ad,"default");function L3(r){for(var t=0,e=r.length;t<e;++t)this.remove(r[t]);return this}l(L3,"removeAll");d();function kd(){return this._root}l(kd,"default");d();function Nd(){var r=0;return this.visit(function(t){if(!t.length)do++r;while(t=t.next)}),r}l(Nd,"default");d();function Rd(r){var t=[],e,i=this._root,n,o,a,u,s;for(i&&t.push(new _t(i,this._x0,this._y0,this._x1,this._y1));e=t.pop();)if(!r(i=e.node,o=e.x0,a=e.y0,u=e.x1,s=e.y1)&&i.length){var p=(o+u)/2,f=(a+s)/2;(n=i[3])&&t.push(new _t(n,p,f,u,s)),(n=i[2])&&t.push(new _t(n,o,f,p,s)),(n=i[1])&&t.push(new _t(n,p,a,u,f)),(n=i[0])&&t.push(new _t(n,o,a,p,f))}return this}l(Rd,"default");d();function Bd(r){var t=[],e=[],i;for(this._root&&t.push(new _t(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var n=i.node;if(n.length){var o,a=i.x0,u=i.y0,s=i.x1,p=i.y1,f=(a+s)/2,m=(u+p)/2;(o=n[0])&&t.push(new _t(o,a,u,f,m)),(o=n[1])&&t.push(new _t(o,f,u,s,m)),(o=n[2])&&t.push(new _t(o,a,m,f,p)),(o=n[3])&&t.push(new _t(o,f,m,s,p))}e.push(i)}for(;i=e.pop();)r(i.node,i.x0,i.y0,i.x1,i.y1);return this}l(Bd,"default");d();function D3(r){return r[0]}l(D3,"defaultX");function Fd(r){return arguments.length?(this._x=r,this):this._x}l(Fd,"default");d();function _3(r){return r[1]}l(_3,"defaultY");function Gd(r){return arguments.length?(this._y=r,this):this._y}l(Gd,"default");function Ba(r,t,e){var i=new Vd(t==null?D3:t,e==null?_3:e,NaN,NaN,NaN,NaN);return r==null?i:i.addAll(r)}l(Ba,"quadtree");function Vd(r,t,e,i,n,o){this._x=r,this._y=t,this._x0=e,this._y0=i,this._x1=n,this._y1=o,this._root=void 0}l(Vd,"Quadtree");function O3(r){for(var t={data:r.data},e=t;r=r.next;)e=e.next={data:r.data};return t}l(O3,"leaf_copy");var zt=Ba.prototype=Vd.prototype;zt.copy=function(){var r=new Vd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,e,i;if(!t)return r;if(!t.length)return r._root=O3(t),r;for(e=[{source:t,target:r._root=new Array(4)}];t=e.pop();)for(var n=0;n<4;++n)(i=t.source[n])&&(i.length?e.push({source:i,target:t.target[n]=new Array(4)}):t.target[n]=O3(i));return r};zt.add=Ed;zt.addAll=E3;zt.cover=Ld;zt.data=Dd;zt.extent=_d;zt.find=Od;zt.remove=Ad;zt.removeAll=L3;zt.root=kd;zt.size=Nd;zt.visit=Rd;zt.visitAfter=Bd;zt.x=Fd;zt.y=Gd;d();d();var Hd=class Hd{origin;destination;distance;angle;weight;constructor({origin:t,destination:e,distance:i=0,angle:n=0,pathWeight:o=0}){this.origin=t,this.destination=e,this.distance=i,this.angle=n;let a=o||0;if(this.weight=a>=0?this.distance+a:0,isNaN(this.angle))throw new Error("nan angle")}};l(Hd,"Edge");var Zi=Hd;d();d();d();function Xd(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("point is required");if(!t)throw new Error("polygon is required");var i=ge(r),n=Q1(t),o=n.type,a=t.bbox,u=n.coordinates;if(a&&j9(i,a)===!1)return!1;o==="Polygon"&&(u=[u]);for(var s=!1,p=0;p<u.length&&!s;p++)if(A3(i,u[p][0],e.ignoreBoundary)){for(var f=!1,m=1;m<u[p].length&&!f;)A3(i,u[p][m],!e.ignoreBoundary)&&(f=!0),m++;f||(s=!0)}return s}l(Xd,"booleanPointInPolygon");function A3(r,t,e){var i=!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 n=0,o=t.length-1;n<t.length;o=n++){var a=t[n][0],u=t[n][1],s=t[o][0],p=t[o][1],f=r[1]*(a-s)+u*(s-r[0])+p*(r[0]-a)===0&&(a-r[0])*(s-r[0])<=0&&(u-r[1])*(p-r[1])<=0;if(f)return!e;var m=u>r[1]!=p>r[1]&&r[0]<(s-a)*(r[1]-u)/(p-u)+a;m&&(i=!i)}return i}l(A3,"inRing");function j9(r,t){return t[0]<=r[0]&&t[1]<=r[1]&&t[2]>=r[0]&&t[3]>=r[1]}l(j9,"inBBox");d();d();function Tr([r,t],[e,i]){let n=t-i,o=r-e;return(Math.atan2(o,n)+Math.PI*3)%(Math.PI*2)}l(Tr,"getAngle");d();var Y9=63710088e-1;function zi(r,t){let[e,i]=r.map(f=>f*Math.PI/180),[n,o]=t.map(f=>f*Math.PI/180),a=o-i,u=n-e,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(o)*Math.sin(u/2)*Math.sin(u/2),p=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return Y9*p}l(zi,"getDistance");d();d();function wu(r,t,e,i){let[n,o]=r,[a,u]=t,[s,p]=e,[f,m]=i;if(o===u&&n===a||p===m&&s===f)return null;let y=(f-s)*(u-o)-(m-p)*(a-n);if(y===0)return null;let x=((m-p)*(n-s)-(f-s)*(o-p))/y,S=((u-o)*(n-s)-(a-n)*(o-p))/y;if(x<0||x>1||S<0||S>1)return null;let M=o+x*(u-o);return[n+x*(a-n),M]}l(wu,"getLineIntersection");d();function jd(r,t,e,i){let n=Si(r,e/1e3,i),o=Si(t,e/1e3,i);return[n.geometry.coordinates,o.geometry.coordinates]}l(jd,"getOffsetLine");d();function Yd(r){let t=r*(180/Math.PI);return t=t%360,t>180?t-=360:t<-180&&(t+=360),Object.is(t,-0)?0:t}l(Yd,"radToDegNormalized");function k3(r,t,e=[],i=0){let n=!0,o=r.geometry.coordinates,a=t.geometry.coordinates,u=Yd(Tr(o,a)-Math.PI/2),s=Yd(Tr(o,a)+Math.PI/2);return e.forEach(p=>{if(i>0){let f=jd(o,a,i,u),m=jd(o,a,i,s);if(wu(f[0],f[1],p[0],p[1])||wu(m[0],m[1],p[0],p[1])){n=!1;return}}else if(wu(o,a,p[0],p[1])){n=!1;return}}),n}l(k3,"hasLineOfSight");var qi,Fa,Wd,Iu,N3,Eu,R3,Lu,B3,Du,F3,_u,G3,Ou,V3,Au,Ud=class Ud{constructor({nodes:t,groupBy:e}){P(this,Fa);P(this,Iu);P(this,Eu);P(this,Lu);P(this,Du);P(this,_u);P(this,Ou);v(this,"edges",{});v(this,"nodesById");v(this,"nodesByGroup",new Map);P(this,qi,void 0);P(this,Au,l((t,e)=>{let i=0;for(let n of e)(!n[c(this,qi)]||n[c(this,qi)]===t.properties[c(this,qi)])&&Xd(t.geometry.coordinates,n.geometry.geometry)&&(i+=Math.max(0,n.cost));return i},"#getZonalCost"));E(this,qi,e);let{features:i}=t;this.nodesById=X(this,Iu,N3).call(this,i),X(this,Eu,R3).call(this),X(this,Lu,B3).call(this,i,e)}getShortestEuclideanDistance(t,e){return e.reduce((i,n)=>{let o=zi(t.geometry.coordinates,n.geometry.coordinates);return Math.min(i,o)},Number.MAX_VALUE)}aStar({originIds:t,destinationNodeIds:e,excludedNodeIds:i,zones:n}){let o=X(this,Fa,Wd).call(this,t),a=X(this,Fa,Wd).call(this,e);if(o.length===0||a.length===0)return[];let{frontier:u,cameFrom:s,costSoFar:p}=X(this,Du,F3).call(this,o,a);for(;u.length>0;){let f=u.shift();if(!f)break;if(X(this,_u,G3).call(this,f.origin,a))return X(this,Ou,V3).call(this,s,f.origin.properties.id);for(let m of this.edges[f.origin.properties.id]){let y=p[f.origin.properties.id]+m.weight+c(this,Au).call(this,m.destination,n);if(!(y===1/0||i!=null&&i.has(m.destination.properties.id))&&(p[m.destination.properties.id]==null||y<p[m.destination.properties.id])){let x=y+this.getShortestEuclideanDistance(m.destination,a);p[m.destination.properties.id]=y,s[m.destination.properties.id]=m,u.push({origin:m.destination,priority:x})}}u.sort((m,y)=>m.priority-y.priority)}return[]}};qi=new WeakMap,Fa=new WeakSet,Wd=l(function(t){return t.map(e=>this.nodesById[e]).filter(Boolean)},"#filterValidNodes"),Iu=new WeakSet,N3=l(function(t){return t.reduce((e,i)=>(e[i.properties.id]=i,e),{})},"#createNodesById"),Eu=new WeakSet,R3=l(function(){for(let t in this.nodesById)this.nodesById.hasOwnProperty(t)&&(this.nodesById[t].properties.neighbors=this.nodesById[t].properties.neighbors.filter(({id:e})=>!!this.nodesById[e]))},"#removeInvalidNeighbors"),Lu=new WeakSet,B3=l(function(t,e){t.forEach(i=>{let n=e==="default"?e:i.properties[e];this.nodesByGroup.has(n)||this.nodesByGroup.set(n,[]),this.nodesByGroup.get(n).push(i),this.edges[i.properties.id]=i.properties.neighbors.map(({id:o,weight:a})=>{let u=this.nodesById[o],s=zi(i.geometry.coordinates,u.geometry.coordinates),p=Tr(i.geometry.coordinates,u.geometry.coordinates);return new Zi({origin:i,destination:u,pathWeight:a,distance:s,angle:p})})})},"#initializeEdgesAndGroups"),Du=new WeakSet,F3=l(function(t,e){let i=[],n={},o={};return t.forEach(a=>{let u=this.getShortestEuclideanDistance(a,e);i.push({origin:a,priority:u}),n[a.properties.id]=null,o[a.properties.id]=0}),i.sort((a,u)=>a.priority-u.priority),{frontier:i,cameFrom:n,costSoFar:o}},"#initializeSearch"),_u=new WeakSet,G3=l(function(t,e){return e.some(i=>i.properties.id===t.properties.id)},"#isDestinationNode"),Ou=new WeakSet,V3=l(function(t,e){let i=[],n=t[e];for(;n;)i.push(n),n=t[n.origin.properties.id];return i.reverse()},"#reconstructPath"),Au=new WeakMap,l(Ud,"NavigationGraph");var Tu=Ud;var W9=.4,Zd=class Zd{groupBy;graph;geometryEdgesByMapId=new Map;cache={nodeTreesByGroup:new Map};constructor({nodes:t,obstructions:e,groupBy:i="default"}){this.groupBy=i,this.graph=new Tu({nodes:t,groupBy:this.groupBy}),e&&e.features.forEach(n=>{let o=n.geometry.coordinates.length===1?n.geometry.coordinates[0]:n.geometry.coordinates,a=this.groupBy==="default"?this.groupBy:n.properties[this.groupBy];this.geometryEdgesByMapId.has(a)||this.geometryEdgesByMapId.set(a,[]),o.forEach((u,s)=>{this.geometryEdgesByMapId.get(a).push([u,o[s+1]||o[0]])})})}findNearestNode=t=>{var n;let e=this.groupBy==="default"?this.groupBy:t.properties[this.groupBy];if(!this.cache.nodeTreesByGroup.has(e)){let o=(n=this.graph.nodesByGroup.get(e))!=null?n:[],a=Ba();a.x(u=>u.geometry.coordinates[1]),a.y(u=>u.geometry.coordinates[0]),a.addAll(o),this.cache.nodeTreesByGroup.set(e,a)}return this.cache.nodeTreesByGroup.get(e).find(t.geometry.coordinates[1],t.geometry.coordinates[0])||null};getDirections({zones:t,originIds:e,destinationNodeIds:i,excludedNodeIds:n,simplify:o}){var p,f;let a=(p=o==null?void 0:o.enabled)!=null?p:!0,u=t!=null?t:[],s=this.graph.aStar({originIds:e,destinationNodeIds:i,zones:u,excludedNodeIds:new Set(n)});return s.length===0?{type:"FeatureCollection",features:[]}:(a&&(s=this.simplifyAllSteps(s,(f=o==null?void 0:o.bufferRadius)!=null?f:W9)),this.generatePath(s))}generatePath=t=>{let{destination:e}=t[t.length-1],i={type:"FeatureCollection",features:[]};for(let o=0;o<t.length;o++){let{origin:a}=t[o],u={id:a.properties.id,angle:t[o].angle,distance:t[o].distance};this.groupBy!=="default"&&(u.groupBy=a.properties[this.groupBy]),i.features.push({type:"Feature",geometry:{type:"Point",coordinates:[a.geometry.coordinates[0],a.geometry.coordinates[1]]},properties:u})}let n={id:e.properties.id};return this.groupBy!=="default"&&(n.groupBy=e.properties[this.groupBy]),i.features.push({type:"Feature",geometry:{type:"Point",coordinates:[e.geometry.coordinates[0],e.geometry.coordinates[1]]},properties:n}),i};simplifyAllSteps(t,e){var s,p;let i=[],n=[t[0]];for(let f=1;f<t.length;f++){if(this.groupBy!=="default"&&t[f].origin.properties[this.groupBy]!==t[f-1].origin.properties[this.groupBy]){let m=t[f-1].origin.properties[this.groupBy],y=(s=this.geometryEdgesByMapId.get(m))!=null?s:[];i.push(...this.simplifySteps(n,y,e)),n=[t[f]]}n.push(t[f])}let o=t[t.length-1],a=this.groupBy==="default"?this.groupBy:o.origin.properties[this.groupBy],u=(p=this.geometryEdgesByMapId.get(a))!=null?p:[];return i.push(...this.simplifySteps(n,u,e)),i}simplifySteps(t,e,i){if(t.length<3)return t;let n=[t[0]],o=1;for(let a=o+2;a<t.length;a++)if(!k3(t[o].origin,t[a].origin,e,i)){let u=a-1;n.push(new Zi({...t[o],destination:t[u].origin,distance:zi(t[o].origin.geometry.coordinates,t[u].origin.geometry.coordinates),angle:Tr(t[o].origin.geometry.coordinates,t[u].origin.geometry.coordinates)})),o=u}return n.push(new Zi({...t[o],destination:t[t.length-1].origin,distance:zi(t[o].origin.geometry.coordinates,t[t.length-1].origin.geometry.coordinates),angle:Tr(t[o].origin.geometry.coordinates,t[t.length-1].origin.geometry.coordinates)}),t[t.length-1]),n}getDistance=(t,e)=>zi(t,e);getAngle=(t,e)=>Tr(t,e)};l(Zd,"Navigator");var Ga=Zd;d();function si(r){return[r.longitude,r.latitude]}l(si,"convertCoordinateToPosition");function U9(r){return new Map(r.map(t=>{let{properties:e}=t,{id:i}=e;return[i,t]}))}l(U9,"getEntranceMap");var zd=l((r,t)=>{let e=U9(t),i={type:"Feature",properties:{id:r[0].properties.id},geometry:{type:"MultiLineString",coordinates:[]}};for(let n of r){let o=[n.geometry.coordinates],a=(n.properties.entrances||[]).reduce((u,s)=>(e.has(s)&&u.push(e.get(s)),u),[]);a.length&&(o=Jh(n,a).map(u=>u.geometry.coordinates)),i.geometry.coordinates.push(...o)}return i},"cutEntrancesFromLineStrings");function H3(r,t){let e={options:{}};if(!e.options)throw new Error("options should exist");return r.appearance&&(e.options.appearance=r.appearance),r.rank!=null&&(r.rank==="initial"?e.options.rank=t.initialRank||2:e.options.rank=r.rank),r.enabled!==void 0&&(e.enabled=r.enabled),r.interactive!==null&&(e.options.interactive=r.interactive),e}l(H3,"translateLabelStateToGeojsonCore");function X3(r,t){let e={options:{}};if(!e.options)throw new Error("options should exist");return r.rank!=null&&(r.rank==="initial"?e.options.rank=t.initialRank||2:e.options.rank=r.rank),r.enabled!==void 0&&(e.enabled=r.enabled),r.interactive!==null&&(e.options.interactive=r.interactive),e}l(X3,"translateMarkerStateToGeojsonCore");function j3(r,t){let e={};return t==null||(r.color&&(r.color==="initial"?e.color=t.initialColor:e.color=r.color),r.hoverColor&&(e.hoverColor=r.hoverColor),r.interactive!==void 0&&(e.interactive=r.interactive),r.visible!==void 0&&(e.visible=r.visible)),e}l(j3,"translateSpaceStateToGeojsonCore");function Y3(r,t){return((t-r+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI}l(Y3,"differenceBetweenAngles");function W3(r,t){let e="Left";return r<=-Math.PI/4?e="Right":r<=-t?e="SlightRight":r<=t?e="Straight":r<=Math.PI/4?e="SlightLeft":e="Left",e}l(W3,"getRelativeBearing");function U3(r){let t={};for(let e in r){let i=r[e];if(i!=null){if(i.id=e,"polygons"in i)for(let n of i.polygons)t[n]=i;else if("lineStrings"in i)for(let n of i.lineStrings)t[n]=i;else if("points"in i)for(let n of i.points)t[n]=i}}return t}l(U3,"extractStyleMap");function qd(r,t){return r.reduce((e,i)=>{let n=t[i.properties.id];return n==null||(e.has(n)||e.set(n,[]),e.get(n).push(i)),e},new Map)}l(qd,"groupGeometryByStyle");function Va(r,t={}){var n,o,a,u,s,p;let e={...r},i=(o=(n=t==null?void 0:t.style)==null?void 0:n.shading)!=null?o:t==null?void 0:t.shadingAndOutlines;if(i===!0?e.shading={start:.1,end:.15,intensity:.4}:typeof i=="object"&&(e.shading={start:i.start,end:i.end,intensity:i.intensity}),e.outline=(u=(a=t==null?void 0:t.style)==null?void 0:a.outlines)!=null?u:t==null?void 0:t.shadingAndOutlines,"lineStrings"in r){let f=(p=(s=t==null?void 0:t.style)==null?void 0:s.wallTopColor)!=null?p:t==null?void 0:t.wallTopColor;f!=null&&(e.topColor=f)}return e}l(Va,"translateToCoreStyle");var Z3=Math.PI*.1,qt,tr,be,Ru,z3,Ha,$d,Bu,q3,Jd=class Jd{constructor(t,e){P(this,Ru);P(this,Ha);P(this,Bu);P(this,qt,{});P(this,tr,void 0);P(this,be,void 0);E(this,tr,e),E(this,be,t.features),E(this,tr,e),E(this,be,t.features)}get coordinates(){return c(this,qt).coordinates?c(this,qt).coordinates:(c(this,qt).coordinates=c(this,be).map(t=>new tt(t.geometry.coordinates[1],t.geometry.coordinates[0],t.properties.groupBy)),c(this,qt).coordinates)}get distance(){return c(this,qt).distance?c(this,qt).distance:(c(this,qt).distance=c(this,be).reduce((t,e)=>t+(e.properties.distance||0),0),c(this,qt).distance)}get instructions(){if(c(this,be).length<2)return[];if(c(this,qt).instructions)return c(this,qt).instructions;let t=[],e=0;for(let i=0;i<c(this,be).length;i++){let n=c(this,be)[i],o=c(this,be)[i-1],a=c(this,be)[i+1],u=new tt(n.geometry.coordinates[1],n.geometry.coordinates[0],n.properties.groupBy),s=X(this,Ru,z3).call(this,{prevDirection:o,direction:n,nextDirection:a});e+=(o==null?void 0:o.properties.distance)||0;for(let p of s)p&&(t.push({action:p,distance:e,coordinate:u}),e=0)}return c(this,qt).instructions=t,c(this,qt).instructions}};qt=new WeakMap,tr=new WeakMap,be=new WeakMap,Ru=new WeakSet,z3=l(function(t){let{prevDirection:e,direction:i,nextDirection:n}=t,o=e&&c(this,tr).getById("floor",e.properties.groupBy),a=c(this,tr).getById("floor",i.properties.groupBy),u=n&&c(this,tr).getById("floor",n.properties.groupBy),s=[];if(e||s.push({type:"Departure"}),u&&a.id!==u.id){let p=c(this,tr).getMVFFeatureByNodeId("connection",i.properties.id);s.push(X(this,Ha,$d).call(this,"TakeConnection",a,u,p==null?void 0:p.type))}else if(o&&o.id!==a.id){let p=c(this,tr).getMVFFeatureByNodeId("connection",i.properties.id);s.push(X(this,Ha,$d).call(this,"ExitConnection",a,o,p==null?void 0:p.type))}else s.push(X(this,Bu,q3).call(this,e,i));return n||s.push({type:"Arrival"}),s},"#getActions"),Ha=new WeakSet,$d=l(function(t,e,i,n){let o=e.elevation-i.elevation,a="none";return o>0?a="down":o<0&&(a="up"),{type:t,fromFloor:e,toFloor:i,direction:a,connectionType:n!=null?n:"stairs"}},"#createConnectionAction"),Bu=new WeakSet,q3=l(function(t,e){let i=t?-Y3(t.properties.angle,e.properties.angle):0;return Math.abs(i)>=Z3?{type:"Turn",bearing:W3(i,Z3),referencePosition:"At"}:null},"#createTurnAction"),l(Jd,"Directions");var ku=Jd,Kd=class Kd{navigator;connections;constructor({nodes:t,obstructions:e,connections:i,groupBy:n}){this.navigator=new Ga({nodes:t,obstructions:this.createObstructionCollection(e),groupBy:n}),this.connections=i}getDirections=(t,e,i,n)=>{let{accessible:o,smoothing:{enabled:a,radius:u}}=i,s=t.flatMap(x=>this.getNodesFromTarget(x,n)),p=e.flatMap(x=>this.getNodesFromTarget(x,n)),f=this.getExcludedNodeIds(o).filter(x=>!s.includes(x)&&!p.includes(x)),m=this.navigator.getDirections({zones:i.zones.map(x=>{var S;return{geometry:x.geometry,cost:x.cost,map:(S=x.floor)==null?void 0:S.id}}),originIds:s,destinationNodeIds:p,excludedNodeIds:f,simplify:{enabled:a,bufferRadius:u}});this.addCoordinateDirections(m,t,e);let y=new ku(m,n);if(!(y.distance===0&&new Set([...s,...p]).size===s.length+p.length))return y};getExcludedNodeIds=t=>t?this.connections.reduce((e,i)=>i.accessible?e:e.concat(i.nodes),[]):[];addCoordinateDirections=(t,[e],[i])=>{if(t.features.length){if(tt.is(e)){let n=this.createDirectionFeature(e,this.navigator.getAngle([e.longitude,e.latitude],t.features[0].geometry.coordinates),this.navigator.getDistance([e.longitude,e.latitude],t.features[0].geometry.coordinates));t.features.splice(0,0,n)}if(tt.is(i)){let n=this.createDirectionFeature(i,0,0),o=t.features[t.features.length-1];o.properties.distance=this.navigator.getDistance(o.geometry.coordinates,[i.longitude,i.latitude]),o.properties.angle=this.navigator.getAngle(o.geometry.coordinates,[i.longitude,i.latitude]),t.features.push(n)}}};getNodesFromTarget=(t,e)=>{if(tt.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t));return i?[i.properties.id]:[]}else if(Qr.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t.coordinate));return i?[i.properties.id]:[]}else if($r.is(t)){let i=this.navigator.findNearestNode(this.createCoordinateFeature(t.center));return i?[i.properties.id]:[]}else if(_e.is(t)){let i=e==null?void 0:e.getMVFFeatureById("space",t.id);return i==null?[]:i.properties.destinationNodes}else{if(ti.is(t))return t.coordinates.reduce((i,n)=>{let o=this.navigator.findNearestNode(this.createCoordinateFeature(n));return o&&i.push(o.properties.id),i},[]);if(Oe.is(t)){let i=e==null?void 0:e.objectEntranceNodeIdsByObstructionId[t.id];return i!=null?i:[]}else return[]}};createObstructionCollection(t){return{type:"FeatureCollection",features:Object.entries(t).reduce((e,[i,n])=>e.concat(n.features.map(o=>(o.properties.map=i,o))),[])}}createCoordinateFeature=t=>({type:"Feature",geometry:{type:"Point",coordinates:[t.longitude,t.latitude]},properties:{map:t.floorId}});createDirectionFeature=(t,e,i)=>({type:"Feature",geometry:{type:"Point",coordinates:[t.longitude,t.latitude]},properties:{groupBy:t.floorId,id:t.id,angle:e,distance:i}})};l(Kd,"DirectionsInternal");var Nu=Kd;d();var so,Qd=class Qd{constructor({currentMapGetter:t}){P(this,so,void 0);E(this,so,t)}get currentMap(){return c(this,so).call(this)}async getCurrentSceneGLTF(t){let e=c(this,so).call(this);return e?e==null?void 0:e.Exporter.getCurrentSceneGLTF(t):(B.error("There is no map to export. Please load a map first."),new Blob)}};so=new WeakMap,l(Qd,"Exporter");var Xa=Qd;d();var er,Ya,tf=class tf{constructor({currentMapGetter:t}){P(this,er,new Map);P(this,Ya,void 0);E(this,Ya,t)}get currentMap(){return c(this,Ya).call(this)}getById(t){return c(this,er).get(t)}add(t,e,i){let n=Qe(t);if(!n)throw new Error("get coordinate failed");let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let a=o.Labels.add(si(n),e,{...i,floorId:n.floorId,rank:(i==null?void 0:i.rank)||"medium"}),u=new ni(a.id.toString(),e);return c(this,er).set(u.id,{label:u,entityId:u.id}),u}all(){var e;let t=[];return(e=this.currentMap)==null||e.Labels.all({onCreate:(i,n)=>{let o=new ni(i.toString(),n);c(this,er).set(o.id,{label:o,entityId:o.id}),t.push(o)}}),t}remove(t){var i;let e=c(this,er).get(t.id);e&&((i=this.currentMap)==null||i.Labels.remove(e.entityId),c(this,er).delete(t.id.toString()))}removeAll(){let t=[];return c(this,er).forEach(({label:e})=>{this.remove(e),t.push(e),c(this,er).delete(e.id.toString())}),t}};er=new WeakMap,Ya=new WeakMap,l(tf,"Labels");var ja=tf;d();d();var $3={altitude:0,height:1,color:"#ffffff",opacity:1,width:.15},ef=class ef{id;name;elevation;containerId;loaded=!1;styleMap={};obstructions;entrances;spaces;renderer;options;layers=new Map;constructor(t,e,i,n,o,a){this.id=e.id,this.options=n;let u=i.addGroupContainer(this.id,{visible:!1,interactive:!0},t);this.containerId=u.id.toString(),this.name=e.externalId,this.elevation=e.elevation,o!=null&&a!=null&&(this.styleMap=a,this.spaces=o.space[this.id],this.entrances=o.entrance[this.id],this.obstructions=o.obstruction[this.id]),this.renderer=i}load=()=>{var t,e;if(this.loaded||this.obstructions==null&&this.spaces==null)return this;if(this.loaded=!0,this.spaces!=null&&this.spaces.features.length>0){let i=this.spaces.features.filter(u=>{var s;return u.geometry.type==="Polygon"&&((s=u.properties.kind)==null?void 0:s.toLowerCase())!=="void"}),n=qd(i,this.styleMap),o=this.renderer.addGroupContainer(`spaces-${this.id}`,{},this.id),a=0;for(let[u,s]of n){let p=this.renderer.addGeometryGroup(`Spaces-${this.id}-${a}`,{features:s},Va(u,this.options),o);a++;let f=p.id.toString();this.layers.set(u.id||f,p.id.toString())}}if(this.obstructions!=null&&this.obstructions.features.length>0){let i=this.obstructions.features.filter(y=>y.geometry.type==="Polygon"&&y.properties.kind==="object"),n=qd(i,this.styleMap),o=this.renderer.addGroupContainer(`objects-${this.id}`,{},this.id),a=0;for(let[y,x]of n){let S=this.renderer.addGeometryGroup(`Objects-${this.id}-${a}`,{features:x},Va(y,this.options),o);a++;let M=S.id.toString();this.layers.set(y.id||M,M)}let u=this.obstructions.features.filter(y=>y.geometry.type==="LineString"&&y.properties.kind==="Wall"&&y.properties.footprintComponent===!1),s=this.obstructions.features.filter(y=>y.geometry.type==="LineString"&&y.properties.kind==="Wall"&&y.properties.footprintComponent===!0),p=this.entrances,f=$3,m=$3;if(u!=null&&u.length>0){let y=this.styleMap[(t=u[0].properties)==null?void 0:t.id];y!=null&&(f={...y}),m=f;let x=this.renderer.addGeometryGroup(`Walls-${this.id}`,{features:[zd(u,(p==null?void 0:p.features)||[])]},Va(f,this.options),this.id),S=x.id.toString();this.layers.set(f.id||S,x.id.toString())}if(s!=null&&s.length>0){let y=this.styleMap[(e=s[0].properties)==null?void 0:e.id];y!=null&&(m={...y,id:Di});let x=this.renderer.addGeometryGroup(`ExteriorWalls-${this.id}`,{features:[zd(s,(p==null?void 0:p.features)||[])]},Va(m,this.options),this.id),S=x.id.toString();this.layers.set(m.id||S,x.id.toString())}}return this.renderer.render(),this}};l(ef,"FloorObject");var Fu=ef;var vn=Br(lo());d();d();d();d();(function(){typeof globalThis!="object"&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();d();d();d();var Z9="#ffffff",li,af=class af{constructor(t={}){v(this,"color",Z9);v(this,"topColor");v(this,"opacity",1);P(this,li,void 0);v(this,"outline",!0);var e,i;this.color=(e=t==null?void 0:t.color)!=null?e:this.color,this.topColor=t==null?void 0:t.topColor,this.opacity=(i=t==null?void 0:t.opacity)!=null?i:this.opacity,this.shading=t==null?void 0:t.shading,this.outline=(t==null?void 0:t.outline)!==void 0?!!t.outline:this.outline}get shading(){return c(this,li)}set shading(t){var e;if(!t){E(this,li,void 0);return}E(this,li,(e=c(this,li))!=null?e:{start:0,end:0,intensity:0}),Object.assign(c(this,li),t)}};li=new WeakMap,l(af,"GeometryGroupStyleComponent");var $i=af;var sf=class sf extends Ie{visible=!0;type="geometry-group";components;userData={entityId:"",entities3D:new Set,opacity:1,dirty:!0,outlineDirty:!0,shadingDirty:!0};setVisible(t){this.visible=t,this.dispatchEvent({type:"childremoved",child:this})}getOpacity(){return this.userData.opacity}setOpacity(t){this.userData.opacity=t}removeEntity(){this.dispatchEvent({type:"childremoved",child:this})}constructor(t,e=new $i){super(),this.components=[e],this.userData.entityId=t}};l(sf,"GeometryGroupObject3D");var Ft=sf;d();var lf=class lf extends Ie{};l(lf,"Geometry2DObject3D");var uo=lf,uf=class uf{id;get type(){return this.components[0].type}get parent(){return this.object3d.parent}positionDirty=!0;object3d=new uo;components;disposed=!1;constructor(t,e){this.id=t.id||Q(),this.components=[t],this.object3d=new uo,this.object3d.position.copy(e),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type}worldPosition=new W;get position(){return this.object3d.getWorldPosition(this.worldPosition),this.worldPosition}};l(uf,"Geometry2D");var Ce=uf;d();var cf=class cf extends Ie{userData={entityId:"",type:"geometry"}};l(cf,"Geometry3DObject3D");var rr=cf,pf=class pf{id=Q();components;get object3d(){return this.components[0].mesh}get parent(){var t;return(t=this.components[0].mesh)==null?void 0:t.parent}get type(){return this.components[0].type}constructor(t,e){this.components=[t,e]}};l(pf,"Geometry3D");var dt=pf;var Wa=class Wa extends Ie{childrenIds=new Set;type="group-container";userData={entityId:"",entities2D:new Set,dirty:!0};components=[];constructor(t){super(),this.userData.entityId=t}addEntity(t){t instanceof Wa?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof Ce?(this.childrenIds.add(t.id),this.add(t.object3d),this.userData.entities2D.add(t.id)):t instanceof Ft?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof dt&&t.object3d&&(this.childrenIds.add(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(t){t instanceof Wa?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof Ce?(this.childrenIds.delete(t.id),this.userData.entities2D.delete(t.id),this.remove(t.object3d)):t instanceof Ft?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof dt&&t.object3d&&(this.childrenIds.delete(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(t){this.visible=t,this.dispatchEvent({type:"childremoved",child:this})}setAltitude(t){this.position.z=t,this.dispatchEvent({type:"childremoved",child:this})}get altitude(){return this.position.z}};l(Wa,"GroupContainerObject3D");var wt=Wa;d();var J3=!1;function K3(){J3=!0}l(K3,"enableTestMode");var hf=class hf{backgroundAlpha=1;backgroundColor=new It;width=0;height=0;options={};renderer;constructor(t,e=2){try{this.options=t;let i={canvas:t.canvas,alpha:t.alpha||!1,stencil:!1,antialias:typeof t.antialias=="boolean"?t.antialias:!0,outputColorSpace:Ci,powerPreference:"high-performance",preserveDrawingBuffer:!0};J3?(this.renderer={setSize:()=>{},state:{reset:()=>{}},properties:{get:()=>{}},getSize:()=>({width:window.innerWidth,height:innerHeight}),getDrawingBufferSize:()=>({width:window.innerWidth,height:innerHeight}),getClearAlpha:()=>1,getClearColor:()=>new It,autoUpdate:!0,shadowMap:{autoUpdate:!0},getContext:()=>({getContextAttributes(){return{alpha:!0,antialias:!1,depth:!0,stencil:!1}}}),setRenderTarget:()=>{},setClearColor:()=>{},clear:()=>{},render:()=>{},domElement:document.createElement("canvas"),capabilities:{isWebGL2:!0}},this.renderer.domElement.style.width="1920px",Object.defineProperty(this.renderer.domElement,"clientWidth",{value:1920}),this.renderer.domElement.style.height="1080px",Object.defineProperty(this.renderer.domElement,"clientHeight",{value:1080})):this.renderer=e===2?new L1(i):new D1(i),this.backgroundColor=new It,this.backgroundAlpha=1}catch(i){B.error(i),t.onWebGLRendererError&&t.onWebGLRendererError(i)}}destroy(){var t,e;this.renderer&&((e=(t=this.renderer).dispose)==null||e.call(t))}render(t,e){this.renderer&&(this.renderer.state.reset(),e.layers.enable(0),e.layers.enable(1),this.renderer.autoClear=!1,this.renderer.setRenderTarget(null),this.renderer.render(t,e),this.renderer.state.reset())}clear(){this.renderer&&(this.renderer.setClearColor(this.backgroundColor,this.backgroundAlpha),this.renderer.clear())}setBufferSize(t,e){b.env.NODE_ENV==="test"||!this.renderer||(this.width=t,this.height=e,this.renderer.setSize(t,e,!1))}setBackgroundColor(t,e){this.backgroundColor=t,this.backgroundAlpha=e}domElement(){var t;return(t=this.renderer)==null?void 0:t.domElement}};l(hf,"Renderer");var Gu=hf;d();d();var ui=63710088e-1,Q3=-85.051129,tb=85.051129,Vu=1e4,df={chain:"chain",cancel:"cancel"},ff=Math.PI*2,Ua=100,eb=1e4,mf=0,yf=22;var gf=["change","pan-start","pan-end","rotate-start","rotate-end","zoom-start","zoom-end","multi-start","multi-end","multi-cancel","pedestal-start","pedestal-change","pedestal-end","user-pan-start","user-pedestal-start","user-rotate-start","user-dolly-start","user-zoom-start","user-tilt-start","user-pan-end","user-pedestal-end","user-rotate-end","user-dolly-end","user-zoom-end","user-tilt-end","position-updated","zoom-updated","tilt-updated","rotation-updated"];d();var Za="mappedin";d();function vf(r){let t=r.min,e=r.max,i=new W(t.x,t.y,t.z),n=new W(e.x,t.y,t.z),o=new W(t.x,e.y,t.z),a=new W(e.x,e.y,t.z);return[i,n,o,a]}l(vf,"getCornersOfBoundingBox");d();function ci(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}l(ci,"getPixelRatio");d();function nr(r,t,e=!1){let i=null,n=0;return function(...o){n++,n===1&&e===!0&&r(...o);let a=l(()=>{(!e||n>1)&&r(...o),i=null,n=0},"later");clearTimeout(i),i=setTimeout(a,t)}}l(nr,"debounce");d();var z9=(()=>{let r;return{getDeviceType(){if(r)return r;let{userAgent:t,platform:e,maxTouchPoints:i}=window.navigator,n=/(iphone|ipod|ipad)/i.test(t),o=e==="iPad"||e.indexOf("Mac")===0&&i>0&&!window.MSStream,a=/android/i.test(t);return r={isIpad:o,isMobile:a||n||o,isSafari12:/Version\/12.+Safari/.test(t),isFirefox:/Firefox/.test(t),isWindows:/windows/i.test(t)},r},_reset(){r=void 0}}})(),ib=z9.getDeviceType,nb=(()=>{let r,t,e;function i(){if(t!==void 0)return t;r||(r=document.createElement("canvas"));let o=r.getContext("webgl")||r.getContext("experimental-webgl");if(!o)return t;try{let a=ib().isFirefox?null:o.getExtension("WEBGL_debug_renderer_info");return t=a?o.getParameter(a.UNMASKED_RENDERER_WEBGL):o.getParameter(o.RENDERER),t}catch{let u=new Error("Failed getting device info");throw u.name="FailedGettingDeviceInfo",u}}l(i,"getInfo");function n(){var a,u;if(!ib().isWindows)return!1;if(e!==void 0)return e;let o=(u=(a=q9())==null?void 0:a.toLowerCase())!=null?u:"";return e=o.includes("intel")&&(o.includes("uhd")||o.includes("iris")),e}return l(n,"shouldDisableOffscreenCanvas"),{getInfo:i,shouldDisableOffscreenCanvas:n,_setCanvas(o){r=o,t=void 0,e=void 0}}})(),q9=nb.getInfo,bf=nb.shouldDisableOffscreenCanvas;d();function Hu(r,t,e,i){let n=r*(Math.PI/180),o=i/ui,a=r+o*180/Math.PI,u=e/ui/Math.cos(n),s=t+u*180/Math.PI;return{lat:a,lon:s}}l(Hu,"cartesianToGeographic");function Xu(r,t,e,i){let n=e*(Math.PI/180),o=i*(Math.PI/180),a=r*(Math.PI/180),u=t*(Math.PI/180),s=n-a,p=o-u,f=ui*p*Math.cos(a),m=ui*s;return{x:f,y:m}}l(Xu,"geographicToCartesian");var Cf=l((r,t=[])=>{var e;if(r.children&&r.visible)for(let i of r.children){if(i.visible)if((e=i.userData)!=null&&e.entities3D&&i.type==="geometry-group"){t.push(i.userData.entityId);for(let n of i.userData.entities3D.values())t.push(n)}else(i.type==="group-container"||i.type==="custom-geometry"||i instanceof rr)&&t.push(i.userData.entityId);Cf(i,t)}return t},"extract3DEntitiesFromTree"),xf=l((r,t)=>{var e;if(r.children&&r.visible&&!((e=r.userData)!=null&&e.hidden))for(let i of r.children)i.visible&&i instanceof uo&&t.add(i.userData.entityId),xf(i,t);return t},"extractEntitiesFromTree");function Sf(r,t){for(let e in t){if(t[e]==null){r[e]=void 0;continue}typeof t[e]=="object"?Sf(r[e],t[e]):r[e]=t[e]}return r}l(Sf,"mergeObjects");function ju(r,t,e,i){let n={translateX:r.x,translateY:r.y,translateZ:r.z,scale:r.meterInMercatorCoordinateUnits()},o=new fr,a=new W(n.scale,-n.scale,n.scale),u=new fr().makeTranslation(n.translateX,n.translateY,n.translateZ).scale(a);return{id:Za,type:"custom",renderingMode:"3d",render:(s,p)=>{if(o.fromArray(p),e.elevation>0){let f=ll.fromLngLat(r.toLngLat(),e.elevation);u.makeTranslation(n.translateX,n.translateY,-f.z).scale(a)}t.projectionMatrix=o.multiply(u),i()}}}l(ju,"createCustomLayer");function $9(r){return fetch(r,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}l($9,"fetchToken");async function ob(r){let t=await $9(r),{access_token:e}=await t.json();return{"x-mappedin-tiles-key":e}}l(ob,"getRequestHeaders");function ab(r,t=0){let e=3735928559^t,i=1103547991^t;for(let n=0,o;n<r.length;n++)o=r.charCodeAt(n),e=Math.imul(e^o,2654435761),i=Math.imul(i^o,1597334677);return e=Math.imul(e^e>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),4294967296*(2097151&i)+(e>>>0)}l(ab,"cyrb53");var J9=l(r=>r,"linearEase");function he(r,t,e,i,n,o=J9){r=Math.max(t,Math.min(r,e));let a=(r-Math.min(t,e))/Math.abs(e-t),u=o(a);return i+u*(n-i)}l(he,"interpolate");function Pf(r,t,e){let i=r*(Math.PI/180)/2,n=t/2;return e*Math.tan(i)/n}l(Pf,"getProjectionScaleFactor");function za(r,t){let e;return typeof t=="string"||typeof t=="number"?(e=r.entity2DMap.get(t),e==null&&(e=r.entity3DMap.get(t))):typeof(t==null?void 0:t.id)=="string"||typeof(t==null?void 0:t.id)=="number"?(e=r.entity2DMap.get(t.id),e==null&&(e=r.entity3DMap.get(t.id))):e=t,e}l(za,"getGeometryByGeometryId");function sb(r){return new V1(new ep(r[0][0],r[0][1]),new ep(r[1][0],r[1][1])).getCenter().toArray()}l(sb,"getBoundingBoxCenter");function lb(r){return Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y)&&(r instanceof G1||Number.isFinite(r.min.z)&&Number.isFinite(r.max.z))}l(lb,"isFiniteBox");d();d();var ub=`"use strict";(()=>{function _(n,e){return e.x+e.w<n.x+n.w&&e.x>n.x&&e.y>n.y&&e.y+e.h<n.y+n.h}function A(n,e){let[t,o]=e;return t>=n.x&&t<=n.x+n.w&&o>=n.y&&o<=n.y+n.h}function j(n,e){let t=e.x,o=e.y,i=e.x+e.w,c=e.y+e.h,a=n.x,p=n.y,g=n.x+n.w,x=n.y+n.h;return t<g&&a<i&&o<x&&p<c}function u(n,e){for(let t=0;t<e.length;t++)n.push(e[t])}var I=4,r=class{x;y;w;h;userData;constructor(e,t,o,i,c){let a=typeof window>"u"?2:window.devicePixelRatio;this.userData=typeof c>"u"?null:c,this.x=e-I,this.y=t-I,this.w=o+I*Math.min(a,2),this.h=i+I*Math.min(a,2)}contains(e){return e===this?!1:_(this,e)}intersects(e){return j(this,e)}intersectsPoint(e){return A(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.5)",e.fillRect(this.x,this.y,this.w,this.h)}};var T=class n{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(e,t){this.parent=t,this.boundary=e}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:e,y:t,w:o,h:i}=this.boundary;this.topLeft=new n(new r(e,t,o/2,i/2),this),this.topRight=new n(new r(e+o/2,t,o/2,i/2),this),this.bottomLeft=new n(new r(e,t+i/2,o/2,i/2),this),this.bottomRight=new n(new r(e+o/2,t+i/2,o/2,i/2),this),this.divided=!0}queryRect(e){let t=[];if(this.boundary.intersects(e))t.push(...this.objects);else return[];return this.divided&&(u(t,this.topLeft.queryRect(e)),u(t,this.topRight.queryRect(e)),u(t,this.bottomLeft.queryRect(e)),u(t,this.bottomRight.queryRect(e))),t}queryPoint(e){let t=[];if(this.boundary.intersectsPoint(e))t.push(...this.objects);else return[];return this.divided&&(u(t,this.topLeft.queryPoint(e)),u(t,this.topRight.queryPoint(e)),u(t,this.bottomLeft.queryPoint(e)),u(t,this.bottomRight.queryPoint(e))),t}insert(e){return this.boundary.contains(e)?this.objects.length<this.capacity?(this.objects.push(e),!0):(this.divided||this.subdivide(),(this.topLeft.insert(e)||this.topRight.insert(e)||this.bottomLeft.insert(e)||this.bottomRight.insert(e))===!1&&this.objects.push(e),!0):!1}drawObjects(e){this.objects.forEach(t=>t.draw(e)),this.divided&&(this.topLeft.drawObjects(e),this.topRight.drawObjects(e),this.bottomLeft.drawObjects(e),this.bottomRight.drawObjects(e))}draw(e){e.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(e),this.topRight.draw(e),this.bottomLeft.draw(e),this.bottomRight.draw(e)),e.strokeStyle="black",e.lineWidth=4,e.stroke()}};var d=200,P=10;function q(n,e,t,o,i,c="-1"){let a=1/0,p=1/0,g=-1/0,x=-1/0,W=new r(-P,0,5,t),X=new r(-P,0,e,5),O=new r(e-5,0,e+P,t),K=new r(0,t-5,e,t+P),Q=new r(0,t-i,o,i),Y=[W,X,O,K],D=new r(-d,-d,e+d*2,t+d*2);for(let s of n)for(let b=0;b<s.bboxes.length;b++){let{boundingBox:k}=s.bboxes[b],[h,w,l,m]=k,[S,y,N,F]=[s.y-h,s.y+w,s.x-l,s.x+m],L=N,v=S,E=F-N,M=y-S;a=Math.min(a,L)-d,p=Math.min(p,v)-d,g=Math.max(g,L+E)+d,x=Math.max(x,v+M)+d,s.bboxes[b].boundingRect=new r(L,v,E,M)}let f={msgId:c,colliders:new Array(n.length),debug:[]},C=new T(new r(a,p,g-a,x-p)),R;for(let s=0;s<n.length;s++)if(R=n[s],f.colliders[s]=[-1,!1],R.enabled){let[b,k,h]=[1/0,-1,void 0];for(let{index:w,boundingRect:l}of R.bboxes){let m=[];if(m=C.queryRect(l).filter(y=>l.intersects(y)),R.shouldCollideWithScreenEdges&&Y.forEach(y=>{l.intersects(y)&&m.push(y)}),l.intersects(Q)){f.colliders[s]=[w,!0,l];break}if(m.length<=b&&(h=l,k=w,b=m.length),m.length===0){C.insert(l),f.colliders[s]=[w,!D.contains(l),l];break}}R.rank===5&&h!=null&&(C.insert(h),f.colliders[s]=[k,!D.contains(h),h])}else f.colliders[s]=[-1,!1];return f}function z(n){let e=n[0].map(t=>{let o=t[0].map((i,c)=>({index:c,boundingBox:[i[0],i[1],i[2],i[3]]}));return{enabled:t[1]===1,rank:t[2]===1?5:0,x:t[3],y:t[4],bboxes:o}});return{msgId:"-1",totalWidth:n[3],totalHeight:n[2],watermarkWidth:n[4],watermarkHeight:n[5],colliders:e,devicePixelRatio:n[1]}}self.onmessage=n=>{let e=z(n.data);self.postMessage(q(e.colliders,e.totalWidth,e.totalHeight,e.watermarkWidth,e.watermarkHeight,e.msgId))};})();
|
|
443
|
-
`;d();d();d();d();d();function cb(r,t){return t.x+t.w<r.x+r.w&&t.x>r.x&&t.y>r.y&&t.y+t.h<r.y+r.h}l(cb,"contains");d();function pb(r,t){let[e,i]=t;return e>=r.x&&e<=r.x+r.w&&i>=r.y&&i<=r.y+r.h}l(pb,"intersectPoint");d();function hb(r,t){let e=t.x,i=t.y,n=t.x+t.w,o=t.y+t.h,a=r.x,u=r.y,s=r.x+r.w,p=r.y+r.h;return e<s&&a<n&&i<p&&u<o}l(hb,"intersects");d();function Ir(r,t){for(let e=0;e<t.length;e++)r.push(t[e])}l(Ir,"appendItems");d();var Yu=4,Mf=class Mf{x;y;w;h;userData;constructor(t,e,i,n,o){let a=typeof window>"u"?2:window.devicePixelRatio;this.userData=typeof o>"u"?null:o,this.x=t-Yu,this.y=e-Yu,this.w=i+Yu*Math.min(a,2),this.h=n+Yu*Math.min(a,2)}contains(t){return t===this?!1:cb(this,t)}intersects(t){return hb(this,t)}intersectsPoint(t){return pb(this,t)}draw(t){t.fillStyle="rgba(123,222,26, 0.5)",t.fillRect(this.x,this.y,this.w,this.h)}};l(Mf,"Rectangle");var Ot=Mf;var Ji=class Ji{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(t,e){this.parent=e,this.boundary=t}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:t,y:e,w:i,h:n}=this.boundary;this.topLeft=new Ji(new Ot(t,e,i/2,n/2),this),this.topRight=new Ji(new Ot(t+i/2,e,i/2,n/2),this),this.bottomLeft=new Ji(new Ot(t,e+n/2,i/2,n/2),this),this.bottomRight=new Ji(new Ot(t+i/2,e+n/2,i/2,n/2),this),this.divided=!0}queryRect(t){let e=[];if(this.boundary.intersects(t))e.push(...this.objects);else return[];return this.divided&&(Ir(e,this.topLeft.queryRect(t)),Ir(e,this.topRight.queryRect(t)),Ir(e,this.bottomLeft.queryRect(t)),Ir(e,this.bottomRight.queryRect(t))),e}queryPoint(t){let e=[];if(this.boundary.intersectsPoint(t))e.push(...this.objects);else return[];return this.divided&&(Ir(e,this.topLeft.queryPoint(t)),Ir(e,this.topRight.queryPoint(t)),Ir(e,this.bottomLeft.queryPoint(t)),Ir(e,this.bottomRight.queryPoint(t))),e}insert(t){return this.boundary.contains(t)?this.objects.length<this.capacity?(this.objects.push(t),!0):(this.divided||this.subdivide(),(this.topLeft.insert(t)||this.topRight.insert(t)||this.bottomLeft.insert(t)||this.bottomRight.insert(t))===!1&&this.objects.push(t),!0):!1}drawObjects(t){this.objects.forEach(e=>e.draw(t)),this.divided&&(this.topLeft.drawObjects(t),this.topRight.drawObjects(t),this.bottomLeft.drawObjects(t),this.bottomRight.drawObjects(t))}draw(t){t.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(t),this.topRight.draw(t),this.bottomLeft.draw(t),this.bottomRight.draw(t)),t.strokeStyle="black",t.lineWidth=4,t.stroke()}};l(Ji,"QuadTree");var or=Ji;d();d();var db=["","","low","medium","high","always-visible"];function fb(r){return Math.min(5,Math.max(2,r))}l(fb,"clampTierNumber");function co(r){if(typeof r=="number")return fb(r);let t=db.indexOf(r);return t===-1?3:t}l(co,"convertCollisionRankingTierToNumber");function qa(r){let t=fb(r);return db[t]}l(qa,"convertNumberToCollisionRankingTier");function mb(r,t,e){let i,n,o,a=null,u=0;e||(e={});let s=l(function(){u=e.leading===!1?0:Date.now(),a=null,o=r.apply(i,n),a||(i=n=null)},"later");return function(){let p=Date.now();!u&&e.leading===!1&&(u=p);let f=t-(p-u);return i=globalThis,n=arguments,f<=0||f>t?(a&&(clearTimeout(a),a=null),u=p,o=r.apply(i,n),a||(i=n=null)):!a&&e.trailing!==!1&&(a=setTimeout(s,f)),o}}l(mb,"throttle");function yb(r){return[r.bboxes.map(e=>[e.boundingBox[0],e.boundingBox[1],e.boundingBox[2],e.boundingBox[3]]),r.enabled?1:0,r.rank===5?1:0,r.x,r.y]}l(yb,"packCollider");var Ki=!1,K9=150,Tf=class Tf extends J{worker;debugContext;debugCanvas;dirty=!0;packedMessage=[[],0,0,0,0,0];visibleCollidersQTree=new or(new Ot(0,0,0,0));interactiveCollidersQTree=new or(new Ot(0,0,0,0));coreState;constructor(t,e,i=new Worker(URL.createObjectURL(new Blob([ub],{type:"text/javascript"})))){super(),this.coreState=e,this.debugCanvas=t,this.debugContext=t.getContext("2d"),this.worker=i,this.worker.onmessage=n=>this.resolve(n),this.postMessage=mb(this._postMessage,K9,!1),Ki?this.showCollisionBoxes():this.hideCollisionBoxes()}postMessage;showCollisionBoxes=()=>{Ki=!0,this.debugCanvas.style.display="block"};hideCollisionBoxes=()=>{Ki=!1,this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugCanvas.style.display="none"};currentMsgId="";working=!1;_postMessage=()=>{this.worker.postMessage(this.packedMessage)};componentArray=[];update=(t,e)=>{if(this.dirty){this.packedMessage=[[],0,0,0,0,0],this.componentArray=new Array(this.coreState.entity2DIds.size);let i=0,n;for(let o of this.coreState.entity2DIds){let a=this.coreState.entity2DMap.get(o);a&&(n=a.components[0],this.componentArray[i]=n),i++}this.resize(t,e),this.dirty=!1,this.componentArray.sort((o,a)=>a.rank-o.rank)}else this.componentArray.filter(n=>n.collisionDirty===!0).length>0&&this.componentArray.sort((n,o)=>o.rank-n.rank);for(let i=0;i<this.componentArray.length;i++)this.packedMessage&&(this.componentArray[i].collisionDirty||this.packedMessage[0][i]==null?(this.packedMessage[0][i]=yb(this.componentArray[i].toJSON()),this.componentArray[i].collisionDirty=!1):(this.packedMessage[0][i][1]=this.componentArray[i].enabled?1:0,this.packedMessage[0][i][2]=this.componentArray[i].rank===5?1:0,this.packedMessage[0][i][3]=this.componentArray[i].projection.x,this.packedMessage[0][i][4]=this.componentArray[i].projection.y));this.working||this.postMessage()};resize(t,e){this.packedMessage[5]=e,this.packedMessage[4]=t,this.packedMessage[3]=this.debugCanvas.width,this.packedMessage[2]=this.debugCanvas.height}resolve=t=>{if(this.working=!1,this.dirty||!t.data)return;let e=t.data.colliders,i=-1,n=!1,o,a,u;Ki&&(this.visibleCollidersQTree=new or(new Ot(0,0,this.debugCanvas.width,this.debugCanvas.height))),this.interactiveCollidersQTree=new or(new Ot(0,0,this.debugCanvas.width,this.debugCanvas.height));for(let s=0;s<this.componentArray.length;s++){let p=this.componentArray[s];e[s]==null||!p.enabled||([i,n,o]=e[s],i!==-1&&!n&&o!=null?(u=new Ot(o.x,o.y,o.w,o.h,{entityId:p.id}),Ki&&this.visibleCollidersQTree.insert(u),a=this.coreState.entity2DMap.get(p.id),(a==null?void 0:a.components[1])!=null&&this.interactiveCollidersQTree.insert(new Ot(o.x,o.y,o.w,o.h,{entityId:p.id})),p.visible===!1&&(p.visible=!0,"visibilityNeedsUpdate"in p&&(p.visibilityNeedsUpdate=!0)),i!==-1&&i!==p.activeStrategyIndex&&(p.activeBoundingBox=u,p.onStrategySelected(i))):(p.visible===!0&&(p.visible=!1,"visibilityNeedsUpdate"in p&&(p.visibilityNeedsUpdate=!0)),i!==-1&&i!==p.activeStrategyIndex&&p.onStrategySelected(i)))}Ki&&this.drawDebug(),this.publish("visibility-changed")};drawDebug=()=>{Ki&&this.visibleCollidersQTree&&(this.debugContext.clearRect(0,0,this.debugCanvas.width,this.debugCanvas.height),this.debugContext.beginPath(),this.visibleCollidersQTree.drawObjects(this.debugContext))};destroy=()=>{this.worker.terminate()}};l(Tf,"CollisionSystem");var Wu=Tf;d();d();d();d();var Ef=class Ef{type;event;constructor(t){this.type=0,this.event=t}get timestamp(){return this.event.timeStamp}};l(Ef,"Tap");var Uu=Ef,Lf=class Lf{taps=[];add(t){this.lastPointerDown&&t.timestamp-this.lastPointerDown.timestamp<50?this.lastPointerDown.type=1:this.taps.push(t)}get lastPointerDown(){return this.taps.length>=1?this.taps[this.taps.length-1]:void 0}get isSingleTapWithTwoFingers(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===1}get isSingleTapWithOneFinger(){var t;return this.isSingleTap&&((t=this.lastPointerDown)==null?void 0:t.type)===0}get isDoubleTapWithOneFinger(){var t,e;return this.isDoubleTap&&((t=this.taps[0])==null?void 0:t.type)===0&&((e=this.taps[1])==null?void 0:e.type)===0}get isSingleTap(){return this.taps.length===1}get isDoubleTap(){return this.taps.length===2}discardOutsideOfWaitWindow(t){this.taps=this.taps.filter(e=>t-e.timestamp<300)}flush(){this.taps=[]}get _taps(){return this.taps}destroy(){this.flush()}};l(Lf,"TapsController");var Zu=Lf;d();function gb(r){let t=new Set;for(let e of r){let i=e.object;for(;i.parent&&!t.has(i.parent);)i=i.parent,i instanceof wt&&i.type==="group-container"&&i.visible&&i.components[1]&&t.add(i)}return Array.from(t)}l(gb,"getUniqueIntersectedGroupContainers");function vb(r,t){if(r==null||t==null)return r===t;if(r.length!==t.length)return!1;for(let e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0}l(vb,"arraysEqual");var po,Df=class Df extends J{constructor(e,i,n,o){super();v(this,"raycaster",new Vr);v(this,"state",{hovered3DEntity:void 0,hovered2DEntity:void 0,hovered3DContainers:void 0,lastHover:void 0,containerOffset:[0,0],interaction:{mouseDownStart:void 0,distanceFromMouseDown:void 0,isPanning:!1}});v(this,"coreState");v(this,"camera");v(this,"cameraPlane");v(this,"_quadtree",new or(new Ot(0,0,0,0)));v(this,"_container");v(this,"cursor","grab");v(this,"touchesCount",0);v(this,"hasTouched",!1);P(this,po,void 0);v(this,"onPointerMoveRaf",e=>{c(this,po)&&cancelAnimationFrame(c(this,po)),E(this,po,requestAnimationFrame(()=>{this.onPointerMove(e)}))});v(this,"onPointerMove",e=>{e.preventDefault(),this.updateInteractionStateIfPanning(e),(e.pointerType!=="touch"||e.pointerType===void 0&&this.hasTouched)&&this.handleHover(e),this.handleCursor()});v(this,"tapsControl",new Zu);v(this,"onPointerDown",e=>{e.target===this._container&&(this._container.addEventListener("pointerup",this.onPointerUp,!1),this._container.addEventListener("pointercancel",this.onPointerUp,!1),this.state.interaction.mouseDownStart={time:Date.now(),timestamp:e.timeStamp,clientX:e.clientX,clientY:e.clientY},this.state.interaction.distanceFromMouseDown=0,this.handleCursor(),e.pointerType==="touch"&&(this.tapsControl.add(new Uu(e)),this.touchesCount=Math.max(0,this.touchesCount+1)))});v(this,"clickTimeout");v(this,"onPointerUp",e=>{this.tapsControl.discardOutsideOfWaitWindow(e.timeStamp),this.touchesCount=Math.max(0,this.touchesCount-1),this.touchesCount===0&&(this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)),this.updateInteractionStateIfPanning(e);let{mouseDownStart:i}=this.state.interaction;!i||this.state.interaction.distanceFromMouseDown==null||(Date.now()<i.time+300&&(this.tapsControl.isSingleTapWithTwoFingers||this.state.interaction.distanceFromMouseDown<=15)&&(e.pointerType==="touch"?this.tapsControl.isSingleTapWithTwoFingers?(this.publish("singletap-with-twofinger",e),this.flush()):this.tapsControl.isSingleTapWithOneFinger&&this.touchesCount===0?(this.clickTimeout&&clearTimeout(this.clickTimeout),this.clickTimeout=window.setTimeout(()=>{this.handleClick(e),this.flush()},300)):this.tapsControl.isDoubleTapWithOneFinger&&(this.publish("doubletap-with-onefinger",e),this.flush()):this.handleClick(e)),this.state.interaction.mouseDownStart=void 0,this.state.interaction.distanceFromMouseDown=void 0,this.state.interaction.isPanning=!1,this.handleCursor())});v(this,"dirty3D",!0);v(this,"cachedHitBoxes",{entities:[],groups:[]});v(this,"ndcPoint",new U);v(this,"debugPanel");this.raycaster.layers.enableAll(),this.raycaster.layers.disable(1);let{top:a,left:u}=e.getBoundingClientRect();this.state.containerOffset=[a,u],this.camera=n,this._container=e,this.coreState=i,this.cameraPlane=o,this._container.addEventListener("pointerdown",this.onPointerDown,!1),this._container.addEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.classList.add("mappedin-interactive")}updateQuadtree(e){this._quadtree=e}setHovered3DEntityInteractionComponentDirty(){if(this.state.hovered3DEntity){let e=this.state.hovered3DEntity.components[2];e&&(e.dirty=!0)}}flush(){this.tapsControl.flush(),this.clickTimeout!=null&&(clearTimeout(this.clickTimeout),this.clickTimeout=void 0)}handleHover(e){if(this.state.interaction.mouseDownStart)return;let{entity3D:i,entity2D:n,position:o,groupContainers:a}=this.intersect(e);(this.handle3DEntityHover(i)||this.handle2DEntityHover(n)||this.handle3DContainerHover(a))&&this.publish("hover",{entity2D:this.state.hovered2DEntity,entity3D:this.state.hovered3DEntity,position:o,groupContainers:a}),this.handleCursor()}handleCursor(){let e=!!(this.state.hovered3DEntity||this.state.hovered2DEntity),i=!!this.state.interaction.mouseDownStart,n=this.state.interaction.isPanning,o=rx(e,n,i);this.cursor!==o&&(this.cursor=o,o==="pointer"?this._container.classList.add("mappedin-interaction-hover"):this._container.classList.remove("mappedin-interaction-hover"))}handle2DEntityHover(e){let i=this.state.hovered2DEntity!==e;return this.state.hovered2DEntity=e,i}handleClick(e){let i=this.intersect(e);this.publish("click",{entity2D:i.entity2D,entity3D:i.entity3D,position:i.position,groupContainers:i.groupContainers,pointerEvent:{button:e.button}})}get _hitBoxes(){if(this.dirty3D){this.cachedHitBoxes.entities=[],this.cachedHitBoxes.groups=[];let e;for(let i of this.coreState.threeDEntities)e=this.coreState.entity3DMap.get(i),((e==null?void 0:e.type)==="geometry"||(e==null?void 0:e.type)==="model")&&e.components[2]?e.components[0].mesh&&!this.cachedHitBoxes.entities.includes(e.components[0].mesh)&&this.cachedHitBoxes.entities.push(e.components[0].mesh):(e==null?void 0:e.type)==="group-container"&&e.components[1]&&!this.cachedHitBoxes.groups.includes(e)&&this.cachedHitBoxes.groups.push(e);return this.dirty3D=!1,this.cachedHitBoxes}return this.cachedHitBoxes}intersect(e){var S,M;let i=[e.offsetX,e.offsetY],n=this._quadtree.queryPoint(i),[o]=n.filter(g=>g.intersectsPoint(i)),a=this.state.containerOffset[0],u=this.state.containerOffset[1];this.ndcPoint.x=(e.clientX-u)/this._container.clientWidth*2-1,this.ndcPoint.y=-((e.clientY-a)/this._container.clientHeight)*2+1,this.raycaster.setFromCamera(this.ndcPoint,this.camera),this.raycaster.layers.enable(0);let[s]=this.getMouseRayIntersects(),p=this.raycaster.intersectObjects(this._hitBoxes.entities,!0).filter(g=>g.object.visible),[f]=p,m=(S=f==null?void 0:f.instanceId)!=null?S:f==null?void 0:f.batchId,y=this.raycaster.intersectObjects(this._hitBoxes.groups,!0).filter(g=>g.object.visible),x;return y!=null&&y.length>0&&(x=gb(y)),{entity2D:((M=o==null?void 0:o.userData)==null?void 0:M.entityId)==="watermark"?{id:"watermark"}:this.coreState.entity2DMap.get(o==null?void 0:o.userData.entityId),entity3D:m!=null?this.coreState.entity3DMap.get(f==null?void 0:f.object.userData.entities[m]):this.coreState.entity3DMap.get(f==null?void 0:f.object.userData.entityId),position:s==null?void 0:s.point,groupContainers:x}}handle3DEntityHover(e){this.state.lastHover!==e&&(this.state.lastHover&&Cb(this.state.lastHover,!1),e&&Cb(e,!0));let i=this.state.hovered3DEntity!==e;return this.state.hovered3DEntity=e,this.state.lastHover=e,i}handle3DContainerHover(e){let i=!vb(this.state.hovered3DContainers,e);return this.state.hovered3DContainers=e,i}updateInteractionStateIfPanning(e){this.state.interaction.mouseDownStart&&(this.state.interaction.distanceFromMouseDown=Math.sqrt(Math.pow(e.clientX-this.state.interaction.mouseDownStart.clientX,2)+Math.pow(e.clientY-this.state.interaction.mouseDownStart.clientY,2)),!this.state.interaction.isPanning&&this.state.interaction.distanceFromMouseDown>15&&(this.state.interaction.isPanning=!0))}getMouseRayIntersects(){return this.raycaster.intersectObjects([this.cameraPlane],!1)}destroy(){this._container.removeEventListener("pointerdown",this.onPointerDown,!1),this._container.removeEventListener("pointermove",this.onPointerMoveRaf,!1),this._container.removeEventListener("pointerup",this.onPointerUp,!1),this._container.removeEventListener("pointercancel",this.onPointerUp,!1)}enableDebug(){let e=document.createElement("div");e.style.position="absolute",e.style.top="0",e.style.right="0",e.style.zIndex="1",e.style.backgroundColor="white",e.style.padding="10px",document.body.append(e),e.id="interaction-debug-panel",this.debugPanel=e,this.on("doubletap-with-onefinger",()=>{this.queueDebugMessage("doubletap-with-onefinger","#ffadad")}),this.on("singletap-with-twofinger",()=>{this.queueDebugMessage("singletap-with-twofinger","#ffd6a5")}),this.on("click",i=>{var n,o,a;this.queueDebugMessage(`CLICK
|
|
444
|
-
3D: ${(n=i.entity3D)==null?void 0:n.id}
|
|
445
|
-
2D: ${(o=i.entity2D)==null?void 0:o.id}
|
|
446
|
-
Pos: ${(a=i.position)==null?void 0:a.toArray().join(", ")}`,"#fdffb6")}),this.on("hover",i=>{var n,o,a;this.queueDebugMessage(`HOVER
|
|
447
|
-
3D: ${(n=i.entity3D)==null?void 0:n.id}
|
|
448
|
-
2D: ${(o=i.entity2D)==null?void 0:o.id}
|
|
449
|
-
Pos: ${(a=i.position)==null?void 0:a.toArray().join(", ")}`,"#caffbf")})}get _state(){return this.state}queueDebugMessage(e,i){var o;let n=document.createElement("pre");n.style.maxWidth="300px",n.style.transition="opacity 500ms cubic-bezier(0.4, 0, 0.2, 1)",n.style.backgroundColor=i,n.textContent=e,(o=this.debugPanel)==null||o.prepend(n),setTimeout(()=>{n.style.opacity="0",setTimeout(()=>{n.remove()},500)},2500)}getCursor(){return this.cursor}};po=new WeakMap,l(Df,"InteractionSystem");var $a=Df;function Cb(r,t){let e=r.components[2];e&&(e.hover=t,e.dirty=!0)}l(Cb,"updateHover");function rx(r,t,e){return t?"grabbing":r?"pointer":e?"grabbing":"grab"}l(rx,"processCursor");d();d();d();function qu(r){"@babel/helpers - typeof";return qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qu(r)}l(qu,"_typeof");var ix=/^\s+/,nx=/\s+$/;function F(r,t){if(r=r||"",t=t||{},r instanceof F)return r;if(!(this instanceof F))return new F(r,t);var e=ox(r);this._originalInput=r,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||e.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=e.ok}l(F,"tinycolor");F.prototype={isDark:l(function(){return this.getBrightness()<128},"isDark"),isLight:l(function(){return!this.isDark()},"isLight"),isValid:l(function(){return this._ok},"isValid"),getOriginalInput:l(function(){return this._originalInput},"getOriginalInput"),getFormat:l(function(){return this._format},"getFormat"),getAlpha:l(function(){return this._a},"getAlpha"),getBrightness:l(function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},"getBrightness"),getLuminance:l(function(){var t=this.toRgb(),e,i,n,o,a,u;return e=t.r/255,i=t.g/255,n=t.b/255,e<=.03928?o=e/12.92:o=Math.pow((e+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),n<=.03928?u=n/12.92:u=Math.pow((n+.055)/1.055,2.4),.2126*o+.7152*a+.0722*u},"getLuminance"),setAlpha:l(function(t){return this._a=Ib(t),this._roundA=Math.round(100*this._a)/100,this},"setAlpha"),toHsv:l(function(){var t=Sb(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},"toHsv"),toHsvString:l(function(){var t=Sb(this._r,this._g,this._b),e=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.v*100);return this._a==1?"hsv("+e+", "+i+"%, "+n+"%)":"hsva("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},"toHsvString"),toHsl:l(function(){var t=xb(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},"toHsl"),toHslString:l(function(){var t=xb(this._r,this._g,this._b),e=Math.round(t.h*360),i=Math.round(t.s*100),n=Math.round(t.l*100);return this._a==1?"hsl("+e+", "+i+"%, "+n+"%)":"hsla("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},"toHslString"),toHex:l(function(t){return Pb(this._r,this._g,this._b,t)},"toHex"),toHexString:l(function(t){return"#"+this.toHex(t)},"toHexString"),toHex8:l(function(t){return ux(this._r,this._g,this._b,this._a,t)},"toHex8"),toHex8String:l(function(t){return"#"+this.toHex8(t)},"toHex8String"),toRgb:l(function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},"toRgb"),toRgbString:l(function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},"toRgbString"),toPercentageRgb:l(function(){return{r:Math.round(ft(this._r,255)*100)+"%",g:Math.round(ft(this._g,255)*100)+"%",b:Math.round(ft(this._b,255)*100)+"%",a:this._a}},"toPercentageRgb"),toPercentageRgbString:l(function(){return this._a==1?"rgb("+Math.round(ft(this._r,255)*100)+"%, "+Math.round(ft(this._g,255)*100)+"%, "+Math.round(ft(this._b,255)*100)+"%)":"rgba("+Math.round(ft(this._r,255)*100)+"%, "+Math.round(ft(this._g,255)*100)+"%, "+Math.round(ft(this._b,255)*100)+"%, "+this._roundA+")"},"toPercentageRgbString"),toName:l(function(){return this._a===0?"transparent":this._a<1?!1:xx[Pb(this._r,this._g,this._b,!0)]||!1},"toName"),toFilter:l(function(t){var e="#"+Mb(this._r,this._g,this._b,this._a),i=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var o=F(t);i="#"+Mb(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+i+")"},"toFilter"),toString:l(function(t){var e=!!t;t=t||this._format;var i=!1,n=this._a<1&&this._a>=0,o=!e&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},"toString"),clone:l(function(){return F(this.toString())},"clone"),_applyModification:l(function(t,e){var i=t.apply(null,[this].concat([].slice.call(e)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},"_applyModification"),lighten:l(function(){return this._applyModification(dx,arguments)},"lighten"),brighten:l(function(){return this._applyModification(fx,arguments)},"brighten"),darken:l(function(){return this._applyModification(mx,arguments)},"darken"),desaturate:l(function(){return this._applyModification(cx,arguments)},"desaturate"),saturate:l(function(){return this._applyModification(px,arguments)},"saturate"),greyscale:l(function(){return this._applyModification(hx,arguments)},"greyscale"),spin:l(function(){return this._applyModification(yx,arguments)},"spin"),_applyCombination:l(function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},"_applyCombination"),analogous:l(function(){return this._applyCombination(bx,arguments)},"analogous"),complement:l(function(){return this._applyCombination(gx,arguments)},"complement"),monochromatic:l(function(){return this._applyCombination(Cx,arguments)},"monochromatic"),splitcomplement:l(function(){return this._applyCombination(vx,arguments)},"splitcomplement"),triad:l(function(){return this._applyCombination(wb,[3])},"triad"),tetrad:l(function(){return this._applyCombination(wb,[4])},"tetrad")};F.fromRatio=function(r,t){if(qu(r)=="object"){var e={};for(var i in r)r.hasOwnProperty(i)&&(i==="a"?e[i]=r[i]:e[i]=Ja(r[i]));r=e}return F(r,t)};function ox(r){var t={r:0,g:0,b:0},e=1,i=null,n=null,o=null,a=!1,u=!1;return typeof r=="string"&&(r=wx(r)),qu(r)=="object"&&(Lr(r.r)&&Lr(r.g)&&Lr(r.b)?(t=ax(r.r,r.g,r.b),a=!0,u=String(r.r).substr(-1)==="%"?"prgb":"rgb"):Lr(r.h)&&Lr(r.s)&&Lr(r.v)?(i=Ja(r.s),n=Ja(r.v),t=lx(r.h,i,n),a=!0,u="hsv"):Lr(r.h)&&Lr(r.s)&&Lr(r.l)&&(i=Ja(r.s),o=Ja(r.l),t=sx(r.h,i,o),a=!0,u="hsl"),r.hasOwnProperty("a")&&(e=r.a)),e=Ib(e),{ok:a,format:r.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}l(ox,"inputToRGB");function ax(r,t,e){return{r:ft(r,255)*255,g:ft(t,255)*255,b:ft(e,255)*255}}l(ax,"rgbToRgb");function xb(r,t,e){r=ft(r,255),t=ft(t,255),e=ft(e,255);var i=Math.max(r,t,e),n=Math.min(r,t,e),o,a,u=(i+n)/2;if(i==n)o=a=0;else{var s=i-n;switch(a=u>.5?s/(2-i-n):s/(i+n),i){case r:o=(t-e)/s+(t<e?6:0);break;case t:o=(e-r)/s+2;break;case e:o=(r-t)/s+4;break}o/=6}return{h:o,s:a,l:u}}l(xb,"rgbToHsl");function sx(r,t,e){var i,n,o;r=ft(r,360),t=ft(t,100),e=ft(e,100);function a(p,f,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?p+(f-p)*6*m:m<1/2?f:m<2/3?p+(f-p)*(2/3-m)*6:p}if(l(a,"hue2rgb"),t===0)i=n=o=e;else{var u=e<.5?e*(1+t):e+t-e*t,s=2*e-u;i=a(s,u,r+1/3),n=a(s,u,r),o=a(s,u,r-1/3)}return{r:i*255,g:n*255,b:o*255}}l(sx,"hslToRgb");function Sb(r,t,e){r=ft(r,255),t=ft(t,255),e=ft(e,255);var i=Math.max(r,t,e),n=Math.min(r,t,e),o,a,u=i,s=i-n;if(a=i===0?0:s/i,i==n)o=0;else{switch(i){case r:o=(t-e)/s+(t<e?6:0);break;case t:o=(e-r)/s+2;break;case e:o=(r-t)/s+4;break}o/=6}return{h:o,s:a,v:u}}l(Sb,"rgbToHsv");function lx(r,t,e){r=ft(r,360)*6,t=ft(t,100),e=ft(e,100);var i=Math.floor(r),n=r-i,o=e*(1-t),a=e*(1-n*t),u=e*(1-(1-n)*t),s=i%6,p=[e,a,o,o,u,e][s],f=[u,e,e,a,o,o][s],m=[o,o,u,e,e,a][s];return{r:p*255,g:f*255,b:m*255}}l(lx,"hsvToRgb");function Pb(r,t,e,i){var n=[Fe(Math.round(r).toString(16)),Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}l(Pb,"rgbToHex");function ux(r,t,e,i,n){var o=[Fe(Math.round(r).toString(16)),Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Eb(i))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}l(ux,"rgbaToHex");function Mb(r,t,e,i){var n=[Fe(Eb(i)),Fe(Math.round(r).toString(16)),Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16))];return n.join("")}l(Mb,"rgbaToArgbHex");F.equals=function(r,t){return!r||!t?!1:F(r).toRgbString()==F(t).toRgbString()};F.random=function(){return F.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function cx(r,t){t=t===0?0:t||10;var e=F(r).toHsl();return e.s-=t/100,e.s=$u(e.s),F(e)}l(cx,"_desaturate");function px(r,t){t=t===0?0:t||10;var e=F(r).toHsl();return e.s+=t/100,e.s=$u(e.s),F(e)}l(px,"_saturate");function hx(r){return F(r).desaturate(100)}l(hx,"_greyscale");function dx(r,t){t=t===0?0:t||10;var e=F(r).toHsl();return e.l+=t/100,e.l=$u(e.l),F(e)}l(dx,"_lighten");function fx(r,t){t=t===0?0:t||10;var e=F(r).toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(t/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(t/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(t/100)))),F(e)}l(fx,"_brighten");function mx(r,t){t=t===0?0:t||10;var e=F(r).toHsl();return e.l-=t/100,e.l=$u(e.l),F(e)}l(mx,"_darken");function yx(r,t){var e=F(r).toHsl(),i=(e.h+t)%360;return e.h=i<0?360+i:i,F(e)}l(yx,"_spin");function gx(r){var t=F(r).toHsl();return t.h=(t.h+180)%360,F(t)}l(gx,"_complement");function wb(r,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var e=F(r).toHsl(),i=[F(r)],n=360/t,o=1;o<t;o++)i.push(F({h:(e.h+o*n)%360,s:e.s,l:e.l}));return i}l(wb,"polyad");function vx(r){var t=F(r).toHsl(),e=t.h;return[F(r),F({h:(e+72)%360,s:t.s,l:t.l}),F({h:(e+216)%360,s:t.s,l:t.l})]}l(vx,"_splitcomplement");function bx(r,t,e){t=t||6,e=e||30;var i=F(r).toHsl(),n=360/e,o=[F(r)];for(i.h=(i.h-(n*t>>1)+720)%360;--t;)i.h=(i.h+n)%360,o.push(F(i));return o}l(bx,"_analogous");function Cx(r,t){t=t||6;for(var e=F(r).toHsv(),i=e.h,n=e.s,o=e.v,a=[],u=1/t;t--;)a.push(F({h:i,s:n,v:o})),o=(o+u)%1;return a}l(Cx,"_monochromatic");F.mix=function(r,t,e){e=e===0?0:e||50;var i=F(r).toRgb(),n=F(t).toRgb(),o=e/100,a={r:(n.r-i.r)*o+i.r,g:(n.g-i.g)*o+i.g,b:(n.b-i.b)*o+i.b,a:(n.a-i.a)*o+i.a};return F(a)};F.readability=function(r,t){var e=F(r),i=F(t);return(Math.max(e.getLuminance(),i.getLuminance())+.05)/(Math.min(e.getLuminance(),i.getLuminance())+.05)};F.isReadable=function(r,t,e){var i=F.readability(r,t),n,o;switch(o=!1,n=Tx(e),n.level+n.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7;break}return o};F.mostReadable=function(r,t,e){var i=null,n=0,o,a,u,s;e=e||{},a=e.includeFallbackColors,u=e.level,s=e.size;for(var p=0;p<t.length;p++)o=F.readability(r,t[p]),o>n&&(n=o,i=F(t[p]));return F.isReadable(r,i,{level:u,size:s})||!a?i:(e.includeFallbackColors=!1,F.mostReadable(r,["#fff","#000"],e))};var _f=F.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},xx=F.hexNames=Sx(_f);function Sx(r){var t={};for(var e in r)r.hasOwnProperty(e)&&(t[r[e]]=e);return t}l(Sx,"flip");function Ib(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}l(Ib,"boundAlpha");function ft(r,t){Px(r)&&(r="100%");var e=Mx(r);return r=Math.min(t,Math.max(0,parseFloat(r))),e&&(r=parseInt(r*t,10)/100),Math.abs(r-t)<1e-6?1:r%t/parseFloat(t)}l(ft,"bound01");function $u(r){return Math.min(1,Math.max(0,r))}l($u,"clamp01");function de(r){return parseInt(r,16)}l(de,"parseIntFromHex");function Px(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}l(Px,"isOnePointZero");function Mx(r){return typeof r=="string"&&r.indexOf("%")!=-1}l(Mx,"isPercentage");function Fe(r){return r.length==1?"0"+r:""+r}l(Fe,"pad2");function Ja(r){return r<=1&&(r=r*100+"%"),r}l(Ja,"convertToPercentage");function Eb(r){return Math.round(parseFloat(r)*255).toString(16)}l(Eb,"convertDecimalToHex");function Tb(r){return de(r)/255}l(Tb,"convertHexToDecimal");var Be=function(){var r="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",e="(?:"+t+")|(?:"+r+")",i="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Lr(r){return!!Be.CSS_UNIT.exec(r)}l(Lr,"isValidCSSUnit");function wx(r){r=r.replace(ix,"").replace(nx,"").toLowerCase();var t=!1;if(_f[r])r=_f[r],t=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e;return(e=Be.rgb.exec(r))?{r:e[1],g:e[2],b:e[3]}:(e=Be.rgba.exec(r))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=Be.hsl.exec(r))?{h:e[1],s:e[2],l:e[3]}:(e=Be.hsla.exec(r))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=Be.hsv.exec(r))?{h:e[1],s:e[2],v:e[3]}:(e=Be.hsva.exec(r))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=Be.hex8.exec(r))?{r:de(e[1]),g:de(e[2]),b:de(e[3]),a:Tb(e[4]),format:t?"name":"hex8"}:(e=Be.hex6.exec(r))?{r:de(e[1]),g:de(e[2]),b:de(e[3]),format:t?"name":"hex"}:(e=Be.hex4.exec(r))?{r:de(e[1]+""+e[1]),g:de(e[2]+""+e[2]),b:de(e[3]+""+e[3]),a:Tb(e[4]+""+e[4]),format:t?"name":"hex8"}:(e=Be.hex3.exec(r))?{r:de(e[1]+""+e[1]),g:de(e[2]+""+e[2]),b:de(e[3]+""+e[3]),format:t?"name":"hex"}:!1}l(wx,"stringInputToObject");function Tx(r){var t,e;return r=r||{level:"AA",size:"small"},t=(r.level||"AA").toUpperCase(),e=(r.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),e!=="small"&&e!=="large"&&(e="small"),{level:t,size:e}}l(Tx,"validateWCAG2Parms");var jf=Br(o4());var yo={margin:6,text:{numLines:2,lineHeight:1.2,size:11.5,maxWidth:150,foregroundColor:"white",backgroundColor:"#333"},marker:{size:5,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},vP={lightOnDark:{...yo,text:{...yo.text,foregroundColor:"white",backgroundColor:"#333"},marker:{...yo.marker,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},darkOnLight:{...yo,text:{...yo.text,foregroundColor:"#333",backgroundColor:"white"},marker:{...yo.marker,foregroundColor:{active:"#333",inactive:void 0},backgroundColor:{active:"white",inactive:void 0}}}},bP="LOW_PRIORITY",a4=4,CP=6,xP=20,SP=2.5,PP=2,MP="cover",s4=.5,wP=6.5,l4={heightAbovePolygon:0,appearance:vP.darkOnLight};var en=class en{lines=0;id;rank;type="label";initialRank;contextConfigured=!1;fillText=void 0;newStyle={};opacity=0;visibilityNeedsUpdate=!0;activeStrategyIndex=-1;text;style={top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"};projection=new U;_cache={};appearance;options;visible=!1;enabled=!0;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};currentStrategyIndex=-1;totalMarkerSize=0;dirty=!0;collisionDirty=!0;lastTextAlign;imageHash;markerSize=0;iconVisible=!1;zoomProportion=0;dp;setEntity(){}constructor(t,e,i){var o,a;if(this.id=(o=e.id)!=null?o:Q(),this.options=(0,jf.default)({},e,l4),this.text=t,this.dp=(u=1)=>u*i.pixelRatio,typeof e.rank=="string")this.rank=co(e.rank),this.initialRank=this.rank;else if(e.rank!=null&&e.rank>0)this.rank=e.rank,this.initialRank=e.rank;else{let u=Math.trunc(b.env.NODE_ENV==="test"?en.testId:en.testId*10)/10;en.testId+=.001,this.rank=u,this.initialRank=u}let n=(0,jf.default)({},this.options.appearance,l4.appearance);this.appearance={margin:n.margin,text:{lineHeight:n.text.lineHeight,numLines:n.text.numLines,size:n.text.size,maxWidth:n.text.maxWidth,foregroundColor:n.text.foregroundColor,backgroundColor:n.text.backgroundColor},marker:{foregroundColor:{active:n.marker.foregroundColor.active,inactive:n.marker.foregroundColor.inactive||F(n.marker.foregroundColor.active).setAlpha(.5).toRgbString()},backgroundColor:{active:n.marker.backgroundColor.active,inactive:n.marker.backgroundColor.inactive||F(n.marker.backgroundColor.active).setAlpha(.5).toRgbString()},icon:n.marker.icon,iconSize:n.marker.iconSize||xP,iconPadding:(a=n.marker.iconPadding)!=null?a:PP,iconFit:n.marker.iconFit||MP,iconVisibilityThreshold:n.marker.iconVisibilityThreshold==null?s4:n.marker.iconVisibilityThreshold}},this.calculateMarkerSize()}calculateMarkerSize(){let{iconVisibilityThreshold:t=s4}=this.appearance.marker,e=this.dp();this.zoomProportion<=t&&typeof this.appearance.marker.iconSize<"u"&&this.imageHash?(this.markerSize=this.dp(this.appearance.marker.iconSize),this.iconVisible=!0):(this.iconVisible=!1,this.markerSize=this.dp(wP)),this.totalMarkerSize=Math.ceil((this.markerSize+SP)/e)}get strategies(){let{width:t,height:e}=this.dimensions,{margin:i}=this.appearance;this.calculateMarkerSize();let n=Math.max(CP,i),o=this.iconVisible?n/2:0,a=[{name:"RIGHT",getBoundingBox:()=>{let u=Math.max(this.totalMarkerSize,e);return[u/2+n,u/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+t+n]},onStrategySelected:()=>{this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-e/2,this.newStyle.left=this.totalMarkerSize/2+a4,this.newStyle.textLabelVisible=!0}},{name:"LEFT",getBoundingBox:()=>{let u=Math.max(this.totalMarkerSize,e);return[u/2+n,u/2+n,this.totalMarkerSize/2+t+n,this.totalMarkerSize/2+n]},onStrategySelected:()=>{this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-e/2,this.newStyle.left=-t-this.totalMarkerSize/2-a4,this.newStyle.textLabelVisible=!0}},{name:"TOP",getBoundingBox:()=>{let u=this.dp();return[e+this.totalMarkerSize/2/u+n,this.totalMarkerSize/2+n,t/2+n,t/2+n]},onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-this.totalMarkerSize-e/2,this.newStyle.left=-t/2}},{name:bP,getBoundingBox:()=>[this.totalMarkerSize/2+o,this.totalMarkerSize/2+o,this.totalMarkerSize/2+o,this.totalMarkerSize/2+o],onStrategySelected:()=>{this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}];return this.text===""?[{name:"ICON_ONLY",getBoundingBox:()=>[this.totalMarkerSize/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+n,this.totalMarkerSize/2+n],onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}]:a}onStrategySelected=t=>{if(this.currentStrategyIndex===t)return;let e=this.strategies[t];e&&e.onStrategySelected(this),this.currentStrategyIndex=t;let i=this.style;this.style=this.newStyle,this.newStyle=i,this.iconVisible||(this.opacity=0,this.visibilityNeedsUpdate=!0)};updatePosition(){}disable(){this.visible=!1}toJSON(){return{x:this.projection.x,y:this.projection.y,enabled:this.enabled,id:this.id,rank:this.rank,bboxes:this.strategies.map((t,e)=>({index:e,boundingBox:t.getBoundingBox()})),shouldCollideWithScreenEdges:!1}}destroy(){}};l(en,"LabelComponent"),v(en,"testId",0);var Yf=en,sr=Yf;d();d();function u4(r){return ml(r)}l(u4,"getBoundingBoxFromFeature");var Wf=class Wf extends al{userData={entities:{}}};l(Wf,"EntityBatchedMesh");var go=Wf,is,ns,rn,Uf=class Uf{constructor(t){v(this,"mesh");v(this,"outline");v(this,"type","geometry");v(this,"instanceIndex",-1);v(this,"geometry");v(this,"material");v(this,"feature");v(this,"color",new It);v(this,"topColor",new It);v(this,"position",new W);P(this,is,0);P(this,ns,1);P(this,rn,void 0);v(this,"texturesVisible",!1);this.feature=t}get visible(){return this.mesh?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(t){this.mesh&&this.mesh.setVisibleAt(this.instanceIndex,t)}setOpacity(t){this.mesh&&(this.material&&(this.material.opacity=t,this.material.transparent=t<1),this.outline&&(t<.5?this.outline.visible=!1:this.outline.visible=!0),t===0?this.mesh.visible=!1:this.mesh.visible=!0)}setColor(t,e){this.color.set(t),this.topColor.set(e),this.material&&this.material.setColor(this.instanceIndex,this.color,this.topColor)}get altitude(){return c(this,is)}set altitude(t){this.mesh&&(this.mesh.position.z=t,E(this,is,t))}get opacity(){return c(this,ns)}set opacity(t){this.material&&(this.material.opacity=t,this.material.transparent=t<1,this.outline&&(this.outline.visible=t>.5),this.material.needsUpdate=!0),E(this,ns,t)}get texture(){var t,e;return(e=(t=this.material)==null?void 0:t.texture)==null?void 0:e.image.src}set texture(t){this.material&&(this.material.texture=t)}set topTexture(t){this.material&&(this.material.topTexture=t)}get topTexture(){var t,e;return(e=(t=this.material)==null?void 0:t.topTexture)==null?void 0:e.image.src}get featureBbox(){return c(this,rn)?c(this,rn):(E(this,rn,u4(this.feature)),c(this,rn))}showTextures(){this.material&&(this.material.showTextures(this.instanceIndex),this.texturesVisible=!0)}hideTextures(){this.material&&(this.material.hideTextures(this.instanceIndex),this.texturesVisible=!1)}};is=new WeakMap,ns=new WeakMap,rn=new WeakMap,l(Uf,"MeshComponent");var $t=Uf;var Zf=class Zf extends J{constructor(){super()}interpolators=new Map;addEntity3D(t,e){let[i,n,o,a]=e[1];this.interpolators.set(t,u=>he(u,i,n,o,a))}addEntity2D(t,e){let[i,n,o]=e[1];this.interpolators.set(t,a=>a<i?n:o)}addAny(t,e){this.interpolators.set(t,e)}update=t=>{for(let[e,i]of this.interpolators)e instanceof $t?e.setOpacity(i(t)):e instanceof sr?e.enabled=i(t):i(t)};destroy(){this.interpolators.clear()}};l(Zf,"ZoomInterpolationSystem");var oc=Zf;d();var nn=class nn{id;type="marker";rank=0;initialRank=0;options={};projection=new U;enabled=!0;activeStrategyIndex=-1;strategyIndex=-1;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};containerEl;contentEl=null;contentHtml="";style={top:"0px",left:"0px"};dirty=!1;collisionDirty=!0;visibilityNeedsUpdate=!0;constructor(t,e={}){if(this.id=(e==null?void 0:e.id)||Q(),this.options=e,typeof e.rank=="string")this.rank=co(e.rank);else if(e.rank!=null&&e.rank>0)this.rank=e.rank;else{let n=Math.trunc(b.env.NODE_ENV==="test"?nn.testId:nn.testId*10)/10;nn.testId+=.001,this.rank=n}this.contentHtml=t,this.initialRank=this.rank;let i=document.createElement("div");i.style.opacity="0",i.innerHTML=`<div class="mappedin-marker">${this.contentHtml}</div>`,this.containerEl=i.querySelector(".mappedin-marker"),this.containerEl.setAttribute("data-marker-id",this.id.toString()),this.contentEl=this.containerEl?this.containerEl.firstElementChild:null}updateDimensions(t,e){if(t!=null&&e!=null)this.dimensions={width:t,height:e};else{let{width:i,height:n}=this.containerEl.getBoundingClientRect();this.dimensions={width:i,height:n}}Object.assign(this.containerEl,{width:this.dimensions.width+"px",height:this.dimensions.height+"px"})}visible=!1;animation=null;currentStrategyIndex=-1;onStrategySelected=(t,e=!1)=>{if(this.currentStrategyIndex===t||e)return;let{width:i,height:n}=this.dimensions,o=-n/2+"px",a=-i/2+"px";switch(this.style.top=o,this.style.left=a,this.options.anchor){case"top":{this.style.top=-n+"px";break}case"bottom":{this.style.top="0px";break}case"left":{this.style.left=-i+"px";break}case"right":{this.style.left="0px";break}default:this.style.top=o,this.style.left=a}this.containerEl.style.top=this.style.top,this.containerEl.style.left=this.style.left};get strategies(){let{width:t,height:e}=this.dimensions;return[{name:"center",getBoundingBox:()=>{let i=e/2,n=e/2,o=t/2,a=t/2;switch(this.options.anchor){case"top":{i=e,n=0;break}case"bottom":{i=0,n=e;break}case"left":{o=t,a=0;break}case"right":{o=0,a=t;break}}return[i,n,o,a]}}]}toJSON(){return{x:this.projection.x,y:this.projection.y,enabled:this.enabled,id:this.id,rank:this.rank,bboxes:this.strategies.map((t,e)=>({index:e,boundingBox:t.getBoundingBox()})),shouldCollideWithScreenEdges:!1}}destroy(){}};l(nn,"MarkerComponent"),v(nn,"testId",0);var xe=nn;d();d();d();d();d();var zf=class zf{hover=!1;dirty=!1};l(zf,"InteractionComponent");var vo=zf;function fe(r,t,e){if(t!==void 0){if(r.type==="model"||r.type==="path"||r.type==="marker"||r.type==="label"||r.type==="geometry"||r.type==="group-container")return t===!0?(r instanceof Ce&&r.components[1]===void 0?(r.components[1]=new vo,r.components[1].dirty=!0):r instanceof dt&&r.components[2]===void 0?(r.components[2]=new vo,r.components[2].dirty=!0):r instanceof wt&&r.components[1]===void 0&&(r.components[1]=new vo,r.components[1].dirty=!0),!0):(r instanceof Ce?r.components[1]=void 0:r instanceof dt?r.components[2]=void 0:r instanceof wt&&(r.components[1]=void 0),!0);if(r.type==="geometry-group"){let i;for(let n of r.userData.entities3D.values())i=e.entity3DMap.get(n),fe(i,t,e);return!0}}return!1}l(fe,"updateInteractivity");function c4(r,t,e){if(e!==void 0&&r.type==="geometry-group"&&r.components[0]!=null){let i,n,o=r.components[0];for(let a of r.userData.entities3D.values())i=t.entity3DMap.get(a),i&&(n=i.components[1],n.color===o.color&&(n.initialColor=e.color||o.color,n.color=e.color||o.color,n.dirty=!0),n.topColor===o.topColor&&(n.topColor=e.topColor||o.topColor,n.dirty=!0));return e.color!==void 0&&(r.components[0].color=e.color),e.topColor!==void 0&&(r.components[0].topColor=e.topColor),!0}return!1}l(c4,"updateGroupColor");function p4(r,t){if(t!==void 0&&r.type==="geometry-group"&&r.components[0]!=null){let e=r.components[0];return e.shading=e.shading||{},e.shading&&(t.start!==e.shading.start||t.end!==e.shading.end||t.intensity!==e.shading.intensity)&&(Object.assign(e.shading,t),r.userData.shadingDirty=!0),!0}return!1}l(p4,"updateGroupShading");function h4(r,t){t!==void 0&&(r.type==="path"||r.type==="geometry")&&(t.initialColor!==void 0&&(r.components[1].initialColor=t.initialColor),t.color!==void 0&&(r.components[1].color=t.color),t.topColor!==void 0&&(r.components[1].topColor=t.topColor),r.components[1].dirty=!0)}l(h4,"updateColor");function $f(r,t,e){t!==void 0&&(r.type==="label"||r.type==="marker"?(r.object3d.position.copy(e(t[1],t[0],t[2]||0)),r.positionDirty=!0):r.type==="custom-geometry"&&r.components[0].position.copy(e(t[1],t[0],t[2]||0)))}l($f,"updatePosition");function Jf(r,t){var e;return t!==void 0&&(r.type==="marker"||r.type==="label"||r.type==="custom-geometry")&&r.parent!==t&&r.parent instanceof wt?((e=r.parent)==null||e.removeEntity(r),t.addEntity(r),!0):!1}l(Jf,"updateParent");function d4(r,t){t!==void 0&&(r.type==="marker"||r.type==="label")&&(r.components[0].enabled=t)}l(d4,"updateEnabled");function f4(r,t){if(t!==void 0&&r.type==="path"){let e=r.components[0];t.completeFraction!==void 0&&(e.completeFraction=t.completeFraction)}}l(f4,"updatePath");function m4(r,t){if(t!==void 0&&r.type==="marker"){let e=r.components[0];if(t.contentHTML!==void 0)return e.containerEl.innerHTML=t.contentHTML,!0}return!1}l(m4,"updateMarker");function y4(r,t){return t!==void 0&&(r.type==="marker"||r.type==="label")?(r.components[0].rank=co(t),!0):!1}l(y4,"updateRank");function g4(r,t){var e,i,n;if(t!==void 0&&r.type==="label"){let o=r.components[0];t.text!==void 0&&(o.text=t.text,o.dirty=!0),((e=t.options)==null?void 0:e.appearance)!==void 0&&Object.keys((i=t.options)==null?void 0:i.appearance).length>0&&(Sf(o.appearance,((n=t.options)==null?void 0:n.appearance)||{}),o.dirty=!0)}}l(g4,"updateLabel");function v4(r,t){t!==void 0&&r.type==="geometry"&&(r.components[1].hoverColor=t,r.components[1].dirty=!0)}l(v4,"updateHoverColor");function bo(r,t){if(t!==void 0){if(r.type==="model"||r.type==="path"||r.type==="geometry"||r.type==="custom-geometry"){r.components[1].visible=t,r.components[1].dirty=!0;let e=r.parent;e instanceof Ft&&(e.userData.outlineDirty=!0)}else(r.type==="group-container"||r.type==="geometry-group")&&r.setVisible(t);return!0}return!1}l(bo,"updateVisibility");function b4(r,t,e){if(e!==void 0&&r.type==="geometry-group"){r.setOpacity(e),r.components[0].opacity=e;for(let i of r.userData.entities3D.values()){let n=t.entity3DMap.get(i);((n==null?void 0:n.type)==="geometry"||(n==null?void 0:n.type)==="model")&&(n.components[1].opacity=e,n.components[1].dirty=!0)}}}l(b4,"updateOpacity");function Kf(r,t){t!==void 0&&(r.type==="model"||r.type==="path"||r.type==="geometry"||r.type==="custom-geometry"?(r.components[1].altitude=t,r.components[1].dirty=!0):r.type==="group-container"&&r.setAltitude(t))}l(Kf,"updateAltitude");function Qf(r,t){if(t!==void 0){if(r.type==="geometry-group"&&r.components[0]!=null)r.components[0].outline=t,r.userData.outlineDirty=!0;else if(r.type==="geometry"){r.components[1].outline=t,r.components[1].dirty=!0;let e=r.parent;e instanceof Ft&&(e.userData.outlineDirty=!0)}return!0}return!1}l(Qf,"updateOutline");var on,lr,ac,sc,C4,as,lc,uc,x4,cc,S4,ss,pc,ls,us,hc,em=class em{constructor(t){P(this,sc);P(this,uc);P(this,cc);P(this,on,null);P(this,lr,void 0);v(this,"getCurrentSceneGLTF",async t=>{let e={onlyVisible:!0,binary:!0,light:!0,scale:1,...t},i=await X(this,sc,C4).call(this),n=c(this,ac).call(this,e),o=await i.parseAsync(n,{trs:!1,maxTextureSize:1/0,onlyVisible:e.onlyVisible,binary:e.binary,scale:e.scale}),a;if(o instanceof ArrayBuffer)a=new Blob([o],{type:"application/octet-stream"});else{let u=JSON.stringify(o,null,2);a=new Blob([u],{type:"text/plain"})}return a});P(this,ac,l(t=>{let{scale:e,light:i,onlyVisible:n}=t,o=new nl,a=new dr().setFromObject(c(this,lr).entityScene);if(c(this,as).call(this,c(this,lr).entityScene,o,n),i){let u=new sl(16777215,.3*Math.PI);u.position.set(0,Math.max(a.max.x,a.max.y)*e*.5,a.max.y*e*4),u.lookAt(0,0,-1),u.target.position.set(0,0,-1),u.add(u.target),o.add(u)}return o},"#getExportedScene"));P(this,as,l((t,e,i)=>{t.material&&(t instanceof al?X(this,uc,x4).call(this,t).forEach(n=>e.add(n)):t instanceof xi&&e.add(X(this,cc,S4).call(this,t))),t.children.forEach(n=>{(!i||n.visible)&&c(this,as).call(this,n,e,i)})},"#processObject3D"));P(this,lc,l((t,e,i)=>{let n=new R1({color:new It(t),metalness:0});return n.opacity=e,n.transparent=i,n},"#createStandardMaterial"));P(this,ss,l(t=>{let{geometry:e,material:i,position:n,rotation:o,quaternion:a,scale:u}=t;if(!(e!=null&&e.isBufferGeometry))return t;let s=e.attributes.position,p=e.attributes.normal,f=e.attributes.uv;return c(this,pc).call(this,s,p),c(this,us).call(this,n,u,o,a),f&&c(this,hc).call(this,f),i!=null&&i.map&&e.type==="PlaneGeometry"&&(t.side=Bo),t},"#convertGeometry"));P(this,pc,l((t,e)=>{let i=new W,n=new W;for(let o=0;o<t.count;o++)i.fromBufferAttribute(t,o),c(this,ls).call(this,i),t.setXYZ(o,i.x,i.y,i.z),e&&(n.fromBufferAttribute(e,o),c(this,ls).call(this,n),e.setXYZ(o,n.x,n.y,n.z))},"#convertAttributes"));P(this,ls,l(t=>{let e=t.y;t.y=t.z,t.z=-e},"#convertVector"));P(this,us,l((t,e,i,n)=>{let o=t.y;t.y=t.z,t.z=-o;let a=e.y;if(e.y=e.z,e.z=a,i instanceof Pn)i.order="YXZ",i.set(i.x,i.y,i.z,i.order);else{let u=n.y;n.set(n.x,n.z,-u,n.w)}},"#convertObjectProperties"));P(this,hc,l(t=>{for(let e=0;e<t.count;e++){let i=t.getX(e),n=t.getY(e);t.setXY(e,i,n)}},"#convertUVs"));E(this,lr,t),c(this,lr).entityScene=t.entityScene,c(this,lr).entity3DMap=t.entity3DMap}destroy(){E(this,on,null)}};on=new WeakMap,lr=new WeakMap,ac=new WeakMap,sc=new WeakSet,C4=l(async function(){if(!c(this,on)){let{GLTFExporter:t}=await import("./GLTFExporter-YC3NE427.js");E(this,on,new t)}return c(this,on)},"#getGLTFExporter"),as=new WeakMap,lc=new WeakMap,uc=new WeakSet,x4=l(function(t){var a,u;let e=[],n=((a=t.userData)!=null&&a.entities?Object.values((u=t.userData)==null?void 0:u.entities):[]).map(s=>c(this,lr).entity3DMap.get(s)),o=new Map;return n.forEach(s=>{var x;if(!s||!(s instanceof dt))return;let p=s.components[1],f=s.components[2];if(!p.visible||p.opacity===0)return;let y=`${f!=null&&f.hover?p.hoverColor||c(this,lr).hoverColor:p.color}-${p.opacity}-${Number(p.visible)}`;o.has(y)||o.set(y,[]),(x=o.get(y))==null||x.push(s)}),o.forEach((s,p)=>{let[f,m,y]=p.split("-"),x=s.reduce((C,I)=>{let T=I.components[0];if(T.type==="custom-geometry")return C;let w=T==null?void 0:T.geometry;return w&&C.push(w),C},[]),S=c(this,lc).call(this,f,Number(m),t.material.transparent),M=ze(x,!0),g=new Ut(M,S);g.position.copy(t.position),g.rotation.copy(t.rotation),g.scale.copy(t.scale),g.visible=!!y,c(this,us).call(this,g.position,g.scale,g.rotation,g.quaternion),e.push(c(this,ss).call(this,g))}),e},"#processBatchedMesh"),cc=new WeakSet,S4=l(function(t){let e=t.geometry.clone(),i=t.material,n=new Fr({color:i.color,side:Bo});n.opacity=i.opacity,n.transparent=i.transparent;let o=new xi(e,n);return o.position.copy(t.position),o.rotation.copy(t.rotation),o.scale.copy(t.scale),o.visible=t.visible,c(this,ss).call(this,o)},"#processLineSegments"),ss=new WeakMap,pc=new WeakMap,ls=new WeakMap,us=new WeakMap,hc=new WeakMap,l(em,"ExporterSystem");var os=em;d();var P4="#ffffff";var rm=class rm{initialColor=P4;color=P4;topColor;topTexture;texture;hoverColor;dirty=!0;visible=!0;opacity=1;width=.1;height=.1;altitude=0;join="round";cap="round";outline=!0;constructor(t={}){this.color=(t==null?void 0:t.color)!==void 0?t.color:this.color,this.initialColor=this.color,this.width=(t==null?void 0:t.width)!==void 0?t.width:this.width,this.opacity=(t==null?void 0:t.opacity)!==void 0?t.opacity:this.opacity,this.visible=(t==null?void 0:t.visible)!==void 0?t.visible:this.visible,this.height=(t==null?void 0:t.height)!==void 0?t.height:this.height,this.altitude=(t==null?void 0:t.altitude)!==void 0?t.altitude:this.altitude,this.join=(t==null?void 0:t.join)!==void 0?t.join:this.join,this.cap=(t==null?void 0:t.cap)!==void 0?t.cap:this.cap,this.topColor=t==null?void 0:t.topColor,this.texture=t==null?void 0:t.texture,this.topTexture=t==null?void 0:t.topTexture,this.outline=(t==null?void 0:t.outline)!==void 0?!!t.outline:this.outline}};l(rm,"StyleComponent");var pi=rm;d();d();d();d();var dc={top:0,bottom:0,left:0,right:0};d();d();d();d();var im=class im extends _1{_width;_height;_propertiesLength;constructor(t){let e=t,i=3,n=i*4;super(new Float32Array(t*n),i,t,C1,b1),this._width=n,this._height=e,this._propertiesLength=i}setColor(t,e,i){let n=this.image.data,o=t*this._width;n[o]=e.r,n[o+1]=e.g,n[o+2]=e.b,n[o+3]=0,n[o+4]=i.r,n[o+5]=i.g,n[o+6]=i.b,n[o+7]=0,this.needsUpdate=!0}setTexture(t,e,i){let n=this.image.data,o=t*this._width;n[o+8]=e?1:0,n[o+9]=i?1:0,n[o+10]=0,n[o+11]=0,this.needsUpdate=!0}};l(im,"BatchedPropertiesTexture");var fc=im;var M4=`#define LAMBERT
|
|
450
|
-
varying vec3 vViewPosition;
|
|
451
|
-
varying vec4 vPosition;
|
|
452
|
-
varying vec2 vUv;
|
|
453
|
-
varying vec4 finalPosition;
|
|
454
|
-
varying vec3 vWorldPosition;
|
|
455
|
-
varying vec3 worldNormal;
|
|
456
|
-
varying float vBatchId;
|
|
457
|
-
|
|
458
|
-
#include <common>
|
|
459
|
-
#include <batching_pars_vertex>
|
|
460
|
-
#include <uv_pars_vertex>
|
|
461
|
-
#include <displacementmap_pars_vertex>
|
|
462
|
-
#include <envmap_pars_vertex>
|
|
463
|
-
#include <color_pars_vertex>
|
|
464
|
-
#include <fog_pars_vertex>
|
|
465
|
-
#include <normal_pars_vertex>
|
|
466
|
-
#include <morphtarget_pars_vertex>
|
|
467
|
-
#include <skinning_pars_vertex>
|
|
468
|
-
#include <shadowmap_pars_vertex>
|
|
469
|
-
#include <logdepthbuf_pars_vertex>
|
|
470
|
-
#include <clipping_planes_pars_vertex>
|
|
471
|
-
void main() {
|
|
472
|
-
vBatchId = batchId + 0.5;
|
|
473
|
-
#include <uv_vertex>
|
|
474
|
-
#include <color_vertex>
|
|
475
|
-
#include <morphcolor_vertex>
|
|
476
|
-
#include <batching_vertex>
|
|
477
|
-
#include <beginnormal_vertex>
|
|
478
|
-
#include <morphnormal_vertex>
|
|
479
|
-
#include <skinbase_vertex>
|
|
480
|
-
#include <skinnormal_vertex>
|
|
481
|
-
#include <defaultnormal_vertex>
|
|
482
|
-
#include <normal_vertex>
|
|
483
|
-
#include <begin_vertex>
|
|
484
|
-
#include <morphtarget_vertex>
|
|
485
|
-
#include <skinning_vertex>
|
|
486
|
-
#include <displacementmap_vertex>
|
|
487
|
-
#include <project_vertex>
|
|
488
|
-
#include <logdepthbuf_vertex>
|
|
489
|
-
#include <clipping_planes_vertex>
|
|
490
|
-
vViewPosition = - mvPosition.xyz;
|
|
491
|
-
#include <worldpos_vertex>
|
|
492
|
-
#include <envmap_vertex>
|
|
493
|
-
#include <shadowmap_vertex>
|
|
494
|
-
#include <fog_vertex>
|
|
495
|
-
// vertex normal relative to world space
|
|
496
|
-
worldNormal = normal;
|
|
497
|
-
vUv = uv;
|
|
498
|
-
// world position
|
|
499
|
-
vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;
|
|
500
|
-
}`;var w4=`#define LAMBERT
|
|
501
|
-
uniform vec3 diffuse;
|
|
502
|
-
uniform vec3 emissive;
|
|
503
|
-
uniform float opacity;
|
|
504
|
-
uniform float uGradientEnd;
|
|
505
|
-
uniform float uGradientIntensity;
|
|
506
|
-
uniform float uMinSideAlpha;
|
|
507
|
-
uniform float uMaxSideAlpha;
|
|
508
|
-
uniform float uGradientStart;
|
|
509
|
-
uniform highp sampler2D uPropertiesTexture;
|
|
510
|
-
uniform highp sampler2D uTopTexture;
|
|
511
|
-
uniform highp sampler2D uTexture;
|
|
512
|
-
varying float vBatchId;
|
|
513
|
-
|
|
514
|
-
varying vec2 vUv;
|
|
515
|
-
varying vec3 vWorldPosition;
|
|
516
|
-
varying vec3 worldNormal;
|
|
517
|
-
|
|
518
|
-
#include <common>
|
|
519
|
-
#include <packing>
|
|
520
|
-
#include <dithering_pars_fragment>
|
|
521
|
-
#include <color_pars_fragment>
|
|
522
|
-
#include <uv_pars_fragment>
|
|
523
|
-
#include <map_pars_fragment>
|
|
524
|
-
#include <alphamap_pars_fragment>
|
|
525
|
-
#include <alphatest_pars_fragment>
|
|
526
|
-
#include <aomap_pars_fragment>
|
|
527
|
-
#include <lightmap_pars_fragment>
|
|
528
|
-
#include <emissivemap_pars_fragment>
|
|
529
|
-
#include <envmap_common_pars_fragment>
|
|
530
|
-
#include <envmap_pars_fragment>
|
|
531
|
-
#include <fog_pars_fragment>
|
|
532
|
-
#include <bsdfs>
|
|
533
|
-
#include <lights_pars_begin>
|
|
534
|
-
#include <normal_pars_fragment>
|
|
535
|
-
#include <lights_lambert_pars_fragment>
|
|
536
|
-
#include <shadowmap_pars_fragment>
|
|
537
|
-
#include <bumpmap_pars_fragment>
|
|
538
|
-
#include <normalmap_pars_fragment>
|
|
539
|
-
#include <specularmap_pars_fragment>
|
|
540
|
-
#include <logdepthbuf_pars_fragment>
|
|
541
|
-
#include <clipping_planes_pars_fragment>
|
|
542
|
-
|
|
543
|
-
void main() {
|
|
544
|
-
#include <clipping_planes_fragment>
|
|
545
|
-
|
|
546
|
-
// get the normalized world normal of vertex fragment
|
|
547
|
-
vec3 surfaceNormal = normalize(worldNormal);
|
|
548
|
-
|
|
549
|
-
// get angle relative to Z up
|
|
550
|
-
float angle = degrees(acos(abs(dot(surfaceNormal, vec3(0.0, 0.0, 1.0)))));
|
|
551
|
-
|
|
552
|
-
int idx = int(vBatchId) * 1;
|
|
553
|
-
vec3 diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(0, idx), 0).rgb);
|
|
554
|
-
bool shouldShowTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).r == 1.0;
|
|
555
|
-
|
|
556
|
-
if(shouldShowTexture) {
|
|
557
|
-
diffuse = texture2D(uTexture, vUv).rgb;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
// if this is a fragment facing upwards, use topColor
|
|
561
|
-
if(angle == 0.0) {
|
|
562
|
-
bool shouldShowTopTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).g == 1.0;
|
|
563
|
-
|
|
564
|
-
if(shouldShowTopTexture) {
|
|
565
|
-
diffuse = texture2D(uTopTexture, vUv).rgb;
|
|
566
|
-
} else {
|
|
567
|
-
diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(1, idx), 0).rgb);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
vec4 diffuseColor = vec4(diffuse, opacity);
|
|
572
|
-
|
|
573
|
-
// only for vertical surfaces
|
|
574
|
-
if(angle > 89.0 && angle < 91.0) {
|
|
575
|
-
|
|
576
|
-
// get the percentage of the z position from the ground, up
|
|
577
|
-
float percentFromZeroZ = max((abs(vWorldPosition.z) - uGradientStart) / uGradientEnd, 0.0);
|
|
578
|
-
|
|
579
|
-
// gradient based on percentage
|
|
580
|
-
float alpha = smoothstep(uMinSideAlpha, uMaxSideAlpha, percentFromZeroZ);
|
|
581
|
-
|
|
582
|
-
// mix the shadow color with the diffuse color based on the alpha and opacity
|
|
583
|
-
diffuseColor = vec4(mix(diffuseColor.rgb, diffuseColor.rgb * (1.0 - uGradientIntensity), 1.0 - alpha), opacity);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
ReflectedLight reflectedLight = ReflectedLight(vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));
|
|
587
|
-
vec3 totalEmissiveRadiance = emissive;
|
|
588
|
-
#include <logdepthbuf_fragment>
|
|
589
|
-
#include <map_fragment>
|
|
590
|
-
#include <color_fragment>
|
|
591
|
-
#include <alphamap_fragment>
|
|
592
|
-
#include <alphatest_fragment>
|
|
593
|
-
#include <specularmap_fragment>
|
|
594
|
-
#include <normal_fragment_begin>
|
|
595
|
-
#include <normal_fragment_maps>
|
|
596
|
-
#include <emissivemap_fragment>
|
|
597
|
-
#include <lights_lambert_fragment>
|
|
598
|
-
#include <lights_fragment_begin>
|
|
599
|
-
#include <lights_fragment_maps>
|
|
600
|
-
#include <lights_fragment_end>
|
|
601
|
-
#include <aomap_fragment>
|
|
602
|
-
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
|
|
603
|
-
#include <envmap_fragment>
|
|
604
|
-
#include <opaque_fragment>
|
|
605
|
-
#include <tonemapping_fragment>
|
|
606
|
-
#include <colorspace_fragment>
|
|
607
|
-
#include <fog_fragment>
|
|
608
|
-
#include <premultiplied_alpha_fragment>
|
|
609
|
-
#include <dithering_fragment>
|
|
610
|
-
}
|
|
611
|
-
`;var EP=-.05,LP=1,nm=class nm extends wn{propertiesTexture;uniforms={uGradientIntensity:{value:0},uGradientEnd:{value:0},uGradientStart:{value:0},uTopTexture:{value:null},uTexture:{value:null}};constructor(t,e){super(t),this.propertiesTexture=new fc(e),this.onBeforeCompile=i=>{let n=this.uniforms.uGradientIntensity,o=this.uniforms.uGradientEnd,a=this.uniforms.uGradientStart,u=this.uniforms.uTopTexture,s=this.uniforms.uTexture;this.uniforms=i.uniforms,i.vertexShader=M4,i.fragmentShader=w4,Object.assign(this.uniforms,{uGradientIntensity:n,uGradientEnd:o,uGradientStart:a,uMinSideAlpha:{value:EP},uMaxSideAlpha:{value:LP},uPropertiesTexture:{value:this.propertiesTexture},uTopTexture:u,uTexture:s})}}get texture(){return this.uniforms.uTexture.value}set texture(t){t.wrapS=We,t.wrapT=We,t.colorSpace=Ci,this.uniforms.uTexture.value=t}get topTexture(){return this.uniforms.uTopTexture.value}set topTexture(t){t.wrapS=We,t.wrapT=We,t.colorSpace=Ci,this.uniforms.uTopTexture.value=t}setGradientShading(t,e,i){this.uniforms.uGradientStart.value=t,this.uniforms.uGradientEnd.value=e,this.uniforms.uGradientIntensity.value=i}setColor(t,e,i){this.propertiesTexture.setColor(t,e,i)}showTextures=t=>{let e=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(e||i)&&(this.propertiesTexture.setTexture(t,e,i),this.needsUpdate=!0)};hideTextures(t){let e=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(e||i)&&(this.propertiesTexture.setTexture(t,!1,!1),this.needsUpdate=!0)}dispose(){super.dispose(),this.propertiesTexture.dispose()}};l(nm,"BatchedStandardMaterial");var mc=nm;d();var _P=80;function T4(r,t){var u,s;let e=0;for(let p of r)e+=((s=(u=p.components[0])==null?void 0:u.geometry)==null?void 0:s.attributes.position.count)||0;let i=new It(t.color),n=new mc({color:i,side:Bo,opacity:t.opacity||1,transparent:t.opacity!==void 0?t.opacity<1:!1},r.length),o=new go(r.length,e,0,n),a;for(let p of r)a=p.components[0],!(!(a instanceof $t)||!a.geometry)&&(a.mesh=o,a.material=n,a.instanceIndex=o.addGeometry(a.geometry),o.userData.entities[a.instanceIndex]=p.id,n.setColor(a.instanceIndex,i,t.topColor?new It(t.topColor):i));return o.perObjectFrustumCulled=!0,o.matrixAutoUpdate=!1,o}l(T4,"batchGeometries");function I4(r,t){t.polygonOffset=!0,t.polygonOffsetFactor=1,t.polygonOffsetUnits=1;let e=new k1(r,_P),i=F(t.color.getHexString()).darken(30).toRgbString(),n=new O1({linewidth:2,color:i,transparent:!0}),o=new xi(e,n);return o.layers.set(1),o}l(I4,"createOutlines");d();var OP="gray",AP=.1;function E4(r,t,e){let{color:i=OP,opacity:n=1,altitude:o=0,height:a=AP}=e||{};Array.isArray(n)&&(n=1);let u={min:{x:1/0,y:1/0,z:o},max:{x:-1/0,y:-1/0,z:a+o},center:{x:0,y:0,z:(a+o)/2}},s=new Ue,p=r.geometry.coordinates[0].map(x=>{let S=t(x[1],x[0]);return u.min.x=Math.min(u.min.x,S.x),u.min.y=Math.min(u.min.y,S.y),u.max.x=Math.max(u.max.x,S.x),u.max.y=Math.max(u.max.y,S.y),S});s.moveTo(p[0].x,p[0].y),p.slice(1).forEach(x=>s.lineTo(x.x,x.y)),s.lineTo(p[0].x,p[0].y);let f=r.geometry.coordinates.slice(1);s.holes=f.map(x=>{let S=x.map(g=>t(g[1],g[0])),M=new Gr;return M.moveTo(S[0].x,S[0].y),S.slice(1).forEach(g=>M.lineTo(g.x,g.y)),M.lineTo(S[0].x,S[0].y),M});let m={bevelEnabled:!1,depth:a},y=new Ze(s,m);return y.translate(0,0,o||0),y.userData={style:{color:i,opacity:n}},y}l(E4,"renderPolygonGeometry");d();var kP="gray",NP=.1;function L4(r,t,e){let{color:i=kP,opacity:n=1,altitude:o=0,height:a=NP}=e||{};Array.isArray(n)&&(n=1);let u={min:{x:1/0,y:1/0,z:o},max:{x:-1/0,y:-1/0,z:a+o}},s={bevelEnabled:!1,depth:a},p=[];r.geometry.coordinates.forEach(m=>{let y=new Ue,x=m[0].map(g=>{let C=t(g[1],g[0]);return u.min.x=Math.min(u.min.x,C.x),u.min.y=Math.min(u.min.y,C.y),u.max.x=Math.max(u.max.x,C.x),u.max.y=Math.max(u.max.y,C.y),C});y.moveTo(x[0].x,x[0].y),x.slice(1).forEach(g=>y.lineTo(g.x,g.y)),y.lineTo(x[0].x,x[0].y);let S=m.slice(1);y.holes=S.map(g=>{let C=g.map(T=>t(T[1],T[0])),I=new Gr;return I.moveTo(C[0].x,C[0].y),C.slice(1).forEach(T=>I.lineTo(T.x,T.y)),I.lineTo(C[0].x,C[0].y),I});let M=new Ze(y,s);p.push(M)});let f=ze(p);return f.translate(0,0,o||0),f.userData={style:{color:i,opacity:n}},f}l(L4,"renderMultiPolygonGeometry");d();d();var sm=Br(G4());function V4(r){this.name="JSClipperError",this.message=r,this.stack=new Error().stack}l(V4,"JSClipperError");V4.prototype=Error.prototype;sm.default.Error=function(r){throw new V4(r)};var ne=sm.default;var Ew="gray",lm=new ne.ClipperOffset,Kt=100;function H4(r,t,e){let{color:i=Ew,opacity:n=1,width:o=1,join:a="round",cap:u="round",height:s=.01,altitude:p=0}=e||{};Array.isArray(n)&&(n=0);let f=[];for(let M=0;M<r.geometry.coordinates.length-1;M++){let g=t(r.geometry.coordinates[M][1],r.geometry.coordinates[M][0]),C=t(r.geometry.coordinates[M+1][1],r.geometry.coordinates[M+1][0]);f.push([g,C])}lm.AddPaths(f.map(M=>M.map(g=>({X:g.x*Kt,Y:g.y*Kt}))),a==="round"?ne.JoinType.jsRound:a==="miter"?ne.JoinType.jsMiter:ne.JoinType.jsSquare,u==="round"?ne.EndType.etOpenRound:u==="butt"?ne.EndType.etOpenButt:ne.EndType.etOpenSquare);let m=new ne.PolyTree;lm.Execute(m,o/2*Kt);let y=[],x={bevelEnabled:!1,depth:s};for(let M of m.m_AllPolys){let g=new Ue;if(M.IsHole())continue;let C=M.m_polygon;g.moveTo(C[0].X/Kt,C[0].Y/Kt),C.slice(1).forEach(I=>g.lineTo(I.X/Kt,I.Y/Kt)),g.lineTo(C[0].X/Kt,C[0].Y/Kt),g.holes=M.m_Childs.map(I=>{let T=new Gr,w=I.m_polygon;return T.moveTo(w[0].X/Kt,w[0].Y/Kt),w.slice(1).forEach(L=>T.lineTo(L.X/Kt,L.Y/Kt)),T.lineTo(w[0].X/Kt,w[0].Y/Kt),T}),y.push(new Ze(g,x))}let S=ze(y);return S.translate(0,0,p||0),S.userData={style:{color:i,opacity:n}},lm.Clear(),S}l(H4,"renderLineStringGeometry");d();var Qt=100,Lw=.22,Dw=.01;function X4(r,t,e={}){let{width:i=Lw,height:n=Dw,color:o="gray",opacity:a=1,altitude:u=0}=e,s={min:{x:1/0,y:1/0,z:u},max:{x:-1/0,y:-1/0,z:u+n}},p={bevelEnabled:!1,depth:n},f=new ne.ClipperOffset,m=r.geometry.coordinates.map(M=>M.map(g=>t(g[1],g[0])));f.AddPaths(m.map(M=>M.map(g=>({X:g.x*Qt,Y:g.y*Qt}))),ne.JoinType.jsMiter,ne.EndType.etOpenRound);let y=new ne.PolyTree;f.Execute(y,i/2*Qt);let x=[];for(let M of y.m_AllPolys){let g=new Ue;if(M.IsHole())continue;s.min.x=Math.min(s.min.x,M.m_polygon[0].X),s.min.y=Math.min(s.min.y,M.m_polygon[0].Y),s.max.x=Math.max(s.max.x,M.m_polygon[0].X),s.max.y=Math.max(s.max.y,M.m_polygon[0].Y);let C=M.m_polygon;g.moveTo(C[0].X/Qt,C[0].Y/Qt),C.slice(1).forEach(I=>g.lineTo(I.X/Qt,I.Y/Qt)),g.lineTo(C[0].X/Qt,C[0].Y/Qt),g.holes=M.m_Childs.map(I=>{let T=new Gr,w=I.m_polygon;return T.moveTo(w[0].X/Qt,w[0].Y/Qt),w.slice(1).forEach(L=>T.lineTo(L.X/Qt,L.Y/Qt)),T.lineTo(w[0].X/Qt,w[0].Y/Qt),T}),x.push(new Ze(g,p))}let S=ze(x);return S.translate(0,0,u||0),S.userData={style:{color:o,opacity:a}},f.Clear(),S}l(X4,"renderMultiLineStringGeometry");d();var hs,ds,um=class um{constructor(t){v(this,"mesh");v(this,"type","model");v(this,"outline");v(this,"geometry");v(this,"material");v(this,"feature");v(this,"instanceIndex",-1);v(this,"visible",!0);v(this,"color",new It);v(this,"position",new W);P(this,hs,0);P(this,ds,1);this.feature=t}setOpacity(){}setColor(){}get altitude(){return c(this,hs)}set altitude(t){this.mesh&&(this.mesh.position.z=t,E(this,hs,t))}get opacity(){return c(this,ds)}set opacity(t){var e,i;if(this.mesh){for(let n of this.mesh.children)if(n instanceof ol){((e=n.userData)==null?void 0:e.originalOpacity)===void 0&&(n.userData.originalOpacity=n.material.opacity);let o=he(t,0,(i=n.userData)==null?void 0:i.originalOpacity,0,1);n.material.opacity=o,n.material.transparent=o<1,n.material.needsUpdate=!0}}E(this,ds,t)}};hs=new WeakMap,ds=new WeakMap,l(um,"ModelComponent");var fi=um;function _w(r){let{color:t,opacity:e,topColor:i,texture:n,topTexture:o}=r;return`${t}${e}${i||""}${n||""}${o||""}`}l(_w,"generateIndex");var Ow=1e4,cm=class cm extends J{state;convertTo3DMapPosition;loader;constructor(t,e){super(),this.state=t,this.convertTo3DMapPosition=e}async getGLTFLoader(){if(this.loader)return;let{GLTFLoader:t}=await import("./GLTFLoader-D47EWL22.js");this.loader=new t}createEntityFromFeature(t,e,i){let n=new $t(e),o=new dt(n,new pi(i));return o.id=t,o}createModelFromFeature(t,e,i){let n=new fi(e),o=new dt(n,new pi(i));return o.id=t,o}populateEntityMesh(t,e){let i=t.components[0];i.geometry=e}async populateModelGroup(t,e,i){let n=new fr,o=new Pn,a=new P1,u=new W,s=new rr;return this.loader||await this.getGLTFLoader(),this.loader.load(e,p=>{var y,x,S,M,g,C;p.scene.traverse(I=>{let T=I;if("isMesh"in T&&T.isMesh===!0){let w=new ol(T.geometry,T.material,t.size);w.userData={entities:{}},s.add(w),i.add(s)}});let f=0,m;for(let I of t.values()){m=this.state.entity3DMap.get(I);let T=m.components[0],w=m.components[0].feature;T.mesh=s,T.instanceIndex=f;let{x:L,y:D,z:R}=this.convertTo3DMapPosition(w.geometry.coordinates[1],w.geometry.coordinates[0],0);T.position.set(L,D,R),o.set(((y=w.properties.rotation)==null?void 0:y[0])||0,((x=w.properties.rotation)==null?void 0:x[1])||0,((S=w.properties.rotation)==null?void 0:S[2])||0),u.set(((M=w.properties.scale)==null?void 0:M[0])||1,((g=w.properties.scale)==null?void 0:g[1])||1,((C=w.properties.scale)==null?void 0:C[2])||1),a.setFromEuler(o),n.compose(T.position,a,u),s.children.forEach(G=>{let N=G;N.setMatrixAt(f,n),N.userData.entities[f]=m.id}),f++}this.publish("model-loaded")}),s}populateEntityGroup(t){let e,i,n,o;for(let a of t.values())o=this.state.entity3DMap.get(a),o.components[0]instanceof $t&&(i=o.components[0].feature,n=o.components[1],i.geometry.type==="Polygon"?(e=E4(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,e)):i.geometry.type==="MultiPolygon"?(e=L4(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,e)):i.geometry.type==="LineString"?(e=H4(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,e)):i.geometry.type==="MultiLineString"&&(e=X4(i,this.convertTo3DMapPosition,n),this.populateEntityMesh(o,e)));return t}optimize(t){if(t.visible&&(t instanceof Ft||t instanceof wt)){for(let n of t.children)this.optimize(n);if(t instanceof wt||t.userData.dirty===!1)return;let e={};if(!t.userData.modelURL&&t.userData.dirty)try{this.populateEntityGroup(t.userData.entities3D)}catch(n){B.warn(n)}else t.userData.modelURL&&t.userData.dirty&&(this.populateModelGroup(t.userData.entities3D,t.userData.modelURL,t),t.userData.dirty=!1);let i=0;if(t.userData.dirty){let n=0,o;for(let a of t.userData.entities3D.values()){o=this.state.entity3DMap.get(a);let u=o.components[0],s=o.components[1];if(u instanceof $t){n++,n>=Ow&&(n=0,i++);let p=_w(s)+i;e[p]===void 0&&(e[p]={style:s,entities:[]}),e[p].entities.push(o)}else u.mesh&&u.mesh.parent!==t&&t.add(u.mesh)}for(let a in e){let u=T4(e[a].entities,e[a].style);t.add(u),t.userData.outlineDirty=!0,t.userData.dirty=!1}}}}update(){this.optimize(this.state.entityScene)}};l(cm,"MeshCreationAndOptimizationSystem");var Cc=cm;d();var pm=class pm{state;dirty=!0;domTree;constructor(t,e){this.state=t,this.domTree=e}update(){if(this.dirty){let t;for(let e of Array.from(this.domTree.children))if(t=this.state.entity2DMap.get(e.userData.entityId),t){let i=t.components[0];(!i.enabled||!i.visible||!this.state.entity2DIds.has(e.userData.entityId))&&this.domTree.removeChild(e)}else this.domTree.removeChild(e);for(let e of this.state.entity2DIds)if(t=this.state.entity2DMap.get(e),t){let i=t.components[0];i instanceof xe&&i.enabled&&i.containerEl&&!this.domTree.contains(i.containerEl)&&(i.containerEl.userData={entityId:t.id},this.domTree.appendChild(i.containerEl),i.updateDimensions())}this.dirty=!1}}};l(pm,"DOMVisibilitySystem");var xc=pm;d();var hm=class hm{state;project;constructor(t,e){this.state=t,this.project=e}update(){let t;for(let e of this.state.entity2DIds)t=this.state.entity2DMap.get(e),t&&this.project(t.components[0].projection,t.position)}};l(hm,"TwoDProjectionSystem");var Sc=hm;d();d();var Aw=l(function(){let t,e;return i=>{if((!e||!e)&&(t=document.createElement("canvas"),t.width=500*i,t.height=500*i,t.style.width="500px",t.style.height="500px",e=t.getContext("2d")),!e)throw new Error("Could not get 2D context");return{measureCanvas:t,measureCanvasContext:e}}},"createMeasureCanvasContext")(),j4=l(({text:r,size:t,maxWidth:e,pixelRatio:i,maxLines:n=2,lineHeight:o=1.2,options:a={strokeText:!0}})=>{let u=`bold ${t*i}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,{measureCanvasContext:s}=Aw(i);s.font=u;let p=[],f=r.split(" "),m=0,y=0,x=0;for(;y<f.length;){let C=f[y];if(m===n&&m>0){p[m-1]+="...";break}if(p[m]==null&&(p[m]=C,y++),f.length===1){p[m]=C;break}if(f[y]==null)break;let{width:I}=s.measureText(p[m]+" "+f[y]);I<=e*i?(p[m]+=" "+f[y],y++):m++}p.forEach(C=>{let{width:I}=s.measureText(C);x=Math.max(I,x)});let S=t*i*o,M=p.length*S;return{maxWidth:x,maxHeight:M,lines:p.length,draw:(C,I,T)=>{p.length===1?(a.strokeText&&C.strokeText(p[0],I,T),C.fillText(p[0],I,T)):(a.strokeText&&(C.strokeText(p[0],I,T-S/2),C.strokeText(p[1],I,T+S/2)),C.fillText(p[0],I,T-S/2),C.fillText(p[1],I,T+S/2))}}},"shaveText");var kw=4.5,Nw=2.5,Rw=2,Bw=5,fs=2.5;var dm=class dm{dirty=!1;state;colliderContext;colliderCanvas;constructor(t,e){this.state=t,this.colliderCanvas=e,this.colliderContext=e.getContext("2d")}pinCache={};imagePromiseCache={};imageDimensionsCache={};textCache={};update=(t,e,i)=>{let n=(t-e)/(i-e),o=this.state.pixelRatio;this.colliderContext.clearRect(0,0,this.colliderCanvas.width,this.colliderCanvas.height);let a,u,s,p,f,m;for(let y of this.state.entity2DIds)if(m=this.state.entity2DMap.get(y),m!=null&&m.components[0]instanceof sr&&!m.disposed){if(f=m.components[0],u=f.appearance.marker.foregroundColor,s=f.appearance.marker.backgroundColor,p=f.markerSize,a=`${u.active}-${u.inactive}-${s.active}-${s.inactive}-${p}`,this.pinCache[a]||this.prepare(f,a,this.colliderContext),f.appearance.marker.icon&&!f.imageHash&&this.cacheImage(f),this.textCache[f.id]==null||f.dirty||this.dirty){f.dirty=!1,f.collisionDirty=!0,this.textCache[f.id]={};let{textDrawFn:x,width:S,height:M}=this.processText(f.text,f.appearance.text.size,f.appearance.text.maxWidth,f.appearance.text.numLines,f.appearance.text.lineHeight);["left","center","right"].forEach(C=>{this.textCache[f.id][C]=this.textToCanvas(x,f.appearance.text.size,C,S,M,f.appearance.text.foregroundColor,f.appearance.text.backgroundColor)}),f.dimensions={width:Math.ceil(S/o),height:Math.ceil(M/o)},f.currentStrategyIndex===-1&&(f.currentStrategyIndex=0);let g=f.strategies[f.currentStrategyIndex];if(g){g.onStrategySelected(f);let C=f.style;f.style=f.newStyle,f.newStyle=C}}f.visible&&f.enabled&&(f.zoomProportion=n,this.draw(f,a,this.colliderContext))}this.dirty=!1};processText=(t,e,i,n,o)=>{let a=this.state.pixelRatio,{draw:u,maxWidth:s,maxHeight:p}=j4({text:t,size:e,pixelRatio:a,maxWidth:i,maxLines:n,lineHeight:o});return{textDrawFn:u,width:s+fs*a*2,height:p+fs*a*2}};textToCanvas=(t,e,i,n,o,a,u)=>{let s=this.state.pixelRatio,p,f=n,m=o;window.OffscreenCanvas!=null&&!bf()?p=new OffscreenCanvas(f,m):(p=document.createElement("canvas"),p.width=f,p.height=m,p.style.width=f+"px",p.style.height=m+"px");let y=p.getContext("2d",{willReadFrequently:!0});if(!y)return;y.textAlign=i,y.font=`bold ${e*s}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,y.textBaseline="middle",y.lineJoin="miter",y.miterLimit=2,y.strokeStyle="white",y.lineWidth=fs*s,y.fillStyle=a,y.strokeStyle=u;let x=i==="left"?0:i==="center"?f/2:f-fs*s/2;return t(y,x,(m+fs*s/2)/2),p};cacheImage=t=>{if(!t.appearance.marker.icon)return;let e=ab(t.appearance.marker.icon);if(t.imageHash=e,!this.imagePromiseCache[e]){let i=["png","jpg","jpeg"],n=t.appearance.marker.icon.split("?")[0],o=i.some(u=>n.toLowerCase().endsWith(u)),a=new Image;o?a.src=t.appearance.marker.icon:a.src=`data:image/svg+xml;base64, ${btoa(t.appearance.marker.icon)}`,a.onload=()=>{this.imagePromiseCache[e]=a}}};createPinCanvas=(t,e,i,n)=>{let o,a=this.state.pixelRatio,u=t.totalMarkerSize*2*a;window.OffscreenCanvas!=null?o=new OffscreenCanvas(u,u):(o=document.createElement("canvas"),o.width=u,o.height=u,o.style.width=u/a+"px",o.style.height=u/a+"px");let s=o.getContext("2d");return s.shadowColor="rgba(0,0,0,0.3)",s.shadowOffsetY=Rw*a,s.shadowBlur=Bw*a,s.beginPath(),s.arc(u/2,u/2,e/2+Nw*a/2,0,2*Math.PI),s.fillStyle=i,s.fill(),s.beginPath(),s.arc(u/2,u/2,e/2,0,2*Math.PI),s.shadowColor="transparent",s.fillStyle=n,s.fill(),o};prepare=(t,e,i)=>{let n=this.state.pixelRatio;i.lineWidth=4*n;let o=this.createPinCanvas(t,t.markerSize,t.appearance.marker.backgroundColor.active,t.appearance.marker.foregroundColor.active),a=this.createPinCanvas(t,t.iconVisible?t.markerSize:kw*n,t.appearance.marker.backgroundColor.inactive,t.appearance.marker.foregroundColor.inactive);this.pinCache[e]=[o,a]};draw(t,e,i){if(!t.visible)return;i.save(),i.globalAlpha=t.opacity;let n=this.state.pixelRatio,o=t.projection.x*n,a=t.projection.y*n,u=t.style.pinVisibility===1?this.pinCache[e][0]:this.pinCache[e][1];if(i.drawImage(u,o-t.totalMarkerSize*n,a-t.totalMarkerSize*n),t.appearance.marker.icon&&t.iconVisible&&t.imageHash&&t.appearance.marker.iconSize&&this.imagePromiseCache[t.imageHash]){let s=this.imagePromiseCache[t.imageHash],p=(t.appearance.marker.iconSize-t.appearance.marker.iconPadding)*n,{iconFit:f}=t.appearance.marker,m=p,y=p,x=`${t.imageHash}_${f}`;if(this.imageDimensionsCache[x])m=this.imageDimensionsCache[x].width,y=this.imageDimensionsCache[x].height;else{let S=s.width*n,M=s.height*n;if(f==="contain"){let g=Math.sqrt(S**2+M**2),C=p/g;m=S*C,y=M*C}if(f==="cover"){let g=p/S,C=p/M,I=Math.max(g,C);m=S*I,y=M*I}}i.save(),i.beginPath(),i.arc(o,a,p/2,0,2*Math.PI),i.closePath(),i.clip(),i.drawImage(s,o-m/2,a-y/2,m,y),i.restore()}t.style.textLabelVisible&&t.style.textAlign!=null&&t.style.left&&t.style.top&&i.drawImage(this.textCache[t.id][t.style.textAlign],o+t.style.left*n,a+t.style.top*n),i.restore()}};l(dm,"TwoDDrawSystem");var Pc=dm;d();d();var mi=class mi{loader;constructor(){this.loader=new Tn}static getInstance(){return mi.instance||(mi.instance=new mi),mi.instance}getLoader(){return this.loader}};l(mi,"TextureLoaderSingleton"),v(mi,"instance");var fm=mi,Mc=fm.getInstance();function Fw(r,t){let e=r.components[2],i=r.components[1];return e!=null&&e.hover?[i.hoverColor||t,i.hoverColor||t]:[i.color,i.topColor||i.color]}l(Fw,"processColor");var ms,mm,ym=class ym extends J{constructor(e){super();P(this,ms);v(this,"state");v(this,"textureCache",new Map);this.state=e}setShading(e,i){e.material&&e.material.setGradientShading(i.start,i.end,i.intensity)}update(){var a,u,s;let e,i,n,o;for(let p of this.state.threeDEntities)if(o=this.state.entity3DMap.get(p),o instanceof Ft&&o.type==="geometry-group"){if(o.userData.shadingDirty){i=o.components[0];let f=o.userData.entities3D.values().next().value,m=this.state.entity3DMap.get(f);m instanceof dt&&(m.type==="geometry"||m.type==="custom-geometry")&&(e=m.components[0],o.userData.shadingDirty&&i.shading&&this.setShading(e,i.shading)),o.userData.shadingDirty=!1}}else if(o instanceof dt&&(o.type==="geometry"||o.type==="custom-geometry")&&((a=o.components[1])!=null&&a.dirty||(u=o.components[2])!=null&&u.dirty)){e=o.components[0],i=o.components[1],n=o.components[2];let f=Fw(o,this.state.hoverColor);e.setColor(f[0],f[1]),i.visible!==e.visible&&(e.visible=i.visible),i.altitude!==e.altitude&&(e.altitude=i.altitude),i.opacity!==e.opacity&&(e.opacity=i.opacity),i.dirty=!1,i.texture!==e.texture&&X(this,ms,mm).call(this,i.texture,e,"texture"),i.topTexture!==e.topTexture&&X(this,ms,mm).call(this,i.topTexture,e,"topTexture"),(e.texture||e.topTexture)&&(n!=null&&n.hover&&e.texturesVisible?e.hideTextures():e.texturesVisible||e.showTextures()),o.components[2]&&(o.components[2].dirty=!1)}else(o==null?void 0:o.type)==="model"&&((s=o.components[1])!=null&&s.dirty)&&(e=o.components[0],i=o.components[1],i.opacity!==e.opacity&&(e.opacity=i.opacity),i.dirty=!1)}destroy(){this.textureCache.forEach(e=>{e.dispose()}),this.textureCache.clear()}};ms=new WeakSet,mm=l(function(e,i,n){if(!(!e||!i.showTextures)){if(this.textureCache.has(e)){n==="topTexture"?i.topTexture=this.textureCache.get(e):i.texture=this.textureCache.get(e),i.showTextures();return}Mc.getLoader().load(e,o=>{n==="topTexture"?i.topTexture=o:i.texture=o,this.textureCache.set(e,o),i.showTextures(),this.publish("texture-loaded")},void 0,()=>{B.error(`Failed to load texture: ${e}`)})}},"#loadTexture"),l(ym,"DrawSystem");var wc=ym;d();var gm=class gm extends J{state;constructor(t){super(),this.state=t,this.playAnimations=this._playAnimations}animating=new Map;isAnimating=!1;startTime=-1;duration=500;update=()=>{this.animating.clear();let t,e;for(let i of this.state.entity2DIds)t=this.state.entity2DMap.get(i),t&&(e=t.components[0],e instanceof sr&&e.visibilityNeedsUpdate&&(e.visible?this.animating.set(e,e.opacity):(e.opacity=0,e.visibilityNeedsUpdate=!1)));this.startTime=performance.now(),this.publish("animate:2d")};playAnimations;_playAnimations(){let t=performance.now();for(let[e,i]of this.animating.entries()){let n=(t-this.startTime)/this.duration;e.opacity=he(n,0,1,i,1),t-this.startTime>=this.duration&&(e.visible=!0,e.visibilityNeedsUpdate=!1,this.animating.delete(e))}this.publish("draw:2d"),this.animating.size>0&&this.publish("animate:2d")}};l(gm,"TwoDVisibilitySystem");var Tc=gm;d();var vm=class vm extends J{state;renderer;mode;scene;cameraObject;viewCamera;systems;constructor(t,e,i,n,o,a,u){super(),this.renderer=t,this.state=e,this.mode=i,this.scene=n,this.cameraObject=o,this.viewCamera=a,this.systems=u,this.systems.collisionSystem.on("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.on("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.on("animate:2d",this.animate2D)}twoDdirty=!0;threeDdirty=!0;frameId=null;twoDFrameId=null;animationFrameId=null;nextFrame=null;update=(t=!1)=>{var e;if(((e=this.renderer)==null?void 0:e.renderer)!=null)if(t)this.commitRenderState(),this.paint();else{if(this.frameId)return;this.frameId=requestAnimationFrame(()=>{var i;((i=this.renderer)==null?void 0:i.renderer)!=null&&this.mode==="standalone"&&(this.commitRenderState(),this.paint())})}};paint(){var t;(t=this.renderer)!=null&&t.renderer&&(this.mode==="standalone"?(this.renderer.clear(),this.renderer.render(this.scene,this.cameraObject)):this.renderer.render(this.scene,this.viewCamera))}animate2D=()=>{this.animationFrameId=requestAnimationFrame(()=>{this.animationFrameId=null,this.systems.twoDVisiblitySystem.playAnimations()})};drawEntities2D=()=>{this.twoDFrameId||(this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax())}))};updateEntities2D=()=>{this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.twoDFrameId=requestAnimationFrame(()=>{this.twoDFrameId=null,this.systems.watermarkSystem.insertIntoQuadTree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.interactionSystem.updateQuadtree(this.systems.collisionSystem.interactiveCollidersQTree),this.systems.twoDVisiblitySystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting())})};commitRenderState=()=>{this.frameId=null,(this.mode==="outdoors-interleaved"||this.mode==="standalone")&&this.systems.cameraSystem.update(),this.scene.updateMatrixWorld(),this.state.shouldMeasureCanvas&&(this.state.shouldMeasureCanvas=!1,this.publish("measure-canvas")),this.twoDdirty&&(this.state.entity2DIds.clear(),xf(this.state.entityScene,this.state.entity2DIds),this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.dirty=!0,this.systems.domMutationSystem.dirty=!0,this.systems.panBoundsSystem.dirty=!0,this.twoDdirty=!1),this.threeDdirty&&(this.state.threeDEntities=[],Cf(this.state.entityScene,this.state.threeDEntities),this.threeDdirty=!1,this.systems.interactionSystem.dirty3D=!0,this.systems.panBoundsSystem.dirty=!0,this.systems.outlineInterpolationSystem.geometries3DDirty=!0),this.systems.meshOptimizationSystem.update(),this.systems.customGeometrySystem.update(),this.systems.panBoundsSystem.update(),this.systems.stackSystem.update(),this.systems.drawSystem.update(),this.systems.outlineInterpolationSystem.update(this.systems.cameraSystem.getZoomLevel(),this.systems.cameraSystem.zoomDirty),this.systems.pathSystem.update(this.systems.cameraSystem.minZoomAltitude,this.systems.cameraSystem.maxZoomAltitude,this.systems.cameraSystem.getZoomAltitude()),this.systems.cameraSystem.postRender(),this.systems.domVisiblitySystem.update(),this.systems.domMutationSystem.update(),this.systems.twoDProjectionSystem.update(),this.systems.twoDDrawSystem.update(this.systems.cameraSystem.getZoomAltitude(),this.systems.cameraSystem.getZoomScaledMin(),this.systems.cameraSystem.getZoomScaledMax()),this.systems.domDrawSystem.update(this.systems.cameraSystem.isUserInteracting()),this.systems.watermarkSystem.update(),this.nextFrame=requestAnimationFrame(()=>{this.systems.collisionSystem.update(this.systems.watermarkSystem.width,this.systems.watermarkSystem.height)}),this.systems.cameraSystem.dirty=!1,this.systems.cameraSystem.zoomDirty=!1};destroy(){this.frameId&&cancelAnimationFrame(this.frameId),this.twoDFrameId&&cancelAnimationFrame(this.twoDFrameId),this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.nextFrame&&cancelAnimationFrame(this.nextFrame),this.state.entity2DIds.clear(),this.state.threeDEntities=[],this.systems.domVisiblitySystem.dirty=!0,this.systems.collisionSystem.dirty=!0,this.update(),this.systems.collisionSystem.off("visibility-changed",this.updateEntities2D),this.systems.twoDVisiblitySystem.off("draw:2d",this.drawEntities2D),this.systems.twoDVisiblitySystem.off("animate:2d",this.animate2D)}};l(vm,"RenderSystem");var Ic=vm;d();var So,ys,bm=class bm{constructor(t,e){v(this,"type","path");v(this,"mesh",new rr);v(this,"material");v(this,"geometry");v(this,"outline");v(this,"feature");v(this,"options");v(this,"nearRadius",.2);v(this,"farRadius",.4);v(this,"color","#ff834c");v(this,"accentColor","blue");P(this,So,1);v(this,"altitudeAdjustment",1);v(this,"displayArrowsOnPath",!1);v(this,"animateArrowsOnPath",!1);v(this,"dirty",!0);v(this,"position",new W);P(this,ys,0);var i,n,o,a,u,s;this.feature=t,this.options=e||{},this.color=(i=e==null?void 0:e.color)!=null?i:this.color,this.accentColor=(n=e==null?void 0:e.accentColor)!=null?n:this.accentColor,this.nearRadius=(o=e==null?void 0:e.nearRadius)!=null?o:this.nearRadius,this.farRadius=(a=e==null?void 0:e.farRadius)!=null?a:this.farRadius,this.displayArrowsOnPath=(u=e==null?void 0:e.displayArrowsOnPath)!=null?u:this.displayArrowsOnPath,this.animateArrowsOnPath=(s=e==null?void 0:e.animateArrowsOnPath)!=null?s:this.animateArrowsOnPath}setColor(){}setOpacity(){}set completeFraction(t){E(this,So,t),this.mesh&&this.mesh.children.forEach(e=>{e.material.uniforms.complete.value=c(this,So),e.material.needsUpdate=!0})}get completeFraction(){return c(this,So)}set visible(t){this.mesh&&(this.mesh.visible=t)}get visible(){return this.mesh?this.mesh.visible:!1}get altitude(){return c(this,ys)}set altitude(t){this.mesh&&(this.mesh.position.z=t,E(this,ys,t))}set complete(t){this.material&&(this.material.uniforms.complete.value=t,this.material.needsUpdate=!0)}};So=new WeakMap,ys=new WeakMap,l(bm,"PathComponent");var Ec=bm;d();var Cm=class Cm{rendererState;constructor(t){this.rendererState=t}update(){let t;for(let e of this.rendererState.threeDEntities)if(t=this.rendererState.entity3DMap.get(e),t instanceof wt&&t.components[0]){let i=t.components[0];if(i.dirty){for(let n of t.children)(n instanceof Ft||n instanceof wt)&&(n.userData.entityId!==t.components[0].activeId?n.setVisible(!1):n.setVisible(!0));i.dirty=!1}}}};l(Cm,"StackSystem");var Lc=Cm;d();d();var bs=Br(lo());d();d();d();var Y4=l((r,t)=>(t-r+Math.PI)%(Math.PI*2)+Math.PI*2%(Math.PI*2)-Math.PI,"differenceBetweenAngles"),W4=l((r,t)=>new U(r.clientX-t.offsetLeft,r.clientY-t.offsetTop),"getTouchPos"),xm=l((r,t)=>Math.atan2(t.y-r.y,t.x-r.x),"angle"),gs=l((r,t)=>Math.sqrt((t.y-r.y)**2+(t.x-r.x)**2),"distance"),Sm=l((r,t)=>new U((r.x+t.x)/2,(r.y+t.y)/2),"average"),Pm=l(r=>{let t=0,{wheelDelta:e,detail:i}=r;return e!==void 0?t=e:i!==void 0&&(t=-i),t},"getScrollDelta");var Mm=class Mm{input1;input2;lastAngle;lastDistance;totalDistance;first;second;constructor(t,e){this.input1=t,this.input2=e,this.lastAngle=xm(t,e),this.lastDistance=gs(t,e),this.totalDistance=0,this.first=t,this.second=e}update(t,e){let i=gs(t,e);this.input1=t,this.input2=e;let n=xm(t,e);this.lastAngle=n,this.lastDistance=i,this.totalDistance+=(gs(this.first,t)+gs(this.second,e))/2,this.first=Sm(this.first,t),this.second=Sm(this.second,e)}};l(Mm,"InputSet");var Dc=Mm;d();var wm=class wm{touch;camera;cameraPlane;viewCoordinate;snapHolderMatrix;snapCamera;cameraPosition;raycaster;worldCoordinate;snapshotted=!1;constructor(t,e,i){this.touch=t,this.camera=e,this.cameraPlane=i,this.viewCoordinate={x:t.x,y:t.y},this.camera.updateMatrixWorld(),this.camera.updateMatrix(),this.snapHolderMatrix=this.camera.matrixWorld.clone(),this.snapCamera=this.camera.clone(),this.snapshotCameraState()}snapshotCameraState(){this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.cameraPosition=this.camera.position.clone();let t=new U(this.viewCoordinate.x,this.viewCoordinate.y);this.raycaster=this.raycaster||new Vr,this.raycaster.setFromCamera(t,this.snapCamera);let e=this.raycaster.intersectObject(this.cameraPlane,!0);this.worldCoordinate=e&&e.length>0?e[0].point:null,this.snapshotted=!0}updateAnchorState(t,e){this.camera=t,this.snapCamera=t.clone(),this.snapHolderMatrix=t.matrixWorld.clone(),this.updateViewCoordinate(e),this.snapshotCameraState()}updateViewCoordinate(t){this.viewCoordinate={x:t.x,y:t.y}}reUnproject(){var i,n;let t=new U(this.viewCoordinate.x,this.viewCoordinate.y);(i=this.raycaster)==null||i.setFromCamera(t,this.snapCamera);let e=(n=this.raycaster)==null?void 0:n.intersectObject(this.cameraPlane,!0)[0];return e?e.point:void 0}};l(wm,"TouchAnchor");var vs=wm;var un,_c,Tm=class Tm extends J{constructor(e,i,n,o,a){super();v(this,"dirty",!1);v(this,"zoomDirty",!1);v(this,"zoomSpeed",5);v(this,"rotateSpeed",100);v(this,"enabled",!0);v(this,"enableZoom",!0);v(this,"enablePan",!0);v(this,"enablePedestal",!1);v(this,"maxPedestal",1/0);v(this,"minPedestal",0);v(this,"enableRotate",!0);v(this,"minZoomAltitude",5);v(this,"maxZoomAltitude",1e4);v(this,"initialMinZoom",5);v(this,"initialMaxZoom",1e4);v(this,"ignoreZoomLimits",!1);v(this,"minExpandedZoom",5);v(this,"maxExpandedZoom",1e5);v(this,"zoomFactor",1);v(this,"panBounds",{min:new W(1/0,1/0),max:new W(-1/0,-1/0),center:new W(0,0,0),radius:1/0});v(this,"minTilt",0);v(this,"maxTilt",1.2);v(this,"MOUSE_BUTTONS",{ORBIT:il.RIGHT,ZOOM:il.MIDDLE,PAN:il.LEFT});v(this,"camera");v(this,"scene");v(this,"renderer");v(this,"elevation");v(this,"orbit");v(this,"cameraPlane");v(this,"raycaster",new Vr);v(this,"rendererState");v(this,"options");v(this,"state",-1);v(this,"intersection");v(this,"viewState",null);v(this,"tweens",new Set);v(this,"clock",new F1(!0));v(this,"coords",{mouse:new U,rotateStart:new U,rotateEnd:new U,rotateDelta:new U,panStart:new W,panCameraStart:new W,panEnd:new W,panDelta:new W,initialShiftPos:new U,initialPedestal:0,floorAnchor:new W});v(this,"touch",{origin:{offsetLeft:0,offsetTop:0},touches:[],anchor1:null,anchor2:null,inputs:null});v(this,"scrollTimer",null);v(this,"lastWheelTime",0);v(this,"resetZoom",!1);v(this,"zoomStart");v(this,"pedestalScaleFactor",1);v(this,"isUserZooming",!1);v(this,"stayInsideBounds",!0);v(this,"userInteracting",!1);v(this,"raycastToFloor",e=>{this.raycaster.setFromCamera(e,this.camera);let i=this.raycaster.intersectObject(this.cameraPlane,!1)[0];return i?i.point:new W});v(this,"isUserInteracting",()=>this.userInteracting);v(this,"getPosition",()=>new W(this.orbit.position.x,this.orbit.position.y,this.orbit.position.z));v(this,"getPedestal",()=>this.orbit.position.z);v(this,"pan",(e,i)=>{isNaN(e)||isNaN(i)||(this.setPosition(this.orbit.position.x+e,this.orbit.position.y+i),this.publish("position-updated"))});v(this,"postRender",()=>{(this.state===2||this.state===6)&&(this.raycaster.setFromCamera(this.coords.mouse,this.camera),this.intersection=this.raycaster.intersectObject(this.cameraPlane,!1)[0],this.intersection&&(this.coords.panStart.set(this.intersection.point.x,this.intersection.point.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0))),this.state===3&&this.resetZoom&&(this.resetZoom=!1,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0)),this.state===7&&this.isAnimating()===!1&&(this.state=-1,this.publish("multi-end"))});v(this,"isAnimating",()=>bs.default.getAll().some(e=>e._mMapAnimation));v(this,"isCameraMoving",()=>this.state!==-1);v(this,"setPosition",(e,i)=>{if(isNaN(e)||isNaN(i))return;this.state===-1&&this.publish("pan-start");let n=e-this.panBounds.center.x,o=i-this.panBounds.center.y,a=Math.sqrt(n*n+o*o);if(this.stayInsideBounds&&a>this.panBounds.radius){let u=Math.atan2(o,n),s={x:Math.cos(u)*this.panBounds.radius+this.panBounds.center.x,y:Math.sin(u)*this.panBounds.radius+this.panBounds.center.y};this.orbit.position.x=s.x,this.orbit.position.y=s.y}else this.orbit.position.x=e,this.orbit.position.y=i;this.publish("position-updated"),this.publish("change"),this.state===-1&&this.publish("pan-end"),this.dirty=!0});v(this,"tilt",e=>{if(isNaN(e))return;this.state===-1&&this.publish("rotate-start");let i=this.stayInsideBounds?Math.max(Math.min(e+this.getTilt(),this.maxTilt),this.minTilt):e+this.getTilt();i!==this.elevation.rotation.x&&(this.elevation.rotation.x=i,this.publish("tilt-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end")});v(this,"zoomIn",(e,i,n)=>{let o=this.getZoomAltitude();this.animateCamera({zoom:o/1.5},e,i,n)});v(this,"zoomOut",(e,i,n)=>{let o=this.getZoomAltitude();this.animateCamera({zoom:o*1.5},e,i,n)});v(this,"getRotation",()=>this.orbit.rotation.z);v(this,"cancelAnimation",()=>{let e=Array.from(this.tweens),i=e[e.length-1];i.state===7&&this.publish("multi-cancel",{zooming:!0,rotating:!0,tilting:!0}),this.completeTween(i)});v(this,"animateCamera",(e,i,n,o,a,u)=>{let s={mode:df.cancel,...u},p={},f={},m=this.getPosition();if(e.position!=null&&(e.position.x!==void 0&&(p.x=m.x,f.x=e.position.x),e.position.y!==void 0&&(p.y=m.y,f.y=e.position.y),e.position.z!==void 0&&(p.z=m.z,f.z=e.position.z)),e.zoom!==void 0&&(p.zoom=this.stayInsideBounds?Math.min(Math.max(this.getZoomAltitude(),this.getZoomScaledMin()),this.getZoomScaledMax()):this.getZoomAltitude(),this.viewState==="multi_floor"||!this.stayInsideBounds?f.zoom=e.zoom:f.zoom=Math.min(Math.max(e.zoom,this.getZoomScaledMin()),this.getZoomScaledMax())),e.rotation!==void 0){let T=p.rotation=this.getRotation(),w=e.rotation%(2*Math.PI),L=w-T;if(Math.abs(L)>Math.PI){let D=L<0?1:-1;f.rotation=w+2*Math.PI*D}else f.rotation=w}e.tilt!==void 0&&(p.tilt=this.getTilt(),this.viewState==="multi_floor"||!this.stayInsideBounds?f.tilt=e.tilt:f.tilt=Math.max(Math.min(e.tilt,this.maxTilt),this.minTilt));let y=p.zoom!==f.zoom,x=p.rotation!==f.rotation,S=p.tilt!==f.tilt,M=new bs.default.Tween(p).to(f,b.env.TESTING?0:i).onUpdate(T=>{this.setMulti({x:T.x,y:T.y,z:T.z},T.zoom,T.rotation,T.tilt)}).onComplete(()=>{this.completeTween(M),this.publish("multi-end",{zooming:y,rotating:x,tilting:S}),o&&o()}).onStart(()=>{this.state!==7&&(this.state=7,M.state=7,this.publish("multi-start",{zooming:y,rotating:x,tilting:S})),this.publish("change")}),g=Array.from(this.tweens),C=g[g.length-1],I=!1;return C!=null&&(s.mode===df.chain?(I=!0,C.chain(M)):(this.completeTween(C),typeof a=="function"&&a(),C=null)),this.tweens.add(M),n?M.easing(n):M.easing(bs.default.Easing.Quadratic.In),!e.doNotAutoStart&&!I&&(M.start(),this.publish("change")),M._mMapAnimation=!0,M});v(this,"setMulti",(e,i,n,o,a=!0)=>{this.state===-1&&this.publish("multi-start");let u=!1;e!=null&&(e.x!==void 0&&!isNaN(e.x)&&(this.orbit.position.x=e.x,u=!0),e.y!==void 0&&!isNaN(e.y)&&(this.orbit.position.y=e.y,u=!0),e.z!==void 0&&!isNaN(e.z)&&(this.setPedestal(e.z,!0),u=!0)),u&&this.publish("position-updated");let s={zooming:!1,tilting:!!i,rotating:!1};if(i!==void 0&&!isNaN(i)){let p=this.stayInsideBounds?Math.min(Math.max(i,this.getZoomScaledMin()),this.getZoomScaledMax()):i;p!==this.camera.position.z&&(s.zooming=!0,this.camera.position.z=p,this.publish("zoom-updated"),this.zoomDirty=!0,this.viewState==="multi_floor"?i>Vu&&(this.camera.near=i-Vu,this.camera.far=i+Vu):(this.camera.near=i/Ua,this.camera.far=i*Ua),this.camera.updateProjectionMatrix())}if(n!==void 0&&!isNaN(n)&&n!==this.orbit.rotation.z&&(s.rotating=!0,this.orbit.rotation.z=n,this.publish("rotation-updated")),o!==void 0&&!isNaN(o)){let p=this.stayInsideBounds?Math.max(Math.min(o,this.maxTilt),this.minTilt):o;p!==this.elevation.rotation.x&&(s.tilting=!0,this.elevation.rotation.x=p,this.publish("tilt-updated"))}a&&this.publish("change"),this.state===-1&&this.publish("multi-end",s)});v(this,"getZoomScaledMin",()=>this.minZoomAltitude*this.zoomFactor);v(this,"getZoomScaledMax",()=>{let e=this.minZoomAltitude*this.zoomFactor;return Math.max(this.maxZoomAltitude,e)});v(this,"setRotation",(e,i)=>{if(isNaN(e))return;this.state===-1&&!i&&this.publish("rotate-start");let n=e%ff;n!==this.orbit.rotation.z&&(this.orbit.rotation.z=n,i||this.publish("rotation-updated")),i||this.publish("change"),this.state===-1&&!i&&this.publish("rotate-end"),this.dirty=!0});v(this,"setZoomAltitude",e=>{if(isNaN(e))return;this.state===-1&&this.publish("zoom-start");let i=this.stayInsideBounds?Math.min(Math.max(e,this.getZoomScaledMin()),this.getZoomScaledMax()):e;i!==this.camera.position.z&&(this.camera.position.z=i,this.publish("zoom-updated"),this.zoomDirty=!0),this.camera.near=i/Ua,this.camera.far=i*Ua,this.camera.updateProjectionMatrix(),this.publish("change"),this.state===-1&&this.publish("zoom-end"),this.dirty=!0});v(this,"setZoomLevel",e=>{this.setZoomAltitude(this.convertZoomLevelToAltitude(e))});v(this,"getZoomAltitude",()=>this.camera.position.z);v(this,"getZoomLevel",()=>this.convertAltitudeToZoomLevel(this.getZoomAltitude()));v(this,"rotate",e=>{if(isNaN(e))return;this.state===-1&&this.publish("rotate-start");let i=(this.orbit.rotation.z+e)%ff;i!==this.orbit.rotation.z&&(this.orbit.rotation.z=i,this.publish("rotation-updated")),this.publish("change"),this.state===-1&&this.publish("rotate-end")});v(this,"setTilt",(e,i)=>{if(isNaN(e))return;this.state===-1&&!i&&this.publish("rotate-start");let n=this.stayInsideBounds?Math.max(Math.min(e,this.maxTilt),this.minTilt):e;n!==this.elevation.rotation.x&&(this.elevation.rotation.x=n,i||this.publish("tilt-updated")),i||this.publish("change"),this.state===-1&&!i&&this.publish("rotate-end"),this.dirty=!0});v(this,"getTilt",()=>this.elevation.rotation.x);v(this,"setCameraPlaneElevation",e=>{this.cameraPlane.position.z=e});v(this,"zoom",e=>{if(isNaN(e))return;this.state===-1&&this.publish("zoom-start");let i=this.getZoomAltitude()-e;this.camera.position.z=this.stayInsideBounds?Math.min(Math.max(i,this.minZoomAltitude*this.zoomFactor),this.maxZoomAltitude*this.zoomFactor):i,this.publish("zoom-updated"),this.zoomDirty=!0,this.publish("change"),this.state===-1&&this.publish("zoom-end")});v(this,"expandZoomLimits",(e,i)=>{i||(i=1.2),e*i>this.maxZoomAltitude&&(this.maxZoomAltitude=Math.min(e*i,this.maxExpandedZoom)),e/i<this.minZoomAltitude&&(this.minZoomAltitude=Math.max(e/i,this.minExpandedZoom))});v(this,"restrictZoomLimits",(e,i)=>{i||(i=1.2),e*i>this.initialMaxZoom&&e*i<this.maxZoomAltitude&&(this.maxZoomAltitude=Math.max(this.getZoomAltitude(),e*i)),e/i<this.initialMinZoom&&e/i>this.minZoomAltitude&&(this.minZoomAltitude=Math.min(this.getZoomAltitude(),e/i))});v(this,"getProjectionScaleFactor",(e,i,n)=>Pf(e,i,n));v(this,"update",()=>{bs.default.update(),this.lastWheelTime>0&&this.state===3&&this.clock.getElapsedTime()-this.lastWheelTime>.2&&(this.lastWheelTime=0,this.state=-1,this.publish("zoom-end"),this.removeMouseMoveEventListeners())});v(this,"setPedestal",(e,i=!1)=>{typeof e=="number"&&!isNaN(e)&&(this.orbit.position.z=e,i&&(this.publishPedestalChangeEvent(e),this.publish("change")),this.dirty=!0)});v(this,"dispose",()=>{for(let e of gf)e.endsWith("start")?this.off(e,this.setUserInteracting):e.endsWith("end")&&this.off(e,this.unsetUserInteracting);this.removeEventListeners(),this.scene.remove(this.cameraPlane)});v(this,"createCameraPlane",()=>{let e=new Mn(1e10,1e10),i=new Fr({color:0,visible:!1}),n=new Ut(e,i);return this.scene.add(n),n});v(this,"addEventListeners",()=>{let{domElement:e}=this.renderer;for(let i of gf)i.endsWith("start")?this.on(i,this.setUserInteracting):i.endsWith("end")&&this.on(i,this.unsetUserInteracting);e.addEventListener("contextmenu",this.onContextMenu,!1),e.addEventListener("mousedown",this.onMouseDown,!1),e.addEventListener("wheel",this.onMouseWheel,{passive:!1}),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchmove",this.onTouchMove,!1)});v(this,"addMouseEventListeners",()=>{this.addMouseMoveEventListeners(),window.addEventListener("mouseup",this.onMouseUp,!1),window.addEventListener("mouseout",this.onMouseUp,!1)});v(this,"addMouseMoveEventListeners",()=>{this.renderer.domElement.addEventListener("mousemove",this.onMouseMove,!1)});v(this,"removeMouseMoveEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1)});v(this,"removeEventListeners",()=>{let{domElement:e}=this.renderer;e.removeEventListener("contextmenu",this.onContextMenu,!1),e.removeEventListener("mousedown",this.onMouseDown,!1),e.removeEventListener("wheel",this.onMouseWheel,!1),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});v(this,"removeMouseUpEventListeners",()=>{this.renderer.domElement.removeEventListener("mousemove",this.onMouseMove,!1),window.removeEventListener("mouseup",this.onMouseUp,!1),window.removeEventListener("mouseout",this.onMouseUp,!1)});v(this,"onContextMenu",e=>{e.preventDefault()});v(this,"onMouseUp",()=>{if(this.enabled!==!1){switch(this.removeMouseUpEventListeners(),this.state){case 2:this.publish("pan-end"),this.publish("user-pan-end");break;case 1:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}this.state=-1}});v(this,"onMouseMove",e=>{if(this.enabled!==!1)if(e.preventDefault(),this.mouseToScene(e),this.state===0){if(this.enableRotate===!1)return;this.handleMouseMoveRotate(e)}else if(this.state===2){if(this.enablePan===!1)return;this.handleMouseMovePan()}else this.state===3?(this.resetZoom=!0,this.state=-1):this.state===8&&this.handleMouseMovePedestal(e)});v(this,"onTouchStart",e=>{if(this.enabled!==!1){switch(this.updateTouchOrigin(),this.touchToScene(e),e.touches.length){case 1:this.enablePedestal?(this.handleTouchStartPedestal(e),this.state=9):this.enablePan&&(this.handleTouchStartPan(e),this.state=6);break;case 2:this.touch.inputs=new Dc(this.touch.touches[0],this.touch.touches[1]);break;default:this.state=-1}this.state}});v(this,"onTouchMove",e=>{if(this.enabled!==!1)switch(this.touchToScene(e),e.touches.length){case 2:e.preventDefault(),e.stopPropagation();let i={...this.touch.inputs.first},n={...this.touch.inputs.second},o=new U(this.touch.touches[0].x,this.touch.touches[0].y),a=new U(this.touch.touches[1].x,this.touch.touches[1].y);if(this.touch.inputs.update(this.touch.touches[0],this.touch.touches[1]),this.enableRotate&&this.state===4)this.handleTouchMoveTilt(e);else if(this.state===5)this.handleTouchMoveDolly();else if(this.state!==5&&this.touch.inputs.totalDistance>.05){let u=i.y<o.y&&n.y<a.y,s=i.y>o.y&&n.y>a.y;this.enableRotate&&this.state!==4&&(s||u)?(this.handleTouchStartTilt(e),this.state=4):(this.handleTouchStartDolly(),this.state=5)}break;case 1:(this.enablePedestal||this.enablePan)&&(e.preventDefault(),e.stopPropagation()),this.enablePedestal&&this.state===9?this.handleTouchMovePedestal(e):this.enablePan&&this.state===6&&this.handleTouchMovePan(e);break;default:this.state=-1}});v(this,"onTouchEnd",e=>{if(this.enabled!==!1){switch(this.handleTouchEnd(),this.state){case 2:case 6:this.publish("user-pan-end");break;case 4:this.publish("pan-end"),this.publish("user-tilt-end");break;case 1:case 5:this.publish("zoom-end"),this.publish("user-dolly-end");break;case 0:this.publish("rotate-end"),this.publish("user-rotate-end");break;case 8:case 9:this.publish("pedestal-end"),this.publish("user-pedestal-end");break}e.touches.length?this.onTouchStart(e):this.state=-1}});v(this,"handleTouchMovePan",e=>{let i=Object.hasOwn(e,"x")?new U(e.x,e.y):this.touch.touches[0],n=this.raycastToFloor(i);this.coords.panEnd.set(n.x,n.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change")});v(this,"handleTouchStartDolly",()=>{let e=this.touch.touches[0].x-this.touch.touches[1].x,i=this.touch.touches[0].y-this.touch.touches[1].y;this.zoomStart=this.getZoomAltitude();let n=new U(this.touch.touches[0].x-e/2,this.touch.touches[0].y-i/2);this.coords.floorAnchor=this.raycastToFloor(n),this.orbit.updateMatrixWorld(),this.touch.anchor1=new vs(this.touch.touches[0],this.camera,this.cameraPlane),this.touch.anchor2=new vs(this.touch.touches[1],this.camera,this.cameraPlane),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-dolly-start"),this.publish("multi-start")});v(this,"handleMouseMovePan",()=>{let e=this.raycastToFloor(this.coords.mouse);this.coords.panEnd.set(e.x,e.y,0),this.coords.panDelta.subVectors(this.coords.panEnd,this.coords.panStart),this.setPosition(this.coords.panCameraStart.x-this.coords.panDelta.x,this.coords.panCameraStart.y-this.coords.panDelta.y),this.publish("change")});v(this,"handleTouchStartTilt",e=>{this.coords.rotateStart.set(e.touches[1].clientX,e.touches[1].clientY),this.publish("user-tilt-start"),this.publish("rotate-start")});v(this,"handleTouchMovePedestal",e=>{this.handleMouseMovePedestal(e.touches[0])});v(this,"handleTouchMoveTilt",e=>{this.coords.rotateEnd.set(e.touches[1].clientX,e.touches[1].clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd)});v(this,"handleTouchMoveDolly",()=>{let e=this.touch.inputs.first,i=this.touch.inputs.second;this.touch.anchor1.viewCoordinate={x:e.x,y:e.y},this.touch.anchor2.viewCoordinate={x:i.x,y:i.y};let n=this.makeTransformFromTouchAnchors(this.touch.anchor1,this.touch.anchor2);n&&this.setCameraFromTransformMatrix(n),this.orbit.updateMatrixWorld(),this.touch.anchor1.updateAnchorState(this.camera,e),this.touch.anchor2.updateAnchorState(this.camera,i)});v(this,"handleTouchEnd",()=>{this.state===4||this.state===5?this.publish("multi-end"):this.state===6&&this.publish("pan-end")});v(this,"handleTouchStartPan",e=>{let i=Object.hasOwn(e,"x")?new U(e.x,e.y):this.touch.touches[0],n=this.raycastToFloor(i);this.coords.panStart.set(n.x,n.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("user-pan-start"),this.publish("pan-start")});v(this,"handleTouchStartPedestal",e=>{this.handleMouseDownPedestal(e.touches[0])});v(this,"onMouseDown",e=>{if(this.enabled!==!1){if(this.mouseToScene(e),e.preventDefault(),this.state===3&&this.publish("zoom-end"),e.button===this.MOUSE_BUTTONS.ORBIT){if(this.enableRotate===!1)return;this.handleMouseDownRotate(e),this.state=0}else e.button===this.MOUSE_BUTTONS.PAN&&(this.enablePan?(this.handleMouseDownPan(),this.state=2):this.enablePedestal&&(this.handleMouseDownPedestal(e),this.state=8));this.state!==-1&&this.addMouseEventListeners()}});v(this,"onMouseWheel",e=>{this.enabled===!1||this.enableZoom===!1||this.state!==-1&&this.state!==3||(e.preventDefault(),e.stopPropagation(),this.mouseToScene(e),this.canScrollZoom(e)&&(this.lastWheelTime=this.clock.getElapsedTime(),this.publishUserZoomEvent()),this.state!==3&&this.canScrollZoom(e)&&(this.addMouseMoveEventListeners(),this.state=3,this.zoomStart=this.getZoomAltitude(),this.coords.floorAnchor=this.raycastToFloor(this.coords.mouse),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("zoom-start")),this.scrollTimer!=null&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.publish("zoom-end")},50),this.handleMouseWheel(e))});v(this,"handleMouseWheel",e=>{if(this.publish("zoom-start"),!this.canScrollZoom(e)){this.lastWheelTime>0&&this.publish("zoom-end"),this.lastWheelTime=0,this.state=-1;return}let i=this.getZoomAltitude(),n=i-Pm(e)*i/eb*this.zoomSpeed;this.setZoomAltitude(n);let o=n/this.zoomStart;this.coords.panDelta.subVectors(this.coords.floorAnchor,this.coords.panCameraStart).multiplyScalar(1-o),this.setPosition(this.coords.panCameraStart.x+this.coords.panDelta.x,this.coords.panCameraStart.y+this.coords.panDelta.y),this.publish("change")});v(this,"setCameraFromTransformMatrix",e=>{this.orbit.updateMatrixWorld();let i=new Pn;i.setFromRotationMatrix(e,"ZYX");let n=(e.elements[14]-this.cameraPlane.position.z)/Math.cos(i.x),o=i.z,a=new W(0,0,1);a.applyEuler(i),a.setLength(n);let u=new W;u.setFromMatrixPosition(e),u.sub(a),this.enablePan&&this.setPosition(u.x,u.y),this.enableZoom&&this.setZoomAltitude(n),this.enableRotate&&this.setRotation(o)});v(this,"makeTransformFromTouchAnchors",(e,i)=>{this.orbit.updateMatrixWorld(),this.camera.updateProjectionMatrix();let n=this.camera.projectionMatrix.clone(),o=e.worldCoordinate,a=i.worldCoordinate,u=e.reUnproject(),s=i.reUnproject();if(!u||!s||!o||!a)return null;let p=e.viewCoordinate,f=i.viewCoordinate,m=a.x-o.x,y=a.y-o.y,x=Math.atan2(y,m),S=s.x-u.x,M=s.y-u.y,g=Math.atan2(M,S),C=Y4(x,g),I=new fr;I.makeRotationZ(-C);let T=I.clone();T.multiply(e.snapHolderMatrix);let w=l((A5,k5,N5)=>A5.elements[(k5-1)*4+N5-1],"m"),L=w(n,1,1)*w(T,1,1)-p.x*w(n,3,4)*w(T,3,1),D=w(n,1,1)*w(T,1,2)-p.x*w(n,3,4)*w(T,3,2),R=w(n,1,1)*w(T,1,3)-p.x*w(n,3,4)*w(T,3,3),G=o.x*L+o.y*D+o.z*R,N=w(n,2,2)*w(T,2,1)-p.y*w(n,3,4)*w(T,3,1),j=w(n,2,2)*w(T,2,2)-p.y*w(n,3,4)*w(T,3,2),H=w(n,2,2)*w(T,2,3)-p.y*w(n,3,4)*w(T,3,3),$=o.x*N+o.y*j+o.z*H,ct=w(n,1,1)*w(T,1,1)-f.x*w(n,3,4)*w(T,3,1),yt=w(n,1,1)*w(T,1,2)-f.x*w(n,3,4)*w(T,3,2),Ct=w(n,1,1)*w(T,1,3)-f.x*w(n,3,4)*w(T,3,3),Rt=a.x*ct+a.y*yt+a.z*Ct,Te=w(n,2,2)*w(T,2,1)-f.y*w(n,3,4)*w(T,3,1),gt=w(n,2,2)*w(T,2,2)-f.y*w(n,3,4)*w(T,3,2),kt=w(n,2,2)*w(T,2,3)-f.y*w(n,3,4)*w(T,3,3),Pt=a.x*Te+a.y*gt+a.z*kt,se=Math.abs(ct-L),Rr=Math.abs(yt-D),le=Math.abs(Ct-R),ue=Math.abs(ct-N),gi=Math.abs(yt-j),xn=Math.abs(Ct-H),rt=Math.abs(Te-L),Mt=Math.abs(gt-D),xt=Math.abs(kt-R),ye=Math.abs(Te-N),Sn=Math.abs(gt-j),Ao=Math.abs(kt-H),vi=Math.min(se+Rr+le,ue+gi+xn),Wt=Math.min(rt+Mt+xt,ye+Sn+Ao);vi<Wt&&(ct=Te,yt=gt,Ct=kt,Rt=Pt);let bi=N*R-L*H,ko=j*R-D*H,el=$*R-G*H,No=ct*H-N*Ct,Ro=yt*H-j*Ct,m1=Rt*H-$*Ct,E5=(m1*ko-el*Ro)/(No*ko-bi*Ro),L5=(m1*bi-el*No)/(Ro*bi-ko*No),y1=j*L-D*N,D5=H*L-R*N,_5=$*L-G*N,g1=yt*N-j*ct,O5=Ct*N-H*ct,v1=((Rt*N-$*ct)*y1-_5*g1)/(O5*y1-D5*g1),rl=T.clone();return rl.elements[12]=E5,rl.elements[13]=L5,rl.elements[14]=v1,v1>0?rl:null});v(this,"updateTouchOrigin",()=>{let e=this.renderer.domElement;this.touch.origin.offsetLeft=e.getBoundingClientRect().left,this.touch.origin.offsetTop=e.getBoundingClientRect().top});v(this,"touchToScene",e=>{this.touch.touches=[];for(let i=0,n=e.touches.length;i<n;i++){let o=e.touches[i],a=W4(o,this.touch.origin);this.touch.touches.push(new U(a.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,-(a.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1))}this.coords.mouse=this.touch.touches[0]});v(this,"canScrollZoom",e=>{let i=Pm(e),n=this.getZoomAltitude();return!(i<0&&n===this.getZoomScaledMax()||i>0&&n===this.getZoomScaledMin())});v(this,"mouseToScene",e=>{let i=this.getMousePos(e);return this.coords.mouse.x=i.x/this.renderer.domElement.width*this.rendererState.pixelRatio*2-1,this.coords.mouse.y=-(i.y/this.renderer.domElement.height*this.rendererState.pixelRatio)*2+1,this.coords.mouse});v(this,"getMousePos",e=>({x:e.offsetX,y:e.offsetY}));v(this,"handleMouseDownRotate",e=>{this.coords.rotateStart.set(e.clientX,e.clientY),this.publish("rotate-start"),this.publish("user-rotate-start")});v(this,"handleMouseDownPan",()=>{let e=this.raycastToFloor(this.coords.mouse);this.coords.panStart.set(e.x,e.y,0),this.coords.panCameraStart.set(this.orbit.position.x,this.orbit.position.y,0),this.publish("pan-start"),this.publish("user-pan-start")});v(this,"handleMouseDownPedestal",e=>{let i=new U(e.clientX,e.clientY);this.coords.initialShiftPos=i,this.coords.initialPedestal=this.getPedestal(),this.pedestalScaleFactor=Pf(this.camera.fov,this.renderer.domElement.clientHeight,this.getZoomAltitude()),this.publish("pedestal-start"),this.publish("user-pedestal-start")});v(this,"handleMouseMovePedestal",e=>{let i={x:e.clientX,y:e.clientY},n=this.coords.initialPedestal+this.pedestalScaleFactor*(i.y-this.coords.initialShiftPos.y);this.stayInsideBounds&&(n<this.minPedestal?n=Math.max(n,this.minPedestal):n>this.maxPedestal&&(n=Math.min(n,this.maxPedestal))),n!==this.getPedestal()&&this.setPedestal(n,!0)});v(this,"handleMouseMoveRotate",e=>{this.coords.rotateEnd.set(e.clientX,e.clientY),this.coords.rotateDelta.subVectors(this.coords.rotateEnd,this.coords.rotateStart),this.rotate(-this.coords.rotateDelta.x/this.rotateSpeed),this.setTilt(this.getTilt()-this.coords.rotateDelta.y/this.rotateSpeed),this.coords.rotateStart.copy(this.coords.rotateEnd),this.publish("change")});v(this,"publishUserZoomDebounced",nr(()=>{this.isUserZooming=!1,this.publish("user-zoom-end")},250));v(this,"publishUserZoomEvent",()=>{this.isUserZooming?this.publishUserZoomDebounced():(this.publish("user-zoom-start"),this.isUserZooming=!0,this.publishUserZoomDebounced())});v(this,"setUserInteracting",()=>{this.userInteracting=!0});v(this,"unsetUserInteracting",()=>{this.userInteracting=!1});v(this,"publishPedestalChangeEvent",e=>{this.publish("pedestal-change",{pedestal:e,scrolledToTop:this.scrolledToTop,scrolledToBottom:this.scrolledToBottom,scrollPercent:this.scrollPercent})});v(this,"convertAltitudeToZoomLevel",e=>{let[,i]=this.center,o=e*2*Math.tan(nt.degToRad(this.camera.fov)/2)/this.options.canvasHeight,a=Math.cos(nt.degToRad(i))*2*Math.PI*ui/o;return nt.clamp(Math.log2(a/512),mf,yf)});v(this,"convertZoomLevelToAltitude",e=>{let[,i]=this.center,n=nt.clamp(e,mf,yf),o=Math.pow(2,n),a=nt.clamp(i,Q3,tb),u=o*512;return Math.cos(nt.degToRad(a))*Math.PI*2*ui/u*this.options.canvasHeight/2/Math.tan(nt.degToRad(this.camera.fov)/2)});v(this,"completeTween",e=>{e.isPlaying?e.stop():e.end(),this.tweens.delete(e)});P(this,un,{PIXELS:"pixels",PORTIONS:"portions"});P(this,_c,["top","bottom","left","right"]);v(this,"getCameraFrameForPoints",(e,i,n,o,{canvasWidth:a,canvasHeight:u},s=this.minZoomAltitude,p=this.maxZoomAltitude)=>{Number.isFinite(n)&&(n=1),Number.isFinite(i)&&(i=1),s=Math.max(this.cameraPlane.position.z,s);let f={position:this.getPosition(),zoom:s};if(e==null||e.length===0)return f;o||(o={top:0,bottom:0,left:0,right:0,type:c(this,un).PIXELS});for(let Wt of c(this,_c))typeof o[Wt]!="number"&&(o[Wt]=0);if(o.type||(o.type=c(this,un).PIXELS),o.type===c(this,un).PORTIONS&&(o={top:o.top*u,bottom:o.bottom*u,left:o.left*a,right:o.right*a,type:c(this,un).PIXELS}),o.left+o.right>=a||o.top+o.bottom>=u)return f;this.orbit.updateMatrixWorld();let m=this.camera.matrixWorldInverse,y=this.camera.fov*(Math.PI/180)/2,x=y*n,M=Math.atan(Math.tan(y)*(a/u))*i;if(e.length===1){let Wt=e[0].clone();Wt.applyMatrix4(m);let bi=s*Math.tan(M)*2,ko=s*Math.tan(x)*2,el=(o.left-o.right)/2/a,No=(o.top-o.bottom)/2/u,Ro=new W(-el*bi,No*ko,0);return Wt.add(Ro),Wt.applyMatrix4(this.camera.matrixWorld),f.position.x=Wt.x,f.position.y=Wt.y,f.position.z=Wt.z,f.zoom=Math.max(f.zoom,f.position.z),f}let g=new W(1/0,1/0,1/0),C=new W(-1/0,-1/0,-1/0),I=new dr().setFromPoints(e),T;for(let Wt=0,bi=e.length;Wt<bi;Wt++)T=e[Wt].clone(),T.applyMatrix4(m),g.min(T),C.max(T);let w=C.x-g.x,L=C.y-g.y,D=a-o.left-o.right,R=u-o.top-o.bottom,G=(C.x+g.x)/2,N=(C.y+g.y)/2,j=w/D,H=L/R,$=s,ct=p,yt=$*Math.tan(M)*2,Ct=ct*Math.tan(M)*2,Rt=yt/a,Te=Ct/a,gt=Math.max(j,H);gt=nt.clamp(gt,Rt,Te);let kt=D*gt,Pt=R*gt,se={min:{x:G-kt/2-o.left*gt,y:N-Pt/2-o.bottom*gt},max:{x:G+kt/2+o.right*gt,y:N+Pt/2+o.top*gt}},Rr=(se.min.x+se.max.x)/2,le=(se.min.y+se.max.y)/2,ue=I.getCenter(new W),gi=Math.abs(Rr-se.min.x),xn=Math.abs(le-se.min.y),rt=gi/Math.tan(M),Mt=xn/Math.tan(x),xt=new W;xt.set(Rr,le,C.z+Math.max(rt,Mt)),xt.applyMatrix4(this.camera.matrixWorld);let ye=new W;ye.set(Rr,le,C.z),ye.applyMatrix4(this.camera.matrixWorld);let Sn=new W().subVectors(ye,xt),Ao=(ue.z-xt.z)/Sn.z,vi=new W().copy(xt).add(Sn.clone().multiplyScalar(Ao));return f.position=vi,ye.set(f.position.x,f.position.y,f.position.z),xt.sub(ye),f.zoom=xt.length(),f});this.camera=e,this.renderer=n,this.rendererState=o,this.scene=i,this.options=a,this.elevation=e.parent,this.orbit=this.elevation.parent,this.cameraPlane=this.createCameraPlane(),this.zoomStart=e.position.z,a.mode!=="outdoors-overlay"&&this.addEventListeners()}get maxZoomLevel(){return this.convertAltitudeToZoomLevel(this.minZoomAltitude)}setMaxZoomLevel(e){this.minZoomAltitude=this.convertZoomLevelToAltitude(e)}get minZoomLevel(){return this.convertAltitudeToZoomLevel(this.maxZoomAltitude)}setMinZoomLevel(e){this.maxZoomAltitude=this.convertZoomLevelToAltitude(e)}get scrollPercent(){let e=this.minPedestal,i=this.maxPedestal,n=this.getPedestal();return n=Math.min(n,i),n=Math.max(n,e),(n-e)/(i-e)*100}get scrolledToBottom(){return this.minPedestal===0||Math.floor(this.getPedestal())<=this.minPedestal}get scrolledToTop(){return this.maxPedestal===0||Math.ceil(this.getPedestal())>=this.maxPedestal}get center(){var o,a,u,s;let e=this.getPosition(),{lat:i,lon:n}=Hu((a=(o=this.rendererState.center)==null?void 0:o[1])!=null?a:0,(s=(u=this.rendererState.center)==null?void 0:u[0])!=null?s:0,e.x,e.y);return[n,i]}setCenter(e,i){var a,u,s,p;let{x:n,y:o}=Xu((u=(a=this.rendererState.center)==null?void 0:a[1])!=null?u:0,(p=(s=this.rendererState.center)==null?void 0:s[0])!=null?p:0,i,e);this.setPosition(n,o)}focusOn(e,{insetsPadding:i},n={}){let o=n.curve,a=1,u=1,s=n.callback,p=n.cancelledCallback,f=n.minZoom!==void 0?n.minZoom:this.minZoomAltitude,m=n.maxZoom!==void 0?n.maxZoom:this.maxZoomAltitude,y=this.options.canvasWidth,x=this.options.canvasHeight,S;if(n.duration!==void 0?S=n.duration:b.env.TESTING==="true"?S=0:S=200,i.top!==0||i.bottom!==0||i.left!==0||i.right!==0)if(n.tilt!==void 0&&n.tilt!==this.getTilt()||n.rotation!==void 0&&n.rotation!==this.getRotation())this.animateCamera({position:this.getPosition(),tilt:n.tilt,rotation:n.rotation},S,o,()=>{let M=n.padding||i,g=this.getCameraFrameForPoints(e,a,u,M,{canvasWidth:y,canvasHeight:x},f,m);this.animateCamera({position:g.position,tilt:this.getTilt(),rotation:this.getRotation(),zoom:g.zoom},S,o,s,p)});else{let M=n.padding||i,g=this.getCameraFrameForPoints(e,a,u,M,{canvasWidth:y,canvasHeight:x},f,m);this.animateCamera({position:g.position,tilt:this.getTilt(),rotation:this.getRotation(),zoom:g.zoom},S,o,s,p)}else{let M=n.padding||i,g=this.getCameraFrameForPoints(e,a,u,M,{canvasHeight:x,canvasWidth:y},f,m);this.animateCamera({position:g.position,tilt:n.tilt,rotation:n.rotation,zoom:g.zoom},S,o,s,p)}}resize(e,i){this.options.canvasWidth=e,this.options.canvasHeight=i}};un=new WeakMap,_c=new WeakMap,l(Tm,"CameraSystem");var Cs=Tm;d();var Gw=300,Im=class Im{state;constructor(t){this.state=t}update(t){var o;let e,i,n;for(let a of this.state.entity2DIds)e=this.state.entity2DMap.get(a),e&&(i=e.components[0],n=e.components[1],i instanceof xe&&i.containerEl!=null&&((i.visible===!0||((o=i.animation)==null?void 0:o.pending)===!0)&&(i.containerEl.style.transform=`translate3D(${i.projection.x}px, ${i.projection.y}px, ${i.projection.y}px)`),i.visible===!0?i.containerEl.style.pointerEvents=t||n!=null?"none":"auto":i.containerEl.style.pointerEvents="none",i.visibilityNeedsUpdate&&(i.animation&&i.animation.cancel(),i.animation=i.containerEl.animate([{opacity:i.visible?"1":"0"}],{duration:Gw,easing:"ease-in-out",fill:"forwards"}),i.visibilityNeedsUpdate=!1)))}};l(Im,"DOMDrawSystem");var Oc=Im;d();var Em=class Em{percentExpanded=0;activeId="";gap=20;dirty=!0};l(Em,"StackComponent");var Ac=Em;d();var Lm=class Lm extends J{state;dirty=!0;domTree;observers=new Map;constructor(t,e){super(),this.state=t,this.domTree=e}setupObserver(){var e;if(this.observers){for(let i of this.observers.values())i.disconnect();this.observers.clear()}let t;for(let i of this.domTree.children){let n=i.getAttribute("data-marker-id");if(n!=null&&(t=this.state.entity2DMap.get(n),(e=t.components[0].options)!=null&&e.dynamicResize)){let o=new ResizeObserver(this.updateDimensions);o.observe(i),this.observers.set(i.userData.entityId,o)}}}updateDimensions=t=>{t.forEach(e=>{let i=e.target,n=i.getAttribute("data-marker-id");if(n){let o=this.state.entity2DMap.get(n);if(o&&o.components[0]instanceof xe&&i.firstElementChild){let{width:a,height:u}=i.firstElementChild.getBoundingClientRect();o.components[0].updateDimensions(a,u)}}}),this.publish("dimensions-update")};update(){this.dirty&&(this.setupObserver(),this.dirty=!1)}destroy(){for(let t of this.observers.values())t.disconnect();this.observers.clear()}};l(Lm,"DOMResizeSystem");var kc=Lm;d();var xs=Br(lo());var Vw=0,Hw=22,Xw=0,jw=90;function cn(r,t,e,i){return(r<t||r>e)&&B.warn(i),Math.min(e,Math.max(t,r))}l(cn,"clampWithWarning");var Z4={linear:xs.default.Easing.Linear.None,"ease-in":xs.default.Easing.Quadratic.In,"ease-out":xs.default.Easing.Quadratic.Out,"ease-in-out":xs.default.Easing.Quadratic.InOut},V,lt,pn,Ss,Dm=class Dm{constructor(t,e,i,n){P(this,V,void 0);P(this,lt,void 0);P(this,pn,void 0);P(this,Ss,void 0);E(this,V,t),E(this,lt,e),E(this,pn,i),E(this,Ss,n),c(this,lt).cameraSystem.on("pedestal-change",({pedestal:o})=>{c(this,V).map&&(c(this,V).map.transform.elevation=o,c(this,V).map.transform.minElevationForCurrentTile=o,c(this,V).map.triggerRepaint()),c(this,lt).cameraSystem.setCameraPlaneElevation(o),c(this,Ss).position.z=o})}get center(){return c(this,V).mode==="outdoors-overlay"&&c(this,V).map?c(this,V).map.getCenter().toArray():c(this,lt).cameraSystem.center}setCenter(t){var e;if(c(this,V).mode==="outdoors-overlay"&&c(this,V).map){(e=c(this,V).map)==null||e.setCenter(t);return}c(this,lt).cameraSystem.setCenter(t[0],t[1])}get zoomLevel(){var t;return c(this,V).mode==="outdoors-overlay"&&c(this,V).map?(t=c(this,V).map)==null?void 0:t.getZoom():c(this,lt).cameraSystem.getZoomLevel()}setZoomLevel(t){var e;c(this,V).mode==="outdoors-overlay"&&c(this,V).map&&((e=c(this,V).map)==null||e.setZoom(t)),c(this,lt).cameraSystem.setZoomLevel(cn(t,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits."))}get maxZoomLevel(){return c(this,lt).cameraSystem.maxZoomLevel}get minZoomLevel(){return c(this,lt).cameraSystem.minZoomLevel}setMinZoomLevel(t){var i;let e=Math.max(Vw,t);c(this,lt).cameraSystem.setMinZoomLevel(e),(i=c(this,V).map)==null||i.setMinZoom(e)}setMaxZoomLevel(t){var i;let e=Math.min(Hw,t);(i=c(this,V).map)==null||i.setMaxZoom(e),c(this,lt).cameraSystem.setMaxZoomLevel(e)}get maxPitch(){var t;return c(this,V).mode==="outdoors-overlay"&&c(this,V).map?(t=c(this,V).map)==null?void 0:t.getMaxPitch():nt.radToDeg(c(this,lt).cameraSystem.maxTilt)}get minPitch(){var t;return c(this,V).mode==="outdoors-overlay"&&c(this,V).map?(t=c(this,V).map)==null?void 0:t.getMinPitch():nt.radToDeg(c(this,lt).cameraSystem.minTilt)}setMinPitch(t){var i;let e=Math.max(Xw,t);(i=c(this,V).map)==null||i.setMinPitch(e),c(this,lt).cameraSystem.minTilt=nt.degToRad(e)}setMaxPitch(t){var i;let e=Math.min(jw,t);(i=c(this,V).map)==null||i.setMaxPitch(e),c(this,lt).cameraSystem.maxTilt=nt.degToRad(e)}get bearing(){var t;return c(this,V).mode==="outdoors-overlay"&&c(this,V).map?(t=c(this,V).map)==null?void 0:t.getBearing():nt.radToDeg(c(this,lt).cameraSystem.getRotation())}setBearing(t){var e;if(c(this,V).mode==="outdoors-overlay"&&c(this,V).map){(e=c(this,V).map)==null||e.setBearing(t);return}c(this,lt).cameraSystem.setRotation(nt.degToRad(t))}get pitch(){var t;return c(this,V).mode==="outdoors-overlay"&&c(this,V).map?(t=c(this,V).map)==null?void 0:t.getPitch():nt.radToDeg(c(this,lt).cameraSystem.getTilt())}setPitch(t){var e;if(c(this,V).mode==="outdoors-overlay"&&c(this,V).map){(e=c(this,V).map)==null||e.setPitch(t);return}c(this,lt).cameraSystem.setTilt(nt.degToRad(cn(t,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")))}get elevation(){return c(this,lt).cameraSystem.getPedestal()}setElevation(t){c(this,lt).cameraSystem.setPedestal(t,!0)}get insetsPadding(){return c(this,pn).insetsPadding}setInsetPadding(t){c(this,pn).center&&(c(this,pn).insetsPadding=t?{...t}:dc)}animateTo(t){var a;if(c(this,V).mode==="outdoors-overlay"&&c(this,V).map)return(a=c(this,V).map)==null||a.flyTo({center:t.center,zoom:t.zoomLevel,bearing:t.bearing,pitch:t.pitch,duration:t.duration}),Promise.resolve();let e=t.center?c(this,V).convertTo3DMapPosition(t.center[1],t.center[0],0):void 0,i=t.zoomLevel!==void 0?c(this,lt).cameraSystem.convertZoomLevelToAltitude(cn(t.zoomLevel,this.minZoomLevel,this.maxZoomLevel,"zoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() and mapView.Camera.setMaxZoomLevel() to adjust limits.")):void 0,n=t.bearing!==void 0?nt.degToRad(t.bearing):void 0,o=t.pitch!==void 0?nt.degToRad(cn(t.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0;return new Promise(u=>{c(this,lt).cameraSystem.animateCamera({position:e,zoom:i,rotation:n,tilt:o},t.duration||0,Z4[t.easing||"ease-in-out"],u,u)})}focusOn(t,e){var i,n;return c(this,V).mode==="outdoors-overlay"&&c(this,V).map?(t.length===1?(i=c(this,V).map)==null||i.flyTo({center:t[0],duration:(e==null?void 0:e.duration)||c(this,V).map.getBearing(),animate:!0,bearing:(e==null?void 0:e.bearing)||c(this,V).map.getBearing(),pitch:(e==null?void 0:e.pitch)||c(this,V).map.getPitch(),zoom:(e==null?void 0:e.maxZoomLevel)||c(this,V).map.getMaxZoom()}):(n=c(this,V).map)==null||n.fitBounds(t,{duration:e==null?void 0:e.duration,animate:!0,bearing:(e==null?void 0:e.bearing)||c(this,V).map.getBearing(),pitch:(e==null?void 0:e.pitch)||c(this,V).map.getPitch(),zoom:(e==null?void 0:e.maxZoomLevel)||c(this,V).map.getMaxZoom()}),Promise.resolve()):new Promise(o=>{c(this,lt).cameraSystem.focusOn(t.map(a=>c(this,V).convertTo3DMapPosition(a[1],a[0],a[2]||0)),{insetsPadding:(e==null?void 0:e.padding)||this.insetsPadding},{minZoom:(e==null?void 0:e.maxZoomLevel)===void 0?void 0:c(this,lt).cameraSystem.convertZoomLevelToAltitude(cn(e.maxZoomLevel,this.minZoomLevel,this.maxZoomLevel,"maxZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMaxZoomLevel() to adjust limits.")),maxZoom:(e==null?void 0:e.minZoomLevel)===void 0?void 0:c(this,lt).cameraSystem.convertZoomLevelToAltitude(cn(e.minZoomLevel,this.minZoomLevel,this.maxZoomLevel,"minZoomLevel was clamped to minZoomLevel/maxZoomLevel bounds. Use mapView.Camera.setMinZoomLevel() to adjust limits.")),padding:(e==null?void 0:e.padding)||{top:0,left:0,bottom:0,right:0},curve:Z4[(e==null?void 0:e.easing)||"ease-in-out"],rotation:e!=null&&e.bearing?nt.degToRad(e.bearing):void 0,tilt:e!=null&&e.pitch?nt.degToRad(cn(e.pitch,this.minPitch,this.maxPitch,"pitch was clamped to minPitch/maxPitch bounds. Use mapView.Camera.setMinPitch() and mapView.Camera.setMaxPitch() to adjust limits.")):void 0,duration:e==null?void 0:e.duration,callback:o,cancelledCallback:o})})}};V=new WeakMap,lt=new WeakMap,pn=new WeakMap,Ss=new WeakMap,l(Dm,"Camera");var Nc=Dm;d();function z4(r){r&&(r.map&&(r.map.dispose(),r.map=void 0),r.dispose())}l(z4,"scrubMaterial");function Ge(r){for(let t=r.children.length-1;t>=0;t--)Ge(r.children[t]);"geometry"in r&&r.geometry&&r.geometry.dispose(),r.parent&&r.parent.remove(r),"material"in r&&Array.isArray(r.material)?r.material.forEach(function(t){z4(t)}):"material"in r&&typeof r.material<"u"&&z4(r.material)}l(Ge,"destroyObject3D");d();var q4=`uniform vec4 uSize;
|
|
612
|
-
varying vec2 vUv;
|
|
613
|
-
void main() {
|
|
614
|
-
vUv = uv;
|
|
615
|
-
// Scale the position by the size of the quad
|
|
616
|
-
// and shift to top left corner for 0,0
|
|
617
|
-
vec2 transformed = position.xy * uSize.xy - vec2(1.0, -1.0);
|
|
618
|
-
// Apply width .x and height .y of image
|
|
619
|
-
transformed += vec2(uSize.x, -uSize.y);
|
|
620
|
-
// Apply left .w and top .z offset
|
|
621
|
-
transformed += vec2(uSize.w, -uSize.z) * 2.0;
|
|
622
|
-
gl_Position = vec4(transformed, 1.0, 1.0);
|
|
623
|
-
}`;var $4=`varying vec2 vUv;
|
|
624
|
-
uniform sampler2D uTexture;
|
|
625
|
-
uniform float uOpacity;
|
|
626
|
-
void main() {
|
|
627
|
-
#ifndef debug
|
|
628
|
-
vec4 texture = texture2D(uTexture, vUv);
|
|
629
|
-
gl_FragColor = vec4(texture.rgb, texture.a * uOpacity);
|
|
630
|
-
#else
|
|
631
|
-
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
|
632
|
-
#endif
|
|
633
|
-
}`;d();var J4=4.291666666666667,K4=15,Q4=25,t5=43/60;d();var e5=["horizontal","icon"],Uw=new Map([[e5[0],`<svg viewBox="0 0 206 48">
|
|
634
|
-
<path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z"/>
|
|
635
|
-
<path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z"/>
|
|
636
|
-
<path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z"/>
|
|
637
|
-
<path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z"/>
|
|
638
|
-
</svg>`],[e5[1],`<svg viewBox="0 0 43 60">
|
|
639
|
-
<path d="M14.0291 7.06645C14.0291 10.9691 10.8885 14.1329 7.01453 14.1329C3.14051 14.1329 0 10.9691 0 7.06645C0 3.16376 3.14051 0 7.01453 0C10.8885 0 14.0291 3.16376 14.0291 7.06645Z"/>
|
|
640
|
-
<path d="M28.7335 18.3468H35.1045C36.7455 18.3468 37.5178 19.0599 37.5821 20.6158V57.7309C37.5821 59.2868 36.8099 60 35.1367 60H28.9588C27.1569 60 26.642 59.7406 25.6767 58.282L12.6452 38.282V57.7309C12.6452 59.2868 11.8729 60 10.1997 60H3.82873C2.15554 60 1.3833 59.2868 1.3833 57.7309V20.6158C1.3833 19.0599 2.15554 18.3468 3.82873 18.3468H10.1032C11.9051 18.4116 12.4843 18.671 13.3852 20.0648L26.3524 40.162V20.6158C26.3524 19.0599 27.1247 18.3468 28.7335 18.3468Z"/>
|
|
641
|
-
<path d="M41.5 60C42.3362 60 43 59.3143 43 58.5V58.4914C43 57.6771 42.3448 57 41.5 57C40.6638 57 40 57.6857 40 58.5V58.5086C40 59.3229 40.6552 60 41.5 60ZM41.5 59.8371C40.7414 59.8371 40.1724 59.2371 40.1724 58.5086V58.5C40.1724 57.7714 40.75 57.1629 41.5 57.1629C42.2586 57.1629 42.8276 57.7629 42.8276 58.4914V58.5C42.8276 59.2286 42.25 59.8371 41.5 59.8371ZM40.9138 59.2286H41.2069V58.7057H41.5259L41.8879 59.2286H42.2414L41.8362 58.6543C42.0431 58.5943 42.1897 58.44 42.1897 58.1914C42.1897 57.8743 41.9397 57.7114 41.6034 57.7114H40.9138V59.2286ZM41.2069 58.4657V57.9686H41.5776C41.7759 57.9686 41.8879 58.0543 41.8879 58.2171C41.8879 58.3629 41.7759 58.4657 41.5776 58.4657H41.2069Z"/>
|
|
642
|
-
</svg>`]]),Zw=/<svg([^>]*)>/g;function r5(r,t,e,i){let n=Uw.get(r);return n?n.replace(Zw,`<svg$1 width="${e}" height="${i}" xmlns="http://www.w3.org/2000/svg" style="fill: ${t};">`):""}l(r5,"getLogoIcon");var i5=!1,Po={padding:16,scale:1,iconOnly:!1,position:"bottom-left",color:"dark",onClick:()=>{window!=null&&window.open("https://www.mappedin.com")}},Mo,Ps,Pe,Yt,hn,Ve,ur,Me,He,_m=class _m{constructor(t,e,i,n,o){v(this,"options");P(this,Mo,void 0);P(this,Ps,void 0);P(this,Pe,void 0);P(this,Yt,void 0);P(this,hn,void 0);P(this,Ve,0);P(this,ur,0);P(this,Me,0);P(this,He,0);v(this,"dirty",!0);v(this,"getPositionAlignedCanvasCoordinates",(t,e)=>({"top-left":{x:0,y:0},"top-right":{x:t,y:0},"bottom-left":{x:0,y:e},"bottom-right":{x:t,y:e},center:{x:t/2,y:e/2},top:{x:t/2,y:0},bottom:{x:t/2,y:e},left:{x:0,y:e/2},right:{x:t,y:e/2}})[this.options.position]);v(this,"getPositionAlignedPadding",()=>{var i,n,o,a;let t=this.options.padding;if(typeof t=="number")return{"top-left":{x:t,y:t},"top-right":{x:-t,y:t},"bottom-left":{x:t,y:-t},"bottom-right":{x:-t,y:-t},center:{x:0,y:0},top:{x:0,y:t},bottom:{x:0,y:-t},left:{x:t,y:0},right:{x:-t,y:0}}[this.options.position];let e={top:(i=t.top)!=null?i:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(a=t.left)!=null?a:0};return{x:e.left-e.right,y:e.top-e.bottom}});var a,u,s,p,f,m;this.options={position:(a=o==null?void 0:o.position)!=null?a:Po.position,padding:(u=o==null?void 0:o.padding)!=null?u:Po.padding,scale:(s=o==null?void 0:o.scale)!=null?s:Po.scale,iconOnly:(p=o==null?void 0:o.iconOnly)!=null?p:Po.iconOnly,color:(f=o==null?void 0:o.color)!=null?f:Po.color,onClick:(m=o==null?void 0:o.onClick)!=null?m:Po.onClick},E(this,Ps,t),E(this,Mo,n),E(this,Me,e),E(this,He,i)}get color(){return this.options.color==="light"?"white":"#293136"}get iconName(){return this.options.iconOnly?"icon":"horizontal"}get minWidth(){return this.options.iconOnly?K4:75}get defaultWidth(){return this.options.iconOnly?Q4:150}get aspectRatio(){return this.options.iconOnly?t5:J4}get icon(){return r5(this.iconName,this.color,c(this,Ve)*c(this,Mo).pixelRatio,c(this,ur)*c(this,Mo).pixelRatio)}setSize(t,e){c(this,Yt)&&(c(this,Yt).uniforms.uSize.value.x=t,c(this,Yt).uniforms.uSize.value.y=e)}setXY(t,e){c(this,Yt)&&(c(this,Yt).uniforms.uSize.value.w=t,c(this,Yt).uniforms.uSize.value.z=e)}get width(){return c(this,Ve)}get height(){return c(this,ur)}getPositionAlignedOffset(t,e){return{"top-left":{x:0,y:0},"top-right":{x:-t,y:0},"bottom-left":{x:0,y:-e},"bottom-right":{x:-t,y:-e},center:{x:-(t/2),y:-(e/2)},top:{x:-(t/2),y:0},bottom:{x:-(t/2),y:-e},left:{x:0,y:-(e/2)},right:{x:-t,y:-(e/2)}}[this.options.position]}clampWithWarning(t,e,i,n){return e>=i?(B.warn(`Watermark ${n} does not fit within given space.`),e):t<e||t>i?(B.warn(`Watermark ${n} must be between ${e} and ${i}.`),nt.clamp(t,e,i)):t}show(){if(!c(this,Yt)){B.warn("Watermark material is not initialized.");return}c(this,Yt).visible=!0,this.resize(c(this,Me),c(this,He))}hide(){if(!c(this,Yt)){B.warn("Watermark material is not initialized.");return}c(this,Yt).visible=!1,E(this,hn,void 0)}insertIntoQuadTree(t){c(this,hn)!=null&&typeof this.options.onClick=="function"&&t.insert(c(this,hn))}render(){let t=this.clampWithWarning(this.defaultWidth*this.options.scale,this.minWidth,c(this,Me),"width");E(this,Ve,t),E(this,ur,c(this,Ve)/this.aspectRatio),Mc.getLoader().load(`data:image/svg+xml;base64,${btoa(this.icon)}`,e=>{if(E(this,Yt,new Go({uniforms:{uTexture:{value:e},uSize:{value:new S1(0,0,0,0)},uOpacity:{value:.7}},vertexShader:q4,fragmentShader:$4,depthWrite:!1,depthTest:!1,defines:{debug:i5},wireframe:i5,transparent:!0,visible:!0})),c(this,Pe))c(this,Pe).material=c(this,Yt),c(this,Pe).material.needsUpdate=!0;else{let i=new Mn(2,2,1,1);E(this,Pe,new Ut(i,c(this,Yt))),c(this,Pe).position.set(0,0,-1),c(this,Pe).frustumCulled=!1,c(this,Pe).renderOrder=999;let n=new w1(1,1,1),o=new Ut(n,new Fr({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}));o.layers.set(1),c(this,Pe).add(o),c(this,Ps).add(c(this,Pe))}this.resize(c(this,Me),c(this,He))})}resize(t,e){E(this,Me,t),E(this,He,e);let i=this.getPositionAlignedCanvasCoordinates(c(this,Me),c(this,He)),n=this.getPositionAlignedPadding(),o=this.getPositionAlignedOffset(c(this,Ve),c(this,ur)),a=this.clampWithWarning(i.x+n.x+o.x,0,c(this,Me)-c(this,Ve),"x"),u=this.clampWithWarning(i.y+n.y+o.y,0,c(this,He)-c(this,ur),"y");this.setSize(c(this,Ve)/c(this,Me),c(this,ur)/c(this,He)),this.setXY(a/c(this,Me),u/c(this,He)),E(this,hn,new Ot(a,u,c(this,Ve),c(this,ur),{entityId:"watermark"}))}update(){this.dirty&&(this.render(),this.dirty=!1)}};Mo=new WeakMap,Ps=new WeakMap,Pe=new WeakMap,Yt=new WeakMap,hn=new WeakMap,Ve=new WeakMap,ur=new WeakMap,Me=new WeakMap,He=new WeakMap,l(_m,"WatermarkSystem");var Rc=_m;d();var Om=100,Am=class Am{currentTotalBoundingBox;state;cameraSystem;dirty=!1;constructor(t,e){this.state=t,this.cameraSystem=e}update(){if(this.dirty){this.currentTotalBoundingBox==null&&(this.currentTotalBoundingBox=new dr,this.state.entityScene.children.length===0?this.currentTotalBoundingBox.setFromCenterAndSize(new W(0,0,0),new W(Om*2,Om*2,0)):(this.currentTotalBoundingBox.setFromObject(this.state.entityScene),this.currentTotalBoundingBox.expandByScalar(Om))),this.currentTotalBoundingBox.expandByObject(this.state.entityScene);for(let t of this.state.entity2DMap.values())t.positionDirty===!0&&(this.currentTotalBoundingBox.expandByPoint(t.position),t.positionDirty=!1);this.cameraSystem.panBounds={center:this.currentTotalBoundingBox.getCenter(new W),min:this.currentTotalBoundingBox.min,max:this.currentTotalBoundingBox.max,radius:this.currentTotalBoundingBox.getBoundingSphere(new M1).radius},this.cameraSystem.dirty=!0,this.dirty=!1}}};l(Am,"PanBoundsSystem");var Bc=Am;d();var km="\xA9 Mappedin",$w="https://info.mappedin.com/feedback",Nm=["top-left","top-right","bottom-left","bottom-right"],Jw=640,Kw=l(()=>`<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill-rule='evenodd' viewBox='0 0 20 20'>
|
|
643
|
-
<circle cx='10' cy='10' r='5.9' style='fill:rgba(255,255,255,1);'/>
|
|
644
|
-
<path style='fill:rgba(0,0,0,0.7);' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/>
|
|
645
|
-
</svg>`,"getAttributionButtonIcon"),n5={position:"bottom-right"},Rm=class Rm{controlContainerEl;controlPositions;compact=void 0;attribContainerEl;attribInnerEl;attribButtonEl;feedbackLinkEl;attribHTML=km;constructor(t){this.controlContainerEl=document.createElement("div"),this.controlContainerEl.classList.add("mappedin-control-container"),t.appendChild(this.controlContainerEl),this.controlPositions=Nm.reduce((e,i)=>{let n=document.createElement("div");return n.classList.add(`mappedin-ctrl-${i}`),this.controlContainerEl.appendChild(n),e[i]=n,e},{})}addAttributionControl(t=n5){let e=Nm.includes(t.position)?t.position:n5.position;this.attribContainerEl=document.createElement("details"),this.attribContainerEl.classList.add("mappedin-ctrl-attrib",`mappedin-ctrl-attrib-${e}`),this.attribContainerEl.open=!0,this.attribContainerEl.tabIndex=0,this.attribContainerEl.ariaLabel="Attribution",this.controlPositions[e].appendChild(this.attribContainerEl),this.attribButtonEl=document.createElement("summary"),this.attribButtonEl.addEventListener("click",this.toggleAttribution),this.attribButtonEl.classList.add("mappedin-ctrl-attrib-button"),this.attribButtonEl.title="Toggle attribution",this.attribButtonEl.ariaLabel="Toggle attribution",this.attribButtonEl.tabIndex=0,this.attribButtonEl.innerHTML=Kw(),this.attribContainerEl.appendChild(this.attribButtonEl),this.attribInnerEl=document.createElement("div"),this.attribInnerEl.classList.add("mappedin-ctrl-attrib-inner"),this.attribInnerEl.innerHTML=km,this.attribContainerEl.appendChild(this.attribInnerEl),this.feedbackLinkEl=document.createElement("a"),this.feedbackLinkEl.href=$w,this.feedbackLinkEl.target="_blank",this.feedbackLinkEl.rel="nofollow noopener noreferrer",this.feedbackLinkEl.textContent="Provide Feedback",this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner"),this.feedbackLinkEl.classList.add("mappedin-ctrl-attrib-inner-bold"),this.attribContainerEl.appendChild(this.feedbackLinkEl)}toggleAttribution=t=>{this.attribContainerEl!=null&&(t.preventDefault(),this.attribContainerEl.classList.contains("mappedin-compact")&&(this.attribContainerEl.classList.contains("mappedin-compact-show")?(this.attribContainerEl.removeAttribute("open"),this.attribContainerEl.classList.remove("mappedin-compact-show")):(this.attribContainerEl.classList.add("mappedin-compact-show"),this.attribContainerEl.setAttribute("open",""))))};updateAttribution(t){if(!t.style||!this.attribInnerEl||!this.attribContainerEl)return;let e=[km],i=t.style.sourceCaches;for(let o in i){let a=i[o];if(a.used||a.usedForTerrain){let u=a.getSource();u.attribution&&e.indexOf(u.attribution)<0&&e.push(u.attribution)}}e=e.filter(o=>String(o).trim()),e.sort((o,a)=>o.length-a.length),e=e.filter((o,a)=>{for(let u=a+1;u<e.length;u++)if(e[u].indexOf(o)>=0)return!1;return!0});let n=e.join(" ");n!==this.attribHTML&&(this.attribHTML=n,e.length?(this.attribInnerEl.innerHTML=this.attribHTML,this.attribContainerEl.classList.remove("outdoor-attrib-empty")):this.attribContainerEl.classList.add("mappedin-attrib-empty"),this.resizeAttribution(t.getCanvasContainer().offsetWidth))}resizeAttribution(t){this.attribContainerEl&&(t<=Jw||this.compact?this.compact===!1?this.attribContainerEl.setAttribute("open",""):!this.attribContainerEl.classList.contains("mappedin-compact")&&!this.attribContainerEl.classList.contains("mappedin-attrib-empty")&&(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.add("mappedin-compact","mappedin-compact-show")):(this.attribContainerEl.setAttribute("open",""),this.attribContainerEl.classList.contains("mappedin-compact")&&this.attribContainerEl.classList.remove("mappedin-compact","mappedin-compact-show")))}destroyAttributionControl(){this.attribButtonEl&&this.attribButtonEl.removeEventListener("click",this.toggleAttribution),this.attribContainerEl&&(this.attribContainerEl.remove(),this.attribContainerEl=void 0,this.attribInnerEl=void 0,this.attribButtonEl=void 0)}resize(t){this.resizeAttribution(t)}updateData(t){this.updateAttribution(t)}destroy(){this.destroyAttributionControl(),this.controlContainerEl.remove(),this.compact=void 0}};l(Rm,"HTMLControlsSystem");var Fc=Rm;d();var Ms,Bm=class Bm{constructor(t,e){v(this,"mesh");v(this,"type","custom-geometry");v(this,"dirty",!0);v(this,"feature");v(this,"builder");v(this,"outline");v(this,"color",new It);P(this,Ms,0);this.mesh=new rr,this.feature=t,this.builder=e}get visible(){return this.mesh.visible}set visible(t){this.mesh.visible=t}setOpacity(){}setColor(){}get position(){var t;return(t=this.mesh)==null?void 0:t.position}get altitude(){return c(this,Ms)}set altitude(t){this.mesh&&(this.mesh.position.z=t,E(this,Ms,t))}};Ms=new WeakMap,l(Bm,"CustomGeometryComponent");var wo=Bm;d();var Fm=class Fm{state;constructor(t){this.state=t}update(){let t,e;for(let i of this.state.threeDEntities){let n=this.state.entity3DMap.get(i);(n==null?void 0:n.type)==="custom-geometry"&&(t=n.components[0],e=n.components[1],t.dirty&&e.visible!==!1&&(t.builder.setup(t.mesh),t.mesh.traverse(o=>{o.userData={entityId:i,type:"custom-geometry"}}),t.dirty=!1),e.visible!==!1&&t.builder.update(t.mesh))}}};l(Fm,"CustomGeometrySystem");var Gc=Fm;d();var Gm=class Gm{rendererState;dirty=!0;geometries3DDirty=!0;constructor(t){this.rendererState=t}update(t,e=!1){var o,a;let i=e&&t>=16&&t<=19,n;if(this.geometries3DDirty){for(let u of this.rendererState.threeDEntities)if(n=this.rendererState.entity3DMap.get(u),n&&n.type==="geometry-group"&&n.userData.modelURL===void 0&&n.userData.dirty===!1&&n.userData.outlineDirty===!0){let s=n.children[0];n.userData.outlineDirty=!1;let p=s5(n);if(p&&((o=n.parent)==null||o.remove(p),p.geometry.dispose()),!n.components[0].outline||!n.visible)continue;if(n.children.length>0){let f;if(s instanceof go){let y=[],x,S,M,g;for(let C of n.userData.entities3D)g=this.rendererState.entity3DMap.get(C),g instanceof dt&&(S=g.components[0],M=g.components[1],S instanceof $t&&M.visible&&M.outline&&(x=S==null?void 0:S.geometry,x&&y.push(x)));if(y.length===0||(f=ze(y),!f))continue}else f=s.geometry;let m=I4(f,s.material);m.userData.outlineOfEntityId=n.userData.entityId;for(let y of n.userData.entities3D.values()){let x=this.rendererState.entity3DMap.get(y);(x==null?void 0:x.type)==="geometry"&&(x.components[0].outline=m)}(a=n.parent)==null||a.add(m)}this.dirty=!0}this.geometries3DDirty=!1}if((i||this.dirty)&&this.rendererState.threeDEntities.length>0){let u=he(t,16,19,0,1),s;for(let p of this.rendererState.threeDEntities)if(s=this.rendererState.entity3DMap.get(p),(s==null?void 0:s.type)==="geometry-group"&&s.components[0]!=null&&s.components[0].outline&&s.visible){let f=s5(s);if(f&&f.visible){let m=Array.isArray(f.material)?f.material:[f.material];for(let y of m)y.opacity=u}}}this.dirty=!1}};l(Gm,"OutlineInterpolationSystem");var Vc=Gm;function s5(r){var e;let t=(e=r.parent)==null?void 0:e.children.find(i=>i.userData.outlineOfEntityId===r.userData.entityId);return t instanceof xi?t:void 0}l(s5,"findOutline");d();var Vm=class Vm{dirty=!0;map;stylesheetId="";userHiddenLayers=new Set;hiddenLayersInStyle=new Set;centerPoint;hideLayersUnderPoint(t,e){this.centerPoint=t;for(let i of e)this.userHiddenLayers.add(i);this.dirty=!0,this.filterStylesInMap(),this.handleRender()}constructor(t){t&&(this.map=t,this.map.on("styledata",this.handleStyleChange),this.map.on("render",this.handleRender))}filterStylesInMap(){if(this.hiddenLayersInStyle=new Set,this.map)for(let t of this.userHiddenLayers)this.map.getLayer(t)&&this.hiddenLayersInStyle.add(t)}handleRender=async()=>{if(!this.map||!this.dirty||!this.hiddenLayersInStyle||this.hiddenLayersInStyle.size===0)return;let t=[],e=this.map.project(this.centerPoint),i=this.map.queryRenderedFeatures(e,{layers:Array.from(this.hiddenLayersInStyle)});for(var n of i)t.push(["!=",["id"],n.id]);t.length>0&&(this.hiddenLayersInStyle.forEach(o=>{this.map.setFilter(o,["all",...t])}),this.dirty=!1)};handleStyleChange=t=>{var e,i;if(this.map&&t&&t.dataType==="style"&&t.type==="styledata"&&this.userHiddenLayers.size>0){let n=(i=(e=t==null?void 0:t.style)==null?void 0:e.stylesheet)==null?void 0:i.id;(!n||n!==this.stylesheetId)&&(this.stylesheetId=n,this.filterStylesInMap(),this.dirty=!0)}};destroy(){this.map&&(this.map.off("styledata",this.handleStyleChange),this.map.off("render",this.handleRender))}};l(Vm,"OutdoorLayers");var Hc=Vm;d();d();d();var Hm=`attribute float pathDistance;
|
|
646
|
-
attribute vec3 pathNormal;
|
|
647
|
-
attribute vec3 pathTangent;
|
|
648
|
-
|
|
649
|
-
uniform vec2 uvScale;
|
|
650
|
-
uniform float vertexes;
|
|
651
|
-
uniform float complete;
|
|
652
|
-
uniform float nearRadius;
|
|
653
|
-
uniform float farRadius;
|
|
654
|
-
uniform float nearZoom;
|
|
655
|
-
uniform float farZoom;
|
|
656
|
-
uniform float pulse;
|
|
657
|
-
uniform float pulseLength;
|
|
658
|
-
uniform bool pathIsVertical;
|
|
659
|
-
uniform bool displayArrowsOnPath;
|
|
660
|
-
uniform vec2 cameraParameters;
|
|
661
|
-
uniform float flattenFactor;
|
|
662
|
-
|
|
663
|
-
varying float zoomLevel;
|
|
664
|
-
varying float radius;
|
|
665
|
-
varying vec2 fragTexcoord;
|
|
666
|
-
varying float fragTopTextureU;
|
|
667
|
-
varying float fragPathDistance;
|
|
668
|
-
|
|
669
|
-
// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using
|
|
670
|
-
// linear interpolation/extrapolation.
|
|
671
|
-
//
|
|
672
|
-
// This performs a pure linear mapping \`y = mx + b\` where
|
|
673
|
-
// \`m = (yMax - yMin) / (xMax - xMin)\`,
|
|
674
|
-
// \`b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin\`.
|
|
675
|
-
float remap(float x, float xMin, float xMax, float yMin, float yMax) {
|
|
676
|
-
return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear
|
|
680
|
-
// interpolation, clamping result values outside [yMin, yMax].
|
|
681
|
-
float clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {
|
|
682
|
-
return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
void main() {
|
|
686
|
-
fragPathDistance = pathDistance;
|
|
687
|
-
|
|
688
|
-
// We can get an origin point for the cross-section of the path by
|
|
689
|
-
// subtracting the surface normal times the radius, since the surface normal
|
|
690
|
-
// points strictly away from the centre.
|
|
691
|
-
vec3 origin = position - nearRadius * normal;
|
|
692
|
-
|
|
693
|
-
// Inflate the path along its surface normal to increase its radius from
|
|
694
|
-
// \`nearRadius\` to \`farRadius\` when the camera is at \`farZoom\`.
|
|
695
|
-
vec3 adjustedPosition = position;
|
|
696
|
-
zoomLevel = clampRemap(cameraParameters.x, nearZoom, farZoom, 0.0, 1.0);
|
|
697
|
-
adjustedPosition += normal * (farRadius - nearRadius) * zoomLevel;
|
|
698
|
-
|
|
699
|
-
// Determine how far the path extends "up" or "down" in the direction of the
|
|
700
|
-
// path normal.
|
|
701
|
-
float height = dot(adjustedPosition - origin, pathNormal);
|
|
702
|
-
|
|
703
|
-
// Flatten the bottom half of the path entirely so that it's flat
|
|
704
|
-
// against the floor. This makes the path look nicer when it's
|
|
705
|
-
// semitransparent behind opaque geometry, so you don't see it
|
|
706
|
-
// peeking through.
|
|
707
|
-
float desiredHeight = max(height, 0.0);
|
|
708
|
-
|
|
709
|
-
desiredHeight = desiredHeight * flattenFactor;
|
|
710
|
-
|
|
711
|
-
float flattenMagnitude = height - desiredHeight;
|
|
712
|
-
adjustedPosition = adjustedPosition - pathNormal * flattenMagnitude;
|
|
713
|
-
|
|
714
|
-
// Transform the vertices into NDC.
|
|
715
|
-
vec4 mvPosition = modelViewMatrix * vec4(adjustedPosition, 1.0);
|
|
716
|
-
gl_Position = projectionMatrix * mvPosition;
|
|
717
|
-
|
|
718
|
-
fragTexcoord = uv;
|
|
719
|
-
|
|
720
|
-
// Compute a texture coordinate for mapping the arrow texture to the path.
|
|
721
|
-
// We don't want to use the u-value that Three.js provides, because the
|
|
722
|
-
// path may end up twisting arbitrarily -- but we want the arrow texture to
|
|
723
|
-
// always be on the top of the path.
|
|
724
|
-
vec3 bitangent = cross(normal, pathTangent);
|
|
725
|
-
fragTopTextureU = -dot(bitangent, pathNormal) * 0.5 + 0.5;
|
|
726
|
-
|
|
727
|
-
radius = mix(nearRadius, farRadius, zoomLevel);
|
|
728
|
-
}
|
|
729
|
-
`;var Xm=`#define ARROW_FADING_POINT 0.15
|
|
730
|
-
|
|
731
|
-
uniform float complete;
|
|
732
|
-
uniform float nearRadius;
|
|
733
|
-
uniform float farRadius;
|
|
734
|
-
uniform vec2 resolution;
|
|
735
|
-
uniform vec2 cameraParameters;
|
|
736
|
-
uniform vec3 color;
|
|
737
|
-
uniform float pathLength;
|
|
738
|
-
uniform bool showPulse;
|
|
739
|
-
uniform vec3 pulseColor;
|
|
740
|
-
uniform float pulse;
|
|
741
|
-
uniform float pulseLength;
|
|
742
|
-
uniform bool pathIsVertical;
|
|
743
|
-
uniform bool displayArrowsOnPath;
|
|
744
|
-
uniform float arrowAnimationTimer;
|
|
745
|
-
uniform float opacityMultiplier;
|
|
746
|
-
uniform sampler2D arrowTexture;
|
|
747
|
-
|
|
748
|
-
varying float zoomLevel;
|
|
749
|
-
varying float radius;
|
|
750
|
-
varying vec2 fragTexcoord;
|
|
751
|
-
varying float fragTopTextureU;
|
|
752
|
-
varying float fragPathDistance;
|
|
753
|
-
|
|
754
|
-
// How long the arrow should be, as a factor of \`pathRadius\`. Since we've
|
|
755
|
-
// mostly flattened the top of the path, values near 2.0 (the diameter)
|
|
756
|
-
// will probably look best.
|
|
757
|
-
const float arrowLength = 2.0;
|
|
758
|
-
|
|
759
|
-
// How much of a relative margin the arrow texture should have inside the
|
|
760
|
-
// area laid out for it. Useful to pull the arrow away from the edges of the
|
|
761
|
-
// path, which slope down.
|
|
762
|
-
const float arrowMargin = 0.1;
|
|
763
|
-
|
|
764
|
-
// How many arrow-lengths of space should be between arrows on a short path.
|
|
765
|
-
const float arrowSpacingOnShortPath = 6.0;
|
|
766
|
-
|
|
767
|
-
// How many arrow-lengths of space should be between arrows on a long path.
|
|
768
|
-
const float arrowSpacingOnLongPath = 7.5;
|
|
769
|
-
|
|
770
|
-
// How long a path must be to be considered "long", as a factor of
|
|
771
|
-
// the path radius.
|
|
772
|
-
const float longPathLength = 200.;
|
|
773
|
-
|
|
774
|
-
// How long a path must be to be considered "short", as a factor of the
|
|
775
|
-
// path radius.
|
|
776
|
-
const float shortPathLength = 75.;
|
|
777
|
-
|
|
778
|
-
// How much of the path's length the fade-in should comprise when going from
|
|
779
|
-
// zero opacity to full opacity.
|
|
780
|
-
const float completeLength = 0.1;
|
|
781
|
-
|
|
782
|
-
// Map the x value from the range [xMin, xMax] to the range [yMin, yMax] using
|
|
783
|
-
// linear interpolation/extrapolation.
|
|
784
|
-
//
|
|
785
|
-
// This performs a pure linear mapping \`y = mx + b\` where
|
|
786
|
-
// \`m = (yMax - yMin) / (xMax - xMin)\`,
|
|
787
|
-
// \`b = -xMin * (yMax - yMin) / (xMax - xMin) + yMin\`.
|
|
788
|
-
float remap(float x, float xMin, float xMax, float yMin, float yMax) {
|
|
789
|
-
return (x - xMin) / (xMax - xMin) * (yMax - yMin) + yMin;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
// Map the x value from [xMin, xMax] to the range [yMin, yMax] using linear
|
|
793
|
-
// interpolation, clamping result values outside [yMin, yMax].
|
|
794
|
-
float clampRemap(float x, float xMin, float xMax, float yMin, float yMax) {
|
|
795
|
-
return clamp(remap(x, xMin, xMax, yMin, yMax), yMin, yMax);
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
void main(void) {
|
|
799
|
-
// Compute the opacity of the path based on the distance from the current
|
|
800
|
-
// fragment to the \`complete\` value as it varies from 0.0 to 1.0.
|
|
801
|
-
// Fragments that are at the \`complete\` value or past it will be fully
|
|
802
|
-
// transparent, while fragments that are at \`complete - completeLength\`
|
|
803
|
-
// or before it will be fully opaque. However, we adjust the \`complete\`
|
|
804
|
-
// value here so that it overshoots by one full \`completeLength\`, so that
|
|
805
|
-
// the entire path will be opaque when the \`complete\` value is at 1.0.
|
|
806
|
-
float completeLocation = complete * (1.0 + completeLength);
|
|
807
|
-
float completeAmount = clampRemap(
|
|
808
|
-
fragPathDistance,
|
|
809
|
-
completeLocation - completeLength,
|
|
810
|
-
completeLocation,
|
|
811
|
-
0.0,
|
|
812
|
-
1.0
|
|
813
|
-
);
|
|
814
|
-
float opacity = 1.0 - smoothstep(0.0, 1.0, completeAmount);
|
|
815
|
-
|
|
816
|
-
// 2020/01/09 Terence Dickson
|
|
817
|
-
// When we render the background and overlay for the mapbox outdoor context
|
|
818
|
-
// behind everything else in single-buffer rendering, the fact that the path
|
|
819
|
-
// writes to the depth buffer means that the background and overlay will not
|
|
820
|
-
// be drawn behind the path even when the path is still fading in. The effect
|
|
821
|
-
// is subtle and is only visible in single-buffer rendering so this quick fix
|
|
822
|
-
// prevents writes to the depth buffer for zero opacity fragments, which gets
|
|
823
|
-
// rid of the most visually-offensive ghosting.
|
|
824
|
-
if (opacity <= 0.0) {
|
|
825
|
-
discard;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
// Push in the texture coordinates so that they ramp up
|
|
829
|
-
// at \`arrowMargin\` instead of at zero; this remapping looks somewhat
|
|
830
|
-
// like this:
|
|
831
|
-
// 1 ^ ___
|
|
832
|
-
// | /
|
|
833
|
-
// | /
|
|
834
|
-
// | /
|
|
835
|
-
// | /
|
|
836
|
-
// |___/
|
|
837
|
-
// 0 +---------->
|
|
838
|
-
// 0 ^ 1
|
|
839
|
-
// arrowMargin
|
|
840
|
-
// Making the arrows narrower on the path.
|
|
841
|
-
float u = fragTopTextureU;
|
|
842
|
-
u = clamp(
|
|
843
|
-
u * (1. / (1. - arrowMargin * 2.)) - (1. / (1. - arrowMargin * 2.) - 1.) / 2.,
|
|
844
|
-
0.0,
|
|
845
|
-
1.0
|
|
846
|
-
);
|
|
847
|
-
|
|
848
|
-
float arrowSpacing = clampRemap(
|
|
849
|
-
pathLength,
|
|
850
|
-
shortPathLength * radius,
|
|
851
|
-
longPathLength * radius,
|
|
852
|
-
arrowSpacingOnShortPath,
|
|
853
|
-
arrowSpacingOnLongPath
|
|
854
|
-
);
|
|
855
|
-
|
|
856
|
-
// Reduce the spacing between arrows when the camera zooms out, as increasing
|
|
857
|
-
// the path radius will increase the arrow size and thus be able to fit
|
|
858
|
-
// fewer arrows on in total, and this secondary movement of the arrows
|
|
859
|
-
// "zooming off" the end of the path is unpleasant
|
|
860
|
-
float expandAmount = mix(1.0, farRadius / nearRadius, zoomLevel);
|
|
861
|
-
float effectiveArrowSpacing =
|
|
862
|
-
arrowSpacing * 1.0 / expandAmount +
|
|
863
|
-
arrowMargin * 2.0;
|
|
864
|
-
|
|
865
|
-
float effectiveArrowLength = arrowLength * radius * (1. - arrowMargin * 2.0);
|
|
866
|
-
|
|
867
|
-
// Adjust the slope of the vertical texture coordinate so that it goes
|
|
868
|
-
// from 0 to 1 along the length of the arrow plus the spacing between
|
|
869
|
-
// arrows, and adjust its x-intercept so that one arrow moves to the
|
|
870
|
-
// exact position of the next arrow as \`arrowAnimationTimer\` goes
|
|
871
|
-
// from 0 to 1
|
|
872
|
-
float v = (
|
|
873
|
-
fragTexcoord.x * (pathLength / effectiveArrowLength)
|
|
874
|
-
- arrowAnimationTimer * (1. + effectiveArrowSpacing)
|
|
875
|
-
);
|
|
876
|
-
|
|
877
|
-
// Compute a "looping sawtooth" wave for determining the vertical texture
|
|
878
|
-
// coordinates of the arrow texture, roughly as follows:
|
|
879
|
-
// 3 ^ /
|
|
880
|
-
// | ___/
|
|
881
|
-
// 2 | /
|
|
882
|
-
// | ___/
|
|
883
|
-
// 1 | /
|
|
884
|
-
// |___/
|
|
885
|
-
// 0 +--------------->
|
|
886
|
-
// 0 ^ ^
|
|
887
|
-
// ^ |_|
|
|
888
|
-
// | effectiveArrowLength
|
|
889
|
-
// |___|
|
|
890
|
-
// effectiveArrowSpacing
|
|
891
|
-
//
|
|
892
|
-
// This is effectively equivalent to this sort of sawtooth wave:
|
|
893
|
-
// ^
|
|
894
|
-
// 1 | / / /
|
|
895
|
-
// |___/ ___/ ___/
|
|
896
|
-
// 0 +--------------->
|
|
897
|
-
//
|
|
898
|
-
// Causing the image of the arrow to repeat, with dead space (the bottom
|
|
899
|
-
// edge of the texture stretched out) between the arrows at the provided
|
|
900
|
-
// spacing. The reason why the "looping" design is preferred is because
|
|
901
|
-
// it takes advantage of WebGL's \`GL_REPEAT\` texture wrapping behaviour
|
|
902
|
-
// to avoid the discontinuity that can end up causing visual artifacts.
|
|
903
|
-
if (mod(v, (1. + effectiveArrowSpacing)) < 1.) {
|
|
904
|
-
v = v - effectiveArrowSpacing * floor(v / (1. + effectiveArrowSpacing));
|
|
905
|
-
} else {
|
|
906
|
-
v = ceil(v / (1. + effectiveArrowSpacing));
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
// Use the r-component of the texture to determine whether the arrow covers
|
|
910
|
-
// this fragment or not
|
|
911
|
-
vec2 sampleTexcoord = vec2(u, v);
|
|
912
|
-
float arrowAmount = 0.0;
|
|
913
|
-
vec3 secondColor = pulseColor;
|
|
914
|
-
|
|
915
|
-
if (displayArrowsOnPath) {
|
|
916
|
-
arrowAmount = texture2D(arrowTexture, sampleTexcoord).r;
|
|
917
|
-
float delta = 1.0 - abs(fragPathDistance * 2.0 - 1.0);
|
|
918
|
-
secondColor = mix(color, pulseColor, 1.0 - smoothstep(ARROW_FADING_POINT, 0.0, delta));
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
if (showPulse) {
|
|
922
|
-
// Add the pulse color to the path by determining how far the current fragment
|
|
923
|
-
// is from \`pulse\`
|
|
924
|
-
float pulseLocation = remap(
|
|
925
|
-
pulse,
|
|
926
|
-
0.0,
|
|
927
|
-
1.0,
|
|
928
|
-
-pulseLength,
|
|
929
|
-
1.0 + pulseLength
|
|
930
|
-
);
|
|
931
|
-
float pulseDistance = smoothstep(
|
|
932
|
-
0.0,
|
|
933
|
-
pulseLength,
|
|
934
|
-
abs(fragPathDistance - pulseLocation)
|
|
935
|
-
);
|
|
936
|
-
|
|
937
|
-
// Blend the pulse color to the path based on how close this fragment is to
|
|
938
|
-
// the \`pulse\` value and whether it's covered by an arrow -- but if it's
|
|
939
|
-
// covered by *both*, then we go back to using the regular path color
|
|
940
|
-
// (making arrows look like "holes" when they're overlapping the pulse.)
|
|
941
|
-
float pulseLevel = abs(1.0 - pulseDistance - arrowAmount);
|
|
942
|
-
|
|
943
|
-
gl_FragColor = vec4(mix(color, secondColor, pulseLevel), opacity * opacityMultiplier);
|
|
944
|
-
} else if (displayArrowsOnPath) {
|
|
945
|
-
gl_FragColor = vec4(mix(color, pulseColor, arrowAmount), opacity * opacityMultiplier);
|
|
946
|
-
} else {
|
|
947
|
-
gl_FragColor = vec4(color, opacity * opacityMultiplier);
|
|
948
|
-
}
|
|
949
|
-
#include <colorspace_fragment>
|
|
950
|
-
}`;var l5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAAAAAB5Gfe6AAAQkHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZpZciQ7rkT/uYpeAicQ5HI4mr0dvOX3ATOl0li3q3SVJkUqFMEBcHc4IuX2///fcf/hK7cSXRatpZXi+cott9h5U/3j63EMPt+fL1/h+fPdeff6NnJMHNPjD2U/7+qcl183aH6eH+/PO52PN7E+B3qZ+Tlgspkjb57X1edAKT7Oh+fvrj3v6/nNdp7ftd057abHnz78npVgLGG8FF3cKSTPz2oXJFaQWuocCz9D0mhnEu8Tx54k6dexc98F77vY+f48n96HwvnyvKB8iNHzfJCvY3cj9HZF4dfM7/6QZ4j+7deb2J2z6jn7sbueC5Eq7rmpl63cd1w4GCrd2wov5Vt4r/fVeFW2OMnYIpuD13ShhUi0T8hhhR5O2Pc4w2SJOe5IuGOMM6Z7rhL+FudNSrZXOFFJz3KpkqtJ1hKn4+tawp233flmqMy8AlfGwGCBOz693Fcn/+b1OtA5Bt0QfH2NFeuKFnCWYZmzn1xFQsJ5xlRufO/LvcGNf5PYRAblhrmywe7HY4gh4Re20s1z4jrx2fkHNYKu5wCEiLmFxYREBnwJSUIJXmPUEIhjJT+dlceU4yADQSSu4A65SamQnBptbu7RcK+NEh+nkRYSIZBGSQ0EIlk5C/jRXMFQlyTZiUgRlSpNekklFymlaDGN6po0q2hR1apNe001V6mlaq211d5iS0iYtNLUtdpa651JO0N37u5c0fuII408ZJSho442+gQ+M0+ZZeqss82+4koL+q+y1K262uo7bKC085Zdtu662+4HrJ108pFTjp562umvWXtm9X3WwofM/T5r4Zk1y1i+1+mvrHFa9WWIYHIiljMyFnMg42oZANDRcuZryDla5ixnvkVIIZGsBbHkrGAZI4N5hygnvObuV+Z+mzcn+Y/yFr/LnLPU/RuZc5a6Z+Y+5+2LrK1+K0q6CTIWWkx9OggbF+zaY+1Wk/766H46wF8ONFY+O8hBMEc7oc4Vdh+8JsE+PUSrVjr70Zz1+H56PH3o9sRR1ql5Ha8bUMQxpe89Tki8Sb0tE23cw3DcfEo+ugnj2G3WEmononVfoag71pVjR+EmAE53eT5tqYfEHl/7ThMusaI+St0jktFa9gKnreiQqCNpZ2mJdSkbaiK6DrovYR4/JhJfRsx5d5EVZnEIPetHnU5KynJPTSuCPuC0lOuXH7n1DNq7DpUtHbhM5lDA0c2bnDCJoOObMnyj+aPjPwx0yiDUxKKsg35VnRnBEVhonKwK5hOk5NttUrhr2+tMOXkPJb1RZ+iAelYjL2MuO3pGRQ78GdxwOOaTAcJZcewq7ilB1RJCSozUdSEdwVJVb6asiBsHH1Bqgbiv3Cmkkis6ktVnZGRRwMNJjUA3Ao2127YWdhAIblxF51hzMcZsVZc0r0dJo5Liqfn41Q+q193SGhhkMkgaLJRNnEpqBtyVvbcVffIk+LE9QPFBTMTQe0aWkMXMnx3dy5sfHreDE60Ql50E+SqRcmfK16L2p0Ol8JFATu3qASXy7SvmiGW2cdMBxsty44CvtLogfGlv7WkCSV0WId2270EaD5Ym40cs+SAwZuNjPSTywAvEfLmzQhtLDntfCnhl/fNmUNnzyA2g76Zn0SP+c+I6bCC0FONUQ4L50e95dif+DH/m9htQjBEhPPpOjYjmm2ChbfEMIUaYtAIxmWJHlilLU8ZRs9pCsHbDpFaRgZljz2QandjDIBPZDGTuoZW1KdlYh52ALzisKJRNWSQmLAWx8iv9mGttT15bBc2oxd57bZtVF98CYtK3UH22Yd/A7WaKa+ZjNTOXEzNhMJ5kmQOvfzsbxbZALJ2xwGBjX2HFQybhi7kpbA7DVpS3RxMJwFyHwGk5gs6a4lrRHVqhYT0QTJC9UZcC9Yrelkn6yXch68NKNtG7CiU3vf/zMZAYXPWdrR9XZ/ctMV1sJQ2wJEGxzaHs7LmmHIwnUwbwnNAapBY9xhE19DNJW3ua0dDk/AjwITacR0PqZxkbyJ+E5jYbxI84x1TBE+y90hwDCYZIM0tqAKPZfCzFrbH8kYCm3eqQkZ2+2GovcL8Suokyg8yyCJes6dcouSLiNSLb0ETJU+/N/WFsBBSOXBbm9Cwp4CzlOag7ro7R2vC19nSsCPmAjIEMiobFwaoVXhjTU2XMpgEsDH/L3Sx54OCTMUSXI/IIA2V4QcLQpwVz12pInI0bY56pIQ2BSGRLL+yLfZ7JkiimbK+aepsbwRStpokx5gCqe1hjdMAwcINbkk5jmedrNRAG5pUXPe0sZIoXy1h7lSDxApzheg24JeDNtDS1oBDBUC4iWZFilBPhZx0Kqx2lihpbG9q4sYidksCN4yRYhNM4nxfBbTi4E3AT6B3igbvs9Gv8ZkHsIfdlep+2HelEDbkJdNjqZQ90B7k6OIoFfkkPNoY+z0gzACa1f2qcBYxVJpT2QQgS19dKQlbC24S92xiEAFRKB5Uy1qrBgOtwIge55G0kRPfIytGx0tMOrGfrijB2FHOk/TKcMjDTMPeBo4FnXD5cQ8vtdgoAN0yuzZQHQI09wm/5vAB6RHyI9rYKiZ6YWC6rbaiLmDtoaToC1bViXQFNtgWsOfEEKCleC3GWPSfgQWRQWMgw/9FDgvOZrFAT3SmsA3DLbqlsSppQG5QeOjPXavUUkxF/qgLM05vW5o7UakuBqo2ZW8Nj0LB7imVJC9QSA+wd7RPztIUZ80xQZq0ROrc8CSVncWzkTA/RwmunldCPAQKjqVC7bhRuTIv0plbk7gOX4m5OAi2YesYZ0KBQRToG8iv9x8dgGtgECYRBeEU87OxoSc8epu+s7Mq/MN0VbBT19dii7ekO66UZwdAMtoAVQd13J5nwZe98OgGslmVqAGBkeLZNVNVlWpV18qihntXKnBZvrDIVgFpx4q5poLqREOVplMPSpTF2KvjBAzDpprkruXIaaUmUD4Xo2yrGWcYlixKIwRFjl0jPQhKznUXZAoSjlg9c/NwAI4p3Q/w5bCNfhUZS7bGfqesHqKAlyZZxZgNrhGevZXccaqBys4NEqB3Vqfptji9uUrhCL6yXFqxtm0hhLyYU3Tjd8I/HZaWD1oyVjnG5hhpCN5yHSf8BQUZlVNd00OP4M0TK+JSM7iqWi01SinFkCQXWxiZJLqqAHiEt3G3I2WYd46KU9pIJIOkoRQYCcEAAPguHo0Y4k8Hl6SW50MoW0uZU8jJOUghKo38Nl5ZSwsJNAUC2/lFZWkfMjrU8dFrTjHpJnUrLCILQIxINiYdQlDXaE/razQ4jjQluN5jW1Eh/S7yYvI5gigSjdLYU9TiFXAcHjISiLhQd9obb3OQmwY+YqVwiBMCkOGLXaK/ljBShh56c1g0uyIb2lBRKO7ZTAFncw5c5UGjGSy3CsI1Jt2mtruZkfhBZmbR+842Yu1eDiWEl0V6LZcGem6Ct+LW4Wy3oAjyNObazKBHomhJ3HMKEKHgiGksH+Ig1nTidfNMyA+oYHqVFaRGLiQreVLc9GvQgftKjW9cfUSKNYL80rqU7Um2rwqQJR1ai31Wq7vzKJEsFHDj0bAEMUKXgvfD5bWbaLPBTKz1Nk/Fg+GUZvUzFw80CLaKtPAACVAWrismh863FU4IJ0716SXBUNVb/SDMVvZgDt34CXoOq1JKvg0n08gPHTwXBNgD5W8pZZ8E9EVWcv1DZMB2NFysIwkqBSaH5QRmsAHdkHB+UANvLJvFpQKAahSmYTLEd2AFO+5rsqRRU6sVv5IP0wsSPLcWsbC1Y95mte71CUm6RJJWwkg6Q4k+xWMM0ByElJPQ6j2ED5hY42ALpZRytx9RlgQlJLijzhKi5eX5JBSIRGfo9o2xhd/0aWku8OS+4D9ZnovHDQMPaYo4qm2mlZbUnd7pR6oQj29Z2BqJ9n3LRT+MTLu3IR+ZP2TCPh3EDw8H1NHpoT7FibNYU8WHd9ESHcY12aDOQCUBddi4Ucp+4yuzz8ybcCCu1h8zvzXhDN4HYLq1R+U0xzUqg5QSA3iSBgdDouy55Ifx0DaeEhgezxBRGmoEJ6AJitVuzwtKPlUskHgU2F0LS7AFIwW5jPu0RUL7sp+fkNk0ee8P6uXYgl40WM+cdCOW21r13e0ivt0ff/mYcUfrQZWs2BiN6G+MDTGz1BKORmUTNQp9YGSHFxAeTkQrKd6FoVUogyytW25OLy3OpaO5oZCQp46aPzb5LnJiFEIwAKkmbYVYIjzVv3vj7rA6HignEeQAXTAHKDhoD7Uujh0QjtsB6fTP1NzO7T1Nzq4F1GnfHdXCG1Yxjwdtjf+PGRGTzEtEAUCz7KLfTdItLwCXuSOAzVjaZB6LvbUZhYGWmifSZlcMDnGHPd6gPeiK9erhpiw7ZP9ahTrMhFDa1J53m9ri2DloziqGETTcVSppCbTDDjExg6RrZ6cPEzB8XArEjQSB29odrUoLyoS/65RfM9fprGGjlHpbhGgbYD8MtmW1eFcAWX5dbcMHcl8sUI2k+H7GPW9VrArw3G+BefcCrCaAT/N53YLvP26Uy0kMFnDEZz0DJkmQqEOlL7SlKweYhH8gxpYeAYi0f9magqPbMYZuUI6007lSZQoyoGfYQHsNRzHXR3MMINTSMZpq1KD2A5MDJgtMLdRU6R4CEOJcKGiIJ7K6P/vAM6xpECHI8rRHsaEj6smkngAUjXTzrRoSI48ZpHOqgOY5OejKVdpnmiYUChQnVdIPa6ekGqRSRgEO119oDHOiIUQ5ciYVgaF1oG8Udo8WYtD+DEi8D/w8rAJE2k2PoyV0oMtpauxreaFjpujAvxFlwBhjuNqM9P0IfI5iD8Nh8y1kG4igjJkDNkOijnlLhItAd9lhRd670yNRTu95cR/Xuu0c5WO4DEFk5YQAPtLvU4TYPGRh4APPEDNiuuwR6SC21JoFbQBBMr+zJmT32QplNI6p16PbculN/pCX1wAyTWGTeJ774aln0gvQikw7TmkfsNbdQNs0adutYUDqNtGc0RqngUYdhUYuHSL1/eLrgvqDTC5neu++vufRkEgP9D2T64Kg/c4n+s7k3dDr3me8nOr0c72MRNmgF7D4WySPP0YAI/bI4eixwc7K13QiRiL85A8fnSsUj+mvTrsZtVUEQZ6sTpVafW8nYJZyaZS0U+0xIb6et9PhhtoObozQbjKAoDf6eiFgx1UUvpUYj1GweH0MNMrofhynfWn7+KYu7n5r83hN9aqm+6qjcH7dUlgvZVLV3xqq4fbP16qv+eofuTz43eomAqfS7GBAB9zEE31WJ37eVIPtdGN5A8nMYPvvLt8t2/V/6gM19G4g/hIL7UXf9JgbuLRZ+AoW//AzyMxTcWyz8BAruLRZ+AgX3r3y2+mT/PwfiN1DoVI+QT3CZDmvb8022JeYb6HiQPQpPPvboFB+i1MZdcqWZqthHmix6vttw0UAI1z8oEnGwVe++c7JamxslC+8xKJE41XJmug1npz+6CUAKyURd9gSxo+kWxvtZth848GBlws/0SKjYhmbZ9IiV+mcGBSdWHk8sqSr2zz5J7QME/0yD+z4Pe+JuGn1MV/vUyZwOHojWPlmPXgf9CuoeN9UAT+FGwaLg44v3dWe6QpvuL3Ln/p3k/2AgqNDcfwHgqUmIIqn+hwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH4wYRESAMujenGAAAB9FJREFUeNrtnWlsFVUUx899fS1gUoKioEY+WBRUEohGkUhAKxgEjSgGoRGB4AJCNKAIJBJZJSiyGYMKKkIoLlEUKhUraxFkKUE2kU1aCrRgW2jpg9f29R2/sBTo67v3zL2zvfP73MzM+XU6mf+5504BGIZhGIZhGIZhGIZhGMZGGq3JvSmR62++BXHH7Ylbf9ouRMT99yVq/e0PICIiHumUmPV3PooXOf5EItafXoCXOdUn8ep/pgjrUDY40ervX4JXUTEiocoXL5/FawiNEwlU/6hzeB3hqQljQIwJYT3UzEkQA2JiGOslsiAhDIgZ1RiD6NIEMBD8NIKxyQr6vv7FtdgQa31uILg0ig2zsZmv4//yePUj7rjNv/U3yUEJ/r7Xr/XfvBmlOPKwT+vfhpIUdvdj/Wm7UZpTz/mv/g4HUYGyQb5r/+SjEhXD/VV/j5OoSGisj16LRe9iVCY8xTcGxIulSKBmtk8MiKHlSMIn8ViMqkQivojHgfcuIJ0VAc/XPzmMVljrcQOBmdVojY1NvVx/8mcRtEqeh+NxypJatM6+ezxb/7Io6uBwR4/e/1moicJunvz956A2ip/1Xv3Nt6JGSgd6rf47/0KtlHssHrfZi5rxVDwWDx5C7XgoHotHC9AANbO8YqBXERohMt8bv/8X/kNDRDM9cA+IgWVojhWuNxAYXo4mWePyeBwYHUKz5Lo6HidNvICmybvVxfXPqEbz7Gvr2vrn1KAdHH7IpX//8yNoD8dcGY+TM6NoF26MxzLTL26Mx0majtM4q5ed7yhNulVsd5WAxqset/mGS6/d5CIBLXI62/7I6ZKyzjUC0rIfsP+hE3zkxt9c8vy7tPnJbiKfuyP+Xdn8ZDeuiMei+zF0juWOGyBNv+iMxw4bEBkl6CzOxmPx6ll0mryWDtb/ViU6z17H4rEYG0I3cMiheByYFEZ34Ew8Dn5UjW7BiXisY/rFDfGYmgWCCwcngXto0q08z1YBSUsy3NWgb5Qe2WSjgJRlfdy2RJPcNXm9bQIarexpsP5VdxHjcbMcm2Q3/5P64i71U8k/ELuLNsVjcct2cnST+rGg+Jo4XmhLPBZ376GOfoOkAIB5NWTHxuu/nzj9ElkA8gLgA+pLlvF43IU4/VI9G1QEAHnIPjfVaP1PnqRdVngKqAkActDMa2Hw/u9zijjjNg5UBcBr1FbD3jbG6h9QSruk8ovfyFESABnUWSNT8VgMI06/lF7aBqomAJ4n3m+G4nHgbeJfZfHljcCKAqDHcWo87m2g/gnE53LhlS+lqQqATv9S4/FL2u//qcT2T34XoAuAdvuJBspf11z/LOKbyYG6q4bqAqDVTqKByjFa21/U6ZfdaWBNADTdTDQQnqSv/pRMYjrZevVLCUUAiF+JBqpnaqv/J2I+zb3mxZwkAMTPDq8ep1A3P/1y3ZOEJABgiaPxuOnvxLN/B7oEwELq/sPl1utvSdz8VPsl6BMAn1AbBKut1t96F+3ENXOFTgFiehXRwAZL8Vi0JW5+qppW7+HIAgDGnyca2G4hHouOh2knvTARdAuAkedsj8cinTj9Ujka9AuAV87YHI/F08TNT2eHgQkB0I/aIDhGmuIU/YnnKxkAZgTAU8SGHC0eDyJufiqKfTKrAqBrPtFAiXo8HlFBO1VBA7ebZQHQifhUVo7H4p2QgQeOdQHQbp8t8Tg4idj+2dPgwJIGAdBqhw3xmDz9EuelQ4cASP3DeDwOziW+ecdbldEiACDbcDxOWkBs/8QNHpoEAPXjLNFMmfpv+IZ4+PjRU5cAWGwwHqcQNz/J2NUmAMgjavHjMfEPTGpvvz4BQH1MrzMkoHoW2CsAppEaBFskemQUA+HJYLcAeJfQINgpNVuvbiA0FuwXAG8qNwh2S07WqxqQ/saPXgEwRDGu7W8te2Q1A6XSH0HWLAD6nVa5zoPS9asZKJb/DLZuAdDzhPx1Hu2gkobkDRQq/J8w7QJAfstevuI3+WQN1F39dkAAtP9H7jpPdFVtiMgZOKC0Z9aAAEiT+mrbScLQjIyBXWngtABokRf/kKefonRF4xvYqrjmYEQApG6Md8SyvrS+eDwDG5QbzUYExL3QMxnUlZGGD5wFbhEADQ7YVwyhr401YCD6LbhHACyK3SA4N9TK6mhMA5EvwE0CYF6sBkFopLXl8exYq9/gLgHwYf3x+PxoqwMC9RoIvw9uE1D/gH3VeOsjItnSq9/OCqhvwL5qAoABA5XU28qsAHjj2tW8mukABgzEXP12WgAMvrpBEPkYwICB2KvfjguAvnUH7GvnARgwUGRhEt24gLoD9tGvAAwYKLDyySzzAqDzpQH76CIAAwYOWtqNYoMAaH9xwP57AAMG9ljbj2SHALhjJyLijwAGDGyzuCPNFgGQuhlxpfw1yR94dfAxi5cmojI/lRyx+rtaX9XDhADr2CVABc//JycWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWAALYAEsgAWwABbAAlgAC2ABLIAFsAAWwAJYAAtgASyABbAAFsACWIDToH8FyJUWtVWAALedDoFhGIZhGIZhGIZhGIYxyf+YwEMsIhMo/AAAAABJRU5ErkJggg==";var rT=new Tn;function u5(r,t){let{nearRadius:e,farRadius:i,color:n,accentColor:o,completeFraction:a}=t,u=!0,s=5,p=1e3,f=t.displayArrowsOnPath,m=!0,y=!0,x=f,M=e/2+.15,g=0;r[0].z+=M;for(let rt=1;rt<r.length;++rt){r[rt].z+=M;let Mt=r[rt].x-r[rt-1].x,xt=r[rt].y-r[rt-1].y,ye=r[rt].z-r[rt-1].z;g+=Math.sqrt(Mt*Mt+xt*xt+ye*ye)}let C=M-.1;r.push(r[r.length-1].clone().setZ(C)),r.unshift(r[0].clone().setZ(C));let I=new x1;x&&(I=rT.load(l5),I.colorSpace=Ci);let T=new It(n),w=new It(o),L={vertexes:{type:"f",value:1},resolution:{type:"v2",value:new U(1,1)},cameraParameters:{type:"v2",value:new U(s,0)},complete:{type:"f",value:u?0:1},color:{type:"c",value:T},pathLength:{type:"f",value:g},nearRadius:{type:"f",value:e},farRadius:{type:"f",value:i},nearZoom:{type:"f",value:s},farZoom:{type:"f",value:p},pulseColor:{type:"c",value:w},pulse:{type:"f",value:0},pulseLength:{type:"f",value:.075},pathIsVertical:{type:"b",value:!1},arrowAnimationTimer:{type:"f",value:0},arrowTexture:{type:"t",value:I},displayArrowsOnPath:{type:"b",value:f},flattenFactor:{type:"f",value:m?.05:1},showPulse:{type:"b",value:y},opacityMultiplier:{type:"f",value:1}},D=new A1(r);D.curveType="catmullrom",D.tension=0;let R=30,G=8,N=R*r.length,j=new N1(D,N,e,G,!1),H=new Float32Array(j.attributes.position.count);for(let rt=r.length;rt<H.length;rt++)H[rt]=rt;j.setAttribute("vertexIndex",new Fo(H,1));let $=new Float32Array(j.attributes.position.count),ct=new Fo($,1);for(let rt=0;rt<=N;rt++)for(let Mt=0;Mt<=G;++Mt)ct.setX(rt*(G+1)+Mt,rt/N);j.setAttribute("pathDistance",ct);let yt=new Float32Array(j.attributes.normal.count*3),Ct=new Fo(yt,3);for(let rt=0;rt<N;rt++){let Mt=j.tangents[rt];for(let xt=0;xt<=G;++xt)Ct.setXYZ(rt*(G+1)+xt,Mt.x,Mt.y,Mt.z)}j.setAttribute("pathTangent",Ct);let Rt=new Float32Array(j.attributes.normal.count*3),Te=new Fo(Rt,3);for(let rt=0;rt<N;rt++){let Mt=j.tangents[rt];var gt,kt,Pt;gt=-Mt.x*Mt.z,kt=-Mt.y*Mt.z,Pt=1-Mt.z*Mt.z;let xt=Math.sqrt(gt*gt+kt*kt+Pt*Pt);xt===0&&(xt=1);let ye=gt/xt,Sn=kt/xt,Ao=Pt/xt;for(let vi=0;vi<=G;++vi)Te.setXYZ(rt*(G+1)+vi,ye,Sn,Ao)}j.setAttribute("pathNormal",Te);let se=new Go({uniforms:L,vertexShader:Hm,fragmentShader:Xm});se.transparent=!0,se.alphaTest=.5,L.resolution.value.x=1,L.resolution.value.y=1,L.vertexes.value=H.length,L.arrowTexture.value.wrapS=We,L.arrowTexture.value.wrapT=We,L.arrowTexture.value.anisotropy=16,L.complete.value=a;let Rr=new Ut(j,se),le=Rr.clone(),ue={...L,opacityMultiplier:{type:"f",value:.25}};ue.complete.value=1,le.material=new Go({uniforms:ue,vertexShader:Hm,fragmentShader:Xm}),le.material.transparent=!0,le.material.alphaTest=.5,le.material.depthWrite=!1,le.material.depthTest=!1,le.renderOrder=1,ue.resolution.value.x=1,ue.resolution.value.y=1,ue.vertexes.value=H.length,ue.arrowTexture.value.wrapS=We,ue.arrowTexture.value.wrapT=We,ue.arrowTexture.value.anisotropy=16,ue.complete.value=a;let gi=t.mesh;gi.add(Rr),gi.add(le),j.computeBoundingBox();let xn=new W;return j.boundingBox.getCenter(xn),{mesh:gi,material:se,center:xn}}l(u5,"buildPath");var jm=class jm extends J{rendererState;convertTo3DMapPosition;constructor(t,e){super(),this.rendererState=t,this.convertTo3DMapPosition=e}update(t,e,i){let n,o=!1;for(let a of this.rendererState.threeDEntities)if(n=this.rendererState.entity3DMap.get(a),n&&n.type==="path"&&n.components[0].type==="path"){let u=n.components[0];if(u.dirty){u.mesh.parent!=null&&u.mesh.children.forEach(y=>{Ge(y)});let s=u.feature.features.map(y=>y.geometry.coordinates).map(y=>this.convertTo3DMapPosition(y[1],y[0],y[2]||0)),{mesh:p,material:f,center:m}=u5(s,u);u.mesh=p,u.material=f,u.dirty=!1,u.position=m}u.material&&(u.material.uniforms.nearZoom.value=t,u.material.uniforms.farZoom.value=e,u.material.uniforms.cameraParameters.value.x=i,u.displayArrowsOnPath&&u.animateArrowsOnPath&&(u.material.uniforms.arrowAnimationTimer.value=performance.now()/1e3,o=!0),u.material.needsUpdate=!0)}o&&this.publish("animate:path")}};l(jm,"PathSystem");var ws=jm;var c5=new Vr,Zm=18,zm=0,qm=0;var iT=nt.radToDeg(.698132),oe,Tt,Ts,To,yi,dn,fn,mn,Io,Is,Wm,A,ut,je,bt,cr,we,_,Es,St,mt,Xc,p5,jc,h5,Yc,d5,yn,Ls,Ds,Eo,Wc,_s,Os,As,Lo,me,Xe,ks,Um,gn,Ns,te,ee,$m=class $m extends J{constructor(e,i={}){var y,x,S,M,g,C,I,T,w,L;super();P(this,Is);P(this,Xc);P(this,jc);P(this,Yc);P(this,me);P(this,ks);v(this,"options");v(this,"container");P(this,oe,void 0);P(this,Tt,void 0);P(this,Ts,void 0);P(this,To,void 0);P(this,yi,void 0);P(this,dn,void 0);P(this,fn,void 0);P(this,mn,void 0);P(this,Io,void 0);v(this,"rendererDomElement");P(this,A,{entity3DMap:new Map,entity2DMap:new Map,entity2DIds:new Set,threeDEntities:[],entityScene:new wt("__scene"),hoverColor:"red",insetsPadding:dc,shouldMeasureCanvas:!0,pixelRatio:ci()});v(this,"camera");P(this,ut,void 0);P(this,je,void 0);P(this,bt,void 0);P(this,cr,void 0);P(this,we,void 0);P(this,_,{});P(this,Es,window.matchMedia("screen and (min-resolution: 2dppx)"));v(this,"map");P(this,St,l(()=>{c(this,_).renderSystem.twoDdirty=!0},"#invalidate2DEntities"));P(this,mt,l(()=>{c(this,_).renderSystem.threeDdirty=!0},"#invalidate3DEntities"));P(this,yn,"standalone");P(this,Ls,l(e=>Math.trunc(e*10)/10,"#round10"));P(this,Ds,l(()=>{c(this,_).twoDDrawSystem.dirty=!0,X(this,Is,Wm).call(this,ci()),c(this,_).watermarkSystem.dirty=!0,this.render()},"#handlePixelRatioChange"));P(this,Eo,l(()=>{E(this,dn,this.rendererDomElement.clientWidth),E(this,fn,this.rendererDomElement.clientHeight),X(this,Is,Wm).call(this,ci()),c(this,Lo).call(this),X(this,Yc,d5).call(this),c(this,_).cameraSystem.resize(this.canvasWidth,this.canvasHeight),c(this,_).cameraSystem.dirty=!0,c(this,_).watermarkSystem.resize(this.canvasWidth,this.canvasHeight),c(this,_).htmlControlsSystem.resize(this.canvasWidth),this.render()},"#handleWindowResize"));P(this,Wc,l(()=>{this.renderSync()},"#renderFull"));P(this,_s,new W);P(this,Os,l((e,i)=>{let n=this.mode==="standalone"?c(this,Tt):this.viewCamera;if(c(this,Tt).position.z+this.camera.elevation>i.z){c(this,_s).copy(i);let o=c(this,_s).project(n),a=(o.x+1)/2*this.canvasWidth-0/2,u=(-o.y+1)/2*this.canvasHeight-0/2,s=c(this,Ls).call(this,a),p=c(this,Ls).call(this,u);e.x=s,e.y=p}else e.x=-1e3,e.y=-1e3},"#project"));P(this,As,l((e,i)=>{c(this,we).setBufferSize(e,i),c(this,Tt).aspect=e/i,c(this,Tt).updateProjectionMatrix(),c(this,Tt).updateMatrixWorld(!0),c(this,To).x=e,c(this,To).y=i},"#setBufferSize"));P(this,Lo,l(()=>{var a;let e=E(this,dn,this.rendererDomElement.clientWidth),i=E(this,fn,this.rendererDomElement.clientHeight),n=Math.floor(e*this.resolutionScale),o=Math.floor(i*this.resolutionScale);c(this,As).call(this,n,o),(a=this.map)==null||a.resize(),c(this,A).shouldMeasureCanvas=!1},"#measureCanvas"));v(this,"showCollisionBoxes",()=>{c(this,_).collisionSystem.showCollisionBoxes(),this.render()});v(this,"hideCollisionBoxes",()=>{c(this,_).collisionSystem.hideCollisionBoxes(),this.render()});v(this,"projectScreenXYToCoordinate",(e,i)=>{var s;let n=e/this.canvasWidth*2-1,o=-(i/this.canvasHeight)*2+1,a=new U(n,o);c5.setFromCamera(a,c(this,Tt).clone());let u=(s=c5.intersectObject(c(this,yi),!1)[0])==null?void 0:s.point;return u!=null?this.convert3DMapPositionToCoordinate(u):void 0});v(this,"projectCoordinateToScreenXY",e=>{let i=this.convertTo3DMapPosition(e[1],e[0],e[2]||0),n=new U;return c(this,Os).call(this,n,i),{x:n.x,y:n.y}});v(this,"convert3DMapPositionToCoordinate",e=>{var o,a,u,s;let{lat:i,lon:n}=Hu((a=(o=c(this,A).center)==null?void 0:o[1])!=null?a:0,(s=(u=c(this,A).center)==null?void 0:u[0])!=null?s:0,e.x,e.y);return[n,i]});v(this,"setBackgroundColor",(e,i)=>{c(this,we).setBackgroundColor(e,i)});v(this,"hideOutdoorLayersUnderPoint",(e,i)=>{!this.map||(i==null?void 0:i.length)===0||(c(this,_).outdoorLayersSystem.hideLayersUnderPoint(e,i),this.render())});P(this,gn,new E1);P(this,Ns,new fr);v(this,"render",()=>{c(this,_).renderSystem!=null&&(this.map&&(this.mode==="outdoors-interleaved"||this.mode==="outdoors-overlay")?this.map.triggerRepaint():c(this,_).renderSystem.update())});v(this,"renderSync",()=>{c(this,_).renderSystem.update(!0)});P(this,te,nr(()=>{this.publish("user-interaction-start",void 0)},0,!0));P(this,ee,nr(()=>{this.publish("user-interaction-end",void 0)},0,!0));v(this,"on",(e,i)=>{super.on(e,i),["outdoor-view-loaded","outdoor-style-loaded"].includes(e)&&this.mode==="standalone"&&b.env.NODE_ENV!=="test"&&(B.warn(`"${e}" was subscribed to but outdoor view is disabled. The event has been triggered immediately. Enable outdoor view or remove the listener.`),this.publish(e))});v(this,"off",(e,i)=>{super.off(e,i)});v(this,"getCursor",()=>c(this,_).interactionSystem.getCursor());v(this,"destroy",()=>{c(this,_).cameraSystem.off("user-dolly-start",c(this,te)),c(this,_).cameraSystem.off("user-pan-start",c(this,te)),c(this,_).cameraSystem.off("user-rotate-start",c(this,te)),c(this,_).cameraSystem.off("user-zoom-start",c(this,te)),c(this,_).cameraSystem.off("user-tilt-start",c(this,te)),c(this,_).cameraSystem.off("user-pedestal-start",c(this,te)),c(this,_).cameraSystem.off("user-dolly-end",c(this,ee)),c(this,_).cameraSystem.off("user-pan-end",c(this,ee)),c(this,_).cameraSystem.off("user-rotate-end",c(this,ee)),c(this,_).cameraSystem.off("user-zoom-end",c(this,ee)),c(this,_).cameraSystem.off("user-tilt-end",c(this,ee)),c(this,_).cameraSystem.off("user-pedestal-end",c(this,ee)),c(this,_).renderSystem.off("measure-canvas",c(this,Lo)),this.remove("__scene"),c(this,St).call(this),c(this,mt).call(this),this.renderSync(),c(this,_).renderSystem.destroy(),c(this,_).zoomInterpolationSystem.destroy(),c(this,_).renderSystem.destroy(),c(this,_).cameraSystem.off("change",this.render),c(this,_).pathSystem.off("animate:path",this.render),c(this,_).cameraSystem.dispose(),c(this,_).exporterSystem.destroy(),c(this,_).outdoorLayersSystem.destroy(),c(this,_).drawSystem.destroy(),window.removeEventListener("resize",c(this,Eo),!1),c(this,Es).removeEventListener("change",c(this,Ds)),c(this,mn)&&c(this,mn).disconnect(),this._subscribers={},c(this,we).destroy(),c(this,oe).traverse(e=>{Ge(e),"dispose"in e&&typeof e.dispose=="function"&&e.dispose()}),E(this,oe,void 0),c(this,_).htmlControlsSystem.destroy(),c(this,_).collisionSystem.destroy(),c(this,_).domMutationSystem.destroy(),E(this,_,void 0),this.map&&(this.map.transform.getElevation=void 0,this.map.remove()),this.container.contains(this.rendererDomElement)&&this.container.removeChild(this.rendererDomElement),this.container.removeChild(c(this,cr)),this.container.removeChild(c(this,ut)),E(this,we,void 0)});this.convertTo3DMapPosition=this.convertTo3DMapPosition.bind(this),(i.mode==="outdoors-interleaved"||i.mode==="outdoors-overlay")&&i.map&&(E(this,yn,i.mode),this.map=i.map),c(this,A).entityScene.addEventListener("childadded",()=>{c(this,mt).call(this),c(this,St).call(this)}),c(this,A).entityScene.addEventListener("childremoved",()=>{c(this,mt).call(this),c(this,St).call(this)}),c(this,A).entity3DMap.set(c(this,A).entityScene.userData.entityId,c(this,A).entityScene),i.center&&(c(this,A).center=i.center?[...i.center]:[0,0]),this.options=i,this.container=e,X(this,Xc,p5).call(this),X(this,jc,h5).call(this),c(this,_).htmlControlsSystem=new Fc(this.container),c(this,yn)!=="outdoors-overlay"&&c(this,_).htmlControlsSystem.addAttributionControl(this.options.attribution),window.MappedinDebug||(window.MappedinDebug={}),b.env.NODE_ENV==="test"&&(window.MappedinDebug.mapViewCoreInstance=this),E(this,we,new Gu({antialias:typeof i.antialias=="boolean"?i.antialias:!0,alpha:!1,canvas:this.mode!=="standalone"?(y=i.gl)==null?void 0:y.canvas:void 0,onWebGLContextCreationError:i.onWebGLContextCreationError,onWebGLContextLost:()=>{typeof i.onWebGLContextLost=="function"&&i.onWebGLContextLost()},onWebGLContextRestored:()=>{i.onWebGLContextRestored&&i.onWebGLContextRestored(),c(this,St).call(this),c(this,mt).call(this),this.render()},onWebGLRendererError:i.onWebGLRendererError,backgroundColor:i.backgroundColor||"#ffffff",backgroundAlpha:(x=i.backgroundAlpha)!=null?x:1})),E(this,oe,new nl),c(this,oe).add(c(this,A).entityScene);let n=window.__THREE_DEVTOOLS__;b.env.NODE_ENV==="dev"&&typeof n<"u"&&(n.dispatchEvent(new CustomEvent("observe",{detail:c(this,oe)})),n.dispatchEvent(new CustomEvent("observe",{detail:c(this,we)}))),E(this,Tt,new I1(iT,this.aspect,50,1e5)),E(this,Ts,new T1),c(this,Tt).renderOrder=999;let o=new Ie;o.add(c(this,Tt)),E(this,Io,new Ie),c(this,Io).add(o),c(this,oe).add(c(this,Io)),c(this,Tt).updateProjectionMatrix(),c(this,Tt).updateMatrixWorld(!0),this.referenceMap={scale:1,latitude:0,longitude:0,getNorth:()=>0,georeference:[{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}},{target:{x:0,y:0}}]},this.rendererDomElement=c(this,we).domElement(),E(this,To,new U);let a=new Mn(1e6,1e6),u=new Fr({color:0,visible:!1});E(this,yi,new Ut(a,u)),c(this,oe).add(c(this,yi)),(S=i.gl)!=null&&S.canvas||e.appendChild(this.rendererDomElement),window.addEventListener("resize",c(this,Eo),!1),c(this,Es).addEventListener("change",c(this,Ds)),typeof ResizeObserver=="function"&&((M=b.env)==null?void 0:M.NODE_ENV)!=="test"&&(E(this,mn,new ResizeObserver(nr(()=>{c(this,Eo).call(this)},0))),(g=c(this,mn))==null||g.observe(e)),e.classList.add("mappedin-map"),this.rendererDomElement.style.width=(C=globalThis.MappedinDebug)!=null&&C.TEST_IOS?"1080px":"100%",this.rendererDomElement.style.height=(I=globalThis.MappedinDebug)!=null&&I.TEST_IOS?"1920px":"100%",b.env.NODE_ENV==="test"&&this.rendererDomElement.setAttribute("data-testid","mappedin-canvas"),E(this,dn,this.rendererDomElement.clientWidth),E(this,fn,this.rendererDomElement.clientHeight),this.rendererDomElement.style.touchAction="manipulation";let s=this.canvasWidth,p=this.canvasHeight;c(this,_).watermarkSystem=new Rc(c(this,Tt),s,p,c(this,A),i==null?void 0:i.watermark),c(this,A).shouldMeasureCanvas=!0,c(this,A).pixelRatio=this.resolutionScale,c(this,As).call(this,Math.floor(s*this.resolutionScale),Math.floor(p*this.resolutionScale));let f=new sl(16777215,.3*Math.PI);f.position.set(-150,-150,350),c(this,oe).add(f);let m=new B1(16777215,.741*Math.PI);c(this,oe).add(m),c(this,_).cameraSystem=new Cs(c(this,Tt),c(this,oe),c(this,we).renderer,c(this,A),{mode:this.mode,canvasHeight:p,canvasWidth:s}),c(this,_).cameraSystem.on("user-dolly-start",c(this,te)),c(this,_).cameraSystem.on("user-pan-start",c(this,te)),c(this,_).cameraSystem.on("user-rotate-start",c(this,te)),c(this,_).cameraSystem.on("user-zoom-start",c(this,te)),c(this,_).cameraSystem.on("user-tilt-start",c(this,te)),c(this,_).cameraSystem.on("user-pedestal-start",c(this,te)),c(this,_).cameraSystem.on("user-dolly-end",c(this,ee)),c(this,_).cameraSystem.on("user-pan-end",c(this,ee)),c(this,_).cameraSystem.on("user-rotate-end",c(this,ee)),c(this,_).cameraSystem.on("user-zoom-end",c(this,ee)),c(this,_).cameraSystem.on("user-tilt-end",c(this,ee)),c(this,_).cameraSystem.on("user-pedestal-end",c(this,ee)),c(this,_).cameraSystem.on("change",()=>{this.publish("camera-change",this.camera),this.render()}),c(this,_).panBoundsSystem=new Bc(c(this,A),c(this,_).cameraSystem),c(this,_).pathSystem=new ws(c(this,A),this.convertTo3DMapPosition),c(this,_).pathSystem.on("animate:path",this.render),this.camera=new Nc(this,c(this,_),c(this,A),c(this,yi)),this.camera.setZoomLevel((T=i.zoomLevel)!=null?T:Zm),this.camera.setBearing((w=i.bearing)!=null?w:qm),this.camera.setPitch((L=i.pitch)!=null?L:zm),this.camera.setMaxZoomLevel(22),c(this,_).domVisiblitySystem=new xc(c(this,A),c(this,cr)),c(this,_).domMutationSystem=new kc(c(this,A),c(this,cr)),c(this,_).domMutationSystem.on("dimensions-update",()=>{c(this,_).collisionSystem.dirty=!0,this.render()}),c(this,_).domDrawSystem=new Oc(c(this,A)),c(this,_).collisionSystem=new Wu(c(this,je),c(this,A)),c(this,_).twoDDrawSystem=new Pc(c(this,A),c(this,bt)),c(this,_).interactionSystem=new $a(this.rendererDomElement,c(this,A),c(this,Tt),c(this,yi)),c(this,_).interactionSystem.on("hover",this.render),c(this,_).interactionSystem.on("click",D=>{var R,G,N,j,H;if(((R=D.entity2D)==null?void 0:R.id)==="watermark"&&typeof c(this,_).watermarkSystem.options.onClick=="function"){c(this,_).watermarkSystem.options.onClick();return}this.publish("click",{coordinate:this.convert3DMapPositionToCoordinate(D.position),geometry:D.entity3D?[(G=D.entity3D)==null?void 0:G.id]:[],markers:((N=D.entity2D)==null?void 0:N.components[0])instanceof xe?[D.entity2D.id]:[],models:((j=D.entity3D)==null?void 0:j.components[0])instanceof fi?[D.entity3D.id]:[],labels:((H=D.entity2D)==null?void 0:H.components[0])instanceof sr?[D.entity2D.id]:[],containers:Array.isArray(D.groupContainers)?D.groupContainers.map($=>$.userData.entityId):[],pointerEvent:D.pointerEvent})}),c(this,_).interactionSystem.on("hover",D=>{var R,G,N,j,H;D.position&&((R=D.entity2D)==null?void 0:R.id)!=="watermark"&&this.publish("hover",{coordinate:this.convert3DMapPositionToCoordinate(D.position),geometry:D.entity3D?[(G=D.entity3D)==null?void 0:G.id]:[],markers:((N=D.entity2D)==null?void 0:N.components[0])instanceof xe?[D.entity2D.id]:[],models:((j=D.entity3D)==null?void 0:j.components[0])instanceof fi?[D.entity3D.id]:[],labels:((H=D.entity2D)==null?void 0:H.components[0])instanceof sr?[D.entity2D.id]:[],containers:Array.isArray(D.groupContainers)?D.groupContainers.map($=>$.userData.entityId):[]})}),c(this,_).twoDVisiblitySystem=new Tc(c(this,A)),c(this,_).drawSystem=new wc(c(this,A)),c(this,_).drawSystem.on("texture-loaded",this.render),c(this,_).stackSystem=new Lc(c(this,A)),c(this,_).twoDProjectionSystem=new Sc(c(this,A),c(this,Os)),c(this,_).zoomInterpolationSystem=new oc,c(this,_).exporterSystem=new os(c(this,A)),c(this,_).meshOptimizationSystem=new Cc(c(this,A),this.convertTo3DMapPosition),c(this,_).meshOptimizationSystem.on("model-loaded",this.render),c(this,_).customGeometrySystem=new Gc(c(this,A)),c(this,_).outlineInterpolationSystem=new Vc(c(this,A)),c(this,_).renderSystem=new Ic(c(this,we),c(this,A),this.mode,c(this,oe),c(this,Tt),this.viewCamera,c(this,_)),c(this,_).renderSystem.on("measure-canvas",c(this,Lo)),c(this,_).outdoorLayersSystem=new Hc(this.map),c(this,Wc).call(this)}get viewCamera(){return c(this,Ts)}get canvasWidth(){return c(this,dn)}get canvasHeight(){return c(this,fn)}get resolutionScale(){var e,i;return(i=(e=this.map)==null?void 0:e.getPixelRatio())!=null?i:ci()}get aspect(){return this.canvasWidth/this.canvasHeight}get mode(){return c(this,yn)}addGroupContainer(e,i,n){var o;if(!c(this,A).entity3DMap.has(e)&&!c(this,A).entity2DMap.has(e)){let a=new wt(e);a.addEventListener("childadded",()=>{c(this,mt).call(this),c(this,St).call(this)}),a.addEventListener("childremoved",()=>{c(this,mt).call(this),c(this,St).call(this)}),(i==null?void 0:i.visible)!==void 0&&(a.visible=i.visible),(i==null?void 0:i.altitude)!==void 0&&a.setAltitude(i.altitude),(i==null?void 0:i.interactive)!==void 0&&fe(a,i.interactive,c(this,A)),c(this,A).entity3DMap.set(e,a),(o=X(this,me,Xe).call(this,n))==null||o.addEntity(a),c(this,mt).call(this),this.render()}else B.error(`Group container with ID '${e}' already exists. The group container cannot be added.`);return{id:e,type:"group-container"}}addStackContainer(e,i,n){var o;if(c(this,A).entity3DMap.has(e))B.error(`Stack container with ID '${e}' already exists. The stack container cannot be added.`);else{let a=new wt(e);a.addEventListener("childadded",()=>{c(this,mt).call(this),c(this,St).call(this)}),a.addEventListener("childremoved",()=>{c(this,mt).call(this),c(this,St).call(this)}),a.components[0]=new Ac,(i==null?void 0:i.visible)!==void 0&&(a.visible=i.visible),c(this,A).entity3DMap.set(e,a),(o=X(this,me,Xe).call(this,n))==null||o.addEntity(a)}return{id:e,type:"stack-container"}}addCustomGeometry(e,i,n,o,a){var u;if(c(this,A).entity3DMap.has(e))B.error(`Custom geometry with ID '${e}' already exists. The custom geometry cannot be added.`);else{let s=new wo(i,n),p=new dt(s,new pi(o));p.id=e,s.mesh.userData={entityId:e,type:"custom-geometry"},c(this,A).entity3DMap.set(p.id,p),(u=X(this,me,Xe).call(this,a))==null||u.addEntity(p),this.render()}return{id:e,type:"custom-geometry"}}addGeometryGroup(e,i,n,o){var a,u;if(!c(this,A).entity3DMap.has(e)&&!c(this,A).entity2DMap.has(e)){let s=new Ft(e,new $i(n));s.addEventListener("childadded",()=>{c(this,mt).call(this),c(this,St).call(this)}),s.addEventListener("childremoved",()=>{c(this,mt).call(this),c(this,St).call(this)}),s.userData.dirty=!0,c(this,A).entity3DMap.set(e,s);for(let p of i.features){if(!["Polygon","MultiPolygon","LineString","MultiLineString"].includes(p.geometry.type))continue;let f=p.id||p.properties.id||Q(),m=c(this,_).meshOptimizationSystem.createEntityFromFeature(f,p,n);c(this,A).entity3DMap.set(f,m),s.userData.entities3D.add(f)}s.setVisible((a=n==null?void 0:n.visible)!=null?a:!0),(u=X(this,me,Xe).call(this,o))==null||u.addEntity(s),c(this,mt).call(this),this.render()}else B.error(`Geometry group with ID '${e}' already exists. The geometry group cannot be added.`);return c(this,_).outlineInterpolationSystem.dirty=!0,{id:e,type:"geometry-group"}}addModelGroup(e,i,n,o){var a;if(!c(this,A).entity3DMap.has(e)&&!c(this,A).entity2DMap.has(e)){let u=new Ft(e,new $i(n));u.addEventListener("childadded",()=>{c(this,mt).call(this),c(this,St).call(this)}),u.addEventListener("childremoved",()=>{c(this,mt).call(this),c(this,St).call(this)}),c(this,A).entity3DMap.set(e,u),u.userData.dirty=!0,u.userData.modelURL=n.url;for(let s of i.features){let p=s.id||s.properties.id||Q(),f=c(this,_).meshOptimizationSystem.createModelFromFeature(p,s,n);s.properties.interactive!==void 0&&fe(f,s.properties.interactive,c(this,A)),c(this,A).entity3DMap.set(p,f),u.userData.entities3D.add(p)}(a=X(this,me,Xe).call(this,o))==null||a.addEntity(u),c(this,mt).call(this),this.render()}else B.error(`Model group with ID '${e}' already exists. The model group cannot be added.`);return{id:e,type:"geometry-group"}}addMarker2D(e,i,n,o){var u;let a=n==null?void 0:n.id;if(a===void 0||!c(this,A).entity2DMap.has(a)&&!c(this,A).entity3DMap.has(a)){let s=X(this,ks,Um).call(this,e,new xe(i,n));s.id=a||String(s.id),a=s.id,(n==null?void 0:n.interactive)!=null&&fe(s,n==null?void 0:n.interactive,c(this,A)),(u=X(this,me,Xe).call(this,o))==null||u.addEntity(s),this.render()}else B.error(`Marker2D with ID '${a}' already exists. The marker cannot be added.`);return{id:a,type:"marker"}}addLabel2D(e,i,n,o){var u;let a=n==null?void 0:n.id;if(a===void 0||!c(this,A).entity2DMap.has(a)&&!c(this,A).entity3DMap.has(a)){let s=X(this,ks,Um).call(this,e,new sr(i,n||{},c(this,A)));s.id=a||String(s.id),a=s.id,(n==null?void 0:n.interactive)!=null&&fe(s,n==null?void 0:n.interactive,c(this,A)),(u=X(this,me,Xe).call(this,o))==null||u.addEntity(s),c(this,St).call(this),this.render()}else B.error(`Label2D with ID '${a}' already exists. The label cannot be added.`);return{id:a,type:"label"}}addPath(e,i={},n){var u;let o=new Ec(e,i),a=new dt(o,new pi);return a.id=(i==null?void 0:i.id)||Q(),o.mesh.userData={entityId:a.id,type:"path"},c(this,A).entity3DMap.set(a.id,a),(i==null?void 0:i.interactive)!=null&&fe(a,i==null?void 0:i.interactive,c(this,A)),(u=X(this,me,Xe).call(this,n))==null||u.addEntity(a),c(this,mt).call(this),this.render(),{id:a.id,type:"path"}}updateStackState(e,i){let n;(typeof e=="string"||typeof e=="number")&&(n=c(this,A).entity3DMap.get(e)),n!=null&&n.components[0]&&(typeof i.activeId<"u"&&(n.components[0].activeId=i.activeId),typeof i.expandedFactor<"u"&&(n.components[0].percentExpanded=i.expandedFactor),n.components[0].dirty=!0,this.render())}remove(e){var n;let i;if(typeof e=="string"||typeof e=="number"?(i=c(this,A).entity2DMap.get(e),i==null&&(i=c(this,A).entity3DMap.get(e))):typeof e.id=="string"||typeof e.id=="number"?(i=c(this,A).entity2DMap.get(e.id),i==null&&(i=c(this,A).entity3DMap.get(e.id))):i=e,i!=null){if(i.type==="custom-geometry")c(this,A).entity3DMap.delete(i.id),i.object3d&&Ge(i.object3d);else if(i.type==="group-container"){c(this,A).entity3DMap.delete(i.userData.entityId);for(let o of i.childrenIds.values())this.remove(o),i.userData.entities2D.delete(o);Ge(i)}else if(i.type==="geometry-group"){c(this,A).entity3DMap.delete(i.userData.entityId);for(let o of i.userData.entities3D.values())this.remove(o),i.userData.entities3D.delete(o);Ge(i)}else i.type==="geometry"||i.type==="model"||i.type==="path"?(i.object3d&&(((n=i.parent)==null?void 0:n.type)==="geometry-group"&&i.parent.userData.entities3D.delete(i.id),Ge(i.object3d)),i.components[0].outline&&Ge(i.components[0].outline),c(this,A).entity3DMap.delete(i.id)):(i.type==="marker"||i.type==="label")&&(i.object3d&&Ge(i.object3d),i.type==="label"&&delete c(this,_).twoDDrawSystem.textCache[i.id],c(this,A).entity2DMap.delete(i.id));c(this,mt).call(this),c(this,St).call(this),this.render()}}getScene(){return this.getState("__scene")}getCurrentSceneGLTF(e){return c(this,_).exporterSystem.getCurrentSceneGLTF(e)}getBoundingArea(e){this.renderSync();let i=new dr;if(e==null)i.setFromObject(c(this,A).entityScene);else{let n=za(c(this,A),e);(n==null?void 0:n.type)==="geometry"&&(n==null?void 0:n.object3d)!=null?i.setFromObject(n.object3d):((n==null?void 0:n.type)==="geometry-group"||(n==null?void 0:n.type)==="group-container")&&(n==null?void 0:n.userData.entityId)!=null&&i.setFromObject(n)}if(lb(i))return vf(i).map(this.convert3DMapPositionToCoordinate)}getState(e){var n;if(e==null)return{type:"map-view",hoverColor:c(this,A).hoverColor};let i=za(c(this,A),e);if((i==null?void 0:i.type)==="custom-geometry"){let o=i.components[0],a=i.components[1];return{id:i.id,type:"custom-geometry",visible:a.visible,altitude:a.altitude,parent:(n=i.parent)==null?void 0:n.userData.entityId,position:this.convert3DMapPositionToCoordinate(o.position)}}else if((i==null?void 0:i.type)==="geometry-group"){let o=[];for(let u of i.userData.entities3D.values()){let s=this.getState(u);((s==null?void 0:s.type)==="geometry"||(s==null?void 0:s.type)==="model")&&o.push(s)}let a=i.components[0];return{id:i.userData.entityId,type:"geometry-group",visible:i.visible,opacity:a.opacity,color:a.color,topColor:a.topColor,outline:a.outline,shading:a.shading,interactive:Array.from(i.userData.entities3D.values()).map(u=>c(this,A).entity3DMap.get(u)).every(u=>u&&u.components[2]!=null),children:Array.from(i.userData.entities3D.values()).map(u=>this.getState(u)).filter(Boolean)}}else{if((i==null?void 0:i.type)==="group-container")return{id:i.userData.entityId,type:"group-container",visible:i.visible,altitude:i.altitude,interactive:!!i.components[1],children:Array.from(i.childrenIds.values()).map(o=>this.getState(o)).filter(Boolean)};if((i==null?void 0:i.type)==="label"){let o=i.components[0],a=i.object3d.parent,u=a==null?void 0:a.userData.entityId;return{id:i.id,type:"label",text:o.text||"",parent:{id:u,type:a==null?void 0:a.type},position:this.convert3DMapPositionToCoordinate(i.position),enabled:o.enabled,initialRank:qa(o.initialRank),options:{rank:qa(o.rank),appearance:o.appearance,interactive:i.components[1]!=null}}}else if((i==null?void 0:i.type)==="marker"){let o=i.components[0],a=i.object3d.parent,u=a==null?void 0:a.userData.entityId;return{id:i.id,type:"marker",enabled:o.enabled,parent:{id:u,type:a==null?void 0:a.type},position:this.convert3DMapPositionToCoordinate(i.position),element:o.containerEl,initialRank:qa(o.initialRank),options:{rank:qa(o.rank),interactive:i.components[1]!=null||!1}}}else if((i==null?void 0:i.type)==="geometry"){let{color:o,hoverColor:a,initialColor:u,topColor:s}=i.components[1],p=i.components[0],f=i.components[1];return{id:i.id,type:"geometry",color:o,topColor:s,initialColor:u,hoverColor:a,visible:f.visible,outline:f.outline,position:this.convert3DMapPositionToCoordinate(p.position),interactive:i.components[2]!=null}}else if((i==null?void 0:i.type)==="model"){let o=i.components[0],a=i.components[2];return{id:i.id,type:"model",position:this.convert3DMapPositionToCoordinate(o.position),interactive:a!=null}}else if((i==null?void 0:i.type)==="path"){let o=i.components[0],a=i.components[2],u=i.components[1];return{id:i.id,type:"path",position:this.convert3DMapPositionToCoordinate(o.position),visible:u.visible,interactive:a!=null,completeFraction:o.completeFraction}}else return}}setState(e,i){var o,a,u;if(typeof e=="object"&&"hoverColor"in e&&i==null){c(this,A).hoverColor=(o=e.hoverColor)!=null?o:c(this,A).hoverColor;return}let n=za(c(this,A),e);if(n!=null){if(n.type==="custom-geometry"){let s=c(this,A).entity3DMap.get(n.id);if(s instanceof dt&&s.components[0]instanceof wo){let p=i;bo(n,p.visible),Kf(n,p.altitude),$f(n,p.position,this.convertTo3DMapPosition),Jf(n,X(this,me,Xe).call(this,p.parent,!1))}}else if(n.type==="model"||n.type==="path"){let s=i;fe(n,s.interactive,c(this,A))&&c(this,mt).call(this),n.type==="path"&&(s=s,f4(n,s),bo(n,s.visible))}else if(n.type==="group-container"){let s=i;bo(n,s.visible)&&(c(this,_).outlineInterpolationSystem.dirty=!0),fe(n,s.interactive,c(this,A))&&c(this,mt).call(this),Kf(n,s.altitude)}else if(n.type==="geometry-group"){let s=i;bo(n,s.visible)&&(c(this,_).outlineInterpolationSystem.dirty=!0),c4(n,c(this,A),s)&&(c(this,_).outlineInterpolationSystem.dirty=!0),Qf(n,s.outline)&&(c(this,_).outlineInterpolationSystem.geometries3DDirty=!0),p4(n,s.shading),b4(n,c(this,A),s.opacity),fe(n,s.interactive,c(this,A))&&(c(this,mt).call(this),c(this,St).call(this))}else if(n.type==="geometry"){if(n.components[0]instanceof $t){let s=i;bo(n,s.visible)&&(c(this,_).outlineInterpolationSystem.geometries3DDirty=!0),Qf(n,s.outline)&&(c(this,_).outlineInterpolationSystem.geometries3DDirty=!0),h4(n,s),v4(n,s.hoverColor),fe(n,s.interactive,c(this,A))}c(this,mt).call(this)}else if(n.type==="label"||n.type==="marker"){let s=i;g4(n,i),m4(n,i)&&c(this,St).call(this),y4(n,(a=s.options)==null?void 0:a.rank)&&c(this,St).call(this),$f(n,s.position,this.convertTo3DMapPosition),Jf(n,X(this,me,Xe).call(this,s.parent,!1))&&(c(this,St).call(this),c(this,_).panBoundsSystem.dirty=!0),d4(n,s.enabled),fe(n,(u=s.options)==null?void 0:u.interactive,c(this,A))&&c(this,St).call(this)}this.render()}}convertTo3DMapPosition(e,i,n=0,o){var s,p,f,m;if(Array.isArray(e))return this.convertTo3DMapPosition(e[1],e[0],0,typeof i=="function"?i:void 0);if(typeof i!="number")throw new Error("convertTo3DMapPosition failed: longitude must be a number");let{x:a,y:u}=Xu((p=(s=c(this,A).center)==null?void 0:s[1])!=null?p:0,(m=(f=c(this,A).center)==null?void 0:f[0])!=null?m:0,e,i);return o?(o.set(a,u,n),o):new W(a,u,n)}getCenter(e){let i=Array.isArray(e)?e:this.getBoundingArea(e);return i?sb(i):void 0}isInView(e){let i=za(c(this,A),e);if(c(this,Ns).identity().multiply(c(this,Tt).projectionMatrix).multiply(c(this,Tt).matrixWorldInverse),c(this,gn).setFromProjectionMatrix(c(this,Ns)),i instanceof Ce)return c(this,gn).containsPoint(i.position);if(i instanceof dt){let n=i==null?void 0:i.components[0];if(n instanceof wo||n instanceof fi)return c(this,gn).containsPoint(this.convertTo3DMapPosition(n.feature.geometry.coordinates));if(n instanceof $t){let o=new dr(this.convertTo3DMapPosition(n.featureBbox[1],n.featureBbox[0],0),this.convertTo3DMapPosition(n.featureBbox[3],n.featureBbox[2],0));return c(this,gn).intersectsBox(o)}}return!1}getSystems(){return c(this,_)}getInternalState(){return c(this,A)}};oe=new WeakMap,Tt=new WeakMap,Ts=new WeakMap,To=new WeakMap,yi=new WeakMap,dn=new WeakMap,fn=new WeakMap,mn=new WeakMap,Io=new WeakMap,Is=new WeakSet,Wm=l(function(e){var i;c(this,yn)!=="outdoors-overlay"&&((i=this.map)==null||i.setPixelRatio(e)),c(this,A).pixelRatio=this.resolutionScale},"#setResolutionScale"),A=new WeakMap,ut=new WeakMap,je=new WeakMap,bt=new WeakMap,cr=new WeakMap,we=new WeakMap,_=new WeakMap,Es=new WeakMap,St=new WeakMap,mt=new WeakMap,Xc=new WeakSet,p5=l(function(){E(this,ut,document.createElement("div")),c(this,ut).classList.add("mappedin__smart-collision-engine__container"),E(this,je,document.createElement("canvas")),c(this,je).classList.add("mappedin__smart-collision-engine-debug__container"),this.container.appendChild(c(this,ut)),E(this,bt,document.createElement("canvas")),c(this,bt).classList.add("mappedin__smart-collision-engine__container"),c(this,bt).width=c(this,ut).clientWidth*this.resolutionScale,c(this,bt).height=c(this,ut).clientHeight*this.resolutionScale,c(this,bt).style.width=c(this,ut).clientWidth+"px",c(this,bt).style.height=c(this,ut).clientHeight+"px",c(this,ut).appendChild(c(this,je)),c(this,ut).appendChild(c(this,bt)),c(this,je).width=c(this,ut).clientWidth,c(this,je).height=c(this,ut).clientHeight,c(this,bt).width=c(this,ut).clientWidth*this.resolutionScale,c(this,bt).height=c(this,ut).clientHeight*this.resolutionScale,c(this,bt).style.width=c(this,ut).clientWidth+"px",c(this,bt).style.height=c(this,ut).clientHeight+"px"},"#renderEntity2DContainer"),jc=new WeakSet,h5=l(function(){E(this,cr,document.createElement("div")),c(this,cr).classList.add("mappedin-2d-entities"),Object.assign(c(this,cr).style,{position:"absolute",top:"0",left:"0",bottom:"0",right:"0",pointerEvents:"none","z-index":1,"transform-style":"preserve-3d"}),this.container.appendChild(c(this,cr))},"#renderEntityDOMContainer"),Yc=new WeakSet,d5=l(function(){c(this,bt).width=c(this,ut).clientWidth*this.resolutionScale,c(this,bt).height=c(this,ut).clientHeight*this.resolutionScale,c(this,bt).style.width=c(this,ut).clientWidth+"px",c(this,bt).style.height=c(this,ut).clientHeight+"px",c(this,je).width=c(this,ut).clientWidth,c(this,je).height=c(this,ut).clientHeight,c(this,bt).width=c(this,ut).clientWidth*this.resolutionScale,c(this,bt).height=c(this,ut).clientHeight*this.resolutionScale,c(this,bt).style.width=c(this,ut).clientWidth+"px",c(this,bt).style.height=c(this,ut).clientHeight+"px",c(this,_).collisionSystem.dirty=!0},"#resizeCollisionCanvas"),yn=new WeakMap,Ls=new WeakMap,Ds=new WeakMap,Eo=new WeakMap,Wc=new WeakMap,_s=new WeakMap,Os=new WeakMap,As=new WeakMap,Lo=new WeakMap,me=new WeakSet,Xe=l(function(e,i=!0){if(!e)return i?c(this,A).entityScene:void 0;if(typeof e=="string"||typeof e=="number"){let n=c(this,A).entity3DMap.get(e);return n instanceof wt?n:(B.warn("Parent is not a valid container, adding to scene"),i?c(this,A).entityScene:void 0)}else if(e.type==="group-container"){let n=c(this,A).entity3DMap.get(e.id);if(n instanceof wt)return n}return i?c(this,A).entityScene:void 0},"#getParentContainer"),ks=new WeakSet,Um=l(function(e,i,n){let o=new Ce(i,this.convertTo3DMapPosition(e[1],e[0],e[2]||n||0));return c(this,A).entity2DMap.set(o.id,o),o},"#createEntity2D"),gn=new WeakMap,Ns=new WeakMap,te=new WeakMap,ee=new WeakMap,l($m,"Core");var Ym=$m,Rs=Ym;d();function nT(r,t){oT(r,t)(r.getScene(),t),t.addFolder("Export").add({export:async()=>{let n=await r.getCurrentSceneGLTF({binary:!0}),o=new Blob([n],{type:"application/octet-stream"});var a=document.createElement("a");document.body.appendChild(a),a.style.display="none";let u=window.URL.createObjectURL(o);a.href=u,a.download="scene.glb",a.click(),window.URL.revokeObjectURL(u)}},"export")}l(nT,"mountSceneGraphVisualizer");function oT(r,t){let e=t;return l(function i(n,o){let a=o.addFolder(`${[n.type]} ${n.id.slice(0,16)}`);if(o.close(),n.type==="geometry"||n.type==="model"||n.type==="path"){let u={set visible(s){let p=r.getState(n.id);((p==null?void 0:p.type)==="geometry"||(p==null?void 0:p.type)==="path")&&r.setState(n,{visible:s})},get visible(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry"||(s==null?void 0:s.type)==="path"?s.visible:!1},set outline(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry"&&r.setState(n,{outline:s})},get outline(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry"?s.outline:!1},get color(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry"&&s.color?F(s.color).toHexString():"#ffffff"},set color(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry"&&r.setState(p,{color:s})},set interactive(s){let p=r.getState(n.id);((p==null?void 0:p.type)==="geometry"||(p==null?void 0:p.type)==="model"||(p==null?void 0:p.type)==="path")&&(r.setState(n,{interactive:s}),e.controllersRecursive().forEach(f=>f.updateDisplay()))},get interactive(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry"||(s==null?void 0:s.type)==="model"||(s==null?void 0:s.type)==="path"?s.interactive:!1},get completeFraction(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="path"?s.completeFraction:1},set completeFraction(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="path"&&r.setState(p,{completeFraction:s})},focus:()=>{}};a.add(u,"focus").onChange(()=>{let s=r.getState(n.id);(s==null?void 0:s.type)==="model"||(s==null?void 0:s.type)==="path"?r.camera.focusOn([s.position]):(s==null?void 0:s.type)==="geometry"&&r.camera.focusOn(r.getBoundingArea(s))}),a.add(u,"interactive"),n.type==="path"&&a.add(u,"completeFraction",0,1,.1),a.add(u,"visible"),n.type!=="model"&&(a.addColor(u,"color"),a.add(u,"outline"))}else if(n.type==="marker"){let u={get interactive(){var p;let s=r.getState(n.id);return(s==null?void 0:s.type)==="marker"?(p=s.options)==null?void 0:p.interactive:!1},set interactive(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="marker"&&(r.setState(p,{options:{interactive:s}}),e.controllersRecursive().forEach(f=>f.updateDisplay()))},focus:()=>{}};a.add(u,"focus").onChange(()=>{let s=r.getState(n.id);(s==null?void 0:s.type)==="marker"&&r.camera.focusOn([s.position])}),a.add(u,"interactive")}else if(n.type==="label"){let u={get interactive(){var p;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(p=s.options)==null?void 0:p.interactive:!1},set interactive(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&(r.setState(p,{options:{interactive:s}}),e.controllersRecursive().forEach(f=>f.updateDisplay()))},get text(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?s.text:""},set text(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(p,{text:s})},get"Text Color"(){var p,f;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(f=(p=s.options.appearance)==null?void 0:p.text)==null?void 0:f.foregroundColor:"#000000"},set"Text Color"(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(n.id,{text:u.text,options:{appearance:{text:{foregroundColor:s}}}})},get"Text Size"(){var p,f;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(f=(p=s.options.appearance)==null?void 0:p.text)==null?void 0:f.size:10},set"Text Size"(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(p,{text:u.text,options:{appearance:{text:{size:s}}}})},get"Icon Size"(){var p,f;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(f=(p=s.options.appearance)==null?void 0:p.marker)==null?void 0:f.iconSize:10},set"Icon Size"(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(p,{text:u.text,options:{appearance:{marker:{iconSize:s}}}})},get"Active Foreground Color"(){var p,f,m;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(m=(f=(p=s.options.appearance)==null?void 0:p.marker)==null?void 0:f.foregroundColor)==null?void 0:m.active:"#000000"},set"Active Foreground Color"(s){var f,m;let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(p,{text:u.text,options:{appearance:{marker:{foregroundColor:{...(m=(f=p.options.appearance)==null?void 0:f.marker)==null?void 0:m.foregroundColor,active:s}}}}})},get"Inactive Foreground Color"(){var p,f,m;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(m=(f=(p=s.options.appearance)==null?void 0:p.marker)==null?void 0:f.foregroundColor)==null?void 0:m.inactive:"#000000"},set"Inactive Foreground Color"(s){var f,m;let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(p,{text:u.text,options:{appearance:{marker:{foregroundColor:{...(m=(f=p.options.appearance)==null?void 0:f.marker)==null?void 0:m.foregroundColor,inactive:s}}}}})},get"Active Background Color"(){var p,f,m;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(m=(f=(p=s.options.appearance)==null?void 0:p.marker)==null?void 0:f.backgroundColor)==null?void 0:m.active:"#000000"},set"Active Background Color"(s){var f,m;let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(p,{text:u.text,options:{appearance:{marker:{backgroundColor:{...(m=(f=p.options.appearance)==null?void 0:f.marker)==null?void 0:m.backgroundColor,active:s}}}}})},get"Inactive Background Color"(){var p,f,m;let s=r.getState(n.id);return(s==null?void 0:s.type)==="label"?(m=(f=(p=s.options.appearance)==null?void 0:p.marker)==null?void 0:f.backgroundColor)==null?void 0:m.inactive:"#000000"},set"Inactive Background Color"(s){var f,m;let p=r.getState(n.id);(p==null?void 0:p.type)==="label"&&r.setState(p,{text:u.text,options:{appearance:{marker:{backgroundColor:{...(m=(f=p.options.appearance)==null?void 0:f.marker)==null?void 0:m.backgroundColor,inactive:s}}}}})},focus:()=>{}};a.add(u,"focus").onChange(()=>{let s=r.getState(n.id);(s==null?void 0:s.type)==="label"&&r.camera.focusOn([s.position])}),a.add(u,"interactive"),a.add(u,"text"),a.add(u,"Text Size",10,50),a.add(u,"Icon Size",10,50),a.addColor(u,"Text Color"),a.addColor(u,"Active Background Color"),a.addColor(u,"Inactive Background Color"),a.addColor(u,"Active Foreground Color"),a.addColor(u,"Inactive Foreground Color")}else if(n.type==="geometry-group"){let u={get opacity(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry-group"?s.opacity:1},set opacity(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry-group"&&r.setState(n,{opacity:s})},set visible(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry-group"&&r.setState(n,{visible:s})},get visible(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry-group"?s.visible:!1},set outline(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry-group"&&r.setState(n,{outline:s})},get outline(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry-group"?s.outline:!1},set interactive(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry-group"&&(r.setState(n,{interactive:s}),e.controllersRecursive().forEach(f=>f.updateDisplay()))},get interactive(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry-group"?s.interactive:!1},get shadingStart(){var p,f;let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry-group"&&(f=(p=s.shading)==null?void 0:p.start)!=null?f:0},set shadingStart(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry-group"&&r.setState(p,{shading:{start:s}})},get shadingEnd(){var p,f;let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry-group"&&(f=(p=s.shading)==null?void 0:p.end)!=null?f:0},set shadingEnd(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry-group"&&r.setState(p,{shading:{end:s}})},get shadingIntensity(){var p,f;let s=r.getState(n.id);return(s==null?void 0:s.type)==="geometry-group"&&(f=(p=s.shading)==null?void 0:p.intensity)!=null?f:0},set shadingIntensity(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="geometry-group"&&r.setState(p,{shading:{intensity:s}})}};a.add(u,"visible"),a.add(u,"opacity",0,1,.1),a.add(u,"interactive"),a.add(u,"outline"),a.add(u,"shadingStart",0,1,.1),a.add(u,"shadingEnd",0,1,.1),a.add(u,"shadingIntensity",0,1,.1)}else if(n.type==="group-container"){let u={set visible(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="group-container"&&r.setState(n,{visible:s})},get visible(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="group-container"?s.visible:!1},set interactive(s){let p=r.getState(n.id);(p==null?void 0:p.type)==="group-container"&&(r.setState(p,{interactive:s}),e.controllersRecursive().forEach(f=>f.updateDisplay()))},get interactive(){let s=r.getState(n.id);return(s==null?void 0:s.type)==="group-container"?s.interactive:!1}};a.add(u,"visible"),a.add(u,"interactive")}if(a.close(),n.children)for(let u of n.children.values())i(u,a)},"parseChild")}l(oT,"createParseChild");var f5="https://tiles-cdn.mappedin.com/styles/mappedin/style.json",aT="https://auth.mappedin.com/oauth2/token";async function m5(r,t){var e,i,n,o,a;if((e=t==null?void 0:t.outdoorView)!=null&&e.enabled&&((i=t==null?void 0:t.outdoorView)!=null&&i.headers)){let{Map:u,MercatorCoordinate:s}=await import("./outdoor-context-v4-L46VWWFC.js"),p=t.outdoorView.headers;p==null&&(p=await ob(aT));let f=t.center||[0,0],m=new u({container:r,style:t.outdoorView.style||f5,center:f,attributionControl:!1,zoom:(n=t.zoomLevel)!=null?n:Zm,pitch:(o=t.pitch)!=null?o:zm,bearing:(a=t.bearing)!=null?a:qm,transformRequest:w=>{var L;return{url:w,headers:(L=t.outdoorView)==null?void 0:L.headers}},trackResize:!1,pixelRatio:ci(),antialias:typeof t.antialias=="boolean"?t.antialias:!0,boxZoom:!1,doubleClickZoom:!1,scrollZoom:!1,dragPan:!1,dragRotate:!1,keyboard:!1,touchZoomRotate:!1}),y=m.painter.context.gl,x=new Rs(r,{center:f,zoomLevel:m.getZoom(),pitch:m.getPitch(),bearing:m.getBearing(),gl:y,map:m,mode:"outdoors-interleaved",watermark:t.watermark,attribution:t.attribution,antialias:t.antialias}),S={center:m.getCenter().toArray(),zoom:m.getZoom(),bearing:m.getBearing(),pitch:m.getPitch()};m.setMinZoom(x.camera.minZoomLevel),m.setMaxZoom(x.camera.maxZoomLevel),x.on("camera-change",w=>{S.center=w.center,S.zoom=w.zoomLevel,S.bearing=-w.bearing,S.pitch=w.pitch,m.jumpTo(S)});let M=s.fromLngLat(f,0),g=ju(M,x.viewCamera,x.camera,()=>{x.renderSync()});m.on("style.load",async()=>{m&&(m.addLayer(g),x.renderSync())});let C=!1,I=!1;m.on("idle",()=>{m&&(C||(x.publish("outdoor-view-loaded"),C=!0),I||(x.publish("outdoor-style-loaded"),I=!0))});let T=l(w=>{w&&(w.sourceDataType==="metadata"||w.sourceDataType==="visibility"||w.dataType==="style"||w.type==="terrain")&&x.getSystems().htmlControlsSystem.updateData(m)},"updateData");return m.on("styledata",w=>{m&&w&&w.dataType==="style"&&w.type==="styledata"&&(I=!1),T(w)}),m.on("sourcedata",T),m.on("terrain",T),m.on("error",w=>{var L;if(((L=w.error)==null?void 0:L.url)===f5){B.error(`Failed to load outdoor view style, possibly due to invalid token "${p["x-mappedin-tiles-key"]}"`);return}B.warn(w)}),x}else return new Rs(r,t)}l(m5,"createRenderer");var Bs=Br(lo());var Uc=30,sT=1e3,Do,Fs,Jm=class Jm extends J{constructor(e,i){super();this.api=e;this.core=i;P(this,Do,void 0);P(this,Fs,0);v(this,"includedFloors",[]);v(this,"expanded",!1);i.on("camera-change",n=>{var u;let o=Math.floor(n.elevation/Uc),a=(u=this.includedFloors[o])==null?void 0:u.id;this.expanded&&a&&a!==this.api.currentFloorId&&(this.api.currentFloorId=this.includedFloors[o].id,this.api.publish("floor-change",{reason:"elevation-change",floorId:this.api.currentFloorId}))})}get percentExpanded(){return c(this,Fs)}set percentExpanded(e){let i=he(e,0,1,0,Uc);this.includedFloors.forEach((n,o)=>{this.core.setState(n.containerId,{visible:!0,altitude:i*o})}),E(this,Fs,e)}animateToCurrentFloor(){let e=this.includedFloors.indexOf(this.api.currentFloor)*Uc;new Bs.default.Tween({elevation:this.core.camera.elevation}).to({elevation:e},1e3).easing(Bs.default.Easing.Quadratic.Out).onUpdate(({elevation:i})=>{this.core.camera.setElevation(i),this.core.render()}).onComplete(()=>{this.api.publish("floor-change",{reason:"",floorId:this.api.currentFloorId})}).start(),this.core.render()}expand(e){return this.includedFloors=this.api.floors.filter(i=>!(e!=null&&e.excludeFloorIds.includes(i.id))),this.includedFloors.length<=1?Promise.resolve():this.animate("expand")}collapse(){return this.expanded===!0?this.animate("collapse"):Promise.resolve()}animate(e){c(this,Do)&&c(this,Do).stop();let i=this.includedFloors.indexOf(this.api.currentFloor)*Uc;return new Promise(n=>{E(this,Do,new Bs.default.Tween({percentExpanded:this.percentExpanded}).to({percentExpanded:e==="expand"?1:"0"},sT).easing(Bs.default.Easing.Quadratic.Out).onUpdate(({percentExpanded:o})=>{this.core.camera.setElevation(i*o),this.percentExpanded=o,this.core.render()}).onComplete(()=>{this.expanded=e==="expand",this.includedFloors.forEach(o=>{this.core.setState(o.containerId,{visible:e==="collapse"?o.id===this.api.currentFloorId:!0})}),this.core.getSystems().cameraSystem.enablePedestal=e==="expand",this.core.getSystems().cameraSystem.enablePan=e==="collapse",n(),this.publish(e==="expand"?"expanded":"collapsed")}).onStart(()=>{this.includedFloors.forEach(o=>{this.core.setState(o.containerId,{visible:!0})})}).start()),this.core.render()})}};Do=new WeakMap,Fs=new WeakMap,l(Jm,"StackedMaps");var Zc=Jm;var lT={linear:vn.default.Easing.Linear.None,"ease-in":vn.default.Easing.Quadratic.In,"ease-out":vn.default.Easing.Quadratic.Out,"ease-in-out":vn.default.Easing.Quadratic.InOut},Km=class Km extends J{floors;currentFloorId="";id;renderer;mvf;styleMap;StackedMaps;animations=new Map;get currentFloor(){return this.floors.find(t=>t.id===this.currentFloorId)}setFloor(t,e){if(this.currentFloorId!==t){if(this.publish("floor-change-start",{floorId:t}),this.currentFloorId=t,this.StackedMaps.expanded)return this.StackedMaps.animateToCurrentFloor();this.floors.forEach(i=>{i.id===t?this.renderer.setState(i.containerId,{visible:!0}):this.renderer.setState(i.containerId,{visible:!1})}),this.publish("floor-change",{reason:e,floorId:this.currentFloor.id})}}cancelAnimation(t){let e=this.animations.get(t);e&&(e.tween.stop(),e.resolver(),this.animations.delete(t))}Models={add:(t,e,i)=>{let{floorId:n,...o}=i,a=i!=null&&i.floorId?this.floors.find(s=>s.id===i.floorId):this.floors[0],u=this.renderer.addModelGroup(t,{type:"FeatureCollection",features:e.map(s=>{var p;return{type:"Feature",properties:{id:Q(),rotation:(p=s.rotation)==null?void 0:p.map(f=>f*(Math.PI/180)),scale:s.scale,interactive:s.interactive},geometry:{type:"Point",coordinates:si(s.target)}}})},{url:o.url},a.id);return this.renderer.getState(u).children},remove:(t,e)=>{this.renderer.remove(t),this.renderer.getState(e).children.length===0&&this.renderer.remove(e)}};Markers={add:(t,e,i={})=>{let{floorId:n,...o}=i,a=i!=null&&i.floorId?this.floors.find(u=>u.id===i.floorId):this.floors[0];return this.renderer.addMarker2D(t,e,o,a.id)},remove:t=>{this.renderer.remove(t)},getContentEl:t=>{let e=this.renderer.getState(t);if((e==null?void 0:e.type)==="marker")return e.element},removeAll:()=>{},setPosition:(t,e,i)=>{let n=this.renderer.getState(t);if(!n){B.error(`Failed to retrieve state for Marker with id "${t}".`);return}if(n.type!=="marker"){B.error(`Geometry with id "${t}" is not of type "marker".`);return}this.renderer.setState(n,{position:e,parent:i!=null?i:this.currentFloorId})},animateTo:(t,e,i,n)=>{let o=this.renderer.getState(t);if(!o)return B.error(`Failed to retrieve state for Marker with id "${t}".`),Promise.resolve();if(o.type!=="marker")return B.error(`Geometry with id "${t}" is not of type "marker".`),Promise.resolve();let a={duration:1e3,easing:"ease-in-out",...n};this.cancelAnimation(t);let u;new vn.default.Tween({lon:o.position[0],lat:o.position[1]}).to({lon:e[0],lat:e[1]},a.duration).easing(lT[a.easing]).onUpdate(({lon:p,lat:f})=>{this.Markers.setPosition(t,[p,f],i),this.renderer.render()}).onComplete(()=>{u()}).start();let s=new Promise(p=>{u=p});return this.renderer.render(),s}};Exporter={getCurrentSceneGLTF:async t=>this.renderer.getCurrentSceneGLTF(t)};CustomGeometries={add:(t,e,i)=>{let n=i!=null&&i.floorId?this.floors.find(a=>a.id===(i==null?void 0:i.floorId)):this.floors[0],o=Q();return this.renderer.addGeometryGroup(o,t,e,n.id),o},remove:t=>(this.renderer.remove(t.id),t.id)};Labels={all:({onCreate:t})=>{let e=0;for(let i of Object.entries(this.mvf.space)){let[n,o]=i;o&&(o.features.forEach(a=>{var f,m;let u=(f=this.styleMap[a.properties.id])==null?void 0:f.showImage,s=(m=a.properties.details)==null?void 0:m.images,p;if(u&&s&&s.length>0&&(p={marker:{icon:s[0].url}}),a.properties.center&&a.properties.externalId!==""){let y=this.renderer.addLabel2D(a.properties.center,a.properties.externalId,{id:a.properties.id+"-label",appearance:p},n);t(y.id,a.properties.externalId)}}),e++)}},add:(t,e,i={})=>{let{floorId:n,...o}=i,a=i!=null&&i.floorId?this.floors.find(s=>s.id===(i==null?void 0:i.floorId)):this.floors[0],u=this.renderer.addLabel2D(t,e,o,a.containerId);if(!u)throw new Error("label creating failed");return u},remove:t=>{this.renderer.remove(t)},removeAll:()=>{}};Paths={add:(t,e)=>new Promise(i=>{let n=[],o=t[0].floorId||"root",a=0;for(let s of t){let{floorId:p="root",latitude:f,longitude:m}=s;p!==o&&(a++,o=p),n[a]==null&&n.push({floorId:p,coordinates:[]}),n[a].coordinates.push([m,f])}let u=n.map(({floorId:s,coordinates:p})=>this.renderer.addPath({type:"FeatureCollection",features:p.map(f=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:f}}))},e,s));new vn.default.Tween({fraction:0}).to({fraction:1},(e==null?void 0:e.drawDuration)||1e3).onUpdate(({fraction:s})=>{u.forEach(p=>{this.renderer.setState(p.id,{completeFraction:s})})}).onComplete(()=>{i(u)}).start()}),remove:t=>{t.forEach(e=>{this.renderer.remove(e)})}};constructor(t,e,i,n={},o){super(),this.renderer=o,this.id=t,this.renderer.addGroupContainer(t,{},"root"),this.StackedMaps=new Zc(this,this.renderer),this.mvf=e,this.styleMap=i,this.floors=this.mvf["map.geojson"].sort((a,u)=>a.elevation-u.elevation).map(a=>{var s,p;if(t!=="outdoors-container"&&((s=e.space[a.id])==null?void 0:s.features.length)===0&&((p=e.obstruction[a.id])==null?void 0:p.features.length)===0)return;let u=new Fu(t,a,this.renderer,n,e,i);return u.load(),u}).filter(Boolean),this.setFloor(this.floors[0].id)}};l(Km,"GeojsonApiMapObject");var Gs=Km;d();var Ye,Hs,Qm=class Qm{constructor({currentMapGetter:t}){P(this,Ye,new Map);P(this,Hs,void 0);E(this,Hs,t)}get currentMap(){return c(this,Hs).call(this)}getById(t){return c(this,Ye).get(t)}add(t,e,i){let n=Qe(t);if(!n)throw new Error("get coordinate failed");let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let{id:a}=o.Markers.add(si(n),e,{...i,floorId:n.floorId,rank:(i==null?void 0:i.rank)||"medium",dynamicResize:(i==null?void 0:i.dynamicResize)||!1}),u=o.Markers.getContentEl(a.toString());if(!u)throw new Error("marker component should exist");let s=new Yi(a.toString(),u);return c(this,Ye).set(s.id,{marker:s,entityId:a.toString()}),s}remove(t){var i;let e=c(this,Ye).get(t.id);e&&((i=this.currentMap)==null||i.Markers.remove(e.entityId),c(this,Ye).delete(t.id.toString()))}removeAll(){let t=[];return c(this,Ye).forEach(({marker:e})=>{this.remove(e),t.push(e),c(this,Ye).delete(e.id.toString())}),t}setPosition(t,e){var a;let i=Qe(e);if(!i){B.error("Cannot determine coordinate from target.");return}let n=this.currentMap;if(!n){B.error("Cannot determine the current map.");return}let o=c(this,Ye).get(t.id);if(!o){B.error(`Cannot find the Marker with id "${t.id}".`);return}n.Markers.setPosition(o.entityId,si(i),(a=i.floorId)!=null?a:n.currentFloorId)}animateTo(t,e,i){var u;let n=Qe(e);if(!n)return B.error("Cannot determine coordinate from target."),Promise.resolve();let o=this.currentMap;if(!o)return B.error("Cannot determine the current map."),Promise.resolve();let a=c(this,Ye).get(t.id);return a?o.Markers.animateTo(a.entityId,si(n),(u=n.floorId)!=null?u:o.currentFloorId,i):(B.error(`Cannot find the Marker with id "${t.id}".`),Promise.resolve())}};Ye=new WeakMap,Hs=new WeakMap,l(Qm,"Markers");var Vs=Qm;d();var pr,js,t1=class t1{constructor({currentMapGetter:t}){P(this,pr,new Map);P(this,js,void 0);E(this,js,t)}get currentMap(){return c(this,js).call(this)}getById(t){return c(this,pr).get(t)}add(t,e){let i=Array.isArray(t)?t:[t],n=i.reduce((u,s)=>{var f;let p=Qe(s.target);return p?(u.has(p.floorId)||u.set(p.floorId,[]),(f=u.get(p.floorId))==null||f.push({...s,target:p}),u):(B.error("Cannot determine coordinate from options."),u)},new Map);if(!i.length)throw new Error("targets should not be empty when adding a model");let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let a=[];return n.forEach((u,s)=>{let p=Q();o.Models.add(p,u,{...e,floorId:s}).forEach(({id:m})=>{let y=new La(m.toString(),p);c(this,pr).set(y.id,{model:y,entityId:m.toString(),groupId:p}),a.push(y)})}),a}remove(t){var i;let e=c(this,pr).get(t.id);e&&((i=this.currentMap)==null||i.Models.remove(e.entityId,e.groupId),c(this,pr).delete(t.id.toString()))}removeAll(){let t=[];return c(this,pr).forEach(({model:e})=>{var n;let i=c(this,pr).get(e.id);i&&(t.push(e),(n=this.currentMap)==null||n.Models.remove(i.entityId,i.groupId),c(this,pr).delete(e.id.toString()))}),t}};pr=new WeakMap,js=new WeakMap,l(t1,"Models");var Xs=t1;d();var Ar,Ws,e1=class e1{constructor({currentMapGetter:t}){P(this,Ar,new Map);P(this,Ws,void 0);E(this,Ws,t)}get currentMap(){return c(this,Ws).call(this)}getById(t){return c(this,Ar).get(t)}async add(t,e){let i=this.currentMap;if(!i)throw new Error("currentMap should exist");let n=await i.Paths.add(t,e),o=new Da(Q());return c(this,Ar).set(o.id,{path:o,entityIds:n.map(a=>a.id.toString())}),o}remove(t){var i;let e=c(this,Ar).get(t.id);e&&((i=this.currentMap)==null||i.Paths.remove(e.entityIds),c(this,Ar).delete(t.id.toString()))}removeAll(){let t=[];return c(this,Ar).forEach(({path:e})=>{this.remove(e),t.push(e),c(this,Ar).delete(e.id.toString())}),t}};Ar=new WeakMap,Ws=new WeakMap,l(e1,"Paths");var Ys=e1;d();var zc=Br(lo());d();var y5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAkklEQVRoge3awQ3AIAxD0VAMYf+F0yUixbL8JshXuLSwIqJCwDc9QBeZEOy9p2doAQDTM7TQ2cg5Z3qGFjpHS2YjDiGDe+/0DC0cwkYpJKdnaIFMkY1kymzEIVQcwsYhbPDem56hhc5GHELGIWwcwsYhbJS+2R1CxSFsdH5iO4SMr97Y6FxPqxytVVV+HcTEIWx+9mcIqHSOm9QAAAAASUVORK5CYII=";d();var g5=l((r,t,e=0)=>{if(Math.abs(r)>=Math.PI)throw new Error("Sector angle too wide!");let i=e/Math.tan(r/2),n=e/Math.sin(r/2),o=n+t,a=10,u=new Ue;u.moveTo(n*Math.cos(r/2)-i,n*Math.sin(r/2));for(let s=0;s<a;s++)u.lineTo(o*Math.cos(r/2-r/a*s)-i,o*Math.sin(r/2-r/a*s));for(let s=0;s<a;s++)u.lineTo(e*Math.cos(Math.PI/-2+Math.PI/a*s),e*Math.sin(Math.PI/-2+Math.PI/a*s));return new Ze(u,{depth:.1,bevelEnabled:!1,UVGenerator:cT(t)})},"createSectorGeometry"),r1=l((r,t,e)=>{let n=Math.sqrt(Math.pow(r,2)+Math.pow(t,2))/e;return n>1?n=1:n<0&&(n=0),new U(0,n)},"generateRadialUV"),cT=l(r=>({generateTopUV:(t,e,i,n,o)=>{let a=e[i*3],u=e[i*3+1],s=e[n*3],p=e[n*3+1],f=e[o*3],m=e[o*3+1];return[r1(a,u,r),r1(s,p,r),r1(f,m,r)]},generateSideWallUV:()=>[new U(0,1),new U(0,1),new U(0,1),new U(0,1)]}),"radialUVGenerator");var i1="#2266ff",pT=.7,hT=.3;function v5(){let r=new wn({color:i1,opacity:pT,transparent:!0,depthTest:!1,depthWrite:!1}),t=g5(Math.PI/6,x5,C5);new Tn().load(y5,i=>{r.alphaMap=i,r.needsUpdate=!0});let e=new Ut(t,r);return e.position.z=-.05,e.renderOrder=3,e}l(v5,"createBearingCone");var b5=l(()=>{let r=new tp(.5,.5,.05,32),t=new wn({transparent:!0,color:i1,opacity:hT,depthTest:!1,depthWrite:!1}),e=new Ut(r,t);e.scale.set(0,0,.05),e.renderOrder=2;let i=new tp(n1,n1,.05,32),n=new wn({transparent:!0,color:i1,depthTest:!1,depthWrite:!1}),o=new Ut(i,n);return o.renderOrder=3,e.rotation.x=Math.PI/2,o.rotation.x=Math.PI/2,{baseMesh:e,middleMesh:o}},"createBlueDot");d();d();d();var dT=l(function(){let t=globalThis.fetch;return{fetch(...e){if(!pa(t))throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return t==null?void 0:t(...e)},setFetch(e){t=e}}},"createFetchControl")(),S5=dT.fetch;var w5=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],fT=w5[0],mT="https://api-gateway.mappedin.com/track-analytics/a/",bn,kr,Us,a1,s1=class s1{constructor(){P(this,Us);P(this,bn,Object.freeze({}));P(this,kr,void 0);v(this,"sendGetDirectionsEvent",nr((t,e)=>this.sendAnalyticEvent("query-directions",{start:t,end:e,type:"location_to_location"}),2500));E(this,kr,X(this,Us,a1).call(this,c(this,bn)))}init(t={}){this.reset(),this.updateStateWithOptions(t)}reset(){this.updateStateWithOptions({})}updateStateWithOptions(t={}){return E(this,bn,Object.freeze(Object.assign({},c(this,bn),t))),E(this,kr,X(this,Us,a1).call(this,t)),c(this,kr)}updateState(t){let i={...{...t}};i.mapId&&(i.baseUrl=P5({...c(this,kr),mapId:i.mapId})),i.context&&(i.context=M5(i.context)),Object.assign(c(this,kr),i)}get authReady(){let{key:t,secret:e,accessToken:i}=this.getState();return!!(t&&e)||!!i}getState(){return c(this,kr)}getContext(){return this.getState().context||c(this,bn).context}sendAnalyticEvent(t,e={}){let i=this.getState(),n={...e,g:i.geolocationMode};i.userPosition&&(n={...n,...i.userPosition});let o=vT(i.baseUrl,t,n);if(i.logEvents&&B.log("Analytics.track",o),!i.sendEvents)return Promise.resolve();let a={"mi-context":this.getContext(),"mi-session":i.mi_session,"mi-device":i.mi_uuid,"mappedin-sdk-version":i.version,"mappedin-platform-version":i.platformString};return i.accessToken?a.Authorization=`Bearer ${i.accessToken}`:i.noAuth||i.secret&&i.key&&(a["x-mappedin-key"]=btoa(i.key),a["x-mappedin-secret"]=btoa(i.secret)),S5(o,{method:"GET",mode:"cors",headers:a})}capture(t,e){if(CT.includes(t))return B.warn(`${t} event is sent internally.`),Promise.resolve();let i=bT.includes(t)?t.slice(1):t;return this.sendAnalyticEvent(i,e)}sendGetMapDataEvent(t){return this.sendAnalyticEvent("load-mapdata",t)}sendWatchPositionDenied(){return this.sendAnalyticEvent("watch-position-denied")}sendMapViewLoadedEvent({firstRenderDuration:t,dimension:e}){return this.sendAnalyticEvent("load-mapview",{firstRenderDuration:t,url:window.location.href,width:e.width,height:e.height,devicePixelRatio:window.devicePixelRatio})}};bn=new WeakMap,kr=new WeakMap,Us=new WeakSet,a1=l(function(t){var e,i,n;return{baseUrl:P5(t),version:((e=b==null?void 0:b.env)==null?void 0:e.npm_package_version)||"v6",mi_uuid:yT(),accessToken:t.accessToken,mapId:t.mapId,mi_session:gT(),platformString:t.platformString||"",context:M5(t.context)||fT,geolocationMode:!1,sendEvents:(i=t.sendEvents)!=null?i:!1,logEvents:(n=t.logEvents)!=null?n:!1,noAuth:t.noAuth||!1,key:t.key,secret:t.secret}},"#getStateWithOption"),l(s1,"CustomerAnalytics");var o1=s1;function P5(r){return`${mT}${r.mapId}/`}l(P5,"getBaseUrl");function yT(){return eo.getInstance().loadLocalData("deviceId")}l(yT,"getDeviceID");function gT(){return eo.getInstance().loadSessionData("id")}l(gT,"getSessionID");function vT(r,t,e){let i=new URLSearchParams;for(let[n,o]of Object.entries(e))o!=null&&i.append(n,o);return r+t+"?"+i.toString()}l(vT,"buildUrl");function M5(r){return w5.find(t=>t===r)}l(M5,"getValidContext");var bT=["$select-location","$select-category","$query-suggest","$query-search"],CT=["load-mapview","load-mapdata","query-directions","watch-position-denied"],ae=new o1,T5={init(...r){return ae.init(...r)},capture(...r){return ae.capture(...r)},updateState(r){return ae.updateState(r)}};var xT={enableHighAccuracy:!0},ST=500,PT=150,MT=150,wT=0,TT=5,IT=5,ET=30,C5=.4,x5=1.25,n1=.35,l1=class l1 extends J{constructor(e,i){super();this.core=e;this.geoJSONApi=i}watcherId=null;geometry;currentGeolocation;positionAnimation;scaleAnimation;rotationAnimation;enable(){this.watcherId&&navigator.geolocation.clearWatch(this.watcherId),this.geometry=this.core.addCustomGeometry("blue-dot",{type:"Feature",properties:{},geometry:{type:"Point",coordinates:[-79.3935,43.6532]}},{setup:e=>{let{baseMesh:i,middleMesh:n}=b5(),o=v5();e.add(i),e.add(n),e.add(o)},update:this.updateGeometryPerFrame},{visible:!1},"outdoors-container"),this.watcherId=navigator.geolocation.watchPosition(this.onPositionUpdate,this.onPositionError,xT)}updateGeometryPerFrame=e=>{var s;let[i,n,o]=e.children,{accuracy:a,heading:u}=((s=this.currentGeolocation)==null?void 0:s.coords)||{};a!=null&&(this.scaleAnimation&&this.scaleAnimation.stop(),this.scaleAnimation=new zc.default.Tween({scale:i.scale.x}).to({scale:he(a,IT,ET,wT,TT)},PT).onUpdate(({scale:p})=>{i.scale.set(p,1,p)}).start()),u!=null?(o.visible=!0,this.rotationAnimation&&this.rotationAnimation.stop(),this.rotationAnimation=new zc.default.Tween({rotation:i.scale.x}).to({rotation:nt.degToRad(u)},MT).onUpdate(({rotation:p})=>{o.rotation.z=p}).start()):o.visible=!1};onPositionUpdate=e=>{var i;if(this.currentGeolocation=e,ae.updateState({userPosition:{bluedotTimestamp:Date.now(),latitude:e.coords.latitude,longitude:e.coords.longitude,floorLevel:e.coords.floorLevel,accuracy:e.coords.accuracy}}),this.geometry){let n=this.core.getState(this.geometry);n.visible===!1&&this.core.setState(this.geometry,{position:[e.coords.longitude,e.coords.latitude],visible:!0}),this.positionAnimation&&this.positionAnimation.stop(),n=this.core.getState(this.geometry);let o;if(e.coords.floorLevel!==void 0){let a=(i=this.geoJSONApi.currentMap)==null?void 0:i.floors[e.coords.floorLevel];o=a==null?void 0:a.id}this.positionAnimation=new zc.default.Tween(n.position).to([e.coords.longitude,e.coords.latitude],ST).onUpdate(a=>{if(this.geometry){let u={position:a};if(o==null&&n.parent!=="outdoors-container")u.parent="outdoors-container";else if(o!=null&&n.parent!==o){let s=o!=null?o:"outdoors-container";u.parent=s,this.publish("floor-change",{reason:"blue-dot-floor-change",floorId:s})}this.core.setState(this.geometry,u)}}).start(),this.core.render()}};onPositionError=e=>{switch(e.code){case e.PERMISSION_DENIED:B.error("Geolocation permission denied by the user.",e),ae.sendWatchPositionDenied();break;case e.POSITION_UNAVAILABLE:B.error("Geolocation position unavailable.",e);break;case e.TIMEOUT:B.error("Geolocation request timed out.",e);break;default:B.error("An unknown geolocation error occurred.",e);break}this.disable()};disable(){this.watcherId&&navigator.geolocation.clearWatch(this.watcherId),this.geometry&&(this.core.remove(this.geometry.id),this.geometry=void 0),this.currentGeolocation=void 0}};l(l1,"BlueDot");var qc=l1;d();var Nr,Zs,u1=class u1{constructor({currentMapGetter:t}){P(this,Nr,new Map);P(this,Zs,void 0);E(this,Zs,t)}get currentMap(){return c(this,Zs).call(this)}getById(t){return c(this,Nr).get(t)}add(t,e,i){let n=this.currentMap;if(!n)throw new Error("currentMap should exist");let o=n.CustomGeometries.add(t,e||{},{floorId:i==null?void 0:i.id}),a=new Oa(o);return c(this,Nr).set(a.id,a),a}remove(t){var i;c(this,Nr).get(t.id)&&((i=this.currentMap)==null||i.CustomGeometries.remove(t),c(this,Nr).delete(t.id.toString()))}removeAll(){let t=[];return c(this,Nr).forEach(e=>{this.remove(e),t.push(e.id),c(this,Nr).delete(e.id.toString())}),t}};Nr=new WeakMap,Zs=new WeakMap,l(u1,"CustomGeometries");var $c=u1;d();var qs,c1=class c1{constructor({currentMapGetter:t}){P(this,qs,void 0);E(this,qs,t)}get currentMap(){return c(this,qs).call(this)}setFromStyleCollection(t){var e,i,n;for(let o in t)for(let a of((e=this.currentMap)==null?void 0:e.floors)||[])if(t[o]!=null){if(a.layers.has(o)&&"color"in t[o]){let u=a.layers.get(o);(i=this.currentMap)==null||i.renderer.setState(u,{color:t[o].color})}if(o===mu&&!(Di in t)){let u=a.layers.get(Di);u&&"color"in t[o]&&((n=this.currentMap)==null||n.renderer.setState(u,{color:t[o].color}))}}}};qs=new WeakMap,l(c1,"Style");var zs=c1;d();var hr,$s,p1=class p1{constructor(t,e){P(this,hr,void 0);P(this,$s,void 0);E(this,hr,t),E(this,$s,e||[])}setStyle(t){var e,i;if(c(this,hr).map){(e=c(this,hr).map)==null||e.setStyle(t),(i=c(this,hr).map)==null||i.moveLayer(Za);for(let[n,o]of c(this,$s)||[])c(this,hr).hideOutdoorLayersUnderPoint(n,o)}}get map(){return c(this,hr).map}get enabled(){return!!c(this,hr).map}};hr=new WeakMap,$s=new WeakMap,l(p1,"Outdoor");var _o=p1;var Jc=.05,h1=class h1{core;outdoors;mapObjects=[];id;mapDataExternal={};mapsByFloorId={};mapData;currentMap;directions;hiddenOutdoorGeometries=[];mapView;Camera;Labels;Markers;Models;Paths;Exporter;Navigation;Outdoor;BlueDot;CustomGeometries;Style;constructor(t,e){this.core=t,this.mapView=e,this.Camera=new Ra(this.core),this.id=this.core.addGroupContainer("root").id.toString(),this.outdoors=new Gs("outdoors-container",{"map.geojson":[{id:"outdoors",externalId:"outdoors",elevation:0}],"styles.json":{},space:{},entrance:{},obstruction:{}},{},{},this.core),this.mapObjects.push(this.outdoors);let i=new _a(this.Camera);this.core.on("camera-change",()=>{this.mapView.publish("camera-change",i)});let n=l(u=>s=>{var g,C,I;let p=[],f=[],m=[];s.labels.forEach(T=>{let w=this.Labels.getById(T.toString());w&&p.push(w.label)}),s.markers.forEach(T=>{let w=this.Markers.getById(T.toString());w&&f.push(w.marker)}),s.models.forEach(T=>{let w=this.Models.getById(T.toString());w&&m.push(w.model)});let y=s.geometry[0],x;y&&(x=(g=this.getMapDataInternal())==null?void 0:g.getById("space",y)),x||(x=(C=this.getMapDataInternal())==null?void 0:C.getById("object",y));let S=s.containers.reduce((T,w)=>{var D;let L=(D=this.getMapDataInternal())==null?void 0:D.getById("floor",w);return L&&Kr.is(L)&&T.push(L),T},[]),M={coordinate:new tt(s.coordinate[1],s.coordinate[0],(I=S==null?void 0:S[0])==null?void 0:I.id),spaces:x&&_e.is(x)?[x]:[],objects:x&&Oe.is(x)?[x]:[],markers:f,labels:p,models:m,floors:S};"pointerEvent"in s&&(M.pointerEvent=s.pointerEvent),this.mapView.publish(u,M)},"createHandler");this.core.on("hover",n("hover")),this.core.on("click",n("click")),this.core.on("outdoor-view-loaded",()=>{this.mapView.publish("outdoor-view-loaded")}),this.core.on("outdoor-style-loaded",()=>{this.mapView.publish("outdoor-style-loaded")}),this.core.on("user-interaction-start",()=>{this.mapView.publish("user-interaction-start")}),this.core.on("user-interaction-end",()=>{this.mapView.publish("user-interaction-end")});let o=l(()=>this.currentMap,"currentMapGetter");this.Markers=new Vs({currentMapGetter:o}),this.Models=new Xs({currentMapGetter:o}),this.Labels=new ja({currentMapGetter:o}),this.Exporter=new Xa({currentMapGetter:o}),this.Paths=new Ys({currentMapGetter:o}),this.Navigation=new vu(e),this.BlueDot=new qc(this.core,this),this.BlueDot.on("floor-change",u=>{this.setFloor(u.floorId,"blue-dot-floor-change")}),this.Outdoor=new _o(this.core,this.hiddenOutdoorGeometries),this.CustomGeometries=new $c({currentMapGetter:o}),this.Style=new zs({currentMapGetter:o});let a=new Mu(e,this.mapDataExternal);this.auto=a.auto}updateState(t,e){var n;if(t==="walls"){(n=this.currentMap)==null||n.floors.forEach(o=>{var s,p;let a=o.layers.get(mu),u=o.layers.get(Di);a&&((s=this.core.getState(a))==null||s.children.forEach(f=>{this.core.setState(f.id,e)})),u&&((p=this.core.getState(u))==null||p.children.forEach(f=>{this.core.setState(f.id,e)}))});return}let i=typeof t=="string"?this.getMapDataObject(t):t;if(i){if(ni.is(i))return this.core.setState(i.id,H3({...e,type:"label"},this.core.getState(i.id)));if(Yi.is(i))return this.core.setState(i.id,X3({...e,type:"marker"},this.core.getState(i.id)));(_e.is(i)||Oe.is(i))&&this.core.setState(i.id,j3({...e,type:"geometry"},this.core.getState(i.id)))}}getMapDataObject(t){var e;return(e=this.getMapDataInternal())==null?void 0:e.getMapDataById(t)}update=()=>{this.core.render()};getMapDataInternal(){if(this.mapData)return ul.get(this.mapData)}getMapData(){return this.mapData}expand(t){var e;return(e=this.currentMap)==null?void 0:e.StackedMaps.expand({excludeFloorIds:(t==null?void 0:t.excludeFloors.map(i=>i.id))||[]})}collapse(){var t;return(t=this.currentMap)==null?void 0:t.StackedMaps.collapse()}addMap(t,e){return new Promise(i=>{var y,x,S;let n=ul.get(t);if(!n){B.error("error exists"),i(t);return}this.mapDataExternal[t.mapName]=t;let{mvf:o}=n,a=o["manifest.geojson"].features[0].geometry.coordinates;this.core.mode!=="outdoors-overlay"&&this.Camera.set({center:new tt(a[1],a[0])});let u=U3(o["styles.json"]||{}),s=o["manifest.geojson"].features[0].properties.name,p=new Gs(`mapObject-${s}`,o,u,e,this.core),f=this.core.getBoundingArea(p.currentFloor.id),m=(x=(y=e==null?void 0:e.outdoorView)==null?void 0:y.layersHiddenByGeometry)!=null?x:[];if(m.length>0){let M=(S=this.core.getCenter(f))!=null?S:a;this.core.hideOutdoorLayersUnderPoint(M,m),this.hiddenOutdoorGeometries.push([M,m])}this.mapObjects.push(p),o["map.geojson"].forEach(M=>{this.mapsByFloorId[M.id]=p}),p.StackedMaps.on("expanded",()=>{this.mapView.publish("expanded")}),p.StackedMaps.on("collapsed",()=>{this.mapView.publish("collapsed")}),p.on("floor-change-start",()=>{this.mapView.publish("floor-change-start",{floor:this.currentFloor})}),p.on("floor-change",M=>{this.mapView.publish("floor-change",{reason:M.reason,floor:this.currentFloor})}),this.currentMap=p,this.mapData=t,this.directions=new Nu({nodes:this.currentMap.mvf["node.geojson"],obstructions:this.currentMap.mvf.obstruction,connections:this.currentMap.mvf["connection.json"],groupBy:"map"}),(e==null?void 0:e.zoomLevel)!=null?(this.core.camera.setZoomLevel(e.zoomLevel),i(t)):this.core.mode!=="outdoors-overlay"?this.core.camera.focusOn(this.core.getBoundingArea(p.currentFloor.id),{duration:f3,padding:{top:Jc*this.core.canvasHeight,left:Jc*this.core.canvasWidth,right:Jc*this.core.canvasWidth,bottom:Jc*this.core.canvasHeight}}).then(()=>{i(t)}):i(t)})}setFloor(t,e){if(!this.currentMap)throw new Error("mappObject should exist atm");this.currentMap.setFloor(typeof t=="string"?t:t.id,e)}get currentFloor(){var i,n;let t=(i=this.currentMap)==null?void 0:i.currentFloor.id;if(!t)throw new Error("Missing currentFloor object from GeoJsonApi");let e=(n=this.mapData)==null?void 0:n.getById("floor",t);if(!e)throw new Error("Missing currentFloor");return e}getState(t){var n;let e=typeof t=="string"?t:t.id,i=this.core.getState(e);if(i){if(i.type==="geometry")return{type:"geometry",interactive:i.interactive,hoverColor:i.hoverColor,color:i.color,visible:i.visible};if(i.type==="label"&&i.options.appearance&&i.options.rank!==void 0&&i.options.interactive!==void 0)return{type:"label",appearance:i.options.appearance,rank:i.options.rank,enabled:i.enabled,interactive:i.options.interactive};if(i.type==="marker"&&((n=i.options)==null?void 0:n.rank)!==void 0&&i.options.interactive!==void 0){let o=typeof i.parent=="object"?i.parent.id:i.parent;return{type:"marker",rank:i.options.rank,interactive:i.options.interactive,enabled:i.enabled,element:i.element,coordinate:new tt(i.position[1],i.position[0],o.toString())}}else if(i.type==="model")return{type:"model"}}}setHoverColor(t){this.core.setState({hoverColor:t})}getHoverColor(){let t=this.core.getState();return(t==null?void 0:t.type)==="map-view"?t.hoverColor:void 0}getDirections=(t,e,i)=>{if(!this.directions)throw new Error("You have to call .addMap() before you can get directions");let n=this.getMapDataInternal();if(!n)throw new Error("getDirections failed due to missing mapData");let{accessible:o=!1,smoothing:a=!0}=i||{},u=Array.isArray(t)?t:[t],s=Array.isArray(e)?e:[e];ae.sendGetDirectionsEvent(u[0].id,s[0].id);let p=typeof a=="object"?a.enabled:a,f=typeof a=="object"?a.radius:void 0,m=(i==null?void 0:i.zones)||[],y={accessible:o,zones:m,smoothing:{enabled:p!=null?p:!0,radius:f!=null?f:.75}};return this.directions.getDirections(u,s,y,n)};createCoordinate(t,e,i){return new tt(t,e,(i==null?void 0:i.id)||this.currentFloor.id)}createCoordinateFromScreenCoordinate(t,e,i){let n=this.core.projectScreenXYToCoordinate(t,e);return n?new tt(n[1],n[0],(i==null?void 0:i.id)||this.currentFloor.id):void 0}isInView(t){return this.core.isInView(typeof t=="string"?t:t.id)}auto(){this.Labels.all()}get __core(){return this.core}destroy(){this.Navigation.clear(),this.BlueDot.disable(),this.CustomGeometries.removeAll(),this.Paths.removeAll(),this.Models.removeAll(),this.Markers.removeAll(),this.Labels.removeAll(),this.core.destroy()}};l(h1,"GeoJsonApi");var Js=h1;var Qs,et,d1=class d1 extends J{constructor(e){super();P(this,Qs,{});P(this,et,void 0);v(this,"Camera");v(this,"Labels");v(this,"Markers");v(this,"Models");v(this,"Paths");v(this,"Exporter");v(this,"Navigation");v(this,"BlueDot");v(this,"Style");v(this,"CustomGeometries");v(this,"Outdoor");v(this,"update",()=>{c(this,et).core.render()});v(this,"getDirections",(e,i,n)=>c(this,et).getDirections(e,i,n));v(this,"on",(e,i)=>{super.on(e,i)});v(this,"off",(e,i)=>{super.off(e,i)});let i=new Js(e,this);E(this,et,i),this.Camera=c(this,et).Camera,E(this,Qs,c(this,et).mapDataExternal),this.Markers=c(this,et).Markers,this.Models=c(this,et).Models,this.Labels=c(this,et).Labels,this.Exporter=c(this,et).Exporter,this.Paths=c(this,et).Paths,this.Navigation=c(this,et).Navigation,this.BlueDot=c(this,et).BlueDot,this.CustomGeometries=c(this,et).CustomGeometries,this.Style=c(this,et).Style,this.auto=c(this,et).auto,this.Outdoor=c(this,et).Outdoor}updateState(e,i){return c(this,et).updateState(e,i)}getMapData(){return c(this,Qs)}getDimensions(){return{width:this.__core.canvasWidth,height:this.__core.canvasHeight}}expand(e){return c(this,et).expand(e)}collapse(){return c(this,et).collapse()}addMap(e,i){return c(this,et).addMap(e,i)}setFloor(e){c(this,et).setFloor(e)}get currentFloor(){return c(this,et).currentFloor}getState(e){return c(this,et).getState(e)}setHoverColor(e){c(this,et).setHoverColor(e)}getHoverColor(){return c(this,et).getHoverColor()}isInView(e){return c(this,et).isInView(e)}createCoordinate(e,i,n){return c(this,et).createCoordinate(e,i,n)}createCoordinateFromScreenCoordinate(e,i,n){return c(this,et).createCoordinateFromScreenCoordinate(e,i,n)}auto(){this.Labels.all()}get __core(){return c(this,et).core}destroy(){c(this,et).destroy()}async enableDebug(){let{Inspector:e}=await import("./inspector-2XM6P7XL.js");await new e(this,c(this,et)).enable()}};Qs=new WeakMap,et=new WeakMap,l(d1,"MapView");var Ks=d1;d();var f1=class f1 extends J{gl;el=document.createElement("div");core;origin;constructor(t){super(),this.origin=t}onAdd(t){this.origin=this.origin||t.getCenter().toArray(),this.gl=t.painter.context.gl,this.core=new Rs(t._container,{center:this.origin,zoomLevel:t.getZoom(),pitch:t.getPitch(),bearing:t.getBearing(),gl:this.gl,map:t,mode:"outdoors-overlay"}),this.core.camera.setMinZoomLevel(t.getMinZoom()),this.core.camera.setMaxZoomLevel(t.getMaxZoom()),this.core.camera.setMinPitch(t.getMinPitch()),this.core.camera.setMaxPitch(t.getMaxPitch()),t.on("error",n=>{B.warn(n)});let e=ll.fromLngLat(this.origin,0),i=ju(e,this.core.viewCamera,this.core.camera,()=>{this.core.renderSync()});return t.on("style.load",async()=>{t.addLayer(i),this.core.camera.setMinZoomLevel(t.getMinZoom()),this.core.camera.setMaxZoomLevel(t.getMaxZoom()),this.core.camera.setMinPitch(t.getMinPitch()),this.core.camera.setMaxPitch(t.getMaxPitch())}),t.on("move",()=>{let[n,o]=t.getCenter().toArray();this.core.getSystems().cameraSystem.setCenter(n,o),this.core.getSystems().cameraSystem.setZoomLevel(t.getZoom()),this.core.getSystems().cameraSystem.setRotation(nt.degToRad(-t.getBearing())),this.core.getSystems().cameraSystem.setTilt(nt.degToRad(t.getPitch()))}),this.el}onRemove(){}};l(f1,"MapLibreOverlay");var Kc=f1;var gJ=l(async(r,t)=>{let e;try{if(t){let{access_token:o}=await pl(t);e=o}}catch(o){B.warn("Getting access token failed. Outdoor map disabled.",o)}let i=new to(r,e);return new cl(i)},"hydrateMapDataFromMVF");function LT(r,t,e){return fetch(r,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials",client_id:t,client_secret:e})})}l(LT,"fetchOutdoorViewToken");var DT=l(async r=>{let t={emitAnalyticsEvents:!0,...r},e;if("accessToken"in t)e=t.accessToken;else if("key"in t&&"secret"in t){let p=await LT("https://auth.mappedin.com/oauth2/token",t.key,t.secret),{access_token:f}=await p.json();e=f}else throw new Error("No outdoor view token provided and key and secret missing.");let i={...t,venue:t.mapId,clientId:t.key,clientSecret:t.secret,version:"1.0.0"},n=await z1(i),o=await dl(n),a=hl(o);typeof r.onMVFParsed=="function"&&r.onMVFParsed(a);let u=new to(a,e);return new cl(u)},"getMapDataEnterprise"),I5=!1;function vJ(r){I5=r}l(vJ,"setUseEnterpriseAPI");var bJ=l(async r=>{if(I5)return DT(r);let t={emitAnalyticsEvents:!1,...r},e;if("accessToken"in t)e=t.accessToken;else{let{access_token:m}=await pl(t);e=m}ae.authReady||ae.updateState({accessToken:e});let i=performance.now(),n=await np(t,e),o=performance.now(),a=await dl(n),u=hl(a),s=performance.now();typeof r.onMVFParsed=="function"&&r.onMVFParsed(u);let p=new to(u,e),f=new cl(p);return ae.sendGetMapDataEvent({parseDuration:(s-o).toFixed(2),downloadDuration:(o-i).toFixed(2),viewId:t.viewId}),f},"getMapData"),Cn,Oo,Qc=class Qc extends Kc{constructor(e,i,n){super(e);P(this,Cn,void 0);P(this,Oo,void 0);E(this,Cn,i),E(this,Oo,n)}onAdd(e){var o,a;super.onAdd(e);let i={...ha,...(o=c(this,Oo))!=null?o:{},outdoorView:{token:c(this,Cn).outdoorViewToken,...(a=c(this,Oo))==null?void 0:a.outdoorView}},n=new Ks(this.core);return n.addMap(c(this,Cn),i).then(()=>{this.publish("loaded",{mapView:n,mapData:c(this,Cn)})}),this.el}};Cn=new WeakMap,Oo=new WeakMap,l(Qc,"MappedinMapLibreOverlay"),v(Qc,"instance");var tl=Qc,CJ=l((r,t)=>{tl.instance!=null&&B.warn("Only a single map venue is supported at this time.");let e=new tl([r.mapCenter.longitude,r.mapCenter.latitude],r,t);return tl.instance=e,e},"createMapLibreOverlay"),_T=l(async(r,t,e)=>{var u,s,p,f,m;let i=performance.now(),n=sd(e,t);try{e&&ad(e)}catch(y){if(y instanceof Error&&y.name==="MissingOutdoorViewToken")B.error("Enable outdoor view requires a token. Provide token in `options.outdoorView.token`");else throw y}let o=await m5(r,{center:[t.mapCenter.longitude,t.mapCenter.latitude],bearing:n.bearing,pitch:n.pitch,zoomLevel:n.zoomLevel,outdoorView:(u=n.outdoorView)!=null&&u.token?{headers:{"x-mappedin-tiles-key":(s=n.outdoorView)==null?void 0:s.token},style:(p=n.outdoorView)==null?void 0:p.style,enabled:!!((f=n.outdoorView)!=null&&f.enabled)}:void 0,watermark:n.watermark,attribution:n.attribution,antialias:typeof n.antialiasing=="boolean"?n.antialiasing:!!((m=n.antialiasing)!=null&&m.enabled)}),a=new Ks(o);return await a.addMap(t,n),ae.sendMapViewLoadedEvent({firstRenderDuration:(performance.now()-i).toFixed(2),dimension:a.getDimensions()}),a},"show3dMapGeojson"),xJ=_T;export{H1 as a,R5 as b,hl as c,dl as d,tt as e,fu as f,$r as g,_e as h,Kr as i,ti as j,Oe as k,yu as l,Qr as m,Yn as n,K3 as o,nT as p,ae as q,T5 as r,gJ as s,DT as t,vJ as u,bJ as v,CJ as w,_T as x,xJ as y};
|