(()=>{"use strict";var t={},r={};function a(e){var n=r[e];if(void 0!==n)return n.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,a),o.exports}a.rv=()=>"1.4.11",a.ruid="bundler=rspack@1.4.11",$(document).ready(function(){$("#map-projects .thumbnail a.liz-project-show-desc").each(function(t,r){$(r).attr("onclick","")}),$("#map-projects .thumbnail a.liz-project-show-desc").click(function(){var t=$(this).attr("href");t=t.replace("link-projet-","liz-project-modal-");var r=$("#lizmap-modal");r.html($(t).html()).modal("show");var a=r.find("span.proj").text(),e=r.find("span.bbox").text();return lizMap.loadProjDefinition(a,function(t){var a=OpenLayers.Bounds.fromString(e);a.transform(t,"EPSG:4326");var n=lizMap.map.getExtent().transform(lizMap.map.getProjection(),"EPSG:4326");if(a.containsBounds(n)){var o=r.find("a.liz-project-view"),i=o.attr("href");o.attr("href",OpenLayers.Util.urlAppend(i,"#"+n))}}),!1}),$("#map-projects .thumbnail a.liz-project-view").click(function(){var t,r,a=$(this),e=a.parent().parent().find("div.liz-project");if(e.length<1)return!1;var n=(e=e[0]).dataset.lizmapRepository,o=e.dataset.lizmapProject,i=e.dataset.lizmapProj,p=e.dataset.lizmapBbox;return t=function(t){var r=OpenLayers.Bounds.fromString(p);r.transform(t,"EPSG:4326");var e=new OpenLayers.Bounds(lizMap.mainLizmap.state.map.extent).transform(lizMap.map.getProjection(),"EPSG:4326");r.containsBounds(e)?window.location=OpenLayers.Util.urlAppend(a.attr("href"),"#"+e.toArray().map(t=>t.toFixed(6)).join()):window.location=a.attr("href")},(r=i.replace(/^\s+|\s+$/g,""))in Proj4js.defs?t(r):$.get(globalThis.lizUrls.wms,{repository:n,project:o,SERVICE:"WMS",REQUEST:"GetProj4",authid:r},function(a){Proj4js.defs[r]=a,new OpenLayers.Projection(r),t(r)}),!1})})})();
//# sourceMappingURL=map-projects.js.map