function exitHandler(){var e=document.getElementById("video");e.msRequestFullscreen?isFullscreen=!!document.msFullscreenElement:e.webkitRequestFullscreen?isFullscreen=!!document.webkitFullscreenElement:e.requestFullscreen?isFullscreen=!!document.fullScreenElement:e.mozRequestFullScreen&&(isFullscreen=!!document.mozFullScreenElement),switchIconsForFullscreen()}function chooseMakeFullScreen(){isFullscreen=!1,makeFullScreen()}function switchIconsForFullscreen(){if(isFullscreen){$("#toggleFullscreen").removeClass("glyphicons-fit-image-to-frame"),$("#toggleFullscreen").addClass("glyphicons-fit-frame-to-image"),$("#videoControlMap").addClass("hidden"),$("#videoControlsTopLeft").addClass("hidden"),$("#videoControlMenu").addClass("hidden"),$("body").addClass("hiddenOverflow");try{$("#videoControlElevationModel").removeClass("hide")}catch(e){}}else{$("#toggleFullscreen").addClass("glyphicons-fit-image-to-frame"),$("#toggleFullscreen").removeClass("glyphicons-fit-frame-to-image"),$("#videoControlMap").removeClass("hidden"),$("#videoControlsTopLeft").removeClass("hidden"),$("#videoControlMenu").removeClass("hidden"),$("body").removeClass("hiddenOverflow"),$("#chooseGoToFullscreen").modal("hide");try{$("#videoControlElevationModel").addClass("hide")}catch(l){}}}function makeFullScreen(){var e=!0;isFullscreen=!isFullscreen;var l=document.getElementById("video");l.msRequestFullscreen?document.msFullscreenElement?document.msExitFullscreen():l.msRequestFullscreen():l.webkitRequestFullscreen?document.webkitFullscreenElement?document.webkitCancelFullScreen():l.webkitRequestFullscreen():l.requestFullscreen?document.fullScreenElement?document.cancelFullScreen():l.requestFullscreen():l.mozRequestFullScreen?document.mozFullScreenElement?document.mozCancelFullScreen():l.mozRequestFullScreen():(e=!1,$("#videoWrap").hasClass("fullscreenFix")?($("#videoWrap").removeClass("fullscreenFix"),$("#video").removeClass("fullScreeenFixForVideo"),isFullscreen=!1):($("#videoWrap").addClass("fullscreenFix"),$("#video").addClass("fullScreeenFixForVideo"),isFullscreen=!0),switchIconsForFullscreen()),e&&isFullscreen&&setTimeout(function(){$("#chooseGoToFullscreen").modal("show")},500),l.focus()}var isFullscreen=!1;$(window).load(function(){var e=function(){screen.availHeight>screen.availWidth?$("html").addClass("portrait").removeClass("landscape"):$("html").addClass("landscape").removeClass("portrait")};e(),$(window).on("resize",e);document.getElementById("video");document.addEventListener&&(document.addEventListener("webkitfullscreenchange",exitHandler,!1),document.addEventListener("mozfullscreenchange",exitHandler,!1),document.addEventListener("fullscreenchange",exitHandler,!1),document.addEventListener("MSFullscreenChange",exitHandler,!1));var l=window.matchMedia("(orientation: portrait)"),n=navigator.userAgent.toLowerCase(),s=n.indexOf("windows")>-1&&n.indexOf("chrome")>-1,o="ontouchstart"in window;o&&!s&&l.addListener(function(e){if(e.matches)isFullscreen=!0,makeFullScreen(),$("#chooseGoToFullscreen").modal("hide");else{var l=$("#video");!isFullscreen&&!l.hasClass("rightBottom")&&l.is(":visible")&&$(window).height()/$(window).width()>1&&makeFullScreen()}})}); function changeMapView(a){1===a?map.setView({mapTypeId:Microsoft.Maps.MapTypeId.road,labelOverlay:Microsoft.Maps.LabelOverlay.visible}):2===a?map.setView({mapTypeId:Microsoft.Maps.MapTypeId.aerial,labelOverlay:Microsoft.Maps.LabelOverlay.hidden}):3===a?map.setView({mapTypeId:Microsoft.Maps.MapTypeId.aerial,labelOverlay:Microsoft.Maps.LabelOverlay.visible}):4===a&&map.setView({mapTypeId:Microsoft.Maps.MapTypeId.mercator}),$("#chooseMapMode").modal("hide")}var map;$(function(){}); function openSearch(o){$("#searchBox").fadeIn(),$("#searchResults").fadeIn(),$("#searchInput").focus(),o.stopPropagation()}function closeSearch(o){$("#searchBox").fadeOut(),$("#searchResults").fadeOut(),o.stopPropagation()}function moveVideoToPreviewWindow(o){var e=$("#map");e.hasClass("rightBottom")&&(e.removeClass("rightBottom"),$("#map").hide(),$("#closeMapControl").hide()),$("#poi").hide(),$("#video").addClass("rightBottom"),$("#videoControls").hide(),$("#infoContainer").hide(),o.stopPropagation()}function showMapAndmoveVideoToPreviewWindow(){$("#map").show(),$("#poi").hide(),$("#videoControls").hide(),$("#video").addClass("rightBottom"),$("#map").removeClass("rightBottom"),$("#closeMapControl").hide(),$("#infoContainer").show()}function toggleVideo(){$("#map").addClass("rightBottom"),$("#closeMapControl").show(),$("#video").removeClass("rightBottom"),$("#poi").hide(),$("#poiAudioContent").html(""),$("#videoControls").show(),$("#infoContainer").show(),$("#closeVideoControl").hide()}function closeVideoElement(o){$("#video").removeClass("rightBottom"),$("#videoControls").show(),$("#video").hide(),$("#closeVideoControl").hide(),o.stopPropagation()}function doOnOrientationChange(){}$(function(){$("#map").hide(),$("#poi").hide(),$("#searchBox").hide(),$("#closeVideoControl").hide(),$("#closeMapControl").hide(),$("#searchInput").keydown(function(o){38==o.which?o.preventDefault():40==o.which&&o.preventDefault()});var o="ontouchstart"in window,e=navigator.userAgent.toLowerCase(),i=e.indexOf("windows")>-1&&e.indexOf("chrome")>-1;!o||i?($("body").addClass("notouch"),$("#filter").bind("DOMSubtreeModified",function(){$(".tip-top").tooltip({placement:"top",trigger:"hover",animation:!0,container:"body"})}),$("#sharingSms").hide()):$("#audioVolumeControl").hide(),$("#sliderContainer").hide(),$("#videoSliderContainer").hide(),$("#mySlider").slider({reversed:!0}),$("#videoSlider").slider({reversed:!0})}); $(document).ready(function(){$("#feedbackForm").bootstrapValidator({excluded:":disabled",container:"#messages",feedbackIcons:{valid:"glyphicon glyphicon-ok",invalid:"glyphicon glyphicon-remove",validating:"glyphicon glyphicon-refresh"},fields:{fullName:{validators:{notEmpty:{message:" "}}},email:{validators:{notEmpty:{message:" "},emailAddress:{message:" "}}},title:{validators:{notEmpty:{message:" "},stringLength:{max:100,message:" "}}},content:{validators:{notEmpty:{message:" "},stringLength:{max:500,message:" "}}}}}),$("#postcardForm").bootstrapValidator({container:"#messagesPostcard",feedbackIcons:{valid:"glyphicon glyphicon-ok",invalid:"glyphicon glyphicon-remove",validating:"glyphicon glyphicon-refresh"},fields:{sender:{validators:{notEmpty:{message:"Sender ist erforderlich."}}},email:{validators:{notEmpty:{message:"E-Mail ist erforderlich"},emailAddress:{message:"E-Mail ist nicht gültig"}}},content:{validators:{notEmpty:{message:"Nachricht ist erforderlich"},stringLength:{max:500,message:"Nachricht ist zu lange (Max. 500 Zeichen)"}}}}})}); var makeVideoPlayableInline=function(){"use strict";function e(e){function r(t){n=requestAnimationFrame(r),e(t-(i||t)),i=t}var n,i;this.start=function(){n||r(0)},this.stop=function(){cancelAnimationFrame(n),n=null,i=0}}function r(e,r,n,i){function t(r){Boolean(e[n])===Boolean(i)&&r.stopImmediatePropagation(),delete e[n]}return e.addEventListener(r,t,!1),t}function n(e,r,n,i){function t(){return n[r]}function d(e){n[r]=e}i&&d(e[r]),Object.defineProperty(e,r,{get:t,set:d})}function i(e,r,n){n.addEventListener(r,function(){return e.dispatchEvent(new Event(r))})}function t(e,r){Promise.resolve().then(function(){e.dispatchEvent(new Event(r))})}function d(e){var r=new Audio;return i(e,"play",r),i(e,"playing",r),i(e,"pause",r),r.crossOrigin=e.crossOrigin,r.src=e.src||e.currentSrc||"data:",r}function a(e,r,n){(f||0)+200=e.video.duration}function u(e){var r=this;r.video.readyState>=r.video.HAVE_FUTURE_DATA?(r.hasAudio||(r.driver.currentTime=r.video.currentTime+e*r.video.playbackRate/1e3,r.video.loop&&o(r)&&(r.driver.currentTime=0)),a(r.video,r.driver.currentTime)):r.video.networkState!==r.video.NETWORK_IDLE||r.video.buffered.length||r.video.load(),r.video.ended&&(delete r.video[h],r.video.pause(!0))}function s(){var e=this,r=e[g];return e.webkitDisplayingFullscreen?void e[b]():("data:"!==r.driver.src&&r.driver.src!==e.src&&(a(e,0,!0),r.driver.src=e.src),void(e.paused&&(r.paused=!1,e.buffered.length||e.load(),r.driver.play(),r.updater.start(),r.hasAudio||(t(e,"play"),r.video.readyState>=r.video.HAVE_ENOUGH_DATA&&t(e,"playing")))))}function c(e){var r=this,n=r[g];n.driver.pause(),n.updater.stop(),r.webkitDisplayingFullscreen&&r[E](),n.paused&&!e||(n.paused=!0,n.hasAudio||t(r,"pause"),r.ended&&(r[h]=!0,t(r,"ended")))}function v(r,n){var i=r[g]={};i.paused=!0,i.hasAudio=n,i.video=r,i.updater=new e(u.bind(i)),n?i.driver=d(r):(r.addEventListener("canplay",function(){r.paused||t(r,"playing")}),i.driver={src:r.src||r.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,o(i)&&a(r,0)},get ended(){return o(i)}}),r.addEventListener("emptied",function(){var e=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==r.src&&(a(r,0,!0),i.driver.src=r.src,e?i.driver.play():i.updater.stop())},!1),r.addEventListener("webkitbeginfullscreen",function(){r.paused?n&&!i.driver.buffered.length&&i.driver.load():(r.pause(),r[b]())}),n&&(r.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=r.currentTime}),r.addEventListener("seeking",function(){T.indexOf(100*r.currentTime|0)<0&&(i.driver.currentTime=r.currentTime)}))}function p(e){var i=e[g];e[b]=e.play,e[E]=e.pause,e.play=s,e.pause=c,n(e,"paused",i.driver),n(e,"muted",i.driver,!0),n(e,"playbackRate",i.driver,!0),n(e,"ended",i.driver),n(e,"loop",i.driver,!0),r(e,"seeking"),r(e,"seeked"),r(e,"timeupdate",h,!1),r(e,"ended",h,!1)}function l(e,r,n){void 0===r&&(r=!0),void 0===n&&(n=!0),n&&!y||e[g]||(v(e,r),p(e),e.classList.add("IIV"),!r&&e.autoplay&&e.play(),"MacIntel"!==navigator.platform&&"Windows"!==navigator.platform||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var f,m="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol,y=/iPhone|iPod/i.test(navigator.userAgent)&&void 0===document.head.style.grid,g=m(),h=m(),b=m("nativeplay"),E=m("nativepause"),T=[],w=0;return l.isWhitelisted=y,l}(); function AltitudeChart(t){var e=this;this.constantService=t,this.currentTour=null,this.chart=null,this.maxPoints=100,this.altitudePoints=0,this.altitudePointsUsed=0,this.pointsPerSecond=0,this.mod=5;var i=this;this.createChart=function(){i.chart=$("#AltitudeModel").kendoChart({theme:"Material",chartArea:{background:"transparent"},title:{visible:!1},legend:{visible:!1},series:[{type:"line",style:"smooth",color:"#bdbebe",markers:{visible:!1},field:"alt",highlight:{visible:!0,visual:function(t){var e=t.rect.center(),i=new kendo.geometry.Circle(e,5),r=new kendo.drawing.Circle(i,{fill:{color:"#7FB741"},stroke:{color:"#7FB741"}});return r}}}],categoryAxis:[{title:{text:"distance",visible:!1},majorGridLines:{visible:!1},majorTicks:{visible:!1},field:"index"}],valueAxis:[{labels:{format:"{0} m"},title:{text:"m",visible:!1},color:"#bdbebe",majorGridLines:{visible:!1}}],tooltip:{visible:!0,template:"#= value # m",background:"#7FB741",color:"#FFFFFF",border:{color:"#7FB741",width:1},font:"12px AvenirMediumCn"},seriesClick:function(t){i.clickOnElevationPoint(t)}}).data("kendoChart")},this.setTour=function(t){i.currentTour=t,i.createAltitudePoints()},this.createAltitudePoints=function(){var t=[],r=i.currentTour.TourPoints.length;e.mod=Math.ceil(r/100);var o=0,n=0;i.droppedPoints=0;for(var s in i.currentTour.TourPoints){if(null!==i.currentTour.TourPoints[s]&&o%i.mod===0){var a={alt:i.currentTour.TourPoints[s].Alt,pointIndex:parseInt(s),index:n};t.push(a),n++}o++}var c=i.chart.findSeriesByIndex(0);c.data(t),i.altitudePoints=o,i.altitudePointsUsed=c.data().length,i.pointsPerSecond=i.altitudePointsUsed/i.currentTour.Video.VideoLength*10},this.updateTime=function(t){if(i.constantService.altitudeChartVisible&&i.chart&&i.chart.findSeriesByIndex(0)&&!(i.chart.findSeriesByIndex(0).data().length<=0)&&i.currentTour){var e=Math.round(t*i.pointsPerSecond);0>e||i.showCurrentTimeTooltip(e)}},this.showCurrentTimeTooltip=function(t){i.chart.hideTooltip(),i.chart.showTooltip(function(e){var i=e.dataItem.index===t;return i})},this.clickOnElevationPoint=function(t){var e=t.dataItem.index,r=e/i.pointsPerSecond;i.constantService.ignoreTourFilter=!0,i.constantService.selectedTour=i.constantService.selectedTourForVideo.tour;var o=new Video.VideoOptions(i.constantService.selectedTourForVideo.tour,r);i.constantService.selectedTourForVideo=o,i.constantService.shareParams.tourId=i.constantService.selectedTourForVideo.tour.Id},this.resizeChart=function(){$("#AltitudeModel").css("width",$("#AltitudeProfileHeader").css("width")),i.chart.resize(),i.chart.redraw()},this.createChart()} //# sourceMappingURL=maps/custom-97117b0313.js.map