var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}u((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};webmapgl.loadBundle("x086h40r",["exports","./chunk-b06c5cf8.js"],function(e,t){var n=window.webmapgl.h,r=function(){function e(){}return e.prototype.getBasemapStyles=function(){return Array.from(document.querySelectorAll("gl-style")).filter(function(e){return e.basemap})},e.prototype.setBasemap=function(e){this.getBasemapStyles().forEach(function(t){return t.enabled=t.url===e})},e.prototype.render=function(){var e=this,r=t._t("webmapgl.basemap-switcher.header"),o=this.getBasemapStyles().map(function(e){return n("ion-item",null,e.thumbnail?n("ion-thumbnail",{slot:"start"},n("img",{src:e.thumbnail,alt:e.name})):null,n("ion-label",{"text-wrap":!0},e.name),n("ion-radio",{checked:e.enabled,value:e.url}))});return n("ion-content",null,n("ion-list",null,n("ion-radio-group",{onIonChange:function(t){return e.setBasemap(t.detail.value)}},n("ion-list-header",null,r),o)))},Object.defineProperty(e,"is",{get:function(){return"gl-basemap-switcher"},enumerable:!0,configurable:!0}),e}(),o=function(){function e(){}return e.prototype.openPopover=function(e){return __awaiter(this,void 0,void 0,function(){var t,n;return __generator(this,function(r){switch(r.label){case 0:return t={component:document.createElement("gl-basemap-switcher"),ev:e},[4,this.popoverCtrl.create(t)];case 1:return[4,(n=r.sent()).present()];case 2:return r.sent(),[2,n]}})})},e.prototype.render=function(){var e=this,r=t._t("webmapgl.basemaps.title");return n("ion-button",{onClick:function(t){return e.openPopover(t)},title:r},n("ion-icon",{slot:"icon-only",name:"globe"}))},Object.defineProperty(e,"is",{get:function(){return"gl-basemaps"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{el:{elementRef:!0},popoverCtrl:{connect:"ion-popover-controller"}}},enumerable:!0,configurable:!0}),e}();e.GlBasemapSwitcher=r,e.GlBasemaps=o,Object.defineProperty(e,"__esModule",{value:!0})});