UNPKG

@ngageoint/mage.web-app

Version:

The MAGE web-app is the UI for interacting with the MAGE service in a web browser.

1 lines 3.22 MB
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[392],{31690:function($,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(e,l,f,g){void 0===g&&(g=f);var d=Object.getOwnPropertyDescriptor(l,f);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(e,g,d)}:function(e,l,f,g){void 0===g&&(g=f),e[g]=l[f]}),a=this&&this.__exportStar||function(e,l){for(var f in e)"default"!==f&&!Object.prototype.hasOwnProperty.call(l,f)&&O(l,e,f)};Object.defineProperty(x,"__esModule",{value:!0}),a(S(62379),x),a(S(88871),x),a(S(82919),x)},62379:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Color=void 0;const O=S(88871),a=S(82919);class e{constructor(){this.red=0,this.green=0,this.blue=0,this.opacity=1}static black(){return e.color(O.ColorConstants.BLACK)}static blue(){return e.color(O.ColorConstants.BLUE)}static brown(){return e.color(O.ColorConstants.BROWN)}static cyan(){return e.color(O.ColorConstants.CYAN)}static darkGray(){return e.color(O.ColorConstants.DKGRAY)}static gray(){return e.color(O.ColorConstants.GRAY)}static green(){return e.color(O.ColorConstants.GREEN)}static lightGray(){return e.color(O.ColorConstants.LTGRAY)}static magenta(){return e.color(O.ColorConstants.MAGENTA)}static orange(){return e.color(O.ColorConstants.ORANGE)}static pink(){return e.color(O.ColorConstants.PINK)}static purple(){return e.color(O.ColorConstants.PURPLE)}static red(){return e.color(O.ColorConstants.RED)}static violet(){return e.color(O.ColorConstants.VIOLET)}static white(){return e.color(O.ColorConstants.WHITE)}static yellow(){return e.color(O.ColorConstants.YELLOW)}static color(f){const g=new e;return g.setColor(f),g}setColor(f){if("number"==typeof f)this.setRed(a.ColorUtils.getRed(f)),this.setGreen(a.ColorUtils.getGreen(f)),this.setBlue(a.ColorUtils.getBlue(f)),(f>16777215||f<0)&&this.setAlpha(a.ColorUtils.getAlpha(f));else{this.setRed(a.ColorUtils.getRed(f)),this.setGreen(a.ColorUtils.getGreen(f)),this.setBlue(a.ColorUtils.getBlue(f));const g=a.ColorUtils.getAlpha(f);null!=g&&this.setAlpha(g)}}setColorByHSL(f,g,d,_){const s=a.ColorUtils.toArithmeticRGBFromHSL(f,g,d);this.setRed(s[0]),this.setGreen(s[1]),this.setBlue(s[2]),_&&this.setAlpha(_)}setRed(f){"number"==typeof f&&Number.isInteger(f)&&0!==f&&1!==f&&(f=a.ColorUtils.toHex(f)),"string"==typeof f&&(f=a.ColorUtils.toArithmeticRGB(f)),a.ColorUtils.validateArithmeticRGB(f),this.red=f}setGreen(f){"number"==typeof f&&Number.isInteger(f)&&0!==f&&1!==f&&(f=a.ColorUtils.toHex(f)),"string"==typeof f&&(f=a.ColorUtils.toArithmeticRGB(f)),a.ColorUtils.validateArithmeticRGB(f),this.green=f}setBlue(f){"number"==typeof f&&Number.isInteger(f)&&0!==f&&1!==f&&(f=a.ColorUtils.toHex(f)),"string"==typeof f&&(f=a.ColorUtils.toArithmeticRGB(f)),a.ColorUtils.validateArithmeticRGB(f),this.blue=f}setOpacity(f){a.ColorUtils.validateArithmeticRGB(f),this.opacity=f}setAlpha(f){("string"==typeof f||Number.isInteger(f)&&0!==f&&1!==f)&&(f=a.ColorUtils.toArithmeticRGB(f)),this.setOpacity(f)}isOpaque(){return 1===this.opacity}getColorHex(){return a.ColorUtils.toColor(this.getRedHex(),this.getGreenHex(),this.getBlueHex())}getColorHexWithAlpha(){return a.ColorUtils.toColorWithAlpha(this.getRedHex(),this.getGreenHex(),this.getBlueHex(),this.getAlphaHex())}getColorHexShorthand(){return a.ColorUtils.toColorShorthand(this.getRedHex(),this.getGreenHex(),this.getBlueHex())}getColorHexShorthandWithAlpha(){return a.ColorUtils.toColorShorthandWithAlpha(this.getRedHex(),this.getGreenHex(),this.getBlueHex(),this.getAlphaHex())}getColor(){return a.ColorUtils.toColor(this.getRed(),this.getGreen(),this.getBlue())}getColorWithAlpha(){return a.ColorUtils.toColorWithAlpha(this.getRed(),this.getGreen(),this.getBlue(),this.getAlpha())}getRedHex(){return a.ColorUtils.toHex(this.red)}getGreenHex(){return a.ColorUtils.toHex(this.green)}getBlueHex(){return a.ColorUtils.toHex(this.blue)}getAlphaHex(){return a.ColorUtils.toHex(this.opacity)}getRedHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getRedHex())}getGreenHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getGreenHex())}getBlueHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getBlueHex())}getAlphaHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getAlphaHex())}getRed(){return a.ColorUtils.toRGB(this.red)}getGreen(){return a.ColorUtils.toRGB(this.green)}getBlue(){return a.ColorUtils.toRGB(this.blue)}getAlpha(){return a.ColorUtils.toRGB(this.opacity)}getRedArithmetic(){return this.red}getGreenArithmetic(){return this.green}getBlueArithmetic(){return this.blue}getOpacity(){return this.opacity}getAlphaArithmetic(){return this.getOpacity()}getHSL(){return a.ColorUtils.toHSL(this.red,this.green,this.blue)}getHue(){return this.getHSL()[0]}getSaturation(){return this.getHSL()[1]}getLightness(){return this.getHSL()[2]}copy(){const f=new e;return f.red=this.red,f.green=this.green,f.blue=this.blue,f.opacity=this.opacity,f}setRGB(f,g,d,_){this.setRed(f),this.setGreen(g),this.setBlue(d),_&&this.setAlpha(_)}}x.Color=e},88871:($,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.ColorConstants=void 0;class S{}x.ColorConstants=S,S.BLACK="#000000",S.BLUE="#0000FF",S.BROWN="#A52A2A",S.CYAN="#00FFFF",S.DKGRAY="#444444",S.GRAY="#888888",S.GREEN="#00FF00",S.LTGRAY="#CCCCCC",S.MAGENTA="#FF00FF",S.ORANGE="#FFA500",S.PINK="#FFC0CB",S.PURPLE="#800080",S.RED="#FF0000",S.VIOLET="#EE82EE",S.WHITE="#FFFFFF",S.YELLOW="#FFFF00"},82919:($,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.ColorUtils=void 0;class S{static toColorShorthand(a,e,l){return S.shorthandHex(S.toColor(a,e,l))}static toColorShorthandWithDefaultAlpha(a,e,l){return S.shorthandHex(S.toColorWithDefaultAlpha(a,e,l))}static toColorShorthandWithAlpha(a,e,l,f){return S.shorthandHex(S.toColorWithAlpha(a,e,l,f))}static toColor(a,e,l){let f;return f=S.toColorWithAlpha(a,e,l,"number"==typeof a?-1:null),f}static toColorWithDefaultAlpha(a,e,l){let f;if("number"==typeof a)f=S.toColorWithAlpha(a,e,l,255);else{let g="FF";null!==a&&a.length>0&&a.charAt(0).toLowerCase()===a.charAt(0)&&(g=g.toLowerCase()),f=S.toColorWithAlpha(a,e,l,g)}return f}static toColorWithAlpha(a,e,l,f){let g="";return"number"==typeof a&&"number"==typeof e&&"number"==typeof l?(S.validateRGB(a),S.validateRGB(e),S.validateRGB(l),g=(255&a)<<16|(255&e)<<8|255&l,"number"==typeof f&&-1!==f&&(S.validateRGB(f),g|=(255&f)<<24)):"string"==typeof a&&"string"==typeof e&&"string"==typeof l&&(S.validateHexSingle(a),S.validateHexSingle(e),S.validateHexSingle(l),g="#",null!=f&&"string"==typeof f&&(g+=S.expandShorthandHexSingle(f)),g+=S.expandShorthandHexSingle(a),g+=S.expandShorthandHexSingle(e),g+=S.expandShorthandHexSingle(l)),g}static toHex(a){let e;return(!Number.isInteger(a)||1===a||0===a)&&(a=S.toRGB(a)),S.validateRGB(a),e=a.toString(16).toUpperCase(),1===e.length&&(e="0"+e),e}static toHSL(a,e,l){Number.isInteger(a)&&0!==a&&1!==a&&(a=S.toArithmeticRGB(a)),Number.isInteger(e)&&0!==e&&1!==e&&(e=S.toArithmeticRGB(e)),Number.isInteger(l)&&0!==l&&1!==l&&(l=S.toArithmeticRGB(l)),S.validateArithmeticRGB(a),S.validateArithmeticRGB(e),S.validateArithmeticRGB(l);const f=Math.min(Math.min(a,e),l),g=Math.max(Math.max(a,e),l),d=g-f;let _=0;d>0&&(_=a>=e&&a>=l?(e-l)/d:e>=l?2+(l-a)/d:4+(a-e)/d),_*=60,_<0&&(_+=360);const s=f+g,o=s/2;let c;return c=f===g?0:o<.5?d/s:d/(2-g-f),[_,c,o]}static toArithmeticRGB(a){return"string"==typeof a&&(a=S.toRGB(a)),Number.isInteger(a)&&0!==a&&1!==a&&(S.validateRGB(a),a/=255),a}static toArithmeticRGBFromHSL(a,e,l){let f;S.validateHue(a),S.validateSaturation(e),S.validateLightness(l),f=l<=.5?l*(e+1):l+e-l*e;const g=2*l-f;return[S.hslConvert(g,f,2+(a/=60)),S.hslConvert(g,f,a),S.hslConvert(g,f,a-2)]}static toRGB(a){let e;return"number"==typeof a?(S.validateArithmeticRGB(a),e=Math.round(255*a)):(S.validateHexSingle(a),1===a.length&&(a+=a),e=parseInt(a,16)),e}static toRGBFromHSL(a,e,l){const f=S.toArithmeticRGBFromHSL(a,e,l);return[S.toRGB(f[0]),S.toRGB(f[1]),S.toRGB(f[2])]}static hslConvert(a,e,l){let f;return l<0&&(l+=6),l>=6&&(l-=6),f=l<1?(e-a)*l+a:l<3?e:l<4?(e-a)*(4-l)+a:a,f}static getHexSingle(a,e){S.validateHex(a),a.startsWith("#")&&(a=a.substring(1));let l=1,f=a.length;f>4&&(l++,f/=2);let g=null;if(e>=0||f>3){f>3&&e++;let d=e;l>1&&(d*=2),g=a.substring(d,d+l),g=S.expandShorthandHexSingle(g)}return g}static getRed(a){let e;return e="number"==typeof a?a>>16&255:S.getHexSingle(a,0),e}static getGreen(a){let e;return e="number"==typeof a?a>>8&255:S.getHexSingle(a,1),e}static getBlue(a){let e;return e="number"==typeof a?255&a:S.getHexSingle(a,2),e}static getAlpha(a){let e=null;return e="number"==typeof a?a>>24&255:S.getHexSingle(a,-1),e}static shorthandHex(a){if(S.validateHex(a),a.length>5){let e="",l=0;for(a.startsWith("#")&&(e+="#",l++);l<a.length;l+=2){const f=S.shorthandHexSingle(a.substring(l,l+2));if(f.length>1){e=null;break}e+=f}null!=e&&(a=e.toString())}return a}static expandShorthandHex(a){if(S.validateHex(a),a.length<6){let e="",l=0;for(a.startsWith("#")&&(e+="#",l++);l<a.length;l++)e+=S.expandShorthandHexSingle(a.substring(l,l+1));a=e.toString()}return a}static shorthandHexSingle(a){return S.validateHexSingle(a),a.length>1&&a.charAt(0).toUpperCase()===a.charAt(1).toUpperCase()&&(a=a.substring(0,1)),a}static expandShorthandHexSingle(a){return S.validateHexSingle(a),1===a.length&&(a+=a),a}static isValidHex(a){return null!==a&&S.hexColorPattern.test(a)}static validateHex(a){if(!S.isValidHex(a))throw new Error("Hex color must be in format #RRGGBB, #RGB, #AARRGGBB, #ARGB, RRGGBB, RGB, AARRGGBB, or ARGB, invalid value: "+a)}static isValidHexSingle(a){return null!==a&&S.hexSingleColorPattern.test(a)}static validateHexSingle(a){if(!S.isValidHexSingle(a))throw new Error("Must be in format FF or F, invalid value: "+a)}static isValidRGB(a){return a>=0&&a<=255}static validateRGB(a){if(!S.isValidRGB(a))throw new Error("Must be inclusively between 0 and 255, invalid value: "+a)}static isValidArithmeticRGB(a){return a>=0&&a<=1}static validateArithmeticRGB(a){if(!S.isValidArithmeticRGB(a))throw new Error("Must be inclusively between 0.0 and 1.0, invalid value: "+a)}static isValidHue(a){return a>=0&&a<=360}static validateHue(a){if(!S.isValidHue(a))throw new Error("Must be inclusively between 0.0 and 360.0, invalid value: "+a)}static isValidSaturation(a){return a>=0&&a<=1}static validateSaturation(a){if(!S.isValidSaturation(a))throw new Error("Must be inclusively between 0.0 and 1.0, invalid value: "+a)}static isValidLightness(a){return a>=0&&a<=1}static validateLightness(a){if(!S.isValidLightness(a))throw new Error("Must be inclusively between 0.0 and 1.0, invalid value: "+a)}}x.ColorUtils=S,S.hexColorPattern=new RegExp("^#?(([0-9a-fA-F]{3}){1,2}|([0-9a-fA-F]{4}){1,2})$"),S.hexSingleColorPattern=new RegExp("^[0-9a-fA-F]{1,2}$")},54408:function($,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(e,l,f,g){void 0===g&&(g=f);var d=Object.getOwnPropertyDescriptor(l,f);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(e,g,d)}:function(e,l,f,g){void 0===g&&(g=f),e[g]=l[f]}),a=this&&this.__exportStar||function(e,l){for(var f in e)"default"!==f&&!Object.prototype.hasOwnProperty.call(l,f)&&O(l,e,f)};Object.defineProperty(x,"__esModule",{value:!0}),a(S(26947),x),a(S(85589),x),a(S(31210),x),a(S(62446),x),a(S(32011),x),a(S(42117),x),a(S(34174),x),a(S(80187),x),a(S(48576),x),a(S(17917),x),a(S(38442),x),a(S(93832),x),a(S(57997),x),a(S(5729),x),a(S(57151),x),a(S(98291),x)},26947:function($,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(o,c,u,p){void 0===p&&(p=u);var y=Object.getOwnPropertyDescriptor(c,u);(!y||("get"in y?!c.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(o,p,y)}:function(o,c,u,p){void 0===p&&(p=u),o[p]=c[u]}),a=this&&this.__setModuleDefault||(Object.create?function(o,c){Object.defineProperty(o,"default",{enumerable:!0,value:c})}:function(o,c){o.default=c}),e=this&&this.__importStar||function(o){if(o&&o.__esModule)return o;var c={};if(null!=o)for(var u in o)"default"!==u&&Object.prototype.hasOwnProperty.call(o,u)&&O(c,o,u);return a(c,o),c};Object.defineProperty(x,"__esModule",{value:!0}),x.GARS=void 0;const l=S(95523),f=S(85589),g=S(31210),d=S(93832),_=e(S(56104));class s{constructor(c,u,p=f.GARSConstants.DEFAULT_QUADRANT,y=f.GARSConstants.DEFAULT_KEYPAD){this.longitude=c,this.latitude=u,this.quadrant=p,this.keypad=y}static create(c,u,p,y){return new s(c,u,p,y)}getLongitude(){return this.longitude}getLatitude(){return this.latitude}getQuadrant(){return this.quadrant}getKeypad(){return this.keypad}coordinate(c=d.GridType.FIVE_MINUTE){let u=_.sprintf("%03d",this.longitude.toString());return u+=this.latitude,(c===d.GridType.FIFTEEN_MINUTE||c===d.GridType.FIVE_MINUTE)&&(u+=this.quadrant,c===d.GridType.FIVE_MINUTE&&(u+=this.keypad)),u}toPoint(){let c=g.GARSUtils.getLongitude(this.longitude),u=g.GARSUtils.getLatitude(this.latitude);return c+=g.GARSUtils.quadrantColumn(this.quadrant)*d.GridType.FIFTEEN_MINUTE,u+=g.GARSUtils.quadrantRow(this.quadrant)*d.GridType.FIFTEEN_MINUTE,c+=g.GARSUtils.keypadColumn(this.keypad)*d.GridType.FIVE_MINUTE,u+=g.GARSUtils.keypadRow(this.keypad)*d.GridType.FIVE_MINUTE,new l.Point(c,u)}toString(){return this.coordinate()}equals(c){return this===c||!(!c||typeof this!=typeof c)&&!(this.keypad!==c.keypad||this.latitude!==c.latitude||this.longitude!==c.longitude||this.quadrant!==c.quadrant)}static isGARS(c){c=this.removeSpaces(c);let u=!1;if(this.garsPattern.test(c)){const p=c.match(this.garsPattern);if(p){const y=Number.parseInt(p[1],10);if(u=y>=f.GARSConstants.MIN_BAND_NUMBER&&y<=f.GARSConstants.MAX_BAND_NUMBER,u){const b=p[2].toUpperCase(),C=g.GARSUtils.bandValue(b);u=C>=f.GARSConstants.MIN_BAND_LETTERS_NUMBER&&C<=f.GARSConstants.MAX_BAND_LETTERS_NUMBER}}}return u}static removeSpaces(c){return c.replace("\\s","")}static fromPoint(c){return c=c.toDegrees(),this.from(c.getLongitude(),c.getLatitude())}static from(c,u){const p=g.GARSUtils.getLongitudeDecimalBand(c),y=g.GARSUtils.getLatitudeDecimalBandValue(u),b=~~p,C=~~y,D=g.GARSUtils.bandLetters(C);let P=p-b,A=y-C;const N=2*P,j=2*A,H=~~N,F=~~j,J=g.GARSUtils.quadrant(H,F);P=N-H,A=j-F;const te=g.GARSUtils.keypad(~~(3*P),~~(3*A));return s.create(b,D,J,te)}static parse(c){if(c=this.removeSpaces(c),!this.garsPattern.test(c))throw new Error("Invalid GARS: "+c);const u=c.match(this.garsPattern),p=Number.parseInt(u[1],10);if(p<f.GARSConstants.MIN_BAND_NUMBER||p>f.GARSConstants.MAX_BAND_NUMBER)throw new Error("Invalid GARS longitude: "+u[1]+", GARS: "+c);const y=u[2].toUpperCase(),b=g.GARSUtils.bandValue(y);if(b<f.GARSConstants.MIN_BAND_LETTERS_NUMBER||b>f.GARSConstants.MAX_BAND_LETTERS_NUMBER)throw new Error("Invalid GARS latitude: "+u[2]+", GARS: "+c);let C=f.GARSConstants.DEFAULT_QUADRANT,D=f.GARSConstants.DEFAULT_KEYPAD;const P=u[3];if(null!=P){C=Number.parseInt(P,10);const A=u[4];null!=A&&(D=Number.parseInt(A,10))}return s.create(p,y,C,D)}static precision(c){if(c=this.removeSpaces(c),!this.garsPattern.test(c))throw new Error("Invalid GARS: "+c);const u=c.match(this.garsPattern);let p;return p=null!=u[4]?d.GridType.FIVE_MINUTE:null!=u[3]?d.GridType.FIFTEEN_MINUTE:d.GridType.THIRTY_MINUTE,p}}x.GARS=s,s.garsPattern=new RegExp("^(\\d{3})([A-HJ-NP-Z]{2})(?:([1-4])([1-9])?)?$","i")},85589:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GARSConstants=void 0;const O=S(95523);class a{}x.GARSConstants=a,a.MIN_LON=O.GridConstants.MIN_LON,a.MAX_LON=O.GridConstants.MAX_LON,a.MIN_LAT=O.GridConstants.MIN_LAT,a.MAX_LAT=O.GridConstants.MAX_LAT,a.MIN_BAND_NUMBER=1,a.MAX_BAND_NUMBER=720,a.MIN_BAND_LETTERS="AA",a.MAX_BAND_LETTERS="QZ",a.MIN_BAND_LETTER="A",a.MAX_BAND_LETTER="Z",a.MIN_BAND_LETTERS_NUMBER=1,a.MAX_BAND_LETTERS_NUMBER=360,a.DEFAULT_QUADRANT=3,a.DEFAULT_KEYPAD=7},31210:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GARSUtils=void 0;const O=S(95523),a=S(85589),e=S(93832);x.GARSUtils=class l{static getLongitude(g){return a.GARSConstants.MIN_LON+(g-1)*e.GridType.THIRTY_MINUTE}static getLatitude(g){return"string"==typeof g&&(g=this.bandValue(g)),a.GARSConstants.MIN_LAT+(g-1)*e.GridType.THIRTY_MINUTE}static getLongitudeBand(g){return this.getLongitudeDecimalBand(g)}static getLongitudeDecimalBand(g){return(g-a.GARSConstants.MIN_LON)/e.GridType.THIRTY_MINUTE+1}static getLatitudeBand(g){return this.bandLetters(this.getLatitudeBandValue(g))}static getLatitudeBandValue(g){return this.getLatitudeDecimalBandValue(g)}static getLatitudeDecimalBandValue(g){return(g-a.GARSConstants.MIN_LAT)/e.GridType.THIRTY_MINUTE+1}static bandValue(g){if(1===g.length)return this.bandValueFromChar(g.charCodeAt(0));const d=g.toUpperCase();return 24*(this.bandValueFromChar(d.charCodeAt(0))-1)+this.bandValueFromChar(d.charCodeAt(1))}static bandValueFromChar(g){let d=g-a.GARSConstants.MIN_BAND_LETTER.charCodeAt(0)+1;return g>O.GridConstants.BAND_LETTER_OMIT_I.charCodeAt(0)&&(d--,g>O.GridConstants.BAND_LETTER_OMIT_O.charCodeAt(0)&&d--),d}static bandLetters(g){const _=(g-=1)%24;return this.bandLetter(g/24+1)+this.bandLetter(_+1)}static bandLetter(g){let d=a.GARSConstants.MIN_BAND_LETTER.charCodeAt(0);return d+=g-1,d>=O.GridConstants.BAND_LETTER_OMIT_I.charCodeAt(0)&&(d++,d>=O.GridConstants.BAND_LETTER_OMIT_O.charCodeAt(0)&&d++),String.fromCharCode(d)}static quadrantColumn(g){return g%2==0?1:0}static quadrantRow(g){return g>=3?0:1}static keypadColumn(g){let d=0;return g%3==0?d=2:(g+1)%3==0&&(d=1),d}static keypadRow(g){let d=0;return g<=3?d=2:g<=6&&(d=1),d}static quadrant(g,d){return 2*(1-d)+g+1}static keypad(g,d){return 3*(2-d)+g+1}static getDegreeLabel(g,d){let _="";return _+=Math.abs(g),_+=g<0?O.GridConstants.WEST_CHAR:O.GridConstants.EAST_CHAR,_+=Math.abs(d),_+=d<0?O.GridConstants.SOUTH_CHAR:O.GridConstants.NORTH_CHAR,_.toString()}static nextPrecision(g,d){let _=g;return d<e.GridType.FIFTEEN_MINUTE?_=O.GridUtils.precisionAfter(g+.5*d,d):_+=d,_}}},62446:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridLine=void 0;const O=S(95523);class a extends O.Line{static line(l,f,g){const d=new a;return d.setPoints(l,f),d.setGridType(g),d}static lineFromLine(l,f){const g=new a;g.hasZ=l.hasZ,g.hasM=l.hasM;for(const d of l.points)g.addPoint(d.copy());return g.setGridType(f),g}getGridType(){return this.gridType}hasGridType(){return null!=this.gridType}setGridType(l){this.gridType=l}copy(){const l=new a(this);return l.setGridType(this.gridType),l}equals(l){return this===l||!(!super.equals(l)||typeof this!=typeof l)&&this.gridType===l.gridType}}x.GridLine=a},32011:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BandLettersRange=void 0;const O=S(85589),a=S(31210);class e{constructor(f=O.GARSConstants.MIN_BAND_LETTERS,g=O.GARSConstants.MAX_BAND_LETTERS){this.south=f,this.north=g,this.value=this.getSouthValue(),this.maxValue=this.getNorthValue()}getSouth(){return this.south}setSouth(f){this.south=f}getNorth(){return this.north}setNorth(f){this.north=f}getSouthValue(){return a.GARSUtils.bandValue(this.south)}getNorthValue(){return a.GARSUtils.bandValue(this.north)}getSouthLatitude(){return a.GARSUtils.getLatitude(this.south)}getNorthLatitude(){return a.GARSUtils.getLatitude(this.north)}next(){return this.value<=this.maxValue?{done:!1,value:a.GARSUtils.bandLetters(this.value++)}:{done:!0,value:null}}reset(){this.value=this.getSouthValue()}[Symbol.iterator](){return this}}x.BandLettersRange=e},42117:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BandNumberRange=void 0;const O=S(85589),a=S(31210);class e{constructor(f=O.GARSConstants.MIN_BAND_NUMBER,g=O.GARSConstants.MAX_BAND_NUMBER){this.west=f,this.east=g,this.bandNumber=this.west}getWest(){return this.west}setWest(f){this.west=f}getEast(){return this.east}setEast(f){this.east=f}getWestLongitude(){return a.GARSUtils.getLongitude(this.west)}getEastLongitude(){return a.GARSUtils.getLongitude(this.east)}next(){return this.bandNumber<=this.east?{done:!1,value:this.bandNumber++}:{done:!0,value:null}}[Symbol.iterator](){return this}}x.BandNumberRange=e},34174:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GARSLabeler=void 0;const O=S(95523),a=S(26947),e=S(31210),l=S(48576),f=S(17917),g=S(93832);x.GARSLabeler=class d extends f.GridLabeler{constructor(s,o=0,c,u,p,y){super(s,o,c,u,p,y)}getLabels(s,o){const c=[];for(let u=(s=s.toPrecision(o)).getMinLongitude();u<=s.getMaxLongitude();u=e.GARSUtils.nextPrecision(u,o))for(let p=s.getMinLatitude();p<=s.getMaxLatitude();p=e.GARSUtils.nextPrecision(p,o)){const y=O.Bounds.degrees(u,p,u+o,p+o),b=y.getCentroid(),C=a.GARS.fromPoint(b);let D=null;switch(o){case g.GridType.TWENTY_DEGREE:case g.GridType.TEN_DEGREE:case g.GridType.FIVE_DEGREE:case g.GridType.ONE_DEGREE:D=e.GARSUtils.getDegreeLabel(u,p);break;default:D=C.coordinate(o)}c.push(new l.GridLabel(D,b,y,o,C))}return c}}},80187:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Grid=void 0;const O=S(95523),a=S(62446),e=S(31210),l=S(98291),f=S(57997);class g extends O.BaseGrid{constructor(_){super(),this.styles=new Map,this.type=_}getType(){return this.type}isType(_){return this.type===_}getPrecision(){return f.GridTypeUtils.getPrecision(this.type)}getStyle(_){let s;return s=null!=_?_===this.type?super.getStyle():this.styles.get(_):super.getStyle(),s}getOrCreateStyle(_){let s=this.getStyle(_);return s||(s=new O.GridStyle(void 0,0),this.setStyle(s,_)),s}setStyle(_,s){if(null==s&&(s=this.type),s<this.getPrecision())throw new Error("Grid can not define a style for a higher precision grid type. Type: "+this.type+", Style Type: "+s);s===this.type?super.setStyle(_):this.styles.set(s,_||new O.GridStyle(void 0,0))}clearPrecisionStyles(){this.styles.clear()}getColor(_){let s;if(null!=_){const o=this.getStyle(_);o&&(s=o.getColor())}return s||(s=super.getColor()),s}setColor(_,s){null==s&&(s=this.type),this.getOrCreateStyle(s).setColor(_)}getWidth(_){let s=0;const o=this.getStyle(_);return o&&(s=o.getWidth()),0===s&&(s=super.getWidth()),s}setWidth(_,s){null==s&&(s=this.type),this.getOrCreateStyle(s).setWidth(_)}getLabeler(){return super.getLabeler()}setLabeler(_){super.setLabeler(_)}getLinesFromGridTile(_){return this.getLines(_.getZoom(),_.getBounds())}getLines(_,s){const o=[];if(!this.isLinesWithin(_))return;const c=this.getPrecision();for(let u=(s=s.toPrecision(c)).getMinLongitude();u<=s.getMaxLongitude();u=e.GARSUtils.nextPrecision(u,c)){const p=f.GridTypeUtils.getPrecision(u);for(let y=s.getMinLatitude();y<=s.getMaxLatitude();y=e.GARSUtils.nextPrecision(y,c)){const b=f.GridTypeUtils.getPrecision(y),C=O.Point.point(u,y),D=O.Point.point(u,y+c),P=O.Point.point(u+c,y);o.push(a.GridLine.line(C,D,p)),o.push(a.GridLine.line(C,P,b))}}return o}getLabelsFromGridTile(_){return this.getLabels(_.getZoom(),_.getBounds())}getLabels(_,s){let o;return this.isLabelerWithin(_)&&(o=this.getLabeler().getLabels(s,this.type)),o}compareTo(_){const s=this.getPrecision(),o=_.getPrecision();return s<o?-1:s>o?1:s===o?0:s<o?-1:1}hashCode(){let s=1;return s=31*s+(this.type?f.GridTypeUtils.hashCode(this.type):0),s}equals(_){return this===_||!(!_||typeof this!=typeof _)&&this.type===_.type}less(_){return this.hashCode()<_.hashCode()}}x.Grid=g,g.DEFAULT_WIDTH=l.GARSProperties.getInstance().getDoubleProperty(!0,O.PropertyConstants.GRID.toString(),O.PropertyConstants.WIDTH.toString())},48576:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridLabel=void 0;const O=S(95523);x.GridLabel=class a extends O.Label{constructor(l,f,g,d,_){super(l,f,g),this.gridType=d,this.coordinate=_}getGridType(){return this.gridType}setGridType(l){this.gridType=l}getCoordinate(){return this.coordinate}setCoordinate(l){this.coordinate=l}}},17917:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridLabeler=void 0;const O=S(31690),a=S(95523),e=S(98291);class l extends a.Labeler{constructor(g,d=0,_,s=O.Color.black(),o=l.DEFAULT_TEXT_SIZE,c=l.DEFAULT_BUFFER){super(g,d,_,s,o,c)}}x.GridLabeler=l,l.DEFAULT_TEXT_SIZE=e.GARSProperties.getInstance().getDoubleProperty(!0,a.PropertyConstants.LABELER.toString(),a.PropertyConstants.TEXT_SIZE.toString()),l.DEFAULT_BUFFER=e.GARSProperties.getInstance().getDoubleProperty(!0,a.PropertyConstants.LABELER.toString(),a.PropertyConstants.BUFFER.toString())},38442:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridRange=void 0;const O=S(95523),a=S(26947),e=S(32011),l=S(42117);class f{constructor(d=new l.BandNumberRange,_=new e.BandLettersRange){this.bandNumberRange=d,this.bandLettersRange=_,this.bandNumbers=d.next(),this.bandLetters=_.next(),this.bandNumbers.done||(this.bandNumber=this.bandNumbers.value)}getBandNumberRange(){return this.bandNumberRange}setBandNumberRange(d){this.bandNumberRange=d}getBandLettersRange(){return this.bandLettersRange}setBandLettersRange(d){this.bandLettersRange=d}getBounds(){const d=this.bandNumberRange.getWestLongitude(),_=this.bandLettersRange.getSouthLatitude(),s=this.bandNumberRange.getEastLongitude(),o=this.bandLettersRange.getNorthLatitude();return O.Bounds.degrees(d,_,s,o)}next(){if(null==this.bandNumber||this.bandLetters.done)return{done:!0,value:null};{const d=this.bandLetters.value;this.bandLetters=this.bandLettersRange.next();const _=a.GARS.create(this.bandNumber,d);return this.bandLetters.done&&(this.bandNumbers.done?this.bandNumber=void 0:(this.bandNumbers=this.bandNumberRange.next(),this.bandNumber=this.bandNumbers.value,this.bandLettersRange.reset(),this.bandLetters=this.bandLettersRange.next())),{done:!1,value:_}}}[Symbol.iterator](){return this}}x.GridRange=f},93832:($,x)=>{"use strict";var O;Object.defineProperty(x,"__esModule",{value:!0}),x.GridType=void 0,(O=x.GridType||(x.GridType={}))[O.TWENTY_DEGREE=20]="TWENTY_DEGREE",O[O.TEN_DEGREE=10]="TEN_DEGREE",O[O.FIVE_DEGREE=5]="FIVE_DEGREE",O[O.ONE_DEGREE=1]="ONE_DEGREE",O[O.THIRTY_MINUTE=.5]="THIRTY_MINUTE",O[O.FIFTEEN_MINUTE=.25]="FIFTEEN_MINUTE",O[O.FIVE_MINUTE=.08333333333333333]="FIVE_MINUTE"},57997:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridTypeUtils=void 0;const O=S(93832);class a{static getPrecision(l){let f=O.GridType.FIVE_MINUTE;return l%O.GridType.TWENTY_DEGREE==0?f=O.GridType.TWENTY_DEGREE:l%O.GridType.TEN_DEGREE==0?f=O.GridType.TEN_DEGREE:l%O.GridType.FIVE_DEGREE==0?f=O.GridType.FIVE_DEGREE:l%O.GridType.ONE_DEGREE==0?f=O.GridType.ONE_DEGREE:l%O.GridType.THIRTY_MINUTE==0?f=O.GridType.THIRTY_MINUTE:l%O.GridType.FIFTEEN_MINUTE==0&&(f=O.GridType.FIFTEEN_MINUTE),f}static lessPrecise(l){const f=a.values(),g=a.ordinal(l),d=new Set;for(let _=0;_<g;_++)d.add(f[_]);return d}static morePrecise(l){const f=a.values(),g=a.ordinal(l),d=new Set;for(let _=g;_<f.length;_++)d.add(f[_]);return d}static values(){const l=[],f=Object.keys(O.GridType).map(g=>O.GridType[g]);for(const g of f)Number.isInteger(g)&&l.push(g);return l}static ordinal(l){const f=Object.keys(O.GridType);let g=0;for(let d=0;d<f.length;d++)if(isNaN(Number(f[d]))){if(f[d]===O.GridType[l])break;g++}return g}static hashCode(l){let f=0;const g=l.toString();for(let d=0;d<g.length;d++)f=31*f+g.charCodeAt(d);return 4294967295&f}}x.GridTypeUtils=a},5729:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Grids=void 0;const O=S(95523),a=S(98291),e=S(34174),l=S(80187),f=S(93832),g=S(57997),d=S(57151);class _ extends O.BaseGrids{constructor(o){if(super(a.GARSProperties.getInstance()),this.gridMap=new Map,o&&o.length>0){this.createGrids(!1);for(const c of o){const u=this.getGrid(c);u&&u.setEnabled(!0)}}else this.createGrids();this.createZoomGrids()}static create(o){return new _(o)}getDefaultWidth(){return l.Grid.DEFAULT_WIDTH}grids(){const o=[];for(const c of this.gridMap.values())o.push(c);return o}newGrid(o){return new l.Grid(o)}newZoomGrids(o){return new d.ZoomGrids(o)}createGrids(o){const c=this.properties.getBooleanProperty(!1,O.PropertyConstants.GRIDS,O.PropertyConstants.PROPAGATE);let u;null!=c&&c&&(u=new Map),this.createGrid(f.GridType.TWENTY_DEGREE,new e.GARSLabeler(!0),u,o),this.createGrid(f.GridType.TEN_DEGREE,new e.GARSLabeler(!0),u,o),this.createGrid(f.GridType.FIVE_DEGREE,new e.GARSLabeler(!0),u,o),this.createGrid(f.GridType.ONE_DEGREE,new e.GARSLabeler(!0),u,o),this.createGrid(f.GridType.THIRTY_MINUTE,new e.GARSLabeler(!0),u,o),this.createGrid(f.GridType.FIFTEEN_MINUTE,new e.GARSLabeler(!0),u,o),this.createGrid(f.GridType.FIVE_MINUTE,new e.GARSLabeler(!0),u,o)}createGrid(o,c,u,p){const y=this.newGrid(o),b=f.GridType[o].toLowerCase();this.loadGrid(y,b,c,p),u&&u.set(o,O.GridStyle.style(y.getColor(),y.getWidth())),this.loadGridStyles(y,b,u),this.gridMap.set(o,y)}loadGridStyles(o,c,u){const p=o.getPrecision();p<f.GridType.TWENTY_DEGREE&&this.loadGridStyle(o,c,f.GridType.TWENTY_DEGREE,u),p<f.GridType.TEN_DEGREE&&this.loadGridStyle(o,c,f.GridType.TEN_DEGREE,u),p<f.GridType.FIVE_DEGREE&&this.loadGridStyle(o,c,f.GridType.FIVE_DEGREE,u),p<f.GridType.ONE_DEGREE&&this.loadGridStyle(o,c,f.GridType.ONE_DEGREE,u),p<f.GridType.THIRTY_MINUTE&&this.loadGridStyle(o,c,f.GridType.THIRTY_MINUTE,u),p<f.GridType.FIFTEEN_MINUTE&&this.loadGridStyle(o,c,f.GridType.FIFTEEN_MINUTE,u)}loadGridStyle(o,c,u,p){const y=f.GridType[u].toLowerCase();let b=this.loadGridStyleColor(c,y),C=this.loadGridStyleWidth(c,y);if((!b||null==C)&&p){const D=p.get(u);if(D){if(!b){const P=D.getColor();P&&(b=P.copy())}null==C&&(C=D.getWidth())}}if(b||null!=C){const D=this.getGridStyle(o,b,C);o.setStyle(D,u),p&&p.set(u,D)}}getGrid(o){return this.gridMap.get(o)}getPrecision(o){const c=this.getGrids(o);let u;return c&&(u=c.getPrecision()),u}setGridTypes(o){const c=new Set(Object.keys(f.GridType));for(const p of o)this.enableByType(p),c.delete(f.GridType[p]);const u=[];for(const p of c)u.push(f.GridType[p]);this.disableTypes(u)}setGrids(o){const c=new Set(Object.keys(f.GridType));for(const p of o)this.enable(p),c.delete(f.GridType[p.getType()]);const u=[];for(const p of c)u.push(f.GridType[p]);this.disableTypes(u)}enableTypes(o){for(const c of o)this.enableByType(c)}disableTypes(o){for(const c of o)this.disableByType(c)}isEnabled(o){return this.getGrid(o).isEnabled()}enableByType(o){this.enable(this.getGrid(o))}disableByType(o){this.disable(this.getGrid(o))}setMinZoomByType(o,c){super.setMinZoom(this.getGrid(o),c)}setMaxZoomByType(o,c){super.setMaxZoom(this.getGrid(o),c)}setZoomRangeByType(o,c,u){super.setZoomRange(this.getGrid(o),c,u)}setLinesMinZoom(o,c){this.getGrid(o).setLinesMinZoom(c)}setLinesMaxZoom(o,c){this.getGrid(o).setLinesMaxZoom(c)}setAllColors(o){this.setColor(g.GridTypeUtils.values(),o)}setAllWidths(o){this.setWidth(g.GridTypeUtils.values(),o)}deletePropagatedStyles(o){o||(o=g.GridTypeUtils.values());for(const c of o)this.getGrid(c).clearPrecisionStyles()}setColor(o,c,u){if(u)for(const p of u)for(const y of o)this.getGrid(y).setColor(c,p);else for(const p of o)this.getGrid(p).setColor(c)}setWidth(o,c,u){if(u)for(const p of u)for(const y of o)this.getGrid(y).setWidth(c,p);else for(const p of o)this.getGrid(p).setWidth(c)}getLabeler(o){return this.getGrid(o).getLabeler()}hasLabeler(o){return this.getGrid(o).hasLabeler()}setLabeler(o,c){this.getGrid(o).setLabeler(c)}disableAllLabelers(){this.disableLabelers(g.GridTypeUtils.values())}enableLabelers(o){for(const c of o)this.enableLabeler(c)}disableLabelers(o){for(const c of o)this.disableLabeler(c)}isLabelerEnabled(o){const c=this.getLabeler(o);return null!==c&&c.isEnabled()}enableLabeler(o){this.getRequiredLabeler(o).setEnabled(!0)}disableLabeler(o){const c=this.getLabeler(o);c&&c.setEnabled(!1)}getRequiredLabeler(o){const c=this.getLabeler(o);if(!c)throw new Error("Grid type does not have a labeler: "+o);return c}setLabelMinZoom(o,c){const u=this.getRequiredLabeler(o);u.setMinZoom(c);const p=u.getMaxZoom();null!=p&&p<c&&u.setMaxZoom(c)}setLabelMaxZoom(o,c){const u=this.getRequiredLabeler(o);u.setMaxZoom(c),null!=c&&u.getMinZoom()>c&&u.setMinZoom(c)}setLabelZoomRange(o,c,u){const p=this.getRequiredLabeler(o);if(null!=u&&u<c)throw new Error("Min zoom '"+c+"' can not be larger than max zoom '"+u+"'");p.setMinZoom(c),p.setMaxZoom(u)}setLabelBuffer(o,c){for(const u of c)this.getRequiredLabeler(u).setBuffer(o)}getLabelBuffer(o){return this.getGrid(o).getLabelBuffer()}setAllLabelColors(o){for(const c of this.gridMap.values())c.hasLabeler()&&this.setLabelColor(o,[c.getType()])}setLabelColor(o,c){for(const u of c)this.getRequiredLabeler(u).setColor(o)}setAllLabelTextSizes(o){for(const c of this.gridMap.values())c.hasLabeler()&&this.setLabelTextSize(o,[c.getType()])}setLabelTextSize(o,c){for(const u of c)this.getRequiredLabeler(u).setTextSize(o)}}x.Grids=_},57151:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.ZoomGrids=void 0;const O=S(95523);x.ZoomGrids=class a extends O.BaseZoomGrids{constructor(l){super(l)}getPrecision(){let l;return this.hasGrids()&&(l=this.grids.begin().value.getType()),l}}},98291:function($,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(d,_,s,o){void 0===o&&(o=s);var c=Object.getOwnPropertyDescriptor(_,s);(!c||("get"in c?!_.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return _[s]}}),Object.defineProperty(d,o,c)}:function(d,_,s,o){void 0===o&&(o=s),d[o]=_[s]}),a=this&&this.__setModuleDefault||(Object.create?function(d,_){Object.defineProperty(d,"default",{enumerable:!0,value:_})}:function(d,_){d.default=_}),e=this&&this.__importStar||function(d){if(d&&d.__esModule)return d;var _={};if(null!=d)for(var s in d)"default"!==s&&Object.prototype.hasOwnProperty.call(d,s)&&O(_,d,s);return a(_,d),_};Object.defineProperty(x,"__esModule",{value:!0}),x.GARSProperties=void 0;const l=S(95523),f=e(S(97604));class g extends l.GridProperties{static getInstance(){return g.instance}}x.GARSProperties=g,g.instance=new g(f)},95523:function($,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(e,l,f,g){void 0===g&&(g=f);var d=Object.getOwnPropertyDescriptor(l,f);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(e,g,d)}:function(e,l,f,g){void 0===g&&(g=f),e[g]=l[f]}),a=this&&this.__exportStar||function(e,l){for(var f in e)"default"!==f&&!Object.prototype.hasOwnProperty.call(l,f)&&O(l,e,f)};Object.defineProperty(x,"__esModule",{value:!0}),a(S(77250),x),a(S(80858),x),a(S(3053),x),a(S(71695),x),a(S(57070),x),a(S(17521),x),a(S(87859),x),a(S(19298),x),a(S(50524),x),a(S(17551),x),a(S(91231),x),a(S(61797),x),a(S(59784),x),a(S(2351),x),a(S(48145),x),a(S(82932),x),a(S(26182),x),a(S(68465),x),a(S(38170),x)},17551:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BaseGrid=void 0;const O=S(2351);x.BaseGrid=class a{constructor(){this.enabled=!1,this.minZoom=0,this.style=new O.GridStyle(void 0,0)}isEnabled(){return this.enabled}setEnabled(l){this.enabled=l}getMinZoom(){return this.minZoom}setMinZoom(l){this.minZoom=l}getMaxZoom(){return this.maxZoom}hasMaxZoom(){return void 0!==this.maxZoom}setMaxZoom(l){this.maxZoom=l}isWithin(l){return l>=this.minZoom&&(void 0===this.maxZoom||l<=this.maxZoom)}getLinesMinZoom(){return void 0!==this.linesMinZoom?this.linesMinZoom:this.getMinZoom()}hasLinesMinZoom(){return void 0!==this.linesMinZoom}setLinesMinZoom(l){this.linesMinZoom=l}getLinesMaxZoom(){return void 0!==this.linesMaxZoom?this.linesMaxZoom:this.getMaxZoom()}hasLinesMaxZoom(){return void 0!==this.linesMaxZoom}setLinesMaxZoom(l){this.linesMaxZoom=l}isLinesWithin(l){let f=!0;return null!=this.linesMinZoom&&(f=l>=this.linesMinZoom),f&&null!=this.linesMaxZoom&&(f=l<=this.linesMaxZoom),f}getStyle(){return this.style}setStyle(l){this.style=void 0!==l?l:new O.GridStyle(void 0,0)}getColor(){return this.getStyle().getColor()}setColor(l){this.getStyle().setColor(l)}getWidth(){return this.getStyle().getWidth()}setWidth(l){this.getStyle().setWidth(l)}getLabeler(){return this.labeler}hasLabeler(){return void 0!==this.labeler}setLabeler(l){this.labeler=l}isLabelerWithin(l){return this.hasLabeler()&&this.labeler.isEnabled()&&this.labeler.isWithin(l)}getLabelBuffer(){return this.hasLabeler()?this.labeler.getBuffer():0}}},91231:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BaseGrids=void 0;const O=S(31690),a=S(45400),e=S(59784),l=S(2351),f=S(57070);x.BaseGrids=class g{constructor(_){this.zoomGrids=new a.TreeMap,this.properties=_}loadGrid(_,s,o,c){null==c&&void 0===(c=this.properties.getBooleanProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.ENABLED))&&(c=!0),_.setEnabled(c);let u=this.properties.getIntegerProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.MIN_ZOOM);void 0===u&&(u=0),_.setMinZoom(u);const p=this.properties.getIntegerProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.MAX_ZOOM);_.setMaxZoom(p);const y=this.properties.getIntegerProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.LINES,f.PropertyConstants.MIN_ZOOM);_.setLinesMinZoom(y);const b=this.properties.getIntegerProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.LINES,f.PropertyConstants.MAX_ZOOM);_.setLinesMaxZoom(b);const C=this.properties.getProperty(!1,this.properties.buildProperty([f.PropertyConstants.GRIDS,s,f.PropertyConstants.COLOR])),D=null!=C?O.Color.color(C):O.Color.black();_.setColor(D);let P=this.properties.getDoubleProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.WIDTH);void 0===P&&(P=this.getDefaultWidth()),_.setWidth(P),o&&this.loadLabeler(o,s),_.setLabeler(o)}loadLabeler(_,s){const o=this.properties.getBooleanProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.LABELER,f.PropertyConstants.ENABLED);_.setEnabled(null!=o&&o);const c=this.properties.getIntegerProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.LABELER,f.PropertyConstants.MIN_ZOOM);void 0!==c&&_.setMinZoom(c);const u=this.properties.getIntegerProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.LABELER,f.PropertyConstants.MAX_ZOOM);void 0!==u&&_.setMaxZoom(u);const p=this.properties.getProperty(!1,this.properties.buildProperty([f.PropertyConstants.GRIDS,s,f.PropertyConstants.LABELER,f.PropertyConstants.COLOR]));p&&_.setColor(O.Color.color(p));const y=this.properties.getDoubleProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.LABELER,f.PropertyConstants.TEXT_SIZE);void 0!==y&&_.setTextSize(y);const b=this.properties.getDoubleProperty(!1,f.PropertyConstants.GRIDS,s,f.PropertyConstants.LABELER,f.PropertyConstants.BUFFER);void 0!==b&&_.setBuffer(b)}loadGridStyleColor(_,s){const o=this.properties.getProperty(!1,this.properties.buildProperty([f.PropertyConstants.GRIDS,_,s,f.PropertyConstants.COLOR]));let c;return o&&(c=O.Color.color(o)),c}loadGridStyleWidth(_,s){return this.properties.getDoubleProperty(!1,this.properties.buildProperty([f.PropertyConstants.GRIDS,_,s,f.PropertyConstants.WIDTH]))}getGridStyle(_,s,o){return s||(s=_.getColor()),null==o&&(o=_.getWidth()),l.GridStyle.style(s,o)}createZoomGrids(){for(let _=0;_<=e.GridConstants.MAX_MAP_ZOOM_LEVEL;_++)this.createZoomGridsFromZoom(_)}getGrids(_){let s=this.zoomGrids.get(_);return s||(s=this.createZoomGridsFromZoom(_)),s}createZoomGridsFromZoom(_){const s=this.newZoomGrids(_);for(const o of this.grids())o.isEnabled()&&o.isWithin(_)&&s.addGrid(o);return this.zoomGrids.set(_,s),s}enableGrids(_){for(const s of _)this.enable(s)}disableGrids(_){for(const s of _)this.disable(s)}enable(_){if(!_.isEnabled()){_.setEnabled(!0);const s=_.getMinZoom();let o=_.getMaxZoom();null==o&&(o=this.zoomGrids.end().value.first);for(let c=s;c<=o;c++)this.addGrid(_,c)}}disable(_){if(_.isEnabled()){_.setEnabled(!1);const s=_.getMinZoom();let o=_.getMaxZoom();null==o&&(o=this.zoomGrids.end().value.first);for(let c=s;c<=o;c++)this.removeGrid(_,c)}}setMinZoom(_,s){let o=_.getMaxZoom();null!=o&&o<s&&(o=s),this.setZoomRange(_,s,o)}setMaxZoom(_,s){let o=_.getMinZoom();null!=s&&o>s&&(o=s),this.setZoomRange(_,o,s)}setZoomRange(_,s,o){if(null!=o&&o<s)throw new Error("Min zoom '"+s+"' can not be larger than max zoom '"+o+"'");const c=this.zoomGrids.begin().value.first,u=this.zoomGrids.end().value.first,p=_.getMinZoom();let y=_.getMaxZoom();y=null==y?u:Math.min(y,u),_.setMinZoom(s),_.setMaxZoom(o),s=Math.max(s,c),o=null==o?u:Math.min(o,u);const b=Math.max(s,p),C=Math.min(o,y);if(b<=C){const P=Math.min(s,p),A=Math.max(o,y);for(let N=P;N<=A;N++)(N<b||N>C)&&(N>=s&&N<=o?this.addGrid(_,N):this.removeGrid(_,N))}else{for(let P=p;P<=y;P++)this.removeGrid(_,P);for(let P=s;P<=o;P++)this.addGrid(_,P)}}addGrid(_,s){const o=this.zoomGrids.get(s);o&&o.addGrid(_)}removeGrid(_,s){const o=this.zoomGrids.get(s);o&&o.removeGrid(_)}enableAllLabelers(){for(const _ of this.grids()){const s=_.getLabeler();s&&s.setEnabled(!0)}}setAllLabelBuffers(_){for(const s of this.grids()){const o=s.getLabeler();o&&o.setBuffer(_)}}}},61797:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BaseZoomGrids=void 0;const O=S(45400);class a{constructor(l){this.grids=new O.TreeSet,this.zoom=l,this.beginIterator=this.grids.begin()}getZoom(){return this.zoom}getGrids(){return this.grids}numGrids(){return this.grids.size()}hasGrids(){return!this.grids.empty()}addGrid(l){const f=this.grids.push(l)>0;return this.reset(),f}removeGrid(l){const f=this.grids.erase(l)>0;return this.reset(),f}next(){if(this.beginIterator.equals(this.grids.end()))return{done:!0,value:void 0};{const l=this.beginIterator.value;return this.beginIterator=this.beginIterator.next(),{done:!1,value:l}}}reset(){this.beginIterator=this.grids.begin()}[Symbol.iterator](){return this}}x.BaseZoomGrids=a},59784:($,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridConstants=void 0;class S{}x.GridConstants=S,S.MIN_LON=-180,S.MAX_LON=180,S.MIN_LAT=-90,S.MAX_LAT=90,S.BAND_LETTER_OMIT_I="I",S.BAND_LETTER_OMIT_O="O",S.MAX_MAP_ZOOM_LEVEL=21,S.NORTH_CHAR="N",S.SOUTH_CHAR="S",S.WEST_CHAR="W",S.EAST_CHAR="E"},2351:($,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridStyle=void 0;class S{constructor(a,e){this.color=void 0,this.width=0,this.color=a,this.width=e}static style(a,e){return new S(a,e)}getColor(){return this.color}setColor(a){this.color=a}getWidth(){return this.width}setWidth(a){this.width=a}}x.GridStyle=S},48145:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridUtils=void 0;const O=S(45469),a=S(77250),e=S(3053),l=S(71695),f=S(59784),g=S(19298);x.GridUtils=class d{static getPixel(s,o,c,u){u=u.toMeters(),c=c.toMeters();const p=this.getXPixel(s,c,u.getLongitude()),y=this.getYPixel(o,c,u.getLatitude());return new g.Pixel(p,y)}static getXPixel(s,o,c){const u=(o=o.toMeters()).getMaxLongitude()-o.getMinLongitude();return(c-o.getMinLongitude())/u*s}static getYPixel(s,o,c){const u=(o=o.toMeters()).getMaxLatitude()-o.getMinLatitude();return(o.getMaxLatitude()-c)/u*s}static getBounds(s,o,c){const u=this.tilesPerSide(c),p=this.tileSize(u);return a.Bounds.meters(-1*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH+s*p,O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-(o+1)*p,-1*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH+(s+1)*p,O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-o*p)}static tilesPerSide(s){return Math.pow(2,s)}static tileSize(s){return 2*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH/s}static getZoomLevel(s){s=s.toMeters();const o=Math.min(s.getWidth(),s.getHeight());return Math.log(2*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH/o)/Math.log(2)}static toUnit(s,o,c,u){let p=null;return p=s===u?e.Point.point(o,c,u):this.toUnitOpposite(o,c,u),p}static toUnitOpposite(s,o,c){let u;switch(c){case l.Unit.DEGREE:u=O.GeometryUtils.metersToDegreesCoord(s,o);break;case l.Unit.METER:u=O.GeometryUtils.degreesToMetersCoord(s,o);break;default:throw new Error("Unsupported unit: "+c)}return e.Point.pointFromPoint(u,c)}static isOmittedBandLetter(s){return s===f.GridConstants.BAND_LETTER_OMIT_I||s===f.GridConstants.BAND_LETTER_OMIT_O}static precisionBefore(s,o){let c=0;return Math.abs(s)>=o?c=s-(s%o+o)%o:s<0&&(c=-o),c}static precisionAfter(s,o){return this.precisionBefore(s+o,o)}static lineIntersection(s,o){return this.intersection(s.getPoint1(),s.getPoint2(),o.getPoint1(),o.getPoint2())}static intersection(s,o,c,u){let p;const y=O.GeometryUtils.intersection(s.toMeters(),o.toMeters(),c.toMeters(),u.toMeters());return null!=y&&(p=e.Point.pointFromPoint(y,l.Unit.METER).toUnit(s.getUnit())),p}}},82932:($,x)=>{"use strict";var O;Object.defineProperty(x,"__esModule",{value:!0}),x.Hemisphere=void 0,(O=x.Hemisphere||(x.Hemisphere={}))[O.NORTH=0]="NORTH",O[O.SOUTH=1]="SOUTH"},26182:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.HemisphereUtils=void 0;const O=S(82932);class a{static fromLatitude(l){return l>=0?O.Hemisphere.NORTH:O.Hemisphere.SOUTH}static from(l){return a.fromLatitude(l.getLatitude())}}x.HemisphereUtils=a},68465:($,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Label=void 0,x.Label=class S{constructor(a,e,l){this.name=a,this.center=e,this.bounds=l}getName(){return this.name}setName(a){this.name=a}getCenter(){return this.center}setCenter(a){this.center=a}getBounds(){return this.bounds}setBounds(a){this.bounds=a}}},38170:($,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Labeler=void 0,x.Labeler=class S{constructor(a,e,l,f,g,d){this.enabled=!1,this.minZoom=0,this.maxZoom=void 0,this.color=void 0,this.textSize=0,this.buffer=0,this.enabled=a,this.minZoom=e,this.maxZoom=l,this.color=f,this.textSize=g,this.buffer=d}isEnabled(){return this.enabled}setEnabled(a){this.enabled=a}getMinZoom(){return this.minZoom}setMinZoom(a){this.minZoom=a}getMaxZoom(){return this.maxZoom}hasMaxZoom(){return null!=this.maxZoom}setMaxZoom(a){this.maxZoom=a}isWithin(a){return a>=this.minZoom&&(null==this.maxZoom||a<=this.maxZoom)}getColor(){return this.color}setColor(a){this.color=a}getTextSize(){return this.textSize}setTextSize(a){this.textSize=a}getBuffer(){return this.buffer}setBuffer(a){if(a<0||a>=.5)throw new Error("Grid edge buffer must be >= 0 and < 0.5. buffer: "+a);this.buffer=a}}},77250:($,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Bounds=void 0;const O=S(45469),a=S(71695),e=S(3053),l=S(80858),f=S(48145),g=S(50524);class d extends O.GeometryEnvelope{constructor(){super(...arguments),this.unit=a.Unit.DEGREE}static bounds(s,o,c,u,p){const y=new d(s,o,c,u);return y.unit=p,y}static degrees(s,o,c,u){return this.bounds(s,o,c,u,a.Unit.DEGREE)}static meters(s,o,c,u){return this.bounds(s,o,c,u,a.Unit.METER)}static boundsFromCorners(s,o){const c=new d(s.getLongitude(),s.getLatitude(),o.getLongitude(),o.getLatitude());if(c.unit=s.getUnit(),!c.isUnit(o.getUnit()))throw new Error("Points are in different units. southwest: "+c.unit+", northeast: "+o.getUnit());return c}static boundsFromBounds(s){return d.boundsFromEnvelope(s,s.unit)}static boundsFromEnvelope(s,o){const c=new d(s);return c.unit=o,c}getMinLongitude(){return this.minX}setMinLongitude(s){this.minX=s}getMinLatitude(){return this.minY}setMinLatitude(s){this.minY=s}getMaxLongitude(){return this.maxX}setMaxLongitude(s){this.maxX=s}getMaxLatitude(){return this.maxY}setMaxLatitude(s){this.maxY=s}getWest(){return this.getMinLongitude()}setWest(s){this.setMinLongitude(s)}getSouth(){return this.getMinLatitude()}setSouth(s){this.setMinLatitude(s)}getEast(){return this.getMaxLongitude()}setEast(s){this.setMaxLongitude(s)}getNorth(){return this.getMaxLatitude()}setNorth(s){this.setMaxLatitude(s)}getUnit(){return this.unit}setUnit(s){this.unit=s}isUnit(s){return this.unit===s}isDegrees(){return this.isUnit(a.Unit.DEGREE)}isMeters(){return this.isUnit(a.Unit.METER)}toUnit(s){let o;if(this.isUnit(s))o=this;else{const c=this.getSouthwest().toUnit(s),u=this.getNortheast().toUnit(s);o=d.boundsFromCorners(c,u)}return o}toDegrees(){return this.toUnit(a.Unit.DEGREE)}toMeters(){return this.toUnit(a.Unit.METER)}getCentroidLongitude(){return super.getMidX()}getCentroidLatitude(){let s;return s=this.unit===a.Unit.DEGREE?this.getCentroid().getLatitude():super.getMidY(),s}getCentroid(){let s;return s=this.unit===a.Unit.DEGREE?this.toMeters().getCentroid().toDegrees():e.Point.pointFromPoint(this.centroid,this.unit),s}getWidth(){return this.xRange}getHeight(){return this.yRange}getSouthwest(){return e.Point.point(this.getMinLongitude(),this.getMinLatitude(),this.unit)}getNorthwest(){return e.Point.point(this.getMinLongitude(),this.getMaxLatitude(),this.unit)}getSoutheast(){return e.Point.point(this.getMaxLongitude(),this.getMinLatitude(),this.unit)}getNortheast(){return e.Point.point(this.getMaxLongitude(),this.getMaxLatitude(),this.unit)}overlap(s){const o=super.overlap(s.toUnit(this.unit),!0);return d.boundsFromEnvelope(o,this.unit)}union(s){const o=super.union(s.toUnit(this.unit));return d.boundsFromEnvelope(o,this.unit)}getWestLine(){return l.Line.line(this.getNorthwest(),this.getSouthwest())}getSouthLine(){return l.Line.line(this.getSouthwest(),this.getSoutheast())}getEastLine(){return l.Line.line(this.getSoutheast(),this.getNortheast())}getNorthLine(){return l.Line.line(this.getNortheast(),this.getNorthwest())}toPrecision(s){const o=this.toDegrees(),c=f.GridUtils.precisionBefore(o.getMinLongitude(),s),u=f.GridUtils.precisionBefore(o.getMinLatitude(),s),p=f.GridUtils.precisionAfter(o.getMaxLongitude(),s),y=f.GridUtils.precisionAfter(o.getMaxLatitude(),s);return d.degrees(c,u,p,y)}getPixelRangeFromTile(s){return this.getPixelRange(s.getWidth(),s.getHeight(),s.getBounds())}getPixelRange(s,o,c){c=c.toMeters();const u=f.GridUtils.getPixel(s,o,c,this.getNorthwest()),p=f.GridUtils.getPixel(s,o,c,this.getSoutheast());return new g.PixelRange(u,p)}getLines(){const s=this.getSouthwest(),o=this.getNorthwest(),c=this.getNortheast(),u=this.getSoutheast(),p=[];return p.push(l.Line.line(s,o)),p.push(l.Line.line(o,c)),p.push(l.Line.line(c,u)),p.push(l.Line.line(u,s)),p}copy(){return d.boundsFromBounds(this