mechanic-map 0.16.4 → 0.16.6
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/README.md +1 -1
- package/dist/map-dist.js +1 -1
- package/dist/map-dist.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/map-dist.js
CHANGED
|
@@ -158,7 +158,7 @@ C.e._gsDefine("easing.Back",["easing.Ease"],(function(){var A,g,I,t,e=C.e.GreenS
|
|
|
158
158
|
\********************/
|
|
159
159
|
/*! exports provided: default */
|
|
160
160
|
/*! all exports used */
|
|
161
|
-
/*! ModuleConcatenation bailout: Module uses injected variables (process) */function(A,g,I){"use strict";I.r(g),function(A){var C=I(/*! @babel/runtime/helpers/classCallCheck */2),t=I.n(C),e=I(/*! @babel/runtime/helpers/createClass */3),n=I.n(e),i=I(/*! @babel/runtime/helpers/typeof */5),r=I.n(i),a=I(/*! gsap */4),o=I(/*! lodash */1),s=(I(/*! ../assets/map/map.css */11),I(/*! hammerjs */60)),l=I(/*! imports-loader?define=>false!jquery-mousewheel */61),c=I(/*! ./sp/v1 */62),u=I(/*! ./sp/v2 */65),v=1e3;g.default=function(g){l(g);var I=function(I){var C=this,e=this;e.statics={restartNavigationData:null,multipleNavigation:{navigationDetails:null,groupIndex:0}},e.o={locale:{language:"en",availableLanguages:["en","tr","ru","ar","kz","it"]},mode:"default",locationCannotBeSelected:null,helperTexts:{youAreHere:"You are here"},strokeOptions:{width:8,color:"#000"},animation:{speedFactor:8,frequencyFactor:8,mode:"line",debugContainer:"#navigation-debugger",availableModes:["line","dot","arrow","foot","feet"],pointModes:["dot","arrow"],stackAnimation:!1},selector:"[id^=stores] > *",serviceSelector:"[id^=services] > *",rotateServices:!1,rotatable90PathSelector:"[id^=deg-90] > *",rotatable180PathSelector:"[id^=deg-180] > *",rotatable270TextSelector:"[id^=texts-vertical] > *",rotatable180TextSelector:"[id^=texts-horizontal] > *",rectSelector:"[id^=rects] > *",noPointerGroupSelector:"g[id^=nopointer]",stackMode:{enabled:!1,offset:10,switchFloorTime:5*v},draggable:!0,landmark:!1,mapFill:!1,height:420,zoomToSelected:!0,rotatable:!1,action:"tooltip",hoverTip:!0,tooltip:{enabled:!0,navigation:!1,detail:!1,enterBuilding:!1,renderTemplate:!1},smartip:!0,fillColor:"",developer:!1,mouseWheel:!0,maxScale:4,animationScale:1.5,cssAnimation:!0,cssAnimationTime:v,zoom:!0,textOnRect:{enabled:!0,fontFamily:"sans-serif",fontSize:24,maxFontSize:48,minFontSize:16,mode:"dynamic",availableModes:["static","dynamic"]},beaconMode:!1,initialScaleFactor:1},e.$el=I,e.contentWidth={},e.contentHeight={},e.fitscale={},e.offsetDueToRotation=0,e.offsetCoefficient={},e.callbackMapReady=null,e.addLevel=function(A){e.levels=e.levels||[],e.levels.push(A)},e.debug=function(){var A;(A=e.logger).debug.apply(A,arguments)},e.log=function(){var A;(A=e.logger).log.apply(A,arguments)},e.error=function(){var A;(A=e.logger).error.apply(A,arguments)},e.init=function(A){var g=A.data;A.data=null,e.isMultiBuilding=function(){return!!g.buildings&&g.buildings.length},e.getNodes=function(){return g.nodes},e.getPaths=function(){return g.paths},e.getLevels=function(){return g.levels},e.logger=new i(e.o.developer||A.developer),e.debug("init:",o.get(A,"tooltip"));var I=o.get(A,"tooltip");o.isBoolean(I)?(A.tooltip=e.o.tooltip,A.tooltip.enabled=I):o.isBoolean(o.get(A,"tooltip.enabled"))||(A.tooltip=A.tooltip||e.o.tooltip,A.tooltip.enabled=!0);var C=o.get(A,"textOnRect");o.isBoolean(C)?(A.textOnRect=e.o.textOnRect,A.textOnRect.enabled=C):(o.isBoolean(o.get(A,"textOnRect.enabled"))||(A.textOnRect=A.textOnRect||e.o.textOnRect,A.textOnRect.enabled=!0),A.textOnRect.mode?o.includes(e.o.textOnRect.availableModes,A.textOnRect.mode)||(e.debug("init: textOnRect mode selected NOT AVAILABLE, switching to default.."),A.textOnRect.mode=e.o.textOnRect.mode):A.textOnRect.mode=e.o.textOnRect.mode,"dynamic"===A.textOnRect.mode?A.textOnRect.fontSize||(A.textOnRect.fontSize=e.o.textOnRect.fontSize):"static"===A.textOnRect.mode&&(A.textOnRect.maxFontSize||(A.textOnRect.maxFontSize=e.o.textOnRect.maxFontSize),A.textOnRect.minFontSize||(A.textOnRect.minFontSize=e.o.textOnRect.minFontSize))),A.animation&&(A.animation.debugContainer||(A.animation.debugContainer=e.o.animation.debugContainer),A.animation.speedFactor||(A.animation.speedFactor=e.o.animation.speedFactor),A.animation.frequencyFactor||(A.animation.frequencyFactor=e.o.animation.frequencyFactor),A.animation.mode?o.includes(e.o.animation.availableModes,A.animation.mode)||(e.debug("init: Animation mode selected NOT AVAILABLE, switching to default.."),A.animation.mode=e.o.animation.mode):A.animation.mode=e.o.animation.mode,A.animation.pointModes=e.o.animation.pointModes,A.animation.availableModes=e.o.animation.availableModes);var t=o.get(A,"stackMode");if(o.isBoolean(t)?(A.stackMode=e.o.stackMode,A.stackMode.enabled=t):o.isBoolean(o.get(A,"stackMode.enabled"))||(A.stackMode=A.stackMode||e.o.stackMode,A.stackMode.enabled=!0),A.locale&&(A.locale.availableLanguages||(A.locale.availableLanguages=e.o.locale.availableLanguages),A.locale.language?o.includes(A.locale.availableLanguages,A.locale.language)||(e.debug("init: Language selected NOT AVAILABLE, switching to default.."),A.locale.language=e.o.locale.language):A.locale.language=e.o.locale.language),o.assignInWith(e.o,A,(function A(g,I){return void 0!==g&&void 0!==I&&"object"===r()(g)&&"object"===r()(I)?(o.assignWith(g,I,A),g):o.isUndefined(I)?g:I})),e.debug("init: map options",e.o),!e.o.animation.stackAnimation||e.o.stackMode.enabled)return e.x=0,e.y=0,e.scale={},g.levels.forEach((function(A){e.scale[A.id]=1})),e.rotation=0,e.debug("init: SETTING CONTAINER HEIGHT AS ".concat(e.o.height)),e.$el.addClass("svg-map-element svg-map-loading").height(e.o.height),e.o.landmark=!!g.landmark,e.o.landmark&&(e.o.hoverTip=!1,e.o.action="tooltip"),e.o.id?(o.isNumber(e.o.rotate)?(e.o.rotate=e.o.rotate%360,e.o.rotate%90&&(e.o.rotate=0)):e.o.rotate=0,setTimeout((function(){if(e.debug("init: LOADING SVG MAP.."),g.levels&&g.levels.length)e.debug("init: levels already ready");else{if(e.debug("init: levels submitted beforehand"),!e.levels||!e.levels.length)return void e.error("init: levels should be submitted beforehand!");g.levels=e.levels}P(g)}),.1*v),e):(e.$el.removeClass("svg-map-loading").addClass("svg-map-error"),void e.error("Map is not set! [svg-map] parameters must contain an id attribute."));e.error("if you want to use stackAnimation. You need to enable stackMode !")};var i=function(){function A(){var g=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t()(this,A),this.debugMode=g}return n()(A,[{key:"log",value:function(){var A;(A=console).log.apply(A,arguments)}},{key:"debug",value:function(){var A;this.debugMode&&(A=console).log.apply(A,arguments)}},{key:"error",value:function(){var A;(A=console).error.apply(A,arguments)}}]),A}(),l=function(){function A(){t()(this,A),this.tooltips=[],this.tooltips.push(new p)}return n()(A,[{key:"init",value:function(){o.each(this.tooltips,(function(A){A.init()}))}},{key:"show",value:function(A,g){var I,C=this;if((I=Array.isArray(A)?A:[A]).length){var t=this.tooltips.splice(0,this.tooltips.length-1);e.debug("TooltipContainer: TOOLTIP LENGTH TO REMOVE=",t.length,"TOOLTIP LENGTH NOW=",this.tooltips.length),o.each(t,(function(A){A.remove()}));var n=1===I.length,i=0;o.each(I,(function(A){if(!i)return e.debug("TooltipContainer: FIRST TOOLTIP"),C.tooltips[i].show(A,g,n),void i++;e.debug("TooltipContainer: OTHER TOOLTIP, ",i);var I=new p;I.init(),C.tooltips.push(I),I.show(A,g,n),i++}))}}},{key:"hide",value:function(){e.debug("TooltipContainer: tooltip hided"),o.each(this.tooltips,(function(A){A.hide()}))}},{key:"position",value:function(){o.each(this.tooltips,(function(A){A.position()}))}},{key:"updateLocalized",value:function(A){o.each(this.tooltips,(function(g){g.updateLocalized(A)}))}},{key:"getOneLocation",value:function(){return o.get(this.tooltips[0],"location")}}]),A}(),p=function(){function A(){t()(this,A),this.$el=null,this.shift=6,this.drop=0,this.location=null}return n()(A,[{key:"init",value:function(){var A=this;if(e.debug("Tooltip: INIT"),e.o.tooltip.renderTemplate)this.$el=g(g.parseHTML(e.o.tooltip.renderTemplate)),this.$title=this.$el.find("#svg-map-tooltip-title"),this.$content=this.$el.find("#svg-map-tooltip-content"),e.o.tooltip.navigation&&(this.$navigation=this.$el.find("#svg-map-tooltip-navigation-button")),e.o.tooltip.detail&&(this.$detail=this.$el.find("#svg-map-tooltip-detail-button")),this.$logo=this.$el.find("#svg-map-tooltip-logo"),this.$facade=this.$el.find("#svg-map-tooltip-facade"),this.$floor=this.$el.find("#svg-map-tooltip-category"),this.$close=this.$el.find("#svg-map-tooltip-close");else{this.$el=g("<div/>").addClass("svg-map-tooltip");var I=!e.o.landmark;I&&(this.$close=g("<a/>").addClass("svg-map-tooltip-close").attr("href","#").appendTo(this.$el)),this.$content=g("<div/>").addClass("svg-map-tooltip-content").addClass(I?"":"svg-map-tooltip-landmarkmode").appendTo(this.$el),this.$title=g("<h4/>").addClass("svg-map-tooltip-title").appendTo(this.$content),!e.o.landmark&&e.o.tooltip.enabled&&(e.o.tooltip.navigation&&(this.$navigation=g("<a/>").addClass("svg-map-tooltip-navigation-button").attr("href","#"),e.o.tooltip.navigation.image?this.$navigation.append(g("<img/>",{src:e.o.tooltip.navigation.image})).append(g("<span/>",{text:e.o.tooltip.navigation.text})):this.$navigation.text(e.o.tooltip.navigation.text),this.$navigation.appendTo(this.$content)),e.o.tooltip.detail&&(this.$detail=g("<a/>",{text:e.o.tooltip.detail.text||"DETAIL"}).addClass("svg-map-tooltip-detail-button").attr("href","#").attr("type","button").appendTo(this.$content)),e.isMultiBuilding()&&e.o.tooltip.enterBuilding&&(this.$enterBuilding=g("<a/>",{text:e.o.tooltip.enterBuilding.text||"ENTER"}).addClass("svg-map-tooltip-enter-building-button").attr("href","#").attr("type","button").appendTo(this.$content)))}this.$navigation&&this.$navigation.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("navigationClicked",[A.$navigation,A.location.id])})),this.$detail&&this.$detail.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("detailClicked",[A.$detail,A.location.id])})),this.$enterBuilding&&this.$enterBuilding.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("enterBuildingClicked",[A.$enterBuilding,A.location.buildingId,A.location.id])})),this.$close&&this.$close.on("click touchend",(function(A){A.preventDefault(),e.hideLocation(),e.o.zoom||$(.5,.5,1,1.2*v,"easeInOutCubic"),e.$el.trigger("closeClicked",[this.$close])})),this.$triangle=g("<div/>").addClass("svg-map-tooltip-triangle").prependTo(this.$el),e.$map.append(this.$el)}},{key:"show",value:function(A,g){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];A&&"kiosk"!==A.type&&(this.location=A,e.hoverTip&&e.hoverTip.hide(),this.$title.text(fA(A)),this.$detail&&this.$detail.text(e.o.tooltip.detail.text||"DETAIL"),this.$enterBuilding&&(this.$enterBuilding.text(e.o.tooltip.enterBuilding.text||"ENTER"),"building"===A.type?this.$enterBuilding.show():this.$enterBuilding.hide()),this.$logo&&(A.logo?(this.$logo.show(),this.$logo.attr("src",A.logo)):this.$logo.hide()),this.$facade&&(A.facade?(this.$facade.show(),this.$facade.attr("src",A.facade)):this.$facade.hide()),this.$floor&&this.$floor.text(o.get(A.floor,e.o.locale.language,"")),this.$content[0].scrollTop=0,this.shift=20,this.position(),this.$el.stop().show(),this.$el.css({opacity:1}),I&&this.zoom(A,g))}},{key:"position",value:function(){if(this.location){e.debug("POSITION TOOLTIP FOR LOCATION ID:"+this.location.id);var A=e.$map.offset().left+e.$map.width()*dA(this.location)-e.$container.offset().left,g=e.$map.offset().top+e.$map.height()*hA(this.location)-e.$container.offset().top,I=100*dA(this.location),C=100*hA(this.location),t=-this.$el.outerHeight()-(e.o.landmark?.75*this.shift:this.shift),n=-this.$el.outerWidth()/2;if(e.o.smartip){var i=.5;Math.abs(t)>g?(t=10,this.$el.addClass("svg-map-bottom")):this.$el.removeClass("svg-map-bottom"),this.$el.outerWidth()/2>A?i=.5-(this.$el.outerWidth()/2-A)/this.$el.outerWidth():e.$container.width()-A-this.$el.outerWidth()/2<0&&(i=.5+(A+this.$el.outerWidth()/2-e.$container.width())/this.$el.outerWidth()),i=Math.max(0,Math.min(1,i)),n=-this.$el.outerWidth()*i,this.$triangle.css("left",Math.max(5,Math.min(95,100*i))+"%")}this.$el.css({left:I+"%",top:C+"%",marginTop:t,marginLeft:n}),this.drop=this.$el.outerHeight()+this.shift}}},{key:"zoom",value:function(A,g){if(!e.o.zoomToSelected)return e.debug("Tooltip: NO ZOOM REQUIRED"),void $(.5,.5,1,1.2*v,"easeInOutCubic");var I=A.zoom?parseFloat(A.zoom):e.o.maxScale,C=((e.$container.height()-this.drop)/2+this.drop)/e.$container.height();$(dA(A),hA(A),I,g||1.2*v,"easeInOutCubic",C)}},{key:"hide",value:function(){var A=this;this.location=null,this.$el.stop().fadeOut(.3*v,(function(){e.o.tooltip.enabled&&e.o.tooltip.navigation&&A.$navigation&&(e.o.tooltip.navigation.image?A.$navigation.find("span").text(e.o.tooltip.navigation.text):A.$navigation.text(e.o.tooltip.navigation.text))}))}},{key:"updateLocalized",value:function(A){A.navigationText&&this.$navigation&&(e.o.tooltip.navigation.text=A.navigationText,e.o.tooltip.navigation.image?this.$navigation.find("span").text(A.navigationText):this.$navigation.text(A.navigationText)),A.closeText&&this.$close&&this.$close.text(A.closeText),A.detailText&&this.$detail&&(e.o.tooltip.detail.text=A.detailText,this.$detail.text(A.detailText)),A.enterBuildingText&&(e.o.tooltip.enterBuilding.text=A.enterBuildingText,this.$enterBuilding&&this.$enterBuilding.text(A.enterBuildingText)),A.floorText&&this.$floor.text(A.floorText)}},{key:"remove",value:function(){this.location=null,this.$el.stop().remove(),this.$el=null}}]),A}(),f=function(){function A(){t()(this,A),this.$el=null,this.shift=6}return n()(A,[{key:"init",value:function(){var A=this;this.$el=g("<div/>").addClass("svg-map-tooltip svg-map-hovertip"),this.$title=g("<h4/>").addClass("svg-map-tooltip-title").appendTo(this.$el),this.$triangle=g("<div/>").addClass("svg-map-tooltip-triangle").appendTo(this.$el),e.o.selector&&g(e.$map).on("mouseover",e.o.selector,(function(){if(!e.navigation.animationStarted()){var I=rA(g(this).attr("id"));A.shift=20,I&&A.show(I)}})).on("mouseout",(function(){A.hide()})),e.o.serviceSelector&&g(e.$map).on("mouseover",e.o.serviceSelector,(function(){if(!e.navigation.animationStarted()){var I=aA(g(this).attr("id"));A.shift=20,I&&A.show(I)}})).on("mouseout",(function(){A.hide()})),e.$map.append(this.$el)}},{key:"show",value:function(A){A&&"kiosk"!==A.type&&(this.$el.removeClass("svg-map-service-hovertip"),A&&"service"===A.type&&this.$el.addClass("svg-map-service-hovertip"),e.tooltip&&e.tooltip.getOneLocation()!==A&&(this.$title.text(fA(A)),this.position(A),this.$el.stop().fadeIn(.1*v)))}},{key:"position",value:function(A){var g,I=e.$map.offset().left+e.$map.width()*dA(A)-e.$container.offset().left,C=e.$map.offset().top+e.$map.height()*hA(A)-e.$container.offset().top,t=100*dA(A),n=100*hA(A),i=-this.$el.outerHeight()-this.shift,r=.5;Math.abs(i)>C?(i=10,this.$el.addClass("svg-map-bottom")):this.$el.removeClass("svg-map-bottom"),this.$el.outerWidth()/2>I?r=.5-(this.$el.outerWidth()/2-I)/this.$el.outerWidth():e.$container.width()-I-this.$el.outerWidth()/2<0&&(r=.5+(I+this.$el.outerWidth()/2-e.$container.width())/this.$el.outerWidth()),g=-this.$el.outerWidth()*r,this.$triangle.css("left",Math.max(10,Math.min(90,100*r))+"%"),this.$el.css({left:t+"%",top:n+"%",marginTop:i,marginLeft:g})}},{key:"hide",value:function(){this.$el.stop().fadeOut(.2*v)}}]),A}(),d=function(){function A(){t()(this,A),this.$el=null,this.$animationDebugContainer=null}return n()(A,[{key:"init",value:function(){this.$el=g("<div/>").addClass("svg-map-coordinates").appendTo(e.$container),this.$el.append("x: "),g("<code/>").addClass("svg-map-coordinates-x").appendTo(this.$el),this.$el.append(" y: "),g("<code/>").addClass("svg-map-coordinates-y").appendTo(this.$el),g(".svg-map-layer",e.$map).on("mousemove",(function(A){var I=(A.pageX-e.$map.offset().left)/e.$map.width(),C=(A.pageY-e.$map.offset().top)/e.$map.height();g(".svg-map-coordinates-x").text(parseFloat(I).toFixed(4)),g(".svg-map-coordinates-y").text(parseFloat(C).toFixed(4))})),this.$animationDebugContainer=g("<div/>",{class:"debug-container"}),this.$animationDebugContainer.appendTo(g(e.o.animation.debugContainer));var A=g("<div/>");A.append(g("<button/>",{id:"play",text:"play"})),A.append(g("<button/>",{id:"pause",text:"pause"})),A.append(g("<button/>",{id:"reverse",text:"reverse"})),A.append(g("<button/>",{id:"resume",text:"resume"})),A.append(g("<button/>",{id:"restart",text:"restart"})),A.append(g("<button/>",{id:"close-nav",text:"close navigation"})),A.append(g("<button/>",{id:"restart-nav",text:"restart navigation"})),A.append(g("<button/>",{id:"stack-mode",text:"show stack mode"})),A.append(g("<button/>",{id:"prev-nav-step",text:"prev nav step"})),A.append(g("<button/>",{id:"next-nav-step",text:"next nav step"})),e.isMultiBuilding()&&(A.append(g("<button/>",{id:"prev-building",text:"prev building"})),A.append(g("<button/>",{id:"next-building",text:"next building"}))),this.$animationDebugContainer.append(A);var I=g("<div/>",{id:"sliderWrapper"}).append(g("<div/>",{id:"slider"}));this.$animationDebugContainer.append(I);var C=g("<div/>",{id:"navigatingTextWrapper"}).append(g("<p/>",{id:"navigatingText"}));this.$animationDebugContainer.append(C),g("#play").click((function(){e.navigation.tween&&(1!==e.navigation.tween.progress()?e.navigation.tween.play():e.navigation.tween.restart())})),g("#pause").click((function(){e.navigation.tween&&e.navigation.tween.pause()})),g("#reverse").click((function(){e.navigation.tween&&e.navigation.tween.reverse()})),g("#resume").click((function(){e.navigation.tween&&e.navigation.tween.resume()})),g("#restart").click((function(){e.navigation.tween&&e.navigation.tween.restart()})),g("#close-nav").click((function(){e.closeNavigation()})),g("#restart-nav").click((function(){e.restartNavigation()})),g("#next-nav-step").click((function(){e.nextNavigate(!0,!0,!0)})),g("#prev-nav-step").click((function(){e.prevNavigate(!0,!0,!0)})),g("#next-building").click((function(){e.nextBuildingNavigate(!0,!0,!0)})),g("#prev-building").click((function(){e.prevBuildingNavigate(!0,!0,!0)})),g("#stack-mode").click((function(){e.stackMode()}))}}],[{key:"startSlider",value:function(){var A=g("#slider");g.isFunction(A.slider)?A.slider({range:!1,min:0,max:100,step:.1,slide:function(A,g){e.navigation.tween&&(e.navigation.tween.pause(),e.navigation.tween.progress(g.value/100))}}):console.warn("DevTools: slider function not found.")}},{key:"updateSlider",value:function(){if(e.navigation.tween){var A=g("#slider");g.isFunction(A.slider)&&A.slider("value",100*e.navigation.tween.progress())}}}]),A}(),h=function(){function A(){t()(this,A),this.$userPin=null,this.$el=null,this.shift=6,this.drop=0,this.location=null,this.currentUserLocation=null}return n()(A,[{key:"show",value:function(){if(this.removeUserLocationPin(),this.isUserLocationAvailable()){var A=lA(e.currentLevel);if(A&&A.no===this.currentUserLocation.floorNo){if(!this.isUserLocationPointAvailable()){e.debug("UserPinTooltip: PATCHING..");var g=this.currentUserLocation.location;CA(g)}var I=uA(A.id);I&&this.addUserLocationPin(I)}}}},{key:"addUserLocationPin",value:function(A){A.find(".svg-map-you-are-here-hovertip").remove(),A.find(".svg-map-pin.pin-pulse").remove();var I=100*this.currentUserLocation.point.x,C=100*this.currentUserLocation.point.y,t=g("<a/>",{href:"#",class:"svg-map-pin iconpin man pin-pulse"}).css({top:C+"%",left:I+"%"}).appendTo(A);t.on("click touchend",(function(A){A.preventDefault()})),this.$userPin=t,e.debug("UserPinTooltip: ",this.$userPin),this.$el=g("<div/>").addClass("svg-map-tooltip svg-map-hovertip svg-map-you-are-here-hovertip"),this.$userPinTitle=g("<h4/>").addClass("svg-map-tooltip-title").appendTo(this.$el),this.$userPinTriangle=g("<div/>").addClass("svg-map-tooltip-triangle").appendTo(this.$el),this.$userPinTitle.text(e.o.helperTexts.youAreHere),A.append(this.$el),this.shift=50,this.position(),this.$el.stop().fadeIn(.1*v)}},{key:"updateLocalized",value:function(A){e.o.helperTexts.youAreHere=A,this.$userPinTitle&&this.$userPinTitle.text(A)}},{key:"position",value:function(){if(this.$el){var A=e.$map.offset().left+e.$map.width()*this.currentUserLocation.point.x-e.$container.offset().left,g=e.$map.offset().top+e.$map.height()*this.currentUserLocation.point.y-e.$container.offset().top,I=100*this.currentUserLocation.point.x,C=100*this.currentUserLocation.point.y,t=-this.$el.outerHeight()-this.shift,n=0;if(e.o.smartip){var i=.5;Math.abs(t)>g?(t=10,this.$el.addClass("svg-map-bottom")):this.$el.removeClass("svg-map-bottom"),this.$el.outerWidth()/2>A?i=.5-(this.$el.outerWidth()/2-A)/this.$el.outerWidth():e.$container.width()-A-this.$el.outerWidth()/2<0&&(i=.5+(A+this.$el.outerWidth()/2-e.$container.width())/this.$el.outerWidth()),i=Math.max(0,Math.min(1,i)),n=-this.$el.outerWidth()*i,this.$userPinTriangle.css("left",Math.max(5,Math.min(95,100*i))+"%")}this.$el.css({left:I+"%",top:C+"%",marginTop:t,marginLeft:n}),this.drop=this.$el.outerHeight()+this.shift}}},{key:"addUserLocationPoint",value:function(A,g,I){this.currentUserLocation=this.currentUserLocation||new b,this.currentUserLocation.addPoint(A/x(),g/w(),I)}},{key:"addUserLocation",value:function(A,g){this.currentUserLocation=new b(A,g)}},{key:"resetUserLocation",value:function(){this.removeUserLocationPin(),this.currentUserLocation=null}},{key:"isUserLocationAvailable",value:function(){return this.currentUserLocation&&this.currentUserLocation.available()}},{key:"isUserLocationPointAvailable",value:function(){return this.currentUserLocation&&this.currentUserLocation.pointAvailable()}},{key:"getUserLocationFloorNumber",value:function(){return this.currentUserLocation&&this.currentUserLocation.floorNo}},{key:"removeUserLocationPin",value:function(){e.debug(this.$userPin),this.$userPin&&this.$userPin.stop().remove(),this.$el&&this.$el.stop().remove()}}]),A}(),m=function(){function A(){t()(this,A),this.currentLocation=null,this.timelineMax=new a.b}return n()(A,[{key:"init",value:function(A,g,I){var C=bA(A,g);this.addUserLocationPoint(C.x,C.y,I)}},{key:"show",value:function(){if(this.remove(),lA(e.currentLevel).no===this.getUserLocationFloorNumber()&&this.isUserLocationAvailable()){var A=uA(e.currentLevel),I=g("<a/>",{href:"#",class:"svg-map-pin circular pin-pulse"});I.on("click touchend",(function(A){A.preventDefault()})).appendTo(A),this.$el=I;var C=100*this.currentLocation.getX(),t=100*this.currentLocation.getY();this.$el.css({top:t+"%",left:C+"%"})}}},{key:"zoom",value:function(){this.getUserLocationFloorNumber()===e.currentLevelNumber&&this.currentLocation&&$(this.currentLocation.getX(),this.currentLocation.getY(),2,.6*v,"easeInOutCubic")}},{key:"remove",value:function(){this.$el&&(this.$el.stop().remove(),this.$el=null),this.timelineMax&&this.timelineMax.progress(0).clear()}},{key:"addUserLocationPoint",value:function(A,g,I){this.currentLocation=this.currentLocation||new b,this.currentLocation.addPoint(A/x(),g/w(),I)}},{key:"changeUserLocationPoint",value:function(A,g){var I;if(A&&(I=Array.isArray(A)?A:[A]).length)if(this.getUserLocationFloorNumber()===g){if(!this.$el){var C=I.shift();e.setCurrentMobileUserLocation(C.x,C.y,this.getUserLocationFloorNumber())}var t=null;this.currentLocation&&(t={x:this.currentLocation.getX()*x(),y:this.currentLocation.getY()*w()});var n=y.convertLinesToPath(I);if(n){var i=I[I.length-1];this.init(i.x,i.y,this.getUserLocationFloorNumber());var r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",n);var a=r.getTotalLength()+150;e.debug("User: PATH LENGTH: "+a);var s=a*e.o.animation.speedFactor/4/v,l=o.map(I,(function(A){var g=bA(A.x,A.y);return{left:g.x/x()*100+"%",top:g.y/w()*100+"%"}}));t&&l.unshift({left:t.x/x()*100+"%",top:t.y/w()*100+"%"}),this.timelineMax.progress(0).clear().set(this.$el,{css:{left:l[0].left,top:l[0].top},transformOrigin:"top left"}),this.timelineMax.to(this.$el,2*s,{bezier:{type:"thru",curviness:0,values:l,autoRotate:90},ease:"easeInOutPower2"})}}else{var c=I.pop();e.setCurrentMobileUserLocation(c.x,c.y,g)}}},{key:"resetUserLocation",value:function(){this.remove(),this.currentLocation=null}},{key:"isUserLocationAvailable",value:function(){return this.currentLocation&&this.currentLocation.pointAvailable()}},{key:"getUserLocationFloorNumber",value:function(){return this.currentLocation&&this.currentLocation.floorNo}}]),A}(),b=function(){function A(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t()(this,A),this.point=null,this.location=g,this.floorNo=I}return n()(A,[{key:"addPoint",value:function(A,g,I){this.point={x:A,y:g},this.floorNo=I}},{key:"available",value:function(){return this.point||this.location}},{key:"pointAvailable",value:function(){return this.point&&o.isNumber(this.point.x)&&o.isNumber(this.point.y)}},{key:"getX",value:function(){return this.point&&this.point.x}},{key:"getY",value:function(){return this.point&&this.point.y}}]),A}(),y=function(){function A(){t()(this,A),this.routeData=[],this.activeFloors=[],this.activeFloorIndex=null,this.$startPin=null,this.$endPin=null,this.autoMode=!1,this.zoomEnabled=!0,this.showPins=!0,this.started=!1,this.canceled=!1,this.$path=null,this.tween=null,this.animationListener=null,this.onCompleteAnimation=null,this.elementSelector=".walking"}return n()(A,[{key:"init",value:function(g){if(this.routeData=[],this.activeFloors=g.direction,this.activeFloorIndex=-1,this.canceled=!1,!this.activeFloors||0===this.activeFloors.length)throw new Error("No direction found in SP");for(var I=g.floors.length,C=0;C<I;C++){var t=g.floors[C],n={no:t.no,points:[]},i=!0,r=!1,a=void 0;try{for(var o,s=t.lines[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value;n.points.push({x:l.x1,y:l.y1})}}catch(A){r=!0,a=A}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}var c=t.lines[t.lines.length-1];if(n.points.push({x:c.x2,y:c.y2}),n.level_changer=c.level_changer,n.path=A.convertLinesToPath(n.points),!n.path)throw new Error("Path cannot be calculated of floor:"+t.no);this.routeData.push(n)}"dot"===e.o.animation.mode?this.elementSelector=".circle.walking":"arrow"===e.o.animation.mode?this.elementSelector=".arrow.walking":"foot"===e.o.animation.mode?this.elementSelector="img.foot":"feet"===e.o.animation.mode&&(this.elementSelector="img.foot")}},{key:"setAutoMode",value:function(A){this.autoMode=!!A}},{key:"addEscalatorAnimation",value:function(){var A=this;1!==this.activeFloors.length&&this.routeData.forEach((function(g){if(A.activeFloors[A.activeFloors.length-1]!==g.no){var I=cA(g.no),C=uA(I.id);0===e.navigation.navigationWay()?C.addClass("escalator-up"):C.addClass("escalator-down")}}))}},{key:"removeEscalatorAnimation",value:function(){var A=this;this.routeData&&this.routeData.forEach((function(g){if(A.activeFloors[A.activeFloors.length-1]!==g.no){var I=cA(g.no);uA(I.id).removeClass("escalator-up").removeClass("escalator-down")}}))}},{key:"setParams",value:function(A,g,I){this.autoMode=A,this.zoomEnabled=g,this.showPins=I}},{key:"show",value:function(A,g,I){this.setParams(A,g,I),this.advanceToNextFloor()}},{key:"navigationEvent",value:function(){var A=this.activeFloorIndex,I=this.routeData[A],C={prevLevelId:e.prevLevelId(),currentLevelId:e.currentLevel,nextLevelId:e.nextLevelId(),isStartFloor:this.isOnFirstNavigationFloor(),isEndFloor:this.isOnLastNavigationFloor(),levelChanger:I.level_changer};if(C.hasPrevNavigate=!!C.prevLevelId,C.hasNextNavigate=!!C.nextLevelId,e.isMultiBuilding()&&(C.prevBuildingId=e.prevBuildingId(),C.nextBuildingId=e.nextBuildingId(),C.hasPrevBuildingNavigate=!!C.prevBuildingId,C.hasNextBuildingNavigate=!!C.nextBuildingId),e.$el.trigger("navigation",C),e.o.developer){var t=Object.keys(C).map((function(A){return"".concat(A,"=").concat(C[A])}));g("#navigatingText").text(t.join(" | "))}}},{key:"showOnNext",value:function(A,g,I){var C=this;this.setParams(A,g,I);var t=this.getAdvanceToNextFloorIndex();setTimeout((function(){C.showOnLevelByLevelIndex(t)}),v)}},{key:"showOnPrev",value:function(A,g,I){var C=this;this.setParams(A,g,I);var t=this.getAdvanceToPrevFloorIndex();setTimeout((function(){C.showOnLevelByLevelIndex(t)}),v)}},{key:"showOnLevelByLevelNo",value:function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=o.findIndex(this.routeData,{no:A});return this.showOnLevelByLevelIndex(I,g)}},{key:"showOnLevelByLevelIndex",value:function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.debug("Navigation.showOnLevelByLevelIndex: floorIndex=",A,"canceled=",this.canceled),!this.canceled){var I=this.routeData[A];if(I)if(this.activeFloorIndex!==A){var C=cA(I.no);if(g){if(e.o.animation.stackAnimation&&e.o.stackMode.enabled&&!e.stackModeActive)return void e.stackMode(C.id,this.autoMode);zA(C,!0)}this.activeFloorIndex=A;var t=I.path;e.tooltip&&e.tooltip.hide(),this.removePathAnimations(),this.navigationEvent(),this.animatePathOnLevel(t,I.points,{end_floor:I.end_floor,level_changer:I.level_changer||I.node_level_changer}),this.started=!0}else e.debug("Navigation.showOnLevelByLevelIndex: ACTIVE FLOOR SP ALREADY SHOWN",this.activeFloorIndex,A);else e.debug("Navigation.showOnLevelByLevelIndex: NO ROUTE DATA")}}},{key:"animationStarted",value:function(){return this.started}},{key:"removePathAnimations",value:function(){this.tween&&(this.tween.pause(),this.tween.remove&&this.tween.remove(),this.tween=null),this.$path&&(this.$path.stop().remove(),this.$path=null),g(this.elementSelector).stop().remove(),this.removeStartPin(),this.removeEndPin(),this.started=!1}},{key:"addStartPin",value:function(A){if(this.showPins){this.removeStartPin();var I=bA(A.x,A.y),C=uA(e.currentLevel),t=I.x/x()*100,n=I.y/w()*100,i=g("<a/>",{href:"#",class:"svg-map-pin green-start pin-pulse"}).css({top:n+"%",left:t+"%"}).appendTo(C);i.on("click touchend",(function(A){A.preventDefault()})),this.$startPin=i}}},{key:"removeStartPin",value:function(){this.$startPin&&this.$startPin.stop().remove()}},{key:"addEndPin",value:function(A){if(this.showPins){this.removeEndPin();var I=bA(A.x,A.y),C=uA(e.currentLevel),t=I.x/x()*100,n=I.y/w()*100,i=g("<a/>",{href:"#",class:"svg-map-pin red-end pin-pulse"}).css({top:n+"%",left:t+"%"}).appendTo(C);i.on("click touchend",(function(A){A.preventDefault()})),this.$endPin=i}}},{key:"removeEndPin",value:function(){this.$endPin&&this.$endPin.stop().remove()}},{key:"changeStartPinImg",value:function(A){this.$startPin&&this.$startPin.css("background-image",'url("'.concat(A,'")'))}},{key:"resetStartPinImg",value:function(){this.$startPin&&this.$startPin.css("background-image","")}},{key:"changeEndPinImg",value:function(A){this.$endPin&&this.$endPin.css("background-image",'url("'.concat(A,'")'))}},{key:"resetEndPinImg",value:function(){this.$endPin&&this.$endPin.css("background-image","")}},{key:"isOnFirstNavigationFloor",value:function(){return this.activeFloors&&0===this.activeFloorIndex}},{key:"isOnLastNavigationFloor",value:function(){return this.activeFloors&&this.activeFloorIndex===this.activeFloors.length-1}},{key:"getFloorNo",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.activeFloors&&this.activeFloors[this.activeFloorIndex+A]}},{key:"navigationWay",value:function(){return this.activeFloors[0]>this.activeFloors[1]?1:0}},{key:"animatePathOnLevel",value:function(A,I,C){var t=this;e.debug("Navigation.animatePathOnLevel: pathString=",A,"| points=",I);var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d",A);var i=n.getTotalLength()+150,r=i*e.o.animation.speedFactor/v;e.debug("Navigation.animatePathOnLevel: PATH LENGTH="+i,"ANIMATION DURATION="+r);var s=vA(e.currentLevel),l=uA(e.currentLevel),c=16/e.o.animation.frequencyFactor,u=16/e.o.animation.speedFactor;e.debug("Navigation.animatePathOnLevel: COEFFICIENT FOR ANIMATION=".concat(c," | COEFFICIENT FOR SPEED=").concat(u));var p=[],f=[],h={left:null,right:null},m=r*c;if(e.debug("Navigation.animatePathOnLevel: POINT LENGTH ".concat(m," or ARRAY LENGTH ").concat(I.length)),t.$path=g(n),t.$path.attr({class:"line",fill:"none"}).css({stroke:e.o.strokeOptions.color,strokeWidth:e.o.strokeOptions.width,strokeMiterlimit:e.o.strokeOptions.width/2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:i}).appendTo(s),"line"===e.o.animation.mode)t.$path.addClass("navigation-line-animation");else if(o.includes(e.o.animation.pointModes,e.o.animation.mode))for(var b=0;b<r*c*100;b++)p.push(g("<a/>",{class:t.elementSelector.split(".").join(" ")}));else if("foot"===e.o.animation.mode)h.left=g("<img/>",{class:"foot foot-left"}),h.right=g("<img/>",{class:"foot foot-right"});else if("feet"===e.o.animation.mode)for(var y=0;y<r*c;y++)f.push(g("<img/>",{class:"foot"}));function z(){e.debug("Navigation.animatePathOnLevel: ANIMATION COMPLETE");var A=t.getAdvanceToNextFloorIndex();A>=0&&t.autoMode&&t.started?setTimeout((function(){t.showOnLevelByLevelIndex(A)}),v):-1===A&&t.autoMode&&t.onCompleteAnimation&&t.onCompleteAnimation()}function P(A,g,I){A&&g&&A.from(g,I,{css:{top:"-=30%",opacity:0},ease:Bounce.easeOut})}setTimeout((function(){var A=n.getBBox();e.debug("Navigation.animatePathOnLevel: PATH BBOX=",A);var g={x:A.x+A.width/2,y:A.y+A.height/2};if(g={x:(g=bA(g.x,g.y)).x/x(),y:g.y/w()},t.zoomEnabled&&$(g.x,g.y,e.o.animationScale,.6*v,"easeInOutCubic"),t.isOnFirstNavigationFloor()&&t.addStartPin(I[0]),t.isOnLastNavigationFloor()&&t.addEndPin(I[I.length-1]),e.o.developer&&d.startSlider(),t.tween=new a.b({onUpdate:e.o.developer?d.updateSlider:function(){}}),o.includes(e.o.animation.pointModes,e.o.animation.mode)){e.debug("Navigation.animatePathOnLevel: OF POINTS IN ANIMATION=".concat(p.length));for(var C=0;C<p.length;C++)l.append(p[C]);var i=o.map(I,(function(A){return{left:((A=bA(A.x,A.y)).x-p[0].width()/2)/x()*100+"%",top:(A.y-p[0].height()/2)/w()*100+"%"}})),s=.5/u;e.debug("Navigation.animatePathOnLevel: STAGGER TIME=".concat(s)),t.tween.progress(0).clear().set(t.elementSelector,{css:{left:i[0].left,top:i[0].top,opacity:0},transformOrigin:"top left"}),t.isOnFirstNavigationFloor()&&P(t.tween,t.$startPin,1),t.isOnLastNavigationFloor()&&P(t.tween,t.$endPin,1),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:1},ease:"linear"},s);var c=t.tween.duration(),b=r/2,y=s*(p.length-1);t.tween.staggerTo(t.elementSelector,b,{bezier:{type:"thru",curviness:0,values:i,autoRotate:"arrow"===e.o.animation.mode?0:90},ease:"linear"},s,"-=".concat(y)),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:0},ease:"linear"},s,"-=".concat(y)),e.debug("Navigation.animatePathOnLevel: that.tween.duration()=",t.tween.duration()),setTimeout((function(){z()}),(c/100+2)*v)}else if("foot"===e.o.animation.mode){e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES..");var R=a.a.config(I.length);l.append(h.left),l.append(h.right);var M=o.map(I,(function(A){return{left:(A.x-h.left.width()/2)/x()*100+"%",top:(A.y-h.left.height()/2)/w()*100+"%"}})),Z=.5/u;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",M,"STAGGER TIME ".concat(Z)),t.tween.progress(0).clear().set(t.elementSelector,{css:{left:M[0].left,top:M[0].top,opacity:0}}),t.tween.to(h.left,.5,{autoAlpha:1,ease:"linear"},Z),t.tween.to(h.right,.5,{autoAlpha:1,ease:"linear"},Z);var D=r/2,T=Z*(m-1)-D;T<0&&(T=Z),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(T)),t.tween.to(h.left,D,{bezier:{type:"thru",curviness:0,values:M,autoRotate:90},transformOrigin:"50% -50%",ease:R},Z),t.tween.to(h.right,D,{bezier:{type:"thru",curviness:0,values:M,autoRotate:90},transformOrigin:"50% -50%",ease:R},1.5*Z);var O=t.tween.duration();setTimeout((function(){z()}),(O+2)*v)}else if("feet"===e.o.animation.mode){var j=a.a.config(I.length);e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES... | OF FOOT IN ANIMATION: ".concat(f.length));for(var N=0;N<f.length;N++)l.append(f[N]);var E=o.map(I,(function(A){return{left:(A.x-f[0].width()/2)/x()*100+"%",top:(A.y-f[0].height()/2)/w()*100+"%"}})),G=.5/u;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",E,"STAGGER TIME ".concat(G)),t.tween.progress(0).clear().set(t.elementSelector,{css:{left:E[0].left,top:E[0].top,opacity:0}}),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:1},ease:"linear"},G);var X=r/2,H=G*(f.length-1)-X,k=G*(f.length-1);H<0&&(H=G),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(H)),t.tween.staggerTo(t.elementSelector,X,{bezier:{type:"thru",curviness:0,values:E,autoRotate:90},ease:j,repeatDelay:H},G,"-=".concat(k)),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:0},ease:"linear"},G,"-=".concat(k));var Y=t.tween.duration();setTimeout((function(){z()}),(Y+2)*v)}else t.isOnFirstNavigationFloor()&&P(t.tween,t.$startPin,1.5),t.isOnLastNavigationFloor()&&P(t.tween,t.$endPin,1.5),t.tween.to(t.$path,r,{strokeDashoffset:0,ease:"easeInOutPower2",delay:0,onComplete:z})}),e.o.cssAnimation?e.o.cssAnimationTime:.1*v),t.animationListener&&t.animationListener(C)}},{key:"advanceToNextFloor",value:function(){var A=this.activeFloorIndex,g=Math.min(this.activeFloors.length-1,A+1);e.debug("Navigation.advanceToNextFloor: activeFloorIndex",A,"nextFloorIndex:",g),A!==g?this.showOnLevelByLevelIndex(g):this.setAutoMode(!1)}},{key:"getAdvanceToNextFloorIndex",value:function(){var A=this.activeFloorIndex,g=Math.min(this.activeFloors.length-1,A+1);return e.debug("Navigation.getAdvanceToNextFloorIndex: currentIndex=",A,"nextFloorIndex=",g),A===g?-1:g}},{key:"getAdvanceToPrevFloorIndex",value:function(){var A=this.activeFloorIndex,g=Math.min(this.activeFloors.length-1,A-1);return e.debug("Navigation.getAdvanceToNextFloorIndex: currentIndex=",A,"prevFloorIndex",g),A===g?-1:g}},{key:"setAnimationListener",value:function(A){this.animationListener=A}},{key:"onComplete",value:function(A){this.onCompleteAnimation=A}}],[{key:"convertLinesToPath",value:function(A){for(var g="",I=0;I<A.length;I++){0===I&&(g+="M");var C=A[I];g+="".concat(C.x," ").concat(C.y," ")}return e.debug("Navigation.convertLinesToPath: PATH CALCULATED:"+g),g.trim()}}]),A}(),z=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},I=null,C=0,t=sA(A);if(e.debug("processLevels: filtered floors: ",t,A),0!==t.length){for(var n=0;n<t.length;n++){var i=t[n];if(e.currentLevel===i.id)return void e.debug("processLevels: -- ALREADY PROCESSED LEVELS --")}return e.$map.children(".svg-map-layer").remove(),t.forEach((function(A){e.debug("ADDING LEVEL..",A);var t=A.map.svg,n=g("<div/>",{class:"svg-map-layer "+(e.o.cssAnimation?"svg-map-layer-animated ":"")+X("svg-map-layer-",A.no),"data-floor":A.id,"data-building-id":A.building,"data-floor-number":A.no}).appendTo(e.$map),i=g("<div/>").addClass("svg-map-map-image").addClass(e.o.locale.language);i.appendTo(n),i.append(t),A.building&&A.building,C++,i.find("svg").attr({class:"svg-map-real-svg"}),e.o.rotate&&gA(i,e.o.rotate),A.svgReady=!0,g(e.o.selector,i).each((function(){e.debug("processLevels: LOCATION ID="+g(this).attr("id"));var A=iA(g(this).attr("id"));if(A){if(e.debug("LOCATION FOUND"),"not-empty"===A.action?H(g(this),"svg-map-not-clickable"):H(g(this),"svg-map-clickable"),A.category){var I=nA(A.category);I&&(e.debug("processLevels: add color=".concat(I)),g(this).css({fill:"#".concat(I)}))}if(A.$el=g(this),A.pin){var C=100*hA(A),t=100*dA(A),i=g("<a/>",{href:"#",class:"svg-map-pin"}).css({top:C+"%",left:t+"%"}).appendTo(n);o.isString(A.pin)&&A.pin.indexOf("pin-image")>-1&&A.thumbnail&&i.addClass("pin-image").css("background-image","url("+A.thumbnail+")"),i.on("click touchend",(function(g){g.preventDefault(),e.dragging||e.showLocation(A.id,1.2*v,!0,!0)}))}}})),e.o.servicesEnabled&&g(e.o.serviceSelector,i).each((function(){e.debug("processLevels: SERVICE LOCATION ID="+g(this).attr("id"));var A=aA(g(this).attr("id"));if(A){H(this,"svg-map-clickable"),A.$el=g(this);A.$el[0]}})),g(e.o.rectSelector,i).each((function(){var A=g(this).attr("id");if(A){var I=new RegExp(/(.+)-rect/i),C=A.match(I);if(C||(I=new RegExp(/rect_(.+)/i),C=A.match(I))){var t=C[1],n=iA(t);n&&(e.debug("processLevels: ADDING RECT TO LOCATION="+n.id),n.$rect=g(this))}}})),e.o.landmark||(g(e.o.selector,i).on("click touchend",(function(){e.debug("processLevels: CLICKED, DRAGGING="+e.dragging),e.dragging||e.showLocation(g(this).attr("id"),1.2*v,!0,!0)})),e.o.servicesEnabled&&g(e.o.serviceSelector,i).on("click touchend",(function(){e.debug("CLICKED SERVICE, DRAGGING: "+e.dragging),e.dragging||e.showLocation(g(this).attr("id"),1.2*v)}))),e.$el.trigger("levelReady",[A.id,A.no,A.isOutdoor]),!0===A.isInitial&&(I=A)})),I||(I=t[0]),zA(I),t.forEach((function(A){e.resetLevel(A.id)})),e.$el.trigger("levelsReady",[t,I.id,I.isOutdoor]),{levelsLoaded:C,shownLevelId:I.id}}e.debug("levels not found")},P=function(I){e.data=I,e.o.maxScale=parseFloat(e.o.zoomLimit)||e.o.maxScale,e.debug("processData: OPTIONS:",e.o),e.$container=g("<div/>").addClass("svg-map-container").appendTo(e.$el),e.$map=g("<div/>").addClass("svg-map-map").appendTo(e.$container),e.o.stackMode.enabled&&e.$map.addClass("stack-mode-on"),e.o.zoom&&e.$map.addClass("svg-map-zoomable"),e.$levelSelect=g("<select/>").addClass("svg-map-levels-select"),90===e.o.rotate||270===e.o.rotate?(e.debug("processContentSizes: ROTATE="+e.o.rotate),e.data.levels.forEach((function(A){e.debug("processContentSizes: PROCESS LEVEL 1 = ",A);var g=parseFloat(A.map.width),I=parseFloat(A.map.height),C=Math.max(g,I);e.debug("processContentSizes: DIMENSION=",C),e.contentWidth[A.id]=C,e.contentHeight[A.id]=C,e.offsetDueToRotation[A.id]=C-Math.min(g,I),e.debug("processContentSizes: OFFSET DUE TO ROTATION="+D()),e.offsetCoefficient[A.id]=g>I?{90:{x:1,y:0},270:{x:1,y:0}}:{90:{x:0,y:1},270:{x:0,y:1}}}))):(e.debug("processContentSizes: NO ROTATE OR 180"),e.data.levels.forEach((function(A){e.debug("processContentSizes: PROCESS LEVEL 2=",A),e.contentWidth[A.id]=parseFloat(A.map.width),e.contentHeight[A.id]=parseFloat(A.map.height)}))),e.debug("processContentSizes: done!"),e.$container.css("width","100%"),R(),e.callbackMapReady=function(A){if(e.$el.removeClass("svg-map-loading"),e.o.landmark&&e.data.landmark.id){var g=o.isUndefined(I.landmark.duration)?1.2:I.landmark.duration;e.showLocation(e.data.landmark.id,g*v,!0,e.data.landmark.zoom)}else $(.5,.5,1,0),e.o.stackMode.enabled&&e.stackMode();j((function(A){A?e.debug(A):e.debug("processData: NODES ADDED")})),setTimeout((function(){E((function(A){A&&e.debug(A),e.debug("processData: RECTS ADDED"),e.$el.trigger("mapReady"),e.callbackMapReady=null,e.debug("processData: MAP READY")}))}),10)},e.o.tooltip.enabled&&(e.tooltip=new l,e.tooltip.init()),e.userPinTooltip=new h,e.o.hoverTip&&(e.hoverTip=new f,e.hoverTip.init()),e.o.developer&&(e.devTools=new d,e.devTools.init()),e.navigation=new y;var C=e.isMultiBuilding()?{isOutdoor:!0}:{},t=z(C);A.nextTick((function(){e.callbackMapReady(t&&t.shownLevelId)})),g(window).resize((function(){e.$container.height("100%"),R(),M(U(Z())),e.x=V(e.x),e.y=B(e.y),_(e.x,e.y,Z(),.1*v)})).resize()};function R(){e.data.levels.forEach((function(A){return g=A.id,I=e.$container.width()/x(g),C=e.$container.height()/w(g),void(e.o.mapFill?T(I>C?I:C,g):T(I<C?I:C,g));var g,I,C}))}var x=function(A){return A?e.contentWidth[A]:e.currentLevel?e.contentWidth[e.currentLevel]:e.contentWidth[e.data.levels[0].id]},w=function(A){return A?e.contentHeight[A]:e.currentLevel?e.contentHeight[e.currentLevel]:e.contentHeight[e.data.levels[0].id]},M=function(A,g){return g?e.scale[g]=A:e.currentLevel?e.scale[e.currentLevel]=A:e.scale[e.data.levels[0].id]=A},Z=function(A){return A?e.scale[A]:e.currentLevel?e.scale[e.currentLevel]:e.scale[e.data.levels[0].id]},D=function(A){return A?e.offsetDueToRotation[A]:e.currentLevel?e.offsetDueToRotation[e.currentLevel]:e.offsetDueToRotation[e.data.levels[0].id]},T=function(A,g){return e.debug("setFitScale: SETTING FIT SCALE AS=",A,g),g?e.fitscale[g]=A:e.currentLevel?e.fitscale[e.currentLevel]=A:(e.debug("setFitScale: OF LEVEL (not current)=",e.data.levels[0].id),e.fitscale[e.data.levels[0].id]=A)},O=function(A){return A?e.fitscale[A]:e.currentLevel?e.fitscale[e.currentLevel]:e.fitscale[e.data.levels[0].id]};var j=function(A){if(e.o.beaconMode){var g=!0,I=!1,C=void 0;try{for(var t,n=e.data.levels[Symbol.iterator]();!(g=(t=n.next()).done);g=!0){var i=t.value;if(i.beacons){var r=uA(i.id),a=!0,o=!1,s=void 0;try{for(var l,c=i.beacons[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var u=l.value;N(u,r)}}catch(A){o=!0,s=A}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}}}}catch(A){I=!0,C=A}finally{try{g||null==n.return||n.return()}finally{if(I)throw C}}e.debug("addBeaconNodes: ALL BEACON NODES ADDED TO SVG"),A&&A()}},N=function(A,I){var C=g("<a/>",{href:"#",class:"svg-map-pin circular ".concat(A.leader?"pin-md red":"pin-xs black"," pin-pulse"),"data-title":A.name,"data-toggle":"tooltip"});C.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("beaconClicked",RA(A))})).appendTo(I);var t=bA(A.x,A.y),n=t.x/x()*100,i=t.y/w()*100;C.css({top:i+"%",left:n+"%"})},E=function(A){if(!e.o.textOnRect.enabled)return A();var g={horizontal:{x:0,y:2*e.o.textOnRect.maxFontSize/48},vertical:{x:0,y:2*e.o.textOnRect.maxFontSize/48}},I=!0,C=!1,t=void 0;try{for(var n,i=e.data.levels[Symbol.iterator]();!(I=(n=i.next()).done);I=!0){var r=n.value,a=vA(r.id),o=!0,s=!1,l=void 0;try{for(var c,u=r.locations[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var v=c.value;v.$rect&&G(v,a,g)}}catch(A){s=!0,l=A}finally{try{o||null==u.return||u.return()}finally{if(s)throw l}}}}catch(A){C=!0,t=A}finally{try{I||null==i.return||i.return()}finally{if(C)throw t}}return e.debug("addTextsInsideRects: ALL TEXTS ADDED TO SVG"),A()},G=function(A,I,C){var t=A.$rect[0]&&A.$rect[0].getBBox();if(t){e.debug("addTextIntoRect: ADDING TEXT:",fA(A));var n={x:t.x+t.width/2,y:t.y+t.height/2},i=e.o.textOnRect.maxFontSize,r=e.o.textOnRect.minFontSize,a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("x",n.x.toFixed(5)),a.setAttribute("y",n.y.toFixed(5)),a.setAttribute("font-family",e.o.textOnRect.fontFamily),a.setAttribute("alignment-baseline","middle"),a.setAttribute("text-anchor","middle"),a.setAttribute("class","text-hidden"),"dynamic"===e.o.textOnRect.mode?(a.setAttribute("rect-height",t.height),a.setAttribute("rect-width",t.width),a.setAttribute("font-size","".concat(e.o.textOnRect.fontSize/Z(),"px"))):a.setAttribute("font-size","".concat(i,"px")),g(a).html(fA(A)),g(e.o.noPointerGroupSelector,I).append(g(a)),"dynamic"===e.o.textOnRect.mode?(t.height>t.width?IA(a,e.o.rotate<180?270:90):IA(a,90===e.o.rotate||180===e.o.rotate?180:0),J(a,{height:t.height,width:t.width})):function(A,g,I,C){var i=g;if(t.width<t.height){for(;!r(A,t)&&(i=Math.max(i-2,I),A.setAttribute("font-size","".concat(i,"px")),i!==I););r(A,t)&&(k(A,"text-hidden"),H(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.vertical.x)),A.setAttribute("y","".concat(n.y+C.vertical.y)),IA(A,e.o.rotate<180?270:90))}else{for(;!a(A,t)&&(i=Math.max(i-2,I),A.setAttribute("font-size","".concat(i,"px")),i!==I););a(A,t)&&(k(A,"text-hidden"),H(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.horizontal.x)),A.setAttribute("y","".concat(n.y+C.horizontal.y)),IA(A,90===e.o.rotate||180===e.o.rotate?180:0))}function r(A,g){return!(A.getBBox().width>g.height||A.getBBox().height>g.width)}function a(A,g){return!(A.getBBox().width>g.width||A.getBBox().height>g.height)}}(a,i,r,C)}},X=function(A,g){return"".concat(A).concat(.5===g?"0-5":g)},H=function(A,g){var I=W(A);function C(A){A.classList?A.classList.add(g):Y(A,g)||A.setAttribute("class","".concat(A.getAttribute("class")," ").concat(g))}I&&(Array.isArray(I)?I.forEach((function(A){C(A)})):C(I))},k=function(A,g){var I=W(A);function C(A){A.classList?A.classList.remove(g):Y(A,g)&&A.setAttribute("class",A.getAttribute("class")?A.getAttribute("class").replace(g," "):g)}I&&(Array.isArray(I)?I.forEach((function(A){C(A)})):C(I))},Y=function(A,g){var I=W(A);return!!I&&(I.classList?I.classList.contains(g):I.getAttribute("class")&&I.getAttribute("class").indexOf(g)>-1)},W=function(A){return A?A.jquery?o.times(A.length,(function(g){return A[g]})):A:null},L=function(A){k(g(".svg-map-navigation-start",A),"svg-map-navigation-start"),k(g(".svg-map-navigation-end",A),"svg-map-navigation-end"),k(g(".svg-map-active",A),"svg-map-active")},S=function(A){A&&H(A,"svg-map-active")},F=function(A){A&&(Y(A,"svg-map-active")?k(A,"svg-map-active"):H(A,"svg-map-active"))},V=function(A){var g=e.$container.width()-x()*Z();return g<0?A>0?A=0:A<g&&(A=g):A=g/2,e.debug("normalizeX: X=".concat(A," | MIN X=").concat(g," | NORMALIZED X=").concat(A)),A},B=function(A){var g=e.$container.height()-x()*Z();return g<0?A>=0?A=0:A<g&&(A=g):A=g/2,e.debug("normalizeY: Y=".concat(A," | MIN Y=").concat(g," | NORMALIZED Y=").concat(A)),A},U=function(A){return A<O()?A=O():A>e.o.maxScale&&(A=e.o.maxScale),A},J=function(A,g){A.setAttribute("font-size","".concat(e.o.textOnRect.fontSize/Z(),"px")),A.getBBox().width>g.width?A.getBBox().width>g.height||A.getBBox().height>g.width?(k(A,"text-visible"),H(A,"text-hidden")):(k(A,"text-hidden"),H(A,"text-visible")):A.getBBox().width>g.width||A.getBBox().height>g.height?(k(A,"text-visible"),H(A,"text-hidden")):(k(A,"text-hidden"),H(A,"text-visible"))},K=o.debounce((function(){var A=vA(e.currentLevel);(A=g(e.o.noPointerGroupSelector,A)).find("text").each((function(){var A=this.getAttribute("rect-width"),g=this.getAttribute("rect-height");A&&g&&J(this,{width:A,height:g})}))}),600),Q=function(){g(".svg-map-layer",e.$el).bind("mousewheel DOMMouseScroll",q)},q=function(A,g){A.preventDefault();var I=Z();M(U(I+I*g/5)),e.x=V(e.x-(A.pageX-e.$container.offset().left-e.x)*(Z()/I-1)),e.y=B(e.y-(A.pageY-e.$container.offset().top-e.y)*(Z()/I-1)),e.debug("mouseWheel: scale=".concat(I," | x=").concat(e.x," | y=").concat(e.y)),_(e.x,e.y,Z(),.2*v,"easeOutCubic")},_=function(A,g,I,C,t){e.stackModeActive||(e.debug("zoomTo: COORD: (".concat(A,",").concat(g,") SCALE: ").concat(I," DURATION: ").concat(C)),void 0!==I?(e.o.textOnRect.enabled&&"dynamic"===e.o.textOnRect.mode&&K(),e.$map.stop().animate({left:A,top:g,width:x()*I,height:w()*I},C,t,(function(){e.tooltip&&e.tooltip.position(),e.userPinTooltip&&e.userPinTooltip.position()}))):e.$map.css({left:A,top:g}),e.tooltip&&e.tooltip.position(),e.userPinTooltip&&e.userPinTooltip.position(),e.$el.trigger("positionChanged",{x:A,y:g}))},$=function(A,g,I,C,t,n,i){var r;e.debug("moveTo: RATIO: (".concat(A,",").concat(g,") SCALE: ").concat(I," DURATION: ").concat(C)),i?(e.debug("moveTo: CHANGING FLOOR ID SUPPLIED ".concat(i)),r=pA(i)):r=pA(e.currentLevel),e.debug("moveTo: INITAL SCALE FACTOR: ".concat(r)),C=void 0!==C?C:.4*v,n=void 0!==n?n:.5,I=void 0!==I?Math.min(I*r,e.o.maxScale):Z()/O(),M(U(O()*I)),e.x=V(.5*e.$container.width()-Z()*x()*A),e.y=B(e.$container.height()*n-Z()*w()*g),e.debug("moveTo: CONTAINER: (".concat(e.$container.width(),", ").concat(e.$container.height(),") | CONTENT: (").concat(x(),", ").concat(w(),") | RY: ").concat(n," FITSCALE: ").concat(O()," SCALE: ").concat(I," | COORD: (").concat(e.x,",").concat(e.y,") SCALE: ").concat(Z()," DURATION: ").concat(C)),_(e.x,e.y,Z(),C,t)},AA=function(A){gA(e.$map,A)},gA=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]&&arguments[2],C=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,t={rotation:g};I&&(t.transformOrigin="center center"),C&&(t.onComplete=C),a.c.set(A,t)},IA=function(A,g,I){gA(A,g,!0,I)},CA=function(A){var g={x:dA(A)*x(),y:hA(A)*w()};e.setCurrentLocation(g.x,g.y,e.userPinTooltip.getUserLocationFloorNumber())},tA=function(){e.userPinTooltip&&e.userPinTooltip.show(),e.user&&e.user.show()},eA=function(A){var g=!0,I=!1,C=void 0;try{for(var t,n=e.data.levels[Symbol.iterator]();!(g=(t=n.next()).done);g=!0){var i=t.value;if(o.find(i.locations,{id:A}))return i}}catch(A){I=!0,C=A}finally{try{g||null==n.return||n.return()}finally{if(I)throw C}}return null},nA=function(A){if(!A)return null;var g=o.find(e.data.categories,{slug:A});return g&&g.color},iA=function(A,g){if(!A)return null;var I,C={id:A};g&&(C.type=g),e.debug("findLocationData: query=",C);var t=!0,n=!1,i=void 0;try{for(var r,a=e.data.levels[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var s=r.value;if(I=o.find(s.locations,C))break}}catch(A){n=!0,i=A}finally{try{t||null==a.return||a.return()}finally{if(n)throw i}}return I},rA=function(A){return"picker"===e.o.mode?iA(A):iA(A,"store")},aA=function(A){return"picker"===e.o.mode?iA(A):iA(A,"service")||iA(A,"kiosk")},oA=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.debug("getLevel:",A),o.find(e.data.levels,A)},sA=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o.filter(e.data.levels,A,[])},lA=function(A){return oA({id:A})},cA=function(A){var g=e.$map.children(".svg-map-layer").attr("data-building-id"),I={no:A};return o.isEmpty(g)?I.isOutdoor=!0:I.building=g,oA(I)},uA=function(A){return g('.svg-map-layer[data-floor="'+A+'"]',e.$el)},vA=function(A){return uA(A).find("svg")},pA=function(A){var g=lA(A);return o.get(g,"initialScaleFactor",e.o.initialScaleFactor)},fA=function(A){var g=A.title;if(Array.isArray(g)){var I=A.join||" / ";1===I.length&&(I=" ".concat(I," ")),g=g.join(I)}return function(A){return A}(g)},dA=function(A){return A.x&&A.y||yA(A),A.x},hA=function(A){return A.x&&A.y||yA(A),A.y},mA=function(A){var g=Number.MAX_VALUE,I=Number.MIN_VALUE,C=Number.MAX_VALUE,t=Number.MIN_VALUE,e=!0,n=!1,i=void 0;try{for(var r,a=A[Symbol.iterator]();!(e=(r=a.next()).done);e=!0){var o=r.value;g=Math.min(g,dA(o)),I=Math.max(I,dA(o)),C=Math.min(C,hA(o)),t=Math.max(t,hA(o))}}catch(A){n=!0,i=A}finally{try{e||null==a.return||a.return()}finally{if(n)throw i}}return{x:(g+I)/2,y:(C+t)/2}},bA=function(A,g){var I,C={x:A,y:g},t=x(),n=w(),i=I?e.offsetCoefficient[I]:e.currentLevel?e.offsetCoefficient[e.currentLevel]:e.offsetCoefficient[e.data.levels[0].id],r=D();return 90===e.o.rotate?(C.x=t-C.y-i[90].x*r/2,C.y=C.x+i[90].y*r/2):270===e.o.rotate?(C.x=C.y+i[270].x*r/2,C.y=n-C.x-i[270].y*r/2):180===e.o.rotate&&(C.x=t-C.x,C.y=n-C.y),C},yA=function(A){if((!A.x||!A.y)&&A.$el&&A.$el[0]){if(A.$rect&&A.$rect[0]){var g=A.$rect[0];if(g){var I=g.getBBox();if(I){var C={x:I.x+I.width/2,y:I.y+I.height/2};C=bA(C.x,C.y),A.x=C.x/x(),A.y=C.y/w()}return}}var t=A.$el[0];if(t){var e=t.getBBox();if(e){var n={x:e.x+e.width/2,y:e.y+e.height/2};n=bA(n.x,n.y),A.x=n.x/x(),A.y=n.y/w()}}}},zA=function(A,I,C){if(C&&e.hideLocation(),A){o.isEmpty(A.building)||function(A){var g=e.$map.children(".svg-map-layer").attr("data-building-id");return A.building===g}(A)||z({building:A.building});var t=lA(A.id);if(t){var n=uA(A.id);if(e.currentLevel!==A.id)if(e.o.cssAnimation||!n.hasClass("layer-visible")){if(e.debug("switchLevel: FLOOR CURRENT:".concat(e.currentLevelNumber,", SWITCH TO:").concat(t.no)),I&&$(.5,.5,1,0,void 0,void 0,A.id),e.tooltip&&e.tooltip.hide(),e.o.rotate&&(e.o.rotateServices&&g(e.o.serviceSelector,n).each((function(){IA(this,360-e.o.rotate)})),g(e.o.rotatable90PathSelector,n).each((function(){IA(this,360-e.o.rotate)})),180===e.o.rotate&&g(e.o.rotatable180PathSelector,n).each((function(){IA(this,360-e.o.rotate)})),270===e.o.rotate?g(e.o.rotatable270TextSelector,n).each((function(){IA(this,180)})):180===e.o.rotate&&g(e.o.rotatable180TextSelector,n).each((function(){IA(this,180)}))),e.o.stackMode.enabled){var i=!0,r=!1,a=void 0;try{for(var l,c=e.data.levels[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var u=l.value,p=uA(u.id);u.no<t.no?p.removeClass("svg-map-layer-down").addClass("svg-map-layer-up"):u.no>t.no?p.removeClass("svg-map-layer-up").addClass("svg-map-layer-down"):(p.removeClass("svg-map-layer-up").removeClass("svg-map-layer-down"),e.$map.addClass("stack-mode-off").removeClass("stack-mode-on"))}}catch(A){r=!0,a=A}finally{try{i||null==c.return||c.return()}finally{if(r)throw a}}e.navigation.animationStarted()&&e.navigation.removeEscalatorAnimation(),e.stackModeActive=!1}if(e.currentLevel=A.id,e.currentLevelNumber=t.no,e.o.cssAnimation){var f=!0,d=!1,h=void 0;try{for(var m,b=e.data.levels[Symbol.iterator]();!(f=(m=b.next()).done);f=!0){var y=m.value,P=uA(y.id);e.$map.removeClass(X("map--selected-",y.no)),P.removeClass("active").removeClass("hidden")}}catch(A){d=!0,h=A}finally{try{f||null==b.return||b.return()}finally{if(d)throw h}}var R=uA(e.currentLevel);e.$map.addClass(X("map--selected-",t.no)),R.addClass("active")}else g(".svg-map-layer.layer-visible",e.$map).removeClass("layer-visible"),n.addClass("layer-visible");tA(),e.debug("switchLevel: SWITCHED LEVEL"),function(){var A=e.$map,I=g(".svg-map-map-image",e.$map);if(!e.o.landmark){if(document.ondragstart=function(){return!1},e.o.draggable&&I.on("mousedown",(function(I){e.dragging=!1,A.stop(),A.data("mouseX",I.pageX),A.data("mouseY",I.pageY),A.data("lastX",e.x),A.data("lastY",e.y),A.addClass("svg-map-dragging"),e.$map.on("mousemove",(function(g){if(Math.abs(g.pageX-A.data("mouseX"))>1){e.dragging=!0;var I=g.pageX-A.data("mouseX")+e.x,C=g.pageY-A.data("mouseY")+e.y;I=V(I),C=B(C),_(I,C),A.data("lastX",I),A.data("lastY",C)}else e.debug("addControls: NOT ENOUGH MOVED, MAYBE IT WAS CLICK")})),g(document).on("mouseup",(function(){e.x=A.data("lastX"),e.y=A.data("lastY"),e.$map.off("mousemove"),g(document).off("mouseup"),A.removeClass("svg-map-dragging")}))})),e.$el.on("dblclick",".svg-map-map-image",(function(A){A.preventDefault(),e.debug("addControls: DOUBLE CLICK");var g=Z();g===e.o.maxScale?M(U(O())):M(U(2*g)),e.x=V(e.x-(A.pageX-e.$container.offset().left-e.x)*(Z()/g-1)),e.y=B(e.y-(A.pageY-e.$container.offset().top-e.y)*(Z()/g-1)),_(e.x,e.y,Z(),.4*v,"easeInOutCubic")})),e.o.mouseWheel&&Q(),!("ontouchstart"in window||"onmsgesturechange"in window))return!0;I.on("touchstart",(function(g){e.dragging=!1;var C=g.originalEvent,t=A.position();A.data("touchY",C.changedTouches[0].pageY-t.top),A.data("touchX",C.changedTouches[0].pageX-t.left),I.on("touchmove",(function(g){g.preventDefault(),e.dragging=!0;var C=g.originalEvent;1===C.touches.length?(e.x=V(C.changedTouches[0].pageX-A.data("touchX")),e.y=B(C.changedTouches[0].pageY-A.data("touchY")),_(e.x,e.y,Z(),50)):I.off("touchmove")})),I.on("touchend",(function(){I.off("touchmove touchend")}))}));var C=new s(e.$map[0],{transform_always_block:!0,drag_block_horizontal:!0,drag_block_vertical:!0});C.get("pinch").set({enable:!0}),e.rotating=!1;var t,n=1;if(C.on("pinchstart",(function(){e.debug("addControls: PINCH START"),e.dragging=!1,n=Z()/O(),t=n})),C.on("pinch",(function(A){e.dragging=!0,1!==A.scale&&(n=Math.max(1,Math.min(t*A.scale,100)));var g=Z();M(U(n*O())),e.x=V(e.x-(A.center.x-e.$container.offset().left-e.x)*(Z()/g-1)),e.y=B(e.y-(A.center.y-e.y)*(Z()/g-1)),_(e.x,e.y,Z(),0)})),e.o.rotatable){C.get("rotate").set({enable:!0});var i,r=0;C.on("rotatestart rotatemove rotateend",(function(A){switch(A.type){case"rotatestart":r=A.rotation;break;case"rotatemove":e.debug("addControls: ROTATE MOVE"),i=r-A.rotation,AA(e.rotation-i);break;case"rotateend":e.rotation=e.rotation-i}}))}}}(),e.resetLevel(A.id),e.$el.trigger("levelSwitched",[t.id,t.no,t.isOutdoor])}else e.debug("switchLevel: ** ALREADY SWITCHED **");else e.debug("switchLevel: -- ALREADY SWITCHED --")}}};e.stackMode=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.o.stackMode.enabled)if(e.stackModeActive)e.error("stack mode zaten aktif");else{e.tooltip&&e.tooltip.hide(),$(.5,.5,1,0,void 0,void 0),e.stackModeActive=!0,e.navigation.animationStarted()&&e.navigation.addEscalatorAnimation();var I=o.sortBy(e.data.levels,(function(A){return A.no}));o.each(I,(function(I,C){var t=uA(I.id);t.removeClass("hidden").removeClass("active"),e.$map.removeClass(X("map--selected-",I.no)),t.data("value",I.no),t.css("transform","translateZ(".concat(C*e.o.stackMode.offset,"vmin)")),t.removeClass("svg-map-layer-up").removeClass("svg-map-layer-down").removeClass("layer-visible"),t.one("click",(function(A){A.preventDefault(),e.debug("stackMode: $svgLayer.click=",I),e.switchLevelToNumber(I.no,!0,!1,g,!1)})),A&&I.id!==A&&I.id!==e.currentLevel&&t.addClass("hidden")})),e.currentLevel=void 0,e.currentLevelNumber=void 0,e.$map.addClass("stack-mode-on").removeClass("stack-mode-off"),A&&setTimeout((function(){var I=lA(A);e.switchLevelToNumber(I.no,!1,!1,g,!1)}),e.o.stackMode.switchFloorTime)}else e.error("Please first activate stackMode in order to use it")};var PA=function(A){return o.omit(A,["$el","$rect","x","y"])},RA=function(A){return o.omit(A,["x","y"])};e.zoomIn=function(){var A=Z();M(U(A+.8*A)),e.x=V(e.x-(e.$container.width()/2-e.x)*(Z()/A-1)),e.y=B(e.y-(e.$container.height()/2-e.y)*(Z()/A-1)),_(e.x,e.y,Z(),.4*v,"easeInOutCubic")},e.zoomOut=function(){var A=Z();M(U(A-.4*A)),e.x=V(e.x-(e.$container.width()/2-e.x)*(Z()/A-1)),e.y=B(e.y-(e.$container.height()/2-e.y)*(Z()/A-1)),_(e.x,e.y,Z(),.4*v,"easeInOutCubic")},e.resetLevel=function(){AA(0),e.hideLocation(),$(.5,.5,1,.4*v,"easeInOutCubic")},e.switchLevelToNumber=function(A,g,I){var C=arguments.length>3&&void 0!==arguments[3]&&arguments[3],t=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=cA(A);n&&(e.navigation.setAutoMode(C),t&&e.navigation.started||zA(n,g,I),e.navigation.animationStarted()&&e.navigation.showOnLevelByLevelNo(n.no,t))},e.switchLevelToId=function(A,g,I){var C=arguments.length>3&&void 0!==arguments[3]&&arguments[3],t=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=lA(A);n&&(e.navigation.setAutoMode(C),t&&e.navigation.started||zA(n,g,I),e.navigation.animationStarted()&&e.navigation.showOnLevelByLevelNo(n.no,t))},e.highlightLocation=function(A,g,I){e.debug("highlightLocation: HIGHLIGHT LOCATION? "+A);var C=iA(A);if(C){var t=eA(C.id);if(t){if(zA(t),g){var n=C.zoom?parseFloat(C.zoom):e.o.maxScale;$(dA(C),hA(C),n,I,"easeInOutCubic")}L(e.$el),S(C.$el),e.$el.trigger("locationHighlighted",PA(C))}}},e.showLocation=function(A,g){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.debug("showLocation: id="+A);var t=iA(A);if(t)if("kiosk"!==t.type){var n=eA(t.id);if(n){I&&(e.debug("showLocation: close navigation"),e.closeNavigation());var i=t.action&&"default"!==t.action?t.action:e.o.action,r=(e.data.landmark||{}).zoom;if(e.o.landmark&&o.isBoolean(r)&&!r&&(e.debug("showLocation: ZOOM NOT ENABLED FOR LANDMARK"),i="tooltip",e.o.zoomToSelected=!1),"select"===i)F(t.$el);else if("zoom"===i){zA(n,C);var a=t.zoom?parseFloat(t.zoom):e.o.maxScale;C&&$(dA(t),hA(t),a,g,"easeInOutCubic")}else if("pin"===i)zA(n),e.tooltip&&e.tooltip.show(t,g);else if("tooltip"===i)zA(n),e.tooltip&&e.tooltip.show(t,g);else if("not-empty"===i)return e.debug("showLocation: location not empty case"),void(e.o.locationCannotBeSelected&&e.o.locationCannotBeSelected(t.id));L(e.$el),S(t.$el),e.$el.trigger("locationOpened",PA(t))}else e.error("showLocation: level not found")}else e.error("showServiceLocation: kiosk service cannot be selected");else e.error("showLocation: ".concat(A," not found"))},e.highlightServiceLocation=function(A,g,I){e.error("highlightServiceLocation deprecated. use map.highlightLocation(...)")},e.showServiceLocation=function(A,g){!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.error("showServiceLocation deprecated. use map.showLocation(...)")},e.highlightLocations=function(A,g,I){var C;if(e.debug("highlightLocations: "+A),(C=Array.isArray(A)?A:[A]).length<=1)e.highlightLocation(C[0],g,I);else{var t=o.filter(o.map(C,(function(A){return rA(A)})));if(t.length){var n=t[0],i=eA(n.id);if(i){if(zA(i),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=mA(t);$(a.x,a.y,r,I,"easeInOutCubic")}L(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,v=t[Symbol.iterator]();!(s=(u=v.next()).done);s=!0){var p=u.value;S(p.$el)}}catch(A){l=!0,c=A}finally{try{s||null==v.return||v.return()}finally{if(l)throw c}}e.$el.trigger("locationsHighlighted")}}}},e.showServiceLocations=function(A){e.error("showServiceLocations deprecated. use map.showLocation(...)")},e.highlightServiceLocations=function(A,g,I){var C;if(e.debug("highlightServiceLocations: HIGHLIGHT SERVICE LOCATIONS? "+A),(C=Array.isArray(A)?A:[A]).length<=1)e.highlightServiceLocation(C[0],g,I);else{var t=o.filter(o.map(C,(function(A){return aA(A)})));if(t.length){var n=t[0],i=eA(n.id);if(i){if(zA(i),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=mA(t);$(a.x,a.y,r,I,"easeInOutCubic")}L(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,v=t[Symbol.iterator]();!(s=(u=v.next()).done);s=!0){var p=u.value;S(p.$el)}}catch(A){l=!0,c=A}finally{try{s||null==v.return||v.return()}finally{if(l)throw c}}e.$el.trigger("serviceLocationsHighlighted")}}}},e.hideLocation=function(){e.debug("hideLocation: HIDE LOCATION INSIDE:",e.$el),L(e.$el),e.tooltip&&e.tooltip.hide(),e.$el.trigger("locationClosed")},e.setCurrentLocationFromBlock=function(A){var g=iA(A);if(g){var I=eA(A),C=lA(e.currentLevel);e.userPinTooltip.addUserLocation(g,I.no),C&&C.no===e.userPinTooltip.getUserLocationFloorNumber()?(e.debug("set current location"),CA(g)):e.debug("setCurrentLocationFromBlock: wait for patch..")}else e.debug("setCurrentLocationFromBlock: location not found")},e.setCurrentLocation=function(A,g,I){var C;C=o.isNumber(I)?cA(I):lA(e.currentLevel),e.userPinTooltip.addUserLocationPoint(A,g,C.no),lA(e.currentLevel).no===e.userPinTooltip.getUserLocationFloorNumber()&&tA()},e.updateLocalized=function(A){var g=A.youAreHereText,I=A.navigationText,C=A.closeText,t=A.detailText,n=A.enterBuildingText,i=A.floorText;g&&e.userPinTooltip.updateLocalized(g),(I||C||t||n||i)&&e.tooltip.updateLocalized({navigationText:I,closeText:C,detailText:t,enterBuildingText:n,floorText:i})},e.changeNavigationPins=function(A){var g=A.startPin,I=A.endPin;e.navigation&&(e.debug("changeNavigationPins: WILL TRY changing navigation pins.."),g&&e.navigation.changeStartPinImg(g),I&&e.navigation.changeEndPinImg(I))},e.resetNavigationPins=function(){e.navigation&&(e.navigation.resetStartPinImg(),e.navigation.resetEndPinImg())},e.resetCurrentLocation=function(){e.userPinTooltip.resetUserLocation()},e.setCurrentMobileUserLocation=function(A,g,I){var C;C=o.isNumber(I)?cA(I):lA(e.currentLevel),e.user?e.user.resetUserLocation():e.user=new m,e.user.init(A,g,C.no),e.user.show()},e.showCurrentMobileUserLocation=function(){if(e.user){var A=e.user.getUserLocationFloorNumber();e.switchLevelToNumber(A),e.user.zoom()}},e.moveCurrentMobileUserLocation=function(A,g){if(e.user){var I;I=o.isNumber(g)?cA(g):lA(e.currentLevel);try{return e.user.changeUserLocationPoint(A,I.no),!0}catch(A){return e.error(A),!1}}},e.resetCurrentMobileUserLocation=function(){e.user&&e.user.resetUserLocation()},e.listenToAnimate=function(A){e.navigation.setAnimationListener(A)},e.showNavigation=function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];try{return e.navigation.init(A),e.navigation.show(g,I,C),!0}catch(A){return e.error(A),!1}},e.showNavigationWithMultiple=function(A){var g=arguments.length>1&&void 0!==arguments[1]&&arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!o.isArray(A))return!1;try{var n=o.cloneDeep(A[t]);if(!n)return!0;e.statics.multipleNavigation={navigationDetails:A,groupIndex:t},e.closeNavigation(!1,!1),e.navigation.onComplete((function(){e.navigation.canceled||e.showNavigationWithMultiple(A,g,I,C,t+1)}));var i=function(){setTimeout((function(){e.navigation.canceled||e.showNavigation(n.navigation,g,I,C)}),.6*v)},r="building"===n.type&&n.building;return r?(e.debug("enter location",r),e.resetCurrentMobileUserLocation(),e.enterBuilding(r,i)):e.exitBuilding(i),!0}catch(A){return e.error(A),!1}},e.startNavigation=function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e.debug("startNavigation: navigationDetails=",A),e.statics.restartNavigationData={navigationDetails:A,autoMode:g,zoomEnabled:I,showPins:C};var t=e.isMultiBuilding();return t?e.showNavigationWithMultiple(A,g,I,C):e.showNavigation(A,g,I,C)},e.getNavigationDetails=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,g=e.statics.multipleNavigation,I=g.navigationDetails,C=g.groupIndex;return I&&I[C+A]},e.prevLevelId=function(){if(!e.navigation.canceled){var A=e.navigation.getFloorNo(-1);if(!o.isUndefined(A)){var g=cA(A);return g&&g.id}if(e.isMultiBuilding()){var I=e.getNavigationDetails(-1);if(e.debug("self.prevLevelId: prevDetails=",I),!I)return;var C={};if("outdoor"===I.type)C.isOutdoor=!0;else{var t=o.last(I.navigation.direction);C.building=I.building,C.no=t}var n=oA(C);return e.debug("self.prevLevelId: level=",n,"filter=",C),n&&n.id}}},e.hasPrevNavigate=function(){return!!e.prevLevelId()},e.prevNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.navigation.isOnFirstNavigationFloor();C?e.prevBuildingNavigate(A,g,I):e.navigation.showOnPrev(A,g,I)}},e.prevBuildingId=function(){if(!e.navigation.canceled&&e.isMultiBuilding()){var A=e.getNavigationDetails(-1);return A&&("outdoor"===A.type?A.type:A.building)}},e.hasPrevBuildingNavigate=function(){return!!e.prevBuildingId()},e.prevBuildingNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.statics.multipleNavigation,t=C.navigationDetails,n=C.groupIndex,i=n-1;t[i]&&e.showNavigationWithMultiple(t,A,g,I,i,!0)}},e.nextLevelId=function(){if(!e.navigation.canceled){var A=e.navigation.getFloorNo(1);if(!o.isUndefined(A)){var g=cA(A);return g&&g.id}if(e.isMultiBuilding()){var I=e.getNavigationDetails(1);if(e.debug("self.nextLevelId: nextDetails=",I),!I)return;var C={};if("outdoor"===I.type)C.isOutdoor=!0;else{var t=o.first(I.navigation.direction);C.building=I.building,C.no=t}var n=oA(C);return e.debug("self.nextLevelId: level=",n,"filter=",C),n&&n.id}}},e.hasNextNavigate=function(){return!!e.nextLevelId()},e.nextNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.navigation.isOnLastNavigationFloor();C?e.nextBuildingNavigate(A,g,I):e.navigation.showOnNext(A,g,I)}},e.nextBuildingId=function(){if(e.navigation.canceled||!e.isMultiBuilding())return!1;var A=e.getNavigationDetails(1);return A&&("outdoor"===A.type?A.type:A.building)},e.hasNextBuildingNavigate=function(){return!!e.nextBuildingId()},e.nextBuildingNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.statics.multipleNavigation,t=C.navigationDetails,n=C.groupIndex,i=n+1;t[i]&&e.showNavigationWithMultiple(t,A,g,I,i,!0)}},e.closeNavigation=function(){var A=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];C.navigation.removePathAnimations(),C.navigation.setAutoMode(!1),C.navigation.removeEscalatorAnimation(),C.navigation.activeFloor=null,C.navigation.canceled=g,A&&e.resetLevel(),g&&(e.statics.restartNavigationData=null,e.$el.trigger("navigationCancelled"))},e.restartNavigation=function(){var A=e.o.cssAnimation?e.o.cssAnimationTime:.1*v,g=e.statics.restartNavigationData||{},I=g.navigationDetails,C=g.autoMode,t=g.zoomEnabled,n=g.showPins;I?setTimeout((function(){e.closeNavigation(!0,!1),e.startNavigation(I,C,t,n)}),A):e.error("restartNavigation: restartNavigationData not found")},e.mto=function(A,g,I,C,t,e){$(A,g,I,C,t,e)},e.zto=function(A,g,I,C,t){_(A,g,I,C,t)},e.calculateSP=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto",C=e.data,t=C.levels,n=C.nodes,i=C.paths;return Array.isArray(t)&&Array.isArray(n)&&Array.isArray(i)?c(A,g,{levels:t,nodes:n,paths:i},I):(e.error("Required levels, nodes or paths in data"),null)},e.calculateSP_v1=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";return e.calculateSP(A,g,I)},e.calculateSP_v2=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto",C=e.data,t=C.nodes,n=C.paths;return Array.isArray(t)&&Array.isArray(n)?u(A,g,{nodes:t,paths:n},I):(e.error("Required nodes or paths in data"),null)},e.enterBuilding=function(A,g){A?setTimeout((function(){e.debug("enterBuilding: buildingId=",A),z({building:A}),g&&g()}),.3*v):e.debug("enterBuilding:buildingId required!")},e.exitBuilding=function(g){e.debug("exitBuilding: go to outdoor"),A.nextTick((function(){z({isOutdoor:!0}),g&&g()}))}};g.extend(g.easing,{def:"easeOutQuad",swing:function(A,I,C,t,e){return g.easing[g.easing.def](A,I,C,t,e)},easeOutQuad:function(A,g,I,C,t){return-C*(g/=t)*(g-2)+I},easeOutCubic:function(A,g,I,C,t){return C*((g=g/t-1)*g*g+1)+I},easeInOutCubic:function(A,g,I,C,t){return(g/=t/2)<1?C/2*g*g*g+I:C/2*((g-=2)*g*g+2)+I}}),g.fn.svgMap=function(A){return this.each((function(){var C=g(this);if(!C.data("svg-map")){var t=new I(C);o.get(A,"immediate",!0)?(console.log("immediate, call init"),t.init(A)):console.log("no immediate, wait for levels to be added"),C.data("svg-map",t)}}))}}}.call(this,I(/*! ./../node_modules/process/browser.js */8))},
|
|
161
|
+
/*! ModuleConcatenation bailout: Module uses injected variables (process) */function(A,g,I){"use strict";I.r(g),function(A){var C=I(/*! @babel/runtime/helpers/classCallCheck */2),t=I.n(C),e=I(/*! @babel/runtime/helpers/createClass */3),n=I.n(e),i=I(/*! @babel/runtime/helpers/typeof */5),r=I.n(i),a=I(/*! gsap */4),o=I(/*! lodash */1),s=(I(/*! ../assets/map/map.css */11),I(/*! hammerjs */60)),l=I(/*! imports-loader?define=>false!jquery-mousewheel */61),c=I(/*! ./sp/v1 */62),u=I(/*! ./sp/v2 */65),v=1e3;g.default=function(g){l(g);var I=function(I){var C=this,e=this;e.statics={restartNavigationData:null,multipleNavigation:{navigationDetails:null,groupIndex:0}},e.o={locale:{language:"en",availableLanguages:["en","tr","ru","ar","kz","it"]},mode:"default",locationCannotBeSelected:null,helperTexts:{youAreHere:"You are here"},strokeOptions:{width:8,color:"#000"},animation:{speedFactor:8,frequencyFactor:8,mode:"line",debugContainer:"#navigation-debugger",availableModes:["line","dot","arrow","foot","feet"],pointModes:["dot","arrow"],stackAnimation:!1},selector:"[id^=stores] > *",serviceSelector:"[id^=services] > *",rotateServices:!1,rotatable90PathSelector:"[id^=deg-90] > *",rotatable180PathSelector:"[id^=deg-180] > *",rotatable270TextSelector:"[id^=texts-vertical] > *",rotatable180TextSelector:"[id^=texts-horizontal] > *",rectSelector:"[id^=rects] > *",noPointerGroupSelector:"g[id^=nopointer]",stackMode:{enabled:!1,offset:10,switchFloorTime:5*v},draggable:!0,landmark:!1,mapFill:!1,height:420,zoomToSelected:!0,rotatable:!1,action:"tooltip",hoverTip:!0,tooltip:{enabled:!0,navigation:!1,detail:!1,enterBuilding:!1,renderTemplate:!1},smartip:!0,fillColor:"",developer:!1,mouseWheel:!0,maxScale:4,animationScale:1.5,cssAnimation:!0,cssAnimationTime:v,zoom:!0,textOnRect:{enabled:!0,fontFamily:"sans-serif",fontSize:24,maxFontSize:48,minFontSize:16,mode:"dynamic",availableModes:["static","dynamic"]},beaconMode:!1,initialScaleFactor:1},e.$el=I,e.contentWidth={},e.contentHeight={},e.fitscale={},e.offsetDueToRotation=0,e.offsetCoefficient={},e.callbackMapReady=null,e.addLevel=function(A){e.levels=e.levels||[],e.levels.push(A)},e.debug=function(){var A;(A=e.logger).debug.apply(A,arguments)},e.log=function(){var A;(A=e.logger).log.apply(A,arguments)},e.error=function(){var A;(A=e.logger).error.apply(A,arguments)},e.init=function(A){var g=A.data;A.data=null,e.isMultiBuilding=function(){return!!g.buildings&&!!g.buildings.length},e.getNodes=function(){return g.nodes},e.getPaths=function(){return g.paths},e.getLevels=function(){return g.levels},e.logger=new i(e.o.developer||A.developer),e.debug("init:",o.get(A,"tooltip"));var I=o.get(A,"tooltip");o.isBoolean(I)?(A.tooltip=e.o.tooltip,A.tooltip.enabled=I):o.isBoolean(o.get(A,"tooltip.enabled"))||(A.tooltip=A.tooltip||e.o.tooltip,A.tooltip.enabled=!0);var C=o.get(A,"textOnRect");o.isBoolean(C)?(A.textOnRect=e.o.textOnRect,A.textOnRect.enabled=C):(o.isBoolean(o.get(A,"textOnRect.enabled"))||(A.textOnRect=A.textOnRect||e.o.textOnRect,A.textOnRect.enabled=!0),A.textOnRect.mode?o.includes(e.o.textOnRect.availableModes,A.textOnRect.mode)||(e.debug("init: textOnRect mode selected NOT AVAILABLE, switching to default.."),A.textOnRect.mode=e.o.textOnRect.mode):A.textOnRect.mode=e.o.textOnRect.mode,"dynamic"===A.textOnRect.mode?A.textOnRect.fontSize||(A.textOnRect.fontSize=e.o.textOnRect.fontSize):"static"===A.textOnRect.mode&&(A.textOnRect.maxFontSize||(A.textOnRect.maxFontSize=e.o.textOnRect.maxFontSize),A.textOnRect.minFontSize||(A.textOnRect.minFontSize=e.o.textOnRect.minFontSize))),A.animation&&(A.animation.debugContainer||(A.animation.debugContainer=e.o.animation.debugContainer),A.animation.speedFactor||(A.animation.speedFactor=e.o.animation.speedFactor),A.animation.frequencyFactor||(A.animation.frequencyFactor=e.o.animation.frequencyFactor),A.animation.mode?o.includes(e.o.animation.availableModes,A.animation.mode)||(e.debug("init: Animation mode selected NOT AVAILABLE, switching to default.."),A.animation.mode=e.o.animation.mode):A.animation.mode=e.o.animation.mode,A.animation.pointModes=e.o.animation.pointModes,A.animation.availableModes=e.o.animation.availableModes);var t=o.get(A,"stackMode");if(o.isBoolean(t)?(A.stackMode=e.o.stackMode,A.stackMode.enabled=t):o.isBoolean(o.get(A,"stackMode.enabled"))||(A.stackMode=A.stackMode||e.o.stackMode,A.stackMode.enabled=!0),A.locale&&(A.locale.availableLanguages||(A.locale.availableLanguages=e.o.locale.availableLanguages),A.locale.language?o.includes(A.locale.availableLanguages,A.locale.language)||(e.debug("init: Language selected NOT AVAILABLE, switching to default.."),A.locale.language=e.o.locale.language):A.locale.language=e.o.locale.language),o.assignInWith(e.o,A,(function A(g,I){return void 0!==g&&void 0!==I&&"object"===r()(g)&&"object"===r()(I)?(o.assignWith(g,I,A),g):o.isUndefined(I)?g:I})),e.debug("init: map options",e.o),!e.o.animation.stackAnimation||e.o.stackMode.enabled)return e.x=0,e.y=0,e.scale={},g.levels.forEach((function(A){e.scale[A.id]=1})),e.rotation=0,e.debug("init: SETTING CONTAINER HEIGHT AS ".concat(e.o.height)),e.$el.addClass("svg-map-element svg-map-loading").height(e.o.height),e.o.landmark=!!g.landmark,e.o.landmark&&(e.o.hoverTip=!1,e.o.action="tooltip"),e.o.id?(o.isNumber(e.o.rotate)?(e.o.rotate=e.o.rotate%360,e.o.rotate%90&&(e.o.rotate=0)):e.o.rotate=0,setTimeout((function(){if(e.debug("init: LOADING SVG MAP.."),g.levels&&g.levels.length)e.debug("init: levels already ready");else{if(e.debug("init: levels submitted beforehand"),!e.levels||!e.levels.length)return void e.error("init: levels should be submitted beforehand!");g.levels=e.levels}P(g)}),.1*v),e):(e.$el.removeClass("svg-map-loading").addClass("svg-map-error"),void e.error("Map is not set! [svg-map] parameters must contain an id attribute."));e.error("if you want to use stackAnimation. You need to enable stackMode !")};var i=function(){function A(){var g=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t()(this,A),this.debugMode=g}return n()(A,[{key:"log",value:function(){var A;(A=console).log.apply(A,arguments)}},{key:"debug",value:function(){var A;this.debugMode&&(A=console).log.apply(A,arguments)}},{key:"error",value:function(){var A;(A=console).error.apply(A,arguments)}}]),A}(),l=function(){function A(){t()(this,A),this.tooltips=[],this.tooltips.push(new p)}return n()(A,[{key:"init",value:function(){o.each(this.tooltips,(function(A){A.init()}))}},{key:"show",value:function(A,g){var I,C=this;if((I=Array.isArray(A)?A:[A]).length){var t=this.tooltips.splice(0,this.tooltips.length-1);e.debug("TooltipContainer: TOOLTIP LENGTH TO REMOVE=",t.length,"TOOLTIP LENGTH NOW=",this.tooltips.length),o.each(t,(function(A){A.remove()}));var n=1===I.length,i=0;o.each(I,(function(A){if(!i)return e.debug("TooltipContainer: FIRST TOOLTIP"),C.tooltips[i].show(A,g,n),void i++;e.debug("TooltipContainer: OTHER TOOLTIP, ",i);var I=new p;I.init(),C.tooltips.push(I),I.show(A,g,n),i++}))}}},{key:"hide",value:function(){e.debug("TooltipContainer: tooltip hided"),o.each(this.tooltips,(function(A){A.hide()}))}},{key:"position",value:function(){o.each(this.tooltips,(function(A){A.position()}))}},{key:"updateLocalized",value:function(A){o.each(this.tooltips,(function(g){g.updateLocalized(A)}))}},{key:"getOneLocation",value:function(){return o.get(this.tooltips[0],"location")}}]),A}(),p=function(){function A(){t()(this,A),this.$el=null,this.shift=6,this.drop=0,this.location=null}return n()(A,[{key:"init",value:function(){var A=this;if(e.debug("Tooltip: INIT"),e.o.tooltip.renderTemplate)this.$el=g(g.parseHTML(e.o.tooltip.renderTemplate)),this.$title=this.$el.find("#svg-map-tooltip-title"),this.$content=this.$el.find("#svg-map-tooltip-content"),e.o.tooltip.navigation&&(this.$navigation=this.$el.find("#svg-map-tooltip-navigation-button")),e.o.tooltip.detail&&(this.$detail=this.$el.find("#svg-map-tooltip-detail-button")),this.$logo=this.$el.find("#svg-map-tooltip-logo"),this.$facade=this.$el.find("#svg-map-tooltip-facade"),this.$floor=this.$el.find("#svg-map-tooltip-category"),this.$close=this.$el.find("#svg-map-tooltip-close");else{this.$el=g("<div/>").addClass("svg-map-tooltip");var I=!e.o.landmark;I&&(this.$close=g("<a/>").addClass("svg-map-tooltip-close").attr("href","#").appendTo(this.$el)),this.$content=g("<div/>").addClass("svg-map-tooltip-content").addClass(I?"":"svg-map-tooltip-landmarkmode").appendTo(this.$el),this.$title=g("<h4/>").addClass("svg-map-tooltip-title").appendTo(this.$content),!e.o.landmark&&e.o.tooltip.enabled&&(e.o.tooltip.navigation&&(this.$navigation=g("<a/>").addClass("svg-map-tooltip-navigation-button").attr("href","#"),e.o.tooltip.navigation.image?this.$navigation.append(g("<img/>",{src:e.o.tooltip.navigation.image})).append(g("<span/>",{text:e.o.tooltip.navigation.text})):this.$navigation.text(e.o.tooltip.navigation.text),this.$navigation.appendTo(this.$content)),e.o.tooltip.detail&&(this.$detail=g("<a/>",{text:e.o.tooltip.detail.text||"DETAIL"}).addClass("svg-map-tooltip-detail-button").attr("href","#").attr("type","button").appendTo(this.$content)),e.isMultiBuilding()&&e.o.tooltip.enterBuilding&&(this.$enterBuilding=g("<a/>",{text:e.o.tooltip.enterBuilding.text||"ENTER"}).addClass("svg-map-tooltip-enter-building-button").attr("href","#").attr("type","button").appendTo(this.$content)))}this.$navigation&&this.$navigation.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("navigationClicked",[A.$navigation,A.location.id])})),this.$detail&&this.$detail.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("detailClicked",[A.$detail,A.location.id])})),this.$enterBuilding&&this.$enterBuilding.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("enterBuildingClicked",[A.$enterBuilding,A.location.buildingId,A.location.id])})),this.$close&&this.$close.on("click touchend",(function(A){A.preventDefault(),e.hideLocation(),e.o.zoom||$(.5,.5,1,1.2*v,"easeInOutCubic"),e.$el.trigger("closeClicked",[this.$close])})),this.$triangle=g("<div/>").addClass("svg-map-tooltip-triangle").prependTo(this.$el),e.$map.append(this.$el)}},{key:"show",value:function(A,g){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];A&&"kiosk"!==A.type&&(this.location=A,e.hoverTip&&e.hoverTip.hide(),this.$title.text(fA(A)),this.$detail&&this.$detail.text(e.o.tooltip.detail.text||"DETAIL"),this.$enterBuilding&&(this.$enterBuilding.text(e.o.tooltip.enterBuilding.text||"ENTER"),"building"===A.type?this.$enterBuilding.show():this.$enterBuilding.hide()),this.$logo&&(A.logo?(this.$logo.show(),this.$logo.attr("src",A.logo)):this.$logo.hide()),this.$facade&&(A.facade?(this.$facade.show(),this.$facade.attr("src",A.facade)):this.$facade.hide()),this.$floor&&this.$floor.text(o.get(A.floor,e.o.locale.language,"")),this.$content[0].scrollTop=0,this.shift=20,this.position(),this.$el.stop().show(),this.$el.css({opacity:1}),I&&this.zoom(A,g))}},{key:"position",value:function(){if(this.location){e.debug("POSITION TOOLTIP FOR LOCATION ID:"+this.location.id);var A=e.$map.offset().left+e.$map.width()*dA(this.location)-e.$container.offset().left,g=e.$map.offset().top+e.$map.height()*hA(this.location)-e.$container.offset().top,I=100*dA(this.location),C=100*hA(this.location),t=-this.$el.outerHeight()-(e.o.landmark?.75*this.shift:this.shift),n=-this.$el.outerWidth()/2;if(e.o.smartip){var i=.5;Math.abs(t)>g?(t=10,this.$el.addClass("svg-map-bottom")):this.$el.removeClass("svg-map-bottom"),this.$el.outerWidth()/2>A?i=.5-(this.$el.outerWidth()/2-A)/this.$el.outerWidth():e.$container.width()-A-this.$el.outerWidth()/2<0&&(i=.5+(A+this.$el.outerWidth()/2-e.$container.width())/this.$el.outerWidth()),i=Math.max(0,Math.min(1,i)),n=-this.$el.outerWidth()*i,this.$triangle.css("left",Math.max(5,Math.min(95,100*i))+"%")}this.$el.css({left:I+"%",top:C+"%",marginTop:t,marginLeft:n}),this.drop=this.$el.outerHeight()+this.shift}}},{key:"zoom",value:function(A,g){if(!e.o.zoomToSelected)return e.debug("Tooltip: NO ZOOM REQUIRED"),void $(.5,.5,1,1.2*v,"easeInOutCubic");var I=A.zoom?parseFloat(A.zoom):e.o.maxScale,C=((e.$container.height()-this.drop)/2+this.drop)/e.$container.height();$(dA(A),hA(A),I,g||1.2*v,"easeInOutCubic",C)}},{key:"hide",value:function(){var A=this;this.location=null,this.$el.stop().fadeOut(.3*v,(function(){e.o.tooltip.enabled&&e.o.tooltip.navigation&&A.$navigation&&(e.o.tooltip.navigation.image?A.$navigation.find("span").text(e.o.tooltip.navigation.text):A.$navigation.text(e.o.tooltip.navigation.text))}))}},{key:"updateLocalized",value:function(A){A.navigationText&&this.$navigation&&(e.o.tooltip.navigation.text=A.navigationText,e.o.tooltip.navigation.image?this.$navigation.find("span").text(A.navigationText):this.$navigation.text(A.navigationText)),A.closeText&&this.$close&&this.$close.text(A.closeText),A.detailText&&this.$detail&&(e.o.tooltip.detail.text=A.detailText,this.$detail.text(A.detailText)),A.enterBuildingText&&(e.o.tooltip.enterBuilding.text=A.enterBuildingText,this.$enterBuilding&&this.$enterBuilding.text(A.enterBuildingText)),A.floorText&&this.$floor.text(A.floorText)}},{key:"remove",value:function(){this.location=null,this.$el.stop().remove(),this.$el=null}}]),A}(),f=function(){function A(){t()(this,A),this.$el=null,this.shift=6}return n()(A,[{key:"init",value:function(){var A=this;this.$el=g("<div/>").addClass("svg-map-tooltip svg-map-hovertip"),this.$title=g("<h4/>").addClass("svg-map-tooltip-title").appendTo(this.$el),this.$triangle=g("<div/>").addClass("svg-map-tooltip-triangle").appendTo(this.$el),e.o.selector&&g(e.$map).on("mouseover",e.o.selector,(function(){if(!e.navigation.animationStarted()){var I=rA(g(this).attr("id"));A.shift=20,I&&A.show(I)}})).on("mouseout",(function(){A.hide()})),e.o.serviceSelector&&g(e.$map).on("mouseover",e.o.serviceSelector,(function(){if(!e.navigation.animationStarted()){var I=aA(g(this).attr("id"));A.shift=20,I&&A.show(I)}})).on("mouseout",(function(){A.hide()})),e.$map.append(this.$el)}},{key:"show",value:function(A){A&&"kiosk"!==A.type&&(this.$el.removeClass("svg-map-service-hovertip"),A&&"service"===A.type&&this.$el.addClass("svg-map-service-hovertip"),e.tooltip&&e.tooltip.getOneLocation()!==A&&(this.$title.text(fA(A)),this.position(A),this.$el.stop().fadeIn(.1*v)))}},{key:"position",value:function(A){var g,I=e.$map.offset().left+e.$map.width()*dA(A)-e.$container.offset().left,C=e.$map.offset().top+e.$map.height()*hA(A)-e.$container.offset().top,t=100*dA(A),n=100*hA(A),i=-this.$el.outerHeight()-this.shift,r=.5;Math.abs(i)>C?(i=10,this.$el.addClass("svg-map-bottom")):this.$el.removeClass("svg-map-bottom"),this.$el.outerWidth()/2>I?r=.5-(this.$el.outerWidth()/2-I)/this.$el.outerWidth():e.$container.width()-I-this.$el.outerWidth()/2<0&&(r=.5+(I+this.$el.outerWidth()/2-e.$container.width())/this.$el.outerWidth()),g=-this.$el.outerWidth()*r,this.$triangle.css("left",Math.max(10,Math.min(90,100*r))+"%"),this.$el.css({left:t+"%",top:n+"%",marginTop:i,marginLeft:g})}},{key:"hide",value:function(){this.$el.stop().fadeOut(.2*v)}}]),A}(),d=function(){function A(){t()(this,A),this.$el=null,this.$animationDebugContainer=null}return n()(A,[{key:"init",value:function(){this.$el=g("<div/>").addClass("svg-map-coordinates").appendTo(e.$container),this.$el.append("x: "),g("<code/>").addClass("svg-map-coordinates-x").appendTo(this.$el),this.$el.append(" y: "),g("<code/>").addClass("svg-map-coordinates-y").appendTo(this.$el),g(".svg-map-layer",e.$map).on("mousemove",(function(A){var I=(A.pageX-e.$map.offset().left)/e.$map.width(),C=(A.pageY-e.$map.offset().top)/e.$map.height();g(".svg-map-coordinates-x").text(parseFloat(I).toFixed(4)),g(".svg-map-coordinates-y").text(parseFloat(C).toFixed(4))})),this.$animationDebugContainer=g("<div/>",{class:"debug-container"}),this.$animationDebugContainer.appendTo(g(e.o.animation.debugContainer));var A=g("<div/>");A.append(g("<button/>",{id:"play",text:"play"})),A.append(g("<button/>",{id:"pause",text:"pause"})),A.append(g("<button/>",{id:"reverse",text:"reverse"})),A.append(g("<button/>",{id:"resume",text:"resume"})),A.append(g("<button/>",{id:"restart",text:"restart"})),A.append(g("<button/>",{id:"close-nav",text:"close navigation"})),A.append(g("<button/>",{id:"restart-nav",text:"restart navigation"})),A.append(g("<button/>",{id:"stack-mode",text:"show stack mode"})),A.append(g("<button/>",{id:"prev-nav-step",text:"prev nav step"})),A.append(g("<button/>",{id:"next-nav-step",text:"next nav step"})),e.isMultiBuilding()&&(A.append(g("<button/>",{id:"prev-building",text:"prev building"})),A.append(g("<button/>",{id:"next-building",text:"next building"}))),this.$animationDebugContainer.append(A);var I=g("<div/>",{id:"sliderWrapper"}).append(g("<div/>",{id:"slider"}));this.$animationDebugContainer.append(I);var C=g("<div/>",{id:"navigatingTextWrapper"}).append(g("<p/>",{id:"navigatingText"}));this.$animationDebugContainer.append(C),g("#play").click((function(){e.navigation.tween&&(1!==e.navigation.tween.progress()?e.navigation.tween.play():e.navigation.tween.restart())})),g("#pause").click((function(){e.navigation.tween&&e.navigation.tween.pause()})),g("#reverse").click((function(){e.navigation.tween&&e.navigation.tween.reverse()})),g("#resume").click((function(){e.navigation.tween&&e.navigation.tween.resume()})),g("#restart").click((function(){e.navigation.tween&&e.navigation.tween.restart()})),g("#close-nav").click((function(){e.closeNavigation()})),g("#restart-nav").click((function(){e.restartNavigation()})),g("#next-nav-step").click((function(){e.nextNavigate(!0,!0,!0)})),g("#prev-nav-step").click((function(){e.prevNavigate(!0,!0,!0)})),g("#next-building").click((function(){e.nextBuildingNavigate(!0,!0,!0)})),g("#prev-building").click((function(){e.prevBuildingNavigate(!0,!0,!0)})),g("#stack-mode").click((function(){e.stackMode()}))}}],[{key:"startSlider",value:function(){var A=g("#slider");g.isFunction(A.slider)?A.slider({range:!1,min:0,max:100,step:.1,slide:function(A,g){e.navigation.tween&&(e.navigation.tween.pause(),e.navigation.tween.progress(g.value/100))}}):console.warn("DevTools: slider function not found.")}},{key:"updateSlider",value:function(){if(e.navigation.tween){var A=g("#slider");g.isFunction(A.slider)&&A.slider("value",100*e.navigation.tween.progress())}}}]),A}(),h=function(){function A(){t()(this,A),this.$userPin=null,this.$el=null,this.shift=6,this.drop=0,this.location=null,this.currentUserLocation=null}return n()(A,[{key:"show",value:function(){if(this.removeUserLocationPin(),this.isUserLocationAvailable()){var A=lA(e.currentLevel);if(A&&A.no===this.currentUserLocation.floorNo){if(!this.isUserLocationPointAvailable()){e.debug("UserPinTooltip: PATCHING..");var g=this.currentUserLocation.location;CA(g)}var I=uA(A.id);I&&this.addUserLocationPin(I)}}}},{key:"addUserLocationPin",value:function(A){A.find(".svg-map-you-are-here-hovertip").remove(),A.find(".svg-map-pin.pin-pulse").remove();var I=100*this.currentUserLocation.point.x,C=100*this.currentUserLocation.point.y,t=g("<a/>",{href:"#",class:"svg-map-pin iconpin man pin-pulse"}).css({top:C+"%",left:I+"%"}).appendTo(A);t.on("click touchend",(function(A){A.preventDefault()})),this.$userPin=t,e.debug("UserPinTooltip: ",this.$userPin),this.$el=g("<div/>").addClass("svg-map-tooltip svg-map-hovertip svg-map-you-are-here-hovertip"),this.$userPinTitle=g("<h4/>").addClass("svg-map-tooltip-title").appendTo(this.$el),this.$userPinTriangle=g("<div/>").addClass("svg-map-tooltip-triangle").appendTo(this.$el),this.$userPinTitle.text(e.o.helperTexts.youAreHere),A.append(this.$el),this.shift=50,this.position(),this.$el.stop().fadeIn(.1*v)}},{key:"updateLocalized",value:function(A){e.o.helperTexts.youAreHere=A,this.$userPinTitle&&this.$userPinTitle.text(A)}},{key:"position",value:function(){if(this.$el){var A=e.$map.offset().left+e.$map.width()*this.currentUserLocation.point.x-e.$container.offset().left,g=e.$map.offset().top+e.$map.height()*this.currentUserLocation.point.y-e.$container.offset().top,I=100*this.currentUserLocation.point.x,C=100*this.currentUserLocation.point.y,t=-this.$el.outerHeight()-this.shift,n=0;if(e.o.smartip){var i=.5;Math.abs(t)>g?(t=10,this.$el.addClass("svg-map-bottom")):this.$el.removeClass("svg-map-bottom"),this.$el.outerWidth()/2>A?i=.5-(this.$el.outerWidth()/2-A)/this.$el.outerWidth():e.$container.width()-A-this.$el.outerWidth()/2<0&&(i=.5+(A+this.$el.outerWidth()/2-e.$container.width())/this.$el.outerWidth()),i=Math.max(0,Math.min(1,i)),n=-this.$el.outerWidth()*i,this.$userPinTriangle.css("left",Math.max(5,Math.min(95,100*i))+"%")}this.$el.css({left:I+"%",top:C+"%",marginTop:t,marginLeft:n}),this.drop=this.$el.outerHeight()+this.shift}}},{key:"addUserLocationPoint",value:function(A,g,I){this.currentUserLocation=this.currentUserLocation||new b,this.currentUserLocation.addPoint(A/x(),g/w(),I)}},{key:"addUserLocation",value:function(A,g){this.currentUserLocation=new b(A,g)}},{key:"resetUserLocation",value:function(){this.removeUserLocationPin(),this.currentUserLocation=null}},{key:"isUserLocationAvailable",value:function(){return this.currentUserLocation&&this.currentUserLocation.available()}},{key:"isUserLocationPointAvailable",value:function(){return this.currentUserLocation&&this.currentUserLocation.pointAvailable()}},{key:"getUserLocationFloorNumber",value:function(){return this.currentUserLocation&&this.currentUserLocation.floorNo}},{key:"removeUserLocationPin",value:function(){e.debug(this.$userPin),this.$userPin&&this.$userPin.stop().remove(),this.$el&&this.$el.stop().remove()}}]),A}(),m=function(){function A(){t()(this,A),this.currentLocation=null,this.timelineMax=new a.b}return n()(A,[{key:"init",value:function(A,g,I){var C=bA(A,g);this.addUserLocationPoint(C.x,C.y,I)}},{key:"show",value:function(){if(this.remove(),lA(e.currentLevel).no===this.getUserLocationFloorNumber()&&this.isUserLocationAvailable()){var A=uA(e.currentLevel),I=g("<a/>",{href:"#",class:"svg-map-pin circular pin-pulse"});I.on("click touchend",(function(A){A.preventDefault()})).appendTo(A),this.$el=I;var C=100*this.currentLocation.getX(),t=100*this.currentLocation.getY();this.$el.css({top:t+"%",left:C+"%"})}}},{key:"zoom",value:function(){this.getUserLocationFloorNumber()===e.currentLevelNumber&&this.currentLocation&&$(this.currentLocation.getX(),this.currentLocation.getY(),2,.6*v,"easeInOutCubic")}},{key:"remove",value:function(){this.$el&&(this.$el.stop().remove(),this.$el=null),this.timelineMax&&this.timelineMax.progress(0).clear()}},{key:"addUserLocationPoint",value:function(A,g,I){this.currentLocation=this.currentLocation||new b,this.currentLocation.addPoint(A/x(),g/w(),I)}},{key:"changeUserLocationPoint",value:function(A,g){var I;if(A&&(I=Array.isArray(A)?A:[A]).length)if(this.getUserLocationFloorNumber()===g){if(!this.$el){var C=I.shift();e.setCurrentMobileUserLocation(C.x,C.y,this.getUserLocationFloorNumber())}var t=null;this.currentLocation&&(t={x:this.currentLocation.getX()*x(),y:this.currentLocation.getY()*w()});var n=y.convertLinesToPath(I);if(n){var i=I[I.length-1];this.init(i.x,i.y,this.getUserLocationFloorNumber());var r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",n);var a=r.getTotalLength()+150;e.debug("User: PATH LENGTH: "+a);var s=a*e.o.animation.speedFactor/4/v,l=o.map(I,(function(A){var g=bA(A.x,A.y);return{left:g.x/x()*100+"%",top:g.y/w()*100+"%"}}));t&&l.unshift({left:t.x/x()*100+"%",top:t.y/w()*100+"%"}),this.timelineMax.progress(0).clear().set(this.$el,{css:{left:l[0].left,top:l[0].top},transformOrigin:"top left"}),this.timelineMax.to(this.$el,2*s,{bezier:{type:"thru",curviness:0,values:l,autoRotate:90},ease:"easeInOutPower2"})}}else{var c=I.pop();e.setCurrentMobileUserLocation(c.x,c.y,g)}}},{key:"resetUserLocation",value:function(){this.remove(),this.currentLocation=null}},{key:"isUserLocationAvailable",value:function(){return this.currentLocation&&this.currentLocation.pointAvailable()}},{key:"getUserLocationFloorNumber",value:function(){return this.currentLocation&&this.currentLocation.floorNo}}]),A}(),b=function(){function A(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t()(this,A),this.point=null,this.location=g,this.floorNo=I}return n()(A,[{key:"addPoint",value:function(A,g,I){this.point={x:A,y:g},this.floorNo=I}},{key:"available",value:function(){return this.point||this.location}},{key:"pointAvailable",value:function(){return this.point&&o.isNumber(this.point.x)&&o.isNumber(this.point.y)}},{key:"getX",value:function(){return this.point&&this.point.x}},{key:"getY",value:function(){return this.point&&this.point.y}}]),A}(),y=function(){function A(){t()(this,A),this.routeData=[],this.activeFloors=[],this.activeFloorIndex=null,this.$startPin=null,this.$endPin=null,this.autoMode=!1,this.zoomEnabled=!0,this.showPins=!0,this.started=!1,this.canceled=!1,this.$path=null,this.tween=null,this.animationListener=null,this.onCompleteAnimation=null,this.elementSelector=".walking"}return n()(A,[{key:"init",value:function(g){if(this.routeData=[],this.activeFloors=g.direction,this.activeFloorIndex=-1,this.canceled=!1,!this.activeFloors||0===this.activeFloors.length)throw new Error("No direction found in SP");for(var I=g.floors.length,C=0;C<I;C++){var t=g.floors[C],n={no:t.no,points:[]},i=!0,r=!1,a=void 0;try{for(var o,s=t.lines[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value;n.points.push({x:l.x1,y:l.y1})}}catch(A){r=!0,a=A}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}var c=t.lines[t.lines.length-1];if(n.points.push({x:c.x2,y:c.y2}),n.level_changer=c.level_changer,n.path=A.convertLinesToPath(n.points),!n.path)throw new Error("Path cannot be calculated of floor:"+t.no);this.routeData.push(n)}"dot"===e.o.animation.mode?this.elementSelector=".circle.walking":"arrow"===e.o.animation.mode?this.elementSelector=".arrow.walking":"foot"===e.o.animation.mode?this.elementSelector="img.foot":"feet"===e.o.animation.mode&&(this.elementSelector="img.foot")}},{key:"setAutoMode",value:function(A){this.autoMode=!!A}},{key:"addEscalatorAnimation",value:function(){var A=this;1!==this.activeFloors.length&&this.routeData.forEach((function(g){if(A.activeFloors[A.activeFloors.length-1]!==g.no){var I=cA(g.no),C=uA(I.id);0===e.navigation.navigationWay()?C.addClass("escalator-up"):C.addClass("escalator-down")}}))}},{key:"removeEscalatorAnimation",value:function(){var A=this;this.routeData&&this.routeData.forEach((function(g){if(A.activeFloors[A.activeFloors.length-1]!==g.no){var I=cA(g.no);uA(I.id).removeClass("escalator-up").removeClass("escalator-down")}}))}},{key:"setParams",value:function(A,g,I){this.autoMode=A,this.zoomEnabled=g,this.showPins=I}},{key:"show",value:function(A,g,I){this.setParams(A,g,I),this.advanceToNextFloor()}},{key:"navigationEvent",value:function(){var A=this.activeFloorIndex,I=this.routeData[A],C={prevLevelId:e.prevLevelId(),currentLevelId:e.currentLevel,nextLevelId:e.nextLevelId(),isStartFloor:this.isOnFirstNavigationFloor(),isEndFloor:this.isOnLastNavigationFloor(),levelChanger:I.level_changer};if(C.hasPrevNavigate=!!C.prevLevelId,C.hasNextNavigate=!!C.nextLevelId,e.isMultiBuilding()&&(C.prevBuildingId=e.prevBuildingId(),C.nextBuildingId=e.nextBuildingId(),C.hasPrevBuildingNavigate=!!C.prevBuildingId,C.hasNextBuildingNavigate=!!C.nextBuildingId),e.$el.trigger("navigation",C),e.o.developer){var t=Object.keys(C).map((function(A){return"".concat(A,"=").concat(C[A])}));g("#navigatingText").text(t.join(" | "))}}},{key:"showOnNext",value:function(A,g,I){var C=this;this.setParams(A,g,I);var t=this.getAdvanceToNextFloorIndex();setTimeout((function(){C.showOnLevelByLevelIndex(t)}),v)}},{key:"showOnPrev",value:function(A,g,I){var C=this;this.setParams(A,g,I);var t=this.getAdvanceToPrevFloorIndex();setTimeout((function(){C.showOnLevelByLevelIndex(t)}),v)}},{key:"showOnLevelByLevelNo",value:function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=o.findIndex(this.routeData,{no:A});return this.showOnLevelByLevelIndex(I,g)}},{key:"showOnLevelByLevelIndex",value:function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.debug("Navigation.showOnLevelByLevelIndex: floorIndex=",A,"canceled=",this.canceled),!this.canceled){var I=this.routeData[A];if(I)if(this.activeFloorIndex!==A){var C=cA(I.no);if(g){if(e.o.animation.stackAnimation&&e.o.stackMode.enabled&&!e.stackModeActive)return void e.stackMode(C.id,this.autoMode);zA(C,!0)}this.activeFloorIndex=A;var t=I.path;e.tooltip&&e.tooltip.hide(),this.removePathAnimations(),this.navigationEvent(),this.animatePathOnLevel(t,I.points,{end_floor:I.end_floor,level_changer:I.level_changer||I.node_level_changer}),this.started=!0}else e.debug("Navigation.showOnLevelByLevelIndex: ACTIVE FLOOR SP ALREADY SHOWN",this.activeFloorIndex,A);else e.debug("Navigation.showOnLevelByLevelIndex: NO ROUTE DATA")}}},{key:"animationStarted",value:function(){return this.started}},{key:"removePathAnimations",value:function(){this.tween&&(this.tween.pause(),this.tween.remove&&this.tween.remove(),this.tween=null),this.$path&&(this.$path.stop().remove(),this.$path=null),g(this.elementSelector).stop().remove(),this.removeStartPin(),this.removeEndPin(),this.started=!1}},{key:"addStartPin",value:function(A){if(this.showPins){this.removeStartPin();var I=bA(A.x,A.y),C=uA(e.currentLevel),t=I.x/x()*100,n=I.y/w()*100,i=g("<a/>",{href:"#",class:"svg-map-pin green-start pin-pulse"}).css({top:n+"%",left:t+"%"}).appendTo(C);i.on("click touchend",(function(A){A.preventDefault()})),this.$startPin=i}}},{key:"removeStartPin",value:function(){this.$startPin&&this.$startPin.stop().remove()}},{key:"addEndPin",value:function(A){if(this.showPins){this.removeEndPin();var I=bA(A.x,A.y),C=uA(e.currentLevel),t=I.x/x()*100,n=I.y/w()*100,i=g("<a/>",{href:"#",class:"svg-map-pin red-end pin-pulse"}).css({top:n+"%",left:t+"%"}).appendTo(C);i.on("click touchend",(function(A){A.preventDefault()})),this.$endPin=i}}},{key:"removeEndPin",value:function(){this.$endPin&&this.$endPin.stop().remove()}},{key:"changeStartPinImg",value:function(A){this.$startPin&&this.$startPin.css("background-image",'url("'.concat(A,'")'))}},{key:"resetStartPinImg",value:function(){this.$startPin&&this.$startPin.css("background-image","")}},{key:"changeEndPinImg",value:function(A){this.$endPin&&this.$endPin.css("background-image",'url("'.concat(A,'")'))}},{key:"resetEndPinImg",value:function(){this.$endPin&&this.$endPin.css("background-image","")}},{key:"isOnFirstNavigationFloor",value:function(){return this.activeFloors&&0===this.activeFloorIndex}},{key:"isOnLastNavigationFloor",value:function(){return this.activeFloors&&this.activeFloorIndex===this.activeFloors.length-1}},{key:"getFloorNo",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.activeFloors&&this.activeFloors[this.activeFloorIndex+A]}},{key:"navigationWay",value:function(){return this.activeFloors[0]>this.activeFloors[1]?1:0}},{key:"animatePathOnLevel",value:function(A,I,C){var t=this;e.debug("Navigation.animatePathOnLevel: pathString=",A,"| points=",I);var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d",A);var i=n.getTotalLength()+150,r=i*e.o.animation.speedFactor/v;e.debug("Navigation.animatePathOnLevel: PATH LENGTH="+i,"ANIMATION DURATION="+r);var s=vA(e.currentLevel),l=uA(e.currentLevel),c=16/e.o.animation.frequencyFactor,u=16/e.o.animation.speedFactor;e.debug("Navigation.animatePathOnLevel: COEFFICIENT FOR ANIMATION=".concat(c," | COEFFICIENT FOR SPEED=").concat(u));var p=[],f=[],h={left:null,right:null},m=r*c;if(e.debug("Navigation.animatePathOnLevel: POINT LENGTH ".concat(m," or ARRAY LENGTH ").concat(I.length)),t.$path=g(n),t.$path.attr({class:"line",fill:"none"}).css({stroke:e.o.strokeOptions.color,strokeWidth:e.o.strokeOptions.width,strokeMiterlimit:e.o.strokeOptions.width/2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:i}).appendTo(s),"line"===e.o.animation.mode)t.$path.addClass("navigation-line-animation");else if(o.includes(e.o.animation.pointModes,e.o.animation.mode))for(var b=0;b<r*c*100;b++)p.push(g("<a/>",{class:t.elementSelector.split(".").join(" ")}));else if("foot"===e.o.animation.mode)h.left=g("<img/>",{class:"foot foot-left"}),h.right=g("<img/>",{class:"foot foot-right"});else if("feet"===e.o.animation.mode)for(var y=0;y<r*c;y++)f.push(g("<img/>",{class:"foot"}));function z(){e.debug("Navigation.animatePathOnLevel: ANIMATION COMPLETE");var A=t.getAdvanceToNextFloorIndex();A>=0&&t.autoMode&&t.started?setTimeout((function(){t.showOnLevelByLevelIndex(A)}),v):-1===A&&t.autoMode&&t.onCompleteAnimation&&t.onCompleteAnimation()}function P(A,g,I){A&&g&&A.from(g,I,{css:{top:"-=30%",opacity:0},ease:Bounce.easeOut})}setTimeout((function(){var A=n.getBBox();e.debug("Navigation.animatePathOnLevel: PATH BBOX=",A);var g={x:A.x+A.width/2,y:A.y+A.height/2};if(g={x:(g=bA(g.x,g.y)).x/x(),y:g.y/w()},t.zoomEnabled&&$(g.x,g.y,e.o.animationScale,.6*v,"easeInOutCubic"),t.isOnFirstNavigationFloor()&&t.addStartPin(I[0]),t.isOnLastNavigationFloor()&&t.addEndPin(I[I.length-1]),e.o.developer&&d.startSlider(),t.tween=new a.b({onUpdate:e.o.developer?d.updateSlider:function(){}}),o.includes(e.o.animation.pointModes,e.o.animation.mode)){e.debug("Navigation.animatePathOnLevel: OF POINTS IN ANIMATION=".concat(p.length));for(var C=0;C<p.length;C++)l.append(p[C]);var i=o.map(I,(function(A){return{left:((A=bA(A.x,A.y)).x-p[0].width()/2)/x()*100+"%",top:(A.y-p[0].height()/2)/w()*100+"%"}})),s=.5/u;e.debug("Navigation.animatePathOnLevel: STAGGER TIME=".concat(s)),t.tween.progress(0).clear().set(t.elementSelector,{css:{left:i[0].left,top:i[0].top,opacity:0},transformOrigin:"top left"}),t.isOnFirstNavigationFloor()&&P(t.tween,t.$startPin,1),t.isOnLastNavigationFloor()&&P(t.tween,t.$endPin,1),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:1},ease:"linear"},s);var c=t.tween.duration(),b=r/2,y=s*(p.length-1);t.tween.staggerTo(t.elementSelector,b,{bezier:{type:"thru",curviness:0,values:i,autoRotate:"arrow"===e.o.animation.mode?0:90},ease:"linear"},s,"-=".concat(y)),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:0},ease:"linear"},s,"-=".concat(y)),e.debug("Navigation.animatePathOnLevel: that.tween.duration()=",t.tween.duration()),setTimeout((function(){z()}),(c/100+2)*v)}else if("foot"===e.o.animation.mode){e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES..");var R=a.a.config(I.length);l.append(h.left),l.append(h.right);var M=o.map(I,(function(A){return{left:(A.x-h.left.width()/2)/x()*100+"%",top:(A.y-h.left.height()/2)/w()*100+"%"}})),Z=.5/u;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",M,"STAGGER TIME ".concat(Z)),t.tween.progress(0).clear().set(t.elementSelector,{css:{left:M[0].left,top:M[0].top,opacity:0}}),t.tween.to(h.left,.5,{autoAlpha:1,ease:"linear"},Z),t.tween.to(h.right,.5,{autoAlpha:1,ease:"linear"},Z);var D=r/2,T=Z*(m-1)-D;T<0&&(T=Z),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(T)),t.tween.to(h.left,D,{bezier:{type:"thru",curviness:0,values:M,autoRotate:90},transformOrigin:"50% -50%",ease:R},Z),t.tween.to(h.right,D,{bezier:{type:"thru",curviness:0,values:M,autoRotate:90},transformOrigin:"50% -50%",ease:R},1.5*Z);var O=t.tween.duration();setTimeout((function(){z()}),(O+2)*v)}else if("feet"===e.o.animation.mode){var j=a.a.config(I.length);e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES... | OF FOOT IN ANIMATION: ".concat(f.length));for(var N=0;N<f.length;N++)l.append(f[N]);var E=o.map(I,(function(A){return{left:(A.x-f[0].width()/2)/x()*100+"%",top:(A.y-f[0].height()/2)/w()*100+"%"}})),G=.5/u;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",E,"STAGGER TIME ".concat(G)),t.tween.progress(0).clear().set(t.elementSelector,{css:{left:E[0].left,top:E[0].top,opacity:0}}),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:1},ease:"linear"},G);var X=r/2,H=G*(f.length-1)-X,k=G*(f.length-1);H<0&&(H=G),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(H)),t.tween.staggerTo(t.elementSelector,X,{bezier:{type:"thru",curviness:0,values:E,autoRotate:90},ease:j,repeatDelay:H},G,"-=".concat(k)),t.tween.staggerTo(t.elementSelector,.1,{css:{opacity:0},ease:"linear"},G,"-=".concat(k));var Y=t.tween.duration();setTimeout((function(){z()}),(Y+2)*v)}else t.isOnFirstNavigationFloor()&&P(t.tween,t.$startPin,1.5),t.isOnLastNavigationFloor()&&P(t.tween,t.$endPin,1.5),t.tween.to(t.$path,r,{strokeDashoffset:0,ease:"easeInOutPower2",delay:0,onComplete:z})}),e.o.cssAnimation?e.o.cssAnimationTime:.1*v),t.animationListener&&t.animationListener(C)}},{key:"advanceToNextFloor",value:function(){var A=this.activeFloorIndex,g=Math.min(this.activeFloors.length-1,A+1);e.debug("Navigation.advanceToNextFloor: activeFloorIndex",A,"nextFloorIndex:",g),A!==g?this.showOnLevelByLevelIndex(g):this.setAutoMode(!1)}},{key:"getAdvanceToNextFloorIndex",value:function(){var A=this.activeFloorIndex,g=Math.min(this.activeFloors.length-1,A+1);return e.debug("Navigation.getAdvanceToNextFloorIndex: currentIndex=",A,"nextFloorIndex=",g),A===g?-1:g}},{key:"getAdvanceToPrevFloorIndex",value:function(){var A=this.activeFloorIndex,g=Math.min(this.activeFloors.length-1,A-1);return e.debug("Navigation.getAdvanceToNextFloorIndex: currentIndex=",A,"prevFloorIndex",g),A===g?-1:g}},{key:"setAnimationListener",value:function(A){this.animationListener=A}},{key:"onComplete",value:function(A){this.onCompleteAnimation=A}}],[{key:"convertLinesToPath",value:function(A){for(var g="",I=0;I<A.length;I++){0===I&&(g+="M");var C=A[I];g+="".concat(C.x," ").concat(C.y," ")}return e.debug("Navigation.convertLinesToPath: PATH CALCULATED:"+g),g.trim()}}]),A}(),z=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},I=null,C=0,t=sA(A);if(e.debug("processLevels: filtered floors: ",t,A),0!==t.length){for(var n=0;n<t.length;n++){var i=t[n];if(e.currentLevel===i.id)return void e.debug("processLevels: -- ALREADY PROCESSED LEVELS --")}return e.$map.children(".svg-map-layer").remove(),t.forEach((function(A){e.debug("ADDING LEVEL..",A);var t=A.map.svg,n=g("<div/>",{class:"svg-map-layer "+(e.o.cssAnimation?"svg-map-layer-animated ":"")+X("svg-map-layer-",A.no),"data-floor":A.id,"data-building-id":A.building,"data-floor-number":A.no}).appendTo(e.$map),i=g("<div/>").addClass("svg-map-map-image").addClass(e.o.locale.language);i.appendTo(n),i.append(t),A.building&&A.building,C++,i.find("svg").attr({class:"svg-map-real-svg"}),e.o.rotate&&gA(i,e.o.rotate),A.svgReady=!0,g(e.o.selector,i).each((function(){e.debug("processLevels: LOCATION ID="+g(this).attr("id"));var A=iA(g(this).attr("id"));if(A){if(e.debug("LOCATION FOUND"),"not-empty"===A.action?H(g(this),"svg-map-not-clickable"):H(g(this),"svg-map-clickable"),A.category){var I=nA(A.category);I&&(e.debug("processLevels: add color=".concat(I)),g(this).css({fill:"#".concat(I)}))}if(A.$el=g(this),A.pin){var C=100*hA(A),t=100*dA(A),i=g("<a/>",{href:"#",class:"svg-map-pin"}).css({top:C+"%",left:t+"%"}).appendTo(n);o.isString(A.pin)&&A.pin.indexOf("pin-image")>-1&&A.thumbnail&&i.addClass("pin-image").css("background-image","url("+A.thumbnail+")"),i.on("click touchend",(function(g){g.preventDefault(),e.dragging||e.showLocation(A.id,1.2*v,!0,!0)}))}}})),e.o.servicesEnabled&&g(e.o.serviceSelector,i).each((function(){e.debug("processLevels: SERVICE LOCATION ID="+g(this).attr("id"));var A=aA(g(this).attr("id"));if(A){H(this,"svg-map-clickable"),A.$el=g(this);A.$el[0]}})),g(e.o.rectSelector,i).each((function(){var A=g(this).attr("id");if(A){var I=new RegExp(/(.+)-rect/i),C=A.match(I);if(C||(I=new RegExp(/rect_(.+)/i),C=A.match(I))){var t=C[1],n=iA(t);n&&(e.debug("processLevels: ADDING RECT TO LOCATION="+n.id),n.$rect=g(this))}}})),e.o.landmark||(g(e.o.selector,i).on("click touchend",(function(){e.debug("processLevels: CLICKED, DRAGGING="+e.dragging),e.dragging||e.showLocation(g(this).attr("id"),1.2*v,!0,!0)})),e.o.servicesEnabled&&g(e.o.serviceSelector,i).on("click touchend",(function(){e.debug("CLICKED SERVICE, DRAGGING: "+e.dragging),e.dragging||e.showLocation(g(this).attr("id"),1.2*v)}))),e.$el.trigger("levelReady",[A.id,A.no,A.isOutdoor]),!0===A.isInitial&&(I=A)})),I||(I=t[0]),zA(I),t.forEach((function(A){e.resetLevel(A.id)})),e.$el.trigger("levelsReady",[t,I.id,I.isOutdoor]),{levelsLoaded:C,shownLevelId:I.id}}e.debug("levels not found")},P=function(I){e.data=I,e.o.maxScale=parseFloat(e.o.zoomLimit)||e.o.maxScale,e.debug("processData: OPTIONS:",e.o),e.$container=g("<div/>").addClass("svg-map-container").appendTo(e.$el),e.$map=g("<div/>").addClass("svg-map-map").appendTo(e.$container),e.o.stackMode.enabled&&e.$map.addClass("stack-mode-on"),e.o.zoom&&e.$map.addClass("svg-map-zoomable"),e.$levelSelect=g("<select/>").addClass("svg-map-levels-select"),90===e.o.rotate||270===e.o.rotate?(e.debug("processContentSizes: ROTATE="+e.o.rotate),e.data.levels.forEach((function(A){e.debug("processContentSizes: PROCESS LEVEL 1 = ",A);var g=parseFloat(A.map.width),I=parseFloat(A.map.height),C=Math.max(g,I);e.debug("processContentSizes: DIMENSION=",C),e.contentWidth[A.id]=C,e.contentHeight[A.id]=C,e.offsetDueToRotation[A.id]=C-Math.min(g,I),e.debug("processContentSizes: OFFSET DUE TO ROTATION="+D()),e.offsetCoefficient[A.id]=g>I?{90:{x:1,y:0},270:{x:1,y:0}}:{90:{x:0,y:1},270:{x:0,y:1}}}))):(e.debug("processContentSizes: NO ROTATE OR 180"),e.data.levels.forEach((function(A){e.debug("processContentSizes: PROCESS LEVEL 2=",A),e.contentWidth[A.id]=parseFloat(A.map.width),e.contentHeight[A.id]=parseFloat(A.map.height)}))),e.debug("processContentSizes: done!"),e.$container.css("width","100%"),R(),e.callbackMapReady=function(A){if(e.$el.removeClass("svg-map-loading"),e.o.landmark&&e.data.landmark.id){var g=o.isUndefined(I.landmark.duration)?1.2:I.landmark.duration;e.showLocation(e.data.landmark.id,g*v,!0,e.data.landmark.zoom)}else $(.5,.5,1,0),e.o.stackMode.enabled&&e.stackMode();j((function(A){A?e.debug(A):e.debug("processData: NODES ADDED")})),setTimeout((function(){E((function(A){A&&e.debug(A),e.debug("processData: RECTS ADDED"),e.$el.trigger("mapReady"),e.callbackMapReady=null,e.debug("processData: MAP READY")}))}),10)},e.o.tooltip.enabled&&(e.tooltip=new l,e.tooltip.init()),e.userPinTooltip=new h,e.o.hoverTip&&(e.hoverTip=new f,e.hoverTip.init()),e.o.developer&&(e.devTools=new d,e.devTools.init()),e.navigation=new y;var C=e.isMultiBuilding()?{isOutdoor:!0}:{},t=z(C);A.nextTick((function(){e.callbackMapReady(t&&t.shownLevelId)})),g(window).resize((function(){e.$container.height("100%"),R(),M(U(Z())),e.x=V(e.x),e.y=B(e.y),_(e.x,e.y,Z(),.1*v)})).resize()};function R(){e.data.levels.forEach((function(A){return g=A.id,I=e.$container.width()/x(g),C=e.$container.height()/w(g),void(e.o.mapFill?T(I>C?I:C,g):T(I<C?I:C,g));var g,I,C}))}var x=function(A){return A?e.contentWidth[A]:e.currentLevel?e.contentWidth[e.currentLevel]:e.contentWidth[e.data.levels[0].id]},w=function(A){return A?e.contentHeight[A]:e.currentLevel?e.contentHeight[e.currentLevel]:e.contentHeight[e.data.levels[0].id]},M=function(A,g){return g?e.scale[g]=A:e.currentLevel?e.scale[e.currentLevel]=A:e.scale[e.data.levels[0].id]=A},Z=function(A){return A?e.scale[A]:e.currentLevel?e.scale[e.currentLevel]:e.scale[e.data.levels[0].id]},D=function(A){return A?e.offsetDueToRotation[A]:e.currentLevel?e.offsetDueToRotation[e.currentLevel]:e.offsetDueToRotation[e.data.levels[0].id]},T=function(A,g){return e.debug("setFitScale: SETTING FIT SCALE AS=",A,g),g?e.fitscale[g]=A:e.currentLevel?e.fitscale[e.currentLevel]=A:(e.debug("setFitScale: OF LEVEL (not current)=",e.data.levels[0].id),e.fitscale[e.data.levels[0].id]=A)},O=function(A){return A?e.fitscale[A]:e.currentLevel?e.fitscale[e.currentLevel]:e.fitscale[e.data.levels[0].id]};var j=function(A){if(e.o.beaconMode){var g=!0,I=!1,C=void 0;try{for(var t,n=e.data.levels[Symbol.iterator]();!(g=(t=n.next()).done);g=!0){var i=t.value;if(i.beacons){var r=uA(i.id),a=!0,o=!1,s=void 0;try{for(var l,c=i.beacons[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var u=l.value;N(u,r)}}catch(A){o=!0,s=A}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}}}}catch(A){I=!0,C=A}finally{try{g||null==n.return||n.return()}finally{if(I)throw C}}e.debug("addBeaconNodes: ALL BEACON NODES ADDED TO SVG"),A&&A()}},N=function(A,I){var C=g("<a/>",{href:"#",class:"svg-map-pin circular ".concat(A.leader?"pin-md red":"pin-xs black"," pin-pulse"),"data-title":A.name,"data-toggle":"tooltip"});C.on("click touchend",(function(g){g.preventDefault(),e.$el.trigger("beaconClicked",RA(A))})).appendTo(I);var t=bA(A.x,A.y),n=t.x/x()*100,i=t.y/w()*100;C.css({top:i+"%",left:n+"%"})},E=function(A){if(!e.o.textOnRect.enabled)return A();var g={horizontal:{x:0,y:2*e.o.textOnRect.maxFontSize/48},vertical:{x:0,y:2*e.o.textOnRect.maxFontSize/48}},I=!0,C=!1,t=void 0;try{for(var n,i=e.data.levels[Symbol.iterator]();!(I=(n=i.next()).done);I=!0){var r=n.value,a=vA(r.id),o=!0,s=!1,l=void 0;try{for(var c,u=r.locations[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var v=c.value;v.$rect&&G(v,a,g)}}catch(A){s=!0,l=A}finally{try{o||null==u.return||u.return()}finally{if(s)throw l}}}}catch(A){C=!0,t=A}finally{try{I||null==i.return||i.return()}finally{if(C)throw t}}return e.debug("addTextsInsideRects: ALL TEXTS ADDED TO SVG"),A()},G=function(A,I,C){var t=A.$rect[0]&&A.$rect[0].getBBox();if(t){e.debug("addTextIntoRect: ADDING TEXT:",fA(A));var n={x:t.x+t.width/2,y:t.y+t.height/2},i=e.o.textOnRect.maxFontSize,r=e.o.textOnRect.minFontSize,a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("x",n.x.toFixed(5)),a.setAttribute("y",n.y.toFixed(5)),a.setAttribute("font-family",e.o.textOnRect.fontFamily),a.setAttribute("alignment-baseline","middle"),a.setAttribute("text-anchor","middle"),a.setAttribute("class","text-hidden"),"dynamic"===e.o.textOnRect.mode?(a.setAttribute("rect-height",t.height),a.setAttribute("rect-width",t.width),a.setAttribute("font-size","".concat(e.o.textOnRect.fontSize/Z(),"px"))):a.setAttribute("font-size","".concat(i,"px")),g(a).html(fA(A)),g(e.o.noPointerGroupSelector,I).append(g(a)),"dynamic"===e.o.textOnRect.mode?(t.height>t.width?IA(a,e.o.rotate<180?270:90):IA(a,90===e.o.rotate||180===e.o.rotate?180:0),J(a,{height:t.height,width:t.width})):function(A,g,I,C){var i=g;if(t.width<t.height){for(;!r(A,t)&&(i=Math.max(i-2,I),A.setAttribute("font-size","".concat(i,"px")),i!==I););r(A,t)&&(k(A,"text-hidden"),H(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.vertical.x)),A.setAttribute("y","".concat(n.y+C.vertical.y)),IA(A,e.o.rotate<180?270:90))}else{for(;!a(A,t)&&(i=Math.max(i-2,I),A.setAttribute("font-size","".concat(i,"px")),i!==I););a(A,t)&&(k(A,"text-hidden"),H(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.horizontal.x)),A.setAttribute("y","".concat(n.y+C.horizontal.y)),IA(A,90===e.o.rotate||180===e.o.rotate?180:0))}function r(A,g){return!(A.getBBox().width>g.height||A.getBBox().height>g.width)}function a(A,g){return!(A.getBBox().width>g.width||A.getBBox().height>g.height)}}(a,i,r,C)}},X=function(A,g){return"".concat(A).concat(.5===g?"0-5":g)},H=function(A,g){var I=W(A);function C(A){A.classList?A.classList.add(g):Y(A,g)||A.setAttribute("class","".concat(A.getAttribute("class")," ").concat(g))}I&&(Array.isArray(I)?I.forEach((function(A){C(A)})):C(I))},k=function(A,g){var I=W(A);function C(A){A.classList?A.classList.remove(g):Y(A,g)&&A.setAttribute("class",A.getAttribute("class")?A.getAttribute("class").replace(g," "):g)}I&&(Array.isArray(I)?I.forEach((function(A){C(A)})):C(I))},Y=function(A,g){var I=W(A);return!!I&&(I.classList?I.classList.contains(g):I.getAttribute("class")&&I.getAttribute("class").indexOf(g)>-1)},W=function(A){return A?A.jquery?o.times(A.length,(function(g){return A[g]})):A:null},L=function(A){k(g(".svg-map-navigation-start",A),"svg-map-navigation-start"),k(g(".svg-map-navigation-end",A),"svg-map-navigation-end"),k(g(".svg-map-active",A),"svg-map-active")},S=function(A){A&&H(A,"svg-map-active")},F=function(A){A&&(Y(A,"svg-map-active")?k(A,"svg-map-active"):H(A,"svg-map-active"))},V=function(A){var g=e.$container.width()-x()*Z();return g<0?A>0?A=0:A<g&&(A=g):A=g/2,e.debug("normalizeX: X=".concat(A," | MIN X=").concat(g," | NORMALIZED X=").concat(A)),A},B=function(A){var g=e.$container.height()-x()*Z();return g<0?A>=0?A=0:A<g&&(A=g):A=g/2,e.debug("normalizeY: Y=".concat(A," | MIN Y=").concat(g," | NORMALIZED Y=").concat(A)),A},U=function(A){return A<O()?A=O():A>e.o.maxScale&&(A=e.o.maxScale),A},J=function(A,g){A.setAttribute("font-size","".concat(e.o.textOnRect.fontSize/Z(),"px")),A.getBBox().width>g.width?A.getBBox().width>g.height||A.getBBox().height>g.width?(k(A,"text-visible"),H(A,"text-hidden")):(k(A,"text-hidden"),H(A,"text-visible")):A.getBBox().width>g.width||A.getBBox().height>g.height?(k(A,"text-visible"),H(A,"text-hidden")):(k(A,"text-hidden"),H(A,"text-visible"))},K=o.debounce((function(){var A=vA(e.currentLevel);(A=g(e.o.noPointerGroupSelector,A)).find("text").each((function(){var A=this.getAttribute("rect-width"),g=this.getAttribute("rect-height");A&&g&&J(this,{width:A,height:g})}))}),600),Q=function(){g(".svg-map-layer",e.$el).bind("mousewheel DOMMouseScroll",q)},q=function(A,g){A.preventDefault();var I=Z();M(U(I+I*g/5)),e.x=V(e.x-(A.pageX-e.$container.offset().left-e.x)*(Z()/I-1)),e.y=B(e.y-(A.pageY-e.$container.offset().top-e.y)*(Z()/I-1)),e.debug("mouseWheel: scale=".concat(I," | x=").concat(e.x," | y=").concat(e.y)),_(e.x,e.y,Z(),.2*v,"easeOutCubic")},_=function(A,g,I,C,t){e.stackModeActive||(e.debug("zoomTo: COORD: (".concat(A,",").concat(g,") SCALE: ").concat(I," DURATION: ").concat(C)),void 0!==I?(e.o.textOnRect.enabled&&"dynamic"===e.o.textOnRect.mode&&K(),e.$map.stop().animate({left:A,top:g,width:x()*I,height:w()*I},C,t,(function(){e.tooltip&&e.tooltip.position(),e.userPinTooltip&&e.userPinTooltip.position()}))):e.$map.css({left:A,top:g}),e.tooltip&&e.tooltip.position(),e.userPinTooltip&&e.userPinTooltip.position(),e.$el.trigger("positionChanged",{x:A,y:g}))},$=function(A,g,I,C,t,n,i){var r;e.debug("moveTo: RATIO: (".concat(A,",").concat(g,") SCALE: ").concat(I," DURATION: ").concat(C)),i?(e.debug("moveTo: CHANGING FLOOR ID SUPPLIED ".concat(i)),r=pA(i)):r=pA(e.currentLevel),e.debug("moveTo: INITAL SCALE FACTOR: ".concat(r)),C=void 0!==C?C:.4*v,n=void 0!==n?n:.5,I=void 0!==I?Math.min(I*r,e.o.maxScale):Z()/O(),M(U(O()*I)),e.x=V(.5*e.$container.width()-Z()*x()*A),e.y=B(e.$container.height()*n-Z()*w()*g),e.debug("moveTo: CONTAINER: (".concat(e.$container.width(),", ").concat(e.$container.height(),") | CONTENT: (").concat(x(),", ").concat(w(),") | RY: ").concat(n," FITSCALE: ").concat(O()," SCALE: ").concat(I," | COORD: (").concat(e.x,",").concat(e.y,") SCALE: ").concat(Z()," DURATION: ").concat(C)),_(e.x,e.y,Z(),C,t)},AA=function(A){gA(e.$map,A)},gA=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]&&arguments[2],C=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,t={rotation:g};I&&(t.transformOrigin="center center"),C&&(t.onComplete=C),a.c.set(A,t)},IA=function(A,g,I){gA(A,g,!0,I)},CA=function(A){var g={x:dA(A)*x(),y:hA(A)*w()};e.setCurrentLocation(g.x,g.y,e.userPinTooltip.getUserLocationFloorNumber())},tA=function(){e.userPinTooltip&&e.userPinTooltip.show(),e.user&&e.user.show()},eA=function(A){var g=!0,I=!1,C=void 0;try{for(var t,n=e.data.levels[Symbol.iterator]();!(g=(t=n.next()).done);g=!0){var i=t.value;if(o.find(i.locations,{id:A}))return i}}catch(A){I=!0,C=A}finally{try{g||null==n.return||n.return()}finally{if(I)throw C}}return null},nA=function(A){if(!A)return null;var g=o.find(e.data.categories,{slug:A});return g&&g.color},iA=function(A,g){if(!A)return null;var I,C={id:A};g&&(C.type=g),e.debug("findLocationData: query=",C);var t=!0,n=!1,i=void 0;try{for(var r,a=e.data.levels[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var s=r.value;if(I=o.find(s.locations,C))break}}catch(A){n=!0,i=A}finally{try{t||null==a.return||a.return()}finally{if(n)throw i}}return I},rA=function(A){return"picker"===e.o.mode?iA(A):iA(A,"store")},aA=function(A){return"picker"===e.o.mode?iA(A):iA(A,"service")||iA(A,"kiosk")},oA=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.debug("getLevel:",A),o.find(e.data.levels,A)},sA=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o.filter(e.data.levels,A,[])},lA=function(A){return oA({id:A})},cA=function(A){var g={no:A};if(e.isMultiBuilding()){var I=e.$map.children(".svg-map-layer").attr("data-building-id");o.isEmpty(I)?g.isOutdoor=!0:g.building=I}return oA(g)},uA=function(A){return g('.svg-map-layer[data-floor="'+A+'"]',e.$el)},vA=function(A){return uA(A).find("svg")},pA=function(A){var g=lA(A);return o.get(g,"initialScaleFactor",e.o.initialScaleFactor)},fA=function(A){var g=A.title;if(Array.isArray(g)){var I=A.join||" / ";1===I.length&&(I=" ".concat(I," ")),g=g.join(I)}return function(A){return A}(g)},dA=function(A){return A.x&&A.y||yA(A),A.x},hA=function(A){return A.x&&A.y||yA(A),A.y},mA=function(A){var g=Number.MAX_VALUE,I=Number.MIN_VALUE,C=Number.MAX_VALUE,t=Number.MIN_VALUE,e=!0,n=!1,i=void 0;try{for(var r,a=A[Symbol.iterator]();!(e=(r=a.next()).done);e=!0){var o=r.value;g=Math.min(g,dA(o)),I=Math.max(I,dA(o)),C=Math.min(C,hA(o)),t=Math.max(t,hA(o))}}catch(A){n=!0,i=A}finally{try{e||null==a.return||a.return()}finally{if(n)throw i}}return{x:(g+I)/2,y:(C+t)/2}},bA=function(A,g){var I,C={x:A,y:g},t=x(),n=w(),i=I?e.offsetCoefficient[I]:e.currentLevel?e.offsetCoefficient[e.currentLevel]:e.offsetCoefficient[e.data.levels[0].id],r=D();return 90===e.o.rotate?(C.x=t-C.y-i[90].x*r/2,C.y=C.x+i[90].y*r/2):270===e.o.rotate?(C.x=C.y+i[270].x*r/2,C.y=n-C.x-i[270].y*r/2):180===e.o.rotate&&(C.x=t-C.x,C.y=n-C.y),C},yA=function(A){if((!A.x||!A.y)&&A.$el&&A.$el[0]){if(A.$rect&&A.$rect[0]){var g=A.$rect[0];if(g){var I=g.getBBox();if(I){var C={x:I.x+I.width/2,y:I.y+I.height/2};C=bA(C.x,C.y),A.x=C.x/x(),A.y=C.y/w()}return}}var t=A.$el[0];if(t){var e=t.getBBox();if(e){var n={x:e.x+e.width/2,y:e.y+e.height/2};n=bA(n.x,n.y),A.x=n.x/x(),A.y=n.y/w()}}}},zA=function(A,I,C){if(C&&e.hideLocation(),A){if(!function(A){var g=e.$map.children(".svg-map-layer").attr("data-building-id");return A.building===g}(A)){var t={};o.isEmpty(A.building)?t.isOutdoor=!0:t.building=A.building,z(t)}var n=lA(A.id);if(n){var i=uA(A.id);if(e.currentLevel!==A.id)if(e.o.cssAnimation||!i.hasClass("layer-visible")){if(e.debug("switchLevel: FLOOR CURRENT:".concat(e.currentLevelNumber,", SWITCH TO:").concat(n.no)),I&&$(.5,.5,1,0,void 0,void 0,A.id),e.tooltip&&e.tooltip.hide(),e.o.rotate&&(e.o.rotateServices&&g(e.o.serviceSelector,i).each((function(){IA(this,360-e.o.rotate)})),g(e.o.rotatable90PathSelector,i).each((function(){IA(this,360-e.o.rotate)})),180===e.o.rotate&&g(e.o.rotatable180PathSelector,i).each((function(){IA(this,360-e.o.rotate)})),270===e.o.rotate?g(e.o.rotatable270TextSelector,i).each((function(){IA(this,180)})):180===e.o.rotate&&g(e.o.rotatable180TextSelector,i).each((function(){IA(this,180)}))),e.o.stackMode.enabled){var r=!0,a=!1,l=void 0;try{for(var c,u=e.data.levels[Symbol.iterator]();!(r=(c=u.next()).done);r=!0){var p=c.value,f=uA(p.id);p.no<n.no?f.removeClass("svg-map-layer-down").addClass("svg-map-layer-up"):p.no>n.no?f.removeClass("svg-map-layer-up").addClass("svg-map-layer-down"):(f.removeClass("svg-map-layer-up").removeClass("svg-map-layer-down"),e.$map.addClass("stack-mode-off").removeClass("stack-mode-on"))}}catch(A){a=!0,l=A}finally{try{r||null==u.return||u.return()}finally{if(a)throw l}}e.navigation.animationStarted()&&e.navigation.removeEscalatorAnimation(),e.stackModeActive=!1}if(e.currentLevel=A.id,e.currentLevelNumber=n.no,e.o.cssAnimation){var d=!0,h=!1,m=void 0;try{for(var b,y=e.data.levels[Symbol.iterator]();!(d=(b=y.next()).done);d=!0){var P=b.value,R=uA(P.id);e.$map.removeClass(X("map--selected-",P.no)),R.removeClass("active").removeClass("hidden")}}catch(A){h=!0,m=A}finally{try{d||null==y.return||y.return()}finally{if(h)throw m}}var x=uA(e.currentLevel);e.$map.addClass(X("map--selected-",n.no)),x.addClass("active")}else g(".svg-map-layer.layer-visible",e.$map).removeClass("layer-visible"),i.addClass("layer-visible");tA(),e.debug("switchLevel: SWITCHED LEVEL"),function(){var A=e.$map,I=g(".svg-map-map-image",e.$map);if(!e.o.landmark){if(document.ondragstart=function(){return!1},e.o.draggable&&I.on("mousedown",(function(I){e.dragging=!1,A.stop(),A.data("mouseX",I.pageX),A.data("mouseY",I.pageY),A.data("lastX",e.x),A.data("lastY",e.y),A.addClass("svg-map-dragging"),e.$map.on("mousemove",(function(g){if(Math.abs(g.pageX-A.data("mouseX"))>1){e.dragging=!0;var I=g.pageX-A.data("mouseX")+e.x,C=g.pageY-A.data("mouseY")+e.y;I=V(I),C=B(C),_(I,C),A.data("lastX",I),A.data("lastY",C)}else e.debug("addControls: NOT ENOUGH MOVED, MAYBE IT WAS CLICK")})),g(document).on("mouseup",(function(){e.x=A.data("lastX"),e.y=A.data("lastY"),e.$map.off("mousemove"),g(document).off("mouseup"),A.removeClass("svg-map-dragging")}))})),e.$el.on("dblclick",".svg-map-map-image",(function(A){A.preventDefault(),e.debug("addControls: DOUBLE CLICK");var g=Z();g===e.o.maxScale?M(U(O())):M(U(2*g)),e.x=V(e.x-(A.pageX-e.$container.offset().left-e.x)*(Z()/g-1)),e.y=B(e.y-(A.pageY-e.$container.offset().top-e.y)*(Z()/g-1)),_(e.x,e.y,Z(),.4*v,"easeInOutCubic")})),e.o.mouseWheel&&Q(),!("ontouchstart"in window||"onmsgesturechange"in window))return!0;I.on("touchstart",(function(g){e.dragging=!1;var C=g.originalEvent,t=A.position();A.data("touchY",C.changedTouches[0].pageY-t.top),A.data("touchX",C.changedTouches[0].pageX-t.left),I.on("touchmove",(function(g){g.preventDefault(),e.dragging=!0;var C=g.originalEvent;1===C.touches.length?(e.x=V(C.changedTouches[0].pageX-A.data("touchX")),e.y=B(C.changedTouches[0].pageY-A.data("touchY")),_(e.x,e.y,Z(),50)):I.off("touchmove")})),I.on("touchend",(function(){I.off("touchmove touchend")}))}));var C=new s(e.$map[0],{transform_always_block:!0,drag_block_horizontal:!0,drag_block_vertical:!0});C.get("pinch").set({enable:!0}),e.rotating=!1;var t,n=1;if(C.on("pinchstart",(function(){e.debug("addControls: PINCH START"),e.dragging=!1,n=Z()/O(),t=n})),C.on("pinch",(function(A){e.dragging=!0,1!==A.scale&&(n=Math.max(1,Math.min(t*A.scale,100)));var g=Z();M(U(n*O())),e.x=V(e.x-(A.center.x-e.$container.offset().left-e.x)*(Z()/g-1)),e.y=B(e.y-(A.center.y-e.y)*(Z()/g-1)),_(e.x,e.y,Z(),0)})),e.o.rotatable){C.get("rotate").set({enable:!0});var i,r=0;C.on("rotatestart rotatemove rotateend",(function(A){switch(A.type){case"rotatestart":r=A.rotation;break;case"rotatemove":e.debug("addControls: ROTATE MOVE"),i=r-A.rotation,AA(e.rotation-i);break;case"rotateend":e.rotation=e.rotation-i}}))}}}(),e.resetLevel(A.id),e.$el.trigger("levelSwitched",[n.id,n.no,n.isOutdoor])}else e.debug("switchLevel: ** ALREADY SWITCHED **");else e.debug("switchLevel: -- ALREADY SWITCHED --")}}};e.stackMode=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.o.stackMode.enabled)if(e.stackModeActive)e.error("stack mode zaten aktif");else{e.tooltip&&e.tooltip.hide(),$(.5,.5,1,0,void 0,void 0),e.stackModeActive=!0,e.navigation.animationStarted()&&e.navigation.addEscalatorAnimation();var I=o.sortBy(e.data.levels,(function(A){return A.no}));o.each(I,(function(I,C){var t=uA(I.id);t.removeClass("hidden").removeClass("active"),e.$map.removeClass(X("map--selected-",I.no)),t.data("value",I.no),t.css("transform","translateZ(".concat(C*e.o.stackMode.offset,"vmin)")),t.removeClass("svg-map-layer-up").removeClass("svg-map-layer-down").removeClass("layer-visible"),t.one("click",(function(A){A.preventDefault(),e.debug("stackMode: $svgLayer.click=",I),e.switchLevelToNumber(I.no,!0,!1,g,!1)})),A&&I.id!==A&&I.id!==e.currentLevel&&t.addClass("hidden")})),e.currentLevel=void 0,e.currentLevelNumber=void 0,e.$map.addClass("stack-mode-on").removeClass("stack-mode-off"),A&&setTimeout((function(){var I=lA(A);e.switchLevelToNumber(I.no,!1,!1,g,!1)}),e.o.stackMode.switchFloorTime)}else e.error("Please first activate stackMode in order to use it")};var PA=function(A){return o.omit(A,["$el","$rect","x","y"])},RA=function(A){return o.omit(A,["x","y"])};e.zoomIn=function(){var A=Z();M(U(A+.8*A)),e.x=V(e.x-(e.$container.width()/2-e.x)*(Z()/A-1)),e.y=B(e.y-(e.$container.height()/2-e.y)*(Z()/A-1)),_(e.x,e.y,Z(),.4*v,"easeInOutCubic")},e.zoomOut=function(){var A=Z();M(U(A-.4*A)),e.x=V(e.x-(e.$container.width()/2-e.x)*(Z()/A-1)),e.y=B(e.y-(e.$container.height()/2-e.y)*(Z()/A-1)),_(e.x,e.y,Z(),.4*v,"easeInOutCubic")},e.resetLevel=function(){AA(0),e.hideLocation(),$(.5,.5,1,.4*v,"easeInOutCubic")},e.switchLevelToNumber=function(A,g,I){var C=arguments.length>3&&void 0!==arguments[3]&&arguments[3],t=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=cA(A);n&&(e.navigation.setAutoMode(C),t&&e.navigation.started||zA(n,g,I),e.navigation.animationStarted()&&e.navigation.showOnLevelByLevelNo(n.no,t))},e.switchLevelToId=function(A,g,I){var C=arguments.length>3&&void 0!==arguments[3]&&arguments[3],t=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=lA(A);n&&(e.navigation.setAutoMode(C),t&&e.navigation.started||zA(n,g,I),e.navigation.animationStarted()&&e.navigation.showOnLevelByLevelNo(n.no,t))},e.highlightLocation=function(A,g,I){e.debug("highlightLocation: HIGHLIGHT LOCATION? "+A);var C=iA(A);if(C){var t=eA(C.id);if(t){if(zA(t),g){var n=C.zoom?parseFloat(C.zoom):e.o.maxScale;$(dA(C),hA(C),n,I,"easeInOutCubic")}L(e.$el),S(C.$el),e.$el.trigger("locationHighlighted",PA(C))}}},e.showLocation=function(A,g){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.debug("showLocation: id="+A);var t=iA(A);if(t)if("kiosk"!==t.type){var n=eA(t.id);if(n){I&&(e.debug("showLocation: close navigation"),e.closeNavigation());var i=t.action&&"default"!==t.action?t.action:e.o.action,r=(e.data.landmark||{}).zoom;if(e.o.landmark&&o.isBoolean(r)&&!r&&(e.debug("showLocation: ZOOM NOT ENABLED FOR LANDMARK"),i="tooltip",e.o.zoomToSelected=!1),"select"===i)F(t.$el);else if("zoom"===i){zA(n,C);var a=t.zoom?parseFloat(t.zoom):e.o.maxScale;C&&$(dA(t),hA(t),a,g,"easeInOutCubic")}else if("pin"===i)zA(n),e.tooltip&&e.tooltip.show(t,g);else if("tooltip"===i)zA(n),e.tooltip&&e.tooltip.show(t,g);else if("not-empty"===i)return e.debug("showLocation: location not empty case"),void(e.o.locationCannotBeSelected&&e.o.locationCannotBeSelected(t.id));L(e.$el),S(t.$el),e.$el.trigger("locationOpened",PA(t))}else e.error("showLocation: level not found")}else e.error("showServiceLocation: kiosk service cannot be selected");else e.error("showLocation: ".concat(A," not found"))},e.highlightServiceLocation=function(A,g,I){e.error("highlightServiceLocation deprecated. use map.highlightLocation(...)")},e.showServiceLocation=function(A,g){!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.error("showServiceLocation deprecated. use map.showLocation(...)")},e.highlightLocations=function(A,g,I){var C;if(e.debug("highlightLocations: "+A),(C=Array.isArray(A)?A:[A]).length<=1)e.highlightLocation(C[0],g,I);else{var t=o.filter(o.map(C,(function(A){return rA(A)})));if(t.length){var n=t[0],i=eA(n.id);if(i){if(zA(i),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=mA(t);$(a.x,a.y,r,I,"easeInOutCubic")}L(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,v=t[Symbol.iterator]();!(s=(u=v.next()).done);s=!0){var p=u.value;S(p.$el)}}catch(A){l=!0,c=A}finally{try{s||null==v.return||v.return()}finally{if(l)throw c}}e.$el.trigger("locationsHighlighted")}}}},e.showServiceLocations=function(A){e.error("showServiceLocations deprecated. use map.showLocation(...)")},e.highlightServiceLocations=function(A,g,I){var C;if(e.debug("highlightServiceLocations: HIGHLIGHT SERVICE LOCATIONS? "+A),(C=Array.isArray(A)?A:[A]).length<=1)e.highlightServiceLocation(C[0],g,I);else{var t=o.filter(o.map(C,(function(A){return aA(A)})));if(t.length){var n=t[0],i=eA(n.id);if(i){if(zA(i),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=mA(t);$(a.x,a.y,r,I,"easeInOutCubic")}L(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,v=t[Symbol.iterator]();!(s=(u=v.next()).done);s=!0){var p=u.value;S(p.$el)}}catch(A){l=!0,c=A}finally{try{s||null==v.return||v.return()}finally{if(l)throw c}}e.$el.trigger("serviceLocationsHighlighted")}}}},e.hideLocation=function(){e.debug("hideLocation: HIDE LOCATION INSIDE:",e.$el),L(e.$el),e.tooltip&&e.tooltip.hide(),e.$el.trigger("locationClosed")},e.setCurrentLocationFromBlock=function(A){var g=iA(A);if(g){var I=eA(A),C=lA(e.currentLevel);e.userPinTooltip.addUserLocation(g,I.no),C&&C.no===e.userPinTooltip.getUserLocationFloorNumber()?(e.debug("set current location"),CA(g)):e.debug("setCurrentLocationFromBlock: wait for patch..")}else e.debug("setCurrentLocationFromBlock: location not found")},e.setCurrentLocation=function(A,g,I){var C;C=o.isNumber(I)?cA(I):lA(e.currentLevel),e.userPinTooltip.addUserLocationPoint(A,g,C.no),lA(e.currentLevel).no===e.userPinTooltip.getUserLocationFloorNumber()&&tA()},e.updateLocalized=function(A){var g=A.youAreHereText,I=A.navigationText,C=A.closeText,t=A.detailText,n=A.enterBuildingText,i=A.floorText;g&&e.userPinTooltip.updateLocalized(g),e.tooltip&&(I||C||t||n||i)&&e.tooltip.updateLocalized({navigationText:I,closeText:C,detailText:t,enterBuildingText:n,floorText:i})},e.changeNavigationPins=function(A){var g=A.startPin,I=A.endPin;e.navigation&&(e.debug("changeNavigationPins: WILL TRY changing navigation pins.."),g&&e.navigation.changeStartPinImg(g),I&&e.navigation.changeEndPinImg(I))},e.resetNavigationPins=function(){e.navigation&&(e.navigation.resetStartPinImg(),e.navigation.resetEndPinImg())},e.resetCurrentLocation=function(){e.userPinTooltip.resetUserLocation()},e.setCurrentMobileUserLocation=function(A,g,I){var C;C=o.isNumber(I)?cA(I):lA(e.currentLevel),e.user?e.user.resetUserLocation():e.user=new m,e.user.init(A,g,C.no),e.user.show()},e.showCurrentMobileUserLocation=function(){if(e.user){var A=e.user.getUserLocationFloorNumber();e.switchLevelToNumber(A),e.user.zoom()}},e.moveCurrentMobileUserLocation=function(A,g){if(e.user){var I;I=o.isNumber(g)?cA(g):lA(e.currentLevel);try{return e.user.changeUserLocationPoint(A,I.no),!0}catch(A){return e.error(A),!1}}},e.resetCurrentMobileUserLocation=function(){e.user&&e.user.resetUserLocation()},e.listenToAnimate=function(A){e.navigation.setAnimationListener(A)},e.showNavigation=function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];try{return e.navigation.init(A),e.navigation.show(g,I,C),!0}catch(A){return e.error(A),!1}},e.showNavigationWithMultiple=function(A){var g=arguments.length>1&&void 0!==arguments[1]&&arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!o.isArray(A))return!1;try{var n=o.cloneDeep(A[t]);if(!n)return!0;e.statics.multipleNavigation={navigationDetails:A,groupIndex:t},e.closeNavigation(!1,!1),e.navigation.onComplete((function(){e.navigation.canceled||e.showNavigationWithMultiple(A,g,I,C,t+1)}));var i=function(){setTimeout((function(){e.navigation.canceled||e.showNavigation(n.navigation,g,I,C)}),.6*v)},r="building"===n.type&&n.building;return r?(e.debug("enter location",r),e.resetCurrentMobileUserLocation(),e.enterBuilding(r,i)):e.exitBuilding(i),!0}catch(A){return e.error(A),!1}},e.startNavigation=function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],C=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e.debug("startNavigation: navigationDetails=",A),e.statics.restartNavigationData={navigationDetails:A,autoMode:g,zoomEnabled:I,showPins:C};var t=e.isMultiBuilding();return t?e.showNavigationWithMultiple(A,g,I,C):e.showNavigation(A,g,I,C)},e.getNavigationDetails=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,g=e.statics.multipleNavigation,I=g.navigationDetails,C=g.groupIndex;return I&&I[C+A]},e.prevLevelId=function(){if(!e.navigation.canceled){var A=e.navigation.getFloorNo(-1);if(!o.isUndefined(A)){var g=cA(A);return g&&g.id}if(e.isMultiBuilding()){var I=e.getNavigationDetails(-1);if(e.debug("self.prevLevelId: prevDetails=",I),!I)return;var C={};if("outdoor"===I.type)C.isOutdoor=!0;else{var t=o.last(I.navigation.direction);C.building=I.building,C.no=t}var n=oA(C);return e.debug("self.prevLevelId: level=",n,"filter=",C),n&&n.id}}},e.hasPrevNavigate=function(){return!!e.prevLevelId()},e.prevNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.navigation.isOnFirstNavigationFloor();C?e.prevBuildingNavigate(A,g,I):e.navigation.showOnPrev(A,g,I)}},e.prevBuildingId=function(){if(!e.navigation.canceled&&e.isMultiBuilding()){var A=e.getNavigationDetails(-1);return A&&("outdoor"===A.type?A.type:A.building)}},e.hasPrevBuildingNavigate=function(){return!!e.prevBuildingId()},e.prevBuildingNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.statics.multipleNavigation,t=C.navigationDetails,n=C.groupIndex,i=n-1;t[i]&&e.showNavigationWithMultiple(t,A,g,I,i,!0)}},e.nextLevelId=function(){if(!e.navigation.canceled){var A=e.navigation.getFloorNo(1);if(!o.isUndefined(A)){var g=cA(A);return g&&g.id}if(e.isMultiBuilding()){var I=e.getNavigationDetails(1);if(e.debug("self.nextLevelId: nextDetails=",I),!I)return;var C={};if("outdoor"===I.type)C.isOutdoor=!0;else{var t=o.first(I.navigation.direction);C.building=I.building,C.no=t}var n=oA(C);return e.debug("self.nextLevelId: level=",n,"filter=",C),n&&n.id}}},e.hasNextNavigate=function(){return!!e.nextLevelId()},e.nextNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.navigation.isOnLastNavigationFloor();C?e.nextBuildingNavigate(A,g,I):e.navigation.showOnNext(A,g,I)}},e.nextBuildingId=function(){if(e.navigation.canceled||!e.isMultiBuilding())return!1;var A=e.getNavigationDetails(1);return A&&("outdoor"===A.type?A.type:A.building)},e.hasNextBuildingNavigate=function(){return!!e.nextBuildingId()},e.nextBuildingNavigate=function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e.navigation.canceled){var C=e.statics.multipleNavigation,t=C.navigationDetails,n=C.groupIndex,i=n+1;t[i]&&e.showNavigationWithMultiple(t,A,g,I,i,!0)}},e.closeNavigation=function(){var A=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];C.navigation.removePathAnimations(),C.navigation.setAutoMode(!1),C.navigation.removeEscalatorAnimation(),C.navigation.activeFloor=null,C.navigation.canceled=g,A&&e.resetLevel(),g&&(e.statics.restartNavigationData=null,e.$el.trigger("navigationCancelled"))},e.restartNavigation=function(){var A=e.o.cssAnimation?e.o.cssAnimationTime:.1*v,g=e.statics.restartNavigationData||{},I=g.navigationDetails,C=g.autoMode,t=g.zoomEnabled,n=g.showPins;I?setTimeout((function(){e.closeNavigation(!0,!1),e.startNavigation(I,C,t,n)}),A):e.error("restartNavigation: restartNavigationData not found")},e.mto=function(A,g,I,C,t,e){$(A,g,I,C,t,e)},e.zto=function(A,g,I,C,t){_(A,g,I,C,t)},e.calculateSP=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto",C=e.data,t=C.levels,n=C.nodes,i=C.paths;return Array.isArray(t)&&Array.isArray(n)&&Array.isArray(i)?c(A,g,{levels:t,nodes:n,paths:i},I):(e.error("Required levels, nodes or paths in data"),null)},e.calculateSP_v1=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";return e.calculateSP(A,g,I)},e.calculateSP_v2=function(A,g){var I=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto",C=e.data,t=C.nodes,n=C.paths;return Array.isArray(t)&&Array.isArray(n)?u(A,g,{nodes:t,paths:n},I):(e.error("Required nodes or paths in data"),null)},e.enterBuilding=function(A,g){A?setTimeout((function(){e.debug("enterBuilding: buildingId=",A),z({building:A}),g&&g()}),.3*v):e.debug("enterBuilding:buildingId required!")},e.exitBuilding=function(g){e.debug("exitBuilding: go to outdoor"),A.nextTick((function(){z({isOutdoor:!0}),g&&g()}))}};g.extend(g.easing,{def:"easeOutQuad",swing:function(A,I,C,t,e){return g.easing[g.easing.def](A,I,C,t,e)},easeOutQuad:function(A,g,I,C,t){return-C*(g/=t)*(g-2)+I},easeOutCubic:function(A,g,I,C,t){return C*((g=g/t-1)*g*g+1)+I},easeInOutCubic:function(A,g,I,C,t){return(g/=t/2)<1?C/2*g*g*g+I:C/2*((g-=2)*g*g+2)+I}}),g.fn.svgMap=function(A){return this.each((function(){var C=g(this);if(!C.data("svg-map")){var t=new I(C);o.get(A,"immediate",!0)?(console.log("immediate, call init"),t.init(A)):console.log("no immediate, wait for levels to be added"),C.data("svg-map",t)}}))}}}.call(this,I(/*! ./../node_modules/process/browser.js */8))},
|
|
162
162
|
/*!*****************************************!*\
|
|
163
163
|
!*** ./node_modules/process/browser.js ***!
|
|
164
164
|
\*****************************************/
|
package/dist/map-dist.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-dist.js","sources":["webpack://MechanicMap/map-dist.js"],"mappings":"AAAA;;;;;;AAwGA;;;;;;;;;;;;AAqCA;;;;;;AAs6DA;;;;;;;;AAUA;;;;;;AA8shBA;;;;;;AAkBA;;;;;;AA4BA;;;;;;;;;;;AAqBA;;;;;;;;;;;AAoxBA;;;;;;;;;;;AA6gBA;;;;;;;;;;;;AA6nBA;;;;;;;;;;;AA85FA;;;;;;;;;;;;AAwEA;;;;;;;;;;;;AAqFA;;;;;;;;;;;;AA6lBA;;;;;;AAwcA;;;;;;AA4BA;;;;;;AAgCA;;;;;;
|
|
1
|
+
{"version":3,"file":"map-dist.js","sources":["webpack://MechanicMap/map-dist.js"],"mappings":"AAAA;;;;;;AAwGA;;;;;;;;;;;;AAqCA;;;;;;AAs6DA;;;;;;;;AAUA;;;;;;AA8shBA;;;;;;AAkBA;;;;;;AA4BA;;;;;;;;;;;AAqBA;;;;;;;;;;;AAoxBA;;;;;;;;;;;AA6gBA;;;;;;;;;;;;AA6nBA;;;;;;;;;;;AA85FA;;;;;;;;;;;;AAwEA;;;;;;;;;;;;AAqFA;;;;;;;;;;;;AA6lBA;;;;;;AAwcA;;;;;;AA4BA;;;;;;AAgCA;;;;;;AAwzJA;;;;;;AAoMA;;;;;;AAoCA;;;;;AAiCA;;;;;;AA+BA;;;;;;AA8DA;;;;;;AAiGA;;;;;;AAgCA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AAYA;;;;;;AA0ZA;;;;;;AAqGA;;;;;AAOA;;;;;;AAqlFA;;;;;;;AAaA;;;;;;AA6NA;;;;;;AAuEA;;;;;;AAoIA;;;;;;AA+MA;;;;;;AAmEA;;;;;;AA6CA;;;;;;AAqCA;;;;;;AAoDA;;;;;;AAwBA;;;;;;AA8EA;;;;;;AAoBA;;;;;;AAkBA","sourceRoot":""}
|