{"version":3,"sources":["webpack:///./node_modules/arcgis-js-api/views/2d/layers/WMSLayerView2D.js","webpack:///./node_modules/arcgis-js-api/views/layers/WMSLayerView.js","webpack:///./node_modules/arcgis-js-api/layers/support/ExportWMSImageParameters.js","webpack:///./node_modules/arcgis-js-api/layers/support/wmsUtils.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAO,CAAC,2BAAqB,CAAC,2BAAsB,CAAC,2BAA4B,CAAC,2BAA0C,CAAC,2BAA0B,CAAC,2BAAkD,CAAC,2BAA2B,CAAC,2BAAe,CAAC,2BAA0B,CAAC,2BAAwB,CAAC,2BAAmC,CAAC,2BAA2B,CAAC,mCAAE,wCAAwC,aAAa,yDAAyD,mBAAmB,aAAa,+CAA+C,0DAA0D,6BAA6B,iPAAiP,QAAQ,IAAI,gCAAgC,YAAY,gCAAgC,2CAA2C,8BAA8B,GAAG,+BAA+B,yEAAyE,gHAAgH,sNAAsN,wCAAwC,eAAe,+EAA+E,uEAAuE,UAAU,+BAA+B,sQAAsQ,mCAAmC,oCAAoC,gCAAgC,qBAAqB,uDAAuD,wFAAwF,6BAA6B,oEAAoE,yCAAyC,+CAA+C,cAAc,GAAG,sEAAsE,OAAO,mCAAmC,kCAAkC,kDAAkD,uCAAuC,gCAAgC,GAAG,GAAG,mCAAmC,oDAAoD,0CAA0C,+CAA+C,qFAAqF,KAAK,sFAAsF,gCAAgC,wGAAwG,gEAAgE;AAAA,oGAAE,C;;;;;;;ACxB5uG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BA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BAAuB,SAAS,sBAAsB,qBAAqB,GAAG,cAAc,kBAAkB,yCAAyC,4BAA4B,mBAAmB,wBAAwB,kEAAkE,uBAAuB,SAAS,KAAK,cAAc,kBAAkB,yCAAyC,4BAA4B,mBAAmB,wBAAwB,yFAAyF,uBAAuB,SAAS,sBAAsB,mBAAmB,GAAG,cAAc,mKAAmK,UAAU,wFAAwF,MAAM,cAAc,eAAe,uCAAuC,eAAe,4BAA4B,iBAAiB,gCAAgC,kBAAkB,OAAO,cAAc,sEAAsE,wBAAwB,0CAA0C,gEAAgE,qBAAqB,gBAAgB,mIAAmI,0DAA0D,0BAA0B,mBAAmB,kBAAkB,qUAAqU,iEAAiE,mJAAmJ,kBAAkB,oBAAoB,kEAAkE,yBAAyB,+BAA+B,gDAAgD,kBAAkB,SAAS,wCAAwC,qEAAqE,MAAM,uBAAuB,wCAAwC,GAAG,8BAA8B,MAAM,4BAA4B,qFAAqF,OAAO,kBAAkB,iEAAiE,KAAK,KAAK,KAAK,oBAAoB,SAAS,8BAA8B,2FAA2F,KAAK,6EAA6E,8BAA8B,qCAAqC,eAAe,0DAA0D,uBAAuB,iBAAiB,6EAA6E,oDAAoD,0BAA0B,4DAA4D,GAAG,MAAM,0EAA0E,OAAO,0PAA0P,iDAAiD,sCAAsC,2CAA2C,oBAAoB,cAAc,gBAAgB,mCAAmC,sCAAsC,oCAAoC,2BAA2B,kCAAkC,4CAA4C,mEAAmE,wCAAwC,EAAE,OAAO;AAAA,oGAAE,C","file":"js/chunk-69c809fc.ecae87de.js","sourcesContent":["// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../../core/Error\",\"../../../core/Logger\",\"../../../core/promiseUtils\",\"../../../core/accessorSupport/decorators\",\"../../../geometry/Extent\",\"../../../layers/support/ExportWMSImageParameters\",\"../engine/BitmapContainer\",\"./LayerView2D\",\"./support/ExportStrategy\",\"../../layers/LayerView\",\"../../layers/RefreshableLayerView\",\"../../layers/WMSLayerView\"],(function(e,t,r,i,a,n,o,s,p,h,u,m,c,y,d){\"use strict\";var l=a.getLogger(\"esri.views.2d.layers.WMSLayerView2D\");return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.initialize=function(){var e=this.layer,t=this.view;e.supportsSpatialReference(t.spatialReference)||this.addResolvingPromise(n.reject(new i(\"layerview:spatial-reference-incompatible\",\"The spatial references supported by this WMS layer are incompatible with the spatial reference of the view\",{layer:e})))},t.prototype.hitTest=function(){return null},t.prototype.update=function(e){this.strategy.update(e).catch((function(e){n.isAbortError(e)||l.error(e)}))},t.prototype.attach=function(){var e=this,t=this.layer,r=this.view,i=t.imageMaxHeight,a=t.imageMaxWidth;this._bitmapContainer=new h.BitmapContainer,this.container.addChild(this._bitmapContainer),this.strategy=new m({container:this._bitmapContainer,fetchSource:this.fetchImage.bind(this),requestUpdate:this.requestUpdate.bind(this),imageMaxHeight:i,imageMaxWidth:a,imageRotationSupported:!1,imageNormalizationSupported:!1,hidpi:!1}),this._exportWMSImageParameters=new p({layer:t,view:r}),this.handles.add(this._exportWMSImageParameters.watch(\"version\",(function(t){e._exportImageVersion!==t&&(e._exportImageVersion=t,e.requestUpdate())})),\"wms\")},t.prototype.detach=function(){this.handles.remove(\"wms\"),this.strategy.destroy(),this._exportWMSImageParameters.layer=null,this._exportWMSImageParameters.destroy(),this._exportWMSImageParameters=null,this.container.removeChild(this._bitmapContainer),this._bitmapContainer.removeAllChildren()},t.prototype.moveStart=function(){},t.prototype.viewChange=function(){},t.prototype.moveEnd=function(){this.requestUpdate()},t.prototype.createFetchPopupFeaturesQuery=function(e){var t=this.view,r=this._bitmapContainer,i=e.x,a=e.y,n=t.spatialReference,o=null,p=0,h=0;r.children.some((function(e){var t=e.width,r=e.height,u=e.resolution,m=e.x,c=e.y,y=m+u*t,d=c-u*r;return i>=m&&i<=y&&a<=c&&a>=d&&(o=new s({xmin:m,ymin:d,xmax:y,ymax:c,spatialReference:n}),p=t,h=r,!0)}));var u=o.width/p,m=Math.round((i-o.xmin)/u),c=Math.round((o.ymax-a)/u);return{extent:o,width:p,height:h,x:m,y:c}},t.prototype.doRefresh=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.requestUpdate(),[2]}))}))},t.prototype.isUpdating=function(){return this.strategy.updating||this.updateRequested},t.prototype.fetchImage=function(e,t,i,a){return this.layer.fetchImage(e,t,i,r.__assign({timeExtent:this._exportWMSImageParameters.timeExtent,timestamp:this.refreshTimestamp},a))},r.__decorate([o.property()],t.prototype,\"strategy\",void 0),r.__decorate([o.property({dependsOn:[\"strategy.updating\"]})],t.prototype,\"updating\",void 0),t=r.__decorate([o.subclass(\"esri.views.2d.layers.WMSLayerView2D\")],t)}(d.WMSLayerView(y.RefreshableLayerView(u.LayerView2DMixin(c))))}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../core/Error\",\"../../core/promiseUtils\",\"../../core/accessorSupport/decorators\"],(function(e,t,r,o,i,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.WMSLayerView=void 0,t.WMSLayerView=function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.fetchPopupFeatures=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,u,s,a,p,c,h,f;return r.__generator(this,(function(r){if(t=this.layer,!e)return[2,i.reject(new o(\"wmslayerview:fetchPopupFeatures\",\"Nothing to fetch without area\",{layer:t}))];if(!(n=t.popupEnabled))return[2,i.reject(new o(\"wmslayerview:fetchPopupFeatures\",\"popupEnabled should be true\",{popupEnabled:n}))];if(u=this.createFetchPopupFeaturesQuery(e),s=u.extent,a=u.width,p=u.height,c=u.x,h=u.y,!(s&&a&&p))throw new o(\"wmslayerview:fetchPopupFeatures\",\"WMSLayer does not support fetching features.\",{extent:s,width:a,height:p});return[2,(f=t.fetchFeatureInfo(s,a,p,c,h))?f.then((function(e){return[e]})):i.resolve([])]}))}))},r.__decorate([n.property()],t.prototype,\"layer\",void 0),t=r.__decorate([n.subclass(\"esri.layers.mixins.WMSLayerView\")],t)}(e)}}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../core/Accessor\",\"../../core/Handles\",\"../../core/accessorSupport/decorators\",\"./commonProperties\",\"./wmsUtils\"],(function(e,r,t,n,a,s,i,o){\"use strict\";var l={visible:\"visibleSublayers\"},p=[102100,3857,102113,900913],c=[3395,54004];return function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r._layerHandles=new a,r.extent=null,r._scale=null,r.view=null,r}return t.__extends(r,e),Object.defineProperty(r.prototype,\"layer\",{set:function(e){var r=this;this._get(\"layer\")!==e&&(this._set(\"layer\",e),this._layerHandles&&(this._layerHandles.removeAll(),this._layerHandles=null),e&&(this._layerHandles||(this._layerHandles=new a),this._layerHandles.add([e.sublayers.on(\"change\",(function(){return r.notifyChange(\"visibleSublayers\")})),e.on(\"wms-sublayer-update\",(function(e){return r.notifyChange(l[e.propertyName])}))])))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,\"layers\",{get:function(){return this.visibleSublayers.filter((function(e){return e.name})).map((function(e){return e.name})).join(\",\")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,\"scale\",{get:function(){return null!=this._scale?this._scale:this.view&&this.view.scale||0},set:function(e){this.view||(this._scale=e,this.notifyChange(\"scale\"))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,\"version\",{get:function(){return(this._get(\"version\")||0)+1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,\"visibleSublayers\",{get:function(){var e=this.layer,r=this.scale,t=e.sublayers,n=[],a=function(e){var t=e.minScale,s=e.maxScale,i=e.sublayers;e.visible&&(0===r||(0===t||r<=t)&&(0===s||r>=s))&&(i?i.forEach(a):n.unshift(e))};return null==t||t.forEach(a),n},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,\"wkid\",{get:function(){var e=this.extent,r=this.layer.spatialReferences,t=e.spatialReference&&e.spatialReference.wkid;r&&-1===r.indexOf(t)&&e.spatialReference.latestWkid&&(t=e.spatialReference.latestWkid);var n=p.some((function(e){return e===t}));if(!r)return t;if(n){var a=[];r.forEach((function(e){p.indexOf(e)>-1&&a.push(e)})),a.length||r.forEach((function(e){c.indexOf(e)>-1&&a.push(e)})),t=a.length>0?a[0]:p[0]}return t},enumerable:!1,configurable:!0}),r.prototype.toJSON=function(){var e=this.extent,r=this.layer,n=this.layers,a=r.imageFormat,s=r.imageTransparency,i=r.spatialReferences,l=r.version,p=this.wkid;i&&-1===i.indexOf(p)&&e.spatialReference.latestWkid&&(p=e.spatialReference.latestWkid);var c=e.xmin,u=e.ymin,y=e.xmax,d=e.ymax,f={bbox:\"1.3.0\"===r.version&&o.coordsReversed(p)?u+\",\"+c+\",\"+d+\",\"+y:c+\",\"+u+\",\"+y+\",\"+d,format:a,request:\"GetMap\",service:\"WMS\",styles:\"\",transparent:s,version:l};return isNaN(p)||(\"1.3.0\"===l?f.crs=\"EPSG:\"+p:f.srs=\"EPSG:\"+p),t.__assign(t.__assign({},f),{layers:n})},t.__decorate([s.property()],r.prototype,\"extent\",void 0),t.__decorate([s.property()],r.prototype,\"layer\",null),t.__decorate([s.property({readOnly:!0,dependsOn:[\"visibleSublayers\"]})],r.prototype,\"layers\",null),t.__decorate([s.property({type:Number,dependsOn:[\"view.scale\"]})],r.prototype,\"scale\",null),t.__decorate([s.property(i.combinedViewLayerTimeExtentProperty)],r.prototype,\"timeExtent\",void 0),t.__decorate([s.property({type:Number,dependsOn:[\"layers\",\"layer.imageTransparency\",\"timeExtent\"],readOnly:!0})],r.prototype,\"version\",null),t.__decorate([s.property()],r.prototype,\"view\",void 0),t.__decorate([s.property({readOnly:!0,dependsOn:[\"layer.sublayers\",\"scale\"]})],r.prototype,\"visibleSublayers\",null),t.__decorate([s.property()],r.prototype,\"wkid\",null),r=t.__decorate([s.subclass(\"esri.layers.support.ExportWMSImageParameters\")],r)}(n)}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../core/Error\",\"../../core/urlUtils\",\"../../geometry/Extent\",\"../../geometry/SpatialReference\"],(function(e,t,n,r,i,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.toISOString=t.fromISODuration=t.isTimeDimension=t.isGenericDimension=t.isElevationDimension=t.isDimensionInterval=t.getPopupLayers=t.coordsReversed=t.parseCapabilities=void 0;var u=[[4001,4999],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3416,3416],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]],o={84:4326,83:4269,27:4267};function l(e){return u.some((function(t){var n=t[0],r=t[1];return e>=n&&e<=r}))}function s(e,t,n){var r;return null!==(r=t.getAttribute(e))&&void 0!==r?r:n}function f(e,t){for(var n=0;n-1?\"SRS\":\"CRS\";return Array.prototype.slice.call(e.childNodes).forEach((function(e){if(\"Name\"===e.nodeName)r.name=e.textContent||\"\";else if(\"Title\"===e.nodeName)r.title=e.textContent||\"\";else if(\"Abstract\"===e.nodeName)r.description=e.textContent||\"\";else if(\"BoundingBox\"===e.nodeName){var i=e.getAttribute(g);if(i&&0===i.indexOf(\"EPSG:\"))0===(u=parseInt(i.substring(5),10))||isNaN(u)||v||(v=\"1.3.0\"===t?d(e,u,l(u)):d(e,u));var a=i&&i.indexOf(\":\");if(a&&a>-1){var u;0===(u=parseInt(i.substring(a+1,i.length),10))||isNaN(u)||(u=o[u]?o[u]:u);var s=\"1.3.0\"===t?d(e,u,l(u)):d(e,u);r.fullExtents.push(s)}}else if(e.nodeName===g){e.textContent.split(\" \").forEach((function(e){0===(e=e.indexOf(\":\")>-1?parseInt(e.split(\":\")[1],10):parseInt(e,10))||isNaN(e)||(o[e]&&(e=o[e]),-1===r.spatialReferences.indexOf(e)&&r.spatialReferences.push(e))}))}else if(\"Style\"!==e.nodeName||r.legendURL){if(\"Layer\"===e.nodeName){var m=x(e,t,n);m&&(m.parentLayerId=r.id,r.sublayers||(r.sublayers=[]),r.sublayers.push(m))}}else{var c=f(\"LegendURL\",e);if(c){var p=f(\"OnlineResource\",c);p&&(r.legendURL=p.getAttribute(\"xlink:href\"))}}})),r.extent=null==v?void 0:v.toJSON(),r.dimensions=m(\"Dimension\",e).filter((function(e){return e.getAttribute(\"name\")&&e.getAttribute(\"units\")&&e.textContent})).map((function(e){var t=e.getAttribute(\"name\"),n=e.getAttribute(\"units\"),r=e.textContent,i=e.getAttribute(\"unitSymbol\"),a=e.getAttribute(\"default\"),u=\"0\"!==s(\"default\",e,\"0\"),o=\"0\"!==s(\"nearestValue\",e,\"0\"),l=\"0\"!==s(\"current\",e,\"0\");return/^time$/i.test(t)&&/^ISO8601$/i.test(n)?{name:\"time\",units:\"ISO8601\",extent:A(r),default:A(a),multipleValues:u,nearestValue:o,current:l}:/^elevation$/i.test(t)?{name:\"elevation\",units:n,extent:b(r),unitSymbol:i,default:b(a),multipleValues:u,nearestValue:o}:{name:t,units:n,extent:y(r),unitSymbol:i,default:y(a),multipleValues:u,nearestValue:o}})),r}function g(e){return e.nodeType===Node.ELEMENT_NODE}function N(e){return\"time\"===e.name}function b(e){if(!e)return null;var t=-1!==e.indexOf(\"/\"),n=e.split(\",\");return t?n.map((function(e){var t=e.split(\"/\");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&\"0\"!==t[2]?parseFloat(t[2]):void 0}})).filter((function(e){return e})):n.map((function(e){return parseFloat(e)}))}function y(e){if(!e)return null;var t=-1!==e.indexOf(\"/\"),n=e.split(\",\");return t?n.map((function(e){var t=e.split(\"/\");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&\"0\"!==t[2]?t[2]:void 0}})).filter((function(e){return e})):n}function A(e){if(!e)return null;var t=-1!==e.indexOf(\"/\"),n=e.split(\",\");return t?n.map((function(e){var t=e.split(\"/\");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&\"0\"!==t[2]?E(t[2]):void 0}})).filter((function(e){return e})):n.map((function(e){return new Date(e)}))}function E(e){var t=e.match(/(?:p(\\d+y|\\d+(?:.|,)\\d+y)?(\\d+m|\\d+(?:.|,)\\d+m)?(\\d+d|\\d+(?:.|,)\\d+d)?)?(?:t(\\d+h|\\d+(?:.|,)\\d+h)?(\\d+m|\\d+(?:.|,)\\d+m)?(\\d+s|\\d+(?:.|,)\\d+s)?)?/i);return t?{years:S(t[1]),months:S(t[2]),days:S(t[3]),hours:S(t[4]),minutes:S(t[5]),seconds:S(t[6])}:null}function S(e){if(!e)return 0;var t=e.match(/(?:\\d+(?:.|,)\\d+|\\d+)/);if(!t)return 0;var n=t[0].replace(\",\",\".\");return Number(n)}t.parseCapabilities=function(e){if(!e)return null;var t={idCounter:-1};\"string\"==typeof e&&(e=(new DOMParser).parseFromString(e,\"text/xml\"));var r=e.documentElement;if(\"ServiceExceptionReport\"===r.nodeName){var a=Array.prototype.slice.call(r.childNodes).map((function(e){return e.textContent})).join(\"\\r\\n\");throw new n(\"wmslayer:wms-capabilities-xml-is-not-valid\",\"The server returned errors when the WMS capabilities were requested.\",a)}var u=f(\"Capability\",r),o=f(\"Service\",r),l=f(\"Request\",u);if(!u||!o||!l)return null;var s=f(\"Layer\",u);if(!s)return null;var m,d,h,g,b=\"WMS_Capabilities\"===r.nodeName||\"WMT_MS_Capabilities\"===r.nodeName?r.getAttribute(\"version\"):\"1.3.0\",y=c(\"Title\",o,\"\")||c(\"Name\",o,\"\"),A=c(\"AccessConstraints\",o,\"\"),E=c(\"Abstract\",o,\"\"),S=parseInt(c(\"MaxWidth\",o,\"5000\"),10),I=parseInt(c(\"MaxHeight\",o,\"5000\"),10),O=v(l,\"GetMap\"),L=p(l,\"GetMap\"),M=x(s,b,t),F=0;if(Array.prototype.slice.call(u.childNodes).forEach((function(e){\"Layer\"===e.nodeName&&(0===F?m=e:1===F?(M.name&&(M.name=\"\",M.sublayers.push(x(m,b,t))),M.sublayers.push(x(e,b,t))):M.sublayers.push(x(e,b,t)),F++)})),!M)return null;var w=M.fullExtents;if((d=M.sublayers)||(d=[]),0===d.length&&d.push(M),!(h=M.extent)){var T=new i(d[0].extent);M.extent=T.toJSON(),h=M.extent}if(!(g=M.spatialReferences).length&&d.length>0){var C=function(e){var t=[];return e.sublayers.forEach((function(e){!t.length&&e.spatialReferences.length&&(t=e.spatialReferences||C(e))})),t};d.forEach((function(e){g.length||(g=e.spatialReferences||C(e))}))}var R,D=p(l,\"GetFeatureInfo\");if(D){var V=v(l,\"GetFeatureInfo\");V.indexOf(\"text/html\")>-1?R=\"text/html\":V.indexOf(\"text/plain\")>-1&&(R=\"text/plain\")}if(!R){var _=function(e){e&&(e.queryable=!1,e.sublayers&&e.sublayers.forEach((function(e){_(e)})))};_(M)}var U=function e(t){var n=[];return t.forEach((function(t){n.push(t),t.sublayers&&t.sublayers.length&&(n=n.concat(e(t.sublayers)),delete t.sublayers)})),n}(d),q=M.minScale||0,B=M.maxScale||0,G=M.dimensions,P=U.reduce((function(e,t){return e.concat(t.dimensions)}),[]),X=G.concat(P).filter(N),k=null;if(X.length>0){var j=Number.POSITIVE_INFINITY,W=Number.NEGATIVE_INFINITY;X.forEach((function(e){var t,n=e.extent;t=n,Array.isArray(t)&&t.length>0&&t[0]instanceof Date?n.forEach((function(e){j=Math.min(j,e.getTime()),W=Math.max(W,e.getTime())})):n.forEach((function(e){j=Math.min(j,e.min.getTime()),W=Math.max(W,e.max.getTime())}))})),k={startTimeField:null,endTimeField:null,trackIdField:null,timeExtent:[j,W]}}return{copyright:A,description:E,dimensions:G,extent:h,fullExtents:w,featureInfoFormat:R,featureInfoUrl:D,mapUrl:L,maxImageWidth:S,maxImageHeight:I,maxScale:B,minScale:q,layers:U,spatialReferences:g,supportedImageFormatTypes:O,timeInfo:k,title:y,version:b}},t.coordsReversed=l,t.getPopupLayers=function(e){return e.length?e.filter((function(e){return e.popupEnabled&&e.name&&e.queryable})).map((function(e){return e.name})).join(\",\"):\"\"},t.isDimensionInterval=function(e){return void 0!==e.min&&void 0!==e.max},t.isElevationDimension=function(e){return\"elevation\"===e.name},t.isGenericDimension=function(e){return\"time\"!==e.name&&\"elevation\"!==e.name},t.isTimeDimension=N,t.fromISODuration=E,t.toISOString=function(e){return e.toISOString().replace(/\\.[0-9]{3}/,\"\")}}));"],"sourceRoot":""}