PageSourceSearch

https://omniscent.ai/_next/static/chunks/547-58d3fa208baabf66.js

js omniscent.ai collected 2026-10-05 15:42:54 UTC 169,370 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[547],{9705:function(t,e,r){"use strict";var n=r(31540);function i(t){var e=[1/0,1/0,-1/0,-1/0];return n.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}i.default=i,e.Z=i},84102:function(t,e){"use strict";function r(t,e,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function n(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function i(t,e,n){void 0===n&&(n={});for(var i=0,o=t;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:t},e,n)}function o(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:t},e,n)}function s(t,e){void 0===e&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function a(t,e,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:t},e,n)}function u(t,e,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:t},e,n)}function h(t,e,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:t},e,n)}function l(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];
vendor: 6,259 bytes, line 1
1if(!n)throw new Error(r+" units is invalid");return t*n}function f(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function c(t){return 180*(t%(2*Math.PI))/Math.PI}function p(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.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},e.feature=r,e.geometry=function(t,e,r){switch(void 0===r&&(r={}),t){case"Point":return n(e).geometry;case"LineString":return o(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return u(e).geometry;case"MultiLineString":return a(e).geometry;case"MultiPolygon":return h(e).geometry;default:throw new Error(t+" is invalid")}},e.point=n,e.points=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return n(t,e)})),r)},e.polygon=i,e.polygons=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return i(t,e)})),r)},e.lineString=o,e.lineStrings=function(t,e,r){return void 0===r&&(r={}),s(t.map((function(t){return o(t,e)})),r)},e.featureCollection=s,e.multiLineString=a,e.multiPoint=u,e.multiPolygon=h,e.geometryCollection=function(t,e,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:t},e,n)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=l,e.lengthToRadians=f,e.lengthToDegrees=function(t,e){return c(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=c,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return l(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var o=e.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},31540:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(84102);function i(t,e,r){if(null!==t)for(var n,o,s,a,u,h,l,f,c=0,p=0,g=t.type,d="FeatureCollection"===g,y="Feature"===g,v=d?t.features.length:1,m=0;m<v;m++){u=(f=!!(l=d?t.features[m].geometry:y?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var x=0;x<u;x++){var b=0,w=0;if(null!==(a=f?l.geometries[x]:l)){h=a.coordinates;var _=a.type;switch(c=!r||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===e(h,p,m,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<h.length;n++){if(!1===e(h[n],p,m,b,w))return!1;p++,"MultiPoint"===_&&b++}"LineString"===_&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<h.length;n++){for(o=0;o<h[n].length-c;o++){if(!1===e(h[n][o],p,m,b,w))return!1;p++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(n=0;n<h.length;n++){for(w=0,o=0;o<h[n].length;o++){for(s=0;s<h[n][o].length-c;s++){if(!1===e(h[n][o][s],p,m,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===i(a.geometries[n],e,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length&&!1!==e(t.features[r].properties,r);r++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var r=0;r<t.features.length&&!1!==e(t.features[r],r);r++);}function a(t,e){var r,n,i,o,s,a,u,h,l,f,c=0,p="FeatureCollection"===t.type,g="Feature"===t.type,d=p?t.features.length:1;for(r=0;r<d;r++){for(a=p?t.features[r].geometry:g?t.geometry:t,h=p?t.features[r].properties:g?t.properties:{},l=p?t.features[r].bbox:g?t.bbox:void 0,f=p?t.features[r].id:g?t.id:void 0,s=(u=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=u?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,c,h,l,f))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],c,h,l,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,c,h,l,f))return!1;c++}}function u(t,e){a(t,(function(t,r,i,o,s){var a,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(n.feature(t,i,{bbox:o,id:s}),r,0)&&void 0}switch(u){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var h=0;h<t.coordinates.length;h++){var l={type:a,coordinates:t.coordinates[h]};if(!1===e(n.feature(l,i),r,h))return!1}}
1))}function h(t,e){u(t,(function(t,r,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var u,h=0,l=0,f=0;return!1!==i(t,(function(i,a,c,p,g){if(void 0===u||r>h||p>l||g>f)return u=i,h=r,l=p,f=g,void(s=0);var d=n.lineString([u,i],t.properties);if(!1===e(d,r,o,g,s))return!1;s++,u=i}))&&void 0}}}))}function l(t,e){if(!t)throw new Error("geojson is required");u(t,(function(t,r,i){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===e(n.lineString(s[a],t.properties),r,i,a))return!1}}}))}e.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},e.coordEach=i,e.coordReduce=function(t,e,r,n){var o=r;return i(t,(function(t,n,i,s,a){o=0===n&&void 0===r?t:e(o,t,n,i,s,a)}),n),o},e.featureEach=s,e.featureReduce=function(t,e,r){var n=r;return s(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.findPoint=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.coordIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":u=u||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var h=r.coordinates;switch(r.type){case"Point":return n.point(h,u,e);case"MultiPoint":return o<0&&(o=h.length+o),n.point(h[o],u,e);case"LineString":return a<0&&(a=h.length+a),n.point(h[a],u,e);case"Polygon":return s<0&&(s=h.length+s),a<0&&(a=h[s].length+a),n.point(h[s][a],u,e);case"MultiLineString":return o<0&&(o=h.length+o),a<0&&(a=h[o].length+a),n.point(h[o][a],u,e);case"MultiPolygon":return o<0&&(o=h.length+o),s<0&&(s=h[o].length+s),a<0&&(a=h[o][s].length-a),n.point(h[o][s][a],u,e)}throw new Error("geojson is invalid")},e.findSegment=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.segmentIndex||0,u=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),u=u||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":u=u||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var h=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=h.length+a-1),n.lineString([h[a],h[a+1]],u,e);case"Polygon":return s<0&&(s=h.length+s),a<0&&(a=h[s].length+a-1),n.lineString([h[s][a],h[s][a+1]],u,e);case"MultiLineString":return o<0&&(o=h.length+o),a<0&&(a=h[o].length+a-1),n.lineString([h[o][a],h[o][a+1]],u,e);case"MultiPolygon":return o<0&&(o=h.length+o),s<0&&(s=h[o].length+s),a<0&&(a=h[o][s].length-a-1),n.lineString([h[o][s][a],h[o][s][a+1]],u,e)}throw new Error("geojson is invalid")},e.flattenEach=u,e.flattenReduce=function(t,e,r){var n=r;return u(t,(function(t,i,o){n=0===i&&0===o&&void 0===r?t:e(n,t,i,o)})),n},e.geomEach=a,e.geomReduce=function(t,e,r){var n=r;return a(t,(function(t,i,o,s,a){n=0===i&&void 0===r?t:e(n,t,i,o,s,a)})),n},e.lineEach=l,e.lineReduce=function(t,e,r){var n=r;return l(t,(function(t,i,o,s){n=0===i&&void 0===r?t:e(n,t,i,o,s)})),n},e.propEach=o,e.propReduce=function(t,e,r){var n=r;return o(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.segmentEach=h,e.segmentReduce=function(t,e,r){var n=r,i=!1;return h(t,(function(t,o,s,a,u){n=!1===i&&void 0===r?t:e(n,t,o,s,a,u),i=!0})),n}},21924:function(t,e,r){"use strict";var n=r(40210),i=r(55559),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"===typeof r&&o(t,".prototype.")>-1?i(r):r}},55559:function(t,e,r){"use strict";var n=r(58612),i=r(40210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),h=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(h)try{h({},"a",{value:1})}catch(c){h=null}t.exports=function(t){var e=a(n,s,arguments);if(u&&h){var r=u(e,"length");r.configurable&&h(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var f=function(){return a(n,o,arguments)};h?h(t.exports,"apply",{value:f}):t.exports.apply=f},39278:function(){!function(){"use strict";if("undefined"!==typeof Chart){"function"!=typeof Object.assign&&(Object.assign=function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r});var t={};["pie","doughnut","polarArea","bar"].forEach((function(e){t[e]=!0})),e.prototype.setup=function(t,e){this.chart=t,this.ctx=t.ctx,this.args={},this.barTotal={};var r=t.config.options;this.options=Object.assign({position:"default",precision:0,fontSize:r.defaultFontSize,fontColor:r.defaultFontColor,fontStyle:r.defaultFontStyle,fontFamily:r.defaultFontFamily,shadowOffsetX:3,shadowOffsetY:3,shadowColor:"rgba(0,0,0,0.3)",shadowBlur:6,images:[],outsidePadding:2,textMargin:2,overlap:!0},e),"bar"===t.config.type&&(this.options.position="default",this.options.arc=!1,this.options.overlap=!0)},e.prototype.render=function(){this.labelBounds=[],this.chart.data.datasets.forEac
1h(this.renderToDataset)},e.prototype.renderToDataset=function(t,e){this.totalPercentage=0,this.total=null;var r=this.args[e];r.meta.data.forEach(function(e,n){this.renderToElement(t,r,e,n)}.bind(this))},e.prototype.renderToElement=function(t,e,r,n){if(this.shouldRenderToElement(e.meta,r)){this.percentage=null;var i=this.getLabel(t,r,n);if(i){var o=this.ctx;o.save(),o.font=Chart.helpers.fontString(this.options.fontSize,this.options.fontStyle,this.options.fontFamily);var s=this.getRenderInfo(r,i);this.drawable(r,i,s)?(o.beginPath(),o.fillStyle=this.getFontColor(t,r,n),this.renderLabel(i,s),o.restore()):o.restore()}}},e.prototype.renderLabel=function(t,e){return this.options.arc?this.renderArcLabel(t,e):this.renderBaseLabel(t,e)},e.prototype.renderBaseLabel=function(t,e){var r=this.ctx;if("object"===typeof t)r.drawImage(t,e.x-t.width/2,e.y-t.height/2,t.width,t.height);else{r.save(),r.textBaseline="top",r.textAlign="center",this.options.textShadow&&(r.shadowOffsetX=this.options.shadowOffsetX,r.shadowOffsetY=this.options.shadowOffsetY,r.shadowColor=this.options.shadowColor,r.shadowBlur=this.options.shadowBlur);for(var n=t.split("\n"),i=0;i<n.length;i++){var o=e.y-this.options.fontSize/2*n.length+this.options.fontSize*i;r.fillText(n[i],e.x,o)}r.restore()}},e.prototype.renderArcLabel=function(t,e){var r=this.ctx,n=e.radius,i=e.view;if(r.save(),r.translate(i.x,i.y),"string"===typeof t){r.rotate(e.startAngle),r.textBaseline="middle",r.textAlign="left";var o=t.split("\n"),s=0,a=[],u=0;"border"===this.options.position&&(u=(o.length-1)*this.options.fontSize/2);for(var h=0;h<o.length;++h){var l=r.measureText(o[h]);l.width>s&&(s=l.width),a.push(l.width)}for(h=0;h<o.length;++h){var f=o[h],c=(o.length-1-h)*-this.options.fontSize+u;r.save();var p=(s-a[h])/2;r.rotate(p/n);for(var g=0;g<f.length;g++){var d=f.charAt(g);l=r.measureText(d),r.save(),r.translate(0,-1*n),r.fillText(d,0,c),r.restore(),r.rotate(l.width/n)}r.restore()}}else r.rotate((i.startAngle+Math.PI/2+e.endAngle)/2),r.translate(0,-1*n),this.renderLabel(t,{x:0,y:0});r.restore()},e.prototype.shouldRenderToElement=function(t,e){return!t.hidden&&!e.hidden&&(this.options.showZero||"polarArea"===this.chart.config.type?0!==e._view.outerRadius:0!==e._view.circumference)},e.prototype.getLabel=function(t,e,r){var n;if("function"===typeof this.options.render)n=this.options.render({label:this.chart.config.data.labels[r],value:t.data[r],percentage:this.getPercentage(t,e,r),dataset:t,index:r});else switch(this.options.render){case"value":n=t.data[r];break;case"label":n=this.chart.config.data.labels[r];break;case"image":n=this.options.images[r]?this.loadImage(this.options.images[r]):"";break;default:n=this.getPercentage(t,e,r)+"%"}return"object"===typeof n?n=this.loadImage(n):null!==n&&void 0!==n&&(n=n.toString()),n},e.prototype.getFontColor=function(t,e,r){var n=this.options.fontColor;return"function"===typeof n?n=n({label:this.chart.config.data.labels[r],value:t.data[r],percentage:this.getPercentage(t,e,r),backgroundColor:t.backgroundColor[r],dataset:t,index:r}):"string"!==typeof n&&(n=n[r]||this.chart.config.options.defaultFontColor),n},e.prototype.getPercentage=function(t,e,r){if(null!==this.percentage)return this.percentage;var n;if("polarArea"===this.chart.config.type){if(null===this.total){this.total=0;for(var i=0;i<t.data.length;++i)this.total+=t.data[i]}n=t.data[r]/this.total*100}else if("bar"===this.chart.config.type){if(void 0===this.barTotal[r]){this.barTotal[r]=0;for(i=0;i<this.chart.data.datasets.length;++i)this.barTotal[r]+=this.chart.data.datasets[i].data[r]}n=t.data[r]/this.barTotal[r]*100}else n=e._view.circumference/this.chart.config.options.circumference*100;return n=parseFloat(n.toFixed(this.options.precision)),this.options.showActualPercentages||("bar"===this.chart.config.type&&(this.totalPercentage=this.barTotalPercentage[r]||0),this.totalPercentage+=n,this.totalPercentage>100&&(n-=this.totalPercentage-100,n=parseFloat(n.toFixed(this.options.precision))),"bar"===this.chart.config.type&&(this.barTotalPercentage[r]=this.totalPercentage)),this.percentage=n,n},e.prototype.getRenderInfo=function(t,e){return"bar"===this.chart.config.type?this.getBarRenderInfo(t,e):this.options.arc?this.getArcRenderInfo(t,e):this.getBaseRenderInfo(t,e)},e.prototype.getBaseRenderInfo=function(t,e){if("outside"===this.options.position||"border"===this.options.position){var r,n,i=t._view,o=i.startAngle+(i.endAngle-i.startAngle)/2,s=i.outerRadius/2;if("border"===this.options.position?n=(i.outerRadius-s)/2+s:"outside"===this.options.position&&(n=i.outerRadius-s+s+this.options.textMargin),r={x:i.x+Math.cos(o)*n,y:i.y+Math.sin(o)*n},"outside"===this.options.position){var a=this.options.textMargin+this.measureLabel(e).width/2;r.x+=r.x<i.x?-a:a}return r}return t.tooltipPosition()},e.prototype.getArcRenderInfo=function(t,e){var r,n=t._view;r="outside"===this.options.position?n.outerRadius+this.options.fontSize+this.options.textMargin:"border"===this.options.position?(n.outerRadius/2+n.outerRadius)/2:(n.innerRadius+n.outerRadius)/2;var i=n.startAngle,o=n.endAngle,s=o-i;return i+=Math.PI/2,{radius:r,startAngle:i+=((o+=Math.PI/2)-(this.measureLabel(e).width/r+i))/2,endAngle:o,totalAngle:s,view:n}},e.prototype.getBarRenderInfo=function(t,e){var r=t.tooltipPosition();return r.y-=this.measureLabel(e).height/2+this.options.textMargin,r},e.prototype.drawable=function(t,e,r){if(this.options.overlap)return!0;
1if(this.options.arc)return r.endAngle-r.startAngle<=r.totalAngle;var n=this.measureLabel(e),i=r.x-n.width/2,o=r.x+n.width/2,s=r.y-n.height/2,a=r.y+n.height/2;return"outside"===this.options.renderInfo?this.outsideInRange(i,o,s,a):t.inRange(i,s)&&t.inRange(i,a)&&t.inRange(o,s)&&t.inRange(o,a)},e.prototype.outsideInRange=function(t,e,r,n){for(var i=this.labelBounds,o=0;o<i.length;++o){for(var s=i[o],a=[[t,r],[t,n],[e,r],[e,n]],u=0;u<a.length;++u){var h=a[u][0],l=a[u][1];if(h>=s.left&&h<=s.right&&l>=s.top&&l<=s.bottom)return!1}a=[[s.left,s.top],[s.left,s.bottom],[s.right,s.top],[s.right,s.bottom]];for(u=0;u<a.length;++u){h=a[u][0],l=a[u][1];if(h>=t&&h<=e&&l>=r&&l<=n)return!1}}return i.push({left:t,right:e,top:r,bottom:n}),!0},e.prototype.measureLabel=function(t){if("object"===typeof t)return{width:t.width,height:t.height};for(var e=0,r=t.split("\n"),n=0;n<r.length;++n){var i=this.ctx.measureText(r[n]);i.width>e&&(e=i.width)}return{width:e,height:this.options.fontSize*r.length}},e.prototype.loadImage=function(t){var e=new Image;return e.src=t.src,e.width=t.width,e.height=t.height,e},Chart.plugins.register({id:"labels",beforeDatasetsUpdate:function(r,n){if(t[r.config.type]){Array.isArray(n)||(n=[n]);var i=n.length;r._labels&&i===r._labels.length||(r._labels=n.map((function(){return new e})));for(var o=!1,s=0,a=0;a<i;++a){var u=r._labels[a];if(u.setup(r,n[a]),"outside"===u.options.position){o=!0;var h=1.5*u.options.fontSize+u.options.outsidePadding;h>s&&(s=h)}}o&&(r.chartArea.top+=s,r.chartArea.bottom-=s)}},afterDatasetUpdate:function(e,r,n){t[e.config.type]&&e._labels.forEach((function(t){t.args[r.index]=r}))},beforeDraw:function(e){t[e.config.type]&&e._labels.forEach((function(t){t.barTotalPercentage={}}))},afterDatasetsDraw:function(e){t[e.config.type]&&e._labels.forEach((function(t){t.render()}))}})}else console.error("Can not find Chart object.");function e(){this.renderToDataset=this.renderToDataset.bind(this)}}()},72273:function(t,e,r){"use strict";var n=r(81662),i=r(43842),o=r(26960),s=r(88639).orient2d;function a(t,e,r){e=Math.max(0,void 0===e?2:e),r=r||0;var i=function(t){for(var e=t[0],r=t[0],n=t[0],i=t[0],s=0;s<t.length;s++){var a=t[s];a[0]<e[0]&&(e=a),a[0]>n[0]&&(n=a),a[1]<r[1]&&(r=a),a[1]>i[1]&&(i=a)}var u=[e,r,n,i],h=u.slice();for(s=0;s<t.length;s++)o(t[s],u)||h.push(t[s]);return function(t){t.sort(x);for(var e=[],r=0;r<t.length;r++){for(;e.length>=2&&p(e[e.length-2],e[e.length-1],t[r])<=0;)e.pop();e.push(t[r])}for(var n=[],i=t.length-1;i>=0;i--){for(;n.length>=2&&p(n[n.length-2],n[n.length-1],t[i])<=0;)n.pop();n.push(t[i])}return n.pop(),e.pop(),e.concat(n)}(h)}(t),s=new n(16);s.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},s.compareMinX=function(t,e){return t[0]-e[0]},s.compareMinY=function(t,e){return t[1]-e[1]},s.load(t);for(var a,h=[],l=0;l<i.length;l++){var f=i[l];s.remove(f),a=d(f,a),h.push(a)}var c=new n(16);for(l=0;l<h.length;l++)c.insert(g(h[l]));for(var v=e*e,m=r*r;h.length;){var b=h.shift(),w=b.p,_=b.next.p,E=y(w,_);if(!(E<m)){var M=E/v;(f=u(s,b.prev.p,w,_,b.next.next.p,M,c))&&Math.min(y(f,w),y(f,_))<=M&&(h.push(b),h.push(d(f,b)),s.remove(f),c.remove(b),c.insert(g(b)),c.insert(g(b.next)))}}b=a;var S=[];do{S.push(b.p),b=b.next}while(b!==a);return S.push(b.p),S}function u(t,e,r,n,o,s,a){for(var u=new i([],h),f=t.data;f;){for(var p=0;p<f.children.length;p++){var g=f.children[p],d=f.leaf?v(g,r,n):l(r,n,g);d>s||u.push({node:g,dist:d})}for(;u.length&&!u.peek().node.children;){var y=u.pop(),m=y.node,x=v(m,e,r),b=v(m,n,o);if(y.dist<x&&y.dist<b&&c(r,m,a)&&c(n,m,a))return m}(f=u.pop())&&(f=f.node)}return null}function h(t,e){return t.dist-e.dist}function l(t,e,r){if(f(t,r)||f(e,r))return 0;var n=m(t[0],t[1],e[0],e[1],r.minX,r.minY,r.maxX,r.minY);if(0===n)return 0;var i=m(t[0],t[1],e[0],e[1],r.minX,r.minY,r.minX,r.maxY);if(0===i)return 0;var o=m(t[0],t[1],e[0],e[1],r.maxX,r.minY,r.maxX,r.maxY);if(0===o)return 0;var s=m(t[0],t[1],e[0],e[1],r.minX,r.maxY,r.maxX,r.maxY);return 0===s?0:Math.min(n,i,o,s)}function f(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function c(t,e,r){for(var n,i,o,s,a=Math.min(t[0],e[0]),u=Math.min(t[1],e[1]),h=Math.max(t[0],e[0]),l=Math.max(t[1],e[1]),f=r.search({minX:a,minY:u,maxX:h,maxY:l}),c=0;c<f.length;c++)if(n=f[c].p,i=f[c].next.p,o=t,n!==(s=e)&&i!==o&&p(n,i,o)>0!==p(n,i,s)>0&&p(o,s,n)>0!==p(o,s,i)>0)return!1;return!0}function p(t,e,r){return s(t[0],t[1],e[0],e[1],r[0],r[1])}function g(t){var e=t.p,r=t.next.p;return t.minX=Math.min(e[0],r[0]),t.minY=Math.min(e[1],r[1]),t.maxX=Math.max(e[0],r[0]),t.maxY=Math.max(e[1],r[1]),t}function d(t,e){var r={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(r.next=e.next,r.prev=e,e.next.prev=r,e.next=r):(r.prev=r,r.next=r),r}function y(t,e){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function v(t,e,r){var n=e[0],i=e[1],o=r[0]-n,s=r[1]-i;
1if(0!==o||0!==s){var a=((t[0]-n)*o+(t[1]-i)*s)/(o*o+s*s);a>1?(n=r[0],i=r[1]):a>0&&(n+=o*a,i+=s*a)}return(o=t[0]-n)*o+(s=t[1]-i)*s}function m(t,e,r,n,i,o,s,a){var u,h,l,f,c=r-t,p=n-e,g=s-i,d=a-o,y=t-i,v=e-o,m=c*c+p*p,x=c*g+p*d,b=g*g+d*d,w=c*y+p*v,_=g*y+d*v,E=m*b-x*x,M=E,S=E;0===E?(h=0,M=1,f=_,S=b):(f=m*_-x*w,(h=x*_-b*w)<0?(h=0,f=_,S=b):h>M&&(h=M,f=_+x,S=b)),f<0?(f=0,-w<0?h=0:-w>m?h=M:(h=-w,M=m)):f>S&&(f=S,-w+x<0?h=0:-w+x>m?h=M:(h=-w+x,M=m));var P=(1-(l=0===f?0:f/S))*i+l*s-((1-(u=0===h?0:h/M))*t+u*r),A=(1-l)*o+l*a-((1-u)*e+u*n);return P*P+A*A}function x(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}i.default&&(i=i.default),t.exports=a,t.exports.default=a},81662:function(t){t.exports=function(){"use strict";function t(t,n,i,o,s){!function t(r,n,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=n-i+1,h=Math.log(a),l=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*l*(a-l)/a)*(u-a/2<0?-1:1);t(r,n,Math.max(i,Math.floor(n-u*l/a+f)),Math.min(o,Math.floor(n+(a-u)*l/a+f)),s)}var c=r[n],p=i,g=o;for(e(r,i,n),s(r[o],c)>0&&e(r,i,o);p<g;){for(e(r,p,g),p++,g--;s(r[p],c)<0;)p++;for(;s(r[g],c)>0;)g--}0===s(r[i],c)?e(r,i,g):e(r,++g,o),g<=n&&(i=g+1),n<=g&&(o=g-1)}}(t,n,i||0,o||t.length-1,s||r)}function e(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function r(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n<e.length;n++)if(r(t,e[n]))return n;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,r,n,i){i||(i=g(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<r;o++){var s=t.children[o];a(i,t.leaf?n(s):s)}return i}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function l(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(e,r,n,i,o){for(var s=[r,n];s.length;)if(!((n=s.pop())-(r=s.pop())<=i)){var a=r+Math.ceil((n-r)/i/2)*i;t(e,a,r,n,o),s.push(r,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,r=[];if(!p(t,e))return r;for(var n=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?n(s):s;p(t,a)&&(e.leaf?r.push(s):c(t,a)?this._all(s,r):i.push(s))}e=i.pop()}return r},n.prototype.collides=function(t){var e=this.data;if(!p(t,e))return!1;for(var r=[];e;){for(var n=0;n<e.children.length;n++){var i=e.children[n],o=e.leaf?this.toBBox(i):i;if(p(t,o)){if(e.leaf||c(t,o))return!0;r.push(i)}}e=r.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=g([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var r,n,o,s=this.data,a=this.toBBox(t),u=[],h=[];s||u.length;){if(s||(s=u.pop(),n=u[u.length-1],r=h.pop(),o=!0),s.leaf){var l=i(t,s.children,e);if(-1!==l)return s.children.splice(l,1),u.push(s),this._condense(u),this}o||s.leaf||!c(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(u.push(s),h.push(r),r=0,n=s,s=s.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},n.prototype._build=function(t,e,r,n){var i,s=r-e+1,a=this._maxEntries;if(s<=a)return o(i=g(t.slice(e,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(i=g([])).leaf=!1,i.height=n;var u=Math.ceil(s/a),h=u*Math.ceil(Math.sqrt(a));d(t,e,r,h,this.compareMinX);for(var l=e;l<=r;l+=h){var f=Math.min(l+h-1,r);d(t,l,f,u,this.compareMinY);for(var c=l;c<=f;c+=u){var p=Math.min(c+u-1,f);i.children.push(this._build(t,c,p,n-1))}}return o(i,this.toBBox),i},n.prototype._chooseSubtree=function(t,e,r,n){for(;n.push(e),!e.leaf&&n.length-1!==r;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var u=e.children[a],h=l(u),f=(c=t,p=u,(Math.max(p.maxX,c.maxX)-Math.min(p.minX,c.minX))*(Math.max(p.maxY,c.maxY)-Math.min(p.minY,c.minY))-h);f<o?(o=f,i=h<i?h:i,s=u):f===o&&h<i&&(i=h,s=u)}e=s||e.children[0]}var c,p;return e},n.prototype._insert=function(t,e,r){var n=r?t:this.toBBox(t),i=[],o=this._chooseSubtree(n,this.data,e,i);for(o.children.push(t),a(o,n);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(n,i,e)},n.prototype._split=function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var s=this._chooseSplitIndex(r,i,n),a=g(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,o(r,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},n.prototype._splitRoot=function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,r){for(var n,i,o,a,u,h,f,c=1/0,p=1/0,g=e;g<=r-e;g++){var d=s(t,0,g,this.toBBox),y=s(t,g,r,this.toBBox),v=(i=d,o=y,a=void 0,u=void 0,h=void 0,f=void 0,a=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),h=Math.min(i.maxX,o.maxX),f=Math.min(i.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,f-u)),m=l(d)+l(y);v<c?(c=v,n=g,p=m<p?m:p):v===c&&m<p&&(p=m,n=g)}return n||r-e},n.prototype._chooseSplitAxis=function(t,e,r){var n=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,r,n)<this._allDistMargin(t,e,r,i)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,r,n){t.children.sort(n);for(var i=this.toBBox,o=s(t,0,e,i),u=s(t,r-e,r,i),h=f(o)+f(u),l=e;l<r-e;l++){var c=t.children[l];a(o,t.leaf?i(c):c),h+=f(o)}for(var p=r-e-1;p>=e;p--){var g=t.children[p];a(u,t.leaf?i(g):g),h+=f(u)}return h},n.prototype._adjustParentBBoxes=function(t,e,r){for(var n=r;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()},10251:function(t,e,r){var n=r(82215),i=r(82584),o=r(20609),s=r(98420),a=r(2847),u=r(18923),h=Date.prototype.getTime;function l(t,e,r){var p=r||{};return!!(p.strict?o(t,e):t===e)||(!t||!e||"object"!==typeof t&&"object"!==typeof e?p.strict?o(t,e):t==e:function(t,e,r){var o,p;if(typeof t!==typeof e)return!1;if(f(t)||f(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t)!==i(e))return!1;var g=s(t),d=s(e);if(g!==d)return!1;if(g||d)return t.source===e.source&&a(t)===a(e);if(u(t)&&u(e))return h.call(t)===h.call(e);var y=c(t),v=c(e);if(y!==v)return!1;if(y||v){if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}if(typeof t!==typeof e)return!1;try{var m=n(t),x=n(e)}catch(b){return!1}if(m.length!==x.length)return!1;for(m.sort(),x.sort(),o=m.length-1;o>=0;o--)if(m[o]!=x[o])return!1;for(o=m.length-1;o>=0;o--)if(!l(t[p=m[o]],e[p],r))return!1;return!0}(t,e,p))}function f(t){return null===t||void 0===t}function c(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&("function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0]))}t.exports=l},4289:function(t,e,r){"use strict";var n=r(82215),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,u=r(31044)(),h=a&&u,l=function(t,e,r,n){var i;(!(e in t)||"function"===typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(h?a(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)l(t,o[a],e[o[a]],r[o[a]])};f.supportsDescriptors=!!h,t.exports=f},68317:function(t){function e(t,e,r,n){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.cluster
1s=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,r,n)}e.prototype.run=function(t,e,r,n){this._init(t,e,r,n);for(var i=0;i<this._datasetLength;i++)if(1!==this._visited[i]){this._visited[i]=1;var o=this._regionQuery(i);if(o.length<this.minPts)this.noise.push(i);else{var s=this.clusters.length;this.clusters.push([]),this._addToCluster(i,s),this._expandCluster(s,o)}}return this.clusters},e.prototype._init=function(t,e,r,n){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this.noise=[],this._datasetLength=t.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}e&&(this.epsilon=e),r&&(this.minPts=r),n&&(this.distance=n)},e.prototype._expandCluster=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];if(1!==this._visited[n]){this._visited[n]=1;var i=this._regionQuery(n);i.length>=this.minPts&&(e=this._mergeArrays(e,i))}1!==this._assigned[n]&&this._addToCluster(n,t)}},e.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},e.prototype._regionQuery=function(t){for(var e=[],r=0;r<this._datasetLength;r++){this.distance(this.dataset[t],this.dataset[r])<this.epsilon&&e.push(r)}return e},e.prototype._mergeArrays=function(t,e){for(var r=e.length,n=0;n<r;n++){var i=e[n];t.indexOf(i)<0&&t.push(i)}return t},e.prototype._euclideanDistance=function(t,e){for(var r=0,n=Math.min(t.length,e.length);n--;)r+=(t[n]-e[n])*(t[n]-e[n]);return Math.sqrt(r)},t.exports&&(t.exports=e)},63781:function(t){function e(t,e,r){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(t,e,r)}e.prototype.init=function(t,e,r){this.assignments=[],this.centroids=[],"undefined"!==typeof t&&(this.dataset=t),"undefined"!==typeof e&&(this.k=e),"undefined"!==typeof r&&(this.distance=r)},e.prototype.run=function(t,e){this.init(t,e);for(var r=this.dataset.length,n=0;n<this.k;n++)this.centroids[n]=this.randomCentroid();for(var i=!0;i;){i=this.assign();for(var o=0;o<this.k;o++){for(var s=new Array(l),a=0,u=0;u<l;u++)s[u]=0;for(var h=0;h<r;h++){var l=this.dataset[h].length;if(o===this.assignments[h]){for(u=0;u<l;u++)s[u]+=this.dataset[h][u];a++}}if(a>0){for(u=0;u<l;u++)s[u]/=a;this.centroids[o]=s}else this.centroids[o]=this.randomCentroid(),i=!0}}return this.getClusters()},e.prototype.randomCentroid=function(){var t,e,r=this.dataset.length-1;do{e=Math.round(Math.random()*r),t=this.dataset[e]}while(this.centroids.indexOf(t)>=0);return t},e.prototype.assign=function(){for(var t,e=!1,r=this.dataset.length,n=0;n<r;n++)(t=this.argmin(this.dataset[n],this.centroids,this.distance))!=this.assignments[n]&&(this.assignments[n]=t,e=!0);return e},e.prototype.getClusters=function(){for(var t,e=new Array(this.k),r=0;r<this.assignments.length;r++)"undefined"===typeof e[t=this.assignments[r]]&&(e[t]=[]),e[t].push(r);return e},e.prototype.argmin=function(t,e,r){for(var n,i=Number.MAX_VALUE,o=0,s=e.length,a=0;a<s;a++)(n=r(t,e[a]))<i&&(i=n,o=a);return o},e.prototype.distance=function(t,e){for(var r=0,n=Math.min(t.length,e.length);n--;){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)},t.exports&&(t.exports=e)},73763:function(t,e,r){if(t.exports)var n=r(57985);function i(t,e,r,n){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(t,e,r,n)}i.prototype.run=function(t,e,r,i){this._init(t,e,r,i);for(var o=0,s=this.dataset.length;o<s;o++)if(1!==this._processed[o]){this._processed[o]=1,this.clusters.push([o]);
1var a=this.clusters.length-1;this._orderedList.push(o);var u=new n(null,null,"asc"),h=this._regionQuery(o);void 0!==this._distanceToCore(o)&&(this._updateQueue(o,h,u),this._expandCluster(a,u))}return this.clusters},i.prototype.getReachabilityPlot=function(){for(var t=[],e=0,r=this._orderedList.length;e<r;e++){var n=this._orderedList[e],i=this._reachability[n];t.push([n,i])}return t},i.prototype._init=function(t,e,r,n){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}e&&(this.epsilon=e),r&&(this.minPts=r),n&&(this.distance=n)},i.prototype._updateQueue=function(t,e,r){var n=this;this._coreDistance=this._distanceToCore(t),e.forEach((function(e){if(void 0===n._processed[e]){var i=n.distance(n.dataset[t],n.dataset[e]),o=Math.max(n._coreDistance,i);void 0===n._reachability[e]?(n._reachability[e]=o,r.insert(e,o)):o<n._reachability[e]&&(n._reachability[e]=o,r.remove(e),r.insert(e,o))}}))},i.prototype._expandCluster=function(t,e){for(var r=e.getElements(),n=0,i=r.length;n<i;n++){var o=r[n];if(void 0===this._processed[o]){var s=this._regionQuery(o);this._processed[o]=1,this.clusters[t].push(o),this._orderedList.push(o),void 0!==this._distanceToCore(o)&&(this._updateQueue(o,s,e),this._expandCluster(t,e))}}},i.prototype._distanceToCore=function(t){for(var e=this.epsilon,r=0;r<e;r++){if(this._regionQuery(t,r).length>=this.minPts)return r}},i.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var r=[],n=0,i=this.dataset.length;n<i;n++)this.distance(this.dataset[t],this.dataset[n])<e&&r.push(n);return r},i.prototype._euclideanDistance=function(t,e){for(var r=0,n=Math.min(t.length,e.length);n--;)r+=(t[n]-e[n])*(t[n]-e[n]);return Math.sqrt(r)},t.exports&&(t.exports=i)},57985:function(t){function e(t,e,r){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,r)}e.prototype.insert=function(t,e){for(var r=this._queue.length,n=r;n--;){var i=this._priorities[n];"desc"===this._sorting?e>i&&(r=n):e<i&&(r=n)}this._insertAt(t,e,r)},e.prototype.remove=function(t){for(var e=this._queue.length;e--;){if(t===this._queue[e]){this._queue.splice(e,1),this._priorities.splice(e,1);break}}},e.prototype.forEach=function(t){this._queue.forEach(t)},e.prototype.getElements=function(){return this._queue},e.prototype.getElementPriority=function(t){return this._priorities[t]},e.prototype.getPriorities=function(){return this._priorities},e.prototype.getElementsWithPriorities=function(){for(var t=[],e=0,r=this._queue.length;e<r;e++)t.push([this._queue[e],this._priorities[e]]);return t},e.prototype._init=function(t,e,r){if(t&&e){if(this._queue=[],this._priorities=[],t.length!==e.length)throw new Error("Arrays must have the same length");for(var n=0;n<t.length;n++)this.insert(t[n],e[n])}r&&(this._sorting=r)},e.prototype._insertAt=function(t,e,r){this._queue.length===r?(this._queue.push(t),this._priorities.push(e)):(this._queue.splice(r,0,t),this._priorities.splice(r,0,e))},t.exports&&(t.exports=e)},52606:function(t,e,r){t.exports&&(t.exports={DBSCAN:r(68317),KMEANS:r(63781),OPTICS:r(73763),PriorityQueue:r(57985)})},9187:function(t){"use strict";function e(t,e,n){n=n||2;var o,s,a,u,f,c,g,d=e&&e.length,y=d?e[0]*n:t.length,v=r(t,0,y,n,!0),m=[];if(!v||v.next===v.prev)return m;if(d&&(v=function(t,e,n,i){var o,s,a,u=[];for(o=0,s=e.length;o<s;o++)(a=r(t,e[o]*i,o<s-1?e[o+1]*i:t.length,i,!1))===a.next&&(a.steiner=!0),u.push(p(a));for(u.sort(h),o=0;o<u.length;o++)n=l(u[o],n);return n}(t,e,v,n)),t.length>80*n){o=a=t[0],s=u=t[1];for(var x=n;x<y;x+=n)(f=t[x])<o&&(o=f),(c=t[x+1])<s&&(s=c),f>a&&(a=f),c>u&&(u=c);g=0!==(g=Math.max(a-o,u-s))?32767/g:0}return i(v,m,n,o,s,g,0),m}function r(t,e,r,n,i){var o,s;if(i===P(t,e,r,n)>0)for(o=e;o<r;o+=n)s=E(o,t[o],t[o+1],s);else for(o=r-n;o>=e;o-=n)s=E(o,t[o],t[o+1],s);return s&&v(s,s.next)&&(M(s),s=s.next),s}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,h,l,f,p){if(t){!p&&f&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=c(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,s,a,u,h=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,n=r,a=0,e=0;e<h&&(a++,n=n.nextZ);e++);for(u=h;a>0||u>0&&n;)0!==a&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,h*=2}while(s>1)}(i)}(t,h,l,f);for(var g,d,y=t;t.prev!==t.next;
vendor: 3,087 bytes, line 1
1)if(g=t.prev,d=t.next,f?s(t,h,l,f):o(t))e.push(g.i/r|0),e.push(t.i/r|0),e.push(d.i/r|0),M(t),t=d.next,y=d.next;else if((t=d)===y){p?1===p?i(t=a(n(t),e,r),e,r,h,l,f,2):2===p&&u(t,e,r,h,l,f):i(n(t),e,r,h,l,f,1);break}}}function o(t){var e=t.prev,r=t,n=t.next;if(y(e,r,n)>=0)return!1;for(var i=e.x,o=r.x,s=n.x,a=e.y,u=r.y,h=n.y,l=i<o?i<s?i:s:o<s?o:s,f=a<u?a<h?a:h:u<h?u:h,c=i>o?i>s?i:s:o>s?o:s,p=a>u?a>h?a:h:u>h?u:h,d=n.next;d!==e;){if(d.x>=l&&d.x<=c&&d.y>=f&&d.y<=p&&g(i,a,o,u,s,h,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function s(t,e,r,n){var i=t.prev,o=t,s=t.next;if(y(i,o,s)>=0)return!1;for(var a=i.x,u=o.x,h=s.x,l=i.y,f=o.y,p=s.y,d=a<u?a<h?a:h:u<h?u:h,v=l<f?l<p?l:p:f<p?f:p,m=a>u?a>h?a:h:u>h?u:h,x=l>f?l>p?l:p:f>p?f:p,b=c(d,v,e,r,n),w=c(m,x,e,r,n),_=t.prevZ,E=t.nextZ;_&&_.z>=b&&E&&E.z<=w;){if(_.x>=d&&_.x<=m&&_.y>=v&&_.y<=x&&_!==i&&_!==s&&g(a,l,u,f,h,p,_.x,_.y)&&y(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,E.x>=d&&E.x<=m&&E.y>=v&&E.y<=x&&E!==i&&E!==s&&g(a,l,u,f,h,p,E.x,E.y)&&y(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;_&&_.z>=b;){if(_.x>=d&&_.x<=m&&_.y>=v&&_.y<=x&&_!==i&&_!==s&&g(a,l,u,f,h,p,_.x,_.y)&&y(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;E&&E.z<=w;){if(E.x>=d&&E.x<=m&&E.y>=v&&E.y<=x&&E!==i&&E!==s&&g(a,l,u,f,h,p,E.x,E.y)&&y(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function a(t,e,r){var i=t;do{var o=i.prev,s=i.next.next;!v(o,s)&&m(o,i,i.next,s)&&w(o,s)&&w(s,o)&&(e.push(o.i/r|0),e.push(i.i/r|0),e.push(s.i/r|0),M(i),M(i.next),i=t=s),i=i.next}while(i!==t);return n(i)}function u(t,e,r,o,s,a){var u=t;do{for(var h=u.next.next;h!==u.prev;){if(u.i!==h.i&&d(u,h)){var l=_(u,h);return u=n(u,u.next),l=n(l,l.next),i(u,e,r,o,s,a,0),void i(l,e,r,o,s,a,0)}h=h.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function l(t,e){var r=function(t,e){var r,n=e,i=t.x,o=t.y,s=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>s&&(s=a,r=n.x<n.next.x?n:n.next,a===i))return r}n=n.next}while(n!==e);if(!r)return null;var u,h=r,l=r.x,c=r.y,p=1/0;n=r;do{i>=n.x&&n.x>=l&&i!==n.x&&g(o<c?i:s,o,l,c,o<c?s:i,o,n.x,n.y)&&(u=Math.abs(o-n.y)/(i-n.x),w(n,t)&&(u<p||u===p&&(n.x>r.x||n.x===r.x&&f(r,n)))&&(r=n,p=u)),n=n.next}while(n!==h);return r}(t,e);if(!r)return e;var i=_(r,t);return n(i,i.next),n(r,r.next)}function f(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function c(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function g(t,e,r,n,i,o,s,a){return(i-s)*(e-a)>=(t-s)*(o-a)&&(t-s)*(n-a)>=(r-s)*(e-a)&&(r-s)*(o-a)>=(i-s)*(n-a)}function d(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&m(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!==r.next.y>
1o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||v(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,r,n){var i=b(y(t,e,r)),o=b(y(t,e,n)),s=b(y(r,n,t)),a=b(y(r,n,e));return i!==o&&s!==a||(!(0!==i||!x(t,r,e))||(!(0!==o||!x(t,n,e))||(!(0!==s||!x(r,t,n))||!(0!==a||!x(r,e,n)))))}function x(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function b(t){return t>0?1:t<0?-1:0}function w(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function _(t,e){var r=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function E(t,e,r,n){var i=new S(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,r,n){for(var i=0,o=e,s=r-n;o<r;o+=n)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}t.exports=e,t.exports.default=e,e.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,s=Math.abs(P(t,0,o,r));if(i)for(var a=0,u=e.length;a<u;a++){var h=e[a]*r,l=a<u-1?e[a+1]*r:t.length;s-=Math.abs(P(t,h,l,r))}var f=0;for(a=0;a<n.length;a+=3){var c=n[a]*r,p=n[a+1]*r,g=n[a+2]*r;f+=Math.abs((t[c]-t[g])*(t[p+1]-t[c+1])-(t[c]-t[p])*(t[g+1]-t[c+1]))}return 0===s&&0===f?0:Math.abs((f-s)/s)},e.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[i][o][s]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},17648:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";t.exports=function(t){var o=this;if("function"!==typeof o||n.call(o)!==i)throw new TypeError(e+o);for(var s,a=r.call(arguments,1),u=function(){if(this instanceof s){var e=o.apply(this,a.concat(r.call(arguments)));return Object(e)===e?e:this}return o.apply(t,a.concat(r.call(arguments)))},h=Math.max(0,o.length-a.length),l=[],f=0;f<h;f++)l.push("$"+f);if(s=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(u),o.prototype){var c=function(){};c.prototype=o.prototype,s.prototype=new c,c.prototype=null}return s}},58612:function(t,e,r){"use strict";var n=r(17648);t.exports=Function.prototype.bind||n},25972:function(t){"use strict";var e=function(){return"string"===typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(i){r=null}e.functionsHaveConfigurableNames=function(){if(!e()||!r)return!1;var t=r((function(){}),"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"===typeof n&&""!==function(){}.bind().name},t.exports=e},29657:function(t,e,r){var n=r(10251),i=function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:a};function o(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function s(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function a(t,e){return n(t,e,{strict:!0})}i.prototype.compare=function(t,e){if(t.type!==e.type||!s(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,0,!1);case"Polygon":return this.comparePolygon(t,e);
1case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var r=this,n=o(t),i=o(e);return n.every((function(t){return this.some((function(e){return r.compare(t,e)}))}),i)}}return!1},i.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r].toFixed(this.precision)!==e[r].toFixed(this.precision))return!1;return!0},i.prototype.compareLine=function(t,e,r,n){if(!s(t,e))return!1;var i=this.pseudoNode?t:this.removePseudo(t),o=this.pseudoNode?e:this.removePseudo(e);if(!n||this.compareCoord(i[0],o[0])||(o=this.fixStartIndex(o,i))){var a=this.compareCoord(i[r],o[r]);return this.direction||a?this.comparePath(i,o):!!this.compareCoord(i[r],o[o.length-(1+r)])&&this.comparePath(i.slice().reverse(),o)}},i.prototype.fixStartIndex=function(t,e){for(var r,n=-1,i=0;i<t.length;i++)if(this.compareCoord(t[i],e[0])){n=i;break}return n>=0&&(r=[].concat(t.slice(n,t.length),t.slice(1,n+1))),r},i.prototype.comparePath=function(t,e){var r=this;return t.every((function(t,e){return r.compareCoord(t,this[e])}),e)},i.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var r=t.coordinates.slice(1,t.coordinates.length),n=e.coordinates.slice(1,e.coordinates.length),i=this;return r.every((function(t){return this.some((function(e){return i.compareLine(t,e,1,!0)}))}),n)}return!1},i.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},i.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},i.prototype.removePseudo=function(t){return t},t.exports=i},51787:function(t,e,r){var n=r(24056),i=r(84102),o=r(31540),s=r(9705).Z,a=o.featureEach,u=(o.coordEach,i.polygon,i.featureCollection);function h(t){var e=new n(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),n.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})),n.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),n.prototype.remove.call(this,t,e)},e.clear=function(){return n.prototype.clear.call(this)},e.search=function(t){var e=n.prototype.search.call(this,this.toBBox(t));return u(e)},e.collides=function(t){return n.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=n.prototype.all.call(this);return u(t)},e.toJSON=function(){return n.prototype.toJSON.call(this)},e.fromJSON=function(t){return n.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=s(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=h,t.exports.default=h},24056:function(t){t.exports=function(){"use strict";function t(t,n,i,o,s){!function t(r,n,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=n-i+1,h=Math.log(a),l=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*l*(a-l)/a)*(u-a/2<0?-1:1);t(r,n,Math.max(i,Math.floor(n-u*l/a+f)),Math.min(o,Math.floor(n+(a-u)*l/a+f)),s)}var c=r[n],p=i,g=o;for(e(r,i,n),s(r[o],c)>0&&e(r,i,o);p<g;){for(e(r,p,g),p++,g--;s(r[p],c)<0;)p++;for(;s(r[g],c)>0;)g--}0===s(r[i],c)?e(r,i,g):e(r,++g,o),g<=n&&(i=g+1),n<=g&&(o=g-1)}}(t,n,i||0,o||t.length-1,s||r)}function e(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function r(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n<e.length;n++)if(r(t,e[n]))return n;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,r,n,i){i||(i=g(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<r;o++){var s=t.children[o];a(i,t.leaf?n(s):s)}return i}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}
vendor: 6,746 bytes, line 1
1function l(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(e,r,n,i,o){for(var s=[r,n];s.length;)if(!((n=s.pop())-(r=s.pop())<=i)){var a=r+Math.ceil((n-r)/i/2)*i;t(e,a,r,n,o),s.push(r,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,r=[];if(!p(t,e))return r;for(var n=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?n(s):s;p(t,a)&&(e.leaf?r.push(s):c(t,a)?this._all(s,r):i.push(s))}e=i.pop()}return r},n.prototype.collides=function(t){var e=this.data;if(!p(t,e))return!1;for(var r=[];e;){for(var n=0;n<e.children.length;n++){var i=e.children[n],o=e.leaf?this.toBBox(i):i;if(p(t,o)){if(e.leaf||c(t,o))return!0;r.push(i)}}e=r.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=g([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var r,n,o,s=this.data,a=this.toBBox(t),u=[],h=[];s||u.length;){if(s||(s=u.pop(),n=u[u.length-1],r=h.pop(),o=!0),s.leaf){var l=i(t,s.children,e);if(-1!==l)return s.children.splice(l,1),u.push(s),this._condense(u),this}o||s.leaf||!c(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(u.push(s),h.push(r),r=0,n=s,s=s.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},n.prototype._build=function(t,e,r,n){var i,s=r-e+1,a=this._maxEntries;if(s<=a)return o(i=g(t.slice(e,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(i=g([])).leaf=!1,i.height=n;var u=Math.ceil(s/a),h=u*Math.ceil(Math.sqrt(a));d(t,e,r,h,this.compareMinX);for(var l=e;l<=r;l+=h){var f=Math.min(l+h-1,r);d(t,l,f,u,this.compareMinY);for(var c=l;c<=f;c+=u){var p=Math.min(c+u-1,f);i.children.push(this._build(t,c,p,n-1))}}return o(i,this.toBBox),i},n.prototype._chooseSubtree=function(t,e,r,n){for(;n.push(e),!e.leaf&&n.length-1!==r;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var u=e.children[a],h=l(u),f=(c=t,p=u,(Math.max(p.maxX,c.maxX)-Math.min(p.minX,c.minX))*(Math.max(p.maxY,c.maxY)-Math.min(p.minY,c.minY))-h);f<o?(o=f,i=h<i?h:i,s=u):f===o&&h<i&&(i=h,s=u)}e=s||e.children[0]}var c,p;return e},n.prototype._insert=function(t,e,r){var n=r?t:this.toBBox(t),i=[],o=this._chooseSubtree(n,this.data,e,i);for(o.children.push(t),a(o,n);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(n,i,e)},n.prototype._split=function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var s=this._chooseSplitIndex(r,i,n),a=g(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,o(r,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},n.prototype._splitRoot=function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,r){for(var n,i,o,a,u,h,f,c=1/0,p=1/0,g=e;g<=r-e;g++){var d=s(t,0,g,this.toBBox),y=s(t,g,r,this.toBBox),v=(i=d,o=y,a=void 0,u=void 0,h=void 0,f=void 0,a=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),h=Math.min(i.maxX,o.maxX),f=Math.min(i.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,f-u)),m=l(d)+l(y);v<c?(c=v,n=g,p=m<p?m:p):v===c&&m<p&&(p=m,n=g)}return n||r-e},n.prototype._chooseSplitAxis=function(t,e,r){var n=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,r,n)<this._allDistMargin(t,e,r,i)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,r,n){t.children.sort(n);for(var i=this.toBBox,o=s(t,0,e,i),u=s(t,r-e,r,i),h=f(o)+f(u),l=e;l<r-e;l++){var c=t.children[l];a(o,t.leaf?i(c):c),h+=f(o)}for(var p=r-e-1;p>=e;p--){var g=t.children[p];a(u,t.leaf?i(g):g),h+=f(u)}return h},n.prototype._adjustParentBBoxes=function(t,e,r){for(var n=r;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()},40210:function(t,e,r){"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(k){u=null}var h=function(){throw new s},l=u?function(){try{return h}catch(t){try{return u(arguments,"callee").get}catch(e){return h}}}():h,f=r(41405)(),c=Object.getPrototypeOf||function(t){return t.__proto__},p={},g="undefined"===typeof Uint8Array?n:c(Uint8Array),d={"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?c([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"===typeof Atomics?n:Atomics,"%BigInt%":"undefined"===typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":f?c(c([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&f?c((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?n:Promise,"%Proxy%":"undefined"===typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&f?c((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?c(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":g,"%TypeError%":s,"%Uint8Array%":"undefined"===typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet},y=function t(e){var r;if("%AsyncFunction%"===e)r=a("async function () {}");else if("%GeneratorFunction%"===e)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=a("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=c(i.prototype))}return d[e]=r,r},v={"%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"]},m=r(58612),x=r(17642),b=m.call(Function.call,Array.prototype.concat),w=m.call(Function.apply,Array.prototype.splice),_=m.call(Function.call,String.prototype.replace),E=m.call(Function.call,String.prototype.slice),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,P=function(t){var e=E(t,0,1),r=E(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return _(t,M,(function(t,e,r,i){n[n.length]=r?_(i,S,"$1"):e||t})),n},A=function(t,e){var r,n=t;if(x(v,n)&&(n="%"+(r=v[n])[0]+"%"),x(d,n)){var o=d[n];if(o===p&&(o=y(n)),"undefined"===typeof o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new s('"allowMissing" argument must be a boolean');var r=P(t),n=r.length>0?r[0]:"",o=A("%"+n+"%",e),a=o.name,h=o.value,l=!1,f=o.alias;f&&(n=f[0],w(r,b([0,1],f)));for(var c=1,p=!0;c<r.length;c+=1){var g=r[c],y=E(g,0,1),v=E(g,-1);if(('"'===y||"'"===y||"`"===y||'"'===v||"'"===v||"`"===v)&&y!==v)throw new i("property names with quotes must have matching quotes");if("constructor"!==g&&p||(l=!0),x(d,a="%"+(n+="."+g)+"%"))h=d[a];
1else if(null!=h){if(!(g in h)){if(!e)throw new s("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&c+1>=r.length){var m=u(h,g);h=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:h[g]}else p=x(h,g),h=h[g];p&&!l&&(d[a]=h)}}return h}},31044:function(t,e,r){"use strict";var n=r(40210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},41405:function(t,e,r){"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(55419);t.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},55419:function(t){"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},96410:function(t,e,r){"use strict";var n=r(55419);t.exports=function(){return n()&&!!Symbol.toStringTag}},17642:function(t,e,r){"use strict";var n=r(58612);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},82584:function(t,e,r){"use strict";var n=r(96410)(),i=r(21924)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"===typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},s=function(t){return!!o(t)||null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},18923:function(t,e,r){"use strict";var n=Date.prototype.getDay,i=Object.prototype.toString,o=r(96410)();t.exports=function(t){return"object"===typeof t&&null!==t&&(o?function(t){try{return n.call(t),!0}catch(e){return!1}}(t):"[object Date]"===i.call(t))}},98420:function(t,e,r){"use strict";var n,i,o,s,a=r(21924),u=r(96410)();if(u){n=a("Object.prototype.hasOwnProperty"),i=a("RegExp.prototype.exec"),o={};var h=function(){throw o};s={toString:h,valueOf:h},"symbol"===typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=h)}var l=a("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!==typeof t)return!1;var e=f(t,"lastIndex");if(!(e&&n(e,"value")))return!1;try{i(t,s)}catch(r){return r===o}}:function(t){return!(!t||"object"!==typeof t&&"function"!==typeof t)&&"[object RegExp]"===l(t)}},81634:function(){},24244:function(t){"use strict";var e=function(t){return t!==t};t.exports=function(t,r){return 0===t&&0===r?1/t===1/r:t===r||!(!e(t)||!e(r))}},20609:function(t,e,r){"use strict";var n=r(4289),i=r(55559),o=r(24244),s=r(75624),a=r(52281),u=i(s(),Object);n(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},75624:function(t,e,r){"use strict";var n=r(24244);t.exports=function(){return"function"===typeof Object.is?Object.is:n}},52281:function(t,e,r){"use strict";var n=r(75624),i=r(4289);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},18987:function(t,e,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(21414),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),h=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHe
1ight:!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},p=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!c["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{f(window[t])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(t){var e=null!==t&&"object"===typeof t,r="[object Function]"===o.call(t),n=s(t),a=e&&"[object String]"===o.call(t),c=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var g=h&&r;if(a&&t.length>0&&!i.call(t,0))for(var d=0;d<t.length;++d)c.push(String(d));if(n&&t.length>0)for(var y=0;y<t.length;++y)c.push(String(y));else for(var v in t)g&&"prototype"===v||!i.call(t,v)||c.push(String(v));if(u)for(var m=function(t){if("undefined"===typeof window||!p)return f(t);try{return f(t)}catch(e){return!1}}(t),x=0;x<l.length;++x)m&&"constructor"===l[x]||!i.call(t,l[x])||c.push(l[x]);return c}}t.exports=n},82215:function(t,e,r){"use strict";var n=Array.prototype.slice,i=r(21414),o=Object.keys,s=o?function(t){return o(t)}:r(18987),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(n.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},21414:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},11895:function(t){t.exports=function(t,e,r,n){var i=t[0],o=t[1],s=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var a=(n-r)/2,u=0,h=a-1;u<a;h=u++){var l=e[r+2*u+0],f=e[r+2*u+1],c=e[r+2*h+0],p=e[r+2*h+1];f>o!==p>o&&i<(c-l)*(o-f)/(p-f)+l&&(s=!s)}return s}},26960:function(t,e,r){var n=r(11895),i=r(88139);t.exports=function(t,e,r,o){return e.length>0&&Array.isArray(e[0])?i(t,e,r,o):n(t,e,r,o)},t.exports.nested=i,t.exports.flat=n},88139:function(t){t.exports=function(t,e,r,n){var i=t[0],o=t[1],s=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var a=n-r,u=0,h=a-1;u<a;h=u++){var l=e[u+r][0],f=e[u+r][1],c=e[h+r][0],p=e[h+r][1];f>o!==p>o&&i<(c-l)*(o-f)/(p-f)+l&&(s=!s)}return s}},32676:function(t,e,r){var n=r(83454);t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}var i=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return t}();function o(t,e){return t>e?1:t<e?-1:0}function s(t,e,r){for(var n=new i(null,null),o=n,s=n;;){var a=r(t,e.key);if(a<0){if(null===e.left)break;if(r(t,e.left.key)<0){var u=e.left;if(e.left=u.right,u.right=e,null===(e=u).left)break}s.left=e,s=e,e=e.left}else{if(!(a>0))break;if(null===e.right)break;if(r(t,e.right.key)>0&&(u=e.right,e.right=u.left,u.left=e,null===(e=u).right))break;o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=n.right,e.right=n.left,e}function a(t,e,r,n){var o=new i(t,e);if(null===r)return o.left=o.right=null,o;var a=n(t,(r=s(t,r,n)).key);return a<0?(o.left=r.left,o.right=r,r.left=null):a>=0&&(o.right=r.right,o.left=r,r.right=null),o}function u(t,e,r){var n=null,i=null;if(e){var o=r((e=s(t,e,r)).key,t);0===o?(n=e.left,i=e.right):o<0?(i=e.right,e.right=null,n=e):(n=e.left,e.left=null,i=e)}return{left:n,right:i}}function h(t,e,r){return null===e?t:(null===t||((e=s(t.key,e,r)).left=t),e)}function l(t,e,r,n,i){if(t){n(e+(r?"\u2514\u2500\u2500 ":"\u251c\u2500\u2500 ")+i(t)+"\n");var o=e+(r?"    ":"\u2502   ");t.left&&l(t.left,o,!1,n,i),t.right&&l(t.right,o,!0,n,i)}}var f=function(){function t(t){void 0===t&&(t=o),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=a(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var r=new i(t,e);null===this._root&&(r.left=r.right=null,this._size++,this._root=r);var n=this._comparator,o=s(t,this._root,n),a=n(t,o.key);return 0===a?this._root=o:(a<0?(r.left=o.left,r.right=o,o.left=null):a>0&&(r.right=o.right,r.left=o,o.right=null),this._size++,this._root=r),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,r){var n;return null===e?null:0===r(t,(e=s(t,e,r)).key)?(null===e.left?n=e.right:(n=s(t,e.left,r)).right=e.right,this._size--,n):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=s(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,r=this._comparator;e;){var n=r(t,e.key);if(0===n)return e;e=n<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=s(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,r=this._comparator;e;){var n=r(t,e.key);if(0===n)return!0;e=n<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var r=this._root,n=[],i=!1;!i;)null!==r?(n.push(r),r=r.left):0!==n.length?(r=n.pop(),t.call(e,r),r=r.right):i=!0;return this},t.prototype.range=function(t,e,r,n){for(var i=[],o=this._comparator,s=this._root;0!==i.length||s;)if(s)i.push(s),s=s.left;else{if(o((s=i.pop()).key,e)>0)break;if(o(s.key,t)>=0&&r.call(n,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var r=e.key;return t.push(r)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var r=e.data;return t.push(r)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,r=!1,n=0,i=[];!r;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),n===t)return e;n++,e=e.right}else r=!0;return null},t.prototype.next=function(t){var e=this._root,r=null;if(t.right){for(r=t.right;r.left;)r=r.left;return r}for(var n=this._comparator;e;){var i=n(t.key,e.key);if(0===i)break;i<0?(r=e,e=e.left):e=e.right}return r},t.prototype.prev=function(t){var e=this._root,r=null;if(null!==t.left){for(r=t.left;r.right;)r=r.right;return r}for(var n=this._comparator;e;){var i=n(t.key,e.key);if(0===i)break;i<0?e=e.left:(r=e,e=e.right)}return r},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return g(this._root)},t.prototype.load=function(t,e,r){void 0===e&&(e=[]),void 0===r&&(r=!1);var n=t.length,i=this._comparator;if(r&&v(t,e,0,n-1,i),null===this._root)this._root=c(t,e,0,n),this._size=n;else{var o=y(this.toList(),p(t,e),i);n=this._size+n,this._root=d({head:o},0,n)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return l(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,r){var n=this._comparator,i=u(t,this._root,n),o=i.left,s=i.right;n(t,e)<0?s=a(e,r,s,n):o=a(e,r,o,n),this._root=h(o,s,n)},t.prototype.split=function(t){return u(t,this._root,this._comparator)},t}();function c(t,e,r,n){var o=n-r;if(o>0){var s=r+Math.floor(o/2),a=t[s],u=e[s],h=new i(a,u);return h.left=c(t,e,r,s),h.right=c(t,e,s+1,n),h}return null}function p(t,e){for(var r=new i(null,null),n=r,o=0;o<t.length;o++)n=n.next=new i(t[o],e[o]);return n.next=null,r.next}function g(t){for(var e=t,r=[],n=!1,o=new i(null,null),s=o;!n;)e?(r.push(e),e=e.left):r.length>0?e=(e=s=s.next=r.pop()).right:n=!0;return s.next=null,o.next}function d(t,e,r){var n=r-e;if(n>0){var i=e+Math.floor(n/2),o=d(t,e,i),s=t.head;return s.left=o,t.head=t.head.next,s.right=d(t,i+1,r),s}return null}function y(t,e,r){for(var n=new i(null,null),o=n,s=t,a=e;null!==s&&null!==a;)r(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),n.next}function v(t,e,r,n,i){if(!(r>=n)){for(var o=t[r+n>>1],s=r-1,a=n+1;;){do{s++}while(i(t[s],o)<0);do{a--}while(i(t[a],o)>0);if(s>=a)break;var u=t[s];t[s]=t[a],t[a]=u,u=e[s],e[s]=e[a],e[a]=u}v(t,e,r,a,i),v(t,e,a+1,n,i)}}var m=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},x=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var r=t.ll.x<e.ll.x?e.ll.x:t.ll.x,n=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:r,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y}
1,ur:{x:n,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}},b=Number.EPSILON;void 0===b&&(b=Math.pow(2,-52));var w=b*b,_=function(t,e){if(-b<t&&t<b&&-b<e&&e<b)return 0;var r=t-e;return r*r<w*t*e?0:t<e?-1:1},E=function(){function e(){t(this,e),this.reset()}return r(e,[{key:"reset",value:function(){this.xRounder=new M,this.yRounder=new M}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),e}(),M=function(){function e(){t(this,e),this.tree=new f,this.round(0)}return r(e,[{key:"round",value:function(t){var e=this.tree.add(t),r=this.tree.prev(e);if(null!==r&&0===_(e.key,r.key))return this.tree.remove(t),r.key;var n=this.tree.next(e);return null!==n&&0===_(e.key,n.key)?(this.tree.remove(t),n.key):t}}]),e}(),S=new E,P=function(t,e){return t.x*e.y-t.y*e.x},A=function(t,e){return t.x*e.x+t.y*e.y},k=function(t,e,r){var n={x:e.x-t.x,y:e.y-t.y},i={x:r.x-t.x,y:r.y-t.y},o=P(n,i);return _(o,0)},R=function(t){return Math.sqrt(A(t,t))},O=function(t,e,r){var n={x:e.x-t.x,y:e.y-t.y},i={x:r.x-t.x,y:r.y-t.y};return P(i,n)/R(i)/R(n)},I=function(t,e,r){var n={x:e.x-t.x,y:e.y-t.y},i={x:r.x-t.x,y:r.y-t.y};return A(i,n)/R(i)/R(n)},C=function(t,e,r){return 0===e.y?null:{x:t.x+e.x/e.y*(r-t.y),y:r}},B=function(t,e,r){return 0===e.x?null:{x:r,y:t.y+e.y/e.x*(r-t.x)}},L=function(t,e,r,n){if(0===e.x)return B(r,n,t.x);if(0===n.x)return B(t,e,r.x);if(0===e.y)return C(r,n,t.y);if(0===n.y)return C(t,e,r.y);var i=P(e,n);if(0==i)return null;var o={x:r.x-t.x,y:r.y-t.y},s=P(o,e)/i,a=P(o,n)/i;return{x:(t.x+a*e.x+(r.x+s*n.x))/2,y:(t.y+a*e.y+(r.y+s*n.y))/2}},F=function(){function e(r,n){t(this,e),void 0===r.events?r.events=[this]:r.events.push(this),this.point=r,this.isLeft=n}return r(e,null,[{key:"compare",value:function(t,r){var n=e.comparePoints(t.point,r.point);return 0!==n?n:(t.point!==r.point&&t.link(r),t.isLeft!==r.isLeft?t.isLeft?1:-1:Y.compare(t.segment,r.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),r(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,r=0,n=e.length;r<n;r++){var i=e[r];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var r=this.point.events[e];if(void 0===r.segment.consumedBy)for(var n=e+1;n<t;n++){var i=this.point.events[n];void 0===i.consumedBy&&r.otherSE.point.events===i.otherSE.point.events&&r.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,r=this.point.events.length;e<r;e++){var n=this.point.events[e];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,r=new Map,n=function(n){var i=n.otherSE;r.set(n,{sine:O(e.point,t.point,i.point),cosine:I(e.point,t.point,i.point)})};return function(t,e){r.has(t)||n(t),r.has(e)||n(e);var i=r.get(t),o=i.sine,s=i.cosine,a=r.get(e),u=a.sine,h=a.cosine;return o>=0&&u>=0?s<h?1:s>h?-1:0:o<0&&u<0?s<h?-1:s>h?1:0:u<o?-1:u>o?1:0}}}]),e}(),j=0,Y=function(){function e(r,n,i,o){t(this,e),this.id=++j,this.leftSE=r,r.segment=this,r.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=r,this.rings=i,this.windings=o}return r(e,null,[{key:"compare",value:function(t,e){var r=t.leftSE.point.x,n=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<r)return 1;if(i<n)return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,u=t.rightSE.point.y,h=e.rightSE.point.y;if(r<n){if(a<s&&a<u)return 1;if(a>s&&a>u)return-1;var l=t.comparePoint(e.leftSE.point);if(l<0)return 1;if(l>0)return-1;var f=e.comparePoint(t.rightSE.point);return 0!==f?f:-1}if(r>n){if(s<a&&s<h)return-1;if(s>a&&s>h)return 1;var c=e.comparePoint(t.leftSE.point);if(0!==c)return c;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(i<o){var g=e.comparePoint(t.rightSE.point);if(0!==g)return g}if(i>o){var d=t.comparePoint(e.rightSE.point);if(d<0)return 1;if(d>0)return-1}if(i!==o){var y=u-s,v=i-r,m=h-a,x=o-n;if(y>v&&m<x)return 1;if(y<v&&m>x)return-1}return i>o?1:i<o||u<h?-1:u>h?1:t.id<e.id?-1:t.id>e.id?1:0}}]),r(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;
1var e=this.leftSE.point,r=this.rightSE.point,n=this.vector();if(e.x===r.x)return t.x===e.x?0:t.x<e.x?1:-1;var i=(t.y-e.y)/n.y,o=e.x+i*n.x;if(t.x===o)return 0;var s=(t.x-e.x)/n.x,a=e.y+s*n.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),r=t.bbox(),n=x(e,r);if(null===n)return null;var i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,u=m(e,s)&&0===this.comparePoint(s),h=m(r,i)&&0===t.comparePoint(i),l=m(e,a)&&0===this.comparePoint(a),f=m(r,o)&&0===t.comparePoint(o);if(h&&u)return f&&!l?o:!f&&l?a:null;if(h)return l&&i.x===a.x&&i.y===a.y?null:i;if(u)return f&&o.x===s.x&&o.y===s.y?null:s;if(f&&l)return null;if(f)return o;if(l)return a;var c=L(i,this.vector(),s,t.vector());return null===c?null:m(n,c)?S.round(c.x,c.y):null}},{key:"split",value:function(t){var r=[],n=void 0!==t.events,i=new F(t,!0),o=new F(t,!1),s=this.rightSE;this.replaceRightSE(o),r.push(o),r.push(i);var a=new e(i,s,this.rings.slice(),this.windings.slice());return F.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),F.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.checkForConsuming()),r}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,r=this.windings.length;e<r;e++)this.windings[e]*=-1}},{key:"consume",value:function(t){for(var r=this,n=t;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var i=e.compare(r,n);if(0!==i){if(i>0){var o=r;r=n,n=o}if(r.prev===n){var s=r;r=n,n=s}for(var a=0,u=n.rings.length;a<u;a++){var h=n.rings[a],l=n.windings[a],f=r.rings.indexOf(h);-1===f?(r.rings.push(h),r.windings.push(l)):r.windings[f]+=l}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,r=this._afterState.windings,n=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var s=this.rings[i],a=this.windings[i],u=e.indexOf(s);-1===u?(e.push(s),r.push(a)):r[u]+=a}for(var h=[],l=[],f=0,c=e.length;f<c;f++)if(0!==r[f]){var p=e[f],g=p.poly;if(-1===l.indexOf(g))if(p.isExterior)h.push(g);else{-1===l.indexOf(g)&&l.push(g);var d=h.indexOf(p.poly);-1!==d&&h.splice(d,1)}}for(var y=0,v=h.length;y<v;y++){var m=h[y].multiPoly;-1===n.indexOf(m)&&n.push(m)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch($.type){case"union":var r=0===t.length,n=0===e.length;this._isInResult=r!==n;break;case"intersection":var i,o;t.length<e.length?(i=t.length,o=e.length):(i=e.length,o=t.length),this._isInResult=o===$.numMultiPolys&&i<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2===1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e);break;default:throw new Error("Unrecognized operation type found ".concat($.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,r,n){var i,o,s,a=F.comparePoints(t,r);if(a<0)i=t,o=r,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=r,o=t,s=-1}return new e(new F(i,!0),new F(o,!1),[n],[s])}}]),e}(),X=function(){function e(r,n,i){if(t(this,e),!Array.isArray(r)||0===r.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1if(this.poly=n,this.isExterior=i,this.segments=[],"number"!==typeof r[0][0]||"number"!==typeof r[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=S.round(r[0][0],r[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var s=o,a=1,u=r.length;a<u;a++){if("number"!==typeof r[a][0]||"number"!==typeof r[a][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var h=S.round(r[a][0],r[a][1]);h.x===s.x&&h.y===s.y||(this.segments.push(Y.fromRing(s,h,this)),h.x<this.bbox.ll.x&&(this.bbox.ll.x=h.x),h.y<this.bbox.ll.y&&(this.bbox.ll.y=h.y),h.x>this.bbox.ur.x&&(this.bbox.ur.x=h.x),h.y>this.bbox.ur.y&&(this.bbox.ur.y=h.y),s=h)}o.x===s.x&&o.y===s.y||this.segments.push(Y.fromRing(s,o,this))}return r(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,r=this.segments.length;e<r;e++){var n=this.segments[e];t.push(n.leftSE),t.push(n.rightSE)}return t}}]),e}(),N=function(){function e(r,n){if(t(this,e),!Array.isArray(r))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new X(r[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var i=1,o=r.length;i<o;i++){var s=new X(r[i],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=n}return r(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,r=this.interiorRings.length;e<r;e++)for(var n=this.interiorRings[e].getSweepEvents(),i=0,o=n.length;i<o;i++)t.push(n[i]);return t}}]),e}(),z=function(){function e(r,n){if(t(this,e),!Array.isArray(r))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"===typeof r[0][0][0]&&(r=[r])}catch(a){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,o=r.length;i<o;i++){var s=new N(r[i],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=n}return r(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,r=this.polys.length;e<r;e++)for(var n=this.polys[e].getSweepEvents(),i=0,o=n.length;i<o;i++)t.push(n[i]);return t}}]),e}(),T=function(){function e(r){t(this,e),this.events=r;for(var n=0,i=r.length;n<i;n++)r[n].segment.ringOut=this;this.poly=null}return r(e,null,[{key:"factory",value:function(t){for(var r=[],n=0,i=t.length;n<i;n++){var o=t[n];if(o.isInResult()&&!o.ringOut){for(var s=null,a=o.leftSE,u=o.rightSE,h=[a],l=a.point,f=[];s=a,a=u,h.push(a),a.point!==l;)for(;;){var c=a.getAvailableLinkedEvents();if(0===c.length){var p=h[0].point,g=h[h.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(p.x,",")+" ".concat(p.y,"]. Last matching segment found ends at")+" [".concat(g.x,", ").concat(g.y,"]."))}if(1===c.length){u=c[0].otherSE;break}for(var d=null,y=0,v=f.length;y<v;y++)if(f[y].point===a.point){d=y;break}if(null===d){f.push({index:h.length,point:a.point});var m=a.getLeftmostComparator(s);u=c.sort(m)[0].otherSE;break}var x=f.splice(d)[0],b=h.splice(x.index);b.unshift(b[0].otherSE),r.push(new e(b.reverse()))}r.push(new e(h))}}return r}}]),r(e,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],r=1,n=this.events.length-1;r<n;r++){var i=this.events[r].point,o=this.events[r+1].point;0!==k(i,t,o)&&(e.push(i),t=i)}if(1===e.length)return null;var s=e[0],a=e[1];0===k(s,t,a)&&e.shift(),e.push(e[0]);for(var u=this.isExteriorRing()?1:-1,h=this.isExteriorRing()?0:e.length-1,l=this.isExteriorRing()?e.length:-1,f=[],c=h;c!=l;c+=u)f.push([e[c].x,e[c].y]);return f}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,r=this.events.length;e<r;e++){var n=this.events[e];F.compare(t,n)>0&&(t=n)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),e}(),U=function(){function e(r){t(this,e),this.exteriorRing=r,r.poly=this,this.interiorRings=[]}return r(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,r=this.interiorRings.length;e<r;e++){var n=this.interiorRings[e].getGeom();null!==n&&t.push(n)}return t}}]),e}(),D=function(){function e(r){t(this,e),this.rings=r,this.polys=this._composePolys(r)}return r(e,[{key:"getGeom",value:function(){for(var t=[],e=0,r=this.polys.length;e<r;e++){var n=this.polys[e].getGeom();null!==n&&t.push(n)}return t}},{key:"_composePolys",value:function(t){for(var e=[],r=0,n=t.length;r<n;r++){var i=t[r];
1if(!i.poly)if(i.isExteriorRing())e.push(new U(i));else{var o=i.enclosingRing();o.poly||e.push(new U(o)),o.poly.addInterior(i)}}return e}}]),e}(),q=function(){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y.compare;t(this,e),this.queue=r,this.tree=new f(n),this.segments=[]}return r(e,[{key:"process",value:function(t){var e=t.segment,r=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),r;var n=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!n)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=n,o=n,s=void 0,a=void 0;void 0===s;)null===(i=this.tree.prev(i))?s=null:void 0===i.key.consumedBy&&(s=i.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var u=null;if(s){var h=s.getIntersection(e);if(null!==h&&(e.isAnEndpoint(h)||(u=h),!s.isAnEndpoint(h)))for(var l=this._splitSafely(s,h),f=0,c=l.length;f<c;f++)r.push(l[f])}var p=null;if(a){var g=a.getIntersection(e);if(null!==g&&(e.isAnEndpoint(g)||(p=g),!a.isAnEndpoint(g)))for(var d=this._splitSafely(a,g),y=0,v=d.length;y<v;y++)r.push(d[y])}if(null!==u||null!==p){var m=null;m=null===u?p:null===p||F.comparePoints(u,p)<=0?u:p,this.queue.remove(e.rightSE),r.push(e.rightSE);for(var x=e.split(m),b=0,w=x.length;b<w;b++)r.push(x[b])}r.length>0?(this.tree.remove(e),r.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var _=s.getIntersection(a);if(null!==_){if(!s.isAnEndpoint(_))for(var E=this._splitSafely(s,_),M=0,S=E.length;M<S;M++)r.push(E[M]);if(!a.isAnEndpoint(_))for(var P=this._splitSafely(a,_),A=0,k=P.length;A<k;A++)r.push(P[A])}}this.tree.remove(e)}return r}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var r=t.rightSE;this.queue.remove(r);var n=t.split(e);return n.push(r),void 0===t.consumedBy&&this.tree.insert(t),n}}]),e}(),G="undefined"!==typeof n&&n.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Z="undefined"!==typeof n&&n.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,$=new(function(){function e(){t(this,e)}return r(e,[{key:"run",value:function(t,e,r){$.type=t,S.reset();for(var n=[new z(e,!0)],i=0,o=r.length;i<o;i++)n.push(new z(r[i],!1));if($.numMultiPolys=n.length,"difference"===$.type)for(var s=n[0],a=1;a<n.length;)null!==x(n[a].bbox,s.bbox)?a++:n.splice(a,1);if("intersection"===$.type)for(var u=0,h=n.length;u<h;u++)for(var l=n[u],c=u+1,p=n.length;c<p;c++)if(null===x(l.bbox,n[c].bbox))return[];for(var g=new f(F.compare),d=0,y=n.length;d<y;d++)for(var v=n[d].getSweepEvents(),m=0,b=v.length;m<b;m++)if(g.insert(v[m]),g.size>G)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var w=new q(g),_=g.size,E=g.pop();E;){var M=E.key;if(g.size===_){var P=M.segment;throw new Error("Unable to pop() ".concat(M.isLeft?"left":"right"," SweepEvent ")+"[".concat(M.point.x,", ").concat(M.point.y,"] from segment #").concat(P.id," ")+"[".concat(P.leftSE.point.x,", ").concat(P.leftSE.point.y,"] -> ")+"[".concat(P.rightSE.point.x,", ").concat(P.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(g.size>G)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(w.segments.length>Z)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var A=w.process(M),k=0,R=A.length;k<R;k++){var O=A[k];void 0===O.consumedBy&&g.insert(O)}_=g.size,E=g.pop()}S.reset();var I=T.factory(w.segments);return new D(I).getGeom()}}]),e}()),W=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return $.run("union",t,r)},J=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return $.run("intersection",t,r)},Q=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return $.run("xor",t,r)},V=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return $.run("difference",t,r)};return{union:W,intersection:J,xor:Q,difference:V}}()},65510:function(t,e,r){"use strict";
vendor: 5,327 bytes, line 1
1t.exports=i,t.exports.default=i;var n=r(84291);function i(t,e){if(!(this instanceof i))return new i(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n<e.length;n++)if(r(t,e[n]))return n;return-1}function s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,r,n,i){i||(i=y(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,s=e;s<r;s++)o=t.children[s],u(i,t.leaf?n(o):o);return i}function u(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){var r=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,r,i,o){for(var s,a=[e,r];a.length;)(r=a.pop())-(e=a.pop())<=i||(s=e+Math.ceil((r-e)/i/2)*i,n(t,s,e,r,o),a.push(e,s,s,r))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,r=[],n=this.toBBox;if(!d(t,e))return r;for(var i,o,s,a,u=[];e;){for(i=0,o=e.children.length;i<o;i++)s=e.children[i],d(t,a=e.leaf?n(s):s)&&(e.leaf?r.push(s):g(t,a)?this._all(s,r):u.push(s));e=u.pop()}return r},collides:function(t){var e=this.data,r=this.toBBox;if(!d(t,e))return!1;for(var n,i,o,s,a=[];e;){for(n=0,i=e.children.length;n<i;n++)if(o=e.children[n],d(t,s=e.leaf?r(o):o)){if(e.leaf||g(t,s))return!0;a.push(o)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,r=t.length;e<r;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=y([]),this},remove:function(t,e){if(!t)return this;for(var r,n,i,s,a=this.data,u=this.toBBox(t),h=[],l=[];a||h.length;){if(a||(a=h.pop(),n=h[h.length-1],r=l.pop(),s=!0),a.leaf&&-1!==(i=o(t,a.children,e)))return a.children.splice(i,1),h.push(a),this._condense(h),this;s||a.leaf||!g(a,u)?n?(r++,a=n.children[r],s=!1):a=null:(h.push(a),l.push(r),r=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:h,compareMinY:l,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},_build:function(t,e,r,n){var i,o=r-e+1,a=this._maxEntries;if(o<=a)return s(i=y(t.slice(e,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(i=y([])).leaf=!1,i.height=n;var u,h,l,f,c=Math.ceil(o/a),p=c*Math.ceil(Math.sqrt(a));for(v(t,e,r,p,this.compareMinX),u=e;u<=r;u+=p)for(v(t,u,l=Math.min(u+p-1,r),c,this.compareMinY),h=u;h<=l;h+=c)f=Math.min(h+c-1,l),i.children.push(this._build(t,h,f,n-1));return s(i,this.toBBox),i},_chooseSubtree:function(t,e,r,n){for(var i,o,s,a,u,h,l,c,p,g;n.push(e),!e.leaf&&n.length-1!==r;){for(l=c=1/0,i=0,o=e.children.length;i<o;i++)u=f(s=e.children[i]),p=t,g=s,(h=(Math.max(g.maxX,p.maxX)-Math.min(g.minX,p.minX))*(Math.max(g.maxY,p.maxY)-Math.min(g.minY,p.minY))-u)<c?(c=h,l=u<l?u:l,a=s):h===c&&u<l&&(l=u,a=s);e=a||e.children[0]}return e},_insert:function(t,e,r){var n=this.toBBox,i=r?t:n(t),o=[],s=this._chooseSubtree(i,this.data,e,o);for(s.children.push(t),u(s,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var o=this._chooseSplitIndex(r,i,n),a=y(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,s(r,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},_splitRoot:function(t,e){this.data=y([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,r){var n,i,o,s,u,h,l,c;for(h=l=1/0,n=e;n<=r-e;n++)s=p(i=a(t,0,n,this.toBBox),o=a(t,n,r,this.toBBox)),u=f(i)+f(o),s<h?(h=s,c=n,l=u<l?u:l):s===h&&u<l&&(l=u,c=n);return c},_chooseSplitAxis:function(t,e,r){var n=t.leaf?this.compareMinX:h,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,r,n)<this._allDistMargin(t,e,r,i)&&t.children.sort(n)},_allDistMargin:function(t,e,r,n){t.children.sort(n);var i,o,s=this.toBBox,h=a(t,0,e,s),l=a(t,r-e,r,s),f=c(h)+c(l);for(i=e;i<r-e;i++)o=t.children[i],u(h,t.leaf?s(o):o),f+=c(h);for(i=r-e-1;i>=e;i--)o=t.children[i],u(l,t.leaf?s(o):o),f+=c(l);return f},_adjustParentBBoxes:function(t,e,r){for(var n=r;n>=0;n--)u(e[n],t)},_condense:function(t){for(var e,r=t.length-1;r>=0;r--)0===t[r].children.length?r>
10?(e=t[r-1].children).splice(e.indexOf(t[r]),1):this.clear():s(t[r],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},84291:function(t){t.exports=function(){"use strict";function t(t,r,i,o,s){e(t,r,i||0,o||t.length-1,s||n)}function e(t,n,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=n-i+1,h=Math.log(a),l=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*l*(a-l)/a)*(u-a/2<0?-1:1);e(t,n,Math.max(i,Math.floor(n-u*l/a+f)),Math.min(o,Math.floor(n+(a-u)*l/a+f)),s)}var c=t[n],p=i,g=o;for(r(t,i,n),s(t[o],c)>0&&r(t,i,o);p<g;){for(r(t,p,g),p++,g--;s(t[p],c)<0;)p++;for(;s(t[g],c)>0;)g--}0===s(t[i],c)?r(t,i,g):r(t,++g,o),g<=n&&(i=g+1),n<=g&&(o=g-1)}}function r(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function n(t,e){return t<e?-1:t>e?1:0}return t}()},53697:function(t,e,r){"use strict";var n=r(25972).functionsHaveConfigurableNames(),i=Object,o=TypeError;t.exports=function(){if(null!=this&&this!==i(this))throw new o("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.sticky&&(t+="y"),t},n&&Object.defineProperty&&Object.defineProperty(t.exports,"name",{value:"get flags"})},2847:function(t,e,r){"use strict";var n=r(4289),i=r(55559),o=r(53697),s=r(71721),a=r(32753),u=i(s());n(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},71721:function(t,e,r){"use strict";var n=r(53697),i=r(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor;t.exports=function(){if(i&&"gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"===typeof t.get&&"boolean"===typeof RegExp.prototype.dotAll&&"boolean"===typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},32753:function(t,e,r){"use strict";var n=r(4289).supportsDescriptors,i=r(71721),o=Object.getOwnPropertyDescriptor,s=Object.defineProperty,a=TypeError,u=Object.getPrototypeOf,h=/a/;t.exports=function(){if(!n||!u)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=i(),e=u(h),r=o(e,"flags");return r&&r.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},88639:function(t,e){!function(t){"use strict";const e=134217729,r=33306690738754706e-32;function n(t,e,r,n,i){let o,s,a,u,h=e[0],l=n[0],f=0,c=0;l>h==l>-h?(o=h,h=e[++f]):(o=l,l=n[++c]);let p=0;if(f<t&&c<r)for(l>h==l>-h?(a=o-((s=h+o)-h),h=e[++f]):(a=o-((s=l+o)-l),l=n[++c]),o=s,0!==a&&(i[p++]=a);f<t&&c<r;)l>h==l>-h?(a=o-((s=o+h)-(u=s-o))+(h-u),h=e[++f]):(a=o-((s=o+l)-(u=s-o))+(l-u),l=n[++c]),o=s,0!==a&&(i[p++]=a);for(;f<t;)a=o-((s=o+h)-(u=s-o))+(h-u),h=e[++f],o=s,0!==a&&(i[p++]=a);for(;c<r;)a=o-((s=o+l)-(u=s-o))+(l-u),l=n[++c],o=s,0!==a&&(i[p++]=a);return 0===o&&0!==p||(i[p++]=o),p}function i(t){return new Float64Array(t)}const o=33306690738754716e-32,s=22204460492503146e-32,a=11093356479670487e-47,u=i(4),h=i(8),l=i(12),f=i(16),c=i(4);t.orient2d=function(t,i,p,g,d,y){const v=(i-y)*(p-d),m=(t-d)*(g-y),x=v-m;if(0===v||0===m||v>0!=m>0)return x;const b=Math.abs(v+m);return Math.abs(x)>=o*b?x:-function(t,i,o,p,g,d,y){let v,m,x,b,w,_,E,M,S,P,A,k,R,O,I,C,B,L;const F=t-g,j=o-g,Y=i-d,X=p-d;w=(I=(M=F-(E=(_=e*F)-(_-F)))*(P=X-(S=(_=e*X)-(_-X)))-((O=F*X)-E*S-M*S-E*P))-(A=I-(B=(M=Y-(E=(_=e*Y)-(_-Y)))*(P=j-(S=(_=e*j)-(_-j)))-((C=Y*j)-E*S-M*S-E*P))),u[0]=I-(A+w)+(w-B),w=(R=O-((k=O+A)-(w=k-O))+(A-w))-(A=R-C),u[1]=R-(A+w)+(w-C),w=(L=k+A)-k,u[2]=k-(L-w)+(A-w),u[3]=L;let N=function(t,e){let r=e[0];for(let n=1;n<t;n++)r+=e[n];return r}(4,u),z=s*y;if(N>=z||-N>=z)return N;if(v=t-(F+(w=t-F))+(w-g),x=o-(j+(w=o-j))+(w-g),m=i-(Y+(w=i-Y))+(w-d),b=p-(X+(w=p-X))+(w-d),0===v&&0===m&&0===x&&0===b)return N;if(z=a*y+r*Math.abs(N),(N+=F*b+X*v-(Y*x+j*m))>=z||-N>=z)return N;w=(I=(M=v-(E=(_=e*v)-(_-v)))*(P=X-(S=(_=e*X)-(_-X)))-((O=v*X)-E*S-M*S-E*P))-(A=I-(B=(M=m-(E=(_=e*m)-(_-m)))*(P=j-(S=(_=e*j)-(_-j)))-((C=m*j)-E*S-M*S-E*P))),c[0]=I-(A+w)+(w-B),w=(R=O-((k=O+A)-(w=k-O))+(A-w))-(A=R-C),c[1]=R-(A+w)+(w-C),w=(L=k+A)-k,c[2]=k-(L-w)+(A-w),c[3]=L;const T=n(4,u,4,c,h);w=(I=(M=F-(E=(_=e*F)-(_-F)))*(P=b-(S=(_=e*b)-(_-b)))-((O=F*b)-E*S-M*S-E*P))-(A=I-(B=(M=Y-(E=(_=e*Y)-(_-Y)))*(P=x-(S=(_=e*x)-(_-x)))-((C=Y*x)-E*S-M*S-E*P))),c[0]=I-(A+w)+(w-B),w=(R=O-((k=O+A)-(w=k-O))+(A-w))-(A=R-C),c[1]=R-(A+w)+(w-C),w=(L=k+A)-k,c[2]=k-(L-w)+(A-w),c[3]=L;const U=n(T,h,4,c,l);w=(I=(M=v-(E=(_=e*v)-(_-v)))*(P=b-(S=(_=e*b)-(_-b)))-((O=v*b)-E*S-M*S-E*P))-(A=I-(B=(M=m-(E=(_=e*m)-(_-m)))*(P=x-(S=(_=e*x)-(_-x)))-((C=m*x)-E*S-M*S-E*P))),c[0]=I-(A+w)+(w-B),w=(R=O-((k=O+A)-(w=k-O))+(A-w))-(A=R-C),c[1]=R-(A+w)+(w-C),w=(L=k+A)-k,c[2]=k-(L-w)+(A-w),c[3]=L;const D=n(U,l,4,c,f);return f[D-1]}(t,i,p,g,d,y,b)},t.orient2dfast=function(t,e,r,n,i,o){return(e-o)*(r-i)-(t-i)*(n-o)}
1,Object.defineProperty(t,"__esModule",{value:!0})}(e)},85697:function(t){"use strict";t.exports={eudist:function(t,e,r){for(var n=t.length,i=0,o=0;o<n;o++){var s=(t[o]||0)-(e[o]||0);i+=s*s}return r?Math.sqrt(i):i},mandist:function(t,e,r){for(var n=t.length,i=0,o=0;o<n;o++)i+=Math.abs((t[o]||0)-(e[o]||0));return r?Math.sqrt(i):i},dist:function(t,e,r){var n=Math.abs(t-e);return r?n:n*n}}},97035:function(t,e,r){"use strict";var n=r(85697),i=n.eudist,o=n.dist;t.exports={kmrand:function(t,e){for(var r={},n=[],i=e<<2,o=t.length,s=t[0].length>0;n.length<e&&i-- >0;){var a=t[Math.floor(Math.random()*o)],u=s?a.join("_"):""+a;r[u]||(r[u]=!0,n.push(a))}if(n.length<e)throw new Error("Error initializating clusters");return n},kmpp:function(t,e){var r=t[0].length?i:o,n=[],s=t.length,a=t[0].length>0,u=t[Math.floor(Math.random()*s)];a&&u.join("_");for(n.push(u);n.length<e;){for(var h=[],l=n.length,f=0,c=[],p=0;p<s;p++){for(var g=1/0,d=0;d<l;d++){var y=r(t[p],n[d]);y<=g&&(g=y)}h[p]=g}for(var v=0;v<s;v++)f+=h[v];for(var m=0;m<s;m++)c[m]={i:m,v:t[m],pr:h[m]/f,cs:0};c.sort((function(t,e){return t.pr-e.pr})),c[0].cs=c[0].pr;for(var x=1;x<s;x++)c[x].cs=c[x-1].cs+c[x].pr;for(var b=Math.random(),w=0;w<s-1&&c[w++].cs<b;);n.push(c[w-1].v)}return n}}},21160:function(t,e,r){"use strict";var n=r(85697),i=r(97035),o=n.eudist,s=(n.mandist,n.dist,i.kmrand),a=i.kmpp;function u(t,e,r){r=r||[];for(var n=0;n<t;n++)r[n]=e;return r}t.exports=function(t,e,r,n){var i=[],h=[],l=[],f=[],c=!1,p=n||1e4,g=t.length,d=t[0].length,y=d>0,v=[];if(r)i="kmrand"==r?s(t,e):"kmpp"==r?a(t,e):r;else for(var m={};i.length<e;){var x=Math.floor(Math.random()*g);m[x]||(m[x]=!0,i.push(t[x]))}do{u(e,0,v);for(var b=0;b<g;b++){for(var w=1/0,_=0,E=0;E<e;E++){(f=y?o(t[b],i[E]):Math.abs(t[b]-i[E]))<=w&&(w=f,_=E)}l[b]=_,v[_]++}for(var M=[],S=(h=[],0);S<e;S++)M[S]=y?u(d,0,M[S]):0,h[S]=i[S];if(y){for(var P=0;P<e;P++)i[P]=[];for(var A=0;A<g;A++)for(var k=M[l[A]],R=t[A],O=0;O<d;O++)k[O]+=R[O];c=!0;for(var I=0;I<e;I++){for(var C=i[I],B=M[I],L=h[I],F=v[I],j=0;j<d;j++)C[j]=B[j]/F||0;if(c)for(var Y=0;Y<d;Y++)if(L[Y]!=C[Y]){c=!1;break}}}else{for(var X=0;X<g;X++){M[l[X]]+=t[X]}for(var N=0;N<e;N++)i[N]=M[N]/v[N]||0;c=!0;for(var z=0;z<e;z++)if(h[z]!=i[z]){c=!1;break}}c=c||--p<=0}while(!c);return{it:1e4-p,k:e,idxs:l,centroids:i}}},60850:function(t,e,r){"use strict";function n(t,e,r,o,s,a){if(s-o<=r)return;const u=o+s>>1;i(t,e,u,o,s,a%2),n(t,e,r,o,u-1,a+1),n(t,e,r,u+1,s,a+1)}function i(t,e,r,n,s,a){for(;s>n;){if(s-n>600){const o=s-n+1,u=r-n+1,h=Math.log(o),l=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*l*(o-l)/o)*(u-o/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-u*l/o+f)),Math.min(s,Math.floor(r+(o-u)*l/o+f)),a)}const u=e[2*r+a];let h=n,l=s;for(o(t,e,n,r),e[2*s+a]>u&&o(t,e,n,s);h<l;){for(o(t,e,h,l),h++,l--;e[2*h+a]<u;)h++;for(;e[2*l+a]>u;)l--}e[2*n+a]===u?o(t,e,n,l):(l++,o(t,e,l,s)),l<=r&&(n=l+1),r<=l&&(s=l-1)}}function o(t,e,r,n){s(t,r,n),s(e,2*r,2*n),s(e,2*r+1,2*n+1)}function s(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function a(t,e,r,n){const i=t-r,o=e-n;return i*i+o*o}r.d(e,{Z:function(){return g}});const u=t=>t[0],h=t=>t[1];class l{constructor(t,e=u,r=h,i=64,o=Float64Array){this.nodeSize=i,this.points=t;const s=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new s(t.length),l=this.coords=new o(2*t.length);for(let n=0;n<t.length;n++)a[n]=n,l[2*n]=e(t[n]),l[2*n+1]=r(t[n]);n(a,l,i,0,a.length-1,0)}range(t,e,r,n){return function(t,e,r,n,i,o,s){const a=[0,t.length-1,0],u=[];let h,l;for(;a.length;){const f=a.pop(),c=a.pop(),p=a.pop();if(c-p<=s){for(let s=p;s<=c;s++)h=e[2*s],l=e[2*s+1],h>=r&&h<=i&&l>=n&&l<=o&&u.push(t[s]);continue}const g=Math.floor((p+c)/2);h=e[2*g],l=e[2*g+1],h>=r&&h<=i&&l>=n&&l<=o&&u.push(t[g]);const d=(f+1)%2;(0===f?r<=h:n<=l)&&(a.push(p),a.push(g-1),a.push(d)),(0===f?i>=h:o>=l)&&(a.push(g+1),a.push(c),a.push(d))}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)}within(t,e,r){return function(t,e,r,n,i,o){const s=[0,t.length-1,0],u=[],h=i*i;for(;s.length;){const l=s.pop(),f=s.pop(),c=s.pop();if(f-c<=o){for(let i=c;i<=f;i++)a(e[2*i],e[2*i+1],r,n)<=h&&u.push(t[i]);continue}const p=Math.floor((c+f)/2),g=e[2*p],d=e[2*p+1];a(g,d,r,n)<=h&&u.push(t[p]);const y=(l+1)%2;(0===l?r-i<=g:n-i<=d)&&(s.push(c),s.push(p-1),s.push(y)),(0===l?r+i>=g:n+i>=d)&&(s.push(p+1),s.push(f),s.push(y))}return u}(this.ids,this.coords,t,e,r,this.nodeSize)}}const f={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},c=Math.fround||(p=new Float32Array(1),t=>(p[0]=+t,p[0]));var p;class g{constructor(t){this.options=_(Object.create(f),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:r,maxZoom:n,nodeSize:i}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;let s=[];for(let a=0;a<t.length;a++)t[a].geometry&&s.push(y(t[a],a));this.trees[n+1]=new l(s,E,M,i,Float32Array),e&&console.timeEnd(o);for(let a=n;a>=r;a--){const t=+Date.now();s=this._cluster(s,a),this.trees[a]=new l(s,E,M,i,Float32Array),e&&console.log("z%d: %d clusters in %dms",a,s.length,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){const t=this.getClusters([r,n,180,o],e),s=this.getClusters([-180,n,i,o],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(x(r),b(o),x(i),b(n)),u=[];for(const h of a){const t=s.points[h];u.push(t.numPoints?v(t):this.points[t.index])}return u}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);const o=i.points[e];if(!o)throw new Error(n);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=i.within(o.x,o.y,s),u=[];for(const h of a){const e=i.points[h];e.parentId===t&&u.push(e.numPoints?v(e):this.points[e.index])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:s}=this.options,a=s/o,u=(r-a)/i,h=(r+1+a)/i,l={features:[]};return this._addTileFeatures(n.range((e-a)/i,u,(e+1+a)/i,h),n.points,e,r,i,l),0===e&&this._addTileFeatures(n.range(1-a/i,u,1,h),n.points,i,r,i,l),e===i-1&&this._addTileFeatures(n.range(0,u,a/i,h),n.points,-1,r,i,l),l.features.length?l:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,i){const o=this.getChildren(e);for(const s of o){const e=s.properties;if(e&&e.cluster?i+e.point_count<=n?i+=e.point_count:i=this._appendLeaves(t,e.cluster_id,r,n,i):i<n?i++:t.push(s),t.length===r)break}return i}_addTileFeatures(t,e,r,n,i,o){for(const s of t){const t=e[s],a=t.numPoints;let u,h,l;if(a)u=m(t),h=t.x,l=t.y;else{const e=this.points[t.index];u=e.properties,h=x(e.geometry.coordinates[0]),l=b(e.geometry.coordinates[1])}const f={type:1,geometry:[[Math.round(this.options.extent*(h*i-r)),Math.round(this.options.extent*(l*i-n))]],tags:u};let c;a?c=t.id:this.options.generateId?c=t.index:this.points[t.index].id&&(c=this.points[t.index].id),void 0!==c&&(f.id=c),o.features.push(f)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const r=[],{radius:n,extent:i,reduce:o,minPoints:s}=this.options,a=n/(i*Math.pow(2,e));for(let u=0;u<t.length;u++){const n=t[u];
1if(n.zoom<=e)continue;n.zoom=e;const i=this.trees[e+1],h=i.within(n.x,n.y,a),l=n.numPoints||1;let f=l;for(const t of h){const r=i.points[t];r.zoom>e&&(f+=r.numPoints||1)}if(f>l&&f>=s){let t=n.x*l,s=n.y*l,a=o&&l>1?this._map(n,!0):null;const c=(u<<5)+(e+1)+this.points.length;for(const r of h){const u=i.points[r];if(u.zoom<=e)continue;u.zoom=e;const h=u.numPoints||1;t+=u.x*h,s+=u.y*h,u.parentId=c,o&&(a||(a=this._map(n,!0)),o(a,this._map(u)))}n.parentId=c,r.push(d(t/f,s/f,c,f,a))}else if(r.push(n),f>1)for(const t of h){const n=i.points[t];n.zoom<=e||(n.zoom=e,r.push(n))}}return r}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?_({},t.properties):t.properties;const r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?_({},n):n}}function d(t,e,r,n,i){return{x:c(t),y:c(e),zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function y(t,e){const[r,n]=t.geometry.coordinates;return{x:c(x(r)),y:c(b(n)),zoom:1/0,index:e,parentId:-1}}function v(t){return{type:"Feature",id:t.id,properties:m(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),w(t.y)]}};var e}function m(t){const e=t.numPoints,r=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?Math.round(e/100)/10+"k":e;return _(_({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function x(t){return t/360+.5}function b(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function w(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function _(t,e){for(const r in e)t[r]=e[r];return t}function E(t){return t.x}function M(t){return t.y}},43842:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return n}});class n{constructor(t=[],e=i){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,n=e[t];for(;t>0;){const i=t-1>>1,o=e[i];if(r(n,o)>=0)break;e[t]=o,t=i}e[t]=n}_down(t){const{data:e,compare:r}=this,n=this.length>>1,i=e[t];for(;t<n;){let n=1+(t<<1),o=e[n];const s=n+1;if(s<this.length&&r(e[s],o)<0&&(n=s,o=e[s]),r(o,i)>=0)break;e[t]=o,t=n}e[t]=i}}function i(t,e){return t<e?-1:t>e?1:0}},61335:function(t,e,r){"use strict";r.d(e,{beQ:function(){return m}});function n(t,e,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function i(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(t[0])||!u(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function o(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:t},e,r)}function s(t,e,r){if(void 0===r&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:t},e,r)}function a(t,e,r){return void 0===r&&(r={}),n({type:"MultiPoint",coordinates:t},e,r)}function u(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function h(t,e,r){if(null!==t)for(var n,i,o,s,a,u,l,f,c=0,p=0,g=t.type,d="FeatureCollection"===g,y="Feature"===g,v=d?t.features.length:1,m=0;m<v;m++){a=(f=!!(l=d?t.features[m].geometry:y?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var x=0;x<a;x++){var b=0,w=0;if(null!==(s=f?l.geometries[x]:l)){u=s.coordinates;var _=s.type;switch(c=!r||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===e(u,p,m,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===e(u[n],p,m,b,w))return!1;p++,"MultiPoint"===_&&b++}"LineString"===_&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-c;i++){if(!1===e(u[n][i],p,m,b,w))return!1;p++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(w=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-c;o++){if(!1===e(u[n][i][o],p,m,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===h(s.geometries[n],e,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function l(t,e){var r,n,i,o,s,a,u,h,l,f,c=0,p="FeatureCollection"===t.type,g="Feature"===t.type,d=p?t.features.length:1;for(r=0;r<d;r++){for(a=p?t.features[r].geometry:g?t.geometry:t,h=p?t.features[r].properties:g?t.properties:{},l=p?t.features[r].bbox:g?t.bbox:void 0,f=p?t.features[r].id:g?t.id:void 0,s=(u=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=u?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,c,h,l,f))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],c,h,l,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,c,h,l,f))return!1;c++}}function f(t,e){l(t,(function(t,r,i,o,s){var a,u=null===t?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==e(n(t,i,{bbox:o,id:s}),r,0)&&void 0}switch(u){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var h=0;h<t.coordinates.length;h++){var l=t.coordinates[h];if(!1===e(n({type:a,coordinates:l},i),r,h))return!1}}
1))}function c(t){var e=[1/0,1/0,-1/0,-1/0];return h(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}c.default=c;var p=c;r(96086);r(72273);function g(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n,i=function(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(t),o="Feature"===(n=e).type?n.geometry:n,s=o.type,a=e.bbox,u=o.coordinates;if(a&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(i,a))return!1;"Polygon"===s&&(u=[u]);for(var h=!1,l=0;l<u.length&&!h;l++)if(d(i,u[l][0],r.ignoreBoundary)){for(var f=!1,c=1;c<u[l].length&&!f;)d(i,u[l][c],!r.ignoreBoundary)&&(f=!0),c++;f||(h=!0)}return h}function d(t,e,r){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var s=e[i][0],a=e[i][1],u=e[o][0],h=e[o][1];if(t[1]*(s-u)+a*(u-t[0])+h*(t[0]-s)===0&&(s-t[0])*(u-t[0])<=0&&(a-t[1])*(h-t[1])<=0)return!r;a>t[1]!==h>t[1]&&t[0]<(u-s)*(t[1]-a)/(h-a)+s&&(n=!n)}return n}Object.prototype.hasOwnProperty;var y=new ArrayBuffer(16);new Float64Array(y),new Uint32Array(y);r(65510);!function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(e=0;e<this.length-1;e++){var r=this.points[e],n=this.points[e+1];this.centers.push({x:(r.x+n.x)/2,y:(r.y+n.y)/2,z:(r.z+n.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(e=0;e<this.centers.length-1;e++){var i=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,o=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,s=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+s)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+s)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}t.prototype.cacheSteps=function(t){var e=[],r=this.pos(0);e.push(0);for(var n=0;n<this.duration;n+=10){var i=this.pos(n);Math.sqrt((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)+(i.z-r.z)*(i.z-r.z))>t&&(e.push(n),r=i)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),r=this.pos(t-10);return{angle:180*Math.atan2(e.y-r.y,e.x-r.x)/3.14,speed:Math.sqrt((r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y)+(r.z-e.z)*(r.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var r=e/this.duration;if(r>=1)return this.points[this.length-1];var n=Math.floor((this.points.length-1)*r);return function(t,e,r,n,i){var o=function(t){var e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}(t);return{x:i.x*o[0]+n.x*o[1]+r.x*o[2]+e.x*o[3],y:i.y*o[0]+n.y*o[1]+r.y*o[2]+e.y*o[3],z:i.z*o[0]+n.z*o[1]+r.z*o[2]+e.z*o[3]}}((this.length-1)*r-n,this.points[n],this.controls[n][1],this.controls[n+1][0],this.points[n+1])}}();var v=function(t){return function(t,e){void 0===e&&(e={});var r=Number(t[0]),n=Number(t[1]),i=Number(t[2]),s=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return o([[a,[i,n],[i,s],[r,s],a]],e.properties,{bbox:t,id:e.id})}(p(t))};var m=function(t,e){void 0===e&&(e={});var r=p(t);return i([(r[0]+r[2])/2,(r[1]+r[3])/2],e.properties,e)};r(9187);r(51787);var x=Math.PI/180,b=180/Math.PI,w=function(t,e){this.lon=t,this.lat=e,this.x=x*t,this.y=x*e};w.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},w.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new w(e,t)};var _=function(){this.coords=[],this.length=0};_.prototype.move_to=function(t){this.length++,this.coords.push(t)};var E=function(t){this.properties=t||{},this.geometries=[]};E.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].c
1oords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},E.prototype.wkt=function(){for(var t="",e="LINESTRING(",r=function(t){e+=t[0]+" "+t[1]+","},n=0;n<this.geometries.length;n++){if(0===this.geometries[n].coords.length)return"LINESTRING(empty)";this.geometries[n].coords.forEach(r),t+=e.substring(0,e.length-1)+")"}return t};var M=function(t,e,r){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new w(t.x,t.y),this.end=new w(e.x,e.y),this.properties=r||{};var n=this.start.x-this.end.x,i=this.start.y-this.end.y,o=Math.pow(Math.sin(i/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(n/2),2);if(this.g=2*Math.asin(Math.sqrt(o)),this.g===Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)};M.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),r=Math.sin(t*this.g)/Math.sin(this.g),n=e*Math.cos(this.start.y)*Math.cos(this.start.x)+r*Math.cos(this.end.y)*Math.cos(this.end.x),i=e*Math.cos(this.start.y)*Math.sin(this.start.x)+r*Math.cos(this.end.y)*Math.sin(this.end.x),o=e*Math.sin(this.start.y)+r*Math.sin(this.end.y),s=b*Math.atan2(o,Math.sqrt(Math.pow(n,2)+Math.pow(i,2)));return[b*Math.atan2(i,n),s]},M.prototype.Arc=function(t,e){var r=[];if(!t||t<=2)r.push([this.start.lon,this.start.lat]),r.push([this.end.lon,this.end.lat]);else for(var n=1/(t-1),i=0;i<t;++i){var o=n*i,s=this.interpolate(o);r.push(s)}for(var a=!1,u=0,h=e&&e.offset?e.offset:10,l=180-h,f=-180+h,c=360-h,p=1;p<r.length;++p){var g=r[p-1][0],d=r[p][0],y=Math.abs(d-g);y>c&&(d>l&&g<f||g>l&&d<f)?a=!0:y>u&&(u=y)}var v=[];if(a&&u<h){var m=[];v.push(m);for(var x=0;x<r.length;++x){var b=parseFloat(r[x][0]);if(x>0&&Math.abs(b-r[x-1][0])>c){var w=parseFloat(r[x-1][0]),M=parseFloat(r[x-1][1]),S=parseFloat(r[x][0]),P=parseFloat(r[x][1]);if(w>-180&&w<f&&180===S&&x+1<r.length&&r[x-1][0]>-180&&r[x-1][0]<f){m.push([-180,r[x][1]]),x++,m.push([r[x][0],r[x][1]]);continue}if(w>l&&w<180&&-180===S&&x+1<r.length&&r[x-1][0]>l&&r[x-1][0]<180){m.push([180,r[x][1]]),x++,m.push([r[x][0],r[x][1]]);continue}if(w<f&&S>l){var A=w;w=S,S=A;var k=M;M=P,P=k}if(w>l&&S<f&&(S+=360),w<=180&&S>=180&&w<S){var R=(180-w)/(S-w),O=R*P+(1-R)*M;m.push([r[x-1][0]>l?180:-180,O]),(m=[]).push([r[x-1][0]>l?-180:180,O]),v.push(m)}else m=[],v.push(m);m.push([b,r[x][1]])}else m.push([r[x][0],r[x][1]])}}else{var I=[];v.push(I);for(var C=0;C<r.length;++C)I.push([r[C][0],r[C][1]])}for(var B=new E(this.properties),L=0;L<v.length;++L){var F=new _;B.geometries.push(F);for(var j=v[L],Y=0;Y<j.length;++Y)F.move_to(j[Y])}return B};r(10251);var S=[],P=[],A=[],k=[],R=[],O=[],I=[],C=[],B=[],L=[],F=[],j=[],Y=[],X=[],N=[],z=[],T=[],U=[],D=[],q=[],G=[],Z=[],$=[],W=[];I[85]=L[85]=-1,C[85]=F[85]=0,B[85]=j[85]=1,D[85]=Z[85]=1,q[85]=$[85]=0,G[85]=W[85]=1,S[85]=k[85]=0,P[85]=R[85]=-1,A[85]=N[85]=0,z[85]=Y[85]=0,T[85]=X[85]=1,O[85]=U[85]=1,Z[1]=Z[169]=0,$[1]=$[169]=-1,W[1]=W[169]=0,Y[1]=Y[169]=-1,X[1]=X[169]=0,N[1]=N[169]=0,L[4]=L[166]=0,F[4]=F[166]=-1,j[4]=j[166]=1,z[4]=z[166]=1,T[4]=T[166]=0,U[4]=U[166]=0,I[16]=I[154]=0,C[16]=C[154]=1,B[16]=B[154]=1,k[16]=k[154]=1,R[16]=R[154]=0,O[16]=O[154]=1,D[64]=D[106]=0,q[64]=q[106]=1,G[64]=G[106]=0,S[64]=S[106]=-1,P[64]=P[106]=0,A[64]=A[106]=1,D[2]=D[168]=0,q[2]=q[168]=-1,G[2]=G[168]=1,Z[2]=Z[168]=0,$[2]=$[168]=-1,W[2]=W[168]=0,Y[2]=Y[168]=-1,X[2]=X[168]=0,N[2]=N[168]=0,z[2]=z[168]=-1,T[2]=T[168]=0,U[2]=U[168]=1,I[8]=I[162]=0,C[8]=C[162]=-1,B[8]=B[162]=0,L[8]=L[162]=0,F[8]=F[162]=-1,j[8]=j[162]=1,Y[8]=Y[162]=1,X[8]=X[162]=0,N[8]=N[162]=1,z[8]=z[162]=1,T[8]=T[162]=0,U[8]=U[162]=0,I[32]=I[138]=0,C[32]=C[138]=1,B[32]=B[138]=1,L[32]=L[138]=0,F[32]=F[138]=1,j[32]=j[138]=0,S[32]=S[138]=1,P[32]=P[138]=0,A[32]=A[138]=0,k[32]=k[138]=1,R[32]=R[138]=0,O[32]=O[138]=1,Z[128]=Z[42]=0,$[128]=$[42]=1,W[128]=W[42]=1,D[128]=D[42]=0,q[128]=q[42]=1,G[128]=G[42]=0,S[128]=S[42]=-1,P[128]=P[42]=0,A[128]=A[42]=1,k[128]=k[42]=-1,R[128]=R[42]=0,O[128]=O[42]=0,L[5]=L[165]=-1,F[5]=F[165]=0,j[5]=j[165]=0,Z[5]=Z[165]=1,$[5]=$[165]=0,W[5]=W[165]=0,z[20]=z[150]=0,T[20]=T[150]=1,U[20]=U[150]=1,k[20]=k[150]=0,R[20]=R[150]=-1,O[20]=O[150]=1,I[80]=I[90]=-1,C[80]=C[90]=0,B[80]=B[90]=1,D[80]=D[90]=1,q[80]=q[90]=0,G[80]=G[90]=1,Y[65]=Y[105]=0,X[65]=X[105]=1,N[65]=N[105]=0,S[65]=S[105]=0,P[65]=P[105]=-1,A[65]=A[105]=0,I[160]=I[10]=-1,C[160]=C[10]=0,B[160]=B[10]=1,L[160]=L[10]=-1,F[160]=F[10]=0,j[160]=j[10]=0,Z[160]=Z[
110]=1,$[160]=$[10]=0,W[160]=W[10]=0,D[160]=D[10]=1,q[160]=q[10]=0,G[160]=G[10]=1,z[130]=z[40]=0,T[130]=T[40]=1,U[130]=U[40]=1,Y[130]=Y[40]=0,X[130]=X[40]=1,N[130]=N[40]=0,S[130]=S[40]=0,P[130]=P[40]=-1,A[130]=A[40]=0,k[130]=k[40]=0,R[130]=R[40]=-1,O[130]=O[40]=1,L[37]=L[133]=0,F[37]=F[133]=1,j[37]=j[133]=1,Z[37]=Z[133]=0,$[37]=$[133]=1,W[37]=W[133]=0,S[37]=S[133]=-1,P[37]=P[133]=0,A[37]=A[133]=0,k[37]=k[133]=1,R[37]=R[133]=0,O[37]=O[133]=0,z[148]=z[22]=-1,T[148]=T[22]=0,U[148]=U[22]=0,Z[148]=Z[22]=0,$[148]=$[22]=-1,W[148]=W[22]=1,D[148]=D[22]=0,q[148]=q[22]=1,G[148]=G[22]=1,k[148]=k[22]=-1,R[148]=R[22]=0,O[148]=O[22]=1,I[82]=I[88]=0,C[82]=C[88]=-1,B[82]=B[88]=1,z[82]=z[88]=1,T[82]=T[88]=0,U[82]=U[88]=1,Y[82]=Y[88]=-1,X[82]=X[88]=0,N[82]=N[88]=1,D[82]=D[88]=0,q[82]=q[88]=-1,G[82]=G[88]=0,I[73]=I[97]=0,C[73]=C[97]=1,B[73]=B[97]=0,L[73]=L[97]=0,F[73]=F[97]=-1,j[73]=j[97]=0,Y[73]=Y[97]=1,X[73]=X[97]=0,N[73]=N[97]=0,S[73]=S[97]=1,P[73]=P[97]=0,A[73]=A[97]=1,I[145]=I[25]=0,C[145]=C[25]=-1,B[145]=B[25]=0,Y[145]=Y[25]=1,X[145]=X[25]=0,N[145]=N[25]=1,Z[145]=Z[25]=0,$[145]=$[25]=1,W[145]=W[25]=1,k[145]=k[25]=-1,R[145]=R[25]=0,O[145]=O[25]=0,L[70]=L[100]=0,F[70]=F[100]=1,j[70]=j[100]=0,z[70]=z[100]=-1,T[70]=T[100]=0,U[70]=U[100]=1,D[70]=D[100]=0,q[70]=q[100]=-1,G[70]=G[100]=1,S[70]=S[100]=1,P[70]=P[100]=0,A[70]=A[100]=0,L[101]=L[69]=0,F[101]=F[69]=1,j[101]=j[69]=0,S[101]=S[69]=1,P[101]=P[69]=0,A[101]=A[69]=0,Z[149]=Z[21]=0,$[149]=$[21]=1,W[149]=W[21]=1,k[149]=k[21]=-1,R[149]=R[21]=0,O[149]=O[21]=0,z[86]=z[84]=-1,T[86]=T[84]=0,U[86]=U[84]=1,D[86]=D[84]=0,q[86]=q[84]=-1,G[86]=G[84]=1,I[89]=I[81]=0,C[89]=C[81]=-1,B[89]=B[81]=0,Y[89]=Y[81]=1,X[89]=X[81]=0,N[89]=N[81]=1,I[96]=I[74]=0,C[96]=C[74]=1,B[96]=B[74]=0,L[96]=L[74]=-1,F[96]=F[74]=0,j[96]=j[74]=1,D[96]=D[74]=1,q[96]=q[74]=0,G[96]=G[74]=0,S[96]=S[74]=1,P[96]=P[74]=0,A[96]=A[74]=1,I[24]=I[146]=0,C[24]=C[146]=-1,B[24]=B[146]=1,z[24]=z[146]=1,T[24]=T[146]=0,U[24]=U[146]=1,Y[24]=Y[146]=0,X[24]=X[146]=1,N[24]=N[146]=1,k[24]=k[146]=0,R[24]=R[146]=-1,O[24]=O[146]=0,L[6]=L[164]=-1,F[6]=F[164]=0,j[6]=j[164]=1,z[6]=z[164]=-1,T[6]=T[164]=0,U[6]=U[164]=0,Z[6]=Z[164]=0,$[6]=$[164]=-1,W[6]=W[164]=1,D[6]=D[164]=1,q[6]=q[164]=0,G[6]=G[164]=0,Y[129]=Y[41]=0,X[129]=X[41]=1,N[129]=N[41]=1,Z[129]=Z[41]=0,$[129]=$[41]=1,W[129]=W[41]=0,S[129]=S[41]=-1,P[129]=P[41]=0,A[129]=A[41]=0,k[129]=k[41]=0,R[129]=R[41]=-1,O[129]=O[41]=0,z[66]=z[104]=0,T[66]=T[104]=1,U[66]=U[104]=0,Y[66]=Y[104]=-1,X[66]=X[104]=0,N[66]=N[104]=1,D[66]=D[104]=0,q[66]=q[104]=-1,G[66]=G[104]=0,S[66]=S[104]=0,P[66]=P[104]=-1,A[66]=A[104]=1,I[144]=I[26]=-1,C[144]=C[26]=0,B[144]=B[26]=0,Z[144]=Z[26]=1,$[144]=$[26]=0,W[144]=W[26]=1,D[144]=D[26]=0,q[144]=q[26]=1,G[144]=G[26]=1,k[144]=k[26]=-1,R[144]=R[26]=0,O[144]=O[26]=1,L[36]=L[134]=0,F[36]=F[134]=1,j[36]=j[134]=1,z[36]=z[134]=0,T[36]=T[134]=1,U[36]=U[134]=0,S[36]=S[134]=0,P[36]=P[134]=-1,A[36]=A[134]=1,k[36]=k[134]=1,R[36]=R[134]=0,O[36]=O[134]=0,I[9]=I[161]=-1,C[9]=C[161]=0,B[9]=B[161]=0,L[9]=L[161]=0,F[9]=F[161]=-1,j[9]=j[161]=0,Y[9]=Y[161]=1,X[9]=X[161]=0,N[9]=N[161]=0,Z[9]=Z[161]=1,$[9]=$[161]=0,W[9]=W[161]=1,I[136]=0,C[136]=1,B[136]=1,L[136]=0,F[136]=1,j[136]=0,z[136]=-1,T[136]=0,U[136]=1,Y[136]=-1,X[136]=0,N[136]=0,Z[136]=0,$[136]=-1,W[136]=0,D[136]=0,q[136]=-1,G[136]=1,S[136]=1,P[136]=0,A[136]=0,k[136]=1,R[136]=0,O[136]=1,I[34]=0,C[34]=-1,B[34]=0,L[34]=0,F[34]=-1,j[34]=1,z[34]=1,T[34]=0,U[34]=0,Y[34]=1,X[34]=0,N[34]=1,Z[34]=0,$[34]=1,W[34]=1,D[34]=0,q[34]=1,G[34]=0,S[34]=-1,P[34]=0,A[34]=1,k[34]=-1,R[34]=0,O[34]=0,I[35]=0,C[35]=1,B[35]=1,L[35]=0,F[35]=-1,j[35]=1,z[35]=1,T[35]=0,U[35]=0,Y[35]=-1,X[35]=0,N[35]=0,Z[35]=0,$[35]=-1,W[35]=0,D[35]=0,q[35]=1,G[35]=0,S[35]=-1,P[35]=0,A[35]=1,k[35]=1,R[35]=0,O[35]=1,I[153]=0,C[153]=1,B[153]=1,Y[153]=-1,X[153]=0,N[153]=0,Z[153]=0,$[153]=-1,W[153]=0,k[153]=1,R[153]=0,O[153]=1,L[102]=0,F[102]=-1,j[102]=1,z[102]=1,T[102]=0,U[102]=0,D[102]=0,q[102]=1,G[102]=0,S[102]=-1,P[102]=0,A[102]=1,I[155]=0,C[155]=-1,B[155]=0,Y[155]=1,X[155]=0,N[155]=1,Z[155]=0,$[155]=1,W[155]=1,k[155]=-1,R[155]=0,O[155]=0,L[103]=0,F[103]=1,j[103]=0,z[103]=-1,T[103]=0,U[103]=1,D[103]=0,q[103]=-1,G[103]=1,S[103]=1,P[103]=0,A[103]=0,I[152]=0,C[152]=1,B[152]=1,z[152]=-1,T[152]=0,U[152]=1,Y[152]=-1,X[152]=0,N[152]=0,Z[152]=0,$[152]=-1,W[152]=0,D[152]=0,q[152]=-1,G[152]=1,k[152]=1,R[152]=0,O[152]=1,I[156]=0,C[156]=-1,B[156]=1,z[156]=1,T[156]=0,U[156]=1,Y[156]=-1,X[156]=0,N[156]=0,Z[156]=0,$[156]=-1,W[156]=0,D[156]=0,q[156]=1,G[156]=1,k[156]=-1,R[156]=0,O[156]=1,I[137]=0,C[137]=1,B[137]=1,L[137]=0,F[137]=1,j[137]=0,Y[137]=-1,X[137]=0,N[137]=0,Z[137]=0,$[137]=-1,W[137]=0,S[137]=1,P[137]=0,A[137]=0,k[137]=1,R[137]=0,O[137]=1,I[139]=0,C[
1139]=1,B[139]=1,L[139]=0,F[139]=-1,j[139]=0,Y[139]=1,X[139]=0,N[139]=0,Z[139]=0,$[139]=1,W[139]=0,S[139]=-1,P[139]=0,A[139]=0,k[139]=1,R[139]=0,O[139]=1,I[98]=0,C[98]=-1,B[98]=0,L[98]=0,F[98]=-1,j[98]=1,z[98]=1,T[98]=0,U[98]=0,Y[98]=1,X[98]=0,N[98]=1,D[98]=0,q[98]=1,G[98]=0,S[98]=-1,P[98]=0,A[98]=1,I[99]=0,C[99]=1,B[99]=0,L[99]=0,F[99]=-1,j[99]=1,z[99]=1,T[99]=0,U[99]=0,Y[99]=-1,X[99]=0,N[99]=1,D[99]=0,q[99]=-1,G[99]=0,S[99]=1,P[99]=0,A[99]=1,L[38]=0,F[38]=-1,j[38]=1,z[38]=1,T[38]=0,U[38]=0,Z[38]=0,$[38]=1,W[38]=1,D[38]=0,q[38]=1,G[38]=0,S[38]=-1,P[38]=0,A[38]=1,k[38]=-1,R[38]=0,O[38]=0,L[39]=0,F[39]=1,j[39]=1,z[39]=-1,T[39]=0,U[39]=0,Z[39]=0,$[39]=-1,W[39]=1,D[39]=0,q[39]=1,G[39]=0,S[39]=-1,P[39]=0,A[39]=1,k[39]=1,R[39]=0,O[39]=0;var J=function(t){return[[t.bottomleft,0],[0,0],[0,t.leftbottom]]},Q=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0]]},V=function(t){return[[t.topright,1],[1,1],[1,t.righttop]]},H=function(t){return[[0,t.lefttop],[0,1],[t.topleft,1]]},K=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop]]},tt=function(t){return[[t.bottomright,0],[t.bottomleft,0],[1,t.righttop],[1,t.rightbottom]]},et=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.topleft,1],[t.topright,1]]},rt=function(t){return[[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},nt=[],it=[],ot=[],st=[],at=[],ut=[],ht=[],lt=[];st[1]=at[1]=18,st[169]=at[169]=18,ot[4]=it[4]=12,ot[166]=it[166]=12,nt[16]=lt[16]=4,nt[154]=lt[154]=4,ut[64]=ht[64]=22,ut[106]=ht[106]=22,ot[2]=ut[2]=17,st[2]=at[2]=18,ot[168]=ut[168]=17,st[168]=at[168]=18,nt[8]=st[8]=9,it[8]=ot[8]=12,nt[162]=st[162]=9,it[162]=ot[162]=12,nt[32]=lt[32]=4,it[32]=ht[32]=1,nt[138]=lt[138]=4,it[138]=ht[138]=1,at[128]=lt[128]=21,ut[128]=ht[128]=22,at[42]=lt[42]=21,ut[42]=ht[42]=22,it[5]=at[5]=14,it[165]=at[165]=14,ot[20]=lt[20]=6,ot[150]=lt[150]=6,nt[80]=ut[80]=11,nt[90]=ut[90]=11,st[65]=ht[65]=3,st[105]=ht[105]=3,nt[160]=ut[160]=11,it[160]=at[160]=14,nt[10]=ut[10]=11,it[10]=at[10]=14,ot[130]=lt[130]=6,st[130]=ht[130]=3,ot[40]=lt[40]=6,st[40]=ht[40]=3,it[101]=ht[101]=1,it[69]=ht[69]=1,at[149]=lt[149]=21,at[21]=lt[21]=21,ot[86]=ut[86]=17,ot[84]=ut[84]=17,nt[89]=st[89]=9,nt[81]=st[81]=9,nt[96]=ht[96]=0,it[96]=ut[96]=15,nt[74]=ht[74]=0,it[74]=ut[74]=15,nt[24]=ot[24]=8,st[24]=lt[24]=7,nt[146]=ot[146]=8,st[146]=lt[146]=7,it[6]=ut[6]=15,ot[6]=at[6]=16,it[164]=ut[164]=15,ot[164]=at[164]=16,st[129]=lt[129]=7,at[129]=ht[129]=20,st[41]=lt[41]=7,at[41]=ht[41]=20,ot[66]=ht[66]=2,st[66]=ut[66]=19,ot[104]=ht[104]=2,st[104]=ut[104]=19,nt[144]=at[144]=10,ut[144]=lt[144]=23,nt[26]=at[26]=10,ut[26]=lt[26]=23,it[36]=lt[36]=5,ot[36]=ht[36]=2,it[134]=lt[134]=5,ot[134]=ht[134]=2,nt[9]=at[9]=10,it[9]=st[9]=13,nt[161]=at[161]=10,it[161]=st[161]=13,it[37]=lt[37]=5,at[37]=ht[37]=20,it[133]=lt[133]=5,at[133]=ht[133]=20,ot[148]=at[148]=16,ut[148]=lt[148]=23,ot[22]=at[22]=16,ut[22]=lt[22]=23,nt[82]=ot[82]=8,st[82]=ut[82]=19,nt[88]=ot[88]=8,st[88]=ut[88]=19,nt[73]=ht[73]=0,it[73]=st[73]=13,nt[97]=ht[97]=0,it[97]=st[97]=13,nt[145]=st[145]=9,at[145]=lt[145]=21,nt[25]=st[25]=9,at[25]=lt[25]=21,it[70]=ht[70]=1,ot[70]=ut[70]=17,it[100]=ht[100]=1,ot[100]=ut[100]=17,nt[34]=st[34]=9,it[34]=ot[34]=12,at[34]=lt[34]=21,ut[34]=ht[34]=22,nt[136]=lt[136]=4,it[136]=ht[136]=1,ot[136]=ut[136]=17,st[136]=at[136]=18,nt[35]=lt[35]=4,it[35]=ot[35]=12,st[35]=at[35]=18,ut[35]=ht[35]=22,nt[153]=lt[153]=4,st[153]=at[153]=18,it[102]=ot[102]=12,ut[102]=ht[102]=22,nt[155]=st[155]=9,at[155]=lt[155]=23,it[103]=ht[103]=1,ot[103]=ut[103]=17,nt[152]=lt[152]=4,ot[152]=ut[152]=17,st[152]=at[152]=18,nt[156]=ot[156]=8,st[156]=at[156]=18,ut[156]=lt[156]=23,nt[137]=lt[137]=4,it[137]=ht[137]=1,st[137]=at[137]=18,nt[139]=lt[139]=4,it[139]=st[139]=13,at[139]=ht[139]=20,nt[98]=st[98]=9,it[98]=ot[98]=12,ut[98]=ht[98]=22,nt[99]=ht[99]=0,it[99]=ot[99]=12,st[99]=ut[99]=19,it[38]=ot[38]=12,at[38]=lt[38]=21,ut[38]=ht[38]=22,it[39]=lt[39]=5,ot[39]=at[39]=16,ut[39]=ht[39]=22;var ft=[];ft[1]=ft[169]=J,ft[4]=ft[166]=Q,ft[16]=ft[154]=V,ft[64]=ft[106]=H,ft[168]=ft[2]=K,ft[162]=ft[8]=tt,ft[138]=ft[32]=et,ft[42]=ft[128]=rt,ft[5]=ft[165]=function(t){return[[0,0],[0,t.leftbottom],[1,t.rightbottom],[1,0]]},ft[20]=ft[150]=function(t){return[[1,0],[t.bottomright,0],[t.topright,1],[1,1]]},ft[80]=ft[90]=function(t){return[[1,1],[1,t.righttop],[0,t.lefttop],[0,1]]},ft[65]=ft[105]=function(t){return[[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},ft[160]=ft[10]=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.leftbottom],[0,t.lefttop]]},ft[130]=ft[40]=function(t){return[[t.topleft,1],[t.topright,1],[t.bottomright,0],[t.bottomleft,0]]},ft[85]=function(){return[[0,0],[0,1],[1,1],[1,0]]},ft[101]=ft[69]=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,1],[t.topleft,1]]},ft[149]=ft[21]=function(t){return[[t.topright,1],[1,1],[1,0],[0,0],[0,t.leftbottom]]},ft[86]=ft[84]=function(t){return[[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[1,1]]},ft[89]=ft[81]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,1]]},ft[96]=ft[74]=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.lefttop],[0,1],[t.topleft,1]]},ft[24]=ft[146]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[t.topright,1]]},ft[6]=ft[164]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop]]},ft[129]=ft[41]=function(t){return[[t.topright,1],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1]]},ft[66]=ft[104]=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},ft[144]=ft[26]=function(t){return[[1,1],[1,t.righttop],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},ft[36]=ft[134]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[t.topleft,1],[t.topright,1]]},ft[9]=ft[161]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom]]},ft[37]=ft[133]=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},ft[148]=ft[22]=function(t){return[[1,1],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},ft[82]=ft[88]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1]]},ft[73]=ft[97]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},ft[145]=ft[25]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},ft[70]=ft[100]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},ft[34]=function(t){return[rt(t),tt(t)]},ft[35]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},ft[136]=function(t){return[et(t),K(t)]},ft[153]=function(t){return[V(t),J(t)]},ft[102]=function(t){return[Q(t),H(t)]},ft[155]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},ft[103]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},ft[152]=function(t){return[V(t),K(t)]},ft[156]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},ft[137]=function(t){return[et(t),J(t)]},ft[139]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},ft[98]=function(t){return[tt(t),H(t)]},ft[99]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},ft[38]=function(t){return[Q(t),rt(t)]},ft[39]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]};function ct(t,e,r){var n,i=e[0]-t[0],o=e[1]-t[1],s=r[0]-e[0],a=r[1]-e[1];return((n=i*a-s*o)>0)-(n<0)||+n}function pt(t,e){return e.geometry.coordinates[0].every((function(e){return g(i(e),t)}))}var gt=function(){function t(e){this.id=t.buildId(e),this.coordinates=e,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return t.buildId=function(t){return t.join(",")},t.prototype.removeInnerEdge=function(t){this.innerEdges=this.innerEdges.filter((function(e){return e.from.id!==t.from.id}))},t.prototype.removeOuterEdge=function(t){this.outerEdges=this.outerEdges.filter((function(e){return e.to.id!==t.to.id}))},t.prototype.addOuterEdge=function(t){this.outerEdges.push(t),this.outerEdgesSorted=!1},t.prototype.sortOuterEdges=function(){var t=this;this.outerEdgesSorted||(this.outerEdges.sort((function(e,r){var n=e.to,i=r.to;if(n.coordinates[0]-t.coordinates[0]>=0&&i.coordinates[0]-t.coordinates[0]<0)return 1;if(n.coordinates[0]-t.coordinates[0]<0&&i.coordinates[0]-t.coordinates[0]>=0)return-1;if(n.coordinates[0]-t.coordinates[0]===0&&i.coordinates[0]-t.coordinates[0]===0)return n.coordinates[1]-t.coordinates[1]>=0||i.coordinates[1]-t.coordinates[1]>=0?n.coordinates[1]-i.coordinates[1]:i.coordinates[1]-n.coordinates[1];var o=ct(t.coordinates,n.coordinates,i.coordinates);return o<0?1:o>0?-1:Math.pow(n.coordinates[0]-t.coordinates[0],2)+Math.pow(n.coordinates[1]-t.coordinates[1],2)-(Math.pow(i.coordinates[0]-t.coordinates[0],2)+Math.pow(i.coordinates[1]-t.coordinates[1],2))})),this.outerEdgesSorted=!0)},t.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},t.prototype.getOuterEdge=function(t){return this.sortOuterEdges(),this.outerEdges[t]},t.prototype.addInnerEdge=function(t){this.innerEdges.push(t)},t}(),dt=gt,yt=function(){function t(t,e){this.from=t,this.to=e,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return t.prototype.getSymetric=function(){return this.symetric||(this.symetric=new t(this.to,this.from),this.symetric.symetric=this),this.symetric},t.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},t.prototype.isEqual=function(t){return this.from.id===t.from.id&&this.to.id===t.to.id},t.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},t.prototype.toLineString=function(){return s([this.from.coordinates,this.to.coordinates])},t.prototype.compareTo=function(t){return ct(t.from.coordinates,t.to.coordinates,this.to.coordinates)},t}(),vt=function(){function t(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return t.prototype.push=function(t){this.edges.push(t),this.polygon=this.envelope=void 0},t.prototype.get=function(t){return this.edges[t]},Object.defineProperty(t.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}
1),t.prototype.forEach=function(t){this.edges.forEach(t)},t.prototype.map=function(t){return this.edges.map(t)},t.prototype.some=function(t){return this.edges.some(t)},t.prototype.isValid=function(){return!0},t.prototype.isHole=function(){var t=this,e=this.edges.reduce((function(e,r,n){return r.from.coordinates[1]>t.edges[e].from.coordinates[1]&&(e=n),e}),0),r=(0===e?this.length:e)-1,n=(e+1)%this.length,i=ct(this.edges[r].from.coordinates,this.edges[e].from.coordinates,this.edges[n].from.coordinates);return 0===i?this.edges[r].from.coordinates[0]>this.edges[n].from.coordinates[0]:i>0},t.prototype.toMultiPoint=function(){return a(this.edges.map((function(t){return t.from.coordinates})))},t.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map((function(t){return t.from.coordinates}));return t.push(this.edges[0].from.coordinates),this.polygon=o([t])},t.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=v(this.toPolygon())},t.findEdgeRingContaining=function(t,e){var r,n,o=t.getEnvelope();return e.forEach((function(e){var s=e.getEnvelope();if(n&&(r=n.getEnvelope()),!function(t,e){var r=t.geometry.coordinates[0].map((function(t){return t[0]})),n=t.geometry.coordinates[0].map((function(t){return t[1]})),i=e.geometry.coordinates[0].map((function(t){return t[0]})),o=e.geometry.coordinates[0].map((function(t){return t[1]}));return Math.max.apply(null,r)===Math.max.apply(null,i)&&Math.max.apply(null,n)===Math.max.apply(null,o)&&Math.min.apply(null,r)===Math.min.apply(null,i)&&Math.min.apply(null,n)===Math.min.apply(null,o)}(s,o)&&pt(s,o)){for(var a=t.map((function(t){return t.from.coordinates})),u=void 0,h=function(t){e.some((function(e){return r=t,n=e.from.coordinates,r[0]===n[0]&&r[1]===n[1];var r,n}))||(u=t)},l=0,f=a;l<f.length;l++){h(f[l])}u&&e.inside(i(u))&&(n&&!pt(r,s)||(n=e))}})),n},t.prototype.inside=function(t){return g(t,this.toPolygon())},t}(),mt=vt;!function(){function t(){this.edges=[],this.nodes={}}t.fromGeoJson=function(e){!function(t){if(!t)throw new Error("No geojson passed");if("FeatureCollection"!==t.type&&"GeometryCollection"!==t.type&&"MultiLineString"!==t.type&&"LineString"!==t.type&&"Feature"!==t.type)throw new Error("Invalid input type '"+t.type+"'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature")}(e);var r=new t;return f(e,(function(t){!function(t,e,r){if(!t)throw new Error("No feature passed");if(!r)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.geometry.type)}(t,"LineString","Graph::fromGeoJson"),function(t,e,r,n){var i=r;h(t,(function(t,n,o,s,a){i=0===n&&void 0===r?t:e(i,t,n,o,s,a)}),n)}(t,(function(t,e){if(t){var n=r.getNode(t),i=r.getNode(e);r.addEdge(n,i)}return e}))})),r},t.prototype.getNode=function(t){var e=dt.buildId(t),r=this.nodes[e];return r||(r=this.nodes[e]=new dt(t)),r},t.prototype.addEdge=function(t,e){var r=new yt(t,e),n=r.getSymetric();this.edges.push(r),this.edges.push(n)},t.prototype.deleteDangles=function(){var t=this;Object.keys(this.nodes).map((function(e){return t.nodes[e]})).forEach((function(e){return t._removeIfDangle(e)}))},t.prototype._removeIfDangle=function(t){var e=this;if(t.innerEdges.length<=1){var r=t.getOuterEdges().map((function(t){return t.to}));this.removeNode(t),r.forEach((function(t){return e._removeIfDangle(t)}))}},t.prototype.deleteCutEdges=function(){var t=this;this._computeNextCWEdges(),this._findLabeledEdgeRings(),this.edges.forEac
1h((function(e){e.label===e.symetric.label&&(t.removeEdge(e.symetric),t.removeEdge(e))}))},t.prototype._computeNextCWEdges=function(t){var e=this;"undefined"===typeof t?Object.keys(this.nodes).forEach((function(t){return e._computeNextCWEdges(e.nodes[t])})):t.getOuterEdges().forEach((function(e,r){t.getOuterEdge((0===r?t.getOuterEdges().length:r)-1).symetric.next=e}))},t.prototype._computeNextCCWEdges=function(t,e){for(var r,n,i=t.getOuterEdges(),o=i.length-1;o>=0;--o){var s=i[o],a=s.symetric,u=void 0,h=void 0;s.label===e&&(u=s),a.label===e&&(h=a),u&&h&&(h&&(n=h),u&&(n&&(n.next=u,n=void 0),r||(r=u)))}n&&(n.next=r)},t.prototype._findLabeledEdgeRings=function(){var t=[],e=0;return this.edges.forEach((function(r){if(!(r.label>=0)){t.push(r);var n=r;do{n.label=e,n=n.next}while(!r.isEqual(n));e++}})),t},t.prototype.getEdgeRings=function(){var t=this;this._computeNextCWEdges(),this.edges.forEach((function(t){t.label=void 0})),this._findLabeledEdgeRings().forEach((function(e){t._findIntersectionNodes(e).forEach((function(r){t._computeNextCCWEdges(r,e.label)}))}));var e=[];
1return this.edges.forEach((function(r){r.ring||e.push(t._findEdgeRing(r))})),e},t.prototype._findIntersectionNodes=function(t){var e=[],r=t,n=function(){var n=0;r.from.getOuterEdges().forEach((function(e){e.label===t.label&&++n})),n>1&&e.push(r.from),r=r.next};do{n()}while(!t.isEqual(r));return e},t.prototype._findEdgeRing=function(t){var e=t,r=new mt;do{r.push(e),e.ring=r,e=e.next}while(!t.isEqual(e));return r},t.prototype.removeNode=function(t){var e=this;t.getOuterEdges().forEach((function(t){return e.removeEdge(t)})),t.innerEdges.forEach((function(t){return e.removeEdge(t)})),delete this.nodes[t.id]},t.prototype.removeEdge=function(t){this.edges=this.edges.filter((function(e){return!e.isEqual(t)})),t.deleteEdge()}}();r(29657);r(52606);r(21160);function xt(t){for(var e=t,r=[];e.parent;)r.unshift(e),e=e.parent;return r}var bt={search:function(t,e,r,n){t.cleanDirty();var i=(n=n||{}).heuristic||bt.heuristics.manhattan,o=n.closest||!1,s=new Et((function(t){return t.f})),a=e;for(e.h=i(e,r),s.push(e);s.size()>0;){var u=s.pop();if(u===r)return xt(u);u.closed=!0;for(var h=t.neighbors(u),l=0,f=h.length;l<f;++l){var c=h[l];if(!c.closed&&!c.isWall()){var p=u.g+c.getCost(u),g=c.visited;(!g||p<c.g)&&(c.visited=!0,c.parent=u,c.h=c.h||i(c,r),c.g=p,c.f=c.g+c.h,t.markDirty(c),o&&(c.h<a.h||c.h===a.h&&c.g<a.g)&&(a=c),g?s.rescoreElement(c):s.push(c))}}}return o?xt(a):[]},heuristics:{manhattan:function(t,e){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},diagonal:function(t,e){var r=Math.sqrt(2),n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return 1*(n+i)+(r-2)*Math.min(n,i)}},cleanNode:function(t){t.f=0,t.g=0,t.h=0,t.visited=!1,t.closed=!1,t.parent=null}};function wt(t,e){e=e||{},this.nodes=[],this.diagonal=!!e.diagonal,this.grid=[];for(var r=0;r<t.length;r++){this.grid[r]=[];for(var n=0,i=t[r];n<i.length;n++){var o=new _t(r,n,i[n]);this.grid[r][n]=o,this.nodes.push(o)}}this.init()}function _t(t,e,r){this.x=t,this.y=e,this.weight=r}function Et(t){this.content=[],this.scoreFunction=t}wt.prototype.init=function(){this.dirtyNodes=[];for(var t=0;t<this.nodes.length;t++)bt.cleanNode(this.nodes[t])},wt.prototype.cleanDirty=function(){for(var t=0;t<this.dirtyNodes.length;t++)bt.cleanNode(this.dirtyNodes[t]);this.dirtyNodes=[]},wt.prototype.markDirty=function(t){this.dirtyNodes.push(t)},wt.prototype.neighbors=function(t){var e=[],r=t.x,n=t.y,i=this.grid;return i[r-1]&&i[r-1][n]&&e.push(i[r-1][n]),i[r+1]&&i[r+1][n]&&e.push(i[r+1][n]),i[r]&&i[r][n-1]&&e.push(i[r][n-1]),i[r]&&i[r][n+1]&&e.push(i[r][n+1]),this.diagonal&&(i[r-1]&&i[r-1][n-1]&&e.push(i[r-1][n-1]),i[r+1]&&i[r+1][n-1]&&e.push(i[r+1][n-1]),i[r-1]&&i[r-1][n+1]&&e.push(i[r-1][n+1]),i[r+1]&&i[r+1][n+1]&&e.push(i[r+1][n+1])),e},wt.prototype.toString=function(){for(var t,e,r,n,i=[],o=this.grid,s=0,a=o.length;s<a;s++){for(t=[],r=0,n=(e=o[s]).length;r<n;r++)t.push(e[r].weight);i.push(t.join(" "))}return i.join("\n")},_t.prototype.toString=function(){return"["+this.x+" "+this.y+"]"},_t.prototype.getCost=function(t){return t&&t.x!==this.x&&t.y!==this.y?1.41421*this.weight:this.weight},_t.prototype.isWall=function(){return 0===this.weight},Et.prototype={push:function(t){this.content.push(t),this.sinkDown(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.bubbleUp(0)),t},remove:function(t){var e=this.content.indexOf(t),r=this.content.pop();e!==this.content.length-1&&(this.content[e]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(e):this.bubbleUp(e))},size:function(){return this.content.length},rescoreElement:function(t){this.sinkDown(this.content.indexOf(t))},sinkDown:function(t){for(var e=this.content[t];t>0;){var r=(t+1>>1)-1,n=this.content[r];if(!(this.scoreFunction(e)<this.scoreFunction(n)))break;this.content[r]=e,this.content[t]=n,t=r}},bubbleUp:function(t){for(var e=this.content.length,r=this.content[t],n=this.scoreFunction(r);;){var i,o=t+1<<1,s=o-1,a=null;if(s<e){var u=this.content[s];(i=this.scoreFunction(u))<n&&(a=s)}if(o<e){var h=this.content[o];this.scoreFunction(h)<(null===a?n:i)&&(a=o)}if(null===a)break;this.content[t]=this.content[a],this.content[a]=r,t=a}}};function Mt(){this._=null}function St(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Pt(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function At(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function kt(t){for(;t.L;)t=t.L;return t}Mt.prototype={constructor:Mt,insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=kt(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(Pt(this,r),r=(t=r).U),r.C=!1,n.C=!0,At(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(At(this,r),r=(t=r).U),r.C=!1,n.C=!0,Pt(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,o=t.L,s=t.R;if(r=o?s?kt(s):o:s,i?i.L===t?i.L=r:i.R=r:this._=r,o&&s?(n=r.C,r.C=t.C,r.L=o,o.U=r,r!==s?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=s,s.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;
vendor: 2,850 bytes, line 1
1if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Pt(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,At(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Pt(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,At(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Pt(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,At(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Rt=Mt;function Ot(t,e,r,n){var i=[null,null],o=te.push(i)-1;return i.left=t,i.right=e,r&&Ct(i,t,e,r),n&&Ct(i,e,t,n),Ht[t.index].halfedges.push(o),Ht[e.index].halfedges.push(o),i}function It(t,e,r){var n=[e,r];return n.left=t,n}function Ct(t,e,r,n){t[0]||t[1]?t.left===r?t[1]=n:t[0]=n:(t[0]=n,t.left=e,t.right=r)}function Bt(t,e,r,n,i){var o,s=t[0],a=t[1],u=s[0],h=s[1],l=0,f=1,c=a[0]-u,p=a[1]-h;if(o=e-u,c||!(o>0)){if(o/=c,c<0){if(o<l)return;o<f&&(f=o)}else if(c>0){if(o>f)return;o>l&&(l=o)}if(o=n-u,c||!(o<0)){if(o/=c,c<0){if(o>f)return;o>l&&(l=o)}else if(c>0){if(o<l)return;o<f&&(f=o)}if(o=r-h,p||!(o>0)){if(o/=p,p<0){if(o<l)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>l&&(l=o)}if(o=i-h,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>l&&(l=o)}else if(p>0){if(o<l)return;o<f&&(f=o)}return!(l>0||f<1)||(l>0&&(t[0]=[u+l*c,h+l*p]),f<1&&(t[1]=[u+f*c,h+f*p]),!0)}}}}}function Lt(t,e,r,n,i){var o=t[1];if(o)return!0;var s,a,u=t[0],h=t.left,l=t.right,f=h[0],c=h[1],p=l[0],g=l[1],d=(f+p)/2,y=(c+g)/2;if(g===c){if(d<e||d>=n)return;if(f>p){if(u){if(u[1]>=i)return}else u=[d,r];o=[d,i]}else{if(u){if(u[1]<r)return}else u=[d,i];o=[d,r]}}else if(a=y-(s=(f-p)/(g-c))*d,s<-1||s>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(r-a)/s,r];o=[(i-a)/s,i]}else{if(u){if(u[1]<r)return}else u=[(i-a)/s,i];o=[(r-a)/s,r]}else if(c<g){if(u){if(u[0]>=n)return}else u=[e,s*e+a];o=[n,s*n+a]}else{if(u){if(u[0]<e)return}else u=[n,s*n+a];o=[e,s*e+a]}return t[0]=u,t[1]=o,!0}function Ft(t,e){var r=t.site,n=e.left,i=e.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=e[1],i=e[0]):(n=e[0],i=e[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function jt(t,e){return e[+(e.left!==t.site)]}function Yt(t,e){return e[+(e.left===t.site)]}var Xt,Nt=[];function zt(){St(this),this.x=this.y=this.arc=this.site=this.cy=null}function Tt(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,o=r.site;if(n!==o){var s=i[0],a=i[1],u=n[0]-s,h=n[1]-a,l=o[0]-s,f=o[1]-a,c=2*(u*f-h*l);if(!(c>=-re)){var p=u*u+h*h,g=l*l+f*f,d=(f*p-h*g)/c,y=(u*g-l*p)/c,v=Nt.pop()||new zt;v.arc=t,v.site=i,v.x=d+s,v.y=(v.cy=y+a)+Math.sqrt(d*d+y*y),t.circle=v;for(var m=null,x=Kt._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){m=x.P;break}x=x.L}else{if(!x.R){m=x;break}x=x.R}Kt.insert(m,v),m||(Xt=v)}}}}function Ut(t){var e=t.circle;e&&(e.P||(Xt=e.N),Kt.remove(e),Nt.push(e),St(e),t.circle=null)}var Dt=[];function qt(){St(this),this.edge=this.site=this.circle=null}function Gt(t){var e=Dt.pop()||new qt;return e.site=t,e}
vendor: 4,018 bytes, line 1
1function Zt(t){Ut(t),Vt.remove(t),Dt.push(t),St(t)}function $t(t){var e=t.circle,r=e.x,n=e.cy,i=[r,n],o=t.P,s=t.N,a=[t];Zt(t);for(var u=o;u.circle&&Math.abs(r-u.circle.x)<ee&&Math.abs(n-u.circle.cy)<ee;)o=u.P,a.unshift(u),Zt(u),u=o;a.unshift(u),Ut(u);for(var h=s;h.circle&&Math.abs(r-h.circle.x)<ee&&Math.abs(n-h.circle.cy)<ee;)s=h.N,a.push(h),Zt(h),h=s;a.push(h),Ut(h);var l,f=a.length;for(l=1;l<f;++l)h=a[l],u=a[l-1],Ct(h.edge,u.site,h.site,i);u=a[0],(h=a[f-1]).edge=Ot(u.site,h.site,null,i),Tt(u),Tt(h)}function Wt(t){for(var e,r,n,i,o=t[0],s=t[1],a=Vt._;a;)if((n=Jt(a,s)-o)>ee)a=a.L;else{if(!((i=o-Qt(a,s))>ee)){n>-ee?(e=a.P,r=a):i>-ee?(e=a,r=a.N):e=r=a;break}if(!a.R){e=a;break}a=a.R}!function(t){Ht[t.index]={site:t,halfedges:[]}}(t);var u=Gt(t);if(Vt.insert(e,u),e||r){if(e===r)return Ut(e),r=Gt(e.site),Vt.insert(u,r),u.edge=r.edge=Ot(e.site,u.site),Tt(e),void Tt(r);if(r){Ut(e),Ut(r);var h=e.site,l=h[0],f=h[1],c=t[0]-l,p=t[1]-f,g=r.site,d=g[0]-l,y=g[1]-f,v=2*(c*y-p*d),m=c*c+p*p,x=d*d+y*y,b=[(y*m-p*x)/v+l,(c*x-d*m)/v+f];Ct(r.edge,h,g,b),u.edge=Ot(h,t,null,b),r.edge=Ot(t,g,null,b),Tt(e),Tt(r)}else u.edge=Ot(e.site,u.site)}}function Jt(t,e){var r=t.site,n=r[0],i=r[1],o=i-e;if(!o)return n;var s=t.P;if(!s)return-1/0;var a=(r=s.site)[0],u=r[1],h=u-e;if(!h)return a;var l=a-n,f=1/o-1/h,c=l/h;return f?(-c+Math.sqrt(c*c-2*f*(l*l/(-2*h)-u+h/2+i-o/2)))/f+n:(n+a)/2}function Qt(t,e){var r=t.N;if(r)return Jt(r,e);var n=t.site;return n[1]===e?n[0]:1/0}var Vt,Ht,Kt,te,ee=1e-6,re=1e-12;function ne(t,e){return e[1]-t[1]||e[0]-t[0]}function ie(t,e){var r,n,i,o=t.sort(ne).pop();for(te=[],Ht=new Array(t.length),Vt=new Rt,Kt=new Rt;;)if(i=Xt,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===r&&o[1]===n||(Wt(o),r=o[0],n=o[1]),o=t.pop();else{if(!i)break;$t(i.arc)}if(function(){for(var t,e,r,n,i=0,o=Ht.length;i<o;++i)if((t=Ht[i])&&(n=(e=t.halfedges).length)){var s=new Array(n),a=new Array(n);for(r=0;r<n;++r)s[r]=r,a[r]=Ft(t,te[e[r]]);for(s.sort((function(t,e){return a[e]-a[t]})),r=0;r<n;++r)a[r]=e[s[r]];for(r=0;r<n;++r)e[r]=a[r]}}(),e){var s=+e[0][0],a=+e[0][1],u=+e[1][0],h=+e[1][1];!function(t,e,r,n){for(var i,o=te.length;o--;)Lt(i=te[o],t,e,r,n)&&Bt(i,t,e,r,n)&&(Math.abs(i[0][0]-i[1][0])>ee||Math.abs(i[0][1]-i[1][1])>ee)||delete te[o]}(s,a,u,h),function(t,e,r,n){var i,o,s,a,u,h,l,f,c,p,g,d,y=Ht.length,v=!0;for(i=0;i<y;++i)if(o=Ht[i]){for(s=o.site,a=(u=o.halfedges).length;a--;)te[u[a]]||u.splice(a,1);for(a=0,h=u.length;a<h;)g=(p=Yt(o,te[u[a]]))[0],d=p[1],f=(l=jt(o,te[u[++a%h]]))[0],c=l[1],(Math.abs(g-f)>ee||Math.abs(d-c)>ee)&&(u.splice(a,0,te.push(It(s,p,Math.abs(g-t)<ee&&n-d>ee?[t,Math.abs(f-t)<ee?c:n]:Math.abs(d-n)<ee&&r-g>ee?[Math.abs(c-n)<ee?f:r,n]:Math.abs(g-r)<ee&&d-e>ee?[r,Math.abs(f-r)<ee?c:e]:Math.abs(d-e)<ee&&g-t>ee?[Math.abs(c-e)<ee?f:t,e]:null))-1),++h);h&&(v=!1)}if(v){var m,x,b,w=1/0;for(i=0,v=null;i<y;++i)(o=Ht[i])&&(b=(m=(s=o.site)[0]-t)*m+(x=s[1]-e)*x)<w&&(w=b,v=o);if(v){var _=[t,e],E=[t,n],M=[r,n],S=[r,e];v.halfedges.push(te.push(It(s=v.site,_,E))-1,te.push(It(s,E,M))-1,te.push(It(s,M,S))-1,te.push(It(s,S,_))-1)}}for(i=0;i<y;++i)(o=Ht[i])&&(o.halfedges.length||delete Ht[i])}(s,a,u,h)}this.edges=te,this.cells=Ht,Vt=Kt=te=Ht=null}ie.prototype={constructor:ie,polygons:function(){var t=this.edges;return this.cells.map((function(e){var r=e.halfedges.map((function(r){return jt(e,t[r])}));return r.data=e.site.data,r}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(r,n){if(o=(i=r.halfedges).length)for(var i,o,s,a,u,h,l=r.site,f=-1,c=e[i[o-1]],p=c.left===l?c.right:c.left;++f<o;)s=p,p=(c=e[i[f]]).left===l?c.right:c.left,s&&p&&n<s.index&&n<p.index&&(u=s,h=p,((a=l)[0]-h[0])*(u[1]-a[1])-(a[0]-u[0])*(h[1]-a[1])<0)&&t.push([l.data,s.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,r){for(var n,i,o=this,s=o._found||0,a=o.cells.length;!(i=o.cells[s]);)if(++s>=a)return null;var u=t-i.site[0],h=e-i.site[1],l=u*u+h*h;
1do{i=o.cells[n=s],s=null,i.halfedges.forEach((function(r){var n=o.edges[r],a=n.left;if(a!==i.site&&a||(a=n.right)){var u=t-a[0],h=e-a[1],f=u*u+h*h;f<l&&(l=f,s=a.index)}}))}while(null!==s);return o._found=n,null==r||l<=r*r?i.site:null}};r(32676);r(20675);function oe(){return new se}function se(){this.reset()}se.prototype={constructor:se,reset:function(){this.s=this.t=0},add:function(t){ue(ae,t,this.t),ue(this,ae.s,this.s),this.s?this.t+=ae.t:this.s=ae.t},valueOf:function(){return this.s}};var ae=new se;function ue(t,e,r){var n=t.s=e+r,i=n-e,o=n-i;t.t=e-o+(r-i)}var he=1e-6,le=Math.PI,fe=le/2,ce=le/4,pe=2*le,ge=le/180,de=Math.abs,ye=Math.atan,ve=Math.atan2,me=Math.cos,xe=(Math.ceil,Math.exp),be=(Math.floor,Math.log),we=(Math.pow,Math.sin),_e=(Math.sign,Math.sqrt),Ee=Math.tan;function Me(t){return t>1?fe:t<-1?-fe:Math.asin(t)}function Se(){}oe(),oe();function Pe(t){var e=t[0],r=t[1],n=me(r);return[n*me(e),n*we(e),we(r)]}function Ae(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ke(t){var e=_e(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}oe();function Re(t,e){return[t>le?t-pe:t<-le?t+pe:t,e]}function Oe(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function Ie(t,e,r,n,i){var o,s,a=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,r,n=t[0],s=t[e];if(l=s,de((h=n)[0]-l[0])<he&&de(h[1]-l[1])<he){for(i.lineStart(),o=0;o<e;++o)i.point((n=t[o])[0],n[1]);i.lineEnd()}else{var h,l;a.push(r=new Oe(n,t,null,!0)),u.push(r.o=new Oe(n,null,r,!1)),a.push(r=new Oe(s,t,null,!1)),u.push(r.o=new Oe(s,null,r,!0))}}})),a.length){for(u.sort(e),Ce(a),Ce(u),o=0,s=u.length;o<s;++o)u[o].e=r=!r;for(var h,l,f=a[0];;){for(var c=f,p=!0;c.v;)if((c=c.n)===f)return;h=c.z,i.lineStart();do{if(c.v=c.o.v=!0,c.e){if(p)for(o=0,s=h.length;o<s;++o)i.point((l=h[o])[0],l[1]);else n(c.x,c.n.x,1,i);c=c.n}else{if(p)for(h=c.p.z,o=h.length-1;o>=0;--o)i.point((l=h[o])[0],l[1]);else n(c.x,c.p.x,-1,i);c=c.p}h=(c=c.o).z,p=!p}while(!c.v);i.lineEnd()}}}function Ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n<e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function Be(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}Re.invert=Re;var Le=function(t){var e;return 1===t.length&&(e=t,t=function(t,r){return Be(e(t),r)}),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var o=n+i>>>1;t(e[o],r)<0?n=o+1:i=o}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var o=n+i>>>1;t(e[o],r)>0?i=o:n=o+1}return n}}}(Be),Fe=(Le.right,Le.left,Array.prototype);Fe.slice,Fe.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var je=oe();function Ye(t,e){var r=e[0],n=e[1],i=[we(r),-me(r),0],o=0,s=0;je.reset();for(var a=0,u=t.length;a<u;++a)if(l=(h=t[a]).length)for(var h,l,f=h[l-1],c=f[0],p=f[1]/2+ce,g=we(p),d=me(p),y=0;y<l;++y,c=m,g=b,d=w,f=v){var v=h[y],m=v[0],x=v[1]/2+ce,b=we(x),w=me(x),_=m-c,E=_>=0?1:-1,M=E*_,S=M>le,P=g*b;if(je.add(ve(P*E*we(M),d*w+P*me(M))),o+=S?_+E*pe:_,S^c>=r^m>=r){var A=Ae(Pe(f),Pe(v));ke(A);var k=Ae(i,A);ke(k);var R=(S^_>=0?-1:1)*Me(k[2]);(n>R||n===R&&(A[0]||A[1]))&&(s+=S^_>=0?1:-1)}}return(o<-1e-6||o<he&&je<-1e-6)^1&s}oe();oe(),oe();oe();function Xe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ne(t){return t.length>1}function ze(t,e){return((t=t.x)[0]<0?t[1]-fe-he:fe-t[1])-((e=e.x)[0]<0?e[1]-fe-he:fe-e[1])}Xe(4.5);function Te(t){return function(e){var r=new Ue;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ue(){}Ue.prototype={constructor:Ue,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};me(30*ge);Te({point:function(t,e){this.stream.point(t*ge,e*ge)}});function De(t){return function(e,r){var n=me(e),i=me(r),o=t(n*i);return[o*i*we(e),o*we(r)]}}function qe(t){return function(e,r){var n=_e(e*e+r*r),i=t(n),o=we(i),s=me(i);return[ve(e*o,n*s),Me(n&&r*o/n)]}}var Ge=De((function(t){return _e(2/(1+t))}));Ge.invert=qe((function(t){return 2*Me(t/2)}));var Ze=De((function(t){return(t=(e=t)>
vendor: 1,007 bytes, line 1
11?0:e<-1?le:Math.acos(e))&&t/we(t);var e}));function $e(t,e){return[t,be(Ee((fe+e)/2))]}function We(t,e){return[t,e]}function Je(t,e){var r=me(e),n=me(t)*r;return[r*we(t)/n,we(e)/n]}function Qe(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function Ve(t,e){return[me(e)*we(t),we(e)]}function He(t,e){var r=me(e),n=1+me(t)*r;return[r*we(t)/n,we(e)/n]}function Ke(t,e){return[be(Ee((fe+e)/2)),-t]}Ze.invert=qe((function(t){return t})),$e.invert=function(t,e){return[t,2*ye(xe(e))-fe]},We.invert=We,Je.invert=qe(ye),Qe.invert=function(t,e){var r,n=e,i=25;do{var o=n*n,s=o*o;n-=r=(n*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(de(r)>he&&--i>0);return[t/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]},Ve.invert=qe(Me),He.invert=qe((function(t){return 2*ye(t)})),Ke.invert=function(t,e){return[-e,2*ye(xe(t))-fe]}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.