var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Maps;(function(n){var u=function(u){function f(n,t,i,r,f,e,o){var s=u.call(this,n,t,i,r)||this;return s._panoAvail=!1,s._fullscreenRequested=!0,s._walkColor="#777",s._mapId="map",s.mapListener=function(n,t){var i;if(n.type==="map-redraw")if(i=t.map.getZoom(),i>=t.mapSettings.minZoom){var r=t.getMapBorder(),f=r.GetMaxX(),e=r.GetMinX(),o=r.GetMinY(),s=r.GetMaxY(),u=$.ajax({type:"GET",cache:!1,url:t.ajaxBaseUrl+"SearchTimetableObjectsInRect",dataType:"jsonp",data:{combID:t.combId,minX:f,minY:e,maxX:o,maxY:s,zoom:i,format:"json"}});u.done(function(n){var u,r;if(n)for(t._markersLayer&&(t.map.removeLayer(t._markersLayer),t._markersLayer=null),t._markersLayer=new SMap.Layer.Marker,t.map.addLayer(t._markersLayer),t._markersLayer.enable(),u=function(){var u=n[r],c=new SMap.Coords(u.lng,u.lat),f=document.createElement("div"),s=document.createElement("img"),o,e,h;s.src="/images/"+u.ico;f.appendChild(s);i>=t.mapSettings.minZoom+1&&(o=document.createElement("div"),o.className="marker-label",o.innerHTML=u.name,f.appendChild(o));e=document.createElement("div");e.innerHTML="<strong>"+u.name+'<\/strong> Linka: <span style="font-weight:bold">'+u.info+"<\/span>";e.classList.add("map-station-tooltip");f.addEventListener("mouseover",function(){f.appendChild(e)});f.addEventListener("mouseout",function(){f.removeChild(e)});f.addEventListener("click",function(){$("#positionAC").val(u.name);$("#positionACHidden").val(u.name+"%"+u.listId);t._fullscreenButton.isActive&&t.fullscreenToggle(null,null,!1)});h=new SMap.Marker(c,"myMarker",{url:f});t._markersLayer.addMarker(h)},r=0;r<n.length;r++)u()});u.fail(function(){})}else t._markersLayer&&(t.map.removeLayer(t._markersLayer),t._markersLayer=null)},s._positionData=f,s.isFormMap=e,s.isDetail=o,s}return __extends(f,u),f.prototype.init=function(){var s=new Base.ModalParams("idos-modal__content--90perc map-modal","",!1,!1,0,!1,!0,this.isFormMap),u,f,e,n,r;if(s.backgroundTransparent=!0,$("#"+this._mapId).html(null),u=new Base.Modal(null,new Messages.MessagesService(null),null,s,null),u.show("#maps-modal"),f=.95,this.isFormMap&&(f=.85,this.positionAC=new Components.Autocomplete("positionAC",this._positionData,this.msgService)),e=$(window).height()*f,$("#"+this._mapId).height(e),this.map=new SMap(document.getElementById("map")),this._baseMapLayer=this.map.addDefaultLayer(SMap.DEF_BASE),this._baseMapLayer.enable(),this._ophotoMapLayer=this.map.addDefaultLayer(SMap.DEF_OPHOTO),this._hybridMapLayer=this.map.addDefaultLayer(SMap.DEF_HYBRID),this.map.addDefaultControls(),this.removeCompassControl(),this.map.addControl(new t(SMap.DEF_OPHOTO,"Z letadla"),{left:"17px",top:"17px"}),this._fullscreenButton=new i("Přepnout zobrazení na celou obrazovku"),this.map.addControl(this._fullscreenButton,{right:"100px",top:"17px"}),this.map.setCursor(null),n=this,r=this.map.getSignals(),this.isFormMap&&r.addListener(window,"map-redraw",function(t){n.mapListener(t,n)},null),r.addListener(this,"layer-button-click","_layerButtonClick"),r.addListener(this,"fullscreen-button-click","fullscreenToggle"),$(".map-controls-panel button").click(function(){var t=$("#positionAC").val(),i=$("#positionACHidden").val();$("#"+n.mapSettings.parentInputSelector).val(t);$("#"+n.mapSettings.parentInputHiddenSelector).val(i);u.close()}),this.mapSettings&&(this.fromPosition=SMap.Coords.fromWGS84(this.mapSettings.coorFromY,this.mapSettings.coorFromX),this.toPosition=SMap.Coords.fromWGS84(this.mapSettings.coorToY,this.mapSettings.coorToX)),$(".map-modal").parent().css("overflow","hidden"),$(".map-modal").height(e),this.isFormMap){var o=[],c=new SMap.Coords(this.mapSettings.viewportLngMin,this.mapSettings.viewportLatMin),l=new SMap.Coords(this.mapSettings.viewportLngMax,this.mapSettings.viewportLatMax);o.push(c);o.push(l);var h=this.map.computeCenterZoom(o,!0),a=h[0],v=h[1];this.map.setCenterZoom(a,v);$("#coorACHidden").change(function(){var i=$("#coorACHidden").val().toString(),t=i.split("%"),r=new SMap.Coords(Number(t[1]),Number(t[0]));n.map.setCenterZoom(r,18)})}$(document).on("keydown fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",function(t){(t.type!=="keydown"||t.keyCode==27)&&(n._fullscreenRequested||n._fullscreenButton.isActive&&n.fullscreenToggle(null,null,!0));(t.type==="fullscreenchange"||t.type==="webkitfullscreenchange"||t.type==="mozfullscreenchange"||t.type==="MSFullscreenChange")&&(n._fullscreenRequested=!1)})},f.prototype.removeCompassControl=function(){var n=this.map.getControls().filter(function(n){return n instanceof SMap.Control.Compass});!Base.Support.emptyArray(n)&&n[0]&&this.map.removeControl(n[0])},f.prototype._layerButtonClick=function(n){var t=n.target;t.toggleActive();switch(t.layer){case SMap.DEF_OPHOTO:t.isActive?(this._baseMapLayer.disable(),this._ophotoMapLayer.enable(),this._hybridMapLayer.enable()):(this._baseMapLayer.enable(),this._ophotoMapLayer.disable(),this._hybridMapLayer.disable());break;case SMap.DEF_PANO:this._panoMapLayer&&(this._panoMapLayer.isActive()?this._panoMapLayer.disable():this._panoMapLayer.enable())}},f.prototype.fullscreenToggle=function(n,t,i){this._fullscreenButton.toggleActive();var u=this.map.getCenter(),r=document.documentElement;this._fullscreenButton.isActive?(this._originalHeight=$("#"+this._mapId).height(),document.fullscreenEnabled&&r.requestFullscreen&&(this._fullscreenRequested=!0,r.requestFullscreen({navigationUI:"show"})),$("#"+this._mapId).css({position:"fixed",width:"100%",height:"100%",top:"0",left:"0",zIndex:"100"}),$("body").css({overflow:"hidden"})):(document.fullscreenEnabled&&document.exitFullscreen&&!i&&document.exitFullscreen(),$("#"+this._mapId).css({position:"relative",width:"",height:this._originalHeight,top:"",left:"",zIndex:""}),$("body").css({overflow:"visible"}));this.map.syncPort();this.map.setCenter(u)},f.prototype._panoAvailable=function(){this._panoAvail||(this._panoAvail=!0,this.map.setCursor("pointer"))},f.prototype._panoUnavailable=function(){this._panoAvail&&(this.map.setCursor(null),this._panoAvail=!1)},f.prototype.getMapBorder=function(){var n=this.getMapBorderCorners(),t=n[0],i=n[1],u=t.toCoords(this.map),f=u.toWGS84().reverse().join(", "),e=i.toCoords(this.map),o=e.toWGS84().reverse().join(", ");return new r(f,o)},f.prototype.showConnectionOnMap=function(n){try{if(n==null||this.IsErrorJSON(n))return;typeof n.aoTrains!="undefined"&&n.aoTrains!=null&&n.aoTrains.length>0&&(this._mapData=n,this.drawMapRoute(!0))}catch(t){}},f.prototype.drawMapRoute=function(n){var i,t,r;try{if(typeof this._mapData!="undefined"&&this._mapData!=null){if(this.deleteMapRoutes(),i=[],typeof this._mapData.aoLines=="undefined"||this._mapData.aoLines.length==0){for(this._mapData.aoLines=[],this._mapData.aoBlackLines=[],this._mapData.aoMarkers=[],t=0;t<this._mapData.aoTrains.length;t++)this.drawTrainRoute(t,i);this.addStartAndFinishMarkers(i)}else for(t=0;t<this._mapData.aoLines.length;t++)r=this.getLinesLayer(),r.addGeometry(this._mapData.aoLines[t]),r.addGeometry(this._mapData.aoBlackLines[t]);if(!Base.Support.emptyArray(i)&&n){var u=this.map.computeCenterZoom(i,!0),f=u[0],e=u[1];this.map.setCenterZoom(f,e)}}else{this.getMapRoute(this._mapData.iID);return}}catch(o){}},f.prototype.getTTObjects=function(){},f.prototype.drawTrainRoute=function(t,i){var r=this._mapData.aoTrains[t],l,a,u;if(n.TrainMapData.hasStations(r)){var e="#aaa",o=!1,s=[],h=[],c=[];for(this.hasWalkToNextTrain(this._mapData.aoTrains,t)&&(o=!0,l=r.aoStations[r.aoStations.length-1],a=f.getStationCoords(l),this.addWalkLine(a,f.getStationCoords(n.TrainMapData.getFirstStation(this._mapData.aoTrains[t+1])))),u=0;u<r.aoStations.length;u++)this.drawTrainStation(r,t,u,s,h,c,i,o&&u===r.aoStations.length-1);this.addRouteLine(e,h);this.addRouteLine(r.sColor,s);this.addRouteLine(e,c)}},f.prototype.addStartAndFinishMarkers=function(n){var h=this._mapData.aoTrains.filter(function(n){return n.bHasStart}),t=this._mapData.aoTrains.filter(function(n){return n.bHasEnd}),i,r,u,c,e,o,s,l;Base.Support.emptyArray(h)||(i=h[0],r=i.aoStations.filter(function(n){return n.bIsOnSearchedRoute}),Base.Support.emptyArray(r)||(u=r[0],c=f.getStationCoords(u),this.drawStartOrFinishMarker(!0,c,this.fromPosition,u,i,n)));Base.Support.emptyArray(t)||(e=t[t.length-1],o=e.aoStations.filter(function(n){return n.bIsLastOnSearchedRoute}),Base.Support.emptyArray(o)||(s=o[0],l=f.getStationCoords(s),this.drawStartOrFinishMarker(!1,l,this.toPosition,s,e,n)))},f.prototype.drawTrainStation=function(t,i,r,u,e,o,s,h){var c=t.aoStations[r],a=f.getStationCoords(c),v=null,l=null,y;this.fillRouteCoors(c,a,u,e,o,s);r==0&&i>0&&i<=this._mapData.aoTrains.length-1&&!this.hasWalkToNextTrain(this._mapData.aoTrains,i-1)&&(l=this._mapData.aoTrains[i-1],v=n.TrainMapData.getLastStation(l));y=r===n.TrainMapData.getStationIndexOnRoute(n.TrainMapData.getFirstStationOnRoute(t),t);this.addStationMarker("/images/map_pin_bg.png",a,this.getTooltipDescription(c,v,t,l,r<t.aoStations.length-1,h),"st-"+i+"-"+r,y,!1,s,t,i)},f.prototype.drawStartOrFinishMarker=function(n,t,i,r,u,f){var o=null,e="",c=n?this.canDrawUserFromPositionPoint():this.canDrawUserToPositionPoint(),h=!1,s;i!=null&&!t.equals(i)&&c?(o=i,e=this.msgService.getMessages().conn.placeFrom(this.mapSettings.sFromName),h=!0,s="walk-start",n||(e=this.msgService.getMessages().conn.placeTo(this.mapSettings.sToName),s="walk-finish"),this.addStationMarker("/images/map_pin_bg.png",i,null,s,!1,!1,f),this.addWalkLine(i,t)):(o=t,e=this.getTooltipDescription(r,null,u,null,n));this.addStationMarker(n?"/images/map_pin_start.png":"/images/map_pin_finish_edge.png",o,e,n?"st-start":"st-finish",!h&&n,!0)},f.prototype.hasWalkToNextTrain=function(t,i){return i>=0&&i<t.length-1&&t[i].bHasEnd&&t[i+1].bHasStart&&n.TrainMapData.hasStations(t[i])&&n.TrainMapData.hasStations(t[i+1])&&!f.getStationCoords(n.TrainMapData.getLastStation(t[i])).equals(f.getStationCoords(n.TrainMapData.getFirstStation(t[i+1])))},f.prototype.fillRouteCoors=function(n,t,i,r,u,f){if(n.bIsOnSearchedRoute?i[i.length]=t:i.length===0?r[r.length]=t:u[u.length]=t,f.push(t),n.aoCoor!=null)for(var e=0;e<n.aoCoor.length;e++)n.bIsOnSearchedRoute?(i[i.length]=SMap.Coords.fromWGS84(n.aoCoor[e].y,n.aoCoor[e].x),f.push(i[i.length-1])):i.length===0?(r[r.length]=SMap.Coords.fromWGS84(n.aoCoor[e].y,n.aoCoor[e].x),f.push(r[r.length-1])):(u[u.length]=SMap.Coords.fromWGS84(n.aoCoor[e].y,n.aoCoor[e].x),f.push(u[u.length-1]))},f.prototype.deleteMapRoutes=function(){this.removeLinesLayer();this.removeMarkersLayer();this._mapData&&(typeof this._mapData.aoLines!="undefined"&&(this._mapData.aoLines=[]),typeof this._mapData.aoBlackLines!="undefined"&&(this._mapData.aoBlackLines=[]))},f.prototype.addRouteLine=function(n,t){if(t&&t.length>0){var i=new SMap.Geometry(SMap.GEOMETRY_POLYLINE,null,t,{color:"#000000",outlineWidth:0,width:6,opacity:1}),r=new SMap.Geometry(SMap.GEOMETRY_POLYLINE,null,t,{color:n,outlineWidth:0,width:4,opacity:1}),u=this.getLinesLayer();u.addGeometry(i);u.addGeometry(r);this._mapData.aoBlackLines.push(i);this._mapData.aoLines.push(r)}},f.prototype.addWalkLine=function(n,t){var i=[],r,u;i[0]=n;i[1]=t;r=new SMap.Geometry(SMap.GEOMETRY_POLYLINE,null,i,{color:this._walkColor,outlineWidth:0,width:3,opacity:1});u=this.getLinesLayer();u.addGeometry(r);this._mapData.aoBlackLines.push(null);this._mapData.aoLines.push(r)},f.prototype.addStationMarker=function(n,t,i,r,u,f,e,o,s){var h,a,l,c,v;r===void 0&&(r=null);e===void 0&&(e=null);o===void 0&&(o=null);s===void 0&&(s=-1);h=document.createElement("div");a=document.createElement("img");a.src=n;h.appendChild(a);!f&&e&&e.push(t);var y=this.getMarkersLayer(),p=f?{left:9,bottom:8}:{left:6,bottom:12},w=new SMap.Marker(t,r,{url:h,anchor:p});!i||f&&u||(u&&o?(l=document.createElement("div"),l.innerHTML=i,l.classList.add("map-train-tooltip"),h.appendChild(l)):(c=document.createElement("div"),c.innerHTML=i,c.classList.add("map-station-tooltip"),v=this,h.addEventListener("mouseover",function(){var n=v.getMarkerPosition(t);v.showStationTooltip(h,c,n)}),h.addEventListener("mouseout",function(){h.removeChild(c)})));y.addMarker(w)},f.prototype.showStationTooltip=function(n,t,i,r,u){var b,h;r===void 0&&(r=0);u===void 0&&(u=0);n.appendChild(t);var o=$(t),y=0,c=$("#"+this._mapId).width(),d=$("#"+this._mapId).height(),l="left",a="bottom",f,e,p=-1,w=-1,k=parseFloat(getComputedStyle(n).fontSize),s=.7*k,v=1.2*k;n?(p=$("#"+this._mapId).offset().left-$(document).scrollLeft(),w=$("#"+this._mapId).offset().top-$(document).scrollTop(),f=$(n).offset().left-$(document).scrollLeft()-p,e=$(n).offset().top-$(document).scrollTop()-w):(f=Math.round(i.x),e=Math.round(i.y));f+=r;e+=u;b=o.outerHeight();h=o.outerWidth();e-b-v<=0&&(a="top",u+=$(n).height());f+h-s>=c&&(l="right");l=="left"&&a=="top"?(f=f-s,e=e+v+u,f<y&&(f=y),this.addMarkerTooltipPositionClass(o,"left-top")):l=="right"&&a=="top"?(f=f-r+s>c?c-h:f+2*s-h-r,e=e+v+u,this.addMarkerTooltipPositionClass(o,"right-top")):l=="left"&&a=="bottom"?(f=f-s,e=e-v-b-u,f<y&&(f=y),this.addMarkerTooltipPositionClass(o,"left-bottom")):l=="right"&&a=="bottom"&&(f=f-r+s>c?c-h:f+2*s-h-r,e=e-v-b-u,this.addMarkerTooltipPositionClass(o,"right-bottom"));p>-1&&(f=f+p);w>-1&&(e=e+w);o.css("position","fixed");o.css("left",f+"px");o.css("top",e+"px")},f.prototype.addMarkerTooltipPositionClass=function(n,t){n.removeClass("left-bottom right-bottom left-top right-top").addClass(t)},f.prototype.getMarkerPosition=function(n){var t=this.latLngToPixels(n),i=$("#"+this._mapId).offset();return new SMap.Pixel(t.x+i.left,t.y+i.top)},f.prototype.latLngToPixels=function(n){var t=this.map.getProjection().coordsToPixel(n,this.map.getCenter(),this.map.getZoom(),SMap.NORTH),i=this.getMapBorderCorners(),u=i[0],f=i[1],r=Math.pow(2,this.map.getZoom());return new SMap.Pixel((t.x-u.x)*r,(t.y-f.y)*r)},f.prototype.getMapBorderCorners=function(){var n=this.map.getSize(),t=Math.round(n.x/2),i=Math.round(n.y/2),r=new SMap.Pixel(-t,-i),u=new SMap.Pixel(t,i);return[r,u]},f.prototype.getTooltipDescription=function(n,t,i,r,u,f){var h,o,c,s,e,l;return f===void 0&&(f=!1),c="",s="",u?(h=this.msgService.getMessages().conn.dep,o=this.msgService.getMessages().conn.arr,Base.Support.stringIsEmpty(n.sArr)||(c=" "+o+" "+n.sArr+", "),s=n.sDep):(h=this.msgService.getMessages().conn.arr,o=this.msgService.getMessages().conn.dep,s=Base.Support.stringIsEmpty(n.sArr)?n.sDep:n.sArr),e="<strong>"+n.name+"<\/strong>",t&&r&&(l="",l=Base.Support.stringIsEmpty(t.sArr)?t.sDep:t.sArr,e+=this.getConnDesc(r,", "+o+" "+l)+"<br/>"),e+=this.getConnDesc(i,", "+c+h+" "+s),f&&(e+="<br/>"+this.getWalkDesc(i)),e},f.prototype.getConnDesc=function(n,t){var i='<img src="/images/trtype/'+n.sTypeImgName+'.svg" alt="'+n.sTypeName+'" width="12" height="12" class="trtype trtype--'+n.sTypeImgName+'" />'+('<span class="conn-desc-container"><span style="color:'+n.sColor+'">'+n.sType+" "+n.sLine);return Base.Support.stringIsEmpty(n.sName)||(i+=" "+n.sName),i+"<\/span>"+t+"<\/span>"},f.prototype.getWalkDesc=function(n){var i=this.msgService.getMessages().conn.nodePedestrianShift,r="",t;return n.iLinkDist>0&&(i=this.msgService.getMessages().conn.pedestrianShiftLabel,t=this.msgService.getMessages().share.minutes(n.iLinkDist),r=Base.Support.stringIsEmpty(n.sLinkDesc)?t:t+", "+n.sLinkDesc),'<span style="color: #000;">'+i+"<\/span>"+r},f.getStationCoords=function(n){return SMap.Coords.fromWGS84(n.lng,n.lat)},f.prototype.getLinesLayer=function(){return this._linesLayer||(this._linesLayer=new SMap.Layer.Geometry,this.map.addLayer(this._linesLayer).enable()),this._linesLayer},f.prototype.removeLinesLayer=function(){this._linesLayer&&this.map.removeLayer(this._linesLayer)},f.prototype.getMarkersLayer=function(){return this._markersLayer||(this._markersLayer=new SMap.Layer.Marker,this.map.addLayer(this._markersLayer).enable()),this._markersLayer},f.prototype.removeMarkersLayer=function(){this._markersLayer&&this.map.removeLayer(this._markersLayer)},f.prototype.canDrawUserFromPositionPoint=function(){return!this.isDetail&&this.mapSettings&&(this.mapSettings.bIsFromMyPosition||this.mapSettings.bIsFromAddressPoint||this.mapSettings.bIsFromUserLocation)},f.prototype.canDrawUserToPositionPoint=function(){return!this.isDetail&&this.mapSettings&&(this.mapSettings.bIsToMyPosition||this.mapSettings.bIsToAddressPoint||this.mapSettings.bIsToUserLocation)},f.prototype.getMapRoute=function(n){var t=this,i=$.ajax({type:"GET",cache:!1,url:this.ajaxBaseUrl+"GetMapRoute",dataType:"jsonp",data:{handle:this.handle,connID:n,combID:this.combId,format:"json"}});i.done(function(n){n&&t.showMapRoute(n)});i.fail(function(){t.openErrorModal(t.msgService.getMessages().general.loadError)})},f.prototype.openErrorModal=function(n){var t=new Base.Modal(null,this.msgService,null,new Base.SwalModalParams);t.show("#errorModal");$("#errorModalContent").text(n)},f.prototype.showMapRoute=function(n){try{if(n!=null){if(!n)return;typeof n.aoTrains!="undefined"&&n.aoTrains!=null&&n.aoTrains.length>0&&(this._mapData=n,this.drawMapRoute(!0))}}catch(t){}},f}(n.Maps),r,t,i;n.MapyCz=u;r=function(){function n(n,t){this.LeftTopWGS=n;this.RightBottomWGS=t}return n.prototype.GetMaxX=function(){var n=this.RightBottomWGS.split(",");return n[0]},n.prototype.GetMaxY=function(){var n=this.RightBottomWGS.split(",");return n[1]},n.prototype.GetMinX=function(){var n=this.LeftTopWGS.split(",");return n[0]},n.prototype.GetMinY=function(){var n=this.LeftTopWGS.split(",");return n[1]},n}();t=function(n){function t(t,i){var r=n.call(this)||this;return r._isActive=!1,r._layer=t,r._title=i,r._setIcon(),r._build(),r}return __extends(t,n),Object.defineProperty(t.prototype,"layer",{get:function(){return this._layer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),t.prototype.toggleActive=function(){this._isActive=!this._isActive;this._isActive?this._dom.container.classList.add("active"):this._dom.container.classList.remove("active")},t.prototype._setIcon=function(){if(this._layer)switch(this._layer){case SMap.DEF_OPHOTO:this._icon="ophoto";break;case SMap.DEF_PANO:this._icon="panorama"}},t.prototype._build=function(){this._dom.container=document.createElement("button");this._dom.container.innerHTML=this._title;this._dom.container.title=this._title;this._dom.container.classList.add("layer-button");this._ec.push(JAK.Events.addListener(this._dom.container,"click",this,"_click"));Base.Support.stringIsEmpty(this._icon)||(this._dom.container.classList.add("icon"),this._dom.container.classList.add(this._icon))},t.prototype._click=function(){this.getMap().getSignals().makeEvent("layer-button-click",this)},t}(SMap.Control.Visible);n.LayerButton=t;i=function(n){function t(t){var i=n.call(this)||this;return i._isActive=!1,i._activeImgData="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%3E%0A%20%20%3Cpath%20fill%3D%22%23666%22%20d%3D%22M4%2C4H0v2h6V0H4V4z%20M14%2C4V0h-2v6h6V4H14z%20M12%2C18h2v-4h4v-2h-6V18z%20M0%2C14h4v4h2v-6H0V14z%22%2F%3E%0A%3C%2Fsvg%3E%0A",i._inactiveImgData="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2218%22%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%3E%0A%20%20%3Cpath%20fill%3D%22%23666%22%20d%3D%22M0%2C0v2v4h2V2h4V0H2H0z%20M16%2C0h-4v2h4v4h2V2V0H16z%20M16%2C16h-4v2h4h2v-2v-4h-2V16z%20M2%2C12H0v4v2h2h4v-2H2V12z%22%2F%3E%0A%3C%2Fsvg%3E%0A",i._title=t,i._build(),i}return __extends(t,n),Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),t.prototype.toggleActive=function(){this._isActive=!this._isActive;this._imageEl.src=this._isActive?this._activeImgData:this._inactiveImgData},t.prototype._build=function(){this._dom.container=document.createElement("button");this._dom.container.title=this._title;this._dom.container.classList.add("fullscreen-button");this._ec.push(JAK.Events.addListener(this._dom.container,"click",this,"_click"));this._imageEl=document.createElement("img");this._imageEl.src=this._inactiveImgData;this._dom.container.appendChild(this._imageEl)},t.prototype._click=function(){this.getMap().getSignals().makeEvent("fullscreen-button-click",this)},t}(SMap.Control.Visible);n.FullscreenButton=i})(Maps||(Maps={}))