(()=>{"use strict";const t=new class{constructor(){this.layerTypes={}}emitChange(){window.dispatchEvent(new CustomEvent("jeo-layer-types-changed",{detail:{layerTypes:this.getLayerTypes()}}))}getLayerTypes(){return Object.keys(this.layerTypes)}getLayerTypesLabels(){return Object.entries(this.layerTypes).map(([t,e])=>e.label||t)}registerLayerType(t,e){this.layerTypes[t]=e,this.emitChange()}getLayerType(t){return this.layerTypes[t]}getLayerTypeSchema(t){return this.getLayerType(t.type)?.getSchema?.(t)||null}};window.JeoLayerTypes=t;const e=t;window.JeoLayer=class{constructor(t,r){this.layerType=e.getLayerType(t),this.attributes=r}addStyle(t){return this.layerType.addStyle(t,this.attributes)}addLayer(t,e=null){return this.layerType.addLayer(t,this.attributes,e)}getSchema(){return this.layerType.getSchema(this.attributes)}addInteractions(t){if("function"==typeof this.layerType.addInteractions)return this.layerType.addInteractions(t,this.attributes)}getStyleUrl(){if("function"==typeof this.layerType.getStyleUrl)return this.layerType.getStyleUrl(this.attributes)}get layer_name(){return this.attributes.layer_name}get layer_id(){return this.attributes.layer_id}get attribution(){return this.attributes.attribution}get options(){return this.attributes.layer_type_options}get source_url(){return this.attributes.source_url}get attribution_name(){return this.attributes.attribution_name}}})();