@panoramax/web-viewer 3.2.3-develop-ecb7e151 → 3.2.3-develop-78e86a51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  *
11
11
  */
12
- !function(F,Da){"object"===typeof exports&&"object"===typeof module?module.exports=Da():"function"===typeof define&&define.amd?define("Panoramax",[],Da):"object"===typeof exports?exports.Panoramax=Da():F.Panoramax=Da()}(this,(()=>(()=>{var F={9555:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Editor});ll(980);var cl=ll(6803),hl=ll(1951),dl=ll(8489),pl=ll(7534),fl=ll(6810),Al=ll(5071),bl=ll(1300),kl=ll(1545);const Dl="sequence-headings";class Editor extends cl.A{constructor(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(F,Da,Object.assign(ll,{users:[]})),this._selectedSeqId||this._loader.dismiss({},"No sequence is selected"),this.psvContainer=document.createElement("div"),this.mapContainer=document.createElement("div"),this.container.appendChild(this.psvContainer),this.container.appendChild(this.mapContainer);try{this.psv=new dl.Ay(this,this.psvContainer),this.psv._myVTour.datasource.nodeResolver=this._getNode.bind(this)}catch(cl){let F=kl.IJ.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(cl,F)}this._api.onceReady().then((()=>{try{this.map=new hl.A(this,this.mapContainer,{raster:ll.raster,background:ll.background,supplementaryStyle:this._createMapStyle(),zoom:15}),(0,Al.I0)(this),this._loadSequence(),this.map.once("load",(()=>{ll.raster&&this._addMapBackgroundWidget(),this._bindPicturesEvents()}));const F=this.map._picMarker.setRotation.bind(this.map._picMarker);this.map._picMarker.setRotation=Da=>(Da=void 0===this._lastRelHeading?Da:Da+this._lastRelHeading-this.psv.getPictureRelativeHeading(),F(Da))}catch(cl){this._loader.dismiss(cl,this._t.gvs.error_psv)}})),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Editor"}_createMapStyle(){return{sources:{geovisio_editor_sequences:{type:"geojson",data:{type:"FeatureCollection",features:[]}}},layers:[{id:"geovisio_editor_sequences",type:"line",source:"geovisio_editor_sequences",layout:{...bl.VM.SEQUENCES.layout},paint:{...bl.VM.SEQUENCES.paint}},{id:"geovisio_editor_pictures",type:"circle",source:"geovisio_editor_sequences",layout:{...bl.VM.PICTURES.layout},paint:{...bl.VM.PICTURES.paint}}]}}_bindPicturesEvents(){this.map.on("mousemove","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor="pointer"})),this.map.on("mouseleave","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor=""})),this.map.on("click","geovisio_editor_pictures",this.map._onPictureClick.bind(this.map))}_loadSequence(){return this._api.getSequenceItems(this._selectedSeqId).then((F=>{if(this.map.once("sourcedata",(()=>{this.map.setPaintProperty("geovisio_editor_sequences","line-color",this.map._getLayerColorStyle("sequences")),this.map.setPaintProperty("geovisio_editor_pictures","circle-color",this.map._getLayerColorStyle("pictures")),this.map.setLayoutProperty("geovisio_editor_sequences","visibility","visible"),this.map.setLayoutProperty("geovisio_editor_pictures","visibility","visible"),this.map.once("styledata",(()=>this._loader.dismiss()))})),this._sequenceData=F.features,this.map.getSource("geovisio_editor_sequences").setData({type:"FeatureCollection",features:[{type:"Feature",properties:{id:this._selectedSeqId},geometry:{type:"LineString",coordinates:F.features.map((F=>F.geometry.coordinates))}},...F.features.map((F=>(F.properties.id=F.id,F.properties.sequences=[this._selectedSeqId],F)))]}),this._selectedPicId){const Da=F.features.find((F=>F.id===this._selectedPicId));Da?(this.select(this._selectedSeqId,this._selectedPicId,!0),this.map.jumpTo({center:Da.geometry.coordinates,zoom:18})):console.log("Picture with ID",Da,"was not found")}else{const Da=[...F.features[0].geometry.coordinates,...F.features[0].geometry.coordinates];for(let ll=1;ll<F.features.length;ll++){const cl=F.features[ll].geometry.coordinates;cl[0]<Da[0]&&(Da[0]=cl[0]),cl[1]<Da[1]&&(Da[1]=cl[1]),cl[0]>Da[2]&&(Da[2]=cl[0]),cl[1]>Da[3]&&(Da[3]=cl[1])}this.map.fitBounds(Da,{animate:!1})}})).catch((F=>this._loader.dismiss(F,this._t.gvs.error_api)))}_getNode(F){const Da=this._sequenceData.find((Da=>Da.properties.id===F)),ll=Da?(0,Al.rs)(Da,this._t,this._isInternetFast):null;return ll&&delete ll.links,ll}_addMapBackgroundWidget(){const F=document.createElement("div");F.id="gvs-map-bg",F.classList.add("gvs-panel","gvs-widget-bg","gvs-input-group");const onBgChange=F=>this.map.setBackground(F.target.value),Da=document.createElement("input");Da.id="gvs-map-bg-streets",Da.setAttribute("type","radio"),Da.setAttribute("name","gvs-map-bg"),Da.setAttribute("value","streets"),Da.addEventListener("change",onBgChange),F.appendChild(Da);const ll=document.createElement("label");ll.setAttribute("for",Da.id);const cl=document.createElement("img");cl.src=fl,cl.alt="",ll.appendChild(cl),ll.appendChild(document.createTextNode(this._t.gvs.map_background_streets)),F.appendChild(ll);const hl=document.createElement("input");hl.id="gvs-map-bg-aerial",hl.setAttribute("type","radio"),hl.setAttribute("name","gvs-map-bg"),hl.setAttribute("value","aerial"),hl.addEventListener("change",onBgChange),F.appendChild(hl);const dl=document.createElement("label");dl.setAttribute("for",hl.id);const Al=document.createElement("img");Al.src=pl,Al.alt="",dl.appendChild(Al),dl.appendChild(document.createTextNode(this._t.gvs.map_background_aerial)),F.appendChild(dl),this.mapContainer.appendChild(F);const onMapBgChange=F=>{"aerial"===F?hl.checked=!0:Da.checked=!0};this.addEventListener("map:background-changed",(F=>onMapBgChange(F.detail.background))),onMapBgChange(this.map.getBackground())}previewSequenceHeadingChange(F){const Da=void 0!==this.map.getLayer(Dl);if(this.map._picMarkerPreview.remove(),void 0===F)return delete this._lastRelHeading,Da&&this.map.setLayoutProperty(Dl,"visibility","none"),void(this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x));this._lastRelHeading=F,Da||this.map.addLayer({id:Dl,type:"symbol",source:"geovisio_editor_sequences",layout:{"icon-image":"gvs-marker","icon-overlap":"always","icon-size":.8}});const ll=-this.psv.getPictureRelativeHeading();this.map.setLayoutProperty(Dl,"visibility","visible"),this.map.setLayoutProperty(Dl,"icon-rotate",["+",["get","view:azimuth"],ll,F]);const cl=[["==",["geometry-type"],"Point"]];this._selectedPicId&&cl.push(["!=",["get","id"],this._selectedPicId]),this.map.setFilter(Dl,["all",...cl]),this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x)}_onSelect(){void 0!==this._lastRelHeading&&this.previewSequenceHeadingChange(this._lastRelHeading)}}},7531:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>fl});var cl=ll(6803),hl=ll(1951),dl=ll(1300),pl=ll(927);class StandaloneMap extends cl.A{constructor(F,Da){super(F,Da,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),this.mapContainer=document.createElement("div"),this.container.appendChild(this.mapContainer),this._api.onceReady().then((()=>this._initMap())),this.addEventListener("map:picture-click",(F=>this.select(F.detail.seqId,F.detail.picId))),this.addEventListener("map:sequence-click",(F=>this.select(F.detail.seqId))),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Map"}destroy(){super.destroy(),this.map.destroy(),delete this.map,this.mapContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((F=>F.startsWith("gvs"))))}_initMap(){this._options.hash=!0;class MyMap extends hl.A{_getLayerStyleProperties(F){return"pictures_symbols"===F?{layout:{visibility:"none"}}:super._getLayerStyleProperties(F)}}this.map=new MyMap(this,this.mapContainer,this._options),this.map.addControl(new pl.NavigationControl({showCompass:!1})),this.map.waitForEnoughMapLoaded().then((()=>{this.map.reloadLayersStyles(),this._loader.dismiss()}))}_onSelect(F){if(F.detail.picId||F.detail.seqId){const Da=F.detail.picId?"pictures":"sequences",ll=this.map.queryRenderedFeatures({layers:[...this.map._userLayers].map((F=>(0,dl.IN)(F,Da))),filter:["==",["get","id"],F.detail.picId||F.detail.seqId]});ll.length>=0&&null!=ll[0]&&this.map._attachPreviewToPictures({features:ll},Da)}}}const fl=StandaloneMap},2968:(F,Da,ll)=>{"use strict";ll.d(Da,{$p:()=>Ql,Ay:()=>Viewer,LM:()=>Al.LM,Vf:()=>Al.Vf});ll(2101);var cl=ll(1545),hl=ll(490),dl=ll(9194),pl=ll(5071),fl=ll(6803),Al=ll(8489),bl=ll(1951),kl=ll(1300),Dl=ll(4683),Wl=ll(6627);const Ql=20,wc=Math.PI/6,Sc=100,eu="http://127.0.0.1:8111",iu={DEFAULT:"default",AGE:"age",TYPE:"type",SCORE:"score"};class Viewer extends fl.A{constructor(F,Da){var ll;let pl,fl=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(F,Da,fl),null==this._options.map&&(this._options.map={}),null==this._options.widgets&&(this._options.widgets={}),this._sequencePlaying=!1,this._prevSequence=null,this._mapTheme=(null===fl||void 0===fl||null===(ll=fl.map)||void 0===ll?void 0:ll.theme)||iu.DEFAULT,this._picNav=(null===fl||void 0===fl?void 0:fl.picturesNavigation)||"any",this._options.testing)return;if(!0===this._options.hash||void 0===this._options.hash){if(this._hash=new dl.A(this),pl=this._hash._getCurrentHash(),"none"===pl.map&&(this._options.map=!1),"object"===typeof this._options.map&&(this._options.map.hash=!1),this._options.map&&pl.focus&&(this._options.map.startWide="map"===pl.focus),this._options.map&&pl.background&&(this._options.map.background=pl.background),this._options.map&&pl.users&&(this._options.users=[...new Set(pl.users.split(","))]),pl.xyz){const F=this._hash.getXyzOptionsFromHashString(pl.xyz);this.addEventListener("psv:picture-loaded",(()=>{this.psv.setXYZ(F.x,F.y,F.z)}),{once:!0})}if(this._options.map&&"string"===typeof pl.map){const F=this._hash.getMapOptionsFromHashString(pl.map);F&&(this._options.map=Object.assign({},this._options.map,F))}if(this._options.map&&this.setFilters(this._hash.getMapFiltersFromHashVals(pl),!0),pl.pic){const F=pl.pic.split(";");F.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._options.selectedPicture=F[0]}"string"===typeof pl.speed&&(this._options.transition=parseInt(pl.speed)),pl.nav&&(this._picNav=pl.nav)}this._initContainerStructure();try{this.psv=new Al.Ay(this,this.psvContainer,{transitionDuration:this._options.transition,shouldGoFast:this._psvShouldGoFast.bind(this),keyboard:"always",keyboardActions:{...cl.zY.keyboardActions,8:"ROTATE_UP",2:"ROTATE_DOWN",4:"ROTATE_LEFT",6:"ROTATE_RIGHT",PageUp:()=>this.psv.goToNextPicture(),9:()=>this.psv.goToNextPicture(),PageDown:()=>this.psv.goToPrevPicture(),3:()=>this.psv.goToPrevPicture(),5:()=>this.moveCenter(),"*":()=>this.moveCenter(),Home:()=>this.toggleFocus(),7:()=>this.toggleFocus(),End:()=>this.toggleUnfocusedVisible(),1:()=>this.toggleUnfocusedVisible()," ":()=>this.toggleSequencePlaying(),0:()=>this.toggleSequencePlaying()}}),this.psv.addEventListener("dblclick",(()=>{this.map&&this.isMapWide()&&this.setFocus("pic")}))}catch(bl){let F=cl.IJ.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(bl,F)}const onceStuffReady=()=>{this._widgets=new hl.A(this,this._options.widgets),this.map&&!this._options.selectedPicture&&this.setUnfocusedVisible(!1),this._options.selectedPicture?(this.select(null,this._options.selectedPicture,!0),this.addEventListener("psv:picture-loaded",(()=>{var F,Da,ll,cl,hl;!this._selectedSeqId&&null!==(F=this.psv)&&void 0!==F&&null!==(Da=F._myVTour)&&void 0!==Da&&null!==(ll=Da.getCurrentNode())&&void 0!==ll&&null!==(cl=ll.sequence)&&void 0!==cl&&cl.id&&this.select(this.psv._myVTour.getCurrentNode().sequence.id,this._options.selectedPicture),this.map&&this._options.map&&this.map.jumpTo(this._options.map),"meta"===(null===(hl=pl)||void 0===hl?void 0:hl.focus)&&this._widgets._showPictureMetadataPopup(),this._loader.dismiss()}),{once:!0})):this._loader.dismiss(),this._options.position&&this.goToPosition(...this._options.position).catch((F=>this._loader.dismiss(F,this._t.gvs.error_nopic))),this._hash&&this.map&&(this.map._attribution._container.classList.add("gvs-hidden"),this._hash.bindMapEvents(),this._mapFilters&&this.setFilters(this._mapFilters,!0),pl.users&&Promise.all(this.map.getVisibleUsers().filter((F=>"geovisio"!=F)).map((F=>this._api.getUserName(F)))).then((F=>{F=F.filter((F=>null!=F)).join(", ");const Da=document.getElementById("gvs-filter-search-user").querySelector("input");Da&&(Da.setItem(F),Da.parentNode.classList.add("gvs-filter-active"))})).catch((F=>console.warn("Error when looking up for user names",F)))),document.addEventListener("keyup",(F=>{"Escape"!==F.key||this.popupContainer.classList.contains("gvs-hidden")||this.setPopup(!1)}))};this._api.onceReady().then((()=>{this._options.map?(void 0===this._options.map.doubleClickZoom&&(this._options.map.doubleClickZoom=!1),this._initMap().then(onceStuffReady).catch((F=>this._loader.dismiss(F,this._t.gvs.error_api_compatibility)))):onceStuffReady()}))}getClassName(){return"Viewer"}destroy(){super.destroy(),this._widgets.destroy(),delete this._widgets,this._hash.destroy(),delete this._hash,this.map&&this.map.destroy(),delete this.map,delete this._mapFilters,this.psv.destroy(),delete this.psv,this.miniContainer.remove(),this.mainContainer.remove(),this.mapContainer.remove(),this.psvContainer.remove(),this.popupContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((F=>F.startsWith("gvs"))))}_initContainerStructure(){this.miniContainer=document.createElement("div"),this.miniContainer.classList.add("gvs-mini"),this.mainContainer=document.createElement("div"),this.mainContainer.classList.add("gvs-main"),this.popupContainer=document.createElement("div"),this.popupContainer.classList.add("gvs-popup","gvs-hidden"),this.psvContainer=document.createElement("div"),this.mainContainer.appendChild(this.psvContainer),this.mapContainer=document.createElement("div"),this.miniContainer.appendChild(this.mapContainer),this.container.appendChild(this.mainContainer),this.container.appendChild(this.miniContainer),this.container.appendChild(this.popupContainer)}async _initMap(){await new Promise((F=>{this.map=new bl.A(this,this.mapContainer,this._options.map),this.map._getLayerColorStyle=this._getLayerColorStyle.bind(this),this.map._getLayerSortStyle=this._getLayerSortStyle.bind(this),this.addEventListener("map:users-changed",F,{once:!0}),this.container.classList.add("gvs-has-mini"),this.map.on("dblclick",(()=>{this.isMapWide()?this.select():this.setFocus("map")})),"object"===typeof this._options.map&&this._options.map.startWide?this.setFocus("map",!0):this.setFocus("pic",!0)})),this._initMapKeyboardHandler(),(0,pl.I0)(this)}_initMapKeyboardHandler(){const F=this;this.map.keyboard.keydown=function(Da){if(Da.altKey||Da.ctrlKey||Da.metaKey)return;switch(Da.key){case"*":case"5":return void F.moveCenter();case"PageUp":case"9":return void F.psv.goToNextPicture();case"PageDown":case"3":return void F.psv.goToPrevPicture();case"Home":case"7":return Da.stopPropagation(),void F.toggleFocus();case"End":case"1":return void F.toggleUnfocusedVisible();case" ":case"0":return void F.toggleSequencePlaying()}let ll=0,cl=0,hl=0,dl=0,pl=0;switch(Da.keyCode){case 61:case 107:case 171:case 187:ll=1;break;case 189:case 109:case 173:ll=-1;break;case 37:case 100:Da.shiftKey?cl=-1:(Da.preventDefault(),dl=-1);break;case 39:case 102:Da.shiftKey?cl=1:(Da.preventDefault(),dl=1);break;case 38:case 104:Da.shiftKey?hl=1:(Da.preventDefault(),pl=-1);break;case 40:case 98:Da.shiftKey?hl=-1:(Da.preventDefault(),pl=1);break;default:return}return this._rotationDisabled&&(cl=0,hl=0),{cameraAnimation:F=>{const fl=this._tr;F.easeTo({duration:300,easeId:"keyboardHandler",easing:F=>F*(2-F),zoom:ll?Math.round(fl.zoom)+ll*(Da.shiftKey?2:1):fl.zoom,bearing:fl.bearing+cl*this._bearingStep,pitch:fl.pitch+hl*this._pitchStep,offset:[-dl*this._panStep,-pl*this._panStep],center:fl.center},{originalEvent:Da})}}}.bind(this.map.keyboard)}_psvShouldGoFast(){return this._sequencePlaying&&this.psv.getTransitionDuration()<1e3||this.map&&this.isMapWide()}refreshPSV(){var F;const Da=this.psv._myVTour.getCurrentNode();if(Da&&Da.panorama.baseUrl!==(null===Da||void 0===Da||null===(F=Da.panorama)||void 0===F?void 0:F.origBaseUrl)){const F=this.psv.getZoomLevel(),ll=this.psv.getPosition();this.psv._myVTour.state.currentNode=null,this.psv._myVTour.setCurrentNode(Da.id,{zoomTo:F,rotateTo:ll,fadeIn:!1,speed:0,rotation:!1})}Da&&Da.panorama.rows>1&&this.psv.adapter.__refresh()}setPopup(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(F)if(Da){this.psv.stopKeyboardControl(),this.popupContainer.innerHTML="";const F=document.createElement("div");F.classList.add("gvs-popup-backdrop"),F.addEventListener("click",(()=>this.setPopup(!1)));const ll=document.createElement("div");ll.classList.add("gvs-widget-bg"),"string"===typeof Da?ll.innerHTML=Da:Array.isArray(Da)&&Da.forEach((F=>ll.appendChild(F)));const cl=document.createElement("button");cl.id="gvs-popup-btn-close",cl.classList.add("gvs-btn","gvs-widget-bg"),cl.appendChild((0,Dl.fa)(Wl.Jy)),cl.addEventListener("click",(()=>this.setPopup(!1))),ll.insertBefore(cl,ll.firstChild),this.popupContainer.appendChild(F),this.popupContainer.appendChild(ll),this.popupContainer.classList.remove("gvs-hidden"),(0,Dl.$c)(this.popupContainer,this._t)}else this.popupContainer.classList.remove("gvs-hidden");else this.popupContainer.classList.add("gvs-hidden"),this.psv.startKeyboardControl()}playSequence(){this._sequencePlaying=!0;const F=new Event("sequence-playing");this.dispatchEvent(F);const nextPicturePlay=()=>{if(this._sequencePlaying){this.addEventListener("psv:picture-loaded",(()=>{this._playTimer=setTimeout((()=>{nextPicturePlay()}),this.psv.getTransitionDuration())}),{once:!0});try{this.psv.goToNextPicture()}catch(F){this.stopSequence()}}};this.psv.addEventListener("click",(()=>{this.stopSequence()})),nextPicturePlay()}stopSequence(){this._sequencePlaying=!1,this._playTimer&&(clearTimeout(this._playTimer),delete this._playTimer),this.refreshPSV();const F=new Event("sequence-stopped");this.dispatchEvent(F)}isSequencePlaying(){return this._sequencePlaying}toggleSequencePlaying(){this.isSequencePlaying()?this.stopSequence():this.playSequence()}moveCenter(){const F=this.psv.getPictureMetadata();F&&(this.map&&this.isMapWide()?this.map.flyTo({center:F.gps,zoom:20}):this._psvAnimate({speed:Al.LM,yaw:0,pitch:0,zoom:Al.cS}))}moveLeft(){this._moveToDirection("left")}moveRight(){this._moveToDirection("right")}moveUp(){this._moveToDirection("up")}moveDown(){this._moveToDirection("down")}_moveToDirection(F){if(this.map&&this.isMapWide()){let Da;switch(F){case"up":Da=[0,-100];break;case"left":Da=[-100,0];break;case"down":Da=[0,Sc];break;case"right":Da=[Sc,0]}this.map.panBy(Da)}else{let Da=this.psv.getPosition();switch(F){case"up":Da.pitch+=wc;break;case"left":Da.yaw-=wc;break;case"down":Da.pitch-=wc;break;case"right":Da.yaw+=wc}this._psvAnimate({speed:Al.LM,...Da})}}_psvAnimate(F){this._lastPsvAnim&&this._lastPsvAnim.cancel(),this._lastPsvAnim=this.psv.animate(F)}isMapWide(){if(!this.map)throw new Error("Map is not enabled");return this.mapContainer.parentNode==this.mainContainer}_getDatesForLayerColors(){const F=864e5,Da=Date.now();return[Da-30*F,Da-365*F,Da-730*F].map((F=>new Date(F).toISOString().split("T")[0]))}_getLayerColorStyle(F){var Da,ll,cl,hl,dl;const fl=["case",["==",["get","hidden"],!0],pl.lm.HIDDEN],Al=(null===(Da=this.psv._myVTour)||void 0===Da||null===(ll=Da.state)||void 0===ll?void 0:ll.loadingNode)||(null===(cl=this.psv._myVTour)||void 0===cl||null===(hl=cl.state)||void 0===hl||null===(dl=hl.currentNode)||void 0===dl?void 0:dl.id),bl=Al?this.psv._picturesSequences[Al]:null;if("sequences"==F&&bl?fl.push(["==",["get","id"],bl],pl.lm.SELECTED):"pictures"==F&&bl&&fl.push(["in",bl,["get","sequences"]],pl.lm.SELECTED),this._mapTheme==iu.AGE){const Da="sequences"==F?"date":"ts",ll=this._getDatesForLayerColors();fl.push(["!",["has",Da]],pl.lm.BASE,[">=",["get",Da],ll[0]],pl.lm.PALETTE_4,[">=",["get",Da],ll[1]],pl.lm.PALETTE_3,[">=",["get",Da],ll[2]],pl.lm.PALETTE_2,pl.lm.PALETTE_1)}else this._mapTheme==iu.TYPE?fl.push(["!",["has","type"]],pl.lm.BASE,["==",["get","type"],"equirectangular"],pl.lm.QUALI_1,pl.lm.QUALI_2):this._mapTheme==iu.SCORE?fl.push(["==",kl.d3,5],pl.fW[0].color,["==",kl.d3,4],pl.fW[1].color,["==",kl.d3,3],pl.fW[2].color,["==",kl.d3,2],pl.fW[3].color,pl.fW[4].color):fl.push(pl.lm.BASE);return fl}_getLayerSortStyle(F){var Da,ll,cl,hl,dl;const pl=["case",["==",["get","hidden"],!0],90],fl=(null===(Da=this.psv._myVTour)||void 0===Da||null===(ll=Da.state)||void 0===ll?void 0:ll.loadingNode)||(null===(cl=this.psv._myVTour)||void 0===cl||null===(hl=cl.state)||void 0===hl||null===(dl=hl.currentNode)||void 0===dl?void 0:dl.id),Al=fl?this.psv._picturesSequences[fl]:null;if("sequences"==F&&Al?pl.push(["==",["get","id"],Al],100):"pictures"==F&&Al&&pl.push(["in",Al,["get","sequences"]],100),this._mapTheme==iu.AGE){const Da="sequences"==F?"date":"ts",ll=this._getDatesForLayerColors();pl.push(["!",["has",Da]],0,[">=",["get",Da],ll[0]],50,[">=",["get",Da],ll[1]],49,[">=",["get",Da],ll[2]],48)}else this._mapTheme==iu.TYPE?pl.push(["!",["has","type"]],0,["==",["get","type"],"equirectangular"],50):this._mapTheme==iu.SCORE&&pl.push(["==",kl.d3,5],80,["==",kl.d3,4],65,["==",kl.d3,3],50,["==",kl.d3,2],35,["==",kl.d3,1],20);return pl.push(10),pl}getPicturesNavigation(){return this._picNav}setPicturesNavigation(F){this._picNav=F;const Da=new CustomEvent("pictures-navigation-changed",{detail:{value:F}});this.dispatchEvent(Da)}_picturesNavFilter(F){switch(this._picNav){case"seq":return["next","prev"].includes(F.rel);case"pic":return!1;default:return!0}}toggleJOSMLive(F){if(F){const F=new CustomEvent("josm-live-enabled");return this.dispatchEvent(F),fetch(eu+"/version").catch((F=>{throw this.dispatchEvent(new CustomEvent("josm-live-disabled")),F})).then((()=>{const F=(0,pl.dK)(this.psv.getPictureMetadata());if(F){fetch(`${eu}/load_and_zoom?${F}`).catch((F=>{console.warn(F),this.toggleJOSMLive(!1)}))}this._josmListener=()=>{const F=(0,pl.dK)(this.psv.getPictureMetadata());if(F){fetch(`${eu}/zoom?${F}`).catch((F=>{console.warn(F),this.toggleJOSMLive(!1)}))}},this.addEventListener("psv:picture-loaded",this._josmListener),this.addEventListener("psv:picture-loading",this._josmListener)}))}{const F=new CustomEvent("josm-live-disabled");return this.dispatchEvent(F),this._josmListener&&(this.removeEventListener("psv:picture-loading",this._josmListener),this.removeEventListener("psv:picture-loaded",this._josmListener),delete this._josmListener),Promise.resolve()}}setFocus(F){var Da,ll,cl;let hl=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("map"===F&&!this.map)throw new Error("Map is not enabled");if(!["map","pic"].includes(F))throw new Error("Invalid focus value (should be pic or map)");if(("map"!==F||!this.map||!this.isMapWide())&&("pic"!==F||this.map&&this.isMapWide())){var dl;if(null===(Da=this.mapContainer.parentElement)||void 0===Da||Da.removeChild(this.mapContainer),null===(ll=this.psvContainer.parentElement)||void 0===ll||ll.removeChild(this.psvContainer),"map"===F)this.psv.stopKeyboardControl(),this.map.keyboard.enable(),this.container.classList.add("gvs-focus-map"),this.mainContainer.appendChild(this.mapContainer),this.miniContainer.appendChild(this.psvContainer),this.map.getCanvas().focus();else null===this||void 0===this||null===(dl=this.map)||void 0===dl||dl.keyboard.disable(),this.psv.startKeyboardControl(),this.container.classList.remove("gvs-focus-map"),this.mainContainer.appendChild(this.psvContainer),this.miniContainer.appendChild(this.mapContainer),this.psvContainer.focus();if(null===this||void 0===this||null===(cl=this.map)||void 0===cl||cl.resize(),this.psv.autoSize(),this.refreshPSV(),!hl){const Da=new CustomEvent("focus-changed",{detail:{focus:F}});this.dispatchEvent(Da)}}}toggleFocus(){if(!this.map)throw new Error("Map is not enabled");this.setFocus(this.isMapWide()?"pic":"map")}setUnfocusedVisible(F){if(!this.map)throw new Error("Map is not enabled");F?this.container.classList.remove("gvs-mini-hidden"):this.container.classList.add("gvs-mini-hidden"),this.map.resize(),this.psv.autoSize()}toggleUnfocusedVisible(){if(!this.map)throw new Error("Map is not enabled");this.setUnfocusedVisible(this.container.classList.contains("gvs-mini-hidden"))}setFilters(F){var Da;let ll=arguments.length>1&&void 0!==arguments[1]&&arguments[1],cl=[],hl=[],dl=!1;if(this._mapFilters={},F.minDate&&""!==F.minDate&&(this._mapFilters.minDate=F.minDate,cl.push([">=",["get","date"],F.minDate]),hl.push([">=",["get","ts"],F.minDate])),F.maxDate&&""!==F.maxDate){this._mapFilters.maxDate=F.maxDate,cl.push(["<=",["get","date"],F.maxDate]);let Da=new Date(F.maxDate);Da.setDate(Da.getDate()+1),Da=Da.toISOString().split("T")[0],hl.push(["<=",["get","ts"],Da])}if(F.type&&""!==F.type&&(this._mapFilters.type=F.type,cl.push(["==",["get","type"],F.type]),hl.push(["==",["get","type"],F.type])),null!==(Da=this.map)&&void 0!==Da&&Da._hasGridStats()&&(dl=!0),F.camera&&""!==F.camera){this._mapFilters.camera=F.camera;const Da=F.camera.toLowerCase().trim()+" ",ll=F.camera.toLowerCase().trim()+"zzzzzzzzzzzzzzzzzzzz",dl=["collator",{"case-sensitive":!1,"diacritic-sensitive":!1}];cl.push([">=",["get","model"],Da,dl]),cl.push(["<=",["get","model"],ll,dl]),hl.push([">=",["get","model"],Da,dl]),hl.push(["<=",["get","model"],ll,dl])}if(F.qualityscore&&F.qualityscore.length>0&&(this._mapFilters.qualityscore=F.qualityscore,cl.push(["in",kl.d3,["literal",this._mapFilters.qualityscore]]),hl.push(["in",kl.d3,["literal",this._mapFilters.qualityscore]])),F.theme&&Object.values(iu).includes(F.theme)&&(this._mapFilters.theme=F.theme,this.map&&(this._mapTheme=this._mapFilters.theme,dl=!0)),0==cl.length?cl=null:cl.unshift("all"),0==hl.length?hl=null:(hl.unshift("all"),hl=["step",["zoom"],!0,kl.oe,hl]),this.map){dl&&this.map.reloadLayersStyles();const F=this.map.getVisibleUsers().includes("geovisio");cl&&F&&(cl=["step",["zoom"],!0,7,cl]),this.map.filterUserLayersContent("sequences",cl),this.map.filterUserLayersContent("pictures",hl),!ll&&(null!==cl||null!==hl||null!==this._mapFilters.theme&&this._mapFilters.theme!==iu.DEFAULT)&&F&&this.map.getZoom()<7&&!this.map._hasGridStats()&&this.map.easeTo({zoom:7})}const pl=new CustomEvent("filters-changed",{detail:Object.assign({},this._mapFilters)});this.dispatchEvent(pl)}}},6803:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>CoreView});ll(8946);var cl=ll(5254),hl=ll(6980),dl=ll(1300),pl=ll(5071),fl=ll(8330),Al=ll(2730);class CoreView extends EventTarget{constructor(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(),this._options=ll,null==this._options&&(this._options={}),this._options.users||(this._options.users=["geovisio"]),"string"===typeof this._options.users&&(this._options.users=[this._options.users]),this._options.style||(this._options.style=dl.AV),this._options.testing||console.info(`\ud83d\udcf7 Panoramax ${this.getClassName()} - Version ${fl.rE} (ecb7e15)\n\n\ud83c\udd98 Issues can be reported at ${fl.Jk.O}`),this._t=(0,hl.$)(this._options.lang),this._isInternetFast=null,(0,pl.KF)().then((F=>this._isInternetFast=F)),this._selectedSeqId=this._options.selectedSequence||null,this._selectedPicId=this._options.selectedPicture||null,this.container="string"===typeof F?document.getElementById(F):F,!(this.container instanceof Element))throw new Error("Container is not a valid HTML element, does it exist in your page ?");this.container.classList.add("gvs",`gvs-${this.getClassName().toLocaleLowerCase()}`),(0,pl.GZ)()&&this.container.classList.add("gvs-iframed"),this.loaderContainer=document.createElement("div"),this.container.appendChild(this.loaderContainer),this._loader=new Al.A(this,this.loaderContainer),Da=(Da||"").replace("/api/search","/api");try{var bl;this._api=new cl.A(Da,{users:this._options.users,fetch:null===(bl=this._options)||void 0===bl?void 0:bl.fetchOptions,style:this._options.style}),this._api.onceReady().then((()=>{let F=this._api.getUnavailableFeatures(),Da=this._api.getAvailableFeatures();Da=0===F.length?"\u2705 All features available":"\u2705 Available features: "+Da.join(", "),F=0===F.length?"":"\ud83d\udeab Unavailable features: "+F.join(", "),console.info(`\ud83c\udf10 Connected to API "${this._api._metadata.name}" (${this._api._endpoint})\n\u2139\ufe0f API runs STAC ${this._api._metadata.stac_version} ${this._api._metadata.geovisio_version?"& GeoVisio "+this._api._metadata.geovisio_version:""}\n ${Da}\n ${F}\n`.trim())})).catch((F=>this._loader.dismiss(F,this._t.gvs.error_api)))}catch(kl){this._loader.dismiss(kl,this._t.gvs.error_api)}}getClassName(){return"CoreView"}destroy(){delete this._options,delete this._t,delete this._api,delete this._loader,this.loaderContainer.remove(),delete this.loaderContainer}isWidthSmall(){var F;return(null===(F=this.container)||void 0===F?void 0:F.offsetWidth)<576}isHeightSmall(){var F;return(null===(F=this.container)||void 0===F?void 0:F.offsetHeight)<400}select(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Da===pl.an&&(Da=null);const cl=this._selectedSeqId||null,hl=this._selectedPicId||null;(ll||hl!=Da||cl!=F)&&(this._selectedSeqId=F,this._selectedPicId=Da,this.dispatchEvent(new CustomEvent("select",{detail:{seqId:F,picId:Da,prevSeqId:cl,prevPicId:hl}})))}}},2730:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Loader});ll(737);var cl=ll(2305),hl=ll(6883);class Loader{constructor(F,Da){this._parent=F,this.container=Da,this.container.classList.add("gvs-loader","gvs-loader-visible");const ll=document.createElement("img");ll.src=hl,ll.alt="",ll.title=this._parent._t.map.loading,ll.classList.add("gvs-loader-img"),this.container.appendChild(ll);const cl=document.createElement("div"),dl=document.createElement("span"),nextLabelFun=()=>this._parent._t.gvs.loading_labels_fun[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_fun.length)];dl.innerHTML=this._parent._t.gvs.loading_labels_serious[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_serious.length)];const nextLabelFct=()=>setTimeout((()=>{dl.innerHTML=nextLabelFun(),this._loaderLabelChanger=nextLabelFct()}),500+1e3*Math.random());this._loaderLabelChanger=nextLabelFct(),cl.appendChild(dl),this.container.appendChild(cl)}isVisible(){return this.container.classList.contains("gvs-loader-visible")}dismiss(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(clearTimeout(this._loaderLabelChanger),F){let hl;!0!==F&&console.error(F),this.container.children[0].src=cl,this.container.children[0].style.width="200px",this.container.children[0].style.animation="unset",hl=ll?`<button class="gvs-loader-cta">${this._parent._t.gvs.error_click}</button>`:`<small>${this._parent._t.gvs.error_retry}</small>`,Da&&(hl=Da+"<br />"+hl),this.container.children[1].innerHTML=`${this._parent._t.gvs.error}<br />${hl}`,ll&&this.container.addEventListener("click",ll);const dl=Da||"Panoramax JS had a blocking exception",pl=new CustomEvent("broken",{detail:{error:dl}});throw this._parent.dispatchEvent(pl),new Error(dl)}{this.container.classList.remove("gvs-loader-visible"),setTimeout((()=>this.container.remove()),2e3);const F=new CustomEvent("ready");this._parent.dispatchEvent(F),ll&&ll()}}}},1951:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Map});ll(1120);var cl=ll(1300),hl=ll(5071),dl=ll(6883),pl=ll(270),fl=ll(6462),Al=ll(9740),bl=(ll(6795),ll(927)),kl=ll.n(bl),Dl=ll(587),Wl=ll.n(Dl),Ql=ll(6840);kl().workerClass=Wl(),kl().addProtocol("pmtiles",(new Ql.Zs).tile);const wc=["antialias","attributionControl","bearing","bearingSnap","bounds","boxZoom","center","clickTolerance","collectResourceTiming","cooperativeGestures","crossSourceCollisions","doubleClickZoom","dragPan","dragRotate","fadeDuration","failIfMajorPerformanceCaveat","fitBoundsOptions","hash","interactive","keyboard","localIdeographFontFamily","locale","logoPosition","maplibreLogo","maxBounds","maxCanvasSize","maxPitch","maxTileCacheSize","maxTileCacheZoomLevels","maxZoom","minPitch","minZoom","pitch","pitchWithRotate","pixelRatio","preserveDrawingBuffer","refreshExpiredTiles","renderWorldCopies","scrollZoom","touchPitch","touchZoomRotate","trackResize","transformCameraUpdate","transformRequest","validateStyle","zoom"];class Map extends kl().Map{constructor(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var hl,dl;(super({container:Da,style:(0,cl.CG)(F,ll),center:[0,0],zoom:0,maxZoom:24,attributionControl:!1,dragRotate:!1,pitchWithRotate:!1,touchZoomRotate:!0,touchPitch:!1,preserveDrawingBuffer:!F.isWidthSmall(),transformRequest:F._api._getMapRequestTransform(),locale:F._t.maplibre,...(hl=ll,Object.fromEntries(Object.entries(hl).filter((F=>{let[Da]=F;return wc.includes(Da)}))))}),this._loadMarkerImages(),this._parent=F,this._options=ll,this.getContainer().classList.add("gvs-map"),void 0===ll.touchZoomRotate)&&(null===this||void 0===this||null===(dl=this.touchZoomRotate)||void 0===dl||dl.disableRotation());this._options.raster&&(this._options.background=this._options.background||"streets"),this._attribution=new(kl().AttributionControl)({compact:!1}),this.addControl(this._attribution),this._initGeocoder(),this._initMapPosition(),this._picMarker=this._getPictureMarker(),this._picMarkerPreview=this._getPictureMarker(!1),this._picThumbUrl={},this._seqPictures={},this._userLayers=new Set,this.on("mousemove","sequences",this._onSequenceHover.bind(this)),this._parent.addEventListener("select",this.reloadLayersStyles.bind(this)),setTimeout((()=>{!this.loaded()&&this._parent._loader.isVisible()&&this._parent._loader.dismiss({},this._parent._t.map.slow_loading,(()=>{}))}),15e3),this.waitForEnoughMapLoaded().then((async()=>await this._postLoad()))}async _postLoad(){this.resize(),await this.setVisibleUsers(this._parent._options.users),this.reloadLayersStyles()}destroy(){this.remove(),delete this._parent,delete this._options,delete this._attribution,delete this._picMarker,delete this._picMarkerPreview,delete this._picThumbUrl,delete this._seqPictures,delete this._userLayers}waitForEnoughMapLoaded(){return new Promise((F=>{let Da=0,ll=0,cl=0,hl=0;const onSourceDataLoading=F=>{"source"===F.dataType&&F.tile&&(F.sourceId.startsWith("geovisio")?ll++:Da++)},onSourceData=F=>{"source"===F.dataType&&F.tile&&(F.sourceId.startsWith("geovisio")?(hl++,F.isSourceLoaded&&(hl=ll)):(cl++,F.isSourceLoaded&&(cl=Da))),checkEnoughLoaded()},checkEnoughLoaded=()=>{cl/Da>=.75&&hl/ll>=.75&&(this.off("sourcedata",onSourceData),this.off("sourcedataloading",onSourceDataLoading),F())};this.on("sourcedataloading",onSourceDataLoading),this.on("sourcedata",onSourceData)}))}_initMapPosition(){this._options.center&&this._options.center!=[0,0]||this._options.zoom&&0!==this._options.zoom||this._options.hash||this._parent._api.onceReady().then((()=>{var F,Da;let ll=null===(F=this._parent)||void 0===F||null===(Da=F._api)||void 0===Da?void 0:Da.getDataBbox();if(ll)try{ll=new(kl().LngLatBounds)(ll),this.loaded()?this.fitBounds(ll,{animate:!1}):this.waitForEnoughMapLoaded().then((()=>this.fitBounds(ll,{animate:!1})))}catch(cl){console.warn("Received invalid bbox: "+ll)}}))}_initGeocoder(){var F,Da;const ll={ban:cl.Kf,nominatim:cl.RK},hl=(null===(F=this._options)||void 0===F||null===(Da=F.geocoder)||void 0===Da?void 0:Da.engine)||"nominatim";this.geocoder=ll[hl],this._geolocate=new(kl().GeolocateControl)({positionOptions:{enableHighAccuracy:!0,timeout:6e4,maximumAge:3e5},showAccuracyCircle:!0,showUserLocation:!0,trackUserLocation:!0}).onAdd(this)}_loadMarkerImages(){[{id:"gvs-marker",img:dl},{id:"gvs-arrow-flat",img:fl},{id:"gvs-arrow-360",img:Al}].forEach((F=>{const Da=new Image(64,64);Da.onload=()=>this.addImage(F.id,Da),Da.src=F.img}))}_hasQualityScore(){var F,Da,ll,cl;const hl=(null===(F=this.getStyle())||void 0===F||null===(Da=F.metadata)||void 0===Da?void 0:Da["panoramax:fields"])||{};return(null===hl||void 0===hl||null===(ll=hl.pictures)||void 0===ll?void 0:ll.includes("gps_accuracy"))&&(null===hl||void 0===hl||null===(cl=hl.pictures)||void 0===cl?void 0:cl.includes("h_pixel_density"))}_hasGridStats(){var F,Da,ll,cl,hl,dl;const pl=(null===(F=this.getStyle())||void 0===F||null===(Da=F.metadata)||void 0===Da?void 0:Da["panoramax:fields"])||{};return(null===pl||void 0===pl||null===(ll=pl.grid)||void 0===ll?void 0:ll.includes("nb_360_pictures"))&&(null===pl||void 0===pl||null===(cl=pl.grid)||void 0===cl?void 0:cl.includes("nb_flat_pictures"))&&(null===pl||void 0===pl||null===(hl=pl.grid)||void 0===hl?void 0:hl.includes("coef_360_pictures"))&&(null===pl||void 0===pl||null===(dl=pl.grid)||void 0===dl?void 0:dl.includes("coef_flat_pictures"))}reloadVectorTiles(){[...this._userLayers].forEach((F=>{const Da=this.getSource((0,cl.e8)(F));Da.setTiles(Da.tiles)}))}hasTwoBackgrounds(){return void 0!==this.getLayer(cl.m5)}getBackground(){if(!this.getLayer(cl.m5))return"streets";return"visible"==this.getLayoutProperty(cl.m5,"visibility")?"aerial":"streets"}setBackground(F){if(!this.getLayer(cl.m5)&&"aerial"===F)throw new Error("No aerial imagery available");if(this.getLayer(cl.m5)){this.setLayoutProperty(cl.m5,"visibility","aerial"===F?"visible":"none");const Da=new CustomEvent("map:background-changed",{detail:{background:F||"streets"}});this._parent.dispatchEvent(Da)}}getVisibleUsers(){return[...this._userLayers].filter((F=>"visible"===this.getLayoutProperty((0,cl.IN)(F,"pictures"),"visibility")))}async setVisibleUsers(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"===typeof F&&(F=[F]),await Promise.all(F.filter((F=>""!=F&&!this._userLayers.has(F))).map((F=>this._createPicturesTilesLayer(F))));const Da=["pictures","sequences","sequences_plus","grid","pictures_symbols"];[...this._userLayers].forEach((ll=>{Da.forEach((Da=>{const hl=(0,cl.IN)(ll,Da);this.getLayer(hl)&&this.setLayoutProperty(hl,"visibility",F.includes(ll)?"visible":"none")}))}));const ll=new CustomEvent("map:users-changed",{detail:{usersIds:F}});this._parent.dispatchEvent(ll)}filterUserLayersContent(F,Da){[...this._userLayers].forEach((ll=>{this.setFilter((0,cl.IN)(ll,F),Da),"sequences"===F&&this.getLayer((0,cl.IN)(ll,"sequences_plus"))&&this.setFilter((0,cl.IN)(ll,"sequences_plus"),Da),"pictures"===F&&this.getLayer((0,cl.IN)(ll,"pictures_symbols"))&&this.setFilter((0,cl.IN)(ll,"pictures_symbols"),Da)}))}displayPictureMarker(F,Da,ll){this._picMarkerPreview.remove(),void 0!==F&&void 0!==Da?this._picMarker.setLngLat([F,Da]).setRotation(ll).addTo(this):this._picMarker.remove(),this.reloadLayersStyles(),void 0!==F&&void 0!==Da&&this.flyTo({center:[F,Da],zoom:this.getZoom()<cl.oe+2?cl.oe+2:this.getZoom(),maxDuration:2e3})}reloadLayersStyles(){var F;const updateStyle=(F,Da)=>{[...this._userLayers].forEach((ll=>{for(let hl in Da.layout)this.setLayoutProperty((0,cl.IN)(ll,F),hl,Da.layout[hl]);for(let hl in Da.paint)this.setPaintProperty((0,cl.IN)(ll,F),hl,Da.paint[hl])}))};if(["pictures","pictures_symbols","sequences"].forEach((F=>{updateStyle(F,this._getLayerStyleProperties(F))})),this._hasGridStats()&&null!==(F=this._parent)&&void 0!==F&&F._mapFilters){var Da;let F="coef";null!==(Da=this._parent._mapFilters)&&void 0!==Da&&Da.type&&(F="flat"==this._parent._mapFilters.type?"coef_flat_pictures":"coef_360_pictures"),this.getStyle().layers.filter((F=>F.id.endsWith("_grid"))).forEach((Da=>{const ll=(0,cl.Hj)(Da,F);for(let F in ll.layout)this.setLayoutProperty(Da.id,F,ll.layout[F]);for(let F in ll.paint)this.setPaintProperty(Da.id,F,ll.paint[F])}))}}async _createPicturesTilesLayer(F){this._userLayers.add(F);const Da=this.getStyle().layers.find(cl.Sf);if("geovisio"!==F&&!this.getSource(`geovisio_${F}`)){const ll=await this._parent._api.getUserMapStyle(F);Object.entries(ll.sources).forEach((F=>{let[Da,ll]=F;return this.addSource(Da,ll)})),ll.layers=ll.layers||[];ll.layers.concat((0,cl.Oq)(ll.sources,ll.layers)).filter((F=>Object.keys(F).length>0)).forEach((F=>this.addLayer(F,null===Da||void 0===Da?void 0:Da.id)))}this._picPreviewTimer=null,this._picPopup=new(kl().Popup)({closeButton:!1,closeOnClick:!this._parent.isWidthSmall(),offset:3}),this._picPopup.on("close",(()=>{delete this._picPopup._picId}));const ll=(0,cl.IN)(F,"pictures");this.on("mousemove",ll,(F=>{this.getCanvas().style.cursor="pointer";const Da=Object.assign({},F);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Da,ll)),100)})),this.on("mouseleave",ll,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",ll,this._onPictureClick.bind(this));const hl=(0,cl.IN)(F,"sequences_plus");this.on("mousemove",hl,(F=>{if(this.getZoom()<=cl.oe+1&&(this.getCanvas().style.cursor="pointer",F.features[0].properties.id)){const Da=Object.assign({},F);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Da,hl)),100)}})),this.on("mouseleave",hl,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",hl,(F=>{F.preventDefault(),this.getZoom()<=cl.oe+1&&this._onSequenceClick(F)})),"geovisio"===F&&this.getLayer("geovisio_grid")&&(this.on("mousemove","geovisio_grid",(F=>{if(this.getZoom()<=cl.oe+1){this.getCanvas().style.cursor="pointer";const Da=Object.assign({},F);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Da,"geovisio_grid")),100)}})),this.on("mouseleave","geovisio_grid",(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click","geovisio_grid",(F=>{F.preventDefault(),this.flyTo({center:F.lngLat,zoom:cl.oe-6})}))),this.on("click",(F=>{!1===F.defaultPrevented&&(clearTimeout(this._picPreviewTimer),this._picPopup.remove())}))}_getLayerStyleProperties(F){if("pictures_symbols"===F)return{paint:{},layout:{"icon-image":["case",["==",["get","id"],this._parent._selectedPicId],"",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"symbol-sort-key":this._getLayerSortStyle(F)}};{const Da={pictures:"circle",sequences:"line"};return{paint:Object.assign({[`${Da[F]}-color`]:this._getLayerColorStyle(F)},cl.VM[F.toUpperCase()].paint),layout:Object.assign({[`${Da[F]}-sort-key`]:this._getLayerSortStyle(F)},cl.VM[F.toUpperCase()].layout)}}}_getLayerColorStyle(F){const Da=["case",["==",["get","hidden"],!0],hl.lm.HIDDEN,["==",["get","geovisio:status"],"hidden"],hl.lm.HIDDEN],ll=this._parent._selectedSeqId;return"sequences"==F&&ll?Da.push(["==",["get","id"],ll],hl.lm.SELECTED):F.startsWith("pictures")&&ll&&Da.push(["in",ll,["get","sequences"]],hl.lm.SELECTED),Da.push(hl.lm.BASE),Da}_getLayerSortStyle(F){const Da=["case",["==",["get","hidden"],!0],90],ll=this._parent._selectedSeqId;return"sequences"==F&&ll?Da.push(["==",["get","id"],ll],100):F.startsWith("pictures")&&ll&&Da.push(["in",ll,["get","sequences"]],100),Da.push(10),Da}_attachPreviewToPictures(F,Da){let ll=F.features.pop();if(!ll||ll.properties.id==this._picPopup._picId)return;let hl=null;if(Da.endsWith("pictures")?hl=ll.geometry.coordinates.slice():F.lngLat&&(hl=[F.lngLat.lng,F.lngLat.lat]),!hl){const F="LineString"===ll.geometry.type?[ll.geometry.coordinates]:ll.geometry.coordinates;let Da=null;const cl=this.getBounds(),dl=cl.getCenter();for(let ll=0;ll<F.length;ll++)for(let pl=0;pl<F[ll].length;pl++)if(cl.contains(F[ll][pl])){let cl=dl.distanceTo(new(kl().LngLat)(...F[ll][pl]));(null===Da||cl<Da)&&(hl=F[ll][pl],Da=cl)}if(!hl)return}this._picPopup.setLngLat(hl).addTo(this),this._picThumbUrl[ll.properties.id]||this._picPopup.setDOMContent((0,cl.No)(this._parent._t)),this._picPopup._loading=ll.properties.id,this._picPopup._picId=ll.properties.id;const displayThumb=F=>{if(this._picPopup._loading===ll.properties.id)if(delete this._picPopup._loading,F){let Da=document.createElement("img");Da.classList.add("gvs-map-thumb"),Da.alt=this._parent._t.map.thumbnail;let cl=new Image;if(cl.src=F,cl.addEventListener("load",(()=>{ll.properties.hidden?Da.children[0].src=cl.src:Da.src=cl.src,this._picPopup.setDOMContent(Da)})),ll.properties.hidden){const F=document.createElement("div");F.classList.add("gvs-map-thumb-legend"),F.appendChild(document.createTextNode(this._parent._t.map.not_public));const ll=document.createElement("div");ll.appendChild(Da),ll.appendChild(F),Da=ll}}else this._picPopup.remove()};Da.endsWith("pictures")?this._getPictureThumbURL(ll.properties.id).then(displayThumb):Da.endsWith("grid")?this._getThumbURL(hl).then(displayThumb):this._getSequenceThumbURL(ll.properties.id,new(kl().LngLat)(...hl)).then(displayThumb)}_getThumbURL(F){return this._parent._api.getPicturesAroundCoordinates(F[1],F[0],.1,1).then((F=>{var Da;const ll=null===F||void 0===F||null===(Da=F.features)||void 0===Da?void 0:Da.pop();return ll?this._parent._api.findThumbnailInPictureFeature(ll):null}))}_getSequenceThumbURL(F,Da){return Da?this._parent._api.getPicturesAroundCoordinates(Da.lat,Da.lng,1,1,F).then((Da=>{var ll;return(null===Da||void 0===Da||null===(ll=Da.features)||void 0===ll?void 0:ll.length)>0?this._parent._api.findThumbnailInPictureFeature(Da.features[0]):this._parent._api.getPictureThumbnailURLForSequence(F)})):this._parent._api.getPictureThumbnailURLForSequence(F)}_getPictureThumbURL(F,Da){let ll=null;return F&&(void 0!==this._picThumbUrl[F]?ll="string"===typeof this._picThumbUrl[F]?Promise.resolve(this._picThumbUrl[F]):this._picThumbUrl[F]:(this._picThumbUrl[F]=this._parent._api.getPictureThumbnailURL(F,Da).then((Da=>Da?(this._picThumbUrl[F]=Da,Da):(this._picThumbUrl[F]=null,null))).catch((()=>{this._picThumbUrl[F]=null})),ll=this._picThumbUrl[F])),ll}_getPictureMarker(){let F=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const Da=document.createElement("img");return Da.src=F?pl:dl,Da.alt="",new(kl().Marker)({element:Da})}_onSequenceHover(F){var Da;F.preventDefault(),F.features.length>0&&null!==(Da=F.features[0].properties)&&void 0!==Da&&Da.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-hover",{detail:{seqId:F.features[0].properties.id}}))}_onSequenceClick(F){var Da;F.preventDefault(),F.features.length>0&&null!==(Da=F.features[0].properties)&&void 0!==Da&&Da.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-click",{detail:{seqId:F.features[0].properties.id,coordinates:F.lngLat}}))}_onPictureClick(F){var Da,ll;F.preventDefault();const cl=(null===F||void 0===F||null===(Da=F.features)||void 0===Da?void 0:Da.length)>0?F.features[0]:null;if(null!==cl&&void 0!==cl&&null!==(ll=cl.properties)&&void 0!==ll&&ll.id){let Da=null;try{cl.properties.sequences&&(Array.isArray(cl.properties.sequences)||(cl.properties.sequences=JSON.parse(cl.properties.sequences)),Da=cl.properties.sequences.pop())}catch(F){console.log("Sequence ID is not available in vector tiles for picture "+cl.properties.id)}this._parent.dispatchEvent(new CustomEvent("map:picture-click",{detail:{picId:cl.properties.id,seqId:Da,feature:cl}}))}}}},8489:(F,Da,ll)=>{"use strict";ll.d(Da,{Ay:()=>Photo,LM:()=>Wl,Vf:()=>Ql,cS:()=>Dl});ll(8310);var cl=ll(5975),hl=ll(2305),dl=ll(5071),pl=(ll(3961),ll(1080),ll(2710),ll(1575),ll(1545)),fl=ll(3348),Al=ll(3727);const bl={baseUrl:cl,width:1280,cols:2,rows:1,tileUrl:()=>null},kl={id:dl.an,caption:"",panorama:bl,links:[],gps:[0,0],sequence:{},sphereCorrection:{},horizontalFov:360,properties:{}},Dl=30,Wl=250,Ql=3e3;pl.jM.useNewAnglesOrder=!0;class Photo extends pl.jM{constructor(F,Da){var ll,cl,hl,dl;let pl=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super({container:Da,adapter:[Al.A,{showErrorTile:!1,baseBlur:!1,resolution:F.isWidthSmall()?32:64,shouldGoFast:pl.shouldGoFast}],withCredentials:"include"==(null===(ll=F._options)||void 0===ll||null===(cl=ll.fetchOptions)||void 0===cl?void 0:cl.credentials),requestHeaders:null===(hl=F._options)||void 0===hl||null===(dl=hl.fetchOptions)||void 0===dl?void 0:dl.headers,panorama:bl,lang:F._t.psv,minFov:5,loadingTxt:"&nbsp;",navbar:null,rendererParameters:{preserveDrawingBuffer:!F.isWidthSmall()},plugins:[[fl.$,{dataMode:"server",positionMode:"gps",renderMode:"3d",preload:!0,getNode:()=>{},transitionOptions:()=>{},arrowsPosition:{linkOverlapAngle:Math.PI/6}}]],...pl}),this._parent=F,Da.classList.add("gvs-psv"),this._shouldGoFast=(null===pl||void 0===pl?void 0:pl.shouldGoFast)||(()=>!1),this._transitionDuration=(null===pl||void 0===pl?void 0:pl.transitionDuration)||Wl,this._myVTour=this.getPlugin(fl.$),this._myVTour.datasource.nodeResolver=this._getNodeFromAPI.bind(this),this._myVTour.config.transitionOptions=this._psvNodeTransition.bind(this),this._clearArrows=this._myVTour.arrowsRenderer.clear.bind(this._myVTour.arrowsRenderer),this._myVTour.arrowsRenderer.clear=()=>{},this._picturesSequences={},this._myVTour.addEventListener("enter-arrow",this._onEnterArrow.bind(this)),this._myVTour.addEventListener("leave-arrow",this._onLeaveArrow.bind(this)),this._myVTour.addEventListener("node-changed",this._onNodeChanged.bind(this)),this.addEventListener("position-updated",this._onPositionUpdated.bind(this)),this.addEventListener("zoom-updated",this._onZoomUpdated.bind(this)),this._parent.addEventListener("select",this._onSelect.bind(this)),this.loader.size=150,this.loader.color="rgba(61, 61, 61, 0.5)",this.loader.textColor="rgba(255, 255, 255, 0.7)",this.loader.border=5,this.loader.thickness=10,this.loader.canvas.setAttribute("viewBox","0 0 150 150"),this.loader.__updateContent()}async _getNodeFromAPI(F){var Da,ll,cl;if(!F||F===dl.an)return kl;const hl=await fetch(this._parent._api.getPictureMetadataUrl(F,this._picturesSequences[F]),this._parent._api._getFetchOptions());let pl=await hl.json();if(pl.features&&(pl=pl.features.pop()),!pl||0===Object.keys(pl).length||!hl.ok)throw this._parent._loader&&this._parent._loader.dismiss(!0,this._parent._t.gvs.error_pic),new Error("Picture with ID "+F+" was not found");this._picturesSequences[F]=pl.collection;const fl=(0,dl.rs)(pl,this._parent._t,this._parent._isInternetFast,null===(Da=this._parent._picturesNavFilter)||void 0===Da?void 0:Da.bind(this._parent));var Al,bl;null!==fl&&void 0!==fl&&null!==(ll=fl.sequence)&&void 0!==ll&&ll.prevPic&&(this._picturesSequences[null===fl||void 0===fl||null===(Al=fl.sequence)||void 0===Al?void 0:Al.prevPic]=pl.collection);null!==fl&&void 0!==fl&&null!==(cl=fl.sequence)&&void 0!==cl&&cl.nextPic&&(this._picturesSequences[null===fl||void 0===fl||null===(bl=fl.sequence)||void 0===bl?void 0:bl.nextPic]=pl.collection);return fl}_psvNodeTransition(F,Da,ll){var cl,hl;let pl={};const fl=this._shouldGoFast()?0:Math.min(Wl,this._transitionDuration),Al=fl>100,bl=null!=(ll||(null===Da||void 0===Da?void 0:Da.links.find((Da=>Da.nodeId==F.id)))),kl=Da&&F.sequence.id===Da.sequence.id,Ql=((null===Da||void 0===Da||null===(cl=Da.properties)||void 0===cl?void 0:cl["view:azimuth"])||0)*(Math.PI/180),wc=((null===F||void 0===F||null===(hl=F.properties)||void 0===hl?void 0:hl["view:azimuth"])||0)*(Math.PI/180);this.setOption("maxFov",Math.min(3*F.horizontalFov/4,90));const Sc={speed:0,fadeIn:!1,rotation:!1,rotateTo:{pitch:0,yaw:0},zoomTo:Dl};if(360==F.horizontalFov)pl=Da?(0,dl.Yf)(Da.gps,F.gps)>=.001?Sc:{speed:fl,fadeIn:bl&&Al,rotation:bl&&kl&&Al,rotateTo:this.getPosition()}:Sc;else if(kl){const F=this.getPosition().yaw,ll=Da.horizontalFov*(Math.PI/180)/2,cl=F<=ll||F>=2*Math.PI-ll,hl=Math.abs(Ql-wc)<=Math.PI/4;pl={speed:fl,fadeIn:bl&&hl&&Al,rotation:bl&&hl&&Al,rotateTo:cl?this.getPosition():{pitch:0,yaw:0},zoomTo:cl?this.getZoomLevel():Dl}}else pl=Sc;pl.fadeIn&&pl.speed>=150?setTimeout(this._clearArrows,pl.speed-100):this._clearArrows();const eu=new CustomEvent("psv:picture-loading",{detail:{...Object.assign({},this.getXYZ(),pl.rotateTo?{x:180*(wc+pl.rotateTo.yaw)/Math.PI}:null,pl.zoomTo?{z:pl.zoomTo}:null),picId:F.id,lon:F.gps[0],lat:F.gps[1]}});return this._parent.dispatchEvent(eu),pl}_onEnterArrow(F){const Da=F.link,ll=F.node;let cl;ll&&(cl=360===ll.horizontalFov?(this.getPictureOriginalHeading()+180*this.getPosition().yaw/Math.PI)%360:this.getPictureOriginalHeading());const hl=new CustomEvent("psv:picture-preview-started",{detail:{picId:Da.nodeId,coordinates:Da.gps,direction:cl}});this._parent.dispatchEvent(hl)}_onLeaveArrow(F){const Da=F.link,ll=new CustomEvent("psv:picture-preview-stopped",{detail:{picId:Da.nodeId}});this._parent.dispatchEvent(ll)}_onPositionUpdated(F){let{position:Da}=F;const ll=(0,dl.oi)(Da,this.getZoomLevel());ll.x+=this.getPictureOriginalHeading(),ll.x=ll.x%360;const cl=new CustomEvent("psv:view-rotated",{detail:ll});this._parent.dispatchEvent(cl),this._onTilesStartLoading()}_onZoomUpdated(F){let{zoomLevel:Da}=F;const ll=new CustomEvent("psv:view-rotated",{detail:{...this.getXY(),z:Da}});this._parent.dispatchEvent(ll),this._onTilesStartLoading()}_onNodeChanged(F){for(let cl of document.getElementsByClassName("gvs-psv-tour-arrows"))cl.classList.remove("gvs-clicked");if(F.node.id){var Da,ll;this._parent.select(null===(Da=F.node)||void 0===Da||null===(ll=Da.sequence)||void 0===ll?void 0:ll.id,F.node.id);const cl=this.getPictureMetadata();if(!cl)return void this._parent.dispatchEvent(new CustomEvent("psv:picture-loaded",{detail:{}}));this._prevSequence=cl.sequence.id;const hl=new CustomEvent("psv:picture-loaded",{detail:{...this.getXYZ(),picId:F.node.id,lon:cl.gps[0],lat:cl.gps[1]}});this._parent.dispatchEvent(hl),cl.panorama.hdUrl?(this.setOption("downloadUrl",cl.panorama.hdUrl),this.setOption("downloadName",F.node.id+".jpg")):this.setOption("downloadUrl",null)}this._onTilesStartLoading()}_onTilesStartLoading(){this._tilesQueueTimer&&(clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer),this._tilesQueueTimer=setInterval((()=>{if(0===Object.keys(this.adapter.queue.tasks).length){if(this._myVTour.state.currentNode){const F=new Event("psv:picture-tiles-loaded",{picId:this._myVTour.state.currentNode.id});this._parent.dispatchEvent(F)}clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer}}),100)}getPictureMetadata(){var F,Da,ll;return(null===(F=this._myVTour)||void 0===F||null===(Da=F.state)||void 0===Da||null===(ll=Da.currentNode)||void 0===ll?void 0:ll.id)===dl.an?null:this._myVTour.state.currentNode?Object.assign({},this._myVTour.state.currentNode):null}_onSelect(F){var Da;F.detail.seqId&&(this._picturesSequences[F.detail.picId]=F.detail.seqId),(null===(Da=this._myVTour.getCurrentNode())||void 0===Da?void 0:Da.id)!==F.detail.picId&&(this.loader.show(),this._myVTour.setCurrentNode(F.detail.picId).catch((F=>{this.showErrorOverlay(F,this._parent._t.gvs.error_pic,!0)})))}goToNextPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const F=this.getPictureMetadata().sequence.nextPic;if(!F)throw new Error("No next picture available");this._parent.select(this.getPictureMetadata().sequence.id,F)}goToPrevPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const F=this.getPictureMetadata().sequence.prevPic;if(!F)throw new Error("No previous picture available");this._parent.select(this.getPictureMetadata().sequence.id,F)}async goToPosition(F,Da){return this._parent._api.getPicturesAroundCoordinates(F,Da).then((F=>{if(F.features.length>0){const Da=F.features.pop();return this._parent.select(null===Da||void 0===Da?void 0:Da.collection,Da.id),Da.id}return Promise.reject(new Error("No picture found nearby given coordinates"))}))}getXY(){const F=(0,dl.oi)(this.getPosition());return F.x=(F.x+this.getPictureOriginalHeading())%360,F}getXYZ(){const F=this.getXY();return F.z=this.getZoomLevel(),F}getPictureOriginalHeading(){var F,Da;return(null===(F=this.getPictureMetadata())||void 0===F||null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"])||0}getPictureRelativeHeading(){return(0,dl.dj)(this.getPictureMetadata())}clearPictureMetadataCache(){var F,Da,ll,cl;const hl=null===(F=this.getPictureMetadata())||void 0===F?void 0:F.id,dl=null===(Da=this.getPictureMetadata())||void 0===Da||null===(ll=Da.sequence)||void 0===ll?void 0:ll.id;null===(cl=this._myVTour.state.currentTooltip)||void 0===cl||cl.hide(),this._myVTour.state.currentTooltip=null,this._myVTour.state.currentNode=null,this._myVTour.state.preload={},this._myVTour.datasource.nodes={},hl&&this._parent.select(dl,hl)}setXYZ(F,Da,ll){const cl=(0,dl.y7)(F-this.getPictureOriginalHeading(),Da,ll);this.rotate({yaw:cl.yaw,pitch:cl.pitch}),this.zoom(cl.zoom)}setHigherContrast(F){this.renderer.renderer.toneMapping=F?3:0,this.renderer.renderer.toneMappingExposure=F?2:1,this.needsUpdate()}getTransitionDuration(){return this._transitionDuration}setTransitionDuration(F){if((F=parseFloat(F))<100||F>Ql)throw new Error("Invalid transition duration (should be between 100 and "+Ql+")");this._transitionDuration=F;const Da=new CustomEvent("psv:transition-duration-changed",{detail:{value:F}});this._parent.dispatchEvent(Da)}setPanorama(F,Da){const onFailure=F=>this.showErrorOverlay(F,this._parent._t.gvs.error_pic,!0);try{return super.setPanorama(F,Da).catch(onFailure)}catch(ll){onFailure(ll)}}showErrorOverlay(F,Da,ll){this._parent._loader.isVisible()||!this.overlay.isVisible()?this._parent._loader.dismiss(F,Da,ll?()=>{this._parent._loader.dismiss(),this.overlay.hide()}:void 0):(console.error(F),this.overlay.show({image:`<img style="width: 200px" src="${hl}" alt="" />`,title:this._parent._t.gvs.error,text:Da+"<br />"+this._parent._t.gvs.error_click,dissmisable:ll}))}}},5254:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>API});var cl=ll(1300),hl=ll(5071);class API{constructor(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===F||void 0===F||"string"!==typeof F)throw new Error("endpoint parameter is empty or not a valid string");if(F.startsWith("/")&&(F=window.location.href.split("/").slice(0,3).join("/")+F),!API.isValidHttpUrl(F))throw new Error(`endpoint parameter is not a valid URL: ${F}`);this._endpoint=F,this._isReady=0,this._dataBbox=null,this._fetchOpts=(null===Da||void 0===Da?void 0:Da.fetch)||{},this._metadata={},Da.skipReadLanding||(this._readLanding=fetch(F,this._getFetchOptions()).then((F=>F.json())).then((F=>this._parseLanding(F,Da))).catch((F=>(this._isReady=-1,console.error(F),Promise.reject("Viewer failed to communicate with API")))).then((()=>this._loadMapStyles(Da.style,Da.users))).then((()=>(this._isReady=1,"API is ready"))))}onceReady(){return-1==this._isReady?Promise.reject("Viewer failed to communicate with API"):1==this._isReady?Promise.resolve("API is ready"):this._readLanding}isReady(){return 1==this._isReady}getAvailableFeatures(){return Object.entries(this._endpoints).filter((F=>null!==F[1])).map((F=>F[0]))}getUnavailableFeatures(){return Object.entries(this._endpoints).filter((F=>null===F[1])).map((F=>F[0]))}_parseLanding(F,Da){var ll,cl;if(this._endpoints={collections:null,search:null,style:null,user_style:null,tiles:(null===Da||void 0===Da?void 0:Da.tiles)||null,user_tiles:null,user_search:null,collection_preview:null,item_preview:null,rss:null,report:null},!F||!F.links||!Array.isArray(F.links))throw new Error("API Landing page doesn't contain 'links' list");if(!F.stac_version.startsWith("1."))throw new Error(`API is not in a supported STAC version (Panoramax viewer supports only 1.x, API is ${F.stac_version})`);this._metadata.name=F.title||"Unnamed",this._metadata.stac_version=F.stac_version,this._metadata.geovisio_version=F.geovisio_version;const hl=[],dl=[];if([{rel:"search",type:"application/geo+json",endpointId:"search",mandatory:!0,missingIssue:"No direct access to pictures metadata."},{rel:"data",type:"application/json",endpointId:"collections",mandatory:!0,missingIssue:"No way for viewer to access sequences."},{rel:"data",type:"application/rss+xml",endpointId:"rss"},{rel:"xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"tiles"},{rel:"xyz-style",type:"application/json",endpointId:"style"},{rel:"user-xyz-style",type:"application/json",endpointId:"user_style"},{rel:"user-xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"user_tiles"},{rel:"user-search",type:"application/json",endpointId:"user_search",missingIssue:"Filter map data by user name will not be available."},{rel:"collection-preview",type:"image/jpeg",endpointId:"collection_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"item-preview",type:"image/jpeg",endpointId:"item_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"report",type:"application/json",endpointId:"report"}].forEach((Da=>{const ll=F.links.find((F=>F.rel==Da.rel&&F.type==Da.type));if(ll){if(!API.isValidHttpUrl(ll.href))throw new Error(`API endpoint '${ll.rel}' (${ll.type}) is not a valid URL: ${ll.href}`);this._endpoints[Da.endpointId]||(this._endpoints[Da.endpointId]=ll.href)}else if(!this._endpoints[Da.endpointId]){let F=`API doesn't offer a '${Da.rel}' (${Da.type}) endpoint in its links`;Da.missingIssue&&(F+=`\n${Da.missingIssue}`),Da.mandatory?hl.push(F):Da.missingIssue&&dl.push(F)}})),this._endpoints.style||this._endpoints.tiles||dl.push("API doesn't offer 'xyz' or 'xyz-style' endpoints in its links.\nMap widget will not be available."),this._endpoints.user_style||this._endpoints.user_tiles||dl.push("API doesn't offer 'user-xyz' or 'user-xyz-style' endpoints in its links.\nFilter map data by user ID will not be available."),dl.forEach((F=>console.warn(F))),hl.length>0)throw new Error(hl.join("\n"));const pl=null===F||void 0===F||null===(ll=F.extent)||void 0===ll||null===(cl=ll.spatial)||void 0===cl?void 0:cl.bbox;this._dataBbox=pl&&Array.isArray(pl)&&pl.length>0&&Array.isArray(pl[0])&&4===pl[0].length?[[pl[0][0],pl[0][1]],[pl[0][2],pl[0][3]]]:null}_loadMapStyles(F,Da){const ll=new Set(Da||[]);this.mapStyle={version:8,sources:{},layers:[],metadata:{}};const cl=[this.getMapStyle()];if("string"===typeof F){const Da=F.startsWith(this._endpoint)?this._getFetchOptions():void 0;cl.push(fetch(F,Da).then((F=>F.json())))}else"object"===typeof F&&cl.push(Promise.resolve(F));return[...ll].filter((F=>"geovisio"!==F)).forEach((F=>{cl.push(this.getUserMapStyle(F,!0))})),Promise.all(cl).then((F=>{const Da=["bearing","center","glyphs","light","name","pitch","sky","sprite","terrain","transition","zoom"];F.forEach((F=>{Da.forEach((Da=>{F[Da]&&(this.mapStyle[Da]=F[Da]||this.mapStyle[Da])})),Object.assign(this.mapStyle.sources,(null===F||void 0===F?void 0:F.sources)||{}),Object.assign(this.mapStyle.metadata,(null===F||void 0===F?void 0:F.metadata)||{}),this.mapStyle.layers=this.mapStyle.layers.concat((null===F||void 0===F?void 0:F.layers)||[])}))})).catch((F=>console.error(F)))}_getFetchOptions(){return Object.assign({signal:AbortSignal.timeout(15e3)},this._fetchOpts)}_getMapRequestTransform(){const F=this._getFetchOptions();if(delete F.signal,Object.keys(F).length>0)return Da=>{if(Da.startsWith(this._endpoint))return{url:Da,...F}}}async getSequenceItems(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!this.isReady())throw new Error("API is not ready to use");try{return API.isIdValid(F),fetch(Da||`${this._endpoints.collections}/${F}/items`,this._getFetchOptions()).then((F=>F.json())).then((Da=>{let cl=Da;ll&&(cl.features=ll.features.concat(cl.features));const hl=Da.links.find((F=>"next"===F.rel));return hl?this.getSequenceItems(F,hl.href,cl):cl}))}catch(cl){return Promise.reject(cl)}}getPicturesAroundCoordinatesUrl(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e-4,cl=arguments.length>3?arguments[3]:void 0,hl=arguments.length>4?arguments[4]:void 0;if(!this.isReady())throw new Error("API is not ready to use");if(isNaN(parseFloat(F))||isNaN(parseFloat(Da)))throw new Error("lat and lon parameters should be valid numbers");const dl=[Da-ll,F-ll,Da+ll,F+ll].map((F=>F.toFixed(4))).join(","),pl=cl?`&limit=${cl}`:"",fl=hl?`&collections=${hl}`:"";return`${this._endpoints.search}?bbox=${dl}${pl}${fl}`}getPicturesAroundCoordinates(F,Da,ll,cl,hl){return fetch(this.getPicturesAroundCoordinatesUrl(F,Da,ll,cl,hl),this._getFetchOptions()).then((F=>F.json()))}getPictureMetadataUrl(F,Da){if(!this.isReady())throw new Error("API is not ready to use");if(API.isIdValid(F))return Da?`${this._endpoints.collections}/${Da}/items/${F}`:`${this._endpoints.search}?ids=${F}`}getMapStyle(){if(this.isReady())return this.mapStyle;let F;return F=this._endpoints.style?this._endpoints.style:this._endpoints.tiles?{version:8,sources:{geovisio:{type:"vector",tiles:[this._endpoints.tiles],minzoom:0,maxzoom:cl.oe}}}:fetch(`${this._endpoint}/map/14/0/0.mvt`,this._getFetchOptions()).then((()=>(this._endpoints.tiles=`${this._endpoint}/map/{z}/{x}/{y}.mvt`,console.log("Using fallback endpoint for vector tiles"),this.getMapStyle()))).catch((F=>(console.error(F),Promise.reject(new Error("API doesn't offer a vector tiles endpoint"))))),"string"===typeof F?fetch(F,this._getFetchOptions()).then((F=>F.json())):Promise.resolve(F)}getUserMapStyle(F){let Da;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.isReady()?F?(this._endpoints.user_style?Da=this._endpoints.user_style.replace(/\{userId\}/g,F):this._endpoints.user_tiles&&(Da={version:8,sources:{[`geovisio_${F}`]:{type:"vector",tiles:[this._endpoints.user_tiles.replace(/\{userId\}/g,F)],minzoom:0,maxzoom:cl.oe}}}),Da?"string"===typeof Da?fetch(Da,this._getFetchOptions()).then((F=>F.json())):Promise.resolve(Da):Promise.reject(new Error("API doesn't offer map style for specific user"))):Promise.reject(new Error("Parameter userId is empty")):Promise.reject(new Error("API is not ready to use"))}findThumbnailInPictureFeature(F){if(!this.isReady())throw new Error("API is not ready to use");if(!F||!F.assets)return null;let Da=null;for(let ll of Object.values(F.assets)){if(ll.roles.includes("thumbnail")&&"image/jpeg"==ll.type&&API.isValidHttpUrl(ll.href))return ll.href;ll.roles.includes("visual")&&"image/jpeg"==ll.type&&API.isValidHttpUrl(ll.href)&&(Da=ll.href)}return Da}getPictureThumbnailURLForSequence(F,Da){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.collection_preview)return Promise.resolve(this._endpoints.collection_preview.replace("{id}",F));if(Da&&Array.isArray(Da.links)&&Da.links.length>0){let F=Da.links.find((F=>"preview"===F.rel&&"image/jpeg"===F.type));if(F&&API.isValidHttpUrl(F.href))return Promise.resolve(F.href)}const ll=`${this._endpoints.search}?limit=1&collections=${F}`;return fetch(ll,this._getFetchOptions()).then((F=>F.json())).then((F=>Array.isArray(F.features)&&0!=F.features.length?this.findThumbnailInPictureFeature(F.features.pop()):null))}getPictureThumbnailURL(F,Da){if(!this.isReady())throw new Error("API is not ready to use");return F?this._endpoints.item_preview?Promise.resolve(this._endpoints.item_preview.replace("{id}",F)):F&&Da?fetch(`${this._endpoints.collections}/${Da}/items/${F}`,this._getFetchOptions()).then((F=>F.json())).then((F=>F?this.findThumbnailInPictureFeature(F):null)):fetch(`${this._endpoints.search}?ids=${F}`,this._getFetchOptions()).then((F=>F.json())).then((F=>F&&Array.isArray(F.features)&&0!=F.features.length?this.findThumbnailInPictureFeature(F.features.pop()):null)):Promise.resolve(null)}getRSSURL(F){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.rss){let Da=this._endpoints.rss;return F&&(Da+=Da.includes("?")?"&":"?",Da+="bbox="+[F.getWest(),F.getSouth(),F.getEast(),F.getNorth()].join(",")),Da}return null}getSequenceMetadataUrl(F){if(!this.isReady())throw new Error("API is not ready to use");return`${this._endpoints.collections}/${F}`}getDataBbox(){if(!this.isReady())throw new Error("API is not ready to use");return this._dataBbox}searchUsers(F){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch(`${this._endpoints.user_search}?q=${F}`,this._getFetchOptions()).then((F=>F.json())).then((F=>(null===F||void 0===F?void 0:F.features)||null))}getUserName(F){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch(this._endpoints.user_search.replace(/\/search$/,`/${F}`),this._getFetchOptions()).then((F=>F.json())).then((F=>(null===F||void 0===F?void 0:F.name)||null))}sendReport(F){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.report)throw new Error("Report sending is not available");const Da={...this._getFetchOptions(),method:"POST",body:JSON.stringify(F),headers:{"Content-Type":"application/json"}};return fetch(this._endpoints.report,Da).then((async F=>{if(F.status>=400){let ll=await F.text();try{ll=JSON.parse(ll).message}catch(Da){}return Promise.reject(ll)}return F.json()}))}static isValidHttpUrl(F){let Da;try{Da=new URL(F)}catch(ll){return!1}return"http:"===Da.protocol||"https:"===Da.protocol}static isIdValid(F){if(!F||"string"!==typeof F||0===F.length||F===hl.an)throw new Error("id should be a valid picture unique identifier");return!0}}},654:(F,Da,ll)=>{"use strict";function getExifFloat(F){if(!([null,void 0,""].includes(F)||"string"===typeof F&&""===F.trim())){if("number"===typeof F)return F;if("string"!==typeof F);else{if(/^-?\d+(\.\d+)?\/-?\d+(\.\d+)?$/.test(F)){const Da=F.split("/").map((F=>parseFloat(F)));return Da[0]/Da[1]}try{return parseFloat(F)}catch(Da){}}}}function getGPSPrecision(F){var Da,ll,cl,hl,dl;let pl="\u2753";const fl=(null===F||void 0===F||null===(Da=F.properties)||void 0===Da?void 0:Da["quality:horizontal_accuracy"])||getExifFloat(null===F||void 0===F||null===(ll=F.properties)||void 0===ll||null===(cl=ll.exif)||void 0===cl?void 0:cl["Exif.GPSInfo.GPSHPositioningError"]),Al=getExifFloat(null===F||void 0===F||null===(hl=F.properties)||void 0===hl||null===(dl=hl.exif)||void 0===dl?void 0:dl["Exif.GPSInfo.GPSDOP"]);return void 0!==fl?pl=`${fl} m`:void 0!==Al&&(pl=Al<1?"ideal":Al<2?"excellent":Al<5?"good":Al<10?"moderate":Al<20?"fair":"poor"),pl}function getSphereCorrection(F){var Da,ll,cl,hl;let dl=null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"];if(void 0===dl){var pl,fl;const Da=getExifFloat(null===(pl=F.properties)||void 0===pl||null===(fl=pl.exif)||void 0===fl?void 0:fl["Exif.GPSInfo.GPSImgDirection"]);void 0!==Da&&(dl=Da)}dl=dl||0;let Al=null===(ll=F.properties)||void 0===ll?void 0:ll["pers:yaw"],bl=["Xmp.GPano.PoseHeadingDegrees","Xmp.Camera.Yaw","Exif.MpfInfo.MPFYawAngle"];if(void 0===Al)for(let su of bl){var kl,Dl;const Da=getExifFloat(null===(kl=F.properties)||void 0===kl||null===(Dl=kl.exif)||void 0===Dl?void 0:Dl[su]);if(void 0!==Da){Al=Da;break}}Al=Al||0,Math.round(dl)===Math.round(Al)&&Al>0&&console.warn("Picture with UUID",F.id,"has same GPS Image direction and Yaw, could cause rendering issues");let Wl=null===(cl=F.properties)||void 0===cl?void 0:cl["pers:pitch"];if(bl=["Xmp.GPano.PosePitchDegrees","Xmp.Camera.Pitch","Exif.MpfInfo.MPFPitchAngle"],void 0===Wl)for(let su of bl){var Ql,wc;const Da=getExifFloat(null===(Ql=F.properties)||void 0===Ql||null===(wc=Ql.exif)||void 0===wc?void 0:wc[su]);if(void 0!==Da){Wl=Da;break}}Wl=Wl||0;let Sc=null===(hl=F.properties)||void 0===hl?void 0:hl["pers:roll"];if(bl=["Xmp.GPano.PoseRollDegrees","Xmp.Camera.Roll","Exif.MpfInfo.MPFRollAngle"],void 0===Sc)for(let su of bl){var eu,iu;const Da=getExifFloat(null===(eu=F.properties)||void 0===eu||null===(iu=eu.exif)||void 0===iu?void 0:iu[su]);if(void 0!==Da){Sc=Da;break}}return Sc=Sc||0,0!==Wl&&0!==Sc?{pan:Al*Math.PI/180,tilt:Wl*Math.PI/180,roll:Sc*Math.PI/180}:{}}function getCroppedPanoData(F){var Da,ll;let cl;var hl,dl;if(null!==(Da=F.properties)&&void 0!==Da&&Da["pers:interior_orientation"]&&(null!==(hl=F.properties["pers:interior_orientation"])&&void 0!==hl&&hl.visible_area&&null!==(dl=F.properties["pers:interior_orientation"])&&void 0!==dl&&dl.sensor_array_dimensions)){const Da=F.properties["pers:interior_orientation"].visible_area,ll=F.properties["pers:interior_orientation"].sensor_array_dimensions;try{cl={fullWidth:parseInt(ll[0]),fullHeight:parseInt(ll[1]),croppedX:parseInt(Da[0]),croppedY:parseInt(Da[1]),croppedWidth:parseInt(ll[0])-parseInt(Da[2])-parseInt(Da[0]),croppedHeight:parseInt(ll[1])-parseInt(Da[3])-parseInt(Da[1])}}catch(Wl){console.warn("Invalid pers:interior_orientation values for cropped panorama "+F.id)}}if(!cl&&null!==(ll=F.properties)&&void 0!==ll&&ll.exif)try{var pl,fl,Al,bl,kl,Dl;cl={fullWidth:parseInt(null===(pl=F.properties.exif)||void 0===pl?void 0:pl["Xmp.GPano.FullPanoWidthPixels"]),fullHeight:parseInt(null===(fl=F.properties.exif)||void 0===fl?void 0:fl["Xmp.GPano.FullPanoHeightPixels"]),croppedX:parseInt(null===(Al=F.properties.exif)||void 0===Al?void 0:Al["Xmp.GPano.CroppedAreaLeftPixels"]),croppedY:parseInt(null===(bl=F.properties.exif)||void 0===bl?void 0:bl["Xmp.GPano.CroppedAreaTopPixels"]),croppedWidth:parseInt(null===(kl=F.properties.exif)||void 0===kl?void 0:kl["Xmp.GPano.CroppedAreaImageWidthPixels"]),croppedHeight:parseInt(null===(Dl=F.properties.exif)||void 0===Dl?void 0:Dl["Xmp.GPano.CroppedAreaImageHeightPixels"])}}catch(Wl){console.warn("Invalid XMP.GPano values for cropped panorama "+F.id)}return cl&&(cl=Object.fromEntries(Object.entries(cl||{}).filter((F=>!isNaN(F[1])))),cl.fullWidth==cl.croppedWidth&&cl.fullHeight==cl.croppedHeight&&(cl={})),cl||{}}ll.d(Da,{MY:()=>getSphereCorrection,Pu:()=>getGPSPrecision,qx:()=>getCroppedPanoData})},6980:(F,Da,ll)=>{"use strict";ll.d(Da,{$:()=>getTranslations,D:()=>autoDetectLocale});var cl=ll(4149),hl=ll(369),dl=ll(389),pl=ll(9946),fl=ll(8302),Al=ll(5222),bl=ll(6909),kl=ll(4895),Dl=ll(9026),Wl=ll(6984);const Ql="en",wc={da:cl,de:hl,eo:pl,en:dl,es:fl,fr:Al,hu:bl,it:kl,pl:Dl,zh_Hant:Wl};function autoDetectLocale(F,Da){for(const ll of window.navigator.languages){let Da=ll;switch(Da){case"zh-TW":case"zh-HK":case"zh-MO":Da="zh_Hant";break;case"zh-CN":case"zh-SG":Da="zh_Hans";break;default:Da.length>2&&(Da=ll.substring(0,2))}const cl=F.find((F=>F===Da));if(cl)return cl}return Da}function getTranslations(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const Da=JSON.parse(JSON.stringify(dl));let ll;if(F||(F=autoDetectLocale(Object.keys(wc),Ql)),wc[F]&&"en"!==F&&(ll=wc[F]),F.length>2){const Da=F.substring(0,2);wc[Da]&&(ll=wc[Da])}return ll&&Object.entries(ll).forEach((F=>{let[ll,cl]=F;Object.entries(cl).forEach((F=>{let[cl,hl]=F;Array.isArray(hl)&&(hl=hl.filter((F=>null!=F))),Da[ll][cl]=hl}))})),Da}},1300:(F,Da,ll)=>{"use strict";ll.d(Da,{AV:()=>Al,CG:()=>combineStyles,Hj:()=>switchCoefValue,IN:()=>getUserLayerId,Kf:()=>forwardGeocodingBAN,No:()=>getThumbGif,Oq:()=>getMissingLayerStyles,RK:()=>forwardGeocodingNominatim,Sf:()=>isLabelLayer,VM:()=>Dl,d3:()=>wc,e8:()=>getUserSourceId,m5:()=>bl,oe:()=>kl});var cl=ll(927),hl=ll.n(cl),dl=ll(6883),pl=ll(5071),fl=ll(6980);const Al="https://panoramax.openstreetmap.fr/pmtiles/basic.json",bl="gvs-aerial",kl=15,Dl={PICTURES:{paint:{"circle-radius":["interpolate",["linear"],["zoom"],kl,4.5,18,6,24,12],"circle-opacity":["interpolate",["linear"],["zoom"],kl,0,kl+1,1],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],kl+1,0,kl+2,1,18,1.5,24,3]},layout:{}},PICTURES_SYMBOLS:{paint:{"icon-opacity":["interpolate",["linear"],["zoom"],18,0,19,1]},layout:{"icon-image":["case",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"icon-size":["interpolate",["linear"],["zoom"],18,.5,24,1],"icon-rotate":["to-number",["get","heading"]],"icon-allow-overlap":!0}},SEQUENCES:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,.5,10,2,14,4,16,5,22,3]},layout:{"line-cap":"square"}},SEQUENCES_PLUS:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,15,kl+1,30,kl+2,0],"line-opacity":0,"line-color":"#ff0000"},layout:{"line-cap":"square"}}},Wl=["case",["==",["get","type"],"equirectangular"],["case",["has","h_pixel_density"],["step",["get","h_pixel_density"],...pl.Av],1],["case",["has","h_pixel_density"],["step",["get","h_pixel_density"],...pl.U3],1]],Ql=["case",["has","gps_accuracy"],["step",["get","gps_accuracy"],...pl.ql],1],wc=["round",["+",["*",Wl,pl.Xu],["*",Ql,pl.Bg]]];function getThumbGif(F){const Da=document.createElement("img");return Da.src=dl,Da.alt=F.loading,Da.title=F.loading,Da.classList.add("gvs-map-thumb","gvs-map-thumb-loader"),Da}function isLabelLayer(F){var Da;return"symbol"===F.type&&(null===F||void 0===F||null===(Da=F.layout)||void 0===Da?void 0:Da["text-field"])&&(void 0===F.minzoom||F.minzoom<15)}function combineStyles(F,Da){var ll,cl,hl;const dl=F._api.getMapStyle();if(dl.layers=dl.layers.concat(getMissingLayerStyles(dl.sources,dl.layers)),dl.metadata||(dl.metadata={}),Da.supplementaryStyle&&(Object.assign(dl.sources,Da.supplementaryStyle.sources||{}),Object.assign(dl.metadata,Da.supplementaryStyle.metadata||{}),dl.layers=dl.layers.concat(Da.supplementaryStyle.layers||[])),Da.raster&&(dl.sources["gvs-aerial"]=Da.raster,dl.layers.push({id:bl,type:"raster",source:"gvs-aerial",layout:{visibility:"aerial"===Da.background?"visible":"none"}})),null!==(ll=F._options)&&void 0!==ll&&null!==(cl=ll.users)&&void 0!==cl&&cl.includes("geovisio")||dl.layers.forEach((F=>{"geovisio"===F.source&&(F.layout||(F.layout={}),F.layout.visibility="none")})),dl.layers.sort(((F,Da)=>isLabelLayer(F)&&!isLabelLayer(Da)?1:!isLabelLayer(F)&&isLabelLayer(Da)?-1:F.id.startsWith("geovisio")&&!Da.id.startsWith("geovisio")?1:!F.id.startsWith("geovisio")&&Da.id.startsWith("geovisio")?-1:F.id.endsWith("_pictures")&&!Da.id.endsWith("_pictures")?1:!F.id.endsWith("_pictures")&&Da.id.endsWith("_pictures")?-1:0)),null!==(hl=dl.metadata)&&void 0!==hl&&hl["panoramax:locales"]||(dl.metadata["panoramax:locales"]=["fr","en","de","es","ru","pt","zh","hi","latin"]),dl.metadata["panoramax:locales"]){let Da=F._options.lang||(0,fl.D)(dl.metadata["panoramax:locales"],"latin");Da.includes("-")&&(Da=Da.split("-")[0]),Da.includes("_")&&(Da=Da.split("_")[0]),dl.layers.forEach((F=>{isLabelLayer(F)&&F.layout["text-field"].includes("name:latin")&&(F.layout["text-field"]=["coalesce",["get",`name:${Da}`],["get","name:latin"],["get","name"]])}))}const pl=dl.layers.find((F=>"place_label_city"==F.id));let Al=dl.layers.find((F=>"place_label_capital"==F.id));return pl&&!Al&&(pl.paint={"text-color":"hsl(0, 0%, 0%)","text-halo-blur":0,"text-halo-color":"hsla(0, 0%, 100%, 1)","text-halo-width":3},pl.layout["text-letter-spacing"]=.1,Al=JSON.parse(JSON.stringify(pl)),Al.id="place_label_capital",Al.filter.push(["<=","capital",2]),pl.filter.push([">","capital",2]),dl.layers.push(Al)),dl}function getMissingLayerStyles(F,Da){const ll=[];return Object.keys(F).filter((F=>void 0===Da.find((Da=>(null===Da||void 0===Da?void 0:Da.source)===F)))).forEach((F=>{F.startsWith("geovisio")&&(ll.push({id:`${F}_sequences`,type:"line",source:F,"source-layer":"sequences",layout:{...Dl.SEQUENCES.layout},paint:{...Dl.SEQUENCES.paint,"line-color":pl.lm.BASE}}),ll.push({id:`${F}_sequences_plus`,type:"line",source:F,"source-layer":"sequences",layout:{...Dl.SEQUENCES_PLUS.layout},paint:{...Dl.SEQUENCES_PLUS.paint}}),ll.push({id:`${F}_pictures_symbols`,type:"symbol",source:F,"source-layer":"pictures",...Dl.PICTURES_SYMBOLS}),ll.push({id:`${F}_pictures_symbols`,type:"symbol",source:F,"source-layer":"pictures",...Dl.PICTURES_SYMBOLS}),ll.push({id:`${F}_pictures`,type:"circle",source:F,"source-layer":"pictures",layout:{...Dl.PICTURES.layout},paint:{...Dl.PICTURES.paint,"circle-color":pl.lm.BASE}}))})),Da.filter((F=>{var ll;return(null===F||void 0===F||null===(ll=F.id)||void 0===ll?void 0:ll.endsWith("_sequences"))&&void 0===Da.find((Da=>(null===Da||void 0===Da?void 0:Da.id)===F.id+"_plus"))})).forEach((F=>{ll.push({id:`${F.id}_plus`,type:"line",source:F.source,"source-layer":F["source-layer"],layout:{...Dl.SEQUENCES_PLUS.layout},paint:{...Dl.SEQUENCES_PLUS.paint}})})),Da.filter((F=>{var ll;return(null===F||void 0===F||null===(ll=F.id)||void 0===ll?void 0:ll.endsWith("_pictures"))&&void 0===Da.find((Da=>(null===Da||void 0===Da?void 0:Da.id)===F.id+"_symbols"))})).forEach((F=>{ll.unshift({id:`${F.id}_symbols`,type:"symbol",source:F.source,"source-layer":"pictures",...Dl.PICTURES_SYMBOLS}),F.paint=Object.assign(F.paint||{},Dl.PICTURES.paint),F.layout=Object.assign(F.layout||{},Dl.PICTURES.layout)})),ll}function getUserLayerId(F,Da){return`${getUserSourceId(F)}_${Da}`}function getUserSourceId(F){return"geovisio"===F?"geovisio":"geovisio_"+F}function switchCoefValue(F,Da){if(Array.isArray(F))return F.map((F=>switchCoefValue(F,Da)));if("object"===typeof F&&null!==F){const ll={};for(const cl in F)ll[cl]=switchCoefValue(F[cl],Da);return ll}return"string"===typeof F&&F.startsWith("coef")?Da:F}function geocoderParamsToURLString(F){let Da={};return Object.entries(F).filter((F=>void 0!==F[1]&&null!==F[1])).forEach((F=>Da[F[0]]=F[1])),new URLSearchParams(Da).toString()}function forwardGeocodingNominatim(F){const Da={q:F.query,countrycodes:F.countries,limit:F.limit,viewbox:F.bbox};return fetch(`https://nominatim.openstreetmap.org/search?${geocoderParamsToURLString(Da)}&format=geojson&polygon_geojson=1&addressdetails=1`).then((F=>F.json())).then((F=>{const Da={features:[]},ll=[];return F.features.forEach((F=>{ll.includes(F.properties.display_name)||(Da.features.push({place_type:["place"],place_name:F.properties.display_name,bounds:new(hl().LngLatBounds)(F.bbox)}),ll.push(F.properties.display_name))})),Da}))}function forwardGeocodingBAN(F){const Da={q:F.query,limit:F.limit};if("string"===typeof F.proximity){const[ll,cl]=F.proximity.split(",").map((F=>parseFloat(F.trim())));Da.lat=ll,Da.lon=cl}const ll={housenumber:20,street:18,locality:15,municipality:12};return fetch(`https://api-adresse.data.gouv.fr/search/?${geocoderParamsToURLString(Da)}`).then((F=>F.json())).then((F=>(F.features=F.features.map((F=>{return{place_type:["place"],place_name:(Da=F.properties,[Da.name,Da.district,Da.city].filter((F=>F)).join(", ")),center:new(hl().LngLat)(...F.geometry.coordinates),zoom:ll[F.properties.type]};var Da})),F)))}},3727:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>PhotoAdapter});var cl=ll(3890);class PhotoAdapter extends cl.D{constructor(F,Da){super(F,Da),this._shouldGoFast=Da.shouldGoFast||(()=>!0)}loadTexture(F,Da){return F.origBaseUrl?F.baseUrl=F.origBaseUrl:F.origBaseUrl=F.baseUrl,this._shouldGoFast()&&F.thumbUrl&&!F.hdLoaded&&1==F.rows&&(F.baseUrl=F.thumbUrl),super.loadTexture(F,Da).then((Da=>(F.baseUrl===F.origBaseUrl&&(F.hdLoaded=!0),Da)))}__loadTiles(F){this._shouldGoFast()||super.__loadTiles(F)}}},5071:(F,Da,ll)=>{"use strict";ll.d(Da,{Av:()=>kl,Bg:()=>Ql,Ch:()=>getGrade,GZ:()=>isInIframe,I0:()=>linkMapAndPhoto,KF:()=>isInternetFast,U3:()=>bl,Xu:()=>Wl,Yf:()=>getDistance,an:()=>pl,bG:()=>getUserAccount,dK:()=>josmBboxParameters,dj:()=>getRelativeHeading,fW:()=>Al,lm:()=>fl,oi:()=>positionToXYZ,ql:()=>Dl,rs:()=>apiFeatureToPSVNode,y7:()=>xyzToPosition});var cl=ll(654),hl=ll(8407),dl=ll(6830);const pl="geovisio-fake-id-0",fl={BASE:"#FF6F00",SELECTED:"#1E88E5",HIDDEN:"#34495E",NEXT:"#ffab40",QUALI_1:"#00695C",QUALI_2:"#fd8d3c",PALETTE_1:"#fecc5c",PALETTE_2:"#fd8d3c",PALETTE_3:"#f03b20",PALETTE_4:"#bd0026"},Al=(Object.fromEntries(Object.entries(fl).map((F=>(F[1]=parseInt(F[1].slice(1),16),F)))),[{color:"#007f4e",label:"A"},{color:"#72b043",label:"B"},{color:"#b5be2f",label:"C"},{color:"#f8cc1b",label:"D"},{color:"#f6a020",label:"E"}]),bl=[1,10,2,15,3,30,4],kl=[3,15,4,30,5],Dl=[5,1.01,4,2.01,3,5.01,2,10.01,1],Wl=.8,Ql=.2,wc=svgToPSVLink(hl,"white"),Sc=svgToPSVLink(dl,fl.NEXT);function getGrade(F,Da){if(null===Da||void 0===Da||""===Da)return null;for(let ll=0;ll<F.length;ll+=2){const cl=F[ll];if(Da<F[ll+1])return cl}return F[F.length-1]}function getDistance(F,Da){const ll=F[0]-Da[0],cl=F[1]-Da[1];return Math.sqrt(ll*ll+cl*cl)}function sortPicturesInDirection(F){return(Da,ll)=>"related"!=Da.rel&&"related"!=ll.rel?0:"related"!=Da.rel?-1:"related"!=ll.rel?1:Da.date==ll.date?getDistance(F,Da.geometry.coordinates)-getDistance(F,ll.geometry.coordinates):ll.date.localeCompare(Da.date)}function svgToPSVLink(F,Da){try{const ll=atob(F.replace(/^data:image\/svg\+xml;base64,/,"")),cl=(new DOMParser).parseFromString(ll,"image/svg+xml").childNodes[0],hl=document.createElement("button");return hl.appendChild(cl),hl.classList.add("gvs-psv-tour-arrows"),hl.style.color=Da,hl}catch(ll){const Da=document.createElement("img");return Da.src=F,Da.alt="",Da}}function getArrow(F){const Da=F.cloneNode(!0);return Da.addEventListener("pointerup",(()=>Da.classList.add("gvs-clicked"))),Da}function getAzimuth(F,Da){return(Math.atan2(Da[0]-F[0],Da[1]-F[1])*(180/Math.PI)+360)%360}function getRelativeHeading(F){var Da,ll;if(!F)throw new Error("No picture selected");let cl,hl;const dl=F.properties["view:azimuth"];if(null!==F&&void 0!==F&&null!==(Da=F.sequence)&&void 0!==Da&&Da.prevPic){var pl;const Da=null===F||void 0===F||null===(pl=F.links)||void 0===pl?void 0:pl.find((Da=>Da.nodeId===F.sequence.prevPic));Da&&(cl=(dl-getAzimuth(Da.gps,F.gps)+180)%360-180)}if(null!==F&&void 0!==F&&null!==(ll=F.sequence)&&void 0!==ll&&ll.nextPic){var fl;const Da=null===F||void 0===F||null===(fl=F.links)||void 0===fl?void 0:fl.find((Da=>Da.nodeId===F.sequence.nextPic));Da&&(hl=(dl-getAzimuth(F.gps,Da.gps)+180)%360-180)}return void 0!==cl?cl:void 0!==hl?hl:0}function getSimplifiedAngle(F,Da){const ll=Math.atan2(Da[0]-F[0],Da[1]-F[1])*(180/Math.PI);return Math.abs(ll)<30?"N":ll>=30&&ll<90?"ENE":ll>=90&&ll<150?"ESE":Math.abs(ll)>=150?"S":ll<=-30&&ll>-90?"WNW":ll<=-90&&ll>-150?"WSW":void 0}function positionToXYZ(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const ll={x:F.yaw*(180/Math.PI),y:F.pitch*(180/Math.PI)};return void 0!==Da&&(ll.z=Da),ll}function xyzToPosition(F,Da,ll){return{yaw:F/(180/Math.PI),pitch:Da/(180/Math.PI),zoom:ll}}function getNodeCaption(F,Da){var ll,cl,hl;const dl={};if(null!==F&&void 0!==F&&null!==(ll=F.properties)&&void 0!==ll&&ll.datetimetz?dl.date=new Date(F.properties.datetimetz):null!==F&&void 0!==F&&null!==(cl=F.properties)&&void 0!==cl&&cl.datetime&&(dl.date=new Date(F.properties.datetime)),null!==F&&void 0!==F&&F.providers){var pl;const Da=null===F||void 0===F||null===(pl=F.providers)||void 0===pl?void 0:pl.filter((F=>{var Da;return null===F||void 0===F||null===(Da=F.roles)||void 0===Da?void 0:Da.includes("producer")}));if((null===Da||void 0===Da?void 0:Da.length)>=0){const F={};Da.map((F=>F.name)).forEach((Da=>{const ll=Da.toLowerCase().replace(/\s/g,"");F[ll]?F[ll].push(Da):F[ll]=[Da]})),dl.producer=[],Object.values(F).forEach((F=>{const Da=F[0],ll=F.find((F=>F.toLowerCase()!=F));dl.producer.push(ll||Da)})),dl.producer=dl.producer.join(", ")}}if(null!==F&&void 0!==F&&null!==(hl=F.properties)&&void 0!==hl&&hl.license&&(dl.license=F.properties.license,null!==F&&void 0!==F&&F.links)){const ll=F.links.find((F=>"license"===(null===F||void 0===F?void 0:F.rel)));ll&&(dl.license=`<a href="${ll.href}" title="${Da.gvs.metadata_general_license_link}" target="_blank">${dl.license}</a>`)}return dl}function linkMapAndPhoto(F){const onPicLoad=Da=>{Da.detail.picId&&Da.detail.picId!==pl?(F.map.displayPictureMarker(Da.detail.lon,Da.detail.lat,F.psv.getXY().x),null!==F&&void 0!==F&&F.isMapWide()&&(null===F||void 0===F||F.setUnfocusedVisible(!0))):(F.map.displayPictureMarker(),null!==F&&void 0!==F&&F.isMapWide()&&(null===F||void 0===F||F.setUnfocusedVisible(!1)))};F.addEventListener("psv:picture-loading",onPicLoad),F.addEventListener("psv:picture-loaded",onPicLoad),F.addEventListener("psv:view-rotated",(()=>{let Da=F.psv.getPosition().yaw*(180/Math.PI);Da+=F.psv.getPictureOriginalHeading(),F.map._picMarker.setRotation(Da)})),F.addEventListener("psv:picture-preview-started",(Da=>{F.map._picMarkerPreview.setLngLat(Da.detail.coordinates).setRotation(Da.detail.direction||0).addTo(F.map)})),F.addEventListener("psv:picture-preview-stopped",(()=>{F.map._picMarkerPreview.remove()})),F.addEventListener("psv:picture-loaded",(Da=>{F.isWidthSmall()&&F._picPopup&&Da.detail.picId==F._picPopup._picId&&F._picPopup.remove()})),F.addEventListener("map:picture-click",(Da=>{F.select(Da.detail.seqId,Da.detail.picId),!F.psv._myVTour.state.currentNode&&null!==F&&void 0!==F&&F.setFocus&&F.setFocus("pic")})),F.addEventListener("map:sequence-click",(Da=>{F._api.getPicturesAroundCoordinates(Da.detail.coordinates.lat,Da.detail.coordinates.lng,1,1,Da.detail.seqId).then((Da=>{var ll,cl;(null===Da||void 0===Da||null===(ll=Da.features)||void 0===ll?void 0:ll.length)>0&&(F.select(null===(cl=Da.features[0])||void 0===cl?void 0:cl.collection,Da.features[0].id),!F.psv.getPictureMetadata()&&null!==F&&void 0!==F&&F.setFocus&&F.setFocus("pic"))}))}))}function apiFeatureToPSVNode(F,Da){var ll,hl,dl,pl,fl,Al,bl;let kl=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Dl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const Wl=null!=(null===(ll=F.properties)||void 0===ll||null===(hl=ll["pers:interior_orientation"])||void 0===hl?void 0:hl.field_of_view);let Ql=Wl?parseInt(F.properties["pers:interior_orientation"].field_of_view):70;const wc=360===Ql,Sc=(Object.values(F.assets).find((F=>{var Da;return null===F||void 0===F||null===(Da=F.roles)||void 0===Da?void 0:Da.includes("data")}))||{}).href,eu=null===F||void 0===F||null===(dl=F.properties)||void 0===dl||null===(pl=dl["tiles:tile_matrix_sets"])||void 0===pl?void 0:pl.geovisio,iu=F.links.find((F=>"prev"===(null===F||void 0===F?void 0:F.rel)&&"application/geo+json"===(null===F||void 0===F?void 0:F.type))),su=F.links.find((F=>"next"===(null===F||void 0===F?void 0:F.rel)&&"application/geo+json"===(null===F||void 0===F?void 0:F.type))),cu=Object.values(F.assets).find((F=>{var Da;return(null===(Da=F.roles)||void 0===Da?void 0:Da.includes("visual"))&&"image/webp"===F.type})),uu=Object.values(F.assets).find((F=>{var Da;return(null===(Da=F.roles)||void 0===Da?void 0:Da.includes("visual"))&&"image/jpeg"===F.type})),hu=(cu||uu).href,Lu=null===(fl=Object.values(F.assets).find((F=>{var Da;return(null===(Da=F.roles)||void 0===Da?void 0:Da.includes("thumbnail"))&&"image/jpeg"===F.type})))||void 0===fl?void 0:fl.href,zu=(null===F||void 0===F||null===(Al=F.asset_templates)||void 0===Al?void 0:Al.tiles_webp)||(null===F||void 0===F||null===(bl=F.asset_templates)||void 0===bl?void 0:bl.tiles),Du=(0,cl.qx)(F);let Nu;Nu=!zu&&Object.keys(Du).length>0?{baseUrl:kl?Sc:hu,origBaseUrl:kl?Sc:hu,hdUrl:Sc,thumbUrl:Lu,basePanoData:Du,cols:2,rows:1,width:2,tileUrl:()=>null}:wc&&eu?{baseUrl:hu,origBaseUrl:hu,basePanoData:F=>({fullWidth:F.width,fullHeight:F.height}),hdUrl:Sc,thumbUrl:Lu,cols:eu&&eu.tileMatrix[0].matrixWidth,rows:eu&&eu.tileMatrix[0].matrixHeight,width:eu&&eu.tileMatrix[0].matrixWidth*eu.tileMatrix[0].tileWidth,tileUrl:eu&&((F,Da)=>zu.href.replace(/\{TileCol\}/g,F).replace(/\{TileRow\}/g,Da))}:{baseUrl:kl?Sc:hu,origBaseUrl:kl?Sc:hu,hdUrl:Sc,thumbUrl:Lu,basePanoData:F=>{F.width<F.height&&!Wl&&(Ql=35);const Da=Ql*F.height/F.width,ll=360*F.width/Ql,cl=180*F.height/Da;return{fullWidth:ll,fullHeight:cl,croppedWidth:F.width,croppedHeight:F.height,croppedX:(ll-F.width)/2,croppedY:(cl-F.height)/2}},cols:2,rows:1,width:2,tileUrl:()=>null};return{id:F.id,caption:getNodeCaption(F,Da),panorama:Nu,links:filterRelatedPicsLinks(F,Dl),gps:F.geometry.coordinates,sequence:{id:F.collection,nextPic:su?su.id:void 0,prevPic:iu?iu.id:void 0},sphereCorrection:(0,cl.MY)(F),horizontalFov:Ql,properties:F.properties}}function filterRelatedPicsLinks(F){var Da;let ll=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const cl=F.links.filter((F=>["next","prev","related"].includes(null===F||void 0===F?void 0:F.rel)&&"application/geo+json"===(null===F||void 0===F?void 0:F.type))).filter((F=>!ll||ll(F))).map((F=>(F.datetime&&(F.date=F.datetime.split("T")[0]),F))),hl=F.geometry.coordinates,dl=[],pl={N:[],ENE:[],ESE:[],S:[],WSW:[],WNW:[]};for(let Al of cl){pl[getSimplifiedAngle(hl,Al.geometry.coordinates)].push(Al)}for(let Al in pl){const F=pl[Al];0!=F.length&&(F.sort(sortPicturesInDirection(hl)),dl.push(F.shift()))}let arrowStyle=F=>"related"===F.rel?{element:getArrow(Sc),size:{width:128/3,height:128}}:{element:getArrow(wc),size:{width:75,height:75}};const fl=-((null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"])||0)*(Math.PI/180);return dl.map((F=>({nodeId:F.id,gps:F.geometry.coordinates,arrowStyle:arrowStyle(F),linkOffset:{yaw:fl}})))}function josmBboxParameters(F){if(F){var Da;const ll=F.gps,cl=null===F||void 0===F||null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"],hl=2e-4,dl={left:ll[0]-(null===cl||cl>=180?hl:0),right:ll[0]+(null===cl||cl<=180?hl:0),top:ll[1]+(null===cl||cl<=90||cl>=270?hl:0),bottom:ll[1]-(null===cl||cl>=90&&cl<=270?hl:0),changeset_source:"Panoramax"};return Object.entries(dl).map((F=>F.join("="))).join("&")}return null}function isInIframe(){try{return window.self!==window.top}catch(F){return!0}}const eu=10,iu="gvs-internet-fast",su="https://panoramax.openstreetmap.fr/images/05/ca/2c/98/0111-4baf-b6f3-587bb8847d2e.jpg";function isInternetFast(){try{const F=navigator.connection.downlink;return Promise.resolve(F>=eu)}catch(F){try{const F=sessionStorage.getItem(iu);if(["true","false"].includes(F))return Promise.resolve("true"===F);const Da=(new Date).getTime();return fetch(su+"?nocache="+Da).then((async F=>[F,await F.blob()])).then((F=>{let[ll,cl]=F;const hl=8*parseInt(ll.headers.get("Content-Length")||cl.size)/1024/1024/(((new Date).getTime()-Da)/1e3)>=eu;return sessionStorage.setItem(iu,hl?"true":"false"),hl})).catch((F=>(console.warn("Failed to run speedtest",F),!1)))}catch(F){return Promise.resolve(!1)}}}function getCookie(F){var Da,ll,cl;const hl=null===(Da=document.cookie)||void 0===Da||null===(ll=Da.split(";"))||void 0===ll||null===(cl=ll.find((Da=>Da.trimStart().startsWith(`${F}=`))))||void 0===cl?void 0:cl.split("=");if(hl)return hl.shift(),hl.join("=")}function getUserAccount(){const F=getCookie("session"),Da=getCookie("user_id"),ll=getCookie("user_name");return F&&Da&&ll?{id:Da,name:ll}:null}},4683:(F,Da,ll)=>{"use strict";ll.d(Da,{$c:()=>enableCopyButton,Ij:()=>createHeader,Lt:()=>showQualityScore,OZ:()=>createSearchBar,Qt:()=>fat,Tf:()=>createButton,W_:()=>closeOtherPanels,Y8:()=>enableButton,ZR:()=>createTable,do:()=>createButtonSpan,fM:()=>showGrade,fP:()=>createLinkCell,fa:()=>fa,fp:()=>createLabel,np:()=>createExpandableButton,t_:()=>createPanel,vI:()=>disableButton,wj:()=>createGroup});var cl=ll(3710),hl=ll(6627),dl=ll(4011),pl=ll(2593),fl=ll(7761),Al=ll(3444),bl=ll(174),kl=ll(4189),Dl=ll(4780),Wl=ll(7325),Ql=ll(5071);function createButton(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,cl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const hl=document.createElement("button");return Da&&(Da instanceof HTMLElement||Da instanceof Node?hl.appendChild(Da):hl.innerHTML=Da),hl.id=F,Array.isArray(cl)&&(cl=cl.filter((F=>null!=F&&F.length>0))),hl.classList.add("gvs-btn","gvs-widget-bg",...cl),ll&&(hl.title=ll),hl}function createExpandableButton(F,Da,ll,cl){let dl=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const fl=document.createElement("button");if(fl.id=F,fl.appendChild(fa(Da)),cl._viewer.isWidthSmall())fl.title=ll;else{if(fl.appendChild(document.createTextNode(ll)),dl.includes("gvs-filter-unset-btn")){const F=fa(hl.Jy,{classes:["gvs-filter-unset-btn"]});F.style.display="none",fl.appendChild(F),dl=dl.filter((F=>"gvs-filter-unset-btn"!==F))}fl.appendChild(fa(pl.Jt))}return fl.classList.add("gvs-btn","gvs-widget-bg","gvs-btn-expandable",...dl),fl.setActive=F=>{let Da=fl.querySelector(".gvs-filters-active");const ll=fl.querySelector(".gvs-filter-unset-btn"),cl=fl.querySelector(".fa-chevron-down");if(F&&!Da){Da=document.createElement("span"),Da.classList.add("gvs-filters-active");const F=fl.querySelector("svg");F.nextSibling?fl.insertBefore(Da,F.nextSibling):fl.appendChild(Da),ll&&(ll.style.display=null,cl.style.display="none")}else!F&&Da&&(Da.remove(),ll&&(ll.style.display="none",cl.style.display=null))},fl}function createSearchBar(F,Da,ll,cl,pl){let bl=arguments.length>5&&void 0!==arguments[5]&&arguments[5],kl=arguments.length>6&&void 0!==arguments[6]&&arguments[6],Dl=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;const Wl=document.createElement("div");Wl.classList.add("gvs-widget-bg","gvs-search-bar"),Wl.id=F,kl&&Wl.classList.add("gvs-search-bar-reducable"),Dl&&Wl.appendChild(Dl);const Ql=document.createElement("input");Ql.type="text",Ql.placeholder=Da,Ql.id=`${F}-input`,Ql.setAttribute("autocomplete","off"),Wl.appendChild(Ql);const extendInput=()=>{Wl.classList.remove("gvs-search-bar-reduced")},reduceInput=()=>{Wl.classList.add("gvs-search-bar-reduced")};kl&&reduceInput();const wc=document.createElement("span");wc.classList.add("gvs-search-bar-icon");const Sc=fa(fl.$U),eu=fa(Al.s4,{classes:["fa-spin"]}),iu=fa(hl.Jy),su=fa(dl.lE);wc.appendChild(Sc),Wl.appendChild(wc);const cu=createPanel(pl,Wl,[],["gvs-search-bar-results"],bl);Wl.appendChild(cu);const switchIcon=F=>{wc.innerHTML="",wc.appendChild(F)},resetSearch=()=>{Wl._throttler&&clearTimeout(Wl._throttler),Ql.value="",cu.innerHTML="",cu._toggle(!1),delete Wl._lastSearch,switchIcon(Sc),cl(null),kl&&reduceInput()};Wl.resetSearch=resetSearch,Ql.goItem=F=>{kl?(cl(F),resetSearch()):(Wl._throttler&&clearTimeout(Wl._throttler),Ql.value=F.title,cu.innerHTML="",cu._toggle(!1),switchIcon(iu),cl(F))},Ql.setItem=F=>{Wl._throttler&&clearTimeout(Wl._throttler),Ql.value=F,cu.innerHTML="",cu._toggle(!1),switchIcon(iu),kl&&extendInput()};const goSearch=()=>{if(Wl._throttler&&clearTimeout(Wl._throttler),0===Ql.value.length)return cu.innerHTML="",void cu._toggle(!1);Wl._throttler=setTimeout((()=>{cu.innerHTML="",cu._toggle(!1),switchIcon(eu),ll(Ql.value).then((F=>{switchIcon(iu),cu._toggle(!0),F&&0!=F.length?!0!==F?F.forEach((F=>{const Da=document.createElement("div");Da.classList.add("gvs-search-bar-result"),Da.innerHTML=`${F.title}<br /><small>${(null===F||void 0===F?void 0:F.subtitle)||""}</small>`,cu.appendChild(Da),Da.addEventListener("click",(()=>Ql.goItem(F)))})):cu._toggle(!1):cu.innerHTML=`<div class="gvs-search-empty">${pl._t.gvs.search_empty}</li>`})).catch((F=>{console.error(F),switchIcon(su)}))}),250)};return Ql.addEventListener("change",goSearch),Ql.addEventListener("keypress",goSearch),Ql.addEventListener("paste",goSearch),Ql.addEventListener("input",goSearch),wc.addEventListener("click",(()=>{wc.firstChild!=iu&&wc.firstChild!=su||resetSearch(),kl&&wc.firstChild==Sc&&(Wl.classList.contains("gvs-search-bar-reduced")?extendInput():reduceInput())})),Wl}function createPanel(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],cl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],hl=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const dl=document.createElement("div");dl.id=Da.id+"-panel",Array.isArray(cl)&&(cl=cl.filter((F=>null!=F&&F.length>0))),dl.classList.add("gvs-panel","gvs-widget-bg","gvs-hidden",...cl);for(let pl of ll)dl.appendChild(pl);const togglePanel=(Da,ll)=>{Da&&Da.stopPropagation(),!0===ll?dl.classList.remove("gvs-hidden"):!1===ll?dl.classList.add("gvs-hidden"):(dl.classList.toggle("gvs-hidden"),ll=!dl.classList.contains("gvs-hidden")),ll&&!hl&&closeOtherPanels(dl,F._viewer.container)};return dl._toggle=F=>togglePanel(null,F),"BUTTON"==Da.tagName&&(Da.addEventListener("click",togglePanel),Da.addEventListener("hover",togglePanel)),dl}function closeOtherPanels(F,Da){var ll;const isPanel=F=>F.classList.contains("gvs-panel")||F.classList.contains("gvs-search-bar-result")||F.classList.contains("gvs-search-empty")||F.classList.contains("gvs-search-bar-reducable");if(!isPanel(F)&&null!==(ll=F)&&void 0!==ll&&ll.parentNode)for(F=F.parentNode;F instanceof Element&&!isPanel(F);)F=F.parentNode;for(const cl of Da.getElementsByClassName("gvs-panel"))cl==F||cl.contains(F)||cl.classList.contains("gvs-hidden")||cl.classList.add("gvs-hidden");for(const cl of Da.getElementsByClassName("gvs-search-bar-reducable"))cl==F||cl.contains(F)||cl.classList.contains("gvs-search-bar-reduced")||cl.resetSearch()}function createGroup(F,Da,ll){let cl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],hl=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const dl=document.createElement("div");dl.id=F,Array.isArray(hl)&&(hl=hl.filter((F=>null!=F&&F.length>0))),dl.classList.add("gvs-group",...hl);for(let pl of cl)dl.appendChild(pl);return ll._corners[Da].appendChild(dl),dl}function enableCopyButton(F,Da){for(let ll of F.getElementsByTagName("button")){const F=ll.getAttribute("data-input"),cl=ll.getAttribute("data-copy");(F||cl)&&ll.addEventListener("click",(()=>{let hl;if(F){const Da=document.getElementById(F);hl=Da.innerText||Da.value}else cl&&(hl=ll.getAttribute("data-copy"));navigator.clipboard.writeText(hl);const dl=ll.innerHTML;ll.innerHTML=`${Da.gvs.copied} ${fat(bl.e6)}`,ll.classList.add("gvs-btn-active"),setTimeout((()=>{ll.innerHTML=dl,ll.classList.remove("gvs-btn-active")}),2e3)}))}}function enableButton(F){F.removeAttribute("disabled")}function disableButton(F){F.setAttribute("disabled","")}function fa(F,Da){return(0,cl.Kk)(F,Da).node[0]}function fat(F,Da){return(0,cl.Kk)(F,Da).html[0]}function createLinkCell(F,Da,ll,cl){const hl=document.createElement("a");hl.href=Da,hl.target="_blank",hl.title=ll,hl.textContent=F;return[hl,createButtonSpan(`${fat(kl.jP)} ${cl}`,F)]}function createTable(F,Da){const ll=document.createElement("table");return ll.className=F,Da.forEach((F=>{let{section:Da,value:cl,values:hl,classes:dl}=F;const pl=document.createElement("tr"),fl=document.createElement("th");fl.scope="row",fl.textContent=Da,pl.appendChild(fl);const Al=document.createElement("td");dl&&Al.classList.add(...dl),hl?hl.forEach((F=>Al.appendChild(F))):cl instanceof HTMLElement?Al.appendChild(cl):Al.innerHTML=cl,pl.appendChild(Al),ll.appendChild(pl)})),ll}function createHeader(F,Da){const ll=document.createElement(F);return ll.innerHTML=Da,ll}function createButtonSpan(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const ll=document.createElement("button");ll.innerHTML=F,Da&&ll.setAttribute("data-copy",Da);const cl=document.createElement("span");return cl.className="gvs-input-btn",cl.appendChild(ll),cl}function createLabel(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const cl=document.createElement("label");return cl.htmlFor=F,ll&&cl.appendChild(fa(ll)),cl.appendChild(document.createTextNode(Da)),cl}function showGrade(F,Da){let ll='<span class="gvs-grade">';for(let cl=1;cl<=F;cl++)ll+=fat(Dl.yy);for(let cl=F+1;cl<=5;cl++)ll+=fat(Wl.yy);return ll+="</span> (",ll+=null===F?Da.gvs.metadata_quality_missing+")":F+"/5)",ll}function showQualityScore(F){const Da=document.createElement("span");for(let ll=1;ll<=Ql.fW.length;ll++){const cl=Ql.fW[ll-1],hl=document.createElement("span");hl.appendChild(document.createTextNode(cl.label)),hl.classList.add("gvs-qualityscore"),hl.style.backgroundColor=cl.color,ll===6-F&&hl.classList.add("gvs-qualityscore-selected"),Da.appendChild(hl)}return Da}},9194:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>URLHash});const cl={minDate:"date_from",maxDate:"date_to",type:"pic_type",camera:"camera",theme:"theme",qualityscore:"pic_score"},hl=Object.fromEntries(Object.entries(cl).map((F=>[F[1],F[0]]))),dl=["psv:view-rotated","psv:picture-loaded","focus-changed","filters-changed","psv:transition-duration-changed","map:background-changed","map:users-changed","pictures-navigation-changed"];class URLHash extends EventTarget{constructor(F){super(),this._viewer=F,this._delay=null,this._hashChangeHandler=this._onHashChange.bind(this),F.addEventListener("ready",(()=>{window.addEventListener("hashchange",this._hashChangeHandler,!1),dl.forEach((F=>this._viewer.addEventListener(F,this._updateHash.bind(this))))}),{once:!0})}destroy(){var F,Da;window.removeEventListener("hashchange",this._hashChangeHandler),delete this._hashChangeHandler,null===(F=this._viewer)||void 0===F||null===(Da=F.map)||void 0===Da||Da.off("moveend",this._updateHash),dl.forEach((F=>this._viewer.removeEventListener(F,this._updateHash))),delete this._viewer,this._updateHash()}bindMapEvents(){this._viewer.map.on("moveend",this._updateHash.bind(this))}_getHashParts(){let F={};"number"==typeof this._viewer.psv.getTransitionDuration()&&(F.speed=this._viewer.psv.getTransitionDuration()),[null,"any"].includes(this._viewer.getPicturesNavigation())||(F.nav=this._viewer.getPicturesNavigation());const Da=this._viewer.psv.getPictureMetadata();if(Da&&(F.pic=Da.id,F.xyz=this._getXyzHashString()),this._viewer.map){F.map=this._getMapHashString(),F.focus="pic",this._viewer.isMapWide()&&(F.focus="map"),this._viewer.popupContainer.classList.contains("gvs-hidden")||(F.focus="meta"),this._viewer.map.hasTwoBackgrounds()&&this._viewer.map.getBackground()&&(F.background=this._viewer.map.getBackground());const Da=this._viewer.map.getVisibleUsers();if((Da.length>1||!Da.includes("geovisio"))&&(F.users=Da.join(",")),this._viewer._mapFilters){for(let Da in cl)this._viewer._mapFilters[Da]&&(F[cl[Da]]=this._viewer._mapFilters[Da]);if(F.pic_score){const Da=[null,"E","D","C","B","A"];F.pic_score=F.pic_score.map((F=>Da[F])).join("")}}}else F.map="none";return F}getHashString(){let F="";return Object.entries(this._getHashParts()).sort(((F,Da)=>F[0].localeCompare(Da[0]))).forEach((Da=>{let[ll,cl]=Da,hl=!1;const dl=F.split("&").map((F=>{const Da=F.split("=")[0];return Da===ll?(hl=!0,`${Da}=${cl}`):F})).filter((F=>F));hl||dl.push(`${ll}=${cl}`),F=`${dl.join("&")}`})),`#${F}`.replace(/^#+/,"#")}_getCurrentHash(){const F=window.location.hash.replace("#","");let Da={};if(F.split("&").map((F=>F.split("="))).filter((F=>void 0!==F[0]&&F[0].length>0)).forEach((F=>{Da[F[0]]=F[1]})),Da.s){const F=Object.fromEntries(Da.s.split(";").map((F=>[F[0],F.substring(1)])));Da={},"m"===F.f?Da.focus="map":"p"===F.f?Da.focus="pic":"t"===F.f&&(Da.focus="meta"),""!==F.s&&(Da.speed=100*parseFloat(F.s)),"a"===F.n?Da.nav="any":"s"===F.n&&(Da.nav="seq"),"n"===F.n&&(Da.nav="none"),""!==F.p&&(Da.pic=F.p),""!==F.c&&(Da.xyz=F.c),""!==F.m&&(Da.map=F.m),""!==F.d&&(Da.date_from=F.d),""!==F.e&&(Da.date_to=F.e),"f"===F.t?Da.pic_type="flat":"e"===F.t&&(Da.pic_type="equirectangular"),""!==F.k&&(Da.camera=F.k),"d"===F.v?Da.theme="default":"a"===F.v?Da.theme="age":"t"===F.v?Da.theme="type":"s"===F.v&&(Da.theme="score"),"s"===F.b?Da.background="streets":"a"===F.b&&(Da.background="aerial"),""!==F.u&&(Da.users=F.u),""!==F.q&&(Da.pic_score=F.q)}return Da}_getMapHashString(){const F=this._viewer.map.getCenter(),Da=Math.round(100*this._viewer.map.getZoom())/100,ll=Math.ceil((Da*Math.LN2+Math.log(512/360/.5))/Math.LN10),cl=Math.pow(10,ll),hl=Math.round(F.lng*cl)/cl,dl=Math.round(F.lat*cl)/cl,pl=this._viewer.map.getBearing(),fl=this._viewer.map.getPitch();let Al=`${Da}/${dl}/${hl}`;return(pl||fl)&&(Al+="/"+Math.round(10*pl)/10),fl&&(Al+=`/${Math.round(fl)}`),Al}_getXyzHashString(){const F=this._viewer.psv.getXYZ();return`${F.x.toFixed(2)}/${F.y.toFixed(2)}/${Math.round(F.z||0)}`}_onHashChange(){let F=this._getCurrentHash();if(F.pic){const Da=F.pic.split(";");Da.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._viewer.select(null,Da[0])}else this._viewer.select();if(F.focus&&["map","pic"].includes(F.focus)&&(this._viewer.setPopup(!1),this._viewer.setFocus(F.focus)),F.focus&&"meta"==F.focus&&this._viewer._widgets._showPictureMetadataPopup(),void 0!==F.speed&&this._viewer.psv.setTransitionDuration(F.speed),F.map&&this._viewer.map){const Da=this.getMapOptionsFromHashString(F.map);Da&&this._viewer.map.jumpTo(Da);let ll=(F.users||"").split(",");(0===ll.length||1===ll.length&&""===ll[0].trim())&&(ll=["geovisio"]),this._viewer.map.setVisibleUsers(ll)}if(F.xyz){const Da=this.getXyzOptionsFromHashString(F.xyz);this._viewer.psv.setXYZ(Da.x,Da.y,Da.z)}this._viewer.setFilters(this.getMapFiltersFromHashVals(F)),["aerial","streets"].includes(F.background)&&this._viewer.map.setBackground(F.background),["pic","any","seq"].includes(F.nav)&&this._viewer.setPicturesNavigation(F.nav)}getShortLink(F){const Da=new URL(F),ll=this._getHashParts(),cl={f:(ll.focus||"").substring(0,1),s:isNaN(parseInt(ll.speed))?void 0:Math.floor(parseInt(ll.speed)/100),n:(ll.nav||"").substring(0,1),p:ll.pic,c:ll.xyz,m:ll.map,d:ll.date_from,e:ll.date_to,t:(ll.pic_type||"").substring(0,1),k:ll.camera,v:(ll.theme||"").substring(0,1),b:(ll.background||"").substring(0,1),u:ll.users,q:ll.pic_score},hl=Object.entries(cl).filter((F=>{let[,Da]=F;return void 0!=Da&&""!=Da})).map((F=>{let[Da,ll]=F;return`${Da}${ll}`})).join(";");return Da.hash=`s=${hl}`,Da}getMapFiltersFromHashVals(F){const Da={};for(let ll in hl)F[ll]&&(Da[hl[ll]]=F[ll]);if(Da.qualityscore){let F=Da.qualityscore.split("");const ll={A:5,B:4,C:3,D:2,E:1};Da.qualityscore=F.map((F=>ll[F]))}return Da}getMapOptionsFromHashString(F){const Da=F.split("/");if(Da.length>=3&&!Da.some((F=>isNaN(F)))){const F={center:[+Da[2],+Da[1]],zoom:+Da[0],pitch:+(Da[4]||0)};return this._viewer.map&&(F.bearing=this._viewer.map.dragRotate.isEnabled()&&this._viewer.map.touchZoomRotate.isEnabled()?+(Da[3]||0):this._viewer.map.getBearing()),F}return null}getXyzOptionsFromHashString(F){const Da=F.split("/");if(3!==Da.length||Da.some((F=>isNaN(F))))return null;return{x:+Da[0],y:+Da[1],z:+Da[2]}}_updateHash(){this._delay&&(clearTimeout(this._delay),this._delay=null),this._delay=setTimeout((()=>{var F,Da,ll;const cl=new URL(window.location.href),hl=new URL(window.location.href);if(hl.hash=this._viewer?this.getHashString():"",cl.hash==hl.hash)return;const dl=this._getCurrentHash().pic||"",pl=(null===(F=this._viewer)||void 0===F||null===(Da=F.psv)||void 0===Da||null===(ll=Da.getPictureMetadata())||void 0===ll?void 0:ll.id)||"",fl=this._getCurrentHash().focus||"",Al=hl.hash.includes("focus=meta")?"meta":hl.hash.includes("focus=map")?"map":"pic";try{if(dl!=pl||fl!=Al&&"meta"==Al?window.history.pushState(window.history.state,null,hl.href):window.history.replaceState(window.history.state,null,hl.href),this._viewer){const F=new CustomEvent("url-changed",{detail:{url:hl.href}});this.dispatchEvent(F)}}catch(bl){}}),500)}}},490:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Widgets});ll(307);var cl=ll(2968),hl=ll(4683),dl=ll(5071),pl=ll(1462),fl=ll(5721),Al=ll(7534),bl=ll(6810),kl=ll(654),Dl=ll(1372),Wl=ll(7290),Ql=ll(1260),wc=ll(7964),Sc=ll(2e3),eu=ll(5279),iu=ll(9683),su=ll(6386),cu=ll(1705),uu=ll(5431),hu=ll(7472),Lu=ll(9186),zu=ll(6069),Du=ll(99),Nu=ll(7321),qu=ll(501),ih=ll(6787),gh=ll(6533),ed=ll(7744),td=ll(8629),id=ll(325),nd=ll(9243),rd=ll(1904),ad=ll(4220),sd=ll(7172),od=ll(7879),ld=ll(7516),cd=ll(8739),ud=ll(3520),hd=ll(3095),dd=ll(4162),pd=ll(4189),md=ll(6311),fd=ll(9564),gd=ll(2975),Ad=ll(4881),yd=ll(1708),vd=ll(3233),_d=ll(6668);class Widgets{constructor(F){var Da;let ll=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null==ll&&(ll={}),null==ll.editIdUrl&&(ll.editIdUrl="https://www.openstreetmap.org/edit"),this._viewer=F,this._t=this._viewer._t,this._options=ll;const cl=void 0!==this._viewer.map;this._corners={};const pl=cl?["main","mini"]:["main"],fl=["top","bottom"],Al=["left","middle","right"];for(let hl of pl)for(let F of fl){const Da=document.createElement("div");Da.id=`gvs-corner-${hl}-${F}`,Da.classList.add("gvs-corner-space");for(let ll of Al){const cl=document.createElement("div");cl.id=`${Da.id}-${ll}`,cl.classList.add("gvs-corner"),this._corners[`${hl}-${F}-${ll}`]=cl,Da.appendChild(cl)}"main"==hl?this._viewer.mainContainer.appendChild(Da):"mini"==hl&&this._viewer.miniContainer.appendChild(Da)}if((0,dl.GZ)()||this._initWidgetPlayer(cl),this._initWidgetLegend(cl,null===(Da=ll)||void 0===Da?void 0:Da.mapAttribution),cl&&(this._initWidgetMiniActions(),(0,dl.GZ)()||(this._initWidgetSearch(),this._initWidgetFilters(null!==this._viewer._api._endpoints.user_search&&null!==this._viewer._api._endpoints.user_tiles,this._viewer.map&&this._viewer.map._hasQualityScore()),this._initWidgetMapLayers(),this._listenMapFiltersChanges())),this._viewer.isWidthSmall()||this._initWidgetShare(),ll.customWidget){const F=this._corners["main-bottom-right"];switch(typeof ll.customWidget){case"string":for(let Da of(new DOMParser).parseFromString(ll.customWidget,"text/html").body.children)F.appendChild(Da);break;case"object":Array.isArray(ll.customWidget)?ll.customWidget.forEach((Da=>F.appendChild(Da))):F.appendChild(ll.customWidget)}}this._initWidgetZoom(cl),this._viewer.container.addEventListener("click",(F=>(0,hl.W_)(F.target,this._viewer.container)))}destroy(){Object.values(this._corners).forEach((F=>F.remove())),delete this._corners,delete this._t,delete this._viewer}_initWidgetZoom(F){this._lastWantedZoom=this._viewer.psv.getZoomLevel();const Da=(0,hl.Tf)("gvs-zoom-in",(0,hl.fa)(Dl.QL),this._t.gvs.zoomIn),ll=(0,hl.Tf)("gvs-zoom-out",(0,hl.fa)(Wl.EZ),this._t.gvs.zoomOut);(0,hl.wj)("gvs-widget-zoom","main-bottom-right",this,[Da,ll],["gvs-group-vertical","gvs-mobile-hidden","gvs-print-hidden"]);const zoomFct=(Da,ll)=>{if(F&&this._viewer.isMapWide())ll?this._viewer.map.zoomIn({},{originalEvent:Da}):this._viewer.map.zoomOut({},{originalEvent:Da});else{this._viewer.lastPsvAnim&&this._viewer.lastPsvAnim.cancel();const F=ll?Math.min(100,this._lastWantedZoom+cl.$p):Math.max(0,this._lastWantedZoom-cl.$p);this._viewer.lastPsvAnim=this._viewer.psv.animate({speed:cl.LM,zoom:F}),this._lastWantedZoom=F}};Da.addEventListener("click",(F=>zoomFct(F,!0))),ll.addEventListener("click",(F=>zoomFct(F,!1)))}_initWidgetPlayer(F){const Da=(0,hl.Tf)("gvs-player-prev",(0,hl.fa)(cu.TH),this._t.gvs.sequence_prev),ll=(0,hl.Tf)("gvs-player-play"),dl=(0,hl.Tf)("gvs-player-next",(0,hl.fa)(uu.vF),this._t.gvs.sequence_next),pl=(0,hl.Tf)("gvs-player-more",(0,hl.fa)(gh.nx),this._t.gvs.sequence_more,["gvs-xs-hidden"]),fl=(0,hl.t_)(this,pl,[],["gvs-player-options"]);fl.innerHTML=`\n\t\t\t<div class="gvs-input-range" title="${this._t.gvs.sequence_speed}">\n\t\t\t\t${(0,hl.Qt)(nd.rO)}\n\t\t\t\t<input\n\t\t\t\t\tid="gvs-player-speed"\n\t\t\t\t\ttype="range" name="speed"\n\t\t\t\t\tmin="0" max="${cl.Vf-100}"\n\t\t\t\t\tvalue="${cl.Vf-this._viewer.psv.getTransitionDuration()}"\n\t\t\t\t\ttitle="${this._t.gvs.sequence_speed}"\n\t\t\t\t\tstyle="width: 100%;" />\n\t\t\t\t${(0,hl.Qt)(ed.KM)}\n\t\t\t</div>\n\t\t\t<button title="${this._t.gvs.contrast}" id="gvs-player-contrast">\n\t\t\t\t${(0,hl.Qt)(id.rC)}\n\t\t\t</button>\n\t\t`;const Al=(0,hl.wj)("gvs-widget-player",F?"main-top-middle":"main-top-left",this,[Da,ll,dl].concat(this._viewer.isWidthSmall()?[]:[fl,pl]),["gvs-group-horizontal","gvs-only-psv","gvs-print-hidden",this._viewer.psv.getPictureMetadata()?"":"gvs-hidden"]),toggleBtnPlay=F=>{ll.innerHTML=F?(0,hl.Qt)(hu.G1):(0,hl.Qt)(su.ij),ll.title=F?this._t.gvs.sequence_pause:this._t.gvs.sequence_play};toggleBtnPlay(!1);const updatePlayBtn=()=>{var F,cl,pl,fl;"pic"===this._viewer.getPicturesNavigation()?((0,hl.vI)(dl),(0,hl.vI)(ll),(0,hl.vI)(Da)):(null!=(null===(F=this._viewer.psv.getPictureMetadata())||void 0===F||null===(cl=F.sequence)||void 0===cl?void 0:cl.prevPic)?(0,hl.Y8)(Da):(0,hl.vI)(Da),null!=(null===(pl=this._viewer.psv.getPictureMetadata())||void 0===pl||null===(fl=pl.sequence)||void 0===fl?void 0:fl.nextPic)?((0,hl.Y8)(dl),(0,hl.Y8)(ll)):((0,hl.vI)(dl),(0,hl.vI)(ll)))};if(updatePlayBtn(),this._viewer.addEventListener("sequence-playing",(()=>toggleBtnPlay(!0))),this._viewer.addEventListener("sequence-stopped",(()=>toggleBtnPlay(!1))),this._viewer.addEventListener("psv:picture-loaded",(()=>Al.classList.remove("gvs-hidden")),{once:!0}),this._viewer.addEventListener("psv:picture-loaded",updatePlayBtn),this._viewer.addEventListener("pictures-navigation-changed",updatePlayBtn),!this._viewer.isWidthSmall()){const F=fl.children[0].children[1];this._viewer.addEventListener("psv:transition-duration-changed",(Da=>{F.value=cl.Vf-Da.detail.value})),F.addEventListener("change",(F=>{const Da=cl.Vf-F.target.value;this._viewer.psv.setTransitionDuration(Da)}))}Da.addEventListener("click",(()=>this._viewer.psv.goToPrevPicture())),dl.addEventListener("click",(()=>this._viewer.psv.goToNextPicture())),ll.addEventListener("click",(()=>{this._viewer.isSequencePlaying()?(toggleBtnPlay(!1),this._viewer.stopSequence()):(toggleBtnPlay(!0),this._viewer.playSequence())}));const bl=document.getElementById("gvs-player-contrast");bl&&bl.addEventListener("click",(()=>{bl.classList.contains("gvs-btn-active")?(bl.classList.remove("gvs-btn-active"),this._viewer.psv.setHigherContrast(!1)):(bl.classList.add("gvs-btn-active"),this._viewer.psv.setHigherContrast(!0))}))}_initWidgetLegend(F,Da){const ll=(0,hl.wj)("gvs-widget-legend",F?"main-bottom-right":"main-bottom-left",this,[],["gvs-widget-bg"]);let cl,pl,fl;F&&(cl=(0,hl.wj)("gvs-widget-mini-legend","mini-bottom-right",this,[],["gvs-widget-bg","gvs-only-mini","gvs-mobile-hidden"])),this._viewer.isWidthSmall()&&(pl=document.createElement("button"),pl.id="gvs-legend-toggle",pl.classList.add("gvs-btn","gvs-widget-bg","gvs-print-hidden"),pl.appendChild((0,hl.fa)(ld.faCircleInfo)),fl=()=>{"hidden"===ll.style.visibility?(ll.style.visibility="visible",toggleLegend(!!F&&this._viewer.isMapWide())):(ll.innerHTML="",ll.style.visibility="hidden",ll.appendChild(pl))},pl.addEventListener("click",(F=>{F.stopPropagation(),fl()})));const toggleLegend=fl=>{var Al,bl,kl;let Dl=Da||(null===(Al=this._viewer.map)||void 0===Al||null===(bl=Al._attribution)||void 0===bl?void 0:bl._attribHTML)||"",Wl="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a>";const Ql=null===(kl=this._viewer.psv.getPictureMetadata())||void 0===kl?void 0:kl.caption;let wc;!(0,dl.GZ)()&&Ql&&(Wl="",Ql.producer&&(Wl+=`<span style="font-weight: bold">&copy; ${Ql.producer}</span>`),Ql.date&&(Ql.producer&&(Wl+="&nbsp;-&nbsp;"),Wl+=Ql.date.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})),wc=(0,hl.fa)(fd.AP),wc.style.marginLeft="5px"),ll.title="",fl?(ll.innerHTML=Dl,(0,dl.GZ)()&&(ll.innerHTML="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a><br />"+ll.innerHTML),ll.style.cursor=null,ll.onclick=null,cl.innerHTML=Wl):(ll.innerHTML=Wl,wc?(ll.appendChild(wc),ll.style.cursor="pointer",ll.title=this._t.gvs.legend_title,ll.onclick=(0,dl.GZ)()?()=>window.open(window.location.href,"_blank"):this._showPictureMetadataPopup.bind(this)):(ll.style.cursor=null,ll.onclick=null),F&&(cl.innerHTML=Dl)),pl&&ll.appendChild(pl)};pl?(ll.appendChild(pl),ll.style.visibility="hidden"):toggleLegend(!!F&&this._viewer.isMapWide()),this._viewer.addEventListener("focus-changed",(F=>toggleLegend("map"==F.detail.focus))),this._viewer.addEventListener("psv:picture-loaded",(()=>toggleLegend(F&&this._viewer.isMapWide())))}_showPictureMetadataPopup(){var F,Da,ll,cl,pl,fl,Al,bl,Dl,Wl,Ql,wc,Sc,eu,iu,su,cu,uu,hu,Lu,zu,Nu,qu;const ih=this._viewer.psv.getPictureMetadata();if(!ih)throw new Error("No picture currently selected");const gh=[];if(gh.push((0,hl.Ij)("h4",`${(0,hl.Qt)(ld.faCircleInfo)} ${this._t.gvs.metadata}`)),this._viewer._api._endpoints.report){const F=(0,hl.do)(`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`);F.firstChild.addEventListener("click",this._showReportForm.bind(this)),gh.push(F)}const ed=[{section:this._t.gvs.metadata_general_picid,classes:["gvs-td-with-id"],values:(0,hl.fP)(ih.id,this._viewer._api.getPictureMetadataUrl(ih.id,null===ih||void 0===ih||null===(F=ih.sequence)||void 0===F?void 0:F.id),this._t.gvs.metadata_general_picid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_seqid,classes:["gvs-td-with-id"],values:(0,hl.fP)(null===ih||void 0===ih||null===(Da=ih.sequence)||void 0===Da?void 0:Da.id,this._viewer._api.getSequenceMetadataUrl(null===ih||void 0===ih||null===(ll=ih.sequence)||void 0===ll?void 0:ll.id),this._t.gvs.metadata_general_seqid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_author,value:null===ih||void 0===ih||null===(cl=ih.caption)||void 0===cl?void 0:cl.producer},{section:this._t.gvs.metadata_general_license,value:null===ih||void 0===ih||null===(pl=ih.caption)||void 0===pl?void 0:pl.license},{section:this._t.gvs.metadata_general_date,value:null===ih||void 0===ih||null===(fl=ih.caption)||void 0===fl||null===(Al=fl.date)||void 0===Al?void 0:Al.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,timeZoneName:"short"})}];gh.push((0,hl.ZR)("gvs-table-light",ed)),gh.push((0,hl.Ij)("h4",`${(0,hl.Qt)(Du.rw)} ${this._t.gvs.metadata_camera}`));const td=null!==ih&&void 0!==ih&&null!==(bl=ih.properties)&&void 0!==bl&&null!==(Dl=bl["pers:interior_orientation"])&&void 0!==Dl&&Dl.focal_length?`${null===ih||void 0===ih||null===(Wl=ih.properties)||void 0===Wl||null===(Ql=Wl["pers:interior_orientation"])||void 0===Ql?void 0:Ql.focal_length} mm`:"\u2753";let id=null===ih||void 0===ih||null===(wc=ih.properties)||void 0===wc||null===(Sc=wc["pers:interior_orientation"])||void 0===Sc?void 0:Sc.sensor_array_dimensions;id&&(id=`${id[0]} x ${id[1]} px (${Math.floor(id[0]*id[1]/1e6)} Mpx)`);let nd=this._t.gvs.picture_flat,rd=null===ih||void 0===ih||null===(eu=ih.properties)||void 0===eu||null===(iu=eu["pers:interior_orientation"])||void 0===iu?void 0:iu.field_of_view;null!==rd&&void 0!==rd&&(360===rd?nd=this._t.gvs.picture_360:nd+=` (${rd}\xb0)`);const ad=[{section:this._t.gvs.metadata_camera_make,value:(null===ih||void 0===ih||null===(su=ih.properties)||void 0===su||null===(cu=su["pers:interior_orientation"])||void 0===cu?void 0:cu.camera_manufacturer)||"\u2753"},{section:this._t.gvs.metadata_camera_model,value:(null===ih||void 0===ih||null===(uu=ih.properties)||void 0===uu||null===(hu=uu["pers:interior_orientation"])||void 0===hu?void 0:hu.camera_model)||"\u2753"},{section:this._t.gvs.metadata_camera_type,value:nd},{section:this._t.gvs.metadata_camera_resolution,value:id||"\u2753"},{section:this._t.gvs.metadata_camera_focal_length,value:td}];gh.push((0,hl.ZR)("gvs-table-light",ad)),gh.push((0,hl.Ij)("h4",`${(0,hl.Qt)(ud.gK)} ${this._t.gvs.metadata_location}`));const sd=void 0!==(null===ih||void 0===ih||null===(Lu=ih.properties)||void 0===Lu?void 0:Lu["view:azimuth"])?`${ih.properties["view:azimuth"]}\xb0`:"\u2753",od=(0,kl.Pu)(ih),hd=[{section:this._t.gvs.metadata_location_longitude,value:ih.gps[0]},{section:this._t.gvs.metadata_location_latitude,value:ih.gps[1]},{section:this._t.gvs.metadata_location_orientation,value:sd},{section:this._t.gvs.metadata_location_precision,value:od}];if(gh.push((0,hl.ZR)("gvs-table-light",hd)),null!==(zu=this._viewer)&&void 0!==zu&&null!==(Nu=zu.map)&&void 0!==Nu&&Nu._hasQualityScore()){var dd,pd;const F=(0,hl.Ij)("h4",`${(0,hl.Qt)(vd.B9)} ${this._t.gvs.metadata_quality} <button class="gvs-btn-link" title="${this._t.gvs.metadata_quality_help}">${(0,hl.Qt)(_d.iW)}</button>`);F.lastChild.addEventListener("click",(()=>this._showQualityScoreDoc())),gh.push(F);const Da=(0,dl.Ch)(dl.ql,null===ih||void 0===ih||null===(dd=ih.properties)||void 0===dd?void 0:dd["quality:horizontal_accuracy"]),ll=(0,dl.Ch)(360===(null===ih||void 0===ih?void 0:ih.horizontalFov)?dl.Av:dl.U3,null===ih||void 0===ih||null===(pd=ih.properties)||void 0===pd?void 0:pd["panoramax:horizontal_pixel_density"]),cl=Math.round((ll||1)*dl.Xu+(Da||1)*dl.Bg),pl=[{section:this._t.gvs.metadata_quality_score,value:(0,hl.Lt)(cl)},{section:this._t.gvs.metadata_quality_gps_score,value:(0,hl.fM)(Da,this._t)},{section:this._t.gvs.metadata_quality_resolution_score,value:(0,hl.fM)(ll,this._t)}];gh.push((0,hl.ZR)("gvs-table-light",pl))}if(null!==(qu=ih.properties)&&void 0!==qu&&qu.exif){const F=document.createElement("details");F.appendChild((0,hl.Ij)("summary",`${(0,hl.Qt)(cd.BH)} ${this._t.gvs.metadata_exif}`));const Da=Object.entries(ih.properties.exif).sort().map((F=>{let[Da,ll]=F;return{section:Da,value:ll}}));F.appendChild((0,hl.ZR)("",Da)),gh.push(F)}this._viewer.setPopup(!0,gh),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_showQualityScoreDoc(){const F=[];F.push((0,hl.Ij)("h4",`${(0,hl.Qt)(vd.B9)} ${this._t.gvs.qualityscore_title}`));const Da=document.createElement("a");Da.setAttribute("href","https://docs.panoramax.fr/pictures-metadata/quality_score/"),Da.setAttribute("target","_blank"),Da.appendChild(document.createTextNode(this._t.gvs.qualityscore_doc_link)),[document.createTextNode(this._t.gvs.qualityscore_doc_1),document.createTextNode(this._t.gvs.qualityscore_doc_2),(0,hl.Lt)(5),document.createTextNode(this._t.gvs.qualityscore_doc_3),Da].forEach((Da=>{const ll=document.createElement("p");ll.appendChild(Da),F.push(ll)})),this._viewer.setPopup(!0,F)}_showReportForm(){const F=this._viewer.psv.getPictureMetadata();if(!F)throw new Error("No picture currently selected");const Da=[];Da.push((0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`));const ll=(0,dl.bG)();if(ll){const F=document.createElement("p");F.appendChild(document.createTextNode(this._t.gvs.report_auth.replace("{a}",ll.name))),Da.push(F)}const cl=document.createElement("form");Da.push(cl);const pl=document.createElement("div");pl.classList.add("gvs-input-group");const fl=(0,hl.fp)("gvs-report-issue",this._t.gvs.report_nature_label,ld.faCircleInfo),Al=document.createElement("select");Al.name="gvs-report-issue",Al.required=!0;["","blur_missing","blur_excess","inappropriate","privacy","picture_low_quality","mislocated","copyright","other"].forEach((F=>{const Da=document.createElement("option");Da.value=F,Da.textContent=this._t.gvs.report_nature[F],""===F&&(Da.setAttribute("disabled",""),Da.setAttribute("selected",""),Da.setAttribute("hidden","")),Al.appendChild(Da)})),pl.appendChild(fl),pl.appendChild(Al),cl.appendChild(pl);const bl=document.createElement("div");bl.classList.add("gvs-input-group","gvs-input-group-inline");const kl=document.createElement("input");kl.id="gvs-report-whole-sequence",kl.name="gvs-report-whole-sequence",kl.type="checkbox";const Dl=(0,hl.fp)("gvs-report-whole-sequence",this._t.gvs.report_whole_sequence);bl.appendChild(kl),bl.appendChild(Dl),cl.appendChild(bl);const Wl=document.createElement("div");Wl.classList.add("gvs-input-group");const Ql=(0,hl.fp)("gvs-report-details",this._t.gvs.report_details,gd.Be),wc=document.createElement("textarea");let Sc;if(wc.name="gvs-report-details",wc.placeholder=this._t.gvs.report_details_placeholder,Wl.appendChild(Ql),Wl.appendChild(wc),cl.appendChild(Wl),!ll){const F=document.createElement("div");F.classList.add("gvs-input-group");const Da=(0,hl.fp)("email",this._t.gvs.report_email,Ad.Hz);Sc=document.createElement("input"),Sc.type="email",Sc.name="email",Sc.placeholder=this._t.gvs.report_email_placeholder,F.appendChild(Da),F.appendChild(Sc),cl.appendChild(F)}const eu=document.createElement("div");eu.classList.add("gvs-input-btn");const iu=document.createElement("button");iu.type="submit",iu.appendChild((0,hl.fa)(yd.is)),iu.appendChild(document.createTextNode(this._t.gvs.report_submit)),eu.appendChild(iu),cl.appendChild(eu),cl.addEventListener("submit",(Da=>{var ll;Da.preventDefault();const cl={issue:Al.value,picture_id:kl.checked?null:F.id,reporter_comments:wc.value,reporter_email:null===(ll=Sc)||void 0===ll?void 0:ll.value,sequence_id:F.sequence.id};this._viewer.setPopup(!0,[(0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`),document.createTextNode(this._t.gvs.report_wait)]),this._viewer._api.sendReport(cl).then((()=>{this._viewer.setPopup(!0,[(0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`),document.createTextNode(this._t.gvs.report_success)])})).catch((F=>{console.error(F),this._viewer.setPopup(!0,[(0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`),document.createTextNode(this._t.gvs.report_failure.replace("{e}",F))])}))})),this._viewer.setPopup(!0,Da),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_initWidgetMiniActions(){const F=document.createElement("img");F.alt="",F.height=120,F.draggable=!1,F.src=pl;const Da=document.createElement("span");Da.classList.add("gvs-mobile-hidden"),Da.appendChild(document.createTextNode(this._t.gvs.expand));const ll=(0,hl.Tf)("gvs-mini-expand",Da,this._t.gvs.expand_info,["gvs-only-mini","gvs-print-hidden"]);ll.appendChild(F),this._corners["mini-top-right"].appendChild(ll),ll.addEventListener("click",(()=>{this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map")}));const cl=document.createElement("img");cl.alt=this._t.gvs.minimize_short,cl.height=120,cl.draggable=!1,cl.src=fl;const Al=(0,hl.Tf)("gvs-mini-hide",cl,this._t.gvs.minimize,["gvs-only-mini","gvs-print-hidden"]);this._corners["mini-bottom-left"].appendChild(Al),Al.addEventListener("click",(()=>{this._viewer.setUnfocusedVisible(!1)}));const bl=(0,hl.Tf)("gvs-mini-show",null,null,["gvs-btn-large","gvs-only-mini-hidden","gvs-print-hidden"]);this._corners["main-bottom-left"].appendChild(bl),bl.addEventListener("click",(()=>{(0,dl.GZ)()?this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map"):this._viewer.setUnfocusedVisible(!0)}));const miniBtnRendering=()=>{this._viewer.map&&this._viewer.isMapWide()?(bl.title=this._t.gvs.show_psv,bl.innerHTML=(0,hl.Qt)(iu.pt)):(bl.title=this._t.gvs.show_map,bl.innerHTML=(0,hl.Qt)(Sc.e5))};miniBtnRendering(),this._viewer.addEventListener("focus-changed",miniBtnRendering)}_initWidgetSearch(){const F=(0,hl.OZ)("gvs-widget-search-bar",this._t.gvs.search_address,(F=>{const Da=F.match(/([-+]?\d{1,2}\.\d+),\s*([-+]?\d{1,3}\.\d+)/),ll=F.match(/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/);if(Da){const F=parseFloat(Da[1]),ll=parseFloat(Da[2]);return this._viewer.map.flyTo({center:[ll,F],zoom:16}),Promise.resolve(!0)}return ll?(this._viewer.select(null,F),Promise.resolve(!0)):this._viewer.map.geocoder({query:F,limit:3,bbox:this._viewer.map.getBounds().toArray().map((F=>F.join(","))).join(","),proximity:this._viewer.map.getCenter().lat+","+this._viewer.map.getCenter().lng}).then((F=>F=F.features.map((F=>({title:F.place_name.split(",")[0],subtitle:F.place_name.split(",").slice(1).join(", "),data:F})))))}),(F=>{F&&(F.data.bounds?this._viewer.map.fitBounds(F.data.bounds):this._viewer.map.flyTo({center:F.data.center,zoom:F.data.zoom||13}))}),this,void 0,this._viewer.isWidthSmall(),this._viewer.map._geolocate);(0,hl.wj)("gvs-widget-search",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[F],["gvs-only-map","gvs-print-hidden"])}_initWidgetMapLayers(){var F,Da;const ll=(0,hl.np)("gvs-map-layers",ad.qI,this._t.gvs.layers,this),cl=(0,hl.t_)(this,ll,[]);(0,hl.wj)("gvs-widget-map-layers","main-top-right",this,[ll,cl],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]),this._viewer.map.hasTwoBackgrounds()&&(cl.innerHTML=`\n\t\t\t\t<h4>${(0,hl.Qt)(sd.YS)} ${this._t.gvs.map_background}</h4>\n\t\t\t\t<div id="gvs-map-bg" class="gvs-input-group">\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-streets" name="gvs-map-bg" value="streets" />\n\t\t\t\t\t<label for="gvs-map-bg-streets">\n\t\t\t\t\t\t<img id="gvs-map-bg-streets-img" alt="" />\n\t\t\t\t\t\t${this._t.gvs.map_background_streets}\n\t\t\t\t\t</label>\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-aerial" name="gvs-map-bg" value="aerial" />\n\t\t\t\t\t<label for="gvs-map-bg-aerial">\n\t\t\t\t\t\t<img id="gvs-map-bg-aerial-img" alt="" />\n\t\t\t\t\t\t${this._t.gvs.map_background_aerial}\n\t\t\t\t\t</label>\n\t\t\t\t</div>`),cl.innerHTML+=`\n\t\t\t<h4>${(0,hl.Qt)(td.fy)} ${this._t.gvs.map_theme}</h4>\n\t\t\t<div class="gvs-input-group">\n\t\t\t\t<select id="gvs-map-theme" style="width: 100%;">\n\t\t\t\t\t<option value="default">${this._t.gvs.map_theme_default}</option>\n\t\t\t\t\t<option value="age">${this._t.gvs.map_theme_age}</option>\n\t\t\t\t\t<option value="type">${this._t.gvs.map_theme_type}</option>\n\t\t\t\t\t${null!==(F=this._viewer)&&void 0!==F&&null!==(Da=F.map)&&void 0!==Da&&Da._hasQualityScore()?'<option value="score">'+this._t.gvs.map_theme_score+"</option>":""}\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div id="gvs-map-theme-legend-age" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_4}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_4}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_3}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_3}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_2}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_2}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_1}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_1}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id="gvs-map-theme-legend-type" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.QUALI_1}"></span>\n\t\t\t\t\t\t${this._t.gvs.picture_360}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.QUALI_2}"></span>\n\t\t\t\t\t\t${this._t.gvs.picture_flat}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id="gvs-map-theme-legend-score" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t${dl.fW.map((F=>'<span class="gvs-qualityscore" style="background-color: '+F.color+';">'+F.label+"</span>")).join("")}\n\t\t\t\t\t<button id="gvs-map-theme-quality-help" class="gvs-btn-link" title="${this._t.gvs.metadata_quality_help}">${(0,hl.Qt)(_d.iW,{transform:{x:6,size:24}})}</button>\n\t\t\t\t</div>\n\t\t\t</div>`,cl.querySelector("#gvs-map-theme-quality-help").addEventListener("click",(()=>this._showQualityScoreDoc()));const pl=cl.querySelector("#gvs-map-theme"),onChange=()=>{this._onMapThemeChange(),this._onMapFiltersChange()};if(pl.addEventListener("change",onChange),pl.addEventListener("keypress",onChange),pl.addEventListener("paste",onChange),pl.addEventListener("input",onChange),this._viewer.map.hasTwoBackgrounds()){cl.querySelector("#gvs-map-bg-aerial-img").src=Al;cl.querySelector("#gvs-map-bg-streets-img").src=bl;const F=cl.querySelector("#gvs-map-bg-aerial"),Da=cl.querySelector("#gvs-map-bg-streets"),onBgChange=F=>{this._viewer.map.setBackground(F.target.value)};F.addEventListener("change",onBgChange),Da.addEventListener("change",onBgChange),this._viewer.addEventListener("map:background-changed",(F=>this._onMapBackgroundChange(F.detail.background))),this._onMapBackgroundChange(this._viewer.map.getBackground())}}_onMapBackgroundChange(F){const Da=document.getElementById("gvs-map-bg-aerial"),ll=document.getElementById("gvs-map-bg-streets");"aerial"===F?Da.checked=!0:ll.checked=!0}_onMapThemeChange(){const F=document.getElementById("gvs-map-theme"),Da=document.getElementById("gvs-map-layers"),ll=F.value;Da.setActive("default"!==ll);for(let cl of document.getElementsByClassName("gvs-map-theme-legend"))cl.id=="gvs-map-theme-legend-"+ll?cl.classList.remove("gvs-hidden"):cl.classList.add("gvs-hidden")}_initWidgetFilters(F,Da){const ll=(0,hl.np)("gvs-filter",rd._$,this._t.gvs.filters,this,["gvs-filter-unset-btn"]),cl=(0,hl.t_)(this,ll,[]);cl.innerHTML=`\n\t\t\t<form id="gvs-filter-form">\n\t\t\t\t<div class="gvs-filter-block">\n\t\t\t\t\t<div class="gvs-filter-zoomin">${this._t.gvs.filter_zoom_in}</div>\n\t\t\t\t\t<h4>${(0,hl.Qt)(Lu.ok)} ${this._t.gvs.filter_date}</h4>\n\t\t\t\t\t<div class="gvs-input-shortcuts">\n\t\t\t\t\t\t<button data-for="gvs-filter-date-from" data-value="${new Date((new Date).setMonth((new Date).getMonth()-1)).toISOString().split("T")[0]}">${this._t.gvs.filter_date_1month}</button>\n\t\t\t\t\t\t<button data-for="gvs-filter-date-from" data-value="${new Date((new Date).setFullYear((new Date).getFullYear()-1)).toISOString().split("T")[0]}">${this._t.gvs.filter_date_1year}</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="gvs-input-group">\n\t\t\t\t\t\t<input type="date" id="gvs-filter-date-from" />\n\t\t\t\t\t\t${(0,hl.Qt)(zu.dm)}\n\t\t\t\t\t\t<input type="date" id="gvs-filter-date-end" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="gvs-filter-block">\n\t\t\t\t\t<h4>${(0,hl.Qt)(eu.jb)} ${this._t.gvs.filter_picture}</h4>\n\t\t\t\t\t<div class="gvs-input-group gvs-checkbox-btns" style="justify-content: center;">\n\t\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-flat" name="flat" />\n\t\t\t\t\t\t<label for="gvs-filter-type-flat">${(0,hl.Qt)(eu.jb)} ${this._t.gvs.picture_flat}</label>\n\t\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-360" name="360" />\n\t\t\t\t\t\t<label for="gvs-filter-type-360">${(0,hl.Qt)(iu.pt)} ${this._t.gvs.picture_360}</label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t`;const pl=cl.children[0];(0,hl.wj)("gvs-widget-filter",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[ll,cl],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]);const fl=ll.querySelector(".gvs-filter-unset-btn");if(fl&&fl.addEventListener("click",(F=>{F.stopPropagation(),pl.reset()})),this._viewer.isWidthSmall()&&(cl.style.width=this._viewer.container.offsetWidth-70+"px"),Da){const F=document.createElement("div");F.classList.add("gvs-filter-block"),pl.appendChild(F);const Da=document.createElement("div");Da.classList.add("gvs-filter-zoomin"),Da.appendChild(document.createTextNode(this._t.gvs.filter_zoom_in)),F.appendChild(Da);const ll=document.createElement("h4");ll.innerHTML=`${(0,hl.Qt)(vd.B9)} ${this._t.gvs.filter_qualityscore} <button class="gvs-btn-link" title="${this._t.gvs.metadata_quality_help}">${(0,hl.Qt)(_d.iW)}</button>`,ll.style.marginBottom="3px",ll.lastChild.addEventListener("click",(()=>this._showQualityScoreDoc())),F.appendChild(ll);const cl=document.createElement("div");cl.id="gvs-filter-qualityscore",cl.classList.add("gvs-input-group"),dl.fW.forEach((F=>{const Da=document.createElement("input");Da.id="gvs-filter-qualityscore-"+F.label,Da.type="checkbox",Da.name="qualityscore",Da.value=F.label;const ll=document.createElement("label");ll.setAttribute("for",Da.id),ll.title=this._t.gvs.filter_qualityscore_help,ll.appendChild(document.createTextNode(F.label)),ll.style.backgroundColor=F.color,cl.appendChild(Da),cl.appendChild(ll)})),F.appendChild(cl)}if(F){const F=document.createElement("div");F.classList.add("gvs-filter-block"),pl.appendChild(F);const Da=document.createElement("h4");Da.innerHTML=`${(0,hl.Qt)(od.X4)} ${this._t.gvs.filter_user}`,F.appendChild(Da);const ll=(0,dl.bG)();let cl;if(ll){const Da=document.createElement("div");Da.classList.add("gvs-input-shortcuts"),cl=document.createElement("button"),cl.appendChild(document.createTextNode(this._t.gvs.filter_user_mypics)),Da.appendChild(cl),F.appendChild(Da)}const fl=document.createElement("div");let Al;fl.id="gvs-filter-user",fl.classList.add("gvs-input-group"),Al=(0,hl.OZ)("gvs-filter-search-user",this._t.gvs.search_user,(F=>(Al.classList.remove("gvs-filter-active"),this._viewer._api.searchUsers(F).then((F=>(F||[]).map((F=>({title:F.label,data:F}))))))),(F=>(F?Al.classList.add("gvs-filter-active"):Al.classList.remove("gvs-filter-active"),this._viewer.map.setVisibleUsers(F?[F.data.id]:["geovisio"]))),this,!0),F.addEventListener("reset",(()=>{Al.classList.remove("gvs-filter-active"),Al.resetSearch()})),fl.appendChild(Al),F.appendChild(fl),ll&&cl.addEventListener("click",(()=>{const F=Al.querySelector("input");F.value===ll.name?Al.resetSearch():F.goItem({title:ll.name,data:{id:ll.id}})}))}cl.querySelectorAll(".gvs-input-shortcuts button").forEach((F=>{F.addEventListener("click",(()=>{const Da=document.getElementById(F.getAttribute("data-for")),ll=F.getAttribute("data-value");Da&&(Da.value!==ll?Da.value=ll:Da.value="")}))}));[document.getElementById("gvs-filter-date-from"),document.getElementById("gvs-filter-date-end")].forEach((F=>{F.addEventListener("change",(()=>{F.value?F.classList.add("gvs-filter-active"):F.classList.remove("gvs-filter-active")}))})),this._formDelay=null;const onFormChange=()=>{this._formDelay&&clearTimeout(this._formDelay),this._formDelay=setTimeout((()=>{this._onMapFiltersChange()}),250)};pl.addEventListener("change",onFormChange),pl.addEventListener("reset",onFormChange),pl.addEventListener("submit",(F=>(onFormChange(),F.preventDefault(),!1)),!0);for(let hl of pl.getElementsByTagName("input"))hl.addEventListener("change",onFormChange),hl.addEventListener("keypress",onFormChange),hl.addEventListener("paste",onFormChange),hl.addEventListener("input",onFormChange)}_onMapFiltersChange(){var F,Da;const ll=document.getElementById("gvs-filter-date-from"),cl=document.getElementById("gvs-filter-date-end"),hl=document.getElementById("gvs-filter-type-flat"),dl=document.getElementById("gvs-filter-type-360"),pl=document.getElementById("gvs-map-theme");let fl="";dl.checked&&!hl.checked&&(fl="equirectangular"),!dl.checked&&hl.checked&&(fl="flat");let Al=[];if(null!==(F=this._viewer)&&void 0!==F&&null!==(Da=F.map)&&void 0!==Da&&Da._hasQualityScore()){const F=document.getElementById("gvs-filter-qualityscore-A"),Da=document.getElementById("gvs-filter-qualityscore-B"),ll=document.getElementById("gvs-filter-qualityscore-C"),cl=document.getElementById("gvs-filter-qualityscore-D"),hl=document.getElementById("gvs-filter-qualityscore-E");F.checked&&Al.push(5),Da.checked&&Al.push(4),ll.checked&&Al.push(3),cl.checked&&Al.push(2),hl.checked&&Al.push(1),5==Al.length&&(Al=[])}const bl={minDate:ll.value,maxDate:cl.value,type:fl,theme:pl.value,qualityscore:Al};this._viewer.setFilters(bl)}_listenMapFiltersChanges(){const F=document.getElementById("gvs-filter"),Da=document.getElementById("gvs-filter-date-from"),ll=document.getElementById("gvs-filter-date-end"),cl=document.getElementById("gvs-filter-type-flat"),hl=document.getElementById("gvs-filter-type-360"),dl=document.getElementById("gvs-map-theme"),pl=document.getElementById("gvs-filter-qualityscore-A"),fl=document.getElementById("gvs-filter-qualityscore-B"),Al=document.getElementById("gvs-filter-qualityscore-C"),bl=document.getElementById("gvs-filter-qualityscore-D"),kl=document.getElementById("gvs-filter-qualityscore-E");this._viewer.addEventListener("filters-changed",(Dl=>{Dl.detail.minDate?(Da.value=Dl.detail.minDate,Da.classList.add("gvs-filter-active")):Da.classList.remove("gvs-filter-active"),Dl.detail.maxDate?(ll.value=Dl.detail.maxDate,ll.classList.add("gvs-filter-active")):ll.classList.remove("gvs-filter-active"),Dl.detail.theme&&(dl.value=Dl.detail.theme),Dl.detail.type&&(hl.checked=["","equirectangular"].includes(Dl.detail.type),cl.checked=["","flat"].includes(Dl.detail.type)),Dl.detail.qualityscore&&(pl.checked=Dl.detail.qualityscore.includes(5)&&Dl.detail.qualityscore.length<5,fl.checked=Dl.detail.qualityscore.includes(4)&&Dl.detail.qualityscore.length<5,Al.checked=Dl.detail.qualityscore.includes(3)&&Dl.detail.qualityscore.length<5,bl.checked=Dl.detail.qualityscore.includes(2)&&Dl.detail.qualityscore.length<5,kl.checked=Dl.detail.qualityscore.includes(1)&&Dl.detail.qualityscore.length<5);let Wl=Object.keys(Dl.detail).filter((F=>F&&"theme"!==F)).length>0||this._viewer.map.getVisibleUsers().filter((F=>"geovisio"!==F)).length>0;F.setActive(Wl),this._onMapThemeChange()})),this._viewer.addEventListener("map:users-changed",(Da=>{let ll=Object.keys(this._viewer._mapFilters).filter((F=>F&&"theme"!==F)).length>0||Da.detail.usersIds.filter((F=>"geovisio"!==F)).length>0;F.setActive(ll)}));const Dl=document.getElementsByClassName("gvs-filter-zoomin"),changeLblZoomInDisplay=()=>{for(let F of Dl)this._viewer.map.getZoom()<7?F.style.display=null:F.style.display="none"};changeLblZoomInDisplay(),this._viewer.map.on("zoomend",changeLblZoomInDisplay)}_initWidgetShare(){var F,Da;const ll=(0,hl.Tf)("gvs-share",(0,hl.fa)(Ql.ek),this._t.gvs.share,["gvs-btn-large"]),cl=(0,hl.t_)(this,ll,[]);cl.innerHTML=`\n\t\t\t<div class="gvs-hidden gvs-needs-picture">\n\t\t\t\t<p id="gvs-share-license" style="margin: 0 0 10px 0;"></p>\n\t\t\t</div>\n\t\t\t<h4 style="margin-top: 0">${(0,hl.Qt)(wc.CQ)} ${this._t.gvs.share_links}</h4>\n\t\t\t<div id="gvs-share-links" class="gvs-input-btn">\n\t\t\t\t<a id="gvs-share-image" class="gvs-link-btn gvs-hidden gvs-needs-picture" download target="_blank">${(0,hl.Qt)(dd.sA)} ${this._t.gvs.share_image}</a>\n\t\t\t\t<button id="gvs-share-url" data-copy="true" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">${(0,hl.Qt)(pd.jP)} ${this._t.gvs.share_page}</button>\n\t\t\t\t<button id="gvs-share-print" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">${(0,hl.Qt)(qu.Jx)} ${this._t.gvs.share_print}</button>\n\t\t\t</div>\n\t\t\t<h4>\n\t\t\t\t${(0,hl.Qt)(Sc.e5)} ${this._t.gvs.share_embed}\n\t\t\t\t<a href="https://docs.panoramax.fr/web-viewer/03_URL_settings/"\n\t\t\t\t\ttitle="${this._t.gvs.share_embed_docs}"\n\t\t\t\t\ttarget="_blank"\n\t\t\t\t\tstyle="vertical-align: middle">\n\t\t\t\t\t${(0,hl.Qt)(ld.faCircleInfo)}\n\t\t\t\t</a>\n\t\t\t</h4>\n\t\t\t<div class="gvs-input-btn">\n\t\t\t\t<textarea id="gvs-share-iframe" readonly></textarea>\n\t\t\t\t<button data-input="gvs-share-iframe">${(0,hl.Qt)(pd.jP)} ${this._t.gvs.copy}</button>\n\t\t\t</div>\n\t\t\t<h4 class="gvs-hidden gvs-needs-picture">${(0,hl.Qt)(Nu.hp)} ${this._t.gvs.edit_osm}</h4>\n\t\t\t<div class="gvs-input-btn gvs-hidden gvs-needs-picture" style="justify-content: center">\n\t\t\t\t<a id="gvs-edit-id" class="gvs-link-btn" target="_blank">${(0,hl.Qt)(ud.gK)} ${this._t.gvs.id}</a>\n\t\t\t\t<button id="gvs-edit-josm" title="${this._t.gvs.josm_live}">${(0,hl.Qt)(ih.hU)} ${this._t.gvs.josm}</button>\n\t\t\t</div>\n\t\t`,(0,hl.wj)("gvs-widget-share","main-bottom-right",this,[ll,cl],["gvs-group-large","gvs-group-btnpanel","gvs-mobile-hidden","gvs-print-hidden"]);const dl=document.getElementById("gvs-share-links"),pl=document.getElementById("gvs-share-image"),fl=document.getElementById("gvs-share-url");if(this._viewer._api.getRSSURL()){const F=document.createElement("a");F.id="gvs-share-rss",F.classList.add("gvs-link-btn"),F.setAttribute("target","_blank"),F.setAttribute("title",this._t.gvs.share_rss_title),F.appendChild((0,hl.fa)(hd.zb)),F.appendChild(document.createTextNode(this._t.gvs.share_rss)),dl.insertBefore(F,fl)}this._viewer.addEventListener("psv:picture-loaded",(()=>{var F,Da;const ll=this._viewer.psv.getPictureMetadata();pl.href=null===ll||void 0===ll||null===(F=ll.panorama)||void 0===F?void 0:F.hdUrl;document.getElementById("gvs-share-license").innerHTML=null!==ll&&void 0!==ll&&null!==(Da=ll.caption)&&void 0!==Da&&Da.license?this._t.gvs.legend_license.replace("{l}",ll.caption.license):"";const hl=cl.getElementsByClassName("gvs-needs-picture");for(let cl=0;cl<hl.length;cl++){const F=hl[cl];ll?F.classList.remove("gvs-hidden"):F.classList.add("gvs-hidden")}}));const updateLinks=F=>{var Da,ll,hl;const dl=(null===F||void 0===F||null===(Da=F.detail)||void 0===Da?void 0:Da.url)||window.location.href.replace(/\/$/,""),pl=this._options.iframeBaseURL?this._options.iframeBaseURL+window.location.hash:dl,fl=cl.querySelector("#gvs-share-url"),Al=cl.querySelector("#gvs-share-iframe"),bl=cl.querySelector("#gvs-edit-id"),kl=cl.querySelector("#gvs-share-rss");fl.setAttribute("data-copy",(null===(ll=this._viewer)||void 0===ll||null===(hl=ll._hash)||void 0===hl?void 0:hl.getShortLink(dl))||dl),Al.innerText=`<iframe src="${pl}" style="border: none; width: 500px; height: 300px"></iframe>`;const Dl=this._viewer.psv.getPictureMetadata();if(Dl){const F={map:`19/${Dl.gps[1]}/${Dl.gps[0]}`,source:"Panoramax",photo_overlay:"panoramax",photo:`panoramax/${Dl.id}`};bl.setAttribute("href",`${this._options.editIdUrl}#${new URLSearchParams(F).toString()}`)}var Wl,Ql;kl&&kl.setAttribute("href",this._viewer._api.getRSSURL(null===(Wl=this._viewer)||void 0===Wl||null===(Ql=Wl.map)||void 0===Ql?void 0:Ql.getBounds()))};updateLinks(),this._viewer.addEventListener("ready",updateLinks,{once:!0}),null===(F=this._viewer)||void 0===F||null===(Da=F._hash)||void 0===Da||Da.addEventListener("url-changed",updateLinks),(0,hl.$c)(cl,this._viewer._t);const Al=cl.querySelector("#gvs-edit-josm");Al.addEventListener("click",(()=>{Al.classList.contains("gvs-btn-active")?this._viewer.toggleJOSMLive(!1):this._viewer.toggleJOSMLive(!0).catch((F=>{console.warn(F),alert(this._t.gvs.error_josm)}))})),this._viewer.addEventListener("josm-live-enabled",(()=>Al.classList.add("gvs-btn-active"))),this._viewer.addEventListener("josm-live-disabled",(()=>Al.classList.remove("gvs-btn-active")));cl.querySelector("#gvs-share-print").addEventListener("click",window.print.bind(window))}}},7325:(F,Da)=>{"use strict";var ll="star",cl=[11088,61446],hl="f005",dl="M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z";Da.mw={prefix:"far",iconName:ll,icon:[576,512,cl,hl,dl]},Da.yy=Da.mw},6069:(F,Da)=>{"use strict";var ll="arrow-right",cl=[8594],hl="f061",dl="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.dm=Da.mw},4881:(F,Da)=>{"use strict";var ll=[61946],cl="M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256l0 32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32l0 80 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z";Da.mw={prefix:"fas",iconName:"at",icon:[512,512,ll,"40",cl]},Da.Hz=Da.mw},1705:(F,Da)=>{"use strict";var ll="backward",cl=[9194],hl="f04a",dl="M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-320c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3l0 41.7 0 41.7L459.5 440.6zM256 352l0-96 0-128 0-32c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.TH=Da.mw},9186:(F,Da)=>{"use strict";var ll="calendar",cl=[128197,128198],hl="f133",dl="M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.ok=Da.mw},99:(F,Da)=>{"use strict";var ll="camera",cl=[62258,"camera-alt"],hl="f030",dl="M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.rw=Da.mw},174:(F,Da)=>{"use strict";var ll="check",cl=[10003,10004],hl="f00c",dl="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.e6=Da.mw},2593:(F,Da)=>{"use strict";var ll="chevron-down",cl=[],hl="f078",dl="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.Jt=Da.mw},4011:(F,Da)=>{"use strict";var ll="circle-exclamation",cl=["exclamation-circle"],hl="f06a",dl="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.lE=Da.mw},7516:(F,Da)=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var ll="circle-info",cl=["info-circle"],hl="f05a",dl="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z";Da.definition={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.faCircleInfo=Da.definition,Da.prefix="fas",Da.iconName=ll,Da.width=512,Da.height=512,Da.ligatures=cl,Da.unicode=hl,Da.svgPathData=dl,Da.aliases=cl},3444:(F,Da)=>{"use strict";var ll="circle-notch",cl=[],hl="f1ce",dl="M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.s4=Da.mw},9564:(F,Da)=>{"use strict";var ll="circle-question",cl=[62108,"question-circle"],hl="f059",dl="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.AP=Da.mw},4162:(F,Da)=>{"use strict";var ll="cloud-arrow-down",cl=[62337,"cloud-download","cloud-download-alt"],hl="f0ed",dl="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.sA=Da.mw},2975:(F,Da)=>{"use strict";var ll="comment-dots",cl=[128172,62075,"commenting"],hl="f4ad",dl="M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.Be=Da.mw},4189:(F,Da)=>{"use strict";var ll="copy",cl=[],hl="f0c5",dl="M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.jP=Da.mw},7172:(F,Da)=>{"use strict";var ll="earth-europe",cl=["globe-europe"],hl="f7a2",dl="M266.3 48.3L232.5 73.6c-5.4 4-8.5 10.4-8.5 17.1l0 9.1c0 6.8 5.5 12.3 12.3 12.3c2.4 0 4.8-.7 6.8-2.1l41.8-27.9c2-1.3 4.4-2.1 6.8-2.1l1 0c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8l-19.9 19.9c-5.8 5.8-12.9 10.2-20.7 12.8l-26.5 8.8c-5.8 1.9-9.6 7.3-9.6 13.4c0 3.7-1.5 7.3-4.1 10l-17.9 17.9c-6.4 6.4-9.9 15-9.9 24l0 4.3c0 16.4 13.6 29.7 29.9 29.7c11 0 21.2-6.2 26.1-16l4-8.1c2.4-4.8 7.4-7.9 12.8-7.9c4.5 0 8.7 2.1 11.4 5.7l16.3 21.7c2.1 2.9 5.5 4.5 9.1 4.5c8.4 0 13.9-8.9 10.1-16.4l-1.1-2.3c-3.5-7 0-15.5 7.5-18l21.2-7.1c7.6-2.5 12.7-9.6 12.7-17.6c0-10.3 8.3-18.6 18.6-18.6l29.4 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-20.7 0c-7.2 0-14.2 2.9-19.3 8l-4.7 4.7c-2.1 2.1-3.3 5-3.3 8c0 6.2 5.1 11.3 11.3 11.3l11.3 0c6 0 11.8 2.4 16 6.6l6.5 6.5c1.8 1.8 2.8 4.3 2.8 6.8s-1 5-2.8 6.8l-7.5 7.5C386 262 384 266.9 384 272s2 10 5.7 13.7L408 304c10.2 10.2 24.1 16 38.6 16l7.3 0c6.5-20.2 10-41.7 10-64c0-111.4-87.6-202.4-197.7-207.7zm172 307.9c-3.7-2.6-8.2-4.1-13-4.1c-6 0-11.8-2.4-16-6.6L396 332c-7.7-7.7-18-12-28.9-12c-9.7 0-19.2-3.5-26.6-9.8L314 287.4c-11.6-9.9-26.4-15.4-41.7-15.4l-20.9 0c-12.6 0-25 3.7-35.5 10.7L188.5 301c-17.8 11.9-28.5 31.9-28.5 53.3l0 3.2c0 17 6.7 33.3 18.7 45.3l16 16c8.5 8.5 20 13.3 32 13.3l21.3 0c13.3 0 24 10.7 24 24c0 2.5 .4 5 1.1 7.3c71.3-5.8 132.5-47.6 165.2-107.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM187.3 100.7c-6.2-6.2-16.4-6.2-22.6 0l-32 32c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l32-32c6.2-6.2 6.2-16.4 0-22.6z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.YS=Da.mw},6533:(F,Da)=>{"use strict";var ll="ellipsis-vertical",cl=["ellipsis-v"],hl="f142",dl="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z";Da.mw={prefix:"fas",iconName:ll,icon:[128,512,cl,hl,dl]},Da.nx=Da.mw},5431:(F,Da)=>{"use strict";var ll="forward",cl=[9193],hl="f04e",dl="M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416L0 96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4L224 214.3l0 41.7 0 41.7L52.5 440.6zM256 352l0-96 0-128 0-32c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4s-18.4-16.6-18.4-29l0-64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.vF=Da.mw},8739:(F,Da)=>{"use strict";var ll="gear",cl=[9881,"cog"],hl="f013",dl="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.BH=Da.mw},5279:(F,Da)=>{"use strict";var ll="image",cl=[],hl="f03e",dl="M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.jb=Da.mw},6668:(F,Da,ll)=>{"use strict";var cl=ll(7516);Da.mw={prefix:cl.prefix,iconName:cl.iconName,icon:[cl.width,cl.height,cl.aliases,cl.unicode,cl.svgPathData]},Da.iW=Da.mw,cl.prefix,cl.iconName,cl.width,cl.height,cl.aliases,cl.unicode,cl.svgPathData,cl.aliases},4220:(F,Da)=>{"use strict";var ll="layer-group",cl=[],hl="f5fd",dl="M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z";Da.mw={prefix:"fas",iconName:ll,icon:[576,512,cl,hl,dl]},Da.qI=Da.mw},325:(F,Da)=>{"use strict";var ll="lightbulb",cl=[128161],hl="f0eb",dl="M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.rC=Da.mw},7964:(F,Da)=>{"use strict";var ll="link",cl=[128279,"chain"],hl="f0c1",dl="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.CQ=Da.mw},3520:(F,Da)=>{"use strict";var ll="location-dot",cl=["map-marker-alt"],hl="f3c5",dl="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.gK=Da.mw},7761:(F,Da)=>{"use strict";var ll="magnifying-glass",cl=[128269,"search"],hl="f002",dl="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.$U=Da.mw},2e3:(F,Da)=>{"use strict";var ll=[128506,62072],cl="f279",hl="M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z";Da.mw={prefix:"fas",iconName:"map",icon:[576,512,ll,cl,hl]},Da.e5=Da.mw},3233:(F,Da)=>{"use strict";var ll="medal",cl=[127941],hl="f5a2",dl="M4.1 38.2C1.4 34.2 0 29.4 0 24.6C0 11 11 0 24.6 0L133.9 0c11.2 0 21.7 5.9 27.4 15.5l68.5 114.1c-48.2 6.1-91.3 28.6-123.4 61.9L4.1 38.2zm503.7 0L405.6 191.5c-32.1-33.3-75.2-55.8-123.4-61.9L350.7 15.5C356.5 5.9 366.9 0 378.1 0L487.4 0C501 0 512 11 512 24.6c0 4.8-1.4 9.6-4.1 13.6zM80 336a176 176 0 1 1 352 0A176 176 0 1 1 80 336zm184.4-94.9c-3.4-7-13.3-7-16.8 0l-22.4 45.4c-1.4 2.8-4 4.7-7 5.1L168 298.9c-7.7 1.1-10.7 10.5-5.2 16l36.3 35.4c2.2 2.2 3.2 5.2 2.7 8.3l-8.6 49.9c-1.3 7.6 6.7 13.5 13.6 9.9l44.8-23.6c2.7-1.4 6-1.4 8.7 0l44.8 23.6c6.9 3.6 14.9-2.2 13.6-9.9l-8.6-49.9c-.5-3 .5-6.1 2.7-8.3l36.3-35.4c5.6-5.4 2.5-14.8-5.2-16l-50.1-7.3c-3-.4-5.7-2.4-7-5.1l-22.4-45.4z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.B9=Da.mw},7290:(F,Da)=>{"use strict";var ll="minus",cl=[8211,8722,10134,"subtract"],hl="f068",dl="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.EZ=Da.mw},8629:(F,Da)=>{"use strict";var ll="palette",cl=[127912],hl="f53f",dl="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.fy=Da.mw},9683:(F,Da)=>{"use strict";var ll="panorama",cl=[],hl="e209",dl="M45.6 32C20.4 32 0 52.4 0 77.6L0 434.4C0 459.6 20.4 480 45.6 480c5.1 0 10-.8 14.7-2.4C74.6 472.8 177.6 440 320 440s245.4 32.8 259.6 37.6c4.7 1.6 9.7 2.4 14.7 2.4c25.2 0 45.6-20.4 45.6-45.6l0-356.7C640 52.4 619.6 32 594.4 32c-5 0-10 .8-14.7 2.4C565.4 39.2 462.4 72 320 72S74.6 39.2 60.4 34.4C55.6 32.8 50.7 32 45.6 32zM96 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm272 0c7.9 0 15.4 3.9 19.8 10.5L512.3 353c5.4 8 5.6 18.4 .4 26.5s-14.7 12.3-24.2 10.7C442.7 382.4 385.2 376 320 376c-65.6 0-123.4 6.5-169.3 14.4c-9.8 1.7-19.7-2.9-24.7-11.5s-4.3-19.4 1.9-27.2L197.3 265c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l26.4 33.1 87-127.6c4.5-6.6 11.9-10.5 19.8-10.5z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.pt=Da.mw},1708:(F,Da)=>{"use strict";var ll="paper-plane",cl=[61913],hl="f1d8",dl="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.is=Da.mw},7472:(F,Da)=>{"use strict";var ll="pause",cl=[9208],hl="f04c",dl="M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z";Da.mw={prefix:"fas",iconName:ll,icon:[320,512,cl,hl,dl]},Da.G1=Da.mw},7321:(F,Da)=>{"use strict";var ll=[128394],cl="f304",hl="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z";Da.mw={prefix:"fas",iconName:"pen",icon:[512,512,ll,cl,hl]},Da.hp=Da.mw},9243:(F,Da)=>{"use strict";var ll="person-biking",cl=[128692,"biking"],hl="f84a",dl="M400 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm27.2 64l-61.8-48.8c-17.3-13.6-41.7-13.8-59.1-.3l-83.1 64.2c-30.7 23.8-28.5 70.8 4.3 91.6L288 305.1 288 416c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128c0-10.7-5.3-20.7-14.2-26.6L295 232.9l60.3-48.5L396 217c5.7 4.5 12.7 7 20 7l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-52.8 0zM56 384a72 72 0 1 1 144 0A72 72 0 1 1 56 384zm200 0A128 128 0 1 0 0 384a128 128 0 1 0 256 0zm184 0a72 72 0 1 1 144 0 72 72 0 1 1 -144 0zm200 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.rO=Da.mw},6386:(F,Da)=>{"use strict";var ll="play",cl=[9654],hl="f04b",dl="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.ij=Da.mw},1372:(F,Da)=>{"use strict";var ll="plus",cl=[10133,61543,"add"],hl="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,"2b",hl]},Da.QL=Da.mw},501:(F,Da)=>{"use strict";var ll="print",cl=[128424,128438,9113],hl="f02f",dl="M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.Jx=Da.mw},7744:(F,Da)=>{"use strict";var ll="rocket",cl=[],hl="f135",dl="M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2l0 82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9l0-107.2c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.KM=Da.mw},6787:(F,Da)=>{"use strict";var ll="satellite-dish",cl=[128225],hl="f7c0",dl="M192 32c0-17.7 14.3-32 32-32C383.1 0 512 128.9 512 288c0 17.7-14.3 32-32 32s-32-14.3-32-32C448 164.3 347.7 64 224 64c-17.7 0-32-14.3-32-32zM60.6 220.6L164.7 324.7l28.4-28.4c-.7-2.6-1.1-5.4-1.1-8.3c0-17.7 14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32c-2.9 0-5.6-.4-8.3-1.1l-28.4 28.4L291.4 451.4c14.5 14.5 11.8 38.8-7.3 46.3C260.5 506.9 234.9 512 208 512C93.1 512 0 418.9 0 304c0-26.9 5.1-52.5 14.4-76.1c7.5-19 31.8-21.8 46.3-7.3zM224 96c106 0 192 86 192 192c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-70.7-57.3-128-128-128c-17.7 0-32-14.3-32-32s14.3-32 32-32z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.hU=Da.mw},1260:(F,Da)=>{"use strict";var ll="share-nodes",cl=["share-alt"],hl="f1e0",dl="M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.ek=Da.mw},1904:(F,Da)=>{"use strict";var ll="sliders",cl=["sliders-h"],hl="f1de",dl="M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da._$=Da.mw},3095:(F,Da)=>{"use strict";var ll="square-rss",cl=["rss-square"],hl="f143",dl="M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM96 136c0-13.3 10.7-24 24-24c137 0 248 111 248 248c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-110.5-89.5-200-200-200c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24c83.9 0 152 68.1 152 152c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-57.4-46.6-104-104-104c-13.3 0-24-10.7-24-24zm0 120a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.zb=Da.mw},4780:(F,Da)=>{"use strict";var ll="star",cl=[11088,61446],hl="f005",dl="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z";Da.mw={prefix:"fas",iconName:ll,icon:[576,512,cl,hl,dl]},Da.yy=Da.mw},6311:(F,Da)=>{"use strict";var ll="triangle-exclamation",cl=[9888,"exclamation-triangle","warning"],hl="f071",dl="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.JA=Da.mw},7879:(F,Da)=>{"use strict";var ll="user",cl=[128100,62144],hl="f007",dl="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.X4=Da.mw},6627:(F,Da)=>{"use strict";var ll="xmark",cl=[128473,10005,10006,10060,215,"close","multiply","remove","times"],hl="f00d",dl="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.Jy=Da.mw},1545:(F,Da,ll)=>{"use strict";ll.d(Da,{AZ:()=>od,GR:()=>Op,IJ:()=>Up,Qw:()=>Rp,TL:()=>am,Wp:()=>Lu,aH:()=>dl,e6:()=>zu,jM:()=>Um,rx:()=>ld,uj:()=>jp,zY:()=>sm});var cl=ll(9408),hl=Object.defineProperty,__export=(F,Da)=>{for(var ll in Da)hl(F,ll,{get:Da[ll],enumerable:!0})},dl={};
12
+ !function(F,Da){"object"===typeof exports&&"object"===typeof module?module.exports=Da():"function"===typeof define&&define.amd?define("Panoramax",[],Da):"object"===typeof exports?exports.Panoramax=Da():F.Panoramax=Da()}(this,(()=>(()=>{var F={9555:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Editor});ll(980);var cl=ll(6803),hl=ll(1951),dl=ll(8489),pl=ll(7534),fl=ll(6810),Al=ll(5071),bl=ll(1300),kl=ll(1545);const Dl="sequence-headings";class Editor extends cl.A{constructor(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(F,Da,Object.assign(ll,{users:[]})),this._selectedSeqId||this._loader.dismiss({},"No sequence is selected"),this.psvContainer=document.createElement("div"),this.mapContainer=document.createElement("div"),this.container.appendChild(this.psvContainer),this.container.appendChild(this.mapContainer);try{this.psv=new dl.Ay(this,this.psvContainer),this.psv._myVTour.datasource.nodeResolver=this._getNode.bind(this)}catch(cl){let F=kl.IJ.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(cl,F)}this._api.onceReady().then((()=>{try{this.map=new hl.A(this,this.mapContainer,{raster:ll.raster,background:ll.background,supplementaryStyle:this._createMapStyle(),zoom:15}),(0,Al.I0)(this),this._loadSequence(),this.map.once("load",(()=>{ll.raster&&this._addMapBackgroundWidget(),this._bindPicturesEvents()}));const F=this.map._picMarker.setRotation.bind(this.map._picMarker);this.map._picMarker.setRotation=Da=>(Da=void 0===this._lastRelHeading?Da:Da+this._lastRelHeading-this.psv.getPictureRelativeHeading(),F(Da))}catch(cl){this._loader.dismiss(cl,this._t.gvs.error_psv)}})),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Editor"}_createMapStyle(){return{sources:{geovisio_editor_sequences:{type:"geojson",data:{type:"FeatureCollection",features:[]}}},layers:[{id:"geovisio_editor_sequences",type:"line",source:"geovisio_editor_sequences",layout:{...bl.VM.SEQUENCES.layout},paint:{...bl.VM.SEQUENCES.paint}},{id:"geovisio_editor_pictures",type:"circle",source:"geovisio_editor_sequences",layout:{...bl.VM.PICTURES.layout},paint:{...bl.VM.PICTURES.paint}}]}}_bindPicturesEvents(){this.map.on("mousemove","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor="pointer"})),this.map.on("mouseleave","geovisio_editor_pictures",(()=>{this.map.getCanvas().style.cursor=""})),this.map.on("click","geovisio_editor_pictures",this.map._onPictureClick.bind(this.map))}_loadSequence(){return this._api.getSequenceItems(this._selectedSeqId).then((F=>{if(this.map.once("sourcedata",(()=>{this.map.setPaintProperty("geovisio_editor_sequences","line-color",this.map._getLayerColorStyle("sequences")),this.map.setPaintProperty("geovisio_editor_pictures","circle-color",this.map._getLayerColorStyle("pictures")),this.map.setLayoutProperty("geovisio_editor_sequences","visibility","visible"),this.map.setLayoutProperty("geovisio_editor_pictures","visibility","visible"),this.map.once("styledata",(()=>this._loader.dismiss()))})),this._sequenceData=F.features,this.map.getSource("geovisio_editor_sequences").setData({type:"FeatureCollection",features:[{type:"Feature",properties:{id:this._selectedSeqId},geometry:{type:"LineString",coordinates:F.features.map((F=>F.geometry.coordinates))}},...F.features.map((F=>(F.properties.id=F.id,F.properties.sequences=[this._selectedSeqId],F)))]}),this._selectedPicId){const Da=F.features.find((F=>F.id===this._selectedPicId));Da?(this.select(this._selectedSeqId,this._selectedPicId,!0),this.map.jumpTo({center:Da.geometry.coordinates,zoom:18})):console.log("Picture with ID",Da,"was not found")}else{const Da=[...F.features[0].geometry.coordinates,...F.features[0].geometry.coordinates];for(let ll=1;ll<F.features.length;ll++){const cl=F.features[ll].geometry.coordinates;cl[0]<Da[0]&&(Da[0]=cl[0]),cl[1]<Da[1]&&(Da[1]=cl[1]),cl[0]>Da[2]&&(Da[2]=cl[0]),cl[1]>Da[3]&&(Da[3]=cl[1])}this.map.fitBounds(Da,{animate:!1})}})).catch((F=>this._loader.dismiss(F,this._t.gvs.error_api)))}_getNode(F){const Da=this._sequenceData.find((Da=>Da.properties.id===F)),ll=Da?(0,Al.rs)(Da,this._t,this._isInternetFast):null;return ll&&delete ll.links,ll}_addMapBackgroundWidget(){const F=document.createElement("div");F.id="gvs-map-bg",F.classList.add("gvs-panel","gvs-widget-bg","gvs-input-group");const onBgChange=F=>this.map.setBackground(F.target.value),Da=document.createElement("input");Da.id="gvs-map-bg-streets",Da.setAttribute("type","radio"),Da.setAttribute("name","gvs-map-bg"),Da.setAttribute("value","streets"),Da.addEventListener("change",onBgChange),F.appendChild(Da);const ll=document.createElement("label");ll.setAttribute("for",Da.id);const cl=document.createElement("img");cl.src=fl,cl.alt="",ll.appendChild(cl),ll.appendChild(document.createTextNode(this._t.gvs.map_background_streets)),F.appendChild(ll);const hl=document.createElement("input");hl.id="gvs-map-bg-aerial",hl.setAttribute("type","radio"),hl.setAttribute("name","gvs-map-bg"),hl.setAttribute("value","aerial"),hl.addEventListener("change",onBgChange),F.appendChild(hl);const dl=document.createElement("label");dl.setAttribute("for",hl.id);const Al=document.createElement("img");Al.src=pl,Al.alt="",dl.appendChild(Al),dl.appendChild(document.createTextNode(this._t.gvs.map_background_aerial)),F.appendChild(dl),this.mapContainer.appendChild(F);const onMapBgChange=F=>{"aerial"===F?hl.checked=!0:Da.checked=!0};this.addEventListener("map:background-changed",(F=>onMapBgChange(F.detail.background))),onMapBgChange(this.map.getBackground())}previewSequenceHeadingChange(F){const Da=void 0!==this.map.getLayer(Dl);if(this.map._picMarkerPreview.remove(),void 0===F)return delete this._lastRelHeading,Da&&this.map.setLayoutProperty(Dl,"visibility","none"),void(this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x));this._lastRelHeading=F,Da||this.map.addLayer({id:Dl,type:"symbol",source:"geovisio_editor_sequences",layout:{"icon-image":"gvs-marker","icon-overlap":"always","icon-size":.8}});const ll=-this.psv.getPictureRelativeHeading();this.map.setLayoutProperty(Dl,"visibility","visible"),this.map.setLayoutProperty(Dl,"icon-rotate",["+",["get","view:azimuth"],ll,F]);const cl=[["==",["geometry-type"],"Point"]];this._selectedPicId&&cl.push(["!=",["get","id"],this._selectedPicId]),this.map.setFilter(Dl,["all",...cl]),this._selectedPicId&&this.map._picMarker.setRotation(this.psv.getXY().x)}_onSelect(){void 0!==this._lastRelHeading&&this.previewSequenceHeadingChange(this._lastRelHeading)}}},7531:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>fl});var cl=ll(6803),hl=ll(1951),dl=ll(1300),pl=ll(927);class StandaloneMap extends cl.A{constructor(F,Da){super(F,Da,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),this.mapContainer=document.createElement("div"),this.container.appendChild(this.mapContainer),this._api.onceReady().then((()=>this._initMap())),this.addEventListener("map:picture-click",(F=>this.select(F.detail.seqId,F.detail.picId))),this.addEventListener("map:sequence-click",(F=>this.select(F.detail.seqId))),this.addEventListener("select",this._onSelect.bind(this))}getClassName(){return"Map"}destroy(){super.destroy(),this.map.destroy(),delete this.map,this.mapContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((F=>F.startsWith("gvs"))))}_initMap(){this._options.hash=!0;class MyMap extends hl.A{_getLayerStyleProperties(F){return"pictures_symbols"===F?{layout:{visibility:"none"}}:super._getLayerStyleProperties(F)}}this.map=new MyMap(this,this.mapContainer,this._options),this.map.addControl(new pl.NavigationControl({showCompass:!1})),this.map.waitForEnoughMapLoaded().then((()=>{this.map.reloadLayersStyles(),this._loader.dismiss()}))}_onSelect(F){if(F.detail.picId||F.detail.seqId){const Da=F.detail.picId?"pictures":"sequences",ll=this.map.queryRenderedFeatures({layers:[...this.map._userLayers].map((F=>(0,dl.IN)(F,Da))),filter:["==",["get","id"],F.detail.picId||F.detail.seqId]});ll.length>=0&&null!=ll[0]&&this.map._attachPreviewToPictures({features:ll},Da)}}}const fl=StandaloneMap},2968:(F,Da,ll)=>{"use strict";ll.d(Da,{$p:()=>Ql,Ay:()=>Viewer,LM:()=>Al.LM,Vf:()=>Al.Vf});ll(2101);var cl=ll(1545),hl=ll(490),dl=ll(9194),pl=ll(5071),fl=ll(6803),Al=ll(8489),bl=ll(1951),kl=ll(1300),Dl=ll(4683),Wl=ll(6627);const Ql=20,wc=Math.PI/6,Sc=100,eu="http://127.0.0.1:8111",iu={DEFAULT:"default",AGE:"age",TYPE:"type",SCORE:"score"};class Viewer extends fl.A{constructor(F,Da){var ll;let pl,fl=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(F,Da,fl),null==this._options.map&&(this._options.map={}),null==this._options.widgets&&(this._options.widgets={}),this._sequencePlaying=!1,this._prevSequence=null,this._mapTheme=(null===fl||void 0===fl||null===(ll=fl.map)||void 0===ll?void 0:ll.theme)||iu.DEFAULT,this._picNav=(null===fl||void 0===fl?void 0:fl.picturesNavigation)||"any",this._options.testing)return;if(!0===this._options.hash||void 0===this._options.hash){if(this._hash=new dl.A(this),pl=this._hash._getCurrentHash(),"none"===pl.map&&(this._options.map=!1),"object"===typeof this._options.map&&(this._options.map.hash=!1),this._options.map&&pl.focus&&(this._options.map.startWide="map"===pl.focus),this._options.map&&pl.background&&(this._options.map.background=pl.background),this._options.map&&pl.users&&(this._options.users=[...new Set(pl.users.split(","))]),pl.xyz){const F=this._hash.getXyzOptionsFromHashString(pl.xyz);this.addEventListener("psv:picture-loaded",(()=>{this.psv.setXYZ(F.x,F.y,F.z)}),{once:!0})}if(this._options.map&&"string"===typeof pl.map){const F=this._hash.getMapOptionsFromHashString(pl.map);F&&(this._options.map=Object.assign({},this._options.map,F))}if(this._options.map&&this.setFilters(this._hash.getMapFiltersFromHashVals(pl),!0),pl.pic){const F=pl.pic.split(";");F.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._options.selectedPicture=F[0]}"string"===typeof pl.speed&&(this._options.transition=parseInt(pl.speed)),pl.nav&&(this._picNav=pl.nav)}this._initContainerStructure();try{this.psv=new Al.Ay(this,this.psvContainer,{transitionDuration:this._options.transition,shouldGoFast:this._psvShouldGoFast.bind(this),keyboard:"always",keyboardActions:{...cl.zY.keyboardActions,8:"ROTATE_UP",2:"ROTATE_DOWN",4:"ROTATE_LEFT",6:"ROTATE_RIGHT",PageUp:()=>this.psv.goToNextPicture(),9:()=>this.psv.goToNextPicture(),PageDown:()=>this.psv.goToPrevPicture(),3:()=>this.psv.goToPrevPicture(),5:()=>this.moveCenter(),"*":()=>this.moveCenter(),Home:()=>this.toggleFocus(),7:()=>this.toggleFocus(),End:()=>this.toggleUnfocusedVisible(),1:()=>this.toggleUnfocusedVisible()," ":()=>this.toggleSequencePlaying(),0:()=>this.toggleSequencePlaying()}}),this.psv.addEventListener("dblclick",(()=>{this.map&&this.isMapWide()&&this.setFocus("pic")}))}catch(bl){let F=cl.IJ.isWebGLSupported?this._t.gvs.error_psv:this._t.gvs.error_webgl;this._loader.dismiss(bl,F)}const onceStuffReady=()=>{this._widgets=new hl.A(this,this._options.widgets),this.map&&!this._options.selectedPicture&&this.setUnfocusedVisible(!1),this._options.selectedPicture?(this.select(null,this._options.selectedPicture,!0),this.addEventListener("psv:picture-loaded",(()=>{var F,Da,ll,cl,hl;!this._selectedSeqId&&null!==(F=this.psv)&&void 0!==F&&null!==(Da=F._myVTour)&&void 0!==Da&&null!==(ll=Da.getCurrentNode())&&void 0!==ll&&null!==(cl=ll.sequence)&&void 0!==cl&&cl.id&&this.select(this.psv._myVTour.getCurrentNode().sequence.id,this._options.selectedPicture),this.map&&this._options.map&&this.map.jumpTo(this._options.map),"meta"===(null===(hl=pl)||void 0===hl?void 0:hl.focus)&&this._widgets._showPictureMetadataPopup(),this._loader.dismiss()}),{once:!0})):this._loader.dismiss(),this._options.position&&this.goToPosition(...this._options.position).catch((F=>this._loader.dismiss(F,this._t.gvs.error_nopic))),this._hash&&this.map&&(this.map._attribution._container.classList.add("gvs-hidden"),this._hash.bindMapEvents(),this._mapFilters&&this.setFilters(this._mapFilters,!0),pl.users&&Promise.all(this.map.getVisibleUsers().filter((F=>"geovisio"!=F)).map((F=>this._api.getUserName(F)))).then((F=>{F=F.filter((F=>null!=F)).join(", ");const Da=document.getElementById("gvs-filter-search-user").querySelector("input");Da&&(Da.setItem(F),Da.parentNode.classList.add("gvs-filter-active"))})).catch((F=>console.warn("Error when looking up for user names",F)))),document.addEventListener("keyup",(F=>{"Escape"!==F.key||this.popupContainer.classList.contains("gvs-hidden")||this.setPopup(!1)}))};this._api.onceReady().then((()=>{this._options.map?(void 0===this._options.map.doubleClickZoom&&(this._options.map.doubleClickZoom=!1),this._initMap().then(onceStuffReady).catch((F=>this._loader.dismiss(F,this._t.gvs.error_api_compatibility)))):onceStuffReady()}))}getClassName(){return"Viewer"}destroy(){super.destroy(),this._widgets.destroy(),delete this._widgets,this._hash.destroy(),delete this._hash,this.map&&this.map.destroy(),delete this.map,delete this._mapFilters,this.psv.destroy(),delete this.psv,this.miniContainer.remove(),this.mainContainer.remove(),this.mapContainer.remove(),this.psvContainer.remove(),this.popupContainer.remove(),this.container.innerHTML="",this.container.classList.remove(...[...this.container.classList].filter((F=>F.startsWith("gvs"))))}_initContainerStructure(){this.miniContainer=document.createElement("div"),this.miniContainer.classList.add("gvs-mini"),this.mainContainer=document.createElement("div"),this.mainContainer.classList.add("gvs-main"),this.popupContainer=document.createElement("div"),this.popupContainer.classList.add("gvs-popup","gvs-hidden"),this.psvContainer=document.createElement("div"),this.mainContainer.appendChild(this.psvContainer),this.mapContainer=document.createElement("div"),this.miniContainer.appendChild(this.mapContainer),this.container.appendChild(this.mainContainer),this.container.appendChild(this.miniContainer),this.container.appendChild(this.popupContainer)}async _initMap(){await new Promise((F=>{this.map=new bl.A(this,this.mapContainer,this._options.map),this.map._getLayerColorStyle=this._getLayerColorStyle.bind(this),this.map._getLayerSortStyle=this._getLayerSortStyle.bind(this),this.addEventListener("map:users-changed",F,{once:!0}),this.container.classList.add("gvs-has-mini"),this.map.on("dblclick",(()=>{this.isMapWide()?this.select():this.setFocus("map")})),"object"===typeof this._options.map&&this._options.map.startWide?this.setFocus("map",!0):this.setFocus("pic",!0)})),this._initMapKeyboardHandler(),(0,pl.I0)(this)}_initMapKeyboardHandler(){const F=this;this.map.keyboard.keydown=function(Da){if(Da.altKey||Da.ctrlKey||Da.metaKey)return;switch(Da.key){case"*":case"5":return void F.moveCenter();case"PageUp":case"9":return void F.psv.goToNextPicture();case"PageDown":case"3":return void F.psv.goToPrevPicture();case"Home":case"7":return Da.stopPropagation(),void F.toggleFocus();case"End":case"1":return void F.toggleUnfocusedVisible();case" ":case"0":return void F.toggleSequencePlaying()}let ll=0,cl=0,hl=0,dl=0,pl=0;switch(Da.keyCode){case 61:case 107:case 171:case 187:ll=1;break;case 189:case 109:case 173:ll=-1;break;case 37:case 100:Da.shiftKey?cl=-1:(Da.preventDefault(),dl=-1);break;case 39:case 102:Da.shiftKey?cl=1:(Da.preventDefault(),dl=1);break;case 38:case 104:Da.shiftKey?hl=1:(Da.preventDefault(),pl=-1);break;case 40:case 98:Da.shiftKey?hl=-1:(Da.preventDefault(),pl=1);break;default:return}return this._rotationDisabled&&(cl=0,hl=0),{cameraAnimation:F=>{const fl=this._tr;F.easeTo({duration:300,easeId:"keyboardHandler",easing:F=>F*(2-F),zoom:ll?Math.round(fl.zoom)+ll*(Da.shiftKey?2:1):fl.zoom,bearing:fl.bearing+cl*this._bearingStep,pitch:fl.pitch+hl*this._pitchStep,offset:[-dl*this._panStep,-pl*this._panStep],center:fl.center},{originalEvent:Da})}}}.bind(this.map.keyboard)}_psvShouldGoFast(){return this._sequencePlaying&&this.psv.getTransitionDuration()<1e3||this.map&&this.isMapWide()}refreshPSV(){var F;const Da=this.psv._myVTour.getCurrentNode();if(Da&&Da.panorama.baseUrl!==(null===Da||void 0===Da||null===(F=Da.panorama)||void 0===F?void 0:F.origBaseUrl)){const F=this.psv.getZoomLevel(),ll=this.psv.getPosition();this.psv._myVTour.state.currentNode=null,this.psv._myVTour.setCurrentNode(Da.id,{zoomTo:F,rotateTo:ll,fadeIn:!1,speed:0,rotation:!1})}Da&&Da.panorama.rows>1&&this.psv.adapter.__refresh()}setPopup(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(F)if(Da){this.psv.stopKeyboardControl(),this.popupContainer.innerHTML="";const F=document.createElement("div");F.classList.add("gvs-popup-backdrop"),F.addEventListener("click",(()=>this.setPopup(!1)));const ll=document.createElement("div");ll.classList.add("gvs-widget-bg"),"string"===typeof Da?ll.innerHTML=Da:Array.isArray(Da)&&Da.forEach((F=>ll.appendChild(F)));const cl=document.createElement("button");cl.id="gvs-popup-btn-close",cl.classList.add("gvs-btn","gvs-widget-bg"),cl.appendChild((0,Dl.fa)(Wl.Jy)),cl.addEventListener("click",(()=>this.setPopup(!1))),ll.insertBefore(cl,ll.firstChild),this.popupContainer.appendChild(F),this.popupContainer.appendChild(ll),this.popupContainer.classList.remove("gvs-hidden"),(0,Dl.$c)(this.popupContainer,this._t)}else this.popupContainer.classList.remove("gvs-hidden");else this.popupContainer.classList.add("gvs-hidden"),this.psv.startKeyboardControl()}playSequence(){this._sequencePlaying=!0;const F=new Event("sequence-playing");this.dispatchEvent(F);const nextPicturePlay=()=>{if(this._sequencePlaying){this.addEventListener("psv:picture-loaded",(()=>{this._playTimer=setTimeout((()=>{nextPicturePlay()}),this.psv.getTransitionDuration())}),{once:!0});try{this.psv.goToNextPicture()}catch(F){this.stopSequence()}}};this.psv.addEventListener("click",(()=>{this.stopSequence()})),nextPicturePlay()}stopSequence(){this._sequencePlaying=!1,this._playTimer&&(clearTimeout(this._playTimer),delete this._playTimer),this.refreshPSV();const F=new Event("sequence-stopped");this.dispatchEvent(F)}isSequencePlaying(){return this._sequencePlaying}toggleSequencePlaying(){this.isSequencePlaying()?this.stopSequence():this.playSequence()}moveCenter(){const F=this.psv.getPictureMetadata();F&&(this.map&&this.isMapWide()?this.map.flyTo({center:F.gps,zoom:20}):this._psvAnimate({speed:Al.LM,yaw:0,pitch:0,zoom:Al.cS}))}moveLeft(){this._moveToDirection("left")}moveRight(){this._moveToDirection("right")}moveUp(){this._moveToDirection("up")}moveDown(){this._moveToDirection("down")}_moveToDirection(F){if(this.map&&this.isMapWide()){let Da;switch(F){case"up":Da=[0,-100];break;case"left":Da=[-100,0];break;case"down":Da=[0,Sc];break;case"right":Da=[Sc,0]}this.map.panBy(Da)}else{let Da=this.psv.getPosition();switch(F){case"up":Da.pitch+=wc;break;case"left":Da.yaw-=wc;break;case"down":Da.pitch-=wc;break;case"right":Da.yaw+=wc}this._psvAnimate({speed:Al.LM,...Da})}}_psvAnimate(F){this._lastPsvAnim&&this._lastPsvAnim.cancel(),this._lastPsvAnim=this.psv.animate(F)}isMapWide(){if(!this.map)throw new Error("Map is not enabled");return this.mapContainer.parentNode==this.mainContainer}_getDatesForLayerColors(){const F=864e5,Da=Date.now();return[Da-30*F,Da-365*F,Da-730*F].map((F=>new Date(F).toISOString().split("T")[0]))}_getLayerColorStyle(F){var Da,ll,cl,hl,dl;const fl=["case",["==",["get","hidden"],!0],pl.lm.HIDDEN],Al=(null===(Da=this.psv._myVTour)||void 0===Da||null===(ll=Da.state)||void 0===ll?void 0:ll.loadingNode)||(null===(cl=this.psv._myVTour)||void 0===cl||null===(hl=cl.state)||void 0===hl||null===(dl=hl.currentNode)||void 0===dl?void 0:dl.id),bl=Al?this.psv._picturesSequences[Al]:null;if("sequences"==F&&bl?fl.push(["==",["get","id"],bl],pl.lm.SELECTED):"pictures"==F&&bl&&fl.push(["in",bl,["get","sequences"]],pl.lm.SELECTED),this._mapTheme==iu.AGE){const Da="sequences"==F?"date":"ts",ll=this._getDatesForLayerColors();fl.push(["!",["has",Da]],pl.lm.BASE,[">=",["get",Da],ll[0]],pl.lm.PALETTE_4,[">=",["get",Da],ll[1]],pl.lm.PALETTE_3,[">=",["get",Da],ll[2]],pl.lm.PALETTE_2,pl.lm.PALETTE_1)}else this._mapTheme==iu.TYPE?fl.push(["!",["has","type"]],pl.lm.BASE,["==",["get","type"],"equirectangular"],pl.lm.QUALI_1,pl.lm.QUALI_2):this._mapTheme==iu.SCORE?fl.push(["==",kl.d3,5],pl.fW[0].color,["==",kl.d3,4],pl.fW[1].color,["==",kl.d3,3],pl.fW[2].color,["==",kl.d3,2],pl.fW[3].color,pl.fW[4].color):fl.push(pl.lm.BASE);return fl}_getLayerSortStyle(F){var Da,ll,cl,hl,dl;const pl=["case",["==",["get","hidden"],!0],90],fl=(null===(Da=this.psv._myVTour)||void 0===Da||null===(ll=Da.state)||void 0===ll?void 0:ll.loadingNode)||(null===(cl=this.psv._myVTour)||void 0===cl||null===(hl=cl.state)||void 0===hl||null===(dl=hl.currentNode)||void 0===dl?void 0:dl.id),Al=fl?this.psv._picturesSequences[fl]:null;if("sequences"==F&&Al?pl.push(["==",["get","id"],Al],100):"pictures"==F&&Al&&pl.push(["in",Al,["get","sequences"]],100),this._mapTheme==iu.AGE){const Da="sequences"==F?"date":"ts",ll=this._getDatesForLayerColors();pl.push(["!",["has",Da]],0,[">=",["get",Da],ll[0]],50,[">=",["get",Da],ll[1]],49,[">=",["get",Da],ll[2]],48)}else this._mapTheme==iu.TYPE?pl.push(["!",["has","type"]],0,["==",["get","type"],"equirectangular"],50):this._mapTheme==iu.SCORE&&pl.push(["==",kl.d3,5],80,["==",kl.d3,4],65,["==",kl.d3,3],50,["==",kl.d3,2],35,["==",kl.d3,1],20);return pl.push(10),pl}getPicturesNavigation(){return this._picNav}setPicturesNavigation(F){this._picNav=F;const Da=new CustomEvent("pictures-navigation-changed",{detail:{value:F}});this.dispatchEvent(Da)}_picturesNavFilter(F){switch(this._picNav){case"seq":return["next","prev"].includes(F.rel);case"pic":return!1;default:return!0}}toggleJOSMLive(F){if(F){const F=new CustomEvent("josm-live-enabled");return this.dispatchEvent(F),fetch(eu+"/version").catch((F=>{throw this.dispatchEvent(new CustomEvent("josm-live-disabled")),F})).then((()=>{const F=(0,pl.dK)(this.psv.getPictureMetadata());if(F){fetch(`${eu}/load_and_zoom?${F}`).catch((F=>{console.warn(F),this.toggleJOSMLive(!1)}))}this._josmListener=()=>{const F=(0,pl.dK)(this.psv.getPictureMetadata());if(F){fetch(`${eu}/zoom?${F}`).catch((F=>{console.warn(F),this.toggleJOSMLive(!1)}))}},this.addEventListener("psv:picture-loaded",this._josmListener),this.addEventListener("psv:picture-loading",this._josmListener)}))}{const F=new CustomEvent("josm-live-disabled");return this.dispatchEvent(F),this._josmListener&&(this.removeEventListener("psv:picture-loading",this._josmListener),this.removeEventListener("psv:picture-loaded",this._josmListener),delete this._josmListener),Promise.resolve()}}setFocus(F){var Da,ll,cl;let hl=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("map"===F&&!this.map)throw new Error("Map is not enabled");if(!["map","pic"].includes(F))throw new Error("Invalid focus value (should be pic or map)");if(("map"!==F||!this.map||!this.isMapWide())&&("pic"!==F||this.map&&this.isMapWide())){var dl;if(null===(Da=this.mapContainer.parentElement)||void 0===Da||Da.removeChild(this.mapContainer),null===(ll=this.psvContainer.parentElement)||void 0===ll||ll.removeChild(this.psvContainer),"map"===F)this.psv.stopKeyboardControl(),this.map.keyboard.enable(),this.container.classList.add("gvs-focus-map"),this.mainContainer.appendChild(this.mapContainer),this.miniContainer.appendChild(this.psvContainer),this.map.getCanvas().focus();else null===this||void 0===this||null===(dl=this.map)||void 0===dl||dl.keyboard.disable(),this.psv.startKeyboardControl(),this.container.classList.remove("gvs-focus-map"),this.mainContainer.appendChild(this.psvContainer),this.miniContainer.appendChild(this.mapContainer),this.psvContainer.focus();if(null===this||void 0===this||null===(cl=this.map)||void 0===cl||cl.resize(),this.psv.autoSize(),this.refreshPSV(),!hl){const Da=new CustomEvent("focus-changed",{detail:{focus:F}});this.dispatchEvent(Da)}}}toggleFocus(){if(!this.map)throw new Error("Map is not enabled");this.setFocus(this.isMapWide()?"pic":"map")}setUnfocusedVisible(F){if(!this.map)throw new Error("Map is not enabled");F?this.container.classList.remove("gvs-mini-hidden"):this.container.classList.add("gvs-mini-hidden"),this.map.resize(),this.psv.autoSize()}toggleUnfocusedVisible(){if(!this.map)throw new Error("Map is not enabled");this.setUnfocusedVisible(this.container.classList.contains("gvs-mini-hidden"))}setFilters(F){var Da;let ll=arguments.length>1&&void 0!==arguments[1]&&arguments[1],cl=[],hl=[],dl=!1;if(this._mapFilters={},F.minDate&&""!==F.minDate&&(this._mapFilters.minDate=F.minDate,cl.push([">=",["get","date"],F.minDate]),hl.push([">=",["get","ts"],F.minDate])),F.maxDate&&""!==F.maxDate){this._mapFilters.maxDate=F.maxDate,cl.push(["<=",["get","date"],F.maxDate]);let Da=new Date(F.maxDate);Da.setDate(Da.getDate()+1),Da=Da.toISOString().split("T")[0],hl.push(["<=",["get","ts"],Da])}if(F.type&&""!==F.type&&(this._mapFilters.type=F.type,cl.push(["==",["get","type"],F.type]),hl.push(["==",["get","type"],F.type])),null!==(Da=this.map)&&void 0!==Da&&Da._hasGridStats()&&(dl=!0),F.camera&&""!==F.camera){this._mapFilters.camera=F.camera;const Da=F.camera.toLowerCase().trim()+" ",ll=F.camera.toLowerCase().trim()+"zzzzzzzzzzzzzzzzzzzz",dl=["collator",{"case-sensitive":!1,"diacritic-sensitive":!1}];cl.push([">=",["get","model"],Da,dl]),cl.push(["<=",["get","model"],ll,dl]),hl.push([">=",["get","model"],Da,dl]),hl.push(["<=",["get","model"],ll,dl])}if(F.qualityscore&&F.qualityscore.length>0&&(this._mapFilters.qualityscore=F.qualityscore,cl.push(["in",kl.d3,["literal",this._mapFilters.qualityscore]]),hl.push(["in",kl.d3,["literal",this._mapFilters.qualityscore]])),F.theme&&Object.values(iu).includes(F.theme)&&(this._mapFilters.theme=F.theme,this.map&&(this._mapTheme=this._mapFilters.theme,dl=!0)),0==cl.length?cl=null:cl.unshift("all"),0==hl.length?hl=null:(hl.unshift("all"),hl=["step",["zoom"],!0,kl.oe,hl]),this.map){dl&&this.map.reloadLayersStyles();const F=this.map.getVisibleUsers().includes("geovisio");cl&&F&&(cl=["step",["zoom"],!0,7,cl]),this.map.filterUserLayersContent("sequences",cl),this.map.filterUserLayersContent("pictures",hl),!ll&&(null!==cl||null!==hl||null!==this._mapFilters.theme&&this._mapFilters.theme!==iu.DEFAULT)&&F&&this.map.getZoom()<7&&!this.map._hasGridStats()&&this.map.easeTo({zoom:7})}const pl=new CustomEvent("filters-changed",{detail:Object.assign({},this._mapFilters)});this.dispatchEvent(pl)}}},6803:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>CoreView});ll(8946);var cl=ll(5254),hl=ll(6980),dl=ll(1300),pl=ll(5071),fl=ll(8330),Al=ll(2730);class CoreView extends EventTarget{constructor(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(super(),this._options=ll,null==this._options&&(this._options={}),this._options.users||(this._options.users=["geovisio"]),"string"===typeof this._options.users&&(this._options.users=[this._options.users]),this._options.style||(this._options.style=dl.AV),this._options.testing||console.info(`\ud83d\udcf7 Panoramax ${this.getClassName()} - Version ${fl.rE} (78e86a5)\n\n\ud83c\udd98 Issues can be reported at ${fl.Jk.O}`),this._t=(0,hl.$)(this._options.lang),this._isInternetFast=null,(0,pl.KF)().then((F=>this._isInternetFast=F)),this._selectedSeqId=this._options.selectedSequence||null,this._selectedPicId=this._options.selectedPicture||null,this.container="string"===typeof F?document.getElementById(F):F,!(this.container instanceof Element))throw new Error("Container is not a valid HTML element, does it exist in your page ?");this.container.classList.add("gvs",`gvs-${this.getClassName().toLocaleLowerCase()}`),(0,pl.GZ)()&&this.container.classList.add("gvs-iframed"),this.loaderContainer=document.createElement("div"),this.container.appendChild(this.loaderContainer),this._loader=new Al.A(this,this.loaderContainer),Da=(Da||"").replace("/api/search","/api");try{var bl;this._api=new cl.A(Da,{users:this._options.users,fetch:null===(bl=this._options)||void 0===bl?void 0:bl.fetchOptions,style:this._options.style}),this._api.onceReady().then((()=>{let F=this._api.getUnavailableFeatures(),Da=this._api.getAvailableFeatures();Da=0===F.length?"\u2705 All features available":"\u2705 Available features: "+Da.join(", "),F=0===F.length?"":"\ud83d\udeab Unavailable features: "+F.join(", "),console.info(`\ud83c\udf10 Connected to API "${this._api._metadata.name}" (${this._api._endpoint})\n\u2139\ufe0f API runs STAC ${this._api._metadata.stac_version} ${this._api._metadata.geovisio_version?"& GeoVisio "+this._api._metadata.geovisio_version:""}\n ${Da}\n ${F}\n`.trim())})).catch((F=>this._loader.dismiss(F,this._t.gvs.error_api)))}catch(kl){this._loader.dismiss(kl,this._t.gvs.error_api)}}getClassName(){return"CoreView"}destroy(){delete this._options,delete this._t,delete this._api,delete this._loader,this.loaderContainer.remove(),delete this.loaderContainer}isWidthSmall(){var F;return(null===(F=this.container)||void 0===F?void 0:F.offsetWidth)<576}isHeightSmall(){var F;return(null===(F=this.container)||void 0===F?void 0:F.offsetHeight)<400}select(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Da===pl.an&&(Da=null);const cl=this._selectedSeqId||null,hl=this._selectedPicId||null;(ll||hl!=Da||cl!=F)&&(this._selectedSeqId=F,this._selectedPicId=Da,this.dispatchEvent(new CustomEvent("select",{detail:{seqId:F,picId:Da,prevSeqId:cl,prevPicId:hl}})))}}},2730:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Loader});ll(737);var cl=ll(2305),hl=ll(6883);class Loader{constructor(F,Da){this._parent=F,this.container=Da,this.container.classList.add("gvs-loader","gvs-loader-visible");const ll=document.createElement("img");ll.src=hl,ll.alt="",ll.title=this._parent._t.map.loading,ll.classList.add("gvs-loader-img"),this.container.appendChild(ll);const cl=document.createElement("div"),dl=document.createElement("span"),nextLabelFun=()=>this._parent._t.gvs.loading_labels_fun[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_fun.length)];dl.innerHTML=this._parent._t.gvs.loading_labels_serious[Math.floor(Math.random()*this._parent._t.gvs.loading_labels_serious.length)];const nextLabelFct=()=>setTimeout((()=>{dl.innerHTML=nextLabelFun(),this._loaderLabelChanger=nextLabelFct()}),500+1e3*Math.random());this._loaderLabelChanger=nextLabelFct(),cl.appendChild(dl),this.container.appendChild(cl)}isVisible(){return this.container.classList.contains("gvs-loader-visible")}dismiss(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(clearTimeout(this._loaderLabelChanger),F){let hl;!0!==F&&console.error(F),this.container.children[0].src=cl,this.container.children[0].style.width="200px",this.container.children[0].style.animation="unset",hl=ll?`<button class="gvs-loader-cta">${this._parent._t.gvs.error_click}</button>`:`<small>${this._parent._t.gvs.error_retry}</small>`,Da&&(hl=Da+"<br />"+hl),this.container.children[1].innerHTML=`${this._parent._t.gvs.error}<br />${hl}`,ll&&this.container.addEventListener("click",ll);const dl=Da||"Panoramax JS had a blocking exception",pl=new CustomEvent("broken",{detail:{error:dl}});throw this._parent.dispatchEvent(pl),new Error(dl)}{this.container.classList.remove("gvs-loader-visible"),setTimeout((()=>this.container.remove()),2e3);const F=new CustomEvent("ready");this._parent.dispatchEvent(F),ll&&ll()}}}},1951:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Map});ll(1120);var cl=ll(1300),hl=ll(5071),dl=ll(6883),pl=ll(270),fl=ll(6462),Al=ll(9740),bl=(ll(6795),ll(927)),kl=ll.n(bl),Dl=ll(587),Wl=ll.n(Dl),Ql=ll(6840);kl().workerClass=Wl(),kl().addProtocol("pmtiles",(new Ql.Zs).tile);const wc=["antialias","attributionControl","bearing","bearingSnap","bounds","boxZoom","center","clickTolerance","collectResourceTiming","cooperativeGestures","crossSourceCollisions","doubleClickZoom","dragPan","dragRotate","fadeDuration","failIfMajorPerformanceCaveat","fitBoundsOptions","hash","interactive","keyboard","localIdeographFontFamily","locale","logoPosition","maplibreLogo","maxBounds","maxCanvasSize","maxPitch","maxTileCacheSize","maxTileCacheZoomLevels","maxZoom","minPitch","minZoom","pitch","pitchWithRotate","pixelRatio","preserveDrawingBuffer","refreshExpiredTiles","renderWorldCopies","scrollZoom","touchPitch","touchZoomRotate","trackResize","transformCameraUpdate","transformRequest","validateStyle","zoom"];class Map extends kl().Map{constructor(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var hl,dl;(super({container:Da,style:(0,cl.CG)(F,ll),center:[0,0],zoom:0,maxZoom:24,attributionControl:!1,dragRotate:!1,pitchWithRotate:!1,touchZoomRotate:!0,touchPitch:!1,preserveDrawingBuffer:!F.isWidthSmall(),transformRequest:F._api._getMapRequestTransform(),locale:F._t.maplibre,...(hl=ll,Object.fromEntries(Object.entries(hl).filter((F=>{let[Da]=F;return wc.includes(Da)}))))}),this._loadMarkerImages(),this._parent=F,this._options=ll,this.getContainer().classList.add("gvs-map"),void 0===ll.touchZoomRotate)&&(null===this||void 0===this||null===(dl=this.touchZoomRotate)||void 0===dl||dl.disableRotation());this._options.raster&&(this._options.background=this._options.background||"streets"),this._attribution=new(kl().AttributionControl)({compact:!1}),this.addControl(this._attribution),this._initGeocoder(),this._initMapPosition(),this._picMarker=this._getPictureMarker(),this._picMarkerPreview=this._getPictureMarker(!1),this._picThumbUrl={},this._seqPictures={},this._userLayers=new Set,this.on("mousemove","sequences",this._onSequenceHover.bind(this)),this._parent.addEventListener("select",this.reloadLayersStyles.bind(this)),setTimeout((()=>{!this.loaded()&&this._parent._loader.isVisible()&&this._parent._loader.dismiss({},this._parent._t.map.slow_loading,(()=>{}))}),15e3),this.waitForEnoughMapLoaded().then((async()=>await this._postLoad()))}async _postLoad(){this.resize(),await this.setVisibleUsers(this._parent._options.users),this.reloadLayersStyles()}destroy(){this.remove(),delete this._parent,delete this._options,delete this._attribution,delete this._picMarker,delete this._picMarkerPreview,delete this._picThumbUrl,delete this._seqPictures,delete this._userLayers}waitForEnoughMapLoaded(){return new Promise((F=>{let Da=0,ll=0,cl=0,hl=0;const onSourceDataLoading=F=>{"source"===F.dataType&&F.tile&&(F.sourceId.startsWith("geovisio")?ll++:Da++)},onSourceData=F=>{"source"===F.dataType&&F.tile&&(F.sourceId.startsWith("geovisio")?(hl++,F.isSourceLoaded&&(hl=ll)):(cl++,F.isSourceLoaded&&(cl=Da))),checkEnoughLoaded()},checkEnoughLoaded=()=>{cl/Da>=.75&&hl/ll>=.75&&(this.off("sourcedata",onSourceData),this.off("sourcedataloading",onSourceDataLoading),F())};this.on("sourcedataloading",onSourceDataLoading),this.on("sourcedata",onSourceData)}))}_initMapPosition(){this._options.center&&this._options.center!=[0,0]||this._options.zoom&&0!==this._options.zoom||this._options.hash||this._parent._api.onceReady().then((()=>{var F,Da;let ll=null===(F=this._parent)||void 0===F||null===(Da=F._api)||void 0===Da?void 0:Da.getDataBbox();if(ll)try{ll=new(kl().LngLatBounds)(ll),this.loaded()?this.fitBounds(ll,{animate:!1}):this.waitForEnoughMapLoaded().then((()=>this.fitBounds(ll,{animate:!1})))}catch(cl){console.warn("Received invalid bbox: "+ll)}}))}_initGeocoder(){var F,Da;const ll={ban:cl.Kf,nominatim:cl.RK},hl=(null===(F=this._options)||void 0===F||null===(Da=F.geocoder)||void 0===Da?void 0:Da.engine)||"nominatim";this.geocoder=ll[hl],this._geolocate=new(kl().GeolocateControl)({positionOptions:{enableHighAccuracy:!0,timeout:6e4,maximumAge:3e5},showAccuracyCircle:!0,showUserLocation:!0,trackUserLocation:!0}).onAdd(this)}_loadMarkerImages(){[{id:"gvs-marker",img:dl},{id:"gvs-arrow-flat",img:fl},{id:"gvs-arrow-360",img:Al}].forEach((F=>{const Da=new Image(64,64);Da.onload=()=>this.addImage(F.id,Da),Da.src=F.img}))}_hasQualityScore(){var F,Da,ll,cl;const hl=(null===(F=this.getStyle())||void 0===F||null===(Da=F.metadata)||void 0===Da?void 0:Da["panoramax:fields"])||{};return(null===hl||void 0===hl||null===(ll=hl.pictures)||void 0===ll?void 0:ll.includes("gps_accuracy"))&&(null===hl||void 0===hl||null===(cl=hl.pictures)||void 0===cl?void 0:cl.includes("h_pixel_density"))}_hasGridStats(){var F,Da,ll,cl,hl,dl;const pl=(null===(F=this.getStyle())||void 0===F||null===(Da=F.metadata)||void 0===Da?void 0:Da["panoramax:fields"])||{};return(null===pl||void 0===pl||null===(ll=pl.grid)||void 0===ll?void 0:ll.includes("nb_360_pictures"))&&(null===pl||void 0===pl||null===(cl=pl.grid)||void 0===cl?void 0:cl.includes("nb_flat_pictures"))&&(null===pl||void 0===pl||null===(hl=pl.grid)||void 0===hl?void 0:hl.includes("coef_360_pictures"))&&(null===pl||void 0===pl||null===(dl=pl.grid)||void 0===dl?void 0:dl.includes("coef_flat_pictures"))}reloadVectorTiles(){[...this._userLayers].forEach((F=>{const Da=this.getSource((0,cl.e8)(F));Da.setTiles(Da.tiles)}))}hasTwoBackgrounds(){return void 0!==this.getLayer(cl.m5)}getBackground(){if(!this.getLayer(cl.m5))return"streets";return"visible"==this.getLayoutProperty(cl.m5,"visibility")?"aerial":"streets"}setBackground(F){if(!this.getLayer(cl.m5)&&"aerial"===F)throw new Error("No aerial imagery available");if(this.getLayer(cl.m5)){this.setLayoutProperty(cl.m5,"visibility","aerial"===F?"visible":"none");const Da=new CustomEvent("map:background-changed",{detail:{background:F||"streets"}});this._parent.dispatchEvent(Da)}}getVisibleUsers(){return[...this._userLayers].filter((F=>"visible"===this.getLayoutProperty((0,cl.IN)(F,"pictures"),"visibility")))}async setVisibleUsers(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"===typeof F&&(F=[F]),await Promise.all(F.filter((F=>""!=F&&!this._userLayers.has(F))).map((F=>this._createPicturesTilesLayer(F))));const Da=["pictures","sequences","sequences_plus","grid","pictures_symbols"];[...this._userLayers].forEach((ll=>{Da.forEach((Da=>{const hl=(0,cl.IN)(ll,Da);this.getLayer(hl)&&this.setLayoutProperty(hl,"visibility",F.includes(ll)?"visible":"none")}))}));const ll=new CustomEvent("map:users-changed",{detail:{usersIds:F}});this._parent.dispatchEvent(ll)}filterUserLayersContent(F,Da){[...this._userLayers].forEach((ll=>{this.setFilter((0,cl.IN)(ll,F),Da),"sequences"===F&&this.getLayer((0,cl.IN)(ll,"sequences_plus"))&&this.setFilter((0,cl.IN)(ll,"sequences_plus"),Da),"pictures"===F&&this.getLayer((0,cl.IN)(ll,"pictures_symbols"))&&this.setFilter((0,cl.IN)(ll,"pictures_symbols"),Da)}))}displayPictureMarker(F,Da,ll){this._picMarkerPreview.remove(),void 0!==F&&void 0!==Da?this._picMarker.setLngLat([F,Da]).setRotation(ll).addTo(this):this._picMarker.remove(),this.reloadLayersStyles(),void 0!==F&&void 0!==Da&&this.flyTo({center:[F,Da],zoom:this.getZoom()<cl.oe+2?cl.oe+2:this.getZoom(),maxDuration:2e3})}reloadLayersStyles(){var F;const updateStyle=(F,Da)=>{[...this._userLayers].forEach((ll=>{for(let hl in Da.layout)this.setLayoutProperty((0,cl.IN)(ll,F),hl,Da.layout[hl]);for(let hl in Da.paint)this.setPaintProperty((0,cl.IN)(ll,F),hl,Da.paint[hl])}))};if(["pictures","pictures_symbols","sequences"].forEach((F=>{updateStyle(F,this._getLayerStyleProperties(F))})),this._hasGridStats()&&null!==(F=this._parent)&&void 0!==F&&F._mapFilters){var Da;let F="coef";null!==(Da=this._parent._mapFilters)&&void 0!==Da&&Da.type&&(F="flat"==this._parent._mapFilters.type?"coef_flat_pictures":"coef_360_pictures"),this.getStyle().layers.filter((F=>F.id.endsWith("_grid"))).forEach((Da=>{const ll=(0,cl.Hj)(Da,F);for(let F in ll.layout)this.setLayoutProperty(Da.id,F,ll.layout[F]);for(let F in ll.paint)this.setPaintProperty(Da.id,F,ll.paint[F])}))}}async _createPicturesTilesLayer(F){this._userLayers.add(F);const Da=this.getStyle().layers.find(cl.Sf);if("geovisio"!==F&&!this.getSource(`geovisio_${F}`)){const ll=await this._parent._api.getUserMapStyle(F);Object.entries(ll.sources).forEach((F=>{let[Da,ll]=F;return this.addSource(Da,ll)})),ll.layers=ll.layers||[];ll.layers.concat((0,cl.Oq)(ll.sources,ll.layers)).filter((F=>Object.keys(F).length>0)).forEach((F=>this.addLayer(F,null===Da||void 0===Da?void 0:Da.id)))}this._picPreviewTimer=null,this._picPopup=new(kl().Popup)({closeButton:!1,closeOnClick:!this._parent.isWidthSmall(),offset:3}),this._picPopup.on("close",(()=>{delete this._picPopup._picId}));const ll=(0,cl.IN)(F,"pictures");this.on("mousemove",ll,(F=>{this.getCanvas().style.cursor="pointer";const Da=Object.assign({},F);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Da,ll)),100)})),this.on("mouseleave",ll,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",ll,this._onPictureClick.bind(this));const hl=(0,cl.IN)(F,"sequences_plus");this.on("mousemove",hl,(F=>{if(this.getZoom()<=cl.oe+1&&(this.getCanvas().style.cursor="pointer",F.features[0].properties.id)){const Da=Object.assign({},F);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Da,hl)),100)}})),this.on("mouseleave",hl,(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click",hl,(F=>{F.preventDefault(),this.getZoom()<=cl.oe+1&&this._onSequenceClick(F)})),"geovisio"===F&&this.getLayer("geovisio_grid")&&(this.on("mousemove","geovisio_grid",(F=>{if(this.getZoom()<=cl.oe+1){this.getCanvas().style.cursor="pointer";const Da=Object.assign({},F);clearTimeout(this._picPreviewTimer),this._picPreviewTimer=setTimeout((()=>this._attachPreviewToPictures(Da,"geovisio_grid")),100)}})),this.on("mouseleave","geovisio_grid",(()=>{clearTimeout(this._picPreviewTimer),this.getCanvas().style.cursor="",this._picPopup._picId,this._picPopup.remove()})),this.on("click","geovisio_grid",(F=>{F.preventDefault(),this.flyTo({center:F.lngLat,zoom:cl.oe-6})}))),this.on("click",(F=>{!1===F.defaultPrevented&&(clearTimeout(this._picPreviewTimer),this._picPopup.remove())}))}_getLayerStyleProperties(F){if("pictures_symbols"===F)return{paint:{},layout:{"icon-image":["case",["==",["get","id"],this._parent._selectedPicId],"",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"symbol-sort-key":this._getLayerSortStyle(F)}};{const Da={pictures:"circle",sequences:"line"};return{paint:Object.assign({[`${Da[F]}-color`]:this._getLayerColorStyle(F)},cl.VM[F.toUpperCase()].paint),layout:Object.assign({[`${Da[F]}-sort-key`]:this._getLayerSortStyle(F)},cl.VM[F.toUpperCase()].layout)}}}_getLayerColorStyle(F){const Da=["case",["==",["get","hidden"],!0],hl.lm.HIDDEN,["==",["get","geovisio:status"],"hidden"],hl.lm.HIDDEN],ll=this._parent._selectedSeqId;return"sequences"==F&&ll?Da.push(["==",["get","id"],ll],hl.lm.SELECTED):F.startsWith("pictures")&&ll&&Da.push(["in",ll,["get","sequences"]],hl.lm.SELECTED),Da.push(hl.lm.BASE),Da}_getLayerSortStyle(F){const Da=["case",["==",["get","hidden"],!0],90],ll=this._parent._selectedSeqId;return"sequences"==F&&ll?Da.push(["==",["get","id"],ll],100):F.startsWith("pictures")&&ll&&Da.push(["in",ll,["get","sequences"]],100),Da.push(10),Da}_attachPreviewToPictures(F,Da){let ll=F.features.pop();if(!ll||ll.properties.id==this._picPopup._picId)return;let hl=null;if(Da.endsWith("pictures")?hl=ll.geometry.coordinates.slice():F.lngLat&&(hl=[F.lngLat.lng,F.lngLat.lat]),!hl){const F="LineString"===ll.geometry.type?[ll.geometry.coordinates]:ll.geometry.coordinates;let Da=null;const cl=this.getBounds(),dl=cl.getCenter();for(let ll=0;ll<F.length;ll++)for(let pl=0;pl<F[ll].length;pl++)if(cl.contains(F[ll][pl])){let cl=dl.distanceTo(new(kl().LngLat)(...F[ll][pl]));(null===Da||cl<Da)&&(hl=F[ll][pl],Da=cl)}if(!hl)return}this._picPopup.setLngLat(hl).addTo(this),this._picThumbUrl[ll.properties.id]||this._picPopup.setDOMContent((0,cl.No)(this._parent._t)),this._picPopup._loading=ll.properties.id,this._picPopup._picId=ll.properties.id;const displayThumb=F=>{if(this._picPopup._loading===ll.properties.id)if(delete this._picPopup._loading,F){let Da=document.createElement("img");Da.classList.add("gvs-map-thumb"),Da.alt=this._parent._t.map.thumbnail;let cl=new Image;if(cl.src=F,cl.addEventListener("load",(()=>{ll.properties.hidden?Da.children[0].src=cl.src:Da.src=cl.src,this._picPopup.setDOMContent(Da)})),ll.properties.hidden){const F=document.createElement("div");F.classList.add("gvs-map-thumb-legend"),F.appendChild(document.createTextNode(this._parent._t.map.not_public));const ll=document.createElement("div");ll.appendChild(Da),ll.appendChild(F),Da=ll}}else this._picPopup.remove()};Da.endsWith("pictures")?this._getPictureThumbURL(ll.properties.id).then(displayThumb):Da.endsWith("grid")?this._getThumbURL(hl).then(displayThumb):this._getSequenceThumbURL(ll.properties.id,new(kl().LngLat)(...hl)).then(displayThumb)}_getThumbURL(F){return this._parent._api.getPicturesAroundCoordinates(F[1],F[0],.1,1).then((F=>{var Da;const ll=null===F||void 0===F||null===(Da=F.features)||void 0===Da?void 0:Da.pop();return ll?this._parent._api.findThumbnailInPictureFeature(ll):null}))}_getSequenceThumbURL(F,Da){return Da?this._parent._api.getPicturesAroundCoordinates(Da.lat,Da.lng,1,1,F).then((Da=>{var ll;return(null===Da||void 0===Da||null===(ll=Da.features)||void 0===ll?void 0:ll.length)>0?this._parent._api.findThumbnailInPictureFeature(Da.features[0]):this._parent._api.getPictureThumbnailURLForSequence(F)})):this._parent._api.getPictureThumbnailURLForSequence(F)}_getPictureThumbURL(F,Da){let ll=null;return F&&(void 0!==this._picThumbUrl[F]?ll="string"===typeof this._picThumbUrl[F]?Promise.resolve(this._picThumbUrl[F]):this._picThumbUrl[F]:(this._picThumbUrl[F]=this._parent._api.getPictureThumbnailURL(F,Da).then((Da=>Da?(this._picThumbUrl[F]=Da,Da):(this._picThumbUrl[F]=null,null))).catch((()=>{this._picThumbUrl[F]=null})),ll=this._picThumbUrl[F])),ll}_getPictureMarker(){let F=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const Da=document.createElement("img");return Da.src=F?pl:dl,Da.alt="",new(kl().Marker)({element:Da})}_onSequenceHover(F){var Da;F.preventDefault(),F.features.length>0&&null!==(Da=F.features[0].properties)&&void 0!==Da&&Da.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-hover",{detail:{seqId:F.features[0].properties.id}}))}_onSequenceClick(F){var Da;F.preventDefault(),F.features.length>0&&null!==(Da=F.features[0].properties)&&void 0!==Da&&Da.id&&this._parent.dispatchEvent(new CustomEvent("map:sequence-click",{detail:{seqId:F.features[0].properties.id,coordinates:F.lngLat}}))}_onPictureClick(F){var Da,ll;F.preventDefault();const cl=(null===F||void 0===F||null===(Da=F.features)||void 0===Da?void 0:Da.length)>0?F.features[0]:null;if(null!==cl&&void 0!==cl&&null!==(ll=cl.properties)&&void 0!==ll&&ll.id){let Da=null;try{cl.properties.sequences&&(Array.isArray(cl.properties.sequences)||(cl.properties.sequences=JSON.parse(cl.properties.sequences)),Da=cl.properties.sequences.pop())}catch(F){console.log("Sequence ID is not available in vector tiles for picture "+cl.properties.id)}this._parent.dispatchEvent(new CustomEvent("map:picture-click",{detail:{picId:cl.properties.id,seqId:Da,feature:cl}}))}}}},8489:(F,Da,ll)=>{"use strict";ll.d(Da,{Ay:()=>Photo,LM:()=>Wl,Vf:()=>Ql,cS:()=>Dl});ll(8310);var cl=ll(5975),hl=ll(2305),dl=ll(5071),pl=(ll(3961),ll(1080),ll(2710),ll(1575),ll(1545)),fl=ll(3348),Al=ll(3727);const bl={baseUrl:cl,width:1280,cols:2,rows:1,tileUrl:()=>null},kl={id:dl.an,caption:"",panorama:bl,links:[],gps:[0,0],sequence:{},sphereCorrection:{},horizontalFov:360,properties:{}},Dl=30,Wl=250,Ql=3e3;pl.jM.useNewAnglesOrder=!0;class Photo extends pl.jM{constructor(F,Da){var ll,cl,hl,dl;let pl=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super({container:Da,adapter:[Al.A,{showErrorTile:!1,baseBlur:!1,resolution:F.isWidthSmall()?32:64,shouldGoFast:pl.shouldGoFast}],withCredentials:"include"==(null===(ll=F._options)||void 0===ll||null===(cl=ll.fetchOptions)||void 0===cl?void 0:cl.credentials),requestHeaders:null===(hl=F._options)||void 0===hl||null===(dl=hl.fetchOptions)||void 0===dl?void 0:dl.headers,panorama:bl,lang:F._t.psv,minFov:5,loadingTxt:"&nbsp;",navbar:null,rendererParameters:{preserveDrawingBuffer:!F.isWidthSmall()},plugins:[[fl.$,{dataMode:"server",positionMode:"gps",renderMode:"3d",preload:!0,getNode:()=>{},transitionOptions:()=>{},arrowsPosition:{linkOverlapAngle:Math.PI/6}}]],...pl}),this._parent=F,Da.classList.add("gvs-psv"),this._shouldGoFast=(null===pl||void 0===pl?void 0:pl.shouldGoFast)||(()=>!1),this._transitionDuration=(null===pl||void 0===pl?void 0:pl.transitionDuration)||Wl,this._myVTour=this.getPlugin(fl.$),this._myVTour.datasource.nodeResolver=this._getNodeFromAPI.bind(this),this._myVTour.config.transitionOptions=this._psvNodeTransition.bind(this),this._clearArrows=this._myVTour.arrowsRenderer.clear.bind(this._myVTour.arrowsRenderer),this._myVTour.arrowsRenderer.clear=()=>{},this._picturesSequences={},this._myVTour.addEventListener("enter-arrow",this._onEnterArrow.bind(this)),this._myVTour.addEventListener("leave-arrow",this._onLeaveArrow.bind(this)),this._myVTour.addEventListener("node-changed",this._onNodeChanged.bind(this)),this.addEventListener("position-updated",this._onPositionUpdated.bind(this)),this.addEventListener("zoom-updated",this._onZoomUpdated.bind(this)),this._parent.addEventListener("select",this._onSelect.bind(this)),this.loader.size=150,this.loader.color="rgba(61, 61, 61, 0.5)",this.loader.textColor="rgba(255, 255, 255, 0.7)",this.loader.border=5,this.loader.thickness=10,this.loader.canvas.setAttribute("viewBox","0 0 150 150"),this.loader.__updateContent()}async _getNodeFromAPI(F){var Da,ll,cl;if(!F||F===dl.an)return kl;const hl=await fetch(this._parent._api.getPictureMetadataUrl(F,this._picturesSequences[F]),this._parent._api._getFetchOptions());let pl=await hl.json();if(pl.features&&(pl=pl.features.pop()),!pl||0===Object.keys(pl).length||!hl.ok)throw this._parent._loader&&this._parent._loader.dismiss(!0,this._parent._t.gvs.error_pic),new Error("Picture with ID "+F+" was not found");this._picturesSequences[F]=pl.collection;const fl=(0,dl.rs)(pl,this._parent._t,this._parent._isInternetFast,null===(Da=this._parent._picturesNavFilter)||void 0===Da?void 0:Da.bind(this._parent));var Al,bl;null!==fl&&void 0!==fl&&null!==(ll=fl.sequence)&&void 0!==ll&&ll.prevPic&&(this._picturesSequences[null===fl||void 0===fl||null===(Al=fl.sequence)||void 0===Al?void 0:Al.prevPic]=pl.collection);null!==fl&&void 0!==fl&&null!==(cl=fl.sequence)&&void 0!==cl&&cl.nextPic&&(this._picturesSequences[null===fl||void 0===fl||null===(bl=fl.sequence)||void 0===bl?void 0:bl.nextPic]=pl.collection);return fl}_psvNodeTransition(F,Da,ll){var cl,hl;let pl={};const fl=this._shouldGoFast()?0:Math.min(Wl,this._transitionDuration),Al=fl>100,bl=null!=(ll||(null===Da||void 0===Da?void 0:Da.links.find((Da=>Da.nodeId==F.id)))),kl=Da&&F.sequence.id===Da.sequence.id,Ql=((null===Da||void 0===Da||null===(cl=Da.properties)||void 0===cl?void 0:cl["view:azimuth"])||0)*(Math.PI/180),wc=((null===F||void 0===F||null===(hl=F.properties)||void 0===hl?void 0:hl["view:azimuth"])||0)*(Math.PI/180);this.setOption("maxFov",Math.min(3*F.horizontalFov/4,90));const Sc={speed:0,fadeIn:!1,rotation:!1,rotateTo:{pitch:0,yaw:0},zoomTo:Dl};if(360==F.horizontalFov)pl=Da?(0,dl.Yf)(Da.gps,F.gps)>=.001?Sc:{speed:fl,fadeIn:bl&&Al,rotation:bl&&kl&&Al,rotateTo:this.getPosition()}:Sc;else if(kl){const F=this.getPosition().yaw,ll=Da.horizontalFov*(Math.PI/180)/2,cl=F<=ll||F>=2*Math.PI-ll,hl=Math.abs(Ql-wc)<=Math.PI/4;pl={speed:fl,fadeIn:bl&&hl&&Al,rotation:bl&&hl&&Al,rotateTo:cl?this.getPosition():{pitch:0,yaw:0},zoomTo:cl?this.getZoomLevel():Dl}}else pl=Sc;pl.fadeIn&&pl.speed>=150?setTimeout(this._clearArrows,pl.speed-100):this._clearArrows();const eu=new CustomEvent("psv:picture-loading",{detail:{...Object.assign({},this.getXYZ(),pl.rotateTo?{x:180*(wc+pl.rotateTo.yaw)/Math.PI}:null,pl.zoomTo?{z:pl.zoomTo}:null),picId:F.id,lon:F.gps[0],lat:F.gps[1]}});return this._parent.dispatchEvent(eu),pl}_onEnterArrow(F){const Da=F.link,ll=F.node;let cl;ll&&(cl=360===ll.horizontalFov?(this.getPictureOriginalHeading()+180*this.getPosition().yaw/Math.PI)%360:this.getPictureOriginalHeading());const hl=new CustomEvent("psv:picture-preview-started",{detail:{picId:Da.nodeId,coordinates:Da.gps,direction:cl}});this._parent.dispatchEvent(hl)}_onLeaveArrow(F){const Da=F.link,ll=new CustomEvent("psv:picture-preview-stopped",{detail:{picId:Da.nodeId}});this._parent.dispatchEvent(ll)}_onPositionUpdated(F){let{position:Da}=F;const ll=(0,dl.oi)(Da,this.getZoomLevel());ll.x+=this.getPictureOriginalHeading(),ll.x=ll.x%360;const cl=new CustomEvent("psv:view-rotated",{detail:ll});this._parent.dispatchEvent(cl),this._onTilesStartLoading()}_onZoomUpdated(F){let{zoomLevel:Da}=F;const ll=new CustomEvent("psv:view-rotated",{detail:{...this.getXY(),z:Da}});this._parent.dispatchEvent(ll),this._onTilesStartLoading()}_onNodeChanged(F){for(let cl of document.getElementsByClassName("gvs-psv-tour-arrows"))cl.classList.remove("gvs-clicked");if(F.node.id){var Da,ll;this._parent.select(null===(Da=F.node)||void 0===Da||null===(ll=Da.sequence)||void 0===ll?void 0:ll.id,F.node.id);const cl=this.getPictureMetadata();if(!cl)return void this._parent.dispatchEvent(new CustomEvent("psv:picture-loaded",{detail:{}}));this._prevSequence=cl.sequence.id;const hl=new CustomEvent("psv:picture-loaded",{detail:{...this.getXYZ(),picId:F.node.id,lon:cl.gps[0],lat:cl.gps[1]}});this._parent.dispatchEvent(hl),cl.panorama.hdUrl?(this.setOption("downloadUrl",cl.panorama.hdUrl),this.setOption("downloadName",F.node.id+".jpg")):this.setOption("downloadUrl",null)}this._onTilesStartLoading()}_onTilesStartLoading(){this._tilesQueueTimer&&(clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer),this._tilesQueueTimer=setInterval((()=>{if(0===Object.keys(this.adapter.queue.tasks).length){if(this._myVTour.state.currentNode){const F=new Event("psv:picture-tiles-loaded",{picId:this._myVTour.state.currentNode.id});this._parent.dispatchEvent(F)}clearInterval(this._tilesQueueTimer),delete this._tilesQueueTimer}}),100)}getPictureMetadata(){var F,Da,ll;return(null===(F=this._myVTour)||void 0===F||null===(Da=F.state)||void 0===Da||null===(ll=Da.currentNode)||void 0===ll?void 0:ll.id)===dl.an?null:this._myVTour.state.currentNode?Object.assign({},this._myVTour.state.currentNode):null}_onSelect(F){var Da;F.detail.seqId&&(this._picturesSequences[F.detail.picId]=F.detail.seqId),(null===(Da=this._myVTour.getCurrentNode())||void 0===Da?void 0:Da.id)!==F.detail.picId&&(this.loader.show(),this._myVTour.setCurrentNode(F.detail.picId).catch((F=>{this.showErrorOverlay(F,this._parent._t.gvs.error_pic,!0)})))}goToNextPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const F=this.getPictureMetadata().sequence.nextPic;if(!F)throw new Error("No next picture available");this._parent.select(this.getPictureMetadata().sequence.id,F)}goToPrevPicture(){if(!this.getPictureMetadata())throw new Error("No picture currently selected");const F=this.getPictureMetadata().sequence.prevPic;if(!F)throw new Error("No previous picture available");this._parent.select(this.getPictureMetadata().sequence.id,F)}async goToPosition(F,Da){return this._parent._api.getPicturesAroundCoordinates(F,Da).then((F=>{if(F.features.length>0){const Da=F.features.pop();return this._parent.select(null===Da||void 0===Da?void 0:Da.collection,Da.id),Da.id}return Promise.reject(new Error("No picture found nearby given coordinates"))}))}getXY(){const F=(0,dl.oi)(this.getPosition());return F.x=(F.x+this.getPictureOriginalHeading())%360,F}getXYZ(){const F=this.getXY();return F.z=this.getZoomLevel(),F}getPictureOriginalHeading(){var F,Da;return(null===(F=this.getPictureMetadata())||void 0===F||null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"])||0}getPictureRelativeHeading(){return(0,dl.dj)(this.getPictureMetadata())}clearPictureMetadataCache(){var F,Da,ll,cl;const hl=null===(F=this.getPictureMetadata())||void 0===F?void 0:F.id,dl=null===(Da=this.getPictureMetadata())||void 0===Da||null===(ll=Da.sequence)||void 0===ll?void 0:ll.id;null===(cl=this._myVTour.state.currentTooltip)||void 0===cl||cl.hide(),this._myVTour.state.currentTooltip=null,this._myVTour.state.currentNode=null,this._myVTour.state.preload={},this._myVTour.datasource.nodes={},hl&&this._parent.select(dl,hl)}setXYZ(F,Da,ll){const cl=(0,dl.y7)(F-this.getPictureOriginalHeading(),Da,ll);this.rotate({yaw:cl.yaw,pitch:cl.pitch}),this.zoom(cl.zoom)}setHigherContrast(F){this.renderer.renderer.toneMapping=F?3:0,this.renderer.renderer.toneMappingExposure=F?2:1,this.needsUpdate()}getTransitionDuration(){return this._transitionDuration}setTransitionDuration(F){if((F=parseFloat(F))<100||F>Ql)throw new Error("Invalid transition duration (should be between 100 and "+Ql+")");this._transitionDuration=F;const Da=new CustomEvent("psv:transition-duration-changed",{detail:{value:F}});this._parent.dispatchEvent(Da)}setPanorama(F,Da){const onFailure=F=>this.showErrorOverlay(F,this._parent._t.gvs.error_pic,!0);try{return super.setPanorama(F,Da).catch(onFailure)}catch(ll){onFailure(ll)}}showErrorOverlay(F,Da,ll){this._parent._loader.isVisible()||!this.overlay.isVisible()?this._parent._loader.dismiss(F,Da,ll?()=>{this._parent._loader.dismiss(),this.overlay.hide()}:void 0):(console.error(F),this.overlay.show({image:`<img style="width: 200px" src="${hl}" alt="" />`,title:this._parent._t.gvs.error,text:Da+"<br />"+this._parent._t.gvs.error_click,dissmisable:ll}))}}},5254:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>API});var cl=ll(1300),hl=ll(5071);class API{constructor(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===F||void 0===F||"string"!==typeof F)throw new Error("endpoint parameter is empty or not a valid string");if(F.startsWith("/")&&(F=window.location.href.split("/").slice(0,3).join("/")+F),!API.isValidHttpUrl(F))throw new Error(`endpoint parameter is not a valid URL: ${F}`);this._endpoint=F,this._isReady=0,this._dataBbox=null,this._fetchOpts=(null===Da||void 0===Da?void 0:Da.fetch)||{},this._metadata={},Da.skipReadLanding||(this._readLanding=fetch(F,this._getFetchOptions()).then((F=>F.json())).then((F=>this._parseLanding(F,Da))).catch((F=>(this._isReady=-1,console.error(F),Promise.reject("Viewer failed to communicate with API")))).then((()=>this._loadMapStyles(Da.style,Da.users))).then((()=>(this._isReady=1,"API is ready"))))}onceReady(){return-1==this._isReady?Promise.reject("Viewer failed to communicate with API"):1==this._isReady?Promise.resolve("API is ready"):this._readLanding}isReady(){return 1==this._isReady}getAvailableFeatures(){return Object.entries(this._endpoints).filter((F=>null!==F[1])).map((F=>F[0]))}getUnavailableFeatures(){return Object.entries(this._endpoints).filter((F=>null===F[1])).map((F=>F[0]))}_parseLanding(F,Da){var ll,cl;if(this._endpoints={collections:null,search:null,style:null,user_style:null,tiles:(null===Da||void 0===Da?void 0:Da.tiles)||null,user_tiles:null,user_search:null,collection_preview:null,item_preview:null,rss:null,report:null},!F||!F.links||!Array.isArray(F.links))throw new Error("API Landing page doesn't contain 'links' list");if(!F.stac_version.startsWith("1."))throw new Error(`API is not in a supported STAC version (Panoramax viewer supports only 1.x, API is ${F.stac_version})`);this._metadata.name=F.title||"Unnamed",this._metadata.stac_version=F.stac_version,this._metadata.geovisio_version=F.geovisio_version;const hl=[],dl=[];if([{rel:"search",type:"application/geo+json",endpointId:"search",mandatory:!0,missingIssue:"No direct access to pictures metadata."},{rel:"data",type:"application/json",endpointId:"collections",mandatory:!0,missingIssue:"No way for viewer to access sequences."},{rel:"data",type:"application/rss+xml",endpointId:"rss"},{rel:"xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"tiles"},{rel:"xyz-style",type:"application/json",endpointId:"style"},{rel:"user-xyz-style",type:"application/json",endpointId:"user_style"},{rel:"user-xyz",type:"application/vnd.mapbox-vector-tile",endpointId:"user_tiles"},{rel:"user-search",type:"application/json",endpointId:"user_search",missingIssue:"Filter map data by user name will not be available."},{rel:"collection-preview",type:"image/jpeg",endpointId:"collection_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"item-preview",type:"image/jpeg",endpointId:"item_preview",missingIssue:"Display of thumbnail could be slower."},{rel:"report",type:"application/json",endpointId:"report"}].forEach((Da=>{const ll=F.links.find((F=>F.rel==Da.rel&&F.type==Da.type));if(ll){if(!API.isValidHttpUrl(ll.href))throw new Error(`API endpoint '${ll.rel}' (${ll.type}) is not a valid URL: ${ll.href}`);this._endpoints[Da.endpointId]||(this._endpoints[Da.endpointId]=ll.href)}else if(!this._endpoints[Da.endpointId]){let F=`API doesn't offer a '${Da.rel}' (${Da.type}) endpoint in its links`;Da.missingIssue&&(F+=`\n${Da.missingIssue}`),Da.mandatory?hl.push(F):Da.missingIssue&&dl.push(F)}})),this._endpoints.style||this._endpoints.tiles||dl.push("API doesn't offer 'xyz' or 'xyz-style' endpoints in its links.\nMap widget will not be available."),this._endpoints.user_style||this._endpoints.user_tiles||dl.push("API doesn't offer 'user-xyz' or 'user-xyz-style' endpoints in its links.\nFilter map data by user ID will not be available."),dl.forEach((F=>console.warn(F))),hl.length>0)throw new Error(hl.join("\n"));const pl=null===F||void 0===F||null===(ll=F.extent)||void 0===ll||null===(cl=ll.spatial)||void 0===cl?void 0:cl.bbox;this._dataBbox=pl&&Array.isArray(pl)&&pl.length>0&&Array.isArray(pl[0])&&4===pl[0].length?[[pl[0][0],pl[0][1]],[pl[0][2],pl[0][3]]]:null}_loadMapStyles(F,Da){const ll=new Set(Da||[]);this.mapStyle={version:8,sources:{},layers:[],metadata:{}};const cl=[this.getMapStyle()];if("string"===typeof F){const Da=F.startsWith(this._endpoint)?this._getFetchOptions():void 0;cl.push(fetch(F,Da).then((F=>F.json())))}else"object"===typeof F&&cl.push(Promise.resolve(F));return[...ll].filter((F=>"geovisio"!==F)).forEach((F=>{cl.push(this.getUserMapStyle(F,!0))})),Promise.all(cl).then((F=>{const Da=["bearing","center","glyphs","light","name","pitch","sky","sprite","terrain","transition","zoom"];F.forEach((F=>{Da.forEach((Da=>{F[Da]&&(this.mapStyle[Da]=F[Da]||this.mapStyle[Da])})),Object.assign(this.mapStyle.sources,(null===F||void 0===F?void 0:F.sources)||{}),Object.assign(this.mapStyle.metadata,(null===F||void 0===F?void 0:F.metadata)||{}),this.mapStyle.layers=this.mapStyle.layers.concat((null===F||void 0===F?void 0:F.layers)||[])}))})).catch((F=>console.error(F)))}_getFetchOptions(){return Object.assign({signal:AbortSignal.timeout(15e3)},this._fetchOpts)}_getMapRequestTransform(){const F=this._getFetchOptions();if(delete F.signal,Object.keys(F).length>0)return Da=>{if(Da.startsWith(this._endpoint))return{url:Da,...F}}}async getSequenceItems(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!this.isReady())throw new Error("API is not ready to use");try{return API.isIdValid(F),fetch(Da||`${this._endpoints.collections}/${F}/items`,this._getFetchOptions()).then((F=>F.json())).then((Da=>{let cl=Da;ll&&(cl.features=ll.features.concat(cl.features));const hl=Da.links.find((F=>"next"===F.rel));return hl?this.getSequenceItems(F,hl.href,cl):cl}))}catch(cl){return Promise.reject(cl)}}getPicturesAroundCoordinatesUrl(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e-4,cl=arguments.length>3?arguments[3]:void 0,hl=arguments.length>4?arguments[4]:void 0;if(!this.isReady())throw new Error("API is not ready to use");if(isNaN(parseFloat(F))||isNaN(parseFloat(Da)))throw new Error("lat and lon parameters should be valid numbers");const dl=[Da-ll,F-ll,Da+ll,F+ll].map((F=>F.toFixed(4))).join(","),pl=cl?`&limit=${cl}`:"",fl=hl?`&collections=${hl}`:"";return`${this._endpoints.search}?bbox=${dl}${pl}${fl}`}getPicturesAroundCoordinates(F,Da,ll,cl,hl){return fetch(this.getPicturesAroundCoordinatesUrl(F,Da,ll,cl,hl),this._getFetchOptions()).then((F=>F.json()))}getPictureMetadataUrl(F,Da){if(!this.isReady())throw new Error("API is not ready to use");if(API.isIdValid(F))return Da?`${this._endpoints.collections}/${Da}/items/${F}`:`${this._endpoints.search}?ids=${F}`}getMapStyle(){if(this.isReady())return this.mapStyle;let F;return F=this._endpoints.style?this._endpoints.style:this._endpoints.tiles?{version:8,sources:{geovisio:{type:"vector",tiles:[this._endpoints.tiles],minzoom:0,maxzoom:cl.oe}}}:fetch(`${this._endpoint}/map/14/0/0.mvt`,this._getFetchOptions()).then((()=>(this._endpoints.tiles=`${this._endpoint}/map/{z}/{x}/{y}.mvt`,console.log("Using fallback endpoint for vector tiles"),this.getMapStyle()))).catch((F=>(console.error(F),Promise.reject(new Error("API doesn't offer a vector tiles endpoint"))))),"string"===typeof F?fetch(F,this._getFetchOptions()).then((F=>F.json())):Promise.resolve(F)}getUserMapStyle(F){let Da;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.isReady()?F?(this._endpoints.user_style?Da=this._endpoints.user_style.replace(/\{userId\}/g,F):this._endpoints.user_tiles&&(Da={version:8,sources:{[`geovisio_${F}`]:{type:"vector",tiles:[this._endpoints.user_tiles.replace(/\{userId\}/g,F)],minzoom:0,maxzoom:cl.oe}}}),Da?"string"===typeof Da?fetch(Da,this._getFetchOptions()).then((F=>F.json())):Promise.resolve(Da):Promise.reject(new Error("API doesn't offer map style for specific user"))):Promise.reject(new Error("Parameter userId is empty")):Promise.reject(new Error("API is not ready to use"))}findThumbnailInPictureFeature(F){if(!this.isReady())throw new Error("API is not ready to use");if(!F||!F.assets)return null;let Da=null;for(let ll of Object.values(F.assets)){if(ll.roles.includes("thumbnail")&&"image/jpeg"==ll.type&&API.isValidHttpUrl(ll.href))return ll.href;ll.roles.includes("visual")&&"image/jpeg"==ll.type&&API.isValidHttpUrl(ll.href)&&(Da=ll.href)}return Da}getPictureThumbnailURLForSequence(F,Da){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.collection_preview)return Promise.resolve(this._endpoints.collection_preview.replace("{id}",F));if(Da&&Array.isArray(Da.links)&&Da.links.length>0){let F=Da.links.find((F=>"preview"===F.rel&&"image/jpeg"===F.type));if(F&&API.isValidHttpUrl(F.href))return Promise.resolve(F.href)}const ll=`${this._endpoints.search}?limit=1&collections=${F}`;return fetch(ll,this._getFetchOptions()).then((F=>F.json())).then((F=>Array.isArray(F.features)&&0!=F.features.length?this.findThumbnailInPictureFeature(F.features.pop()):null))}getPictureThumbnailURL(F,Da){if(!this.isReady())throw new Error("API is not ready to use");return F?this._endpoints.item_preview?Promise.resolve(this._endpoints.item_preview.replace("{id}",F)):F&&Da?fetch(`${this._endpoints.collections}/${Da}/items/${F}`,this._getFetchOptions()).then((F=>F.json())).then((F=>F?this.findThumbnailInPictureFeature(F):null)):fetch(`${this._endpoints.search}?ids=${F}`,this._getFetchOptions()).then((F=>F.json())).then((F=>F&&Array.isArray(F.features)&&0!=F.features.length?this.findThumbnailInPictureFeature(F.features.pop()):null)):Promise.resolve(null)}getRSSURL(F){if(!this.isReady())throw new Error("API is not ready to use");if(this._endpoints.rss){let Da=this._endpoints.rss;return F&&(Da+=Da.includes("?")?"&":"?",Da+="bbox="+[F.getWest(),F.getSouth(),F.getEast(),F.getNorth()].join(",")),Da}return null}getSequenceMetadataUrl(F){if(!this.isReady())throw new Error("API is not ready to use");return`${this._endpoints.collections}/${F}`}getDataBbox(){if(!this.isReady())throw new Error("API is not ready to use");return this._dataBbox}searchUsers(F){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch(`${this._endpoints.user_search}?q=${F}`,this._getFetchOptions()).then((F=>F.json())).then((F=>(null===F||void 0===F?void 0:F.features)||null))}getUserName(F){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.user_search)throw new Error("User search is not available");return fetch(this._endpoints.user_search.replace(/\/search$/,`/${F}`),this._getFetchOptions()).then((F=>F.json())).then((F=>(null===F||void 0===F?void 0:F.name)||null))}sendReport(F){if(!this.isReady())throw new Error("API is not ready to use");if(!this._endpoints.report)throw new Error("Report sending is not available");const Da={...this._getFetchOptions(),method:"POST",body:JSON.stringify(F),headers:{"Content-Type":"application/json"}};return fetch(this._endpoints.report,Da).then((async F=>{if(F.status>=400){let ll=await F.text();try{ll=JSON.parse(ll).message}catch(Da){}return Promise.reject(ll)}return F.json()}))}static isValidHttpUrl(F){let Da;try{Da=new URL(F)}catch(ll){return!1}return"http:"===Da.protocol||"https:"===Da.protocol}static isIdValid(F){if(!F||"string"!==typeof F||0===F.length||F===hl.an)throw new Error("id should be a valid picture unique identifier");return!0}}},654:(F,Da,ll)=>{"use strict";function getExifFloat(F){if(!([null,void 0,""].includes(F)||"string"===typeof F&&""===F.trim())){if("number"===typeof F)return F;if("string"!==typeof F);else{if(/^-?\d+(\.\d+)?\/-?\d+(\.\d+)?$/.test(F)){const Da=F.split("/").map((F=>parseFloat(F)));return Da[0]/Da[1]}try{return parseFloat(F)}catch(Da){}}}}function getGPSPrecision(F){var Da,ll,cl,hl,dl;let pl="\u2753";const fl=(null===F||void 0===F||null===(Da=F.properties)||void 0===Da?void 0:Da["quality:horizontal_accuracy"])||getExifFloat(null===F||void 0===F||null===(ll=F.properties)||void 0===ll||null===(cl=ll.exif)||void 0===cl?void 0:cl["Exif.GPSInfo.GPSHPositioningError"]),Al=getExifFloat(null===F||void 0===F||null===(hl=F.properties)||void 0===hl||null===(dl=hl.exif)||void 0===dl?void 0:dl["Exif.GPSInfo.GPSDOP"]);return void 0!==fl?pl=`${fl} m`:void 0!==Al&&(pl=Al<1?"ideal":Al<2?"excellent":Al<5?"good":Al<10?"moderate":Al<20?"fair":"poor"),pl}function getSphereCorrection(F){var Da,ll,cl,hl;let dl=null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"];if(void 0===dl){var pl,fl;const Da=getExifFloat(null===(pl=F.properties)||void 0===pl||null===(fl=pl.exif)||void 0===fl?void 0:fl["Exif.GPSInfo.GPSImgDirection"]);void 0!==Da&&(dl=Da)}dl=dl||0;let Al=null===(ll=F.properties)||void 0===ll?void 0:ll["pers:yaw"],bl=["Xmp.GPano.PoseHeadingDegrees","Xmp.Camera.Yaw","Exif.MpfInfo.MPFYawAngle"];if(void 0===Al)for(let su of bl){var kl,Dl;const Da=getExifFloat(null===(kl=F.properties)||void 0===kl||null===(Dl=kl.exif)||void 0===Dl?void 0:Dl[su]);if(void 0!==Da){Al=Da;break}}Al=Al||0,Math.round(dl)===Math.round(Al)&&Al>0&&console.warn("Picture with UUID",F.id,"has same GPS Image direction and Yaw, could cause rendering issues");let Wl=null===(cl=F.properties)||void 0===cl?void 0:cl["pers:pitch"];if(bl=["Xmp.GPano.PosePitchDegrees","Xmp.Camera.Pitch","Exif.MpfInfo.MPFPitchAngle"],void 0===Wl)for(let su of bl){var Ql,wc;const Da=getExifFloat(null===(Ql=F.properties)||void 0===Ql||null===(wc=Ql.exif)||void 0===wc?void 0:wc[su]);if(void 0!==Da){Wl=Da;break}}Wl=Wl||0;let Sc=null===(hl=F.properties)||void 0===hl?void 0:hl["pers:roll"];if(bl=["Xmp.GPano.PoseRollDegrees","Xmp.Camera.Roll","Exif.MpfInfo.MPFRollAngle"],void 0===Sc)for(let su of bl){var eu,iu;const Da=getExifFloat(null===(eu=F.properties)||void 0===eu||null===(iu=eu.exif)||void 0===iu?void 0:iu[su]);if(void 0!==Da){Sc=Da;break}}return Sc=Sc||0,0!==Wl&&0!==Sc?{pan:Al*Math.PI/180,tilt:Wl*Math.PI/180,roll:Sc*Math.PI/180}:{}}function getCroppedPanoData(F){var Da,ll;let cl;var hl,dl;if(null!==(Da=F.properties)&&void 0!==Da&&Da["pers:interior_orientation"]&&(null!==(hl=F.properties["pers:interior_orientation"])&&void 0!==hl&&hl.visible_area&&null!==(dl=F.properties["pers:interior_orientation"])&&void 0!==dl&&dl.sensor_array_dimensions)){const Da=F.properties["pers:interior_orientation"].visible_area,ll=F.properties["pers:interior_orientation"].sensor_array_dimensions;try{cl={fullWidth:parseInt(ll[0]),fullHeight:parseInt(ll[1]),croppedX:parseInt(Da[0]),croppedY:parseInt(Da[1]),croppedWidth:parseInt(ll[0])-parseInt(Da[2])-parseInt(Da[0]),croppedHeight:parseInt(ll[1])-parseInt(Da[3])-parseInt(Da[1])}}catch(Wl){console.warn("Invalid pers:interior_orientation values for cropped panorama "+F.id)}}if(!cl&&null!==(ll=F.properties)&&void 0!==ll&&ll.exif)try{var pl,fl,Al,bl,kl,Dl;cl={fullWidth:parseInt(null===(pl=F.properties.exif)||void 0===pl?void 0:pl["Xmp.GPano.FullPanoWidthPixels"]),fullHeight:parseInt(null===(fl=F.properties.exif)||void 0===fl?void 0:fl["Xmp.GPano.FullPanoHeightPixels"]),croppedX:parseInt(null===(Al=F.properties.exif)||void 0===Al?void 0:Al["Xmp.GPano.CroppedAreaLeftPixels"]),croppedY:parseInt(null===(bl=F.properties.exif)||void 0===bl?void 0:bl["Xmp.GPano.CroppedAreaTopPixels"]),croppedWidth:parseInt(null===(kl=F.properties.exif)||void 0===kl?void 0:kl["Xmp.GPano.CroppedAreaImageWidthPixels"]),croppedHeight:parseInt(null===(Dl=F.properties.exif)||void 0===Dl?void 0:Dl["Xmp.GPano.CroppedAreaImageHeightPixels"])}}catch(Wl){console.warn("Invalid XMP.GPano values for cropped panorama "+F.id)}return cl&&(cl=Object.fromEntries(Object.entries(cl||{}).filter((F=>!isNaN(F[1])))),cl.fullWidth==cl.croppedWidth&&cl.fullHeight==cl.croppedHeight&&(cl={})),cl||{}}ll.d(Da,{MY:()=>getSphereCorrection,Pu:()=>getGPSPrecision,qx:()=>getCroppedPanoData})},6980:(F,Da,ll)=>{"use strict";ll.d(Da,{$:()=>getTranslations,D:()=>autoDetectLocale});var cl=ll(4149),hl=ll(369),dl=ll(389),pl=ll(9946),fl=ll(8302),Al=ll(5222),bl=ll(6909),kl=ll(4895),Dl=ll(9026),Wl=ll(6984);const Ql="en",wc={da:cl,de:hl,eo:pl,en:dl,es:fl,fr:Al,hu:bl,it:kl,pl:Dl,zh_Hant:Wl};function autoDetectLocale(F,Da){for(const ll of window.navigator.languages){let Da=ll;switch(Da){case"zh-TW":case"zh-HK":case"zh-MO":Da="zh_Hant";break;case"zh-CN":case"zh-SG":Da="zh_Hans";break;default:Da.length>2&&(Da=ll.substring(0,2))}const cl=F.find((F=>F===Da));if(cl)return cl}return Da}function getTranslations(){let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const Da=JSON.parse(JSON.stringify(dl));let ll;if(F||(F=autoDetectLocale(Object.keys(wc),Ql)),wc[F]&&"en"!==F&&(ll=wc[F]),F.length>2){const Da=F.substring(0,2);wc[Da]&&(ll=wc[Da])}return ll&&Object.entries(ll).forEach((F=>{let[ll,cl]=F;Object.entries(cl).forEach((F=>{let[cl,hl]=F;Array.isArray(hl)&&(hl=hl.filter((F=>null!=F))),Da[ll][cl]=hl}))})),Da}},1300:(F,Da,ll)=>{"use strict";ll.d(Da,{AV:()=>Al,CG:()=>combineStyles,Hj:()=>switchCoefValue,IN:()=>getUserLayerId,Kf:()=>forwardGeocodingBAN,No:()=>getThumbGif,Oq:()=>getMissingLayerStyles,RK:()=>forwardGeocodingNominatim,Sf:()=>isLabelLayer,VM:()=>Dl,d3:()=>wc,e8:()=>getUserSourceId,m5:()=>bl,oe:()=>kl});var cl=ll(927),hl=ll.n(cl),dl=ll(6883),pl=ll(5071),fl=ll(6980);const Al="https://panoramax.openstreetmap.fr/pmtiles/basic.json",bl="gvs-aerial",kl=15,Dl={PICTURES:{paint:{"circle-radius":["interpolate",["linear"],["zoom"],kl,4.5,18,6,24,12],"circle-opacity":["interpolate",["linear"],["zoom"],kl,0,kl+1,1],"circle-stroke-color":"#ffffff","circle-stroke-width":["interpolate",["linear"],["zoom"],kl+1,0,kl+2,1,18,1.5,24,3]},layout:{}},PICTURES_SYMBOLS:{paint:{"icon-opacity":["interpolate",["linear"],["zoom"],18,0,19,1]},layout:{"icon-image":["case",["==",["get","type"],"equirectangular"],"gvs-arrow-360","gvs-arrow-flat"],"icon-size":["interpolate",["linear"],["zoom"],18,.5,24,1],"icon-rotate":["to-number",["get","heading"]],"icon-allow-overlap":!0}},SEQUENCES:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,.5,10,2,14,4,16,5,22,3]},layout:{"line-cap":"square"}},SEQUENCES_PLUS:{paint:{"line-width":["interpolate",["linear"],["zoom"],0,15,kl+1,30,kl+2,0],"line-opacity":0,"line-color":"#ff0000"},layout:{"line-cap":"square"}}},Wl=["case",["==",["get","type"],"equirectangular"],["case",["has","h_pixel_density"],["step",["get","h_pixel_density"],...pl.Av],1],["case",["has","h_pixel_density"],["step",["get","h_pixel_density"],...pl.U3],1]],Ql=["case",["has","gps_accuracy"],["step",["get","gps_accuracy"],...pl.ql],1],wc=["round",["+",["*",Wl,pl.Xu],["*",Ql,pl.Bg]]];function getThumbGif(F){const Da=document.createElement("img");return Da.src=dl,Da.alt=F.loading,Da.title=F.loading,Da.classList.add("gvs-map-thumb","gvs-map-thumb-loader"),Da}function isLabelLayer(F){var Da;return"symbol"===F.type&&(null===F||void 0===F||null===(Da=F.layout)||void 0===Da?void 0:Da["text-field"])&&(void 0===F.minzoom||F.minzoom<15)}function combineStyles(F,Da){var ll,cl,hl;const dl=F._api.getMapStyle();if(dl.layers=dl.layers.concat(getMissingLayerStyles(dl.sources,dl.layers)),dl.metadata||(dl.metadata={}),Da.supplementaryStyle&&(Object.assign(dl.sources,Da.supplementaryStyle.sources||{}),Object.assign(dl.metadata,Da.supplementaryStyle.metadata||{}),dl.layers=dl.layers.concat(Da.supplementaryStyle.layers||[])),Da.raster&&(dl.sources["gvs-aerial"]=Da.raster,dl.layers.push({id:bl,type:"raster",source:"gvs-aerial",layout:{visibility:"aerial"===Da.background?"visible":"none"}})),null!==(ll=F._options)&&void 0!==ll&&null!==(cl=ll.users)&&void 0!==cl&&cl.includes("geovisio")||dl.layers.forEach((F=>{"geovisio"===F.source&&(F.layout||(F.layout={}),F.layout.visibility="none")})),dl.layers.sort(((F,Da)=>isLabelLayer(F)&&!isLabelLayer(Da)?1:!isLabelLayer(F)&&isLabelLayer(Da)?-1:F.id.startsWith("geovisio")&&!Da.id.startsWith("geovisio")?1:!F.id.startsWith("geovisio")&&Da.id.startsWith("geovisio")?-1:F.id.endsWith("_pictures")&&!Da.id.endsWith("_pictures")?1:!F.id.endsWith("_pictures")&&Da.id.endsWith("_pictures")?-1:0)),null!==(hl=dl.metadata)&&void 0!==hl&&hl["panoramax:locales"]||(dl.metadata["panoramax:locales"]=["fr","en","de","es","ru","pt","zh","hi","latin"]),dl.metadata["panoramax:locales"]){let Da=F._options.lang||(0,fl.D)(dl.metadata["panoramax:locales"],"latin");Da.includes("-")&&(Da=Da.split("-")[0]),Da.includes("_")&&(Da=Da.split("_")[0]),dl.layers.forEach((F=>{isLabelLayer(F)&&F.layout["text-field"].includes("name:latin")&&(F.layout["text-field"]=["coalesce",["get",`name:${Da}`],["get","name:latin"],["get","name"]])}))}const pl=dl.layers.find((F=>"place_label_city"==F.id));let Al=dl.layers.find((F=>"place_label_capital"==F.id));return pl&&!Al&&(pl.paint={"text-color":"hsl(0, 0%, 0%)","text-halo-blur":0,"text-halo-color":"hsla(0, 0%, 100%, 1)","text-halo-width":3},pl.layout["text-letter-spacing"]=.1,Al=JSON.parse(JSON.stringify(pl)),Al.id="place_label_capital",Al.filter.push(["<=","capital",2]),pl.filter.push([">","capital",2]),dl.layers.push(Al)),dl}function getMissingLayerStyles(F,Da){const ll=[];return Object.keys(F).filter((F=>void 0===Da.find((Da=>(null===Da||void 0===Da?void 0:Da.source)===F)))).forEach((F=>{F.startsWith("geovisio")&&(ll.push({id:`${F}_sequences`,type:"line",source:F,"source-layer":"sequences",layout:{...Dl.SEQUENCES.layout},paint:{...Dl.SEQUENCES.paint,"line-color":pl.lm.BASE}}),ll.push({id:`${F}_sequences_plus`,type:"line",source:F,"source-layer":"sequences",layout:{...Dl.SEQUENCES_PLUS.layout},paint:{...Dl.SEQUENCES_PLUS.paint}}),ll.push({id:`${F}_pictures_symbols`,type:"symbol",source:F,"source-layer":"pictures",...Dl.PICTURES_SYMBOLS}),ll.push({id:`${F}_pictures_symbols`,type:"symbol",source:F,"source-layer":"pictures",...Dl.PICTURES_SYMBOLS}),ll.push({id:`${F}_pictures`,type:"circle",source:F,"source-layer":"pictures",layout:{...Dl.PICTURES.layout},paint:{...Dl.PICTURES.paint,"circle-color":pl.lm.BASE}}))})),Da.filter((F=>{var ll;return(null===F||void 0===F||null===(ll=F.id)||void 0===ll?void 0:ll.endsWith("_sequences"))&&void 0===Da.find((Da=>(null===Da||void 0===Da?void 0:Da.id)===F.id+"_plus"))})).forEach((F=>{ll.push({id:`${F.id}_plus`,type:"line",source:F.source,"source-layer":F["source-layer"],layout:{...Dl.SEQUENCES_PLUS.layout},paint:{...Dl.SEQUENCES_PLUS.paint}})})),Da.filter((F=>{var ll;return(null===F||void 0===F||null===(ll=F.id)||void 0===ll?void 0:ll.endsWith("_pictures"))&&void 0===Da.find((Da=>(null===Da||void 0===Da?void 0:Da.id)===F.id+"_symbols"))})).forEach((F=>{ll.unshift({id:`${F.id}_symbols`,type:"symbol",source:F.source,"source-layer":"pictures",...Dl.PICTURES_SYMBOLS}),F.paint=Object.assign(F.paint||{},Dl.PICTURES.paint),F.layout=Object.assign(F.layout||{},Dl.PICTURES.layout)})),ll}function getUserLayerId(F,Da){return`${getUserSourceId(F)}_${Da}`}function getUserSourceId(F){return"geovisio"===F?"geovisio":"geovisio_"+F}function switchCoefValue(F,Da){if(Array.isArray(F))return F.map((F=>switchCoefValue(F,Da)));if("object"===typeof F&&null!==F){const ll={};for(const cl in F)ll[cl]=switchCoefValue(F[cl],Da);return ll}return"string"===typeof F&&F.startsWith("coef")?Da:F}function geocoderParamsToURLString(F){let Da={};return Object.entries(F).filter((F=>void 0!==F[1]&&null!==F[1])).forEach((F=>Da[F[0]]=F[1])),new URLSearchParams(Da).toString()}function forwardGeocodingNominatim(F){const Da={q:F.query,countrycodes:F.countries,limit:F.limit,viewbox:F.bbox};return fetch(`https://nominatim.openstreetmap.org/search?${geocoderParamsToURLString(Da)}&format=geojson&polygon_geojson=1&addressdetails=1`).then((F=>F.json())).then((F=>{const Da={features:[]},ll=[];return F.features.forEach((F=>{ll.includes(F.properties.display_name)||(Da.features.push({place_type:["place"],place_name:F.properties.display_name,bounds:new(hl().LngLatBounds)(F.bbox)}),ll.push(F.properties.display_name))})),Da}))}function forwardGeocodingBAN(F){const Da={q:F.query,limit:F.limit};if("string"===typeof F.proximity){const[ll,cl]=F.proximity.split(",").map((F=>parseFloat(F.trim())));Da.lat=ll,Da.lon=cl}const ll={housenumber:20,street:18,locality:15,municipality:12};return fetch(`https://api-adresse.data.gouv.fr/search/?${geocoderParamsToURLString(Da)}`).then((F=>F.json())).then((F=>(F.features=F.features.map((F=>{return{place_type:["place"],place_name:(Da=F.properties,[Da.name,Da.district,Da.city].filter((F=>F)).join(", ")),center:new(hl().LngLat)(...F.geometry.coordinates),zoom:ll[F.properties.type]};var Da})),F)))}},3727:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>PhotoAdapter});var cl=ll(3890);class PhotoAdapter extends cl.D{constructor(F,Da){super(F,Da),this._shouldGoFast=Da.shouldGoFast||(()=>!0)}loadTexture(F,Da){return F.origBaseUrl?F.baseUrl=F.origBaseUrl:F.origBaseUrl=F.baseUrl,this._shouldGoFast()&&F.thumbUrl&&!F.hdLoaded&&1==F.rows&&(F.baseUrl=F.thumbUrl),super.loadTexture(F,Da).then((Da=>(F.baseUrl===F.origBaseUrl&&(F.hdLoaded=!0),Da)))}__loadTiles(F){this._shouldGoFast()||super.__loadTiles(F)}}},5071:(F,Da,ll)=>{"use strict";ll.d(Da,{Av:()=>kl,Bg:()=>Ql,Ch:()=>getGrade,GZ:()=>isInIframe,I0:()=>linkMapAndPhoto,KF:()=>isInternetFast,U3:()=>bl,Xu:()=>Wl,Yf:()=>getDistance,an:()=>pl,bG:()=>getUserAccount,dK:()=>josmBboxParameters,dj:()=>getRelativeHeading,fW:()=>Al,lm:()=>fl,oi:()=>positionToXYZ,ql:()=>Dl,rs:()=>apiFeatureToPSVNode,y7:()=>xyzToPosition});var cl=ll(654),hl=ll(8407),dl=ll(6830);const pl="geovisio-fake-id-0",fl={BASE:"#FF6F00",SELECTED:"#1E88E5",HIDDEN:"#34495E",NEXT:"#ffab40",QUALI_1:"#00695C",QUALI_2:"#fd8d3c",PALETTE_1:"#fecc5c",PALETTE_2:"#fd8d3c",PALETTE_3:"#f03b20",PALETTE_4:"#bd0026"},Al=(Object.fromEntries(Object.entries(fl).map((F=>(F[1]=parseInt(F[1].slice(1),16),F)))),[{color:"#007f4e",label:"A"},{color:"#72b043",label:"B"},{color:"#b5be2f",label:"C"},{color:"#f8cc1b",label:"D"},{color:"#f6a020",label:"E"}]),bl=[1,10,2,15,3,30,4],kl=[3,15,4,30,5],Dl=[5,1.01,4,2.01,3,5.01,2,10.01,1],Wl=.8,Ql=.2,wc=svgToPSVLink(hl,"white"),Sc=svgToPSVLink(dl,fl.NEXT);function getGrade(F,Da){if(null===Da||void 0===Da||""===Da)return null;for(let ll=0;ll<F.length;ll+=2){const cl=F[ll];if(Da<F[ll+1])return cl}return F[F.length-1]}function getDistance(F,Da){const ll=F[0]-Da[0],cl=F[1]-Da[1];return Math.sqrt(ll*ll+cl*cl)}function sortPicturesInDirection(F){return(Da,ll)=>"related"!=Da.rel&&"related"!=ll.rel?0:"related"!=Da.rel?-1:"related"!=ll.rel?1:Da.date==ll.date?getDistance(F,Da.geometry.coordinates)-getDistance(F,ll.geometry.coordinates):ll.date.localeCompare(Da.date)}function svgToPSVLink(F,Da){try{const ll=atob(F.replace(/^data:image\/svg\+xml;base64,/,"")),cl=(new DOMParser).parseFromString(ll,"image/svg+xml").childNodes[0],hl=document.createElement("button");return hl.appendChild(cl),hl.classList.add("gvs-psv-tour-arrows"),hl.style.color=Da,hl}catch(ll){const Da=document.createElement("img");return Da.src=F,Da.alt="",Da}}function getArrow(F){const Da=F.cloneNode(!0);return Da.addEventListener("pointerup",(()=>Da.classList.add("gvs-clicked"))),Da}function getAzimuth(F,Da){return(Math.atan2(Da[0]-F[0],Da[1]-F[1])*(180/Math.PI)+360)%360}function getRelativeHeading(F){var Da,ll;if(!F)throw new Error("No picture selected");let cl,hl;const dl=F.properties["view:azimuth"];if(null!==F&&void 0!==F&&null!==(Da=F.sequence)&&void 0!==Da&&Da.prevPic){var pl;const Da=null===F||void 0===F||null===(pl=F.links)||void 0===pl?void 0:pl.find((Da=>Da.nodeId===F.sequence.prevPic));Da&&(cl=(dl-getAzimuth(Da.gps,F.gps)+180)%360-180)}if(null!==F&&void 0!==F&&null!==(ll=F.sequence)&&void 0!==ll&&ll.nextPic){var fl;const Da=null===F||void 0===F||null===(fl=F.links)||void 0===fl?void 0:fl.find((Da=>Da.nodeId===F.sequence.nextPic));Da&&(hl=(dl-getAzimuth(F.gps,Da.gps)+180)%360-180)}return void 0!==cl?cl:void 0!==hl?hl:0}function getSimplifiedAngle(F,Da){const ll=Math.atan2(Da[0]-F[0],Da[1]-F[1])*(180/Math.PI);return Math.abs(ll)<30?"N":ll>=30&&ll<90?"ENE":ll>=90&&ll<150?"ESE":Math.abs(ll)>=150?"S":ll<=-30&&ll>-90?"WNW":ll<=-90&&ll>-150?"WSW":void 0}function positionToXYZ(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const ll={x:F.yaw*(180/Math.PI),y:F.pitch*(180/Math.PI)};return void 0!==Da&&(ll.z=Da),ll}function xyzToPosition(F,Da,ll){return{yaw:F/(180/Math.PI),pitch:Da/(180/Math.PI),zoom:ll}}function getNodeCaption(F,Da){var ll,cl,hl;const dl={};if(null!==F&&void 0!==F&&null!==(ll=F.properties)&&void 0!==ll&&ll.datetimetz?dl.date=new Date(F.properties.datetimetz):null!==F&&void 0!==F&&null!==(cl=F.properties)&&void 0!==cl&&cl.datetime&&(dl.date=new Date(F.properties.datetime)),null!==F&&void 0!==F&&F.providers){var pl;const Da=null===F||void 0===F||null===(pl=F.providers)||void 0===pl?void 0:pl.filter((F=>{var Da;return null===F||void 0===F||null===(Da=F.roles)||void 0===Da?void 0:Da.includes("producer")}));if((null===Da||void 0===Da?void 0:Da.length)>=0){const F={};Da.map((F=>F.name)).forEach((Da=>{const ll=Da.toLowerCase().replace(/\s/g,"");F[ll]?F[ll].push(Da):F[ll]=[Da]})),dl.producer=[],Object.values(F).forEach((F=>{const Da=F[0],ll=F.find((F=>F.toLowerCase()!=F));dl.producer.push(ll||Da)})),dl.producer=dl.producer.join(", ")}}if(null!==F&&void 0!==F&&null!==(hl=F.properties)&&void 0!==hl&&hl.license&&(dl.license=F.properties.license,null!==F&&void 0!==F&&F.links)){const ll=F.links.find((F=>"license"===(null===F||void 0===F?void 0:F.rel)));ll&&(dl.license=`<a href="${ll.href}" title="${Da.gvs.metadata_general_license_link}" target="_blank">${dl.license}</a>`)}return dl}function linkMapAndPhoto(F){const onPicLoad=Da=>{Da.detail.picId&&Da.detail.picId!==pl?(F.map.displayPictureMarker(Da.detail.lon,Da.detail.lat,F.psv.getXY().x),null!==F&&void 0!==F&&F.isMapWide()&&(null===F||void 0===F||F.setUnfocusedVisible(!0))):(F.map.displayPictureMarker(),null!==F&&void 0!==F&&F.isMapWide()&&(null===F||void 0===F||F.setUnfocusedVisible(!1)))};F.addEventListener("psv:picture-loading",onPicLoad),F.addEventListener("psv:picture-loaded",onPicLoad),F.addEventListener("psv:view-rotated",(()=>{let Da=F.psv.getPosition().yaw*(180/Math.PI);Da+=F.psv.getPictureOriginalHeading(),F.map._picMarker.setRotation(Da)})),F.addEventListener("psv:picture-preview-started",(Da=>{F.map._picMarkerPreview.setLngLat(Da.detail.coordinates).setRotation(Da.detail.direction||0).addTo(F.map)})),F.addEventListener("psv:picture-preview-stopped",(()=>{F.map._picMarkerPreview.remove()})),F.addEventListener("psv:picture-loaded",(Da=>{F.isWidthSmall()&&F._picPopup&&Da.detail.picId==F._picPopup._picId&&F._picPopup.remove()})),F.addEventListener("map:picture-click",(Da=>{F.select(Da.detail.seqId,Da.detail.picId),!F.psv._myVTour.state.currentNode&&null!==F&&void 0!==F&&F.setFocus&&F.setFocus("pic")})),F.addEventListener("map:sequence-click",(Da=>{F._api.getPicturesAroundCoordinates(Da.detail.coordinates.lat,Da.detail.coordinates.lng,1,1,Da.detail.seqId).then((Da=>{var ll,cl;(null===Da||void 0===Da||null===(ll=Da.features)||void 0===ll?void 0:ll.length)>0&&(F.select(null===(cl=Da.features[0])||void 0===cl?void 0:cl.collection,Da.features[0].id),!F.psv.getPictureMetadata()&&null!==F&&void 0!==F&&F.setFocus&&F.setFocus("pic"))}))}))}function apiFeatureToPSVNode(F,Da){var ll,hl,dl,pl,fl,Al,bl;let kl=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Dl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const Wl=null!=(null===(ll=F.properties)||void 0===ll||null===(hl=ll["pers:interior_orientation"])||void 0===hl?void 0:hl.field_of_view);let Ql=Wl?parseInt(F.properties["pers:interior_orientation"].field_of_view):70;const wc=360===Ql,Sc=(Object.values(F.assets).find((F=>{var Da;return null===F||void 0===F||null===(Da=F.roles)||void 0===Da?void 0:Da.includes("data")}))||{}).href,eu=null===F||void 0===F||null===(dl=F.properties)||void 0===dl||null===(pl=dl["tiles:tile_matrix_sets"])||void 0===pl?void 0:pl.geovisio,iu=F.links.find((F=>"prev"===(null===F||void 0===F?void 0:F.rel)&&"application/geo+json"===(null===F||void 0===F?void 0:F.type))),su=F.links.find((F=>"next"===(null===F||void 0===F?void 0:F.rel)&&"application/geo+json"===(null===F||void 0===F?void 0:F.type))),cu=Object.values(F.assets).find((F=>{var Da;return(null===(Da=F.roles)||void 0===Da?void 0:Da.includes("visual"))&&"image/webp"===F.type})),uu=Object.values(F.assets).find((F=>{var Da;return(null===(Da=F.roles)||void 0===Da?void 0:Da.includes("visual"))&&"image/jpeg"===F.type})),hu=(cu||uu).href,Lu=null===(fl=Object.values(F.assets).find((F=>{var Da;return(null===(Da=F.roles)||void 0===Da?void 0:Da.includes("thumbnail"))&&"image/jpeg"===F.type})))||void 0===fl?void 0:fl.href,zu=(null===F||void 0===F||null===(Al=F.asset_templates)||void 0===Al?void 0:Al.tiles_webp)||(null===F||void 0===F||null===(bl=F.asset_templates)||void 0===bl?void 0:bl.tiles),Du=(0,cl.qx)(F);let Nu;Nu=!zu&&Object.keys(Du).length>0?{baseUrl:kl?Sc:hu,origBaseUrl:kl?Sc:hu,hdUrl:Sc,thumbUrl:Lu,basePanoData:Du,cols:2,rows:1,width:2,tileUrl:()=>null}:wc&&eu?{baseUrl:hu,origBaseUrl:hu,basePanoData:F=>({fullWidth:F.width,fullHeight:F.height}),hdUrl:Sc,thumbUrl:Lu,cols:eu&&eu.tileMatrix[0].matrixWidth,rows:eu&&eu.tileMatrix[0].matrixHeight,width:eu&&eu.tileMatrix[0].matrixWidth*eu.tileMatrix[0].tileWidth,tileUrl:eu&&((F,Da)=>zu.href.replace(/\{TileCol\}/g,F).replace(/\{TileRow\}/g,Da))}:{baseUrl:kl?Sc:hu,origBaseUrl:kl?Sc:hu,hdUrl:Sc,thumbUrl:Lu,basePanoData:F=>{F.width<F.height&&!Wl&&(Ql=35);const Da=Ql*F.height/F.width,ll=360*F.width/Ql,cl=180*F.height/Da;return{fullWidth:ll,fullHeight:cl,croppedWidth:F.width,croppedHeight:F.height,croppedX:(ll-F.width)/2,croppedY:(cl-F.height)/2}},cols:2,rows:1,width:2,tileUrl:()=>null};return{id:F.id,caption:getNodeCaption(F,Da),panorama:Nu,links:filterRelatedPicsLinks(F,Dl),gps:F.geometry.coordinates,sequence:{id:F.collection,nextPic:su?su.id:void 0,prevPic:iu?iu.id:void 0},sphereCorrection:(0,cl.MY)(F),horizontalFov:Ql,properties:F.properties}}function filterRelatedPicsLinks(F){var Da;let ll=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const cl=F.links.filter((F=>["next","prev","related"].includes(null===F||void 0===F?void 0:F.rel)&&"application/geo+json"===(null===F||void 0===F?void 0:F.type))).filter((F=>!ll||ll(F))).map((F=>(F.datetime&&(F.date=F.datetime.split("T")[0]),F))),hl=F.geometry.coordinates,dl=[],pl={N:[],ENE:[],ESE:[],S:[],WSW:[],WNW:[]};for(let Al of cl){pl[getSimplifiedAngle(hl,Al.geometry.coordinates)].push(Al)}for(let Al in pl){const F=pl[Al];0!=F.length&&(F.sort(sortPicturesInDirection(hl)),dl.push(F.shift()))}let arrowStyle=F=>"related"===F.rel?{element:getArrow(Sc),size:{width:128/3,height:128}}:{element:getArrow(wc),size:{width:75,height:75}};const fl=-((null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"])||0)*(Math.PI/180);return dl.map((F=>({nodeId:F.id,gps:F.geometry.coordinates,arrowStyle:arrowStyle(F),linkOffset:{yaw:fl}})))}function josmBboxParameters(F){if(F){var Da;const ll=F.gps,cl=null===F||void 0===F||null===(Da=F.properties)||void 0===Da?void 0:Da["view:azimuth"],hl=2e-4,dl={left:ll[0]-(null===cl||cl>=180?hl:0),right:ll[0]+(null===cl||cl<=180?hl:0),top:ll[1]+(null===cl||cl<=90||cl>=270?hl:0),bottom:ll[1]-(null===cl||cl>=90&&cl<=270?hl:0),changeset_source:"Panoramax"};return Object.entries(dl).map((F=>F.join("="))).join("&")}return null}function isInIframe(){try{return window.self!==window.top}catch(F){return!0}}const eu=10,iu="gvs-internet-fast",su="https://panoramax.openstreetmap.fr/images/05/ca/2c/98/0111-4baf-b6f3-587bb8847d2e.jpg";function isInternetFast(){try{const F=navigator.connection.downlink;return Promise.resolve(F>=eu)}catch(F){try{const F=sessionStorage.getItem(iu);if(["true","false"].includes(F))return Promise.resolve("true"===F);const Da=(new Date).getTime();return fetch(su+"?nocache="+Da).then((async F=>[F,await F.blob()])).then((F=>{let[ll,cl]=F;const hl=8*parseInt(ll.headers.get("Content-Length")||cl.size)/1024/1024/(((new Date).getTime()-Da)/1e3)>=eu;return sessionStorage.setItem(iu,hl?"true":"false"),hl})).catch((F=>(console.warn("Failed to run speedtest",F),!1)))}catch(F){return Promise.resolve(!1)}}}function getCookie(F){var Da,ll,cl;const hl=null===(Da=document.cookie)||void 0===Da||null===(ll=Da.split(";"))||void 0===ll||null===(cl=ll.find((Da=>Da.trimStart().startsWith(`${F}=`))))||void 0===cl?void 0:cl.split("=");if(hl)return hl.shift(),hl.join("=")}function getUserAccount(){const F=getCookie("session"),Da=getCookie("user_id"),ll=getCookie("user_name");return F&&Da&&ll?{id:Da,name:ll}:null}},4683:(F,Da,ll)=>{"use strict";ll.d(Da,{$c:()=>enableCopyButton,Ij:()=>createHeader,Lt:()=>showQualityScore,OZ:()=>createSearchBar,Qt:()=>fat,Tf:()=>createButton,W_:()=>closeOtherPanels,Y8:()=>enableButton,ZR:()=>createTable,do:()=>createButtonSpan,fM:()=>showGrade,fP:()=>createLinkCell,fa:()=>fa,fp:()=>createLabel,np:()=>createExpandableButton,t_:()=>createPanel,vI:()=>disableButton,wj:()=>createGroup});var cl=ll(3710),hl=ll(6627),dl=ll(4011),pl=ll(2593),fl=ll(7761),Al=ll(3444),bl=ll(174),kl=ll(4189),Dl=ll(4780),Wl=ll(7325),Ql=ll(5071);function createButton(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,cl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const hl=document.createElement("button");return Da&&(Da instanceof HTMLElement||Da instanceof Node?hl.appendChild(Da):hl.innerHTML=Da),hl.id=F,Array.isArray(cl)&&(cl=cl.filter((F=>null!=F&&F.length>0))),hl.classList.add("gvs-btn","gvs-widget-bg",...cl),ll&&(hl.title=ll),hl}function createExpandableButton(F,Da,ll,cl){let dl=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const fl=document.createElement("button");if(fl.id=F,fl.appendChild(fa(Da)),cl._viewer.isWidthSmall())fl.title=ll;else{if(fl.appendChild(document.createTextNode(ll)),dl.includes("gvs-filter-unset-btn")){const F=fa(hl.Jy,{classes:["gvs-filter-unset-btn"]});F.style.display="none",fl.appendChild(F),dl=dl.filter((F=>"gvs-filter-unset-btn"!==F))}fl.appendChild(fa(pl.Jt))}return fl.classList.add("gvs-btn","gvs-widget-bg","gvs-btn-expandable",...dl),fl.setActive=F=>{let Da=fl.querySelector(".gvs-filters-active");const ll=fl.querySelector(".gvs-filter-unset-btn"),cl=fl.querySelector(".fa-chevron-down");if(F&&!Da){Da=document.createElement("span"),Da.classList.add("gvs-filters-active");const F=fl.querySelector("svg");F.nextSibling?fl.insertBefore(Da,F.nextSibling):fl.appendChild(Da),ll&&(ll.style.display=null,cl.style.display="none")}else!F&&Da&&(Da.remove(),ll&&(ll.style.display="none",cl.style.display=null))},fl}function createSearchBar(F,Da,ll,cl,pl){let bl=arguments.length>5&&void 0!==arguments[5]&&arguments[5],kl=arguments.length>6&&void 0!==arguments[6]&&arguments[6],Dl=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;const Wl=document.createElement("div");Wl.classList.add("gvs-widget-bg","gvs-search-bar"),Wl.id=F,kl&&Wl.classList.add("gvs-search-bar-reducable"),Dl&&Wl.appendChild(Dl);const Ql=document.createElement("input");Ql.type="text",Ql.placeholder=Da,Ql.id=`${F}-input`,Ql.setAttribute("autocomplete","off"),Wl.appendChild(Ql);const extendInput=()=>{Wl.classList.remove("gvs-search-bar-reduced")},reduceInput=()=>{Wl.classList.add("gvs-search-bar-reduced")};kl&&reduceInput();const wc=document.createElement("span");wc.classList.add("gvs-search-bar-icon");const Sc=fa(fl.$U),eu=fa(Al.s4,{classes:["fa-spin"]}),iu=fa(hl.Jy),su=fa(dl.lE);wc.appendChild(Sc),Wl.appendChild(wc);const cu=createPanel(pl,Wl,[],["gvs-search-bar-results"],bl);Wl.appendChild(cu);const switchIcon=F=>{wc.innerHTML="",wc.appendChild(F)},resetSearch=()=>{Wl._throttler&&clearTimeout(Wl._throttler),Ql.value="",cu.innerHTML="",cu._toggle(!1),delete Wl._lastSearch,switchIcon(Sc),cl(null),kl&&reduceInput()};Wl.resetSearch=resetSearch,Ql.goItem=F=>{kl?(cl(F),resetSearch()):(Wl._throttler&&clearTimeout(Wl._throttler),Ql.value=F.title,cu.innerHTML="",cu._toggle(!1),switchIcon(iu),cl(F))},Ql.setItem=F=>{Wl._throttler&&clearTimeout(Wl._throttler),Ql.value=F,cu.innerHTML="",cu._toggle(!1),switchIcon(iu),kl&&extendInput()};const goSearch=()=>{if(Wl._throttler&&clearTimeout(Wl._throttler),0===Ql.value.length)return cu.innerHTML="",void cu._toggle(!1);Wl._throttler=setTimeout((()=>{cu.innerHTML="",cu._toggle(!1),switchIcon(eu),ll(Ql.value).then((F=>{switchIcon(iu),cu._toggle(!0),F&&0!=F.length?!0!==F?F.forEach((F=>{const Da=document.createElement("div");Da.classList.add("gvs-search-bar-result"),Da.innerHTML=`${F.title}<br /><small>${(null===F||void 0===F?void 0:F.subtitle)||""}</small>`,cu.appendChild(Da),Da.addEventListener("click",(()=>Ql.goItem(F)))})):cu._toggle(!1):cu.innerHTML=`<div class="gvs-search-empty">${pl._t.gvs.search_empty}</li>`})).catch((F=>{console.error(F),switchIcon(su)}))}),250)};return Ql.addEventListener("change",goSearch),Ql.addEventListener("keypress",goSearch),Ql.addEventListener("paste",goSearch),Ql.addEventListener("input",goSearch),wc.addEventListener("click",(()=>{wc.firstChild!=iu&&wc.firstChild!=su||resetSearch(),kl&&wc.firstChild==Sc&&(Wl.classList.contains("gvs-search-bar-reduced")?extendInput():reduceInput())})),Wl}function createPanel(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],cl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],hl=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const dl=document.createElement("div");dl.id=Da.id+"-panel",Array.isArray(cl)&&(cl=cl.filter((F=>null!=F&&F.length>0))),dl.classList.add("gvs-panel","gvs-widget-bg","gvs-hidden",...cl);for(let pl of ll)dl.appendChild(pl);const togglePanel=(Da,ll)=>{Da&&Da.stopPropagation(),!0===ll?dl.classList.remove("gvs-hidden"):!1===ll?dl.classList.add("gvs-hidden"):(dl.classList.toggle("gvs-hidden"),ll=!dl.classList.contains("gvs-hidden")),ll&&!hl&&closeOtherPanels(dl,F._viewer.container)};return dl._toggle=F=>togglePanel(null,F),"BUTTON"==Da.tagName&&(Da.addEventListener("click",togglePanel),Da.addEventListener("hover",togglePanel)),dl}function closeOtherPanels(F,Da){var ll;const isPanel=F=>F.classList.contains("gvs-panel")||F.classList.contains("gvs-search-bar-result")||F.classList.contains("gvs-search-empty")||F.classList.contains("gvs-search-bar-reducable");if(!isPanel(F)&&null!==(ll=F)&&void 0!==ll&&ll.parentNode)for(F=F.parentNode;F instanceof Element&&!isPanel(F);)F=F.parentNode;for(const cl of Da.getElementsByClassName("gvs-panel"))cl==F||cl.contains(F)||cl.classList.contains("gvs-hidden")||cl.classList.add("gvs-hidden");for(const cl of Da.getElementsByClassName("gvs-search-bar-reducable"))cl==F||cl.contains(F)||cl.classList.contains("gvs-search-bar-reduced")||cl.resetSearch()}function createGroup(F,Da,ll){let cl=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],hl=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const dl=document.createElement("div");dl.id=F,Array.isArray(hl)&&(hl=hl.filter((F=>null!=F&&F.length>0))),dl.classList.add("gvs-group",...hl);for(let pl of cl)dl.appendChild(pl);return ll._corners[Da].appendChild(dl),dl}function enableCopyButton(F,Da){for(let ll of F.getElementsByTagName("button")){const F=ll.getAttribute("data-input"),cl=ll.getAttribute("data-copy");(F||cl)&&ll.addEventListener("click",(()=>{let hl;if(F){const Da=document.getElementById(F);hl=Da.innerText||Da.value}else cl&&(hl=ll.getAttribute("data-copy"));navigator.clipboard.writeText(hl);const dl=ll.innerHTML;ll.innerHTML=`${Da.gvs.copied} ${fat(bl.e6)}`,ll.classList.add("gvs-btn-active"),setTimeout((()=>{ll.innerHTML=dl,ll.classList.remove("gvs-btn-active")}),2e3)}))}}function enableButton(F){F.removeAttribute("disabled")}function disableButton(F){F.setAttribute("disabled","")}function fa(F,Da){return(0,cl.Kk)(F,Da).node[0]}function fat(F,Da){return(0,cl.Kk)(F,Da).html[0]}function createLinkCell(F,Da,ll,cl){const hl=document.createElement("a");hl.href=Da,hl.target="_blank",hl.title=ll,hl.textContent=F;return[hl,createButtonSpan(`${fat(kl.jP)} ${cl}`,F)]}function createTable(F,Da){const ll=document.createElement("table");return ll.className=F,Da.forEach((F=>{let{section:Da,value:cl,values:hl,classes:dl}=F;const pl=document.createElement("tr"),fl=document.createElement("th");fl.scope="row",fl.textContent=Da,pl.appendChild(fl);const Al=document.createElement("td");dl&&Al.classList.add(...dl),hl?hl.forEach((F=>Al.appendChild(F))):cl instanceof HTMLElement?Al.appendChild(cl):Al.innerHTML=cl,pl.appendChild(Al),ll.appendChild(pl)})),ll}function createHeader(F,Da){const ll=document.createElement(F);return ll.innerHTML=Da,ll}function createButtonSpan(F){let Da=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const ll=document.createElement("button");ll.innerHTML=F,Da&&ll.setAttribute("data-copy",Da);const cl=document.createElement("span");return cl.className="gvs-input-btn",cl.appendChild(ll),cl}function createLabel(F,Da){let ll=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const cl=document.createElement("label");return cl.htmlFor=F,ll&&cl.appendChild(fa(ll)),cl.appendChild(document.createTextNode(Da)),cl}function showGrade(F,Da){let ll='<span class="gvs-grade">';for(let cl=1;cl<=F;cl++)ll+=fat(Dl.yy);for(let cl=F+1;cl<=5;cl++)ll+=fat(Wl.yy);return ll+="</span> (",ll+=null===F?Da.gvs.metadata_quality_missing+")":F+"/5)",ll}function showQualityScore(F){const Da=document.createElement("span");for(let ll=1;ll<=Ql.fW.length;ll++){const cl=Ql.fW[ll-1],hl=document.createElement("span");hl.appendChild(document.createTextNode(cl.label)),hl.classList.add("gvs-qualityscore"),hl.style.backgroundColor=cl.color,ll===6-F&&hl.classList.add("gvs-qualityscore-selected"),Da.appendChild(hl)}return Da}},9194:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>URLHash});const cl={minDate:"date_from",maxDate:"date_to",type:"pic_type",camera:"camera",theme:"theme",qualityscore:"pic_score"},hl=Object.fromEntries(Object.entries(cl).map((F=>[F[1],F[0]]))),dl=["psv:view-rotated","psv:picture-loaded","focus-changed","filters-changed","psv:transition-duration-changed","map:background-changed","map:users-changed","pictures-navigation-changed"];class URLHash extends EventTarget{constructor(F){super(),this._viewer=F,this._delay=null,this._hashChangeHandler=this._onHashChange.bind(this),F.addEventListener("ready",(()=>{window.addEventListener("hashchange",this._hashChangeHandler,!1),dl.forEach((F=>this._viewer.addEventListener(F,this._updateHash.bind(this))))}),{once:!0})}destroy(){var F,Da;window.removeEventListener("hashchange",this._hashChangeHandler),delete this._hashChangeHandler,null===(F=this._viewer)||void 0===F||null===(Da=F.map)||void 0===Da||Da.off("moveend",this._updateHash),dl.forEach((F=>this._viewer.removeEventListener(F,this._updateHash))),delete this._viewer,this._updateHash()}bindMapEvents(){this._viewer.map.on("moveend",this._updateHash.bind(this))}_getHashParts(){let F={};"number"==typeof this._viewer.psv.getTransitionDuration()&&(F.speed=this._viewer.psv.getTransitionDuration()),[null,"any"].includes(this._viewer.getPicturesNavigation())||(F.nav=this._viewer.getPicturesNavigation());const Da=this._viewer.psv.getPictureMetadata();if(Da&&(F.pic=Da.id,F.xyz=this._getXyzHashString()),this._viewer.map){F.map=this._getMapHashString(),F.focus="pic",this._viewer.isMapWide()&&(F.focus="map"),this._viewer.popupContainer.classList.contains("gvs-hidden")||(F.focus="meta"),this._viewer.map.hasTwoBackgrounds()&&this._viewer.map.getBackground()&&(F.background=this._viewer.map.getBackground());const Da=this._viewer.map.getVisibleUsers();if((Da.length>1||!Da.includes("geovisio"))&&(F.users=Da.join(",")),this._viewer._mapFilters){for(let Da in cl)this._viewer._mapFilters[Da]&&(F[cl[Da]]=this._viewer._mapFilters[Da]);if(F.pic_score){const Da=[null,"E","D","C","B","A"];F.pic_score=F.pic_score.map((F=>Da[F])).join("")}}}else F.map="none";return F}getHashString(){let F="";return Object.entries(this._getHashParts()).sort(((F,Da)=>F[0].localeCompare(Da[0]))).forEach((Da=>{let[ll,cl]=Da,hl=!1;const dl=F.split("&").map((F=>{const Da=F.split("=")[0];return Da===ll?(hl=!0,`${Da}=${cl}`):F})).filter((F=>F));hl||dl.push(`${ll}=${cl}`),F=`${dl.join("&")}`})),`#${F}`.replace(/^#+/,"#")}_getCurrentHash(){const F=window.location.hash.replace("#","");let Da={};if(F.split("&").map((F=>F.split("="))).filter((F=>void 0!==F[0]&&F[0].length>0)).forEach((F=>{Da[F[0]]=F[1]})),Da.s){const F=Object.fromEntries(Da.s.split(";").map((F=>[F[0],F.substring(1)])));Da={},"m"===F.f?Da.focus="map":"p"===F.f?Da.focus="pic":"t"===F.f&&(Da.focus="meta"),""!==F.s&&(Da.speed=100*parseFloat(F.s)),"a"===F.n?Da.nav="any":"s"===F.n&&(Da.nav="seq"),"n"===F.n&&(Da.nav="none"),""!==F.p&&(Da.pic=F.p),""!==F.c&&(Da.xyz=F.c),""!==F.m&&(Da.map=F.m),""!==F.d&&(Da.date_from=F.d),""!==F.e&&(Da.date_to=F.e),"f"===F.t?Da.pic_type="flat":"e"===F.t&&(Da.pic_type="equirectangular"),""!==F.k&&(Da.camera=F.k),"d"===F.v?Da.theme="default":"a"===F.v?Da.theme="age":"t"===F.v?Da.theme="type":"s"===F.v&&(Da.theme="score"),"s"===F.b?Da.background="streets":"a"===F.b&&(Da.background="aerial"),""!==F.u&&(Da.users=F.u),""!==F.q&&(Da.pic_score=F.q)}return Da}_getMapHashString(){const F=this._viewer.map.getCenter(),Da=Math.round(100*this._viewer.map.getZoom())/100,ll=Math.ceil((Da*Math.LN2+Math.log(512/360/.5))/Math.LN10),cl=Math.pow(10,ll),hl=Math.round(F.lng*cl)/cl,dl=Math.round(F.lat*cl)/cl,pl=this._viewer.map.getBearing(),fl=this._viewer.map.getPitch();let Al=`${Da}/${dl}/${hl}`;return(pl||fl)&&(Al+="/"+Math.round(10*pl)/10),fl&&(Al+=`/${Math.round(fl)}`),Al}_getXyzHashString(){const F=this._viewer.psv.getXYZ();return`${F.x.toFixed(2)}/${F.y.toFixed(2)}/${Math.round(F.z||0)}`}_onHashChange(){let F=this._getCurrentHash();if(F.pic){const Da=F.pic.split(";");Da.length>1&&console.warn("Multiple picture IDs passed in URL, only first one kept"),this._viewer.select(null,Da[0])}else this._viewer.select();if(F.focus&&["map","pic"].includes(F.focus)&&(this._viewer.setPopup(!1),this._viewer.setFocus(F.focus)),F.focus&&"meta"==F.focus&&this._viewer._widgets._showPictureMetadataPopup(),void 0!==F.speed&&this._viewer.psv.setTransitionDuration(F.speed),F.map&&this._viewer.map){const Da=this.getMapOptionsFromHashString(F.map);Da&&this._viewer.map.jumpTo(Da);let ll=(F.users||"").split(",");(0===ll.length||1===ll.length&&""===ll[0].trim())&&(ll=["geovisio"]),this._viewer.map.setVisibleUsers(ll)}if(F.xyz){const Da=this.getXyzOptionsFromHashString(F.xyz);this._viewer.psv.setXYZ(Da.x,Da.y,Da.z)}this._viewer.setFilters(this.getMapFiltersFromHashVals(F)),["aerial","streets"].includes(F.background)&&this._viewer.map.setBackground(F.background),["pic","any","seq"].includes(F.nav)&&this._viewer.setPicturesNavigation(F.nav)}getShortLink(F){const Da=new URL(F),ll=this._getHashParts(),cl={f:(ll.focus||"").substring(0,1),s:isNaN(parseInt(ll.speed))?void 0:Math.floor(parseInt(ll.speed)/100),n:(ll.nav||"").substring(0,1),p:ll.pic,c:ll.xyz,m:ll.map,d:ll.date_from,e:ll.date_to,t:(ll.pic_type||"").substring(0,1),k:ll.camera,v:(ll.theme||"").substring(0,1),b:(ll.background||"").substring(0,1),u:ll.users,q:ll.pic_score},hl=Object.entries(cl).filter((F=>{let[,Da]=F;return void 0!=Da&&""!=Da})).map((F=>{let[Da,ll]=F;return`${Da}${ll}`})).join(";");return Da.hash=`s=${hl}`,Da}getMapFiltersFromHashVals(F){const Da={};for(let ll in hl)F[ll]&&(Da[hl[ll]]=F[ll]);if(Da.qualityscore){let F=Da.qualityscore.split("");const ll={A:5,B:4,C:3,D:2,E:1};Da.qualityscore=F.map((F=>ll[F]))}return Da}getMapOptionsFromHashString(F){const Da=F.split("/");if(Da.length>=3&&!Da.some((F=>isNaN(F)))){const F={center:[+Da[2],+Da[1]],zoom:+Da[0],pitch:+(Da[4]||0)};return this._viewer.map&&(F.bearing=this._viewer.map.dragRotate.isEnabled()&&this._viewer.map.touchZoomRotate.isEnabled()?+(Da[3]||0):this._viewer.map.getBearing()),F}return null}getXyzOptionsFromHashString(F){const Da=F.split("/");if(3!==Da.length||Da.some((F=>isNaN(F))))return null;return{x:+Da[0],y:+Da[1],z:+Da[2]}}_updateHash(){this._delay&&(clearTimeout(this._delay),this._delay=null),this._delay=setTimeout((()=>{var F,Da,ll;const cl=new URL(window.location.href),hl=new URL(window.location.href);if(hl.hash=this._viewer?this.getHashString():"",cl.hash==hl.hash)return;const dl=this._getCurrentHash().pic||"",pl=(null===(F=this._viewer)||void 0===F||null===(Da=F.psv)||void 0===Da||null===(ll=Da.getPictureMetadata())||void 0===ll?void 0:ll.id)||"",fl=this._getCurrentHash().focus||"",Al=hl.hash.includes("focus=meta")?"meta":hl.hash.includes("focus=map")?"map":"pic";try{if(dl!=pl||fl!=Al&&"meta"==Al?window.history.pushState(window.history.state,null,hl.href):window.history.replaceState(window.history.state,null,hl.href),this._viewer){const F=new CustomEvent("url-changed",{detail:{url:hl.href}});this.dispatchEvent(F)}}catch(bl){}}),500)}}},490:(F,Da,ll)=>{"use strict";ll.d(Da,{A:()=>Widgets});ll(307);var cl=ll(2968),hl=ll(4683),dl=ll(5071),pl=ll(1462),fl=ll(5721),Al=ll(7534),bl=ll(6810),kl=ll(654),Dl=ll(1372),Wl=ll(7290),Ql=ll(1260),wc=ll(7964),Sc=ll(2e3),eu=ll(5279),iu=ll(9683),su=ll(6386),cu=ll(1705),uu=ll(5431),hu=ll(7472),Lu=ll(9186),zu=ll(6069),Du=ll(99),Nu=ll(7321),qu=ll(501),ih=ll(6787),gh=ll(6533),ed=ll(7744),td=ll(8629),id=ll(325),nd=ll(9243),rd=ll(1904),ad=ll(4220),sd=ll(7172),od=ll(7879),ld=ll(7516),cd=ll(8739),ud=ll(3520),hd=ll(3095),dd=ll(4162),pd=ll(4189),md=ll(6311),fd=ll(9564),gd=ll(2975),Ad=ll(4881),yd=ll(1708),vd=ll(3233),_d=ll(6668);class Widgets{constructor(F){var Da;let ll=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null==ll&&(ll={}),null==ll.editIdUrl&&(ll.editIdUrl="https://www.openstreetmap.org/edit"),this._viewer=F,this._t=this._viewer._t,this._options=ll;const cl=void 0!==this._viewer.map;this._corners={};const pl=cl?["main","mini"]:["main"],fl=["top","bottom"],Al=["left","middle","right"];for(let hl of pl)for(let F of fl){const Da=document.createElement("div");Da.id=`gvs-corner-${hl}-${F}`,Da.classList.add("gvs-corner-space");for(let ll of Al){const cl=document.createElement("div");cl.id=`${Da.id}-${ll}`,cl.classList.add("gvs-corner"),this._corners[`${hl}-${F}-${ll}`]=cl,Da.appendChild(cl)}"main"==hl?this._viewer.mainContainer.appendChild(Da):"mini"==hl&&this._viewer.miniContainer.appendChild(Da)}if((0,dl.GZ)()||this._initWidgetPlayer(cl),this._initWidgetLegend(cl,null===(Da=ll)||void 0===Da?void 0:Da.mapAttribution),cl&&(this._initWidgetMiniActions(),(0,dl.GZ)()||(this._initWidgetSearch(),this._initWidgetFilters(null!==this._viewer._api._endpoints.user_search&&null!==this._viewer._api._endpoints.user_tiles,this._viewer.map&&this._viewer.map._hasQualityScore()),this._initWidgetMapLayers(),this._listenMapFiltersChanges())),this._viewer.isWidthSmall()||this._initWidgetShare(),ll.customWidget){const F=this._corners["main-bottom-right"];switch(typeof ll.customWidget){case"string":for(let Da of(new DOMParser).parseFromString(ll.customWidget,"text/html").body.children)F.appendChild(Da);break;case"object":Array.isArray(ll.customWidget)?ll.customWidget.forEach((Da=>F.appendChild(Da))):F.appendChild(ll.customWidget)}}this._initWidgetZoom(cl),this._viewer.container.addEventListener("click",(F=>(0,hl.W_)(F.target,this._viewer.container)))}destroy(){Object.values(this._corners).forEach((F=>F.remove())),delete this._corners,delete this._t,delete this._viewer}_initWidgetZoom(F){this._lastWantedZoom=this._viewer.psv.getZoomLevel();const Da=(0,hl.Tf)("gvs-zoom-in",(0,hl.fa)(Dl.QL),this._t.gvs.zoomIn),ll=(0,hl.Tf)("gvs-zoom-out",(0,hl.fa)(Wl.EZ),this._t.gvs.zoomOut);(0,hl.wj)("gvs-widget-zoom","main-bottom-right",this,[Da,ll],["gvs-group-vertical","gvs-mobile-hidden","gvs-print-hidden"]);const zoomFct=(Da,ll)=>{if(F&&this._viewer.isMapWide())ll?this._viewer.map.zoomIn({},{originalEvent:Da}):this._viewer.map.zoomOut({},{originalEvent:Da});else{this._viewer.lastPsvAnim&&this._viewer.lastPsvAnim.cancel();const F=ll?Math.min(100,this._lastWantedZoom+cl.$p):Math.max(0,this._lastWantedZoom-cl.$p);this._viewer.lastPsvAnim=this._viewer.psv.animate({speed:cl.LM,zoom:F}),this._lastWantedZoom=F}};Da.addEventListener("click",(F=>zoomFct(F,!0))),ll.addEventListener("click",(F=>zoomFct(F,!1)))}_initWidgetPlayer(F){const Da=(0,hl.Tf)("gvs-player-prev",(0,hl.fa)(cu.TH),this._t.gvs.sequence_prev),ll=(0,hl.Tf)("gvs-player-play"),dl=(0,hl.Tf)("gvs-player-next",(0,hl.fa)(uu.vF),this._t.gvs.sequence_next),pl=(0,hl.Tf)("gvs-player-more",(0,hl.fa)(gh.nx),this._t.gvs.sequence_more,["gvs-xs-hidden"]),fl=(0,hl.t_)(this,pl,[],["gvs-player-options"]);fl.innerHTML=`\n\t\t\t<div class="gvs-input-range" title="${this._t.gvs.sequence_speed}">\n\t\t\t\t${(0,hl.Qt)(nd.rO)}\n\t\t\t\t<input\n\t\t\t\t\tid="gvs-player-speed"\n\t\t\t\t\ttype="range" name="speed"\n\t\t\t\t\tmin="0" max="${cl.Vf-100}"\n\t\t\t\t\tvalue="${cl.Vf-this._viewer.psv.getTransitionDuration()}"\n\t\t\t\t\ttitle="${this._t.gvs.sequence_speed}"\n\t\t\t\t\tstyle="width: 100%;" />\n\t\t\t\t${(0,hl.Qt)(ed.KM)}\n\t\t\t</div>\n\t\t\t<button title="${this._t.gvs.contrast}" id="gvs-player-contrast">\n\t\t\t\t${(0,hl.Qt)(id.rC)}\n\t\t\t</button>\n\t\t`;const Al=(0,hl.wj)("gvs-widget-player",F?"main-top-middle":"main-top-left",this,[Da,ll,dl].concat(this._viewer.isWidthSmall()?[]:[fl,pl]),["gvs-group-horizontal","gvs-only-psv","gvs-print-hidden",this._viewer.psv.getPictureMetadata()?"":"gvs-hidden"]),toggleBtnPlay=F=>{ll.innerHTML=F?(0,hl.Qt)(hu.G1):(0,hl.Qt)(su.ij),ll.title=F?this._t.gvs.sequence_pause:this._t.gvs.sequence_play};toggleBtnPlay(!1);const updatePlayBtn=()=>{var F,cl,pl,fl;"pic"===this._viewer.getPicturesNavigation()?((0,hl.vI)(dl),(0,hl.vI)(ll),(0,hl.vI)(Da)):(null!=(null===(F=this._viewer.psv.getPictureMetadata())||void 0===F||null===(cl=F.sequence)||void 0===cl?void 0:cl.prevPic)?(0,hl.Y8)(Da):(0,hl.vI)(Da),null!=(null===(pl=this._viewer.psv.getPictureMetadata())||void 0===pl||null===(fl=pl.sequence)||void 0===fl?void 0:fl.nextPic)?((0,hl.Y8)(dl),(0,hl.Y8)(ll)):((0,hl.vI)(dl),(0,hl.vI)(ll)))};if(updatePlayBtn(),this._viewer.addEventListener("sequence-playing",(()=>toggleBtnPlay(!0))),this._viewer.addEventListener("sequence-stopped",(()=>toggleBtnPlay(!1))),this._viewer.addEventListener("psv:picture-loaded",(()=>Al.classList.remove("gvs-hidden")),{once:!0}),this._viewer.addEventListener("psv:picture-loaded",updatePlayBtn),this._viewer.addEventListener("pictures-navigation-changed",updatePlayBtn),!this._viewer.isWidthSmall()){const F=fl.children[0].children[1];this._viewer.addEventListener("psv:transition-duration-changed",(Da=>{F.value=cl.Vf-Da.detail.value})),F.addEventListener("change",(F=>{const Da=cl.Vf-F.target.value;this._viewer.psv.setTransitionDuration(Da)}))}Da.addEventListener("click",(()=>this._viewer.psv.goToPrevPicture())),dl.addEventListener("click",(()=>this._viewer.psv.goToNextPicture())),ll.addEventListener("click",(()=>{this._viewer.isSequencePlaying()?(toggleBtnPlay(!1),this._viewer.stopSequence()):(toggleBtnPlay(!0),this._viewer.playSequence())}));const bl=document.getElementById("gvs-player-contrast");bl&&bl.addEventListener("click",(()=>{bl.classList.contains("gvs-btn-active")?(bl.classList.remove("gvs-btn-active"),this._viewer.psv.setHigherContrast(!1)):(bl.classList.add("gvs-btn-active"),this._viewer.psv.setHigherContrast(!0))}))}_initWidgetLegend(F,Da){const ll=(0,hl.wj)("gvs-widget-legend",F?"main-bottom-right":"main-bottom-left",this,[],["gvs-widget-bg"]);let cl,pl,fl;F&&(cl=(0,hl.wj)("gvs-widget-mini-legend","mini-bottom-right",this,[],["gvs-widget-bg","gvs-only-mini","gvs-mobile-hidden"])),this._viewer.isWidthSmall()&&(pl=document.createElement("button"),pl.id="gvs-legend-toggle",pl.classList.add("gvs-btn","gvs-widget-bg","gvs-print-hidden"),pl.appendChild((0,hl.fa)(ld.faCircleInfo)),fl=()=>{"hidden"===ll.style.visibility?(ll.style.visibility="visible",toggleLegend(!!F&&this._viewer.isMapWide())):(ll.innerHTML="",ll.style.visibility="hidden",ll.appendChild(pl))},pl.addEventListener("click",(F=>{F.stopPropagation(),fl()})));const toggleLegend=fl=>{var Al,bl,kl;let Dl=Da||(null===(Al=this._viewer.map)||void 0===Al||null===(bl=Al._attribution)||void 0===bl?void 0:bl._attribHTML)||"",Wl="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a>";const Ql=null===(kl=this._viewer.psv.getPictureMetadata())||void 0===kl?void 0:kl.caption;let wc;!(0,dl.GZ)()&&Ql&&(Wl="",Ql.producer&&(Wl+=`<span style="font-weight: bold">&copy; ${Ql.producer}</span>`),Ql.date&&(Ql.producer&&(Wl+="&nbsp;-&nbsp;"),Wl+=Ql.date.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})),wc=(0,hl.fa)(fd.AP),wc.style.marginLeft="5px"),ll.title="",fl?(ll.innerHTML=Dl,(0,dl.GZ)()&&(ll.innerHTML="<a href='https://panoramax.fr/' target='_blank'>Panoramax</a><br />"+ll.innerHTML),ll.style.cursor=null,ll.onclick=null,cl.innerHTML=Wl):(ll.innerHTML=Wl,wc?(ll.appendChild(wc),ll.style.cursor="pointer",ll.title=this._t.gvs.legend_title,ll.onclick=(0,dl.GZ)()?()=>window.open(window.location.href,"_blank"):this._showPictureMetadataPopup.bind(this)):(ll.style.cursor=null,ll.onclick=null),F&&(cl.innerHTML=Dl)),pl&&ll.appendChild(pl)};pl?(ll.appendChild(pl),ll.style.visibility="hidden"):toggleLegend(!!F&&this._viewer.isMapWide()),this._viewer.addEventListener("focus-changed",(F=>toggleLegend("map"==F.detail.focus))),this._viewer.addEventListener("psv:picture-loaded",(()=>toggleLegend(F&&this._viewer.isMapWide())))}_showPictureMetadataPopup(){var F,Da,ll,cl,pl,fl,Al,bl,Dl,Wl,Ql,wc,Sc,eu,iu,su,cu,uu,hu,Lu,zu,Nu,qu;const ih=this._viewer.psv.getPictureMetadata();if(!ih)throw new Error("No picture currently selected");const gh=[];if(gh.push((0,hl.Ij)("h4",`${(0,hl.Qt)(ld.faCircleInfo)} ${this._t.gvs.metadata}`)),this._viewer._api._endpoints.report){const F=(0,hl.do)(`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`);F.firstChild.addEventListener("click",this._showReportForm.bind(this)),gh.push(F)}const ed=[{section:this._t.gvs.metadata_general_picid,classes:["gvs-td-with-id"],values:(0,hl.fP)(ih.id,this._viewer._api.getPictureMetadataUrl(ih.id,null===ih||void 0===ih||null===(F=ih.sequence)||void 0===F?void 0:F.id),this._t.gvs.metadata_general_picid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_seqid,classes:["gvs-td-with-id"],values:(0,hl.fP)(null===ih||void 0===ih||null===(Da=ih.sequence)||void 0===Da?void 0:Da.id,this._viewer._api.getSequenceMetadataUrl(null===ih||void 0===ih||null===(ll=ih.sequence)||void 0===ll?void 0:ll.id),this._t.gvs.metadata_general_seqid_link,this._t.gvs.copy)},{section:this._t.gvs.metadata_general_author,value:null===ih||void 0===ih||null===(cl=ih.caption)||void 0===cl?void 0:cl.producer},{section:this._t.gvs.metadata_general_license,value:null===ih||void 0===ih||null===(pl=ih.caption)||void 0===pl?void 0:pl.license},{section:this._t.gvs.metadata_general_date,value:null===ih||void 0===ih||null===(fl=ih.caption)||void 0===fl||null===(Al=fl.date)||void 0===Al?void 0:Al.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,timeZoneName:"short"})}];gh.push((0,hl.ZR)("gvs-table-light",ed)),gh.push((0,hl.Ij)("h4",`${(0,hl.Qt)(Du.rw)} ${this._t.gvs.metadata_camera}`));const td=null!==ih&&void 0!==ih&&null!==(bl=ih.properties)&&void 0!==bl&&null!==(Dl=bl["pers:interior_orientation"])&&void 0!==Dl&&Dl.focal_length?`${null===ih||void 0===ih||null===(Wl=ih.properties)||void 0===Wl||null===(Ql=Wl["pers:interior_orientation"])||void 0===Ql?void 0:Ql.focal_length} mm`:"\u2753";let id=null===ih||void 0===ih||null===(wc=ih.properties)||void 0===wc||null===(Sc=wc["pers:interior_orientation"])||void 0===Sc?void 0:Sc.sensor_array_dimensions;id&&(id=`${id[0]} x ${id[1]} px (${Math.floor(id[0]*id[1]/1e6)} Mpx)`);let nd=this._t.gvs.picture_flat,rd=null===ih||void 0===ih||null===(eu=ih.properties)||void 0===eu||null===(iu=eu["pers:interior_orientation"])||void 0===iu?void 0:iu.field_of_view;null!==rd&&void 0!==rd&&(360===rd?nd=this._t.gvs.picture_360:nd+=` (${rd}\xb0)`);const ad=[{section:this._t.gvs.metadata_camera_make,value:(null===ih||void 0===ih||null===(su=ih.properties)||void 0===su||null===(cu=su["pers:interior_orientation"])||void 0===cu?void 0:cu.camera_manufacturer)||"\u2753"},{section:this._t.gvs.metadata_camera_model,value:(null===ih||void 0===ih||null===(uu=ih.properties)||void 0===uu||null===(hu=uu["pers:interior_orientation"])||void 0===hu?void 0:hu.camera_model)||"\u2753"},{section:this._t.gvs.metadata_camera_type,value:nd},{section:this._t.gvs.metadata_camera_resolution,value:id||"\u2753"},{section:this._t.gvs.metadata_camera_focal_length,value:td}];gh.push((0,hl.ZR)("gvs-table-light",ad)),gh.push((0,hl.Ij)("h4",`${(0,hl.Qt)(ud.gK)} ${this._t.gvs.metadata_location}`));const sd=void 0!==(null===ih||void 0===ih||null===(Lu=ih.properties)||void 0===Lu?void 0:Lu["view:azimuth"])?`${ih.properties["view:azimuth"]}\xb0`:"\u2753",od=(0,kl.Pu)(ih),hd=[{section:this._t.gvs.metadata_location_longitude,value:ih.gps[0]},{section:this._t.gvs.metadata_location_latitude,value:ih.gps[1]},{section:this._t.gvs.metadata_location_orientation,value:sd},{section:this._t.gvs.metadata_location_precision,value:od}];if(gh.push((0,hl.ZR)("gvs-table-light",hd)),null!==(zu=this._viewer)&&void 0!==zu&&null!==(Nu=zu.map)&&void 0!==Nu&&Nu._hasQualityScore()){var dd,pd;const F=(0,hl.Ij)("h4",`${(0,hl.Qt)(vd.B9)} ${this._t.gvs.metadata_quality} <button class="gvs-btn-link" title="${this._t.gvs.metadata_quality_help}">${(0,hl.Qt)(_d.iW)}</button>`);F.lastChild.addEventListener("click",(()=>this._showQualityScoreDoc())),gh.push(F);const Da=(0,dl.Ch)(dl.ql,null===ih||void 0===ih||null===(dd=ih.properties)||void 0===dd?void 0:dd["quality:horizontal_accuracy"]),ll=(0,dl.Ch)(360===(null===ih||void 0===ih?void 0:ih.horizontalFov)?dl.Av:dl.U3,null===ih||void 0===ih||null===(pd=ih.properties)||void 0===pd?void 0:pd["panoramax:horizontal_pixel_density"]),cl=Math.round((ll||1)*dl.Xu+(Da||1)*dl.Bg),pl=[{section:this._t.gvs.metadata_quality_score,value:(0,hl.Lt)(cl)},{section:this._t.gvs.metadata_quality_gps_score,value:(0,hl.fM)(Da,this._t)},{section:this._t.gvs.metadata_quality_resolution_score,value:(0,hl.fM)(ll,this._t)}];gh.push((0,hl.ZR)("gvs-table-light",pl))}if(null!==(qu=ih.properties)&&void 0!==qu&&qu.exif){const F=document.createElement("details");F.appendChild((0,hl.Ij)("summary",`${(0,hl.Qt)(cd.BH)} ${this._t.gvs.metadata_exif}`));const Da=Object.entries(ih.properties.exif).sort().map((F=>{let[Da,ll]=F;return{section:Da,value:ll}}));F.appendChild((0,hl.ZR)("",Da)),gh.push(F)}this._viewer.setPopup(!0,gh),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_showQualityScoreDoc(){const F=[];F.push((0,hl.Ij)("h4",`${(0,hl.Qt)(vd.B9)} ${this._t.gvs.qualityscore_title}`));const Da=document.createElement("a");Da.setAttribute("href","https://docs.panoramax.fr/pictures-metadata/quality_score/"),Da.setAttribute("target","_blank"),Da.appendChild(document.createTextNode(this._t.gvs.qualityscore_doc_link)),[document.createTextNode(this._t.gvs.qualityscore_doc_1),document.createTextNode(this._t.gvs.qualityscore_doc_2),(0,hl.Lt)(5),document.createTextNode(this._t.gvs.qualityscore_doc_3),Da].forEach((Da=>{const ll=document.createElement("p");ll.appendChild(Da),F.push(ll)})),this._viewer.setPopup(!0,F)}_showReportForm(){const F=this._viewer.psv.getPictureMetadata();if(!F)throw new Error("No picture currently selected");const Da=[];Da.push((0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`));const ll=(0,dl.bG)();if(ll){const F=document.createElement("p");F.appendChild(document.createTextNode(this._t.gvs.report_auth.replace("{a}",ll.name))),Da.push(F)}const cl=document.createElement("form");Da.push(cl);const pl=document.createElement("div");pl.classList.add("gvs-input-group");const fl=(0,hl.fp)("gvs-report-issue",this._t.gvs.report_nature_label,ld.faCircleInfo),Al=document.createElement("select");Al.name="gvs-report-issue",Al.required=!0;["","blur_missing","blur_excess","inappropriate","privacy","picture_low_quality","mislocated","copyright","other"].forEach((F=>{const Da=document.createElement("option");Da.value=F,Da.textContent=this._t.gvs.report_nature[F],""===F&&(Da.setAttribute("disabled",""),Da.setAttribute("selected",""),Da.setAttribute("hidden","")),Al.appendChild(Da)})),pl.appendChild(fl),pl.appendChild(Al),cl.appendChild(pl);const bl=document.createElement("div");bl.classList.add("gvs-input-group","gvs-input-group-inline");const kl=document.createElement("input");kl.id="gvs-report-whole-sequence",kl.name="gvs-report-whole-sequence",kl.type="checkbox";const Dl=(0,hl.fp)("gvs-report-whole-sequence",this._t.gvs.report_whole_sequence);bl.appendChild(kl),bl.appendChild(Dl),cl.appendChild(bl);const Wl=document.createElement("div");Wl.classList.add("gvs-input-group");const Ql=(0,hl.fp)("gvs-report-details",this._t.gvs.report_details,gd.Be),wc=document.createElement("textarea");let Sc;if(wc.name="gvs-report-details",wc.placeholder=this._t.gvs.report_details_placeholder,Wl.appendChild(Ql),Wl.appendChild(wc),cl.appendChild(Wl),!ll){const F=document.createElement("div");F.classList.add("gvs-input-group");const Da=(0,hl.fp)("email",this._t.gvs.report_email,Ad.Hz);Sc=document.createElement("input"),Sc.type="email",Sc.name="email",Sc.placeholder=this._t.gvs.report_email_placeholder,F.appendChild(Da),F.appendChild(Sc),cl.appendChild(F)}const eu=document.createElement("div");eu.classList.add("gvs-input-btn");const iu=document.createElement("button");iu.type="submit",iu.appendChild((0,hl.fa)(yd.is)),iu.appendChild(document.createTextNode(this._t.gvs.report_submit)),eu.appendChild(iu),cl.appendChild(eu),cl.addEventListener("submit",(Da=>{var ll;Da.preventDefault();const cl={issue:Al.value,picture_id:kl.checked?null:F.id,reporter_comments:wc.value,reporter_email:null===(ll=Sc)||void 0===ll?void 0:ll.value,sequence_id:F.sequence.id};this._viewer.setPopup(!0,[(0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`),document.createTextNode(this._t.gvs.report_wait)]),this._viewer._api.sendReport(cl).then((()=>{this._viewer.setPopup(!0,[(0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`),document.createTextNode(this._t.gvs.report_success)])})).catch((F=>{console.error(F),this._viewer.setPopup(!0,[(0,hl.Ij)("h4",`${(0,hl.Qt)(md.JA)} ${this._t.gvs.report}`),document.createTextNode(this._t.gvs.report_failure.replace("{e}",F))])}))})),this._viewer.setPopup(!0,Da),this._viewer.dispatchEvent(new CustomEvent("focus-changed",{detail:{focus:"meta"}}))}_initWidgetMiniActions(){const F=document.createElement("img");F.alt="",F.height=120,F.draggable=!1,F.src=pl;const Da=document.createElement("span");Da.classList.add("gvs-mobile-hidden"),Da.appendChild(document.createTextNode(this._t.gvs.expand));const ll=(0,hl.Tf)("gvs-mini-expand",Da,this._t.gvs.expand_info,["gvs-only-mini","gvs-print-hidden"]);ll.appendChild(F),this._corners["mini-top-right"].appendChild(ll),ll.addEventListener("click",(()=>{this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map")}));const cl=document.createElement("img");cl.alt=this._t.gvs.minimize_short,cl.height=120,cl.draggable=!1,cl.src=fl;const Al=(0,hl.Tf)("gvs-mini-hide",cl,this._t.gvs.minimize,["gvs-only-mini","gvs-print-hidden"]);this._corners["mini-bottom-left"].appendChild(Al),Al.addEventListener("click",(()=>{this._viewer.setUnfocusedVisible(!1)}));const bl=(0,hl.Tf)("gvs-mini-show",null,null,["gvs-btn-large","gvs-only-mini-hidden","gvs-print-hidden"]);this._corners["main-bottom-left"].appendChild(bl),bl.addEventListener("click",(()=>{(0,dl.GZ)()?this._viewer.setFocus(this._viewer.isMapWide()?"pic":"map"):this._viewer.setUnfocusedVisible(!0)}));const miniBtnRendering=()=>{this._viewer.map&&this._viewer.isMapWide()?(bl.title=this._t.gvs.show_psv,bl.innerHTML=(0,hl.Qt)(iu.pt)):(bl.title=this._t.gvs.show_map,bl.innerHTML=(0,hl.Qt)(Sc.e5))};miniBtnRendering(),this._viewer.addEventListener("focus-changed",miniBtnRendering)}_initWidgetSearch(){const F=(0,hl.OZ)("gvs-widget-search-bar",this._t.gvs.search_address,(F=>{const Da=F.match(/([-+]?\d{1,2}\.\d+),\s*([-+]?\d{1,3}\.\d+)/),ll=F.match(/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/);if(Da){const F=parseFloat(Da[1]),ll=parseFloat(Da[2]);return this._viewer.map.flyTo({center:[ll,F],zoom:16}),Promise.resolve(!0)}return ll?(this._viewer.select(null,F),Promise.resolve(!0)):this._viewer.map.geocoder({query:F,limit:3,bbox:this._viewer.map.getBounds().toArray().map((F=>F.join(","))).join(","),proximity:this._viewer.map.getCenter().lat+","+this._viewer.map.getCenter().lng}).then((F=>F=F.features.map((F=>({title:F.place_name.split(",")[0],subtitle:F.place_name.split(",").slice(1).join(", "),data:F})))))}),(F=>{F&&(F.data.bounds?this._viewer.map.fitBounds(F.data.bounds):this._viewer.map.flyTo({center:F.data.center,zoom:F.data.zoom||13}))}),this,void 0,this._viewer.isWidthSmall(),this._viewer.map._geolocate);(0,hl.wj)("gvs-widget-search",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[F],["gvs-only-map","gvs-print-hidden"])}_initWidgetMapLayers(){var F,Da;const ll=(0,hl.np)("gvs-map-layers",ad.qI,this._t.gvs.layers,this),cl=(0,hl.t_)(this,ll,[]);(0,hl.wj)("gvs-widget-map-layers","main-top-right",this,[ll,cl],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]),this._viewer.map.hasTwoBackgrounds()&&(cl.innerHTML=`\n\t\t\t\t<h4>${(0,hl.Qt)(sd.YS)} ${this._t.gvs.map_background}</h4>\n\t\t\t\t<div id="gvs-map-bg" class="gvs-input-group">\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-streets" name="gvs-map-bg" value="streets" />\n\t\t\t\t\t<label for="gvs-map-bg-streets">\n\t\t\t\t\t\t<img id="gvs-map-bg-streets-img" alt="" />\n\t\t\t\t\t\t${this._t.gvs.map_background_streets}\n\t\t\t\t\t</label>\n\t\t\t\t\t<input type="radio" id="gvs-map-bg-aerial" name="gvs-map-bg" value="aerial" />\n\t\t\t\t\t<label for="gvs-map-bg-aerial">\n\t\t\t\t\t\t<img id="gvs-map-bg-aerial-img" alt="" />\n\t\t\t\t\t\t${this._t.gvs.map_background_aerial}\n\t\t\t\t\t</label>\n\t\t\t\t</div>`),cl.innerHTML+=`\n\t\t\t<h4>${(0,hl.Qt)(td.fy)} ${this._t.gvs.map_theme}</h4>\n\t\t\t<div class="gvs-input-group">\n\t\t\t\t<select id="gvs-map-theme" style="width: 100%;">\n\t\t\t\t\t<option value="default">${this._t.gvs.map_theme_default}</option>\n\t\t\t\t\t<option value="age">${this._t.gvs.map_theme_age}</option>\n\t\t\t\t\t<option value="type">${this._t.gvs.map_theme_type}</option>\n\t\t\t\t\t${null!==(F=this._viewer)&&void 0!==F&&null!==(Da=F.map)&&void 0!==Da&&Da._hasQualityScore()?'<option value="score">'+this._t.gvs.map_theme_score+"</option>":""}\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<div id="gvs-map-theme-legend-age" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_4}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_4}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_3}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_3}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_2}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_2}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.PALETTE_1}"></span>\n\t\t\t\t\t\t\t${this._t.gvs.map_theme_age_1}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id="gvs-map-theme-legend-type" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.QUALI_1}"></span>\n\t\t\t\t\t\t${this._t.gvs.picture_360}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="gvs-map-theme-legend-entry">\n\t\t\t\t\t\t<span class="gvs-map-theme-color" style="background-color: ${dl.lm.QUALI_2}"></span>\n\t\t\t\t\t\t${this._t.gvs.picture_flat}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id="gvs-map-theme-legend-score" class="gvs-map-theme-legend gvs-hidden">\n\t\t\t\t\t${dl.fW.map((F=>'<span class="gvs-qualityscore" style="background-color: '+F.color+';">'+F.label+"</span>")).join("")}\n\t\t\t\t\t<button id="gvs-map-theme-quality-help" class="gvs-btn-link" title="${this._t.gvs.metadata_quality_help}">${(0,hl.Qt)(_d.iW,{transform:{x:6,size:24}})}</button>\n\t\t\t\t</div>\n\t\t\t</div>`,cl.querySelector("#gvs-map-theme-quality-help").addEventListener("click",(()=>this._showQualityScoreDoc()));const pl=cl.querySelector("#gvs-map-theme"),onChange=()=>{this._onMapThemeChange(),this._onMapFiltersChange()};if(pl.addEventListener("change",onChange),pl.addEventListener("keypress",onChange),pl.addEventListener("paste",onChange),pl.addEventListener("input",onChange),this._viewer.map.hasTwoBackgrounds()){cl.querySelector("#gvs-map-bg-aerial-img").src=Al;cl.querySelector("#gvs-map-bg-streets-img").src=bl;const F=cl.querySelector("#gvs-map-bg-aerial"),Da=cl.querySelector("#gvs-map-bg-streets"),onBgChange=F=>{this._viewer.map.setBackground(F.target.value)};F.addEventListener("change",onBgChange),Da.addEventListener("change",onBgChange),this._viewer.addEventListener("map:background-changed",(F=>this._onMapBackgroundChange(F.detail.background))),this._onMapBackgroundChange(this._viewer.map.getBackground())}}_onMapBackgroundChange(F){const Da=document.getElementById("gvs-map-bg-aerial"),ll=document.getElementById("gvs-map-bg-streets");"aerial"===F?Da.checked=!0:ll.checked=!0}_onMapThemeChange(){const F=document.getElementById("gvs-map-theme"),Da=document.getElementById("gvs-map-layers"),ll=F.value;Da.setActive("default"!==ll);for(let cl of document.getElementsByClassName("gvs-map-theme-legend"))cl.id=="gvs-map-theme-legend-"+ll?cl.classList.remove("gvs-hidden"):cl.classList.add("gvs-hidden")}_initWidgetFilters(F,Da){const ll=(0,hl.np)("gvs-filter",rd._$,this._t.gvs.filters,this,["gvs-filter-unset-btn"]),cl=(0,hl.t_)(this,ll,[]);cl.innerHTML=`\n\t\t\t<form id="gvs-filter-form">\n\t\t\t\t<div class="gvs-filter-block">\n\t\t\t\t\t<div class="gvs-filter-zoomin">${this._t.gvs.filter_zoom_in}</div>\n\t\t\t\t\t<h4>${(0,hl.Qt)(Lu.ok)} ${this._t.gvs.filter_date}</h4>\n\t\t\t\t\t<div class="gvs-input-shortcuts">\n\t\t\t\t\t\t<button data-for="gvs-filter-date-from" data-value="${new Date((new Date).setMonth((new Date).getMonth()-1)).toISOString().split("T")[0]}">${this._t.gvs.filter_date_1month}</button>\n\t\t\t\t\t\t<button data-for="gvs-filter-date-from" data-value="${new Date((new Date).setFullYear((new Date).getFullYear()-1)).toISOString().split("T")[0]}">${this._t.gvs.filter_date_1year}</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="gvs-input-group">\n\t\t\t\t\t\t<input type="date" id="gvs-filter-date-from" />\n\t\t\t\t\t\t${(0,hl.Qt)(zu.dm)}\n\t\t\t\t\t\t<input type="date" id="gvs-filter-date-end" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="gvs-filter-block">\n\t\t\t\t\t<h4>${(0,hl.Qt)(eu.jb)} ${this._t.gvs.filter_picture}</h4>\n\t\t\t\t\t<div class="gvs-input-group gvs-checkbox-btns" style="justify-content: center;">\n\t\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-flat" name="flat" />\n\t\t\t\t\t\t<label for="gvs-filter-type-flat">${(0,hl.Qt)(eu.jb)} ${this._t.gvs.picture_flat}</label>\n\t\t\t\t\t\t<input type="checkbox" id="gvs-filter-type-360" name="360" />\n\t\t\t\t\t\t<label for="gvs-filter-type-360">${(0,hl.Qt)(iu.pt)} ${this._t.gvs.picture_360}</label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t`;const pl=cl.children[0];(0,hl.wj)("gvs-widget-filter",this._viewer.isWidthSmall()?"main-top-right":"main-top-left",this,[ll,cl],["gvs-group-large","gvs-group-btnpanel","gvs-only-map","gvs-print-hidden"]);const fl=ll.querySelector(".gvs-filter-unset-btn");if(fl&&fl.addEventListener("click",(F=>{F.stopPropagation(),pl.reset()})),this._viewer.isWidthSmall()&&(cl.style.width=this._viewer.container.offsetWidth-70+"px"),Da){const F=document.createElement("div");F.classList.add("gvs-filter-block"),pl.appendChild(F);const Da=document.createElement("div");Da.classList.add("gvs-filter-zoomin"),Da.appendChild(document.createTextNode(this._t.gvs.filter_zoom_in)),F.appendChild(Da);const ll=document.createElement("h4");ll.innerHTML=`${(0,hl.Qt)(vd.B9)} ${this._t.gvs.filter_qualityscore} <button class="gvs-btn-link" title="${this._t.gvs.metadata_quality_help}">${(0,hl.Qt)(_d.iW)}</button>`,ll.style.marginBottom="3px",ll.lastChild.addEventListener("click",(()=>this._showQualityScoreDoc())),F.appendChild(ll);const cl=document.createElement("div");cl.id="gvs-filter-qualityscore",cl.classList.add("gvs-input-group"),dl.fW.forEach((F=>{const Da=document.createElement("input");Da.id="gvs-filter-qualityscore-"+F.label,Da.type="checkbox",Da.name="qualityscore",Da.value=F.label;const ll=document.createElement("label");ll.setAttribute("for",Da.id),ll.title=this._t.gvs.filter_qualityscore_help,ll.appendChild(document.createTextNode(F.label)),ll.style.backgroundColor=F.color,cl.appendChild(Da),cl.appendChild(ll)})),F.appendChild(cl)}if(F){const F=document.createElement("div");F.classList.add("gvs-filter-block"),pl.appendChild(F);const Da=document.createElement("h4");Da.innerHTML=`${(0,hl.Qt)(od.X4)} ${this._t.gvs.filter_user}`,F.appendChild(Da);const ll=(0,dl.bG)();let cl;if(ll){const Da=document.createElement("div");Da.classList.add("gvs-input-shortcuts"),cl=document.createElement("button"),cl.appendChild(document.createTextNode(this._t.gvs.filter_user_mypics)),Da.appendChild(cl),F.appendChild(Da)}const fl=document.createElement("div");let Al;fl.id="gvs-filter-user",fl.classList.add("gvs-input-group"),Al=(0,hl.OZ)("gvs-filter-search-user",this._t.gvs.search_user,(F=>(Al.classList.remove("gvs-filter-active"),this._viewer._api.searchUsers(F).then((F=>(F||[]).map((F=>({title:F.label,data:F}))))))),(F=>(F?Al.classList.add("gvs-filter-active"):Al.classList.remove("gvs-filter-active"),this._viewer.map.setVisibleUsers(F?[F.data.id]:["geovisio"]))),this,!0),F.addEventListener("reset",(()=>{Al.classList.remove("gvs-filter-active"),Al.resetSearch()})),fl.appendChild(Al),F.appendChild(fl),ll&&cl.addEventListener("click",(()=>{const F=Al.querySelector("input");F.value===ll.name?Al.resetSearch():F.goItem({title:ll.name,data:{id:ll.id}})}))}cl.querySelectorAll(".gvs-input-shortcuts button").forEach((F=>{F.addEventListener("click",(()=>{const Da=document.getElementById(F.getAttribute("data-for")),ll=F.getAttribute("data-value");Da&&(Da.value!==ll?Da.value=ll:Da.value="")}))}));[document.getElementById("gvs-filter-date-from"),document.getElementById("gvs-filter-date-end")].forEach((F=>{F.addEventListener("change",(()=>{F.value?F.classList.add("gvs-filter-active"):F.classList.remove("gvs-filter-active")}))})),this._formDelay=null;const onFormChange=()=>{this._formDelay&&clearTimeout(this._formDelay),this._formDelay=setTimeout((()=>{this._onMapFiltersChange()}),250)};pl.addEventListener("change",onFormChange),pl.addEventListener("reset",onFormChange),pl.addEventListener("submit",(F=>(onFormChange(),F.preventDefault(),!1)),!0);for(let hl of pl.getElementsByTagName("input"))hl.addEventListener("change",onFormChange),hl.addEventListener("keypress",onFormChange),hl.addEventListener("paste",onFormChange),hl.addEventListener("input",onFormChange)}_onMapFiltersChange(){var F,Da;const ll=document.getElementById("gvs-filter-date-from"),cl=document.getElementById("gvs-filter-date-end"),hl=document.getElementById("gvs-filter-type-flat"),dl=document.getElementById("gvs-filter-type-360"),pl=document.getElementById("gvs-map-theme");let fl="";dl.checked&&!hl.checked&&(fl="equirectangular"),!dl.checked&&hl.checked&&(fl="flat");let Al=[];if(null!==(F=this._viewer)&&void 0!==F&&null!==(Da=F.map)&&void 0!==Da&&Da._hasQualityScore()){const F=document.getElementById("gvs-filter-qualityscore-A"),Da=document.getElementById("gvs-filter-qualityscore-B"),ll=document.getElementById("gvs-filter-qualityscore-C"),cl=document.getElementById("gvs-filter-qualityscore-D"),hl=document.getElementById("gvs-filter-qualityscore-E");F.checked&&Al.push(5),Da.checked&&Al.push(4),ll.checked&&Al.push(3),cl.checked&&Al.push(2),hl.checked&&Al.push(1),5==Al.length&&(Al=[])}const bl={minDate:ll.value,maxDate:cl.value,type:fl,theme:pl.value,qualityscore:Al};this._viewer.setFilters(bl)}_listenMapFiltersChanges(){const F=document.getElementById("gvs-filter"),Da=document.getElementById("gvs-filter-date-from"),ll=document.getElementById("gvs-filter-date-end"),cl=document.getElementById("gvs-filter-type-flat"),hl=document.getElementById("gvs-filter-type-360"),dl=document.getElementById("gvs-map-theme"),pl=document.getElementById("gvs-filter-qualityscore-A"),fl=document.getElementById("gvs-filter-qualityscore-B"),Al=document.getElementById("gvs-filter-qualityscore-C"),bl=document.getElementById("gvs-filter-qualityscore-D"),kl=document.getElementById("gvs-filter-qualityscore-E");this._viewer.addEventListener("filters-changed",(Dl=>{Dl.detail.minDate?(Da.value=Dl.detail.minDate,Da.classList.add("gvs-filter-active")):Da.classList.remove("gvs-filter-active"),Dl.detail.maxDate?(ll.value=Dl.detail.maxDate,ll.classList.add("gvs-filter-active")):ll.classList.remove("gvs-filter-active"),Dl.detail.theme&&(dl.value=Dl.detail.theme),Dl.detail.type&&(hl.checked=["","equirectangular"].includes(Dl.detail.type),cl.checked=["","flat"].includes(Dl.detail.type)),Dl.detail.qualityscore&&(pl.checked=Dl.detail.qualityscore.includes(5)&&Dl.detail.qualityscore.length<5,fl.checked=Dl.detail.qualityscore.includes(4)&&Dl.detail.qualityscore.length<5,Al.checked=Dl.detail.qualityscore.includes(3)&&Dl.detail.qualityscore.length<5,bl.checked=Dl.detail.qualityscore.includes(2)&&Dl.detail.qualityscore.length<5,kl.checked=Dl.detail.qualityscore.includes(1)&&Dl.detail.qualityscore.length<5);let Wl=Object.keys(Dl.detail).filter((F=>F&&"theme"!==F)).length>0||this._viewer.map.getVisibleUsers().filter((F=>"geovisio"!==F)).length>0;F.setActive(Wl),this._onMapThemeChange()})),this._viewer.addEventListener("map:users-changed",(Da=>{let ll=Object.keys(this._viewer._mapFilters).filter((F=>F&&"theme"!==F)).length>0||Da.detail.usersIds.filter((F=>"geovisio"!==F)).length>0;F.setActive(ll)}));const Dl=document.getElementsByClassName("gvs-filter-zoomin"),changeLblZoomInDisplay=()=>{for(let F of Dl)this._viewer.map.getZoom()<7?F.style.display=null:F.style.display="none"};changeLblZoomInDisplay(),this._viewer.map.on("zoomend",changeLblZoomInDisplay)}_initWidgetShare(){var F,Da;const ll=(0,hl.Tf)("gvs-share",(0,hl.fa)(Ql.ek),this._t.gvs.share,["gvs-btn-large"]),cl=(0,hl.t_)(this,ll,[]);cl.innerHTML=`\n\t\t\t<div class="gvs-hidden gvs-needs-picture">\n\t\t\t\t<p id="gvs-share-license" style="margin: 0 0 10px 0;"></p>\n\t\t\t</div>\n\t\t\t<h4 style="margin-top: 0">${(0,hl.Qt)(wc.CQ)} ${this._t.gvs.share_links}</h4>\n\t\t\t<div id="gvs-share-links" class="gvs-input-btn">\n\t\t\t\t<a id="gvs-share-image" class="gvs-link-btn gvs-hidden gvs-needs-picture" download target="_blank">${(0,hl.Qt)(dd.sA)} ${this._t.gvs.share_image}</a>\n\t\t\t\t<button id="gvs-share-url" data-copy="true" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">${(0,hl.Qt)(pd.jP)} ${this._t.gvs.share_page}</button>\n\t\t\t\t<button id="gvs-share-print" style="flex-basis: 100%; flex-grow: 2; flex-shrink: 2;">${(0,hl.Qt)(qu.Jx)} ${this._t.gvs.share_print}</button>\n\t\t\t</div>\n\t\t\t<h4>\n\t\t\t\t${(0,hl.Qt)(Sc.e5)} ${this._t.gvs.share_embed}\n\t\t\t\t<a href="https://docs.panoramax.fr/web-viewer/03_URL_settings/"\n\t\t\t\t\ttitle="${this._t.gvs.share_embed_docs}"\n\t\t\t\t\ttarget="_blank"\n\t\t\t\t\tstyle="vertical-align: middle">\n\t\t\t\t\t${(0,hl.Qt)(ld.faCircleInfo)}\n\t\t\t\t</a>\n\t\t\t</h4>\n\t\t\t<div class="gvs-input-btn">\n\t\t\t\t<textarea id="gvs-share-iframe" readonly></textarea>\n\t\t\t\t<button data-input="gvs-share-iframe">${(0,hl.Qt)(pd.jP)} ${this._t.gvs.copy}</button>\n\t\t\t</div>\n\t\t\t<h4 class="gvs-hidden gvs-needs-picture">${(0,hl.Qt)(Nu.hp)} ${this._t.gvs.edit_osm}</h4>\n\t\t\t<div class="gvs-input-btn gvs-hidden gvs-needs-picture" style="justify-content: center">\n\t\t\t\t<a id="gvs-edit-id" class="gvs-link-btn" target="_blank">${(0,hl.Qt)(ud.gK)} ${this._t.gvs.id}</a>\n\t\t\t\t<button id="gvs-edit-josm" title="${this._t.gvs.josm_live}">${(0,hl.Qt)(ih.hU)} ${this._t.gvs.josm}</button>\n\t\t\t</div>\n\t\t`,(0,hl.wj)("gvs-widget-share","main-bottom-right",this,[ll,cl],["gvs-group-large","gvs-group-btnpanel","gvs-mobile-hidden","gvs-print-hidden"]);const dl=document.getElementById("gvs-share-links"),pl=document.getElementById("gvs-share-image"),fl=document.getElementById("gvs-share-url");if(this._viewer._api.getRSSURL()){const F=document.createElement("a");F.id="gvs-share-rss",F.classList.add("gvs-link-btn"),F.setAttribute("target","_blank"),F.setAttribute("title",this._t.gvs.share_rss_title),F.appendChild((0,hl.fa)(hd.zb)),F.appendChild(document.createTextNode(this._t.gvs.share_rss)),dl.insertBefore(F,fl)}this._viewer.addEventListener("psv:picture-loaded",(()=>{var F,Da;const ll=this._viewer.psv.getPictureMetadata();pl.href=null===ll||void 0===ll||null===(F=ll.panorama)||void 0===F?void 0:F.hdUrl;document.getElementById("gvs-share-license").innerHTML=null!==ll&&void 0!==ll&&null!==(Da=ll.caption)&&void 0!==Da&&Da.license?this._t.gvs.legend_license.replace("{l}",ll.caption.license):"";const hl=cl.getElementsByClassName("gvs-needs-picture");for(let cl=0;cl<hl.length;cl++){const F=hl[cl];ll?F.classList.remove("gvs-hidden"):F.classList.add("gvs-hidden")}}));const updateLinks=F=>{var Da,ll,hl;const dl=(null===F||void 0===F||null===(Da=F.detail)||void 0===Da?void 0:Da.url)||window.location.href.replace(/\/$/,""),pl=this._options.iframeBaseURL?this._options.iframeBaseURL+window.location.hash:dl,fl=cl.querySelector("#gvs-share-url"),Al=cl.querySelector("#gvs-share-iframe"),bl=cl.querySelector("#gvs-edit-id"),kl=cl.querySelector("#gvs-share-rss");fl.setAttribute("data-copy",(null===(ll=this._viewer)||void 0===ll||null===(hl=ll._hash)||void 0===hl?void 0:hl.getShortLink(dl))||dl),Al.innerText=`<iframe src="${pl}" style="border: none; width: 500px; height: 300px"></iframe>`;const Dl=this._viewer.psv.getPictureMetadata();if(Dl){const F={map:`19/${Dl.gps[1]}/${Dl.gps[0]}`,source:"Panoramax",photo_overlay:"panoramax",photo:`panoramax/${Dl.id}`};bl.setAttribute("href",`${this._options.editIdUrl}#${new URLSearchParams(F).toString()}`)}var Wl,Ql;kl&&kl.setAttribute("href",this._viewer._api.getRSSURL(null===(Wl=this._viewer)||void 0===Wl||null===(Ql=Wl.map)||void 0===Ql?void 0:Ql.getBounds()))};updateLinks(),this._viewer.addEventListener("ready",updateLinks,{once:!0}),null===(F=this._viewer)||void 0===F||null===(Da=F._hash)||void 0===Da||Da.addEventListener("url-changed",updateLinks),(0,hl.$c)(cl,this._viewer._t);const Al=cl.querySelector("#gvs-edit-josm");Al.addEventListener("click",(()=>{Al.classList.contains("gvs-btn-active")?this._viewer.toggleJOSMLive(!1):this._viewer.toggleJOSMLive(!0).catch((F=>{console.warn(F),alert(this._t.gvs.error_josm)}))})),this._viewer.addEventListener("josm-live-enabled",(()=>Al.classList.add("gvs-btn-active"))),this._viewer.addEventListener("josm-live-disabled",(()=>Al.classList.remove("gvs-btn-active")));cl.querySelector("#gvs-share-print").addEventListener("click",window.print.bind(window))}}},7325:(F,Da)=>{"use strict";var ll="star",cl=[11088,61446],hl="f005",dl="M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z";Da.mw={prefix:"far",iconName:ll,icon:[576,512,cl,hl,dl]},Da.yy=Da.mw},6069:(F,Da)=>{"use strict";var ll="arrow-right",cl=[8594],hl="f061",dl="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.dm=Da.mw},4881:(F,Da)=>{"use strict";var ll=[61946],cl="M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256l0 32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32l0 80 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z";Da.mw={prefix:"fas",iconName:"at",icon:[512,512,ll,"40",cl]},Da.Hz=Da.mw},1705:(F,Da)=>{"use strict";var ll="backward",cl=[9194],hl="f04a",dl="M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-320c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3l0 41.7 0 41.7L459.5 440.6zM256 352l0-96 0-128 0-32c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29l0-64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.TH=Da.mw},9186:(F,Da)=>{"use strict";var ll="calendar",cl=[128197,128198],hl="f133",dl="M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.ok=Da.mw},99:(F,Da)=>{"use strict";var ll="camera",cl=[62258,"camera-alt"],hl="f030",dl="M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.rw=Da.mw},174:(F,Da)=>{"use strict";var ll="check",cl=[10003,10004],hl="f00c",dl="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.e6=Da.mw},2593:(F,Da)=>{"use strict";var ll="chevron-down",cl=[],hl="f078",dl="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.Jt=Da.mw},4011:(F,Da)=>{"use strict";var ll="circle-exclamation",cl=["exclamation-circle"],hl="f06a",dl="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.lE=Da.mw},7516:(F,Da)=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var ll="circle-info",cl=["info-circle"],hl="f05a",dl="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z";Da.definition={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.faCircleInfo=Da.definition,Da.prefix="fas",Da.iconName=ll,Da.width=512,Da.height=512,Da.ligatures=cl,Da.unicode=hl,Da.svgPathData=dl,Da.aliases=cl},3444:(F,Da)=>{"use strict";var ll="circle-notch",cl=[],hl="f1ce",dl="M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.s4=Da.mw},9564:(F,Da)=>{"use strict";var ll="circle-question",cl=[62108,"question-circle"],hl="f059",dl="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.AP=Da.mw},4162:(F,Da)=>{"use strict";var ll="cloud-arrow-down",cl=[62337,"cloud-download","cloud-download-alt"],hl="f0ed",dl="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39L344 184c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 134.1-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.sA=Da.mw},2975:(F,Da)=>{"use strict";var ll="comment-dots",cl=[128172,62075,"commenting"],hl="f4ad",dl="M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM128 208a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm128 0a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm96 32a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.Be=Da.mw},4189:(F,Da)=>{"use strict";var ll="copy",cl=[],hl="f0c5",dl="M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.jP=Da.mw},7172:(F,Da)=>{"use strict";var ll="earth-europe",cl=["globe-europe"],hl="f7a2",dl="M266.3 48.3L232.5 73.6c-5.4 4-8.5 10.4-8.5 17.1l0 9.1c0 6.8 5.5 12.3 12.3 12.3c2.4 0 4.8-.7 6.8-2.1l41.8-27.9c2-1.3 4.4-2.1 6.8-2.1l1 0c6.2 0 11.3 5.1 11.3 11.3c0 3-1.2 5.9-3.3 8l-19.9 19.9c-5.8 5.8-12.9 10.2-20.7 12.8l-26.5 8.8c-5.8 1.9-9.6 7.3-9.6 13.4c0 3.7-1.5 7.3-4.1 10l-17.9 17.9c-6.4 6.4-9.9 15-9.9 24l0 4.3c0 16.4 13.6 29.7 29.9 29.7c11 0 21.2-6.2 26.1-16l4-8.1c2.4-4.8 7.4-7.9 12.8-7.9c4.5 0 8.7 2.1 11.4 5.7l16.3 21.7c2.1 2.9 5.5 4.5 9.1 4.5c8.4 0 13.9-8.9 10.1-16.4l-1.1-2.3c-3.5-7 0-15.5 7.5-18l21.2-7.1c7.6-2.5 12.7-9.6 12.7-17.6c0-10.3 8.3-18.6 18.6-18.6l29.4 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-20.7 0c-7.2 0-14.2 2.9-19.3 8l-4.7 4.7c-2.1 2.1-3.3 5-3.3 8c0 6.2 5.1 11.3 11.3 11.3l11.3 0c6 0 11.8 2.4 16 6.6l6.5 6.5c1.8 1.8 2.8 4.3 2.8 6.8s-1 5-2.8 6.8l-7.5 7.5C386 262 384 266.9 384 272s2 10 5.7 13.7L408 304c10.2 10.2 24.1 16 38.6 16l7.3 0c6.5-20.2 10-41.7 10-64c0-111.4-87.6-202.4-197.7-207.7zm172 307.9c-3.7-2.6-8.2-4.1-13-4.1c-6 0-11.8-2.4-16-6.6L396 332c-7.7-7.7-18-12-28.9-12c-9.7 0-19.2-3.5-26.6-9.8L314 287.4c-11.6-9.9-26.4-15.4-41.7-15.4l-20.9 0c-12.6 0-25 3.7-35.5 10.7L188.5 301c-17.8 11.9-28.5 31.9-28.5 53.3l0 3.2c0 17 6.7 33.3 18.7 45.3l16 16c8.5 8.5 20 13.3 32 13.3l21.3 0c13.3 0 24 10.7 24 24c0 2.5 .4 5 1.1 7.3c71.3-5.8 132.5-47.6 165.2-107.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM187.3 100.7c-6.2-6.2-16.4-6.2-22.6 0l-32 32c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l32-32c6.2-6.2 6.2-16.4 0-22.6z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.YS=Da.mw},6533:(F,Da)=>{"use strict";var ll="ellipsis-vertical",cl=["ellipsis-v"],hl="f142",dl="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z";Da.mw={prefix:"fas",iconName:ll,icon:[128,512,cl,hl,dl]},Da.nx=Da.mw},5431:(F,Da)=>{"use strict";var ll="forward",cl=[9193],hl="f04e",dl="M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416L0 96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4L224 214.3l0 41.7 0 41.7L52.5 440.6zM256 352l0-96 0-128 0-32c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4s-18.4-16.6-18.4-29l0-64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.vF=Da.mw},8739:(F,Da)=>{"use strict";var ll="gear",cl=[9881,"cog"],hl="f013",dl="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.BH=Da.mw},5279:(F,Da)=>{"use strict";var ll="image",cl=[],hl="f03e",dl="M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.jb=Da.mw},6668:(F,Da,ll)=>{"use strict";var cl=ll(7516);Da.mw={prefix:cl.prefix,iconName:cl.iconName,icon:[cl.width,cl.height,cl.aliases,cl.unicode,cl.svgPathData]},Da.iW=Da.mw,cl.prefix,cl.iconName,cl.width,cl.height,cl.aliases,cl.unicode,cl.svgPathData,cl.aliases},4220:(F,Da)=>{"use strict";var ll="layer-group",cl=[],hl="f5fd",dl="M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z";Da.mw={prefix:"fas",iconName:ll,icon:[576,512,cl,hl,dl]},Da.qI=Da.mw},325:(F,Da)=>{"use strict";var ll="lightbulb",cl=[128161],hl="f0eb",dl="M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.rC=Da.mw},7964:(F,Da)=>{"use strict";var ll="link",cl=[128279,"chain"],hl="f0c1",dl="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.CQ=Da.mw},3520:(F,Da)=>{"use strict";var ll="location-dot",cl=["map-marker-alt"],hl="f3c5",dl="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.gK=Da.mw},7761:(F,Da)=>{"use strict";var ll="magnifying-glass",cl=[128269,"search"],hl="f002",dl="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.$U=Da.mw},2e3:(F,Da)=>{"use strict";var ll=[128506,62072],cl="f279",hl="M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z";Da.mw={prefix:"fas",iconName:"map",icon:[576,512,ll,cl,hl]},Da.e5=Da.mw},3233:(F,Da)=>{"use strict";var ll="medal",cl=[127941],hl="f5a2",dl="M4.1 38.2C1.4 34.2 0 29.4 0 24.6C0 11 11 0 24.6 0L133.9 0c11.2 0 21.7 5.9 27.4 15.5l68.5 114.1c-48.2 6.1-91.3 28.6-123.4 61.9L4.1 38.2zm503.7 0L405.6 191.5c-32.1-33.3-75.2-55.8-123.4-61.9L350.7 15.5C356.5 5.9 366.9 0 378.1 0L487.4 0C501 0 512 11 512 24.6c0 4.8-1.4 9.6-4.1 13.6zM80 336a176 176 0 1 1 352 0A176 176 0 1 1 80 336zm184.4-94.9c-3.4-7-13.3-7-16.8 0l-22.4 45.4c-1.4 2.8-4 4.7-7 5.1L168 298.9c-7.7 1.1-10.7 10.5-5.2 16l36.3 35.4c2.2 2.2 3.2 5.2 2.7 8.3l-8.6 49.9c-1.3 7.6 6.7 13.5 13.6 9.9l44.8-23.6c2.7-1.4 6-1.4 8.7 0l44.8 23.6c6.9 3.6 14.9-2.2 13.6-9.9l-8.6-49.9c-.5-3 .5-6.1 2.7-8.3l36.3-35.4c5.6-5.4 2.5-14.8-5.2-16l-50.1-7.3c-3-.4-5.7-2.4-7-5.1l-22.4-45.4z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.B9=Da.mw},7290:(F,Da)=>{"use strict";var ll="minus",cl=[8211,8722,10134,"subtract"],hl="f068",dl="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.EZ=Da.mw},8629:(F,Da)=>{"use strict";var ll="palette",cl=[127912],hl="f53f",dl="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.fy=Da.mw},9683:(F,Da)=>{"use strict";var ll="panorama",cl=[],hl="e209",dl="M45.6 32C20.4 32 0 52.4 0 77.6L0 434.4C0 459.6 20.4 480 45.6 480c5.1 0 10-.8 14.7-2.4C74.6 472.8 177.6 440 320 440s245.4 32.8 259.6 37.6c4.7 1.6 9.7 2.4 14.7 2.4c25.2 0 45.6-20.4 45.6-45.6l0-356.7C640 52.4 619.6 32 594.4 32c-5 0-10 .8-14.7 2.4C565.4 39.2 462.4 72 320 72S74.6 39.2 60.4 34.4C55.6 32.8 50.7 32 45.6 32zM96 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm272 0c7.9 0 15.4 3.9 19.8 10.5L512.3 353c5.4 8 5.6 18.4 .4 26.5s-14.7 12.3-24.2 10.7C442.7 382.4 385.2 376 320 376c-65.6 0-123.4 6.5-169.3 14.4c-9.8 1.7-19.7-2.9-24.7-11.5s-4.3-19.4 1.9-27.2L197.3 265c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l26.4 33.1 87-127.6c4.5-6.6 11.9-10.5 19.8-10.5z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.pt=Da.mw},1708:(F,Da)=>{"use strict";var ll="paper-plane",cl=[61913],hl="f1d8",dl="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.is=Da.mw},7472:(F,Da)=>{"use strict";var ll="pause",cl=[9208],hl="f04c",dl="M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z";Da.mw={prefix:"fas",iconName:ll,icon:[320,512,cl,hl,dl]},Da.G1=Da.mw},7321:(F,Da)=>{"use strict";var ll=[128394],cl="f304",hl="M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z";Da.mw={prefix:"fas",iconName:"pen",icon:[512,512,ll,cl,hl]},Da.hp=Da.mw},9243:(F,Da)=>{"use strict";var ll="person-biking",cl=[128692,"biking"],hl="f84a",dl="M400 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm27.2 64l-61.8-48.8c-17.3-13.6-41.7-13.8-59.1-.3l-83.1 64.2c-30.7 23.8-28.5 70.8 4.3 91.6L288 305.1 288 416c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128c0-10.7-5.3-20.7-14.2-26.6L295 232.9l60.3-48.5L396 217c5.7 4.5 12.7 7 20 7l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-52.8 0zM56 384a72 72 0 1 1 144 0A72 72 0 1 1 56 384zm200 0A128 128 0 1 0 0 384a128 128 0 1 0 256 0zm184 0a72 72 0 1 1 144 0 72 72 0 1 1 -144 0zm200 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z";Da.mw={prefix:"fas",iconName:ll,icon:[640,512,cl,hl,dl]},Da.rO=Da.mw},6386:(F,Da)=>{"use strict";var ll="play",cl=[9654],hl="f04b",dl="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.ij=Da.mw},1372:(F,Da)=>{"use strict";var ll="plus",cl=[10133,61543,"add"],hl="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,"2b",hl]},Da.QL=Da.mw},501:(F,Da)=>{"use strict";var ll="print",cl=[128424,128438,9113],hl="f02f",dl="M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.Jx=Da.mw},7744:(F,Da)=>{"use strict";var ll="rocket",cl=[],hl="f135",dl="M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2l0 82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9l0-107.2c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.KM=Da.mw},6787:(F,Da)=>{"use strict";var ll="satellite-dish",cl=[128225],hl="f7c0",dl="M192 32c0-17.7 14.3-32 32-32C383.1 0 512 128.9 512 288c0 17.7-14.3 32-32 32s-32-14.3-32-32C448 164.3 347.7 64 224 64c-17.7 0-32-14.3-32-32zM60.6 220.6L164.7 324.7l28.4-28.4c-.7-2.6-1.1-5.4-1.1-8.3c0-17.7 14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32c-2.9 0-5.6-.4-8.3-1.1l-28.4 28.4L291.4 451.4c14.5 14.5 11.8 38.8-7.3 46.3C260.5 506.9 234.9 512 208 512C93.1 512 0 418.9 0 304c0-26.9 5.1-52.5 14.4-76.1c7.5-19 31.8-21.8 46.3-7.3zM224 96c106 0 192 86 192 192c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-70.7-57.3-128-128-128c-17.7 0-32-14.3-32-32s14.3-32 32-32z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.hU=Da.mw},1260:(F,Da)=>{"use strict";var ll="share-nodes",cl=["share-alt"],hl="f1e0",dl="M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.ek=Da.mw},1904:(F,Da)=>{"use strict";var ll="sliders",cl=["sliders-h"],hl="f1de",dl="M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da._$=Da.mw},3095:(F,Da)=>{"use strict";var ll="square-rss",cl=["rss-square"],hl="f143",dl="M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM96 136c0-13.3 10.7-24 24-24c137 0 248 111 248 248c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-110.5-89.5-200-200-200c-13.3 0-24-10.7-24-24zm0 96c0-13.3 10.7-24 24-24c83.9 0 152 68.1 152 152c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-57.4-46.6-104-104-104c-13.3 0-24-10.7-24-24zm0 120a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.zb=Da.mw},4780:(F,Da)=>{"use strict";var ll="star",cl=[11088,61446],hl="f005",dl="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z";Da.mw={prefix:"fas",iconName:ll,icon:[576,512,cl,hl,dl]},Da.yy=Da.mw},6311:(F,Da)=>{"use strict";var ll="triangle-exclamation",cl=[9888,"exclamation-triangle","warning"],hl="f071",dl="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z";Da.mw={prefix:"fas",iconName:ll,icon:[512,512,cl,hl,dl]},Da.JA=Da.mw},7879:(F,Da)=>{"use strict";var ll="user",cl=[128100,62144],hl="f007",dl="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z";Da.mw={prefix:"fas",iconName:ll,icon:[448,512,cl,hl,dl]},Da.X4=Da.mw},6627:(F,Da)=>{"use strict";var ll="xmark",cl=[128473,10005,10006,10060,215,"close","multiply","remove","times"],hl="f00d",dl="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z";Da.mw={prefix:"fas",iconName:ll,icon:[384,512,cl,hl,dl]},Da.Jy=Da.mw},1545:(F,Da,ll)=>{"use strict";ll.d(Da,{AZ:()=>od,GR:()=>Op,IJ:()=>Up,Qw:()=>Rp,TL:()=>am,Wp:()=>Lu,aH:()=>dl,e6:()=>zu,jM:()=>Um,rx:()=>ld,uj:()=>jp,zY:()=>sm});var cl=ll(9408),hl=Object.defineProperty,__export=(F,Da)=>{for(var ll in Da)hl(F,ll,{get:Da[ll],enumerable:!0})},dl={};
13
13
  /*!
14
14
  * Photo Sphere Viewer 5.11.0-beta.1
15
15
  * @copyright 2014-2015 Jérémy Heleine
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "3.2.3-develop-ecb7e151",
3
+ "version": "3.2.3-develop-78e86a51",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -1 +1,25 @@
1
- {}
1
+ {
2
+ "psv": {
3
+ "twoFingers": "Använd två fingrar för att panorera",
4
+ "loadError": "Panoramat kan inte laddas",
5
+ "ctrlZoom": "Använd ctrl + scroll för att zooma in på bilden"
6
+ },
7
+ "gvs": {
8
+ "moveUp": "Flytta upp",
9
+ "zoom": "Zoom",
10
+ "zoomOut": "Zooma ut",
11
+ "zoomIn": "Zooma in",
12
+ "moveDown": "Flytta ner",
13
+ "moveLeft": "Flytta vänster",
14
+ "moveRight": "Flytta höger",
15
+ "moveMiddle": "Centrera vy",
16
+ "expand": "Expandera",
17
+ "show_psv": "Visa bildvisaren",
18
+ "show_map": "Visa kartan",
19
+ "expand_info": "Visa widgeten på hela sidan"
20
+ },
21
+ "maplibre": {
22
+ "GeolocateControl.FindMyLocation": "Hitta min postion",
23
+ "GeolocateControl.LocationNotAvailable": "Plats inte tillgänlig"
24
+ }
25
+ }