mechanic-map 0.15.2 → 0.15.3

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 CHANGED
@@ -224,7 +224,7 @@ $svgMap.on('navigation', function(event, { current, isFirst, isLast, next }) {
224
224
  ## Functions
225
225
 
226
226
 
227
- ### Calculate SP Navigation
227
+ ### Calculate SP Navigation (v1)
228
228
  This function can be used with kiosk data
229
229
  ```js
230
230
  /*
@@ -251,6 +251,39 @@ if (sp.length) {
251
251
  }
252
252
  ```
253
253
 
254
+ ### Calculate SP Navigation (v2)
255
+ This function can be used with kiosk data
256
+ ```js
257
+ /*
258
+ levels, paths and nodes required this function...
259
+ const svgMapParameters = {
260
+ // ... others
261
+ data: {
262
+ // ... others
263
+ nodes: [], // required for SP
264
+ paths: [], // required for SP
265
+ }
266
+ }
267
+ */
268
+
269
+ // start_location, end_location, routeType = 'auto' | 'p' | 'd'
270
+ // p = pedestrian, d = disabled
271
+ const sp = map.calculateSP_v2('KE1_kiosk_09', 'KE7_parkingspot_01', 'auto');
272
+
273
+ // sp.route -> fastest route
274
+ // sp.alternative -> alternative fastest route
275
+
276
+ if (sp.route) {
277
+ map.showNavigation(sp.route, true, true, true);
278
+ }
279
+
280
+ // or
281
+
282
+ if (sp.alternative) {
283
+ map.showNavigation(sp.route, true, true, true);
284
+ }
285
+ ```
286
+
254
287
 
255
288
  ### Start Navigation
256
289
  ```js
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 */62),u=1e3;g.default=function(g){l(g);var I=function(I){var C=this,e=this;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*u},draggable:!0,landmark:!1,mapFill:!1,height:420,zoomToSelected:!0,rotatable:!1,action:"tooltip",hoverTip:!0,tooltip:{enabled:!0,navigation:!1,detail:!1,renderTemplate:!1},smartip:!0,fillColor:"",developer:!1,mouseWheel:!0,maxScale:4,animationScale:1.5,cssAnimation:!0,cssAnimationTime:u,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.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.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=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}y(g)}),.1*u),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)))}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.$close&&this.$close.on("click touchend",(function(A){A.preventDefault(),e.hideLocation(),e.o.zoom||L(.5,.5,1,1.2*u,"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(tA(A)),this.$detail&&this.$detail.text(e.o.tooltip.detail.text||"DETAIL"),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){var A=e.$map.offset().left+e.$map.width()*eA(this.location)-e.$container.offset().left,g=e.$map.offset().top+e.$map.height()*nA(this.location)-e.$container.offset().top,I=100*eA(this.location),C=100*nA(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 L(.5,.5,1,1.2*u,"easeInOutCubic");var I=A.zoom?parseFloat(A.zoom):e.o.maxScale,C=((e.$container.height()-this.drop)/2+this.drop)/e.$container.height();L(eA(A),nA(A),I,g||1.2*u,"easeInOutCubic",C)}},{key:"hide",value:function(){var A=this;this.location=null,this.$el.stop().fadeOut(.3*u,(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&&(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.text(A.closeText),A.detailText&&this.$detail.text(A.detailText),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=q(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=_(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(tA(A)),this.position(A),this.$el.stop().fadeIn(.1*u)))}},{key:"position",value:function(A){var g,I=e.$map.offset().left+e.$map.width()*eA(A)-e.$container.offset().left,C=e.$map.offset().top+e.$map.height()*nA(A)-e.$container.offset().top,t=100*eA(A),n=100*nA(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*u)}}]),A}(),v=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:"restart-nav",text:"restart navigation"})),A.append(g("<button/>",{id:"stack-mode",text:"show stack mode"})),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("#restart-nav").click((function(){e.restartNavigation()})),g("#stack-mode").click((function(){e.stackMode()}))}}],[{key:"startSlider",value:function(){g("#slider").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))}})}},{key:"updateSlider",value:function(){e.navigation.tween&&g("#slider").slider("value",100*e.navigation.tween.progress())}}]),A}(),d=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=$(e.currentLevel);if(A&&A.no===this.currentUserLocation.floorNo){if(!this.isUserLocationPointAvailable()){e.debug("UserPinTooltip: PATCHING..");var g=this.currentUserLocation.location;U(g)}var I=gA(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*u)}},{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 m,this.currentUserLocation.addPoint(A/e.contentWidth,g/e.contentHeight,I)}},{key:"addUserLocation",value:function(A,g){this.currentUserLocation=new m(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}(),h=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=rA(A,g);this.addUserLocationPoint(C.x,C.y,I)}},{key:"show",value:function(){if(this.remove(),$(e.currentLevel).no===this.getUserLocationFloorNumber()&&this.isUserLocationAvailable()){var A=gA(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&&L(this.currentLocation.getX(),this.currentLocation.getY(),2,.6*u,"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 m,this.currentLocation.addPoint(A/e.contentWidth,g/e.contentHeight,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()*e.contentWidth,y:this.currentLocation.getY()*e.contentHeight});var n=b.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/u,l=o.map(I,(function(A){var g=rA(A.x,A.y);return{left:g.x/e.contentWidth*100+"%",top:g.y/e.contentHeight*100+"%"}}));t&&l.unshift({left:t.x/e.contentWidth*100+"%",top:t.y/e.contentHeight*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}(),m=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}(),b=function(){function A(){t()(this,A),this.routeData=[],this.activeFloors=[],this.activeFloor=null,this.startLocation=null,this.$startPin=null,this.endLocation=null,this.$endPin=null,this.autoMode=!1,this.zoomEnabled=!0,this.showPins=!0,this.started=!1,this.$path=null,this.tween=null,this.animationListener=null,this.elementSelector=".walking"}return n()(A,[{key:"init",value:function(g){if(this.routeData=[],this.activeFloors=g.direction,this.endLocation=Q(g.end),!this.activeFloors||0===this.activeFloors.length)throw new Error("No direction found in SP");if(g.start){var I=g.start;if(I.location){var C=Q(I.location);C&&(this.startLocation=C)}}var t=!0,n=!1,i=void 0;try{for(var r,a=g.floors[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var o=r.value,s={no:o.no,points:[]},l=!0,c=!1,u=void 0;try{for(var p,f=o.lines[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var v=p.value;s.points.push({x:v.x1,y:v.y1})}}catch(A){c=!0,u=A}finally{try{l||null==f.return||f.return()}finally{if(c)throw u}}var d=o.lines[o.lines.length-1];if(s.points.push({x:d.x2,y:d.y2}),s.end_floor=!d.level_changer,s.level_changer=d.level_changer,s.path=A.convertLinesToPath(s.points),!s.path)throw new Error("Path cannot be calculated of floor:"+o.no);this.routeData.push(s)}}catch(A){n=!0,i=A}finally{try{t||null==a.return||a.return()}finally{if(n)throw i}}"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=AA(g.no),C=gA(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=AA(g.no);gA(I.id).removeClass("escalator-up").removeClass("escalator-down")}}))}},{key:"show",value:function(A,g,I){this.autoMode=A,this.zoomEnabled=g,this.showPins=I,(this.startLocation&&this.startLocation.$el||this.endLocation&&this.endLocation.$el)&&(j(e.$el),this.startLocation&&this.startLocation.$el&&(Z(this.startLocation.$el,"svg-map-active"),Z(this.startLocation.$el,"svg-map-navigation-start")),this.endLocation&&this.endLocation.$el&&(Z(this.endLocation.$el,"svg-map-active"),Z(this.endLocation.$el,"svg-map-navigation-end"))),this.advanceToNextFloor()}},{key:"navigationEvent",value:function(){var A=this.activeFloors.indexOf(this.activeFloor),I=this.activeFloors[A],C=this.activeFloors[0]===I,t=this.activeFloors[this.activeFloors.length-1]===I,n=t?null:this.activeFloors[A+1];e.$el.trigger("navigation",{isFirst:C,isLast:t,current:I,next:n}),e.o.developer&&g("#navigatingText").text("Current Floor = ".concat(I," | Is First Floor = ").concat(C," | Is Last Floor = ").concat(t," | Next Floor = ").concat(n))}},{key:"showOnLevel",value:function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=o.find(this.routeData,{no:A});if(I)if(this.activeFloor!==A){var C=AA(A);if(g){if(e.o.animation.stackAnimation&&e.o.stackMode.enabled&&!e.stackModeActive)return void e.stackMode(C.id,this.autoMode);oA(C.id,!0)}this.activeFloor=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}),this.started=!0}else e.debug("Navigation.showOnLevel: ACTIVE FLOOR SP ALREADY SHOWN");else e.debug("Navigation.showOnLevel: 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=rA(A.x,A.y),C=gA(e.currentLevel),t=I.x/e.contentWidth*100,n=I.y/e.contentHeight*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=rA(A.x,A.y),C=gA(e.currentLevel),t=I.x/e.contentWidth*100,n=I.y/e.contentHeight*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&&this.activeFloor===this.activeFloors[0]}},{key:"isOnLastNavigationFloor",value:function(){return this.activeFloors&&this.activeFloor===this.activeFloors[this.activeFloors.length-1]}},{key:"navigationWay",value:function(){return this.activeFloors[0]>this.activeFloors[1]?1:0}},{key:"animatePathOnLevel",value:function(A,I,C){e.debug("Navigation.animatePathOnLevel: pathString=",A,"| points=",I);var t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",A);var n=t.getTotalLength()+150,i=n*e.o.animation.speedFactor/u;e.debug("Navigation.animatePathOnLevel: PATH LENGTH="+n,"ANIMATION DURATION="+i);var r=IA(e.currentLevel),s=gA(e.currentLevel),l=this,c=16/e.o.animation.frequencyFactor,p=16/e.o.animation.speedFactor;e.debug("Navigation.animatePathOnLevel: COEFFICIENT FOR ANIMATION=".concat(c," | COEFFICIENT FOR SPEED=").concat(p));var f=[],d=[],h={left:null,right:null},m=i*c;if(e.debug("Navigation.animatePathOnLevel: POINT LENGTH ".concat(m," or ARRAY LENGTH ").concat(I.length)),this.$path=g(t),this.$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:n,strokeDashoffset:n}).appendTo(r),"line"===e.o.animation.mode)this.$path.addClass("navigation-line-animation");else if(o.includes(e.o.animation.pointModes,e.o.animation.mode))for(var b=0;b<i*c*100;b++)f.push(g("<a/>",{class:this.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<i*c;y++)d.push(g("<img/>",{class:"foot"}));function z(){e.debug("Navigation.animatePathOnLevel: ANIMATION COMPLETE"),setTimeout((function(){l.autoMode&&l.started&&l.advanceToNextFloor()}),u)}function P(A,g,I){A&&g&&A.from(g,I,{css:{top:"-=30%",opacity:0},ease:Bounce.easeOut})}setTimeout((function(){var A=t.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=rA(g.x,g.y)).x/e.contentWidth,y:g.y/e.contentHeight},l.zoomEnabled&&L(g.x,g.y,e.o.animationScale,.6*u,"easeInOutCubic"),l.isOnFirstNavigationFloor()&&l.addStartPin(I[0]),l.isOnLastNavigationFloor()&&l.addEndPin(I[I.length-1]),e.o.developer&&v.startSlider(),l.tween=new a.b({onUpdate:e.o.developer?v.updateSlider:function(){}}),o.includes(e.o.animation.pointModes,e.o.animation.mode)){e.debug("Navigation.animatePathOnLevel: OF POINTS IN ANIMATION=".concat(f.length));for(var C=0;C<f.length;C++)s.append(f[C]);var n=o.map(I,(function(A){return{left:((A=rA(A.x,A.y)).x-f[0].width()/2)/e.contentWidth*100+"%",top:(A.y-f[0].height()/2)/e.contentHeight*100+"%"}})),r=.5/p;e.debug("Navigation.animatePathOnLevel: STAGGER TIME=".concat(r)),l.tween.progress(0).clear().set(l.elementSelector,{css:{left:n[0].left,top:n[0].top,opacity:0},transformOrigin:"top left"}),l.isOnFirstNavigationFloor()&&P(l.tween,l.$startPin,1),l.isOnLastNavigationFloor()&&P(l.tween,l.$endPin,1),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:1},ease:"linear"},r);var c=l.tween.duration(),b=i/2,y=r*(f.length-1);l.tween.staggerTo(l.elementSelector,b,{bezier:{type:"thru",curviness:0,values:n,autoRotate:"arrow"===e.o.animation.mode?0:90},ease:"linear"},r,"-=".concat(y)),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:0},ease:"linear"},r,"-=".concat(y)),e.debug(l.tween.duration()),setTimeout((function(){z()}),(c/100+2)*u)}else if("foot"===e.o.animation.mode){e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES..");var R=a.a.config(I.length);s.append(h.left),s.append(h.right);var x=o.map(I,(function(A){return{left:(A.x-h.left.width()/2)/e.contentWidth*100+"%",top:(A.y-h.left.height()/2)/e.contentHeight*100+"%"}})),w=.5/p;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",x,"STAGGER TIME ".concat(w)),l.tween.progress(0).clear().set(l.elementSelector,{css:{left:x[0].left,top:x[0].top,opacity:0}}),l.tween.to(h.left,.5,{autoAlpha:1,ease:"linear"},w),l.tween.to(h.right,.5,{autoAlpha:1,ease:"linear"},w);var M=i/2,Z=w*(m-1)-M;Z<0&&(Z=w),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(Z)),l.tween.to(h.left,M,{bezier:{type:"thru",curviness:0,values:x,autoRotate:90},transformOrigin:"50% -50%",ease:R},w),l.tween.to(h.right,M,{bezier:{type:"thru",curviness:0,values:x,autoRotate:90},transformOrigin:"50% -50%",ease:R},1.5*w);var D=l.tween.duration();setTimeout((function(){z()}),(D+2)*u)}else if("feet"===e.o.animation.mode){var T=a.a.config(I.length);e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES... | OF FOOT IN ANIMATION: ".concat(d.length));for(var O=0;O<d.length;O++)s.append(d[O]);var j=o.map(I,(function(A){return{left:(A.x-d[0].width()/2)/e.contentWidth*100+"%",top:(A.y-d[0].height()/2)/e.contentHeight*100+"%"}})),N=.5/p;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",j,"STAGGER TIME ".concat(N)),l.tween.progress(0).clear().set(l.elementSelector,{css:{left:j[0].left,top:j[0].top,opacity:0}}),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:1},ease:"linear"},N);var E=i/2,G=N*(d.length-1)-E,X=N*(d.length-1);G<0&&(G=N),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(G)),l.tween.staggerTo(l.elementSelector,E,{bezier:{type:"thru",curviness:0,values:j,autoRotate:90},ease:T,repeatDelay:G},N,"-=".concat(X)),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:0},ease:"linear"},N,"-=".concat(X));var H=l.tween.duration();setTimeout((function(){z()}),(H+2)*u)}else l.isOnFirstNavigationFloor()&&P(l.tween,l.$startPin,1.5),l.isOnLastNavigationFloor()&&P(l.tween,l.$endPin,1.5),l.tween.to(l.$path,i,{strokeDashoffset:0,ease:"easeInOutPower2",delay:0,onComplete:z})}),e.o.cssAnimation?e.o.cssAnimationTime:.1*u),this.animationListener&&this.animationListener(C)}},{key:"advanceToNextFloor",value:function(){var A=this.activeFloors.indexOf(this.activeFloor),g=Math.min(this.activeFloors.length-1,A+1);A!==g?this.showOnLevel(this.activeFloors[g]):this.setAutoMode(!1)}},{key:"setAnimationListener",value:function(A){this.animationListener=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}(),y=function(I){e.data=I;var C=null;if(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("processData: ROTATE "+e.o.rotate);var t=parseFloat(I.mapWidth),n=parseFloat(I.mapHeight),i=Math.max(t,n);e.offsetDueToRotation=i-Math.min(t,n),e.debug("processData: OFFSET DUE TO ROTATION "+e.offsetDueToRotation),e.contentWidth=i,e.contentHeight=i,e.offsetCoefficient=t>n?{90:{x:1,y:0},270:{x:1,y:0}}:{90:{x:0,y:1},270:{x:0,y:1}}}else e.debug("processData: NO ROTATE OR 180"),e.contentWidth=parseFloat(I.mapWidth),e.contentHeight=parseFloat(I.mapHeight);e.$container.css("width","100%");var r=0;I.levels&&I.levels.forEach((function(t,n){e.debug("processData: ADDING LEVEL: "+t.no);var i=t.map,a=g("<div/>",{class:"svg-map-layer "+(e.o.cssAnimation?"svg-map-layer-animated ":"")+M("svg-map-layer-",t.no),"data-floor":t.id,"data-floor-number":t.no}).appendTo(e.$map),s=g("<div/>").addClass("svg-map-map-image").addClass(e.o.locale.language);s.appendTo(a),s.append(i),r++,s.find("svg").attr({class:"svg-map-real-svg"}),e.o.rotate&&F(s,e.o.rotate),t.svgReady=!0,g(e.o.selector,s).each((function(){var A=q(g(this).attr("id"));if(A){if("not-empty"===A.action?Z(g(this),"svg-map-not-clickable"):Z(g(this),"svg-map-clickable"),A.category){var I=K(A.category);I&&g(this).css({fill:"#".concat(I)})}if(A.$el=g(this),A.pin){var C=100*nA(A),t=100*eA(A),n=g("<a/>",{href:"#",class:"svg-map-pin"}).css({top:C+"%",left:t+"%"}).appendTo(a);o.isString(A.pin)&&A.pin.indexOf("pin-image")>-1&&A.thumbnail&&n.addClass("pin-image").css("background-image","url("+A.thumbnail+")"),n.on("click touchend",(function(g){g.preventDefault(),e.dragging||e.showServiceLocation(A.id,1.2*u,!0,!0)}))}}})),g(e.o.serviceSelector,s).each((function(){e.debug("processData: LOAD SERVICE LOCATION ID: "+g(this).attr("id"));var A=_(g(this).attr("id"));A&&(Z(this,"svg-map-clickable"),A.$el=g(this))})),g(e.o.rectSelector,s).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],e=Q(t);e&&(e.$rect=g(this))}}})),e.o.landmark||(g(e.o.selector,s).on("click touchend",(function(){e.dragging?e.debug("processData: selector:click -> dragging (noting action)"):(e.debug("processData: selector:click -> calling self.showLocation"),e.showLocation(g(this).attr("id"),1.2*u,!0,!0))})),g(e.o.serviceSelector,s).on("click touchend",(function(){e.dragging?e.debug("processData: serviceSelector:click -> dragging (noting action)"):(e.debug("processData: serviceSelector:click -> calling self.showLocation"),e.showServiceLocation(g(this).attr("id")))}))),e.$el.trigger("floorReady",[t.id,t.no]),C&&!t.show||(C=t.id),r===I.levels.length&&A.nextTick((function(){e.callbackMapReady(C)}))})),e.callbackMapReady=function(A){if(e.$el.removeClass("svg-map-loading"),oA(A),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*u,!0,e.data.landmark.zoom)}else L(.5,.5,1,0),e.o.stackMode.enabled&&e.stackMode();z((function(A){A?e.debug(A):e.debug("processData: NODES ADDED")})),setTimeout((function(){R((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 d,e.o.hoverTip&&(e.hoverTip=new f,e.hoverTip.init()),e.o.developer&&(e.devTools=new v,e.devTools.init()),e.navigation=new b,g(window).resize((function(){e.$container.height("100%");var A=e.$container.width()/e.contentWidth,g=e.$container.height()/e.contentHeight;e.o.mapFill?(e.debug("processData: MAP FILL"),e.fitscale=A>g?A:g):e.fitscale=A<g?A:g,e.scale=H(e.scale),e.x=G(e.x),e.y=X(e.y),W(e.x,e.y,e.scale,.1*u)})).resize(),e.o.zoom&&w()},z=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};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=gA(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;P(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()}},P=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",lA(A))})).appendTo(I);var t=rA(A.x,A.y),n=t.x/e.contentWidth*100,i=t.y/e.contentHeight*100;C.css({top:i+"%",left:n+"%"})},R=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=IA(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 p=c.value;p.$rect&&x(p,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()},x=function(A,I,C){var t=A.$rect[0]&&A.$rect[0].getBBox();if(t){e.debug("addTextIntoRect: ADDING TEXT:",tA(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/e.scale,"px"))):a.setAttribute("font-size","".concat(i,"px")),g(a).html(tA(A)),g(e.o.noPointerGroupSelector,I).append(g(a)),"dynamic"===e.o.textOnRect.mode?(t.height>t.width?V(a,e.o.rotate<180?270:90):V(a,90===e.o.rotate||180===e.o.rotate?180:0),k(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)&&(D(A,"text-hidden"),Z(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.vertical.x)),A.setAttribute("y","".concat(n.y+C.vertical.y)),V(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)&&(D(A,"text-hidden"),Z(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.horizontal.x)),A.setAttribute("y","".concat(n.y+C.horizontal.y)),V(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)}},w=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=G(I),C=X(C),W(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=e.scale;g===e.o.maxScale?e.scale=H(e.fitscale):e.scale=H(2*g),e.x=G(e.x-(A.pageX-e.$container.offset().left-e.x)*(e.scale/g-1)),e.y=X(e.y-(A.pageY-e.$container.offset().top-e.y)*(e.scale/g-1)),W(e.x,e.y,e.scale,.4*u,"easeInOutCubic")})),e.o.mouseWheel&&g(".svg-map-layer",e.$el).bind("mousewheel DOMMouseScroll",(function(A,g){A.preventDefault();var I=e.scale;e.scale=H(I+I*g/5),e.x=G(e.x-(A.pageX-e.$container.offset().left-e.x)*(e.scale/I-1)),e.y=X(e.y-(A.pageY-e.$container.offset().top-e.y)*(e.scale/I-1)),W(e.x,e.y,e.scale,.2*u,"easeOutCubic")})),!("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=G(C.changedTouches[0].pageX-A.data("touchX")),e.y=X(C.changedTouches[0].pageY-A.data("touchY")),W(e.x,e.y,e.scale,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=e.scale/e.fitscale,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=e.scale;e.scale=H(n*e.fitscale),e.x=G(e.x-(A.center.x-e.$container.offset().left-e.x)*(e.scale/g-1)),e.y=X(e.y-(A.center.y-e.y)*(e.scale/g-1)),W(e.x,e.y,e.scale,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,S(e.rotation-i);break;case"rotateend":e.rotation=e.rotation-i}}))}}},M=function(A,g){return"".concat(A).concat(.5===g?"0-5":g)},Z=function(A,g){var I=O(A);function C(A){A.classList?A.classList.add(g):T(A,g)||A.setAttribute("class","".concat(A.getAttribute("class")," ").concat(g))}I&&(Array.isArray(I)?I.forEach((function(A){C(A)})):C(I))},D=function(A,g){var I=O(A);function C(A){A.classList?A.classList.remove(g):T(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))},T=function(A,g){var I=O(A);return!!I&&(I.classList?I.classList.contains(g):I.getAttribute("class")&&I.getAttribute("class").indexOf(g)>-1)},O=function(A){return A?A.jquery?o.times(A.length,(function(g){return A[g]})):A:null},j=function(A){D(g(".svg-map-navigation-start",A),"svg-map-navigation-start"),D(g(".svg-map-navigation-end",A),"svg-map-navigation-end"),D(g(".svg-map-active",A),"svg-map-active")},N=function(A){A&&Z(A,"svg-map-active")},E=function(A){A&&(T(A,"svg-map-active")?D(A,"svg-map-active"):Z(A,"svg-map-active"))},G=function(A){var g=e.$container.width()-e.contentWidth*e.scale;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},X=function(A){var g=e.$container.height()-e.contentHeight*e.scale;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},H=function(A){return A<e.fitscale?A=e.fitscale:A>e.o.maxScale&&(A=e.o.maxScale),A},k=function(A,g){A.setAttribute("font-size","".concat(e.o.textOnRect.fontSize/e.scale,"px")),A.getBBox().width>g.width?A.getBBox().width>g.height||A.getBBox().height>g.width?(D(A,"text-visible"),Z(A,"text-hidden")):(D(A,"text-hidden"),Z(A,"text-visible")):A.getBBox().width>g.width||A.getBBox().height>g.height?(D(A,"text-visible"),Z(A,"text-hidden")):(D(A,"text-hidden"),Z(A,"text-visible"))},Y=o.debounce((function(){var A=IA(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&&k(this,{width:A,height:g})}))}),600),W=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&&Y(),e.$map.stop().animate({left:A,top:g,width:e.contentWidth*I,height:e.contentHeight*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}))},L=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=CA(i)):r=CA(e.currentLevel),e.debug("moveTo: INITAL SCALE FACTOR: ".concat(r)),C=void 0!==C?C:.4*u,n=void 0!==n?n:.5,I=void 0!==I?Math.min(I*r,e.o.maxScale):e.scale/e.fitscale,e.scale=H(e.fitscale*I),e.x=G(.5*e.$container.width()-e.scale*e.contentWidth*A),e.y=X(e.$container.height()*n-e.scale*e.contentHeight*g),e.debug("moveTo: CONTAINER: (".concat(e.$container.width(),", ").concat(e.$container.height(),") | CONTENT: (").concat(e.contentWidth,", ").concat(e.contentHeight,") | RY: ").concat(n," FITSCALE: ").concat(e.fitscale," SCALE: ").concat(I," | COORD: (").concat(e.x,",").concat(e.y,") SCALE: ").concat(e.scale," DURATION: ").concat(C)),W(e.x,e.y,e.scale,C,t)},S=function(A){F(e.$map,A)},F=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)},V=function(A,g,I){F(A,g,!0,I)},U=function(A){var g={x:eA(A)*e.contentWidth,y:nA(A)*e.contentHeight};e.setCurrentLocation(g.x,g.y,e.userPinTooltip.getUserLocationFloorNumber())},B=function(){e.userPinTooltip&&e.userPinTooltip.show(),e.user&&e.user.show()},J=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},K=function(A){if(!A)return null;var g=o.find(e.data.categories,{slug:A});return g&&g.color},Q=function(A,g){if(!A)return null;var I,C={id:A};g&&(C.type=g);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},q=function(A){return"picker"===e.o.mode?Q(A):Q(A,"store")},_=function(A){return"picker"===e.o.mode?Q(A):Q(A,"service")||Q(A,"kiosk")},$=function(A){return o.find(e.data.levels,{id:A})},AA=function(A){return o.find(e.data.levels,{no:A})},gA=function(A){return g('.svg-map-layer[data-floor="'+A+'"]',e.$el)},IA=function(A){return gA(A).find("svg")},CA=function(A){var g=$(A);return o.get(g,"initialScaleFactor",e.o.initialScaleFactor)},tA=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)},eA=function(A){return A.x&&A.y||aA(A),A.x},nA=function(A){return A.x&&A.y||aA(A),A.y},iA=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,eA(o)),I=Math.max(I,eA(o)),C=Math.min(C,nA(o)),t=Math.max(t,nA(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}},rA=function(A,g){var I={x:A,y:g};return 90===e.o.rotate?I={x:e.contentWidth-I.y-e.offsetCoefficient[90].x*e.offsetDueToRotation/2,y:I.x+e.offsetCoefficient[90].y*e.offsetDueToRotation/2}:270===e.o.rotate?I={x:I.y+e.offsetCoefficient[270].x*e.offsetDueToRotation/2,y:e.contentHeight-I.x-e.offsetCoefficient[270].y*e.offsetDueToRotation/2}:180===e.o.rotate&&(I={x:e.contentWidth-I.x,y:e.contentHeight-I.y}),I},aA=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=rA(C.x,C.y),A.x=C.x/e.contentWidth,A.y=C.y/e.contentHeight}return}}var t=A.$el[0];if(t){var n=t.getBBox();if(n){var i={x:n.x+n.width/2,y:n.y+n.height/2};i=rA(i.x,i.y),A.x=i.x/e.contentWidth,A.y=i.y/e.contentHeight}}}},oA=function(A,I,C){if(C&&e.hideLocation(),A){var t=$(A);if(t){var n=gA(A);if(e.currentLevel!==A)if(e.o.cssAnimation||!n.hasClass("layer-visible")){if(e.debug("switchLevel: FLOOR CURRENT:".concat(e.currentLevelNumber,", SWITCH TO:").concat(t.no)),I&&L(.5,.5,1,0,void 0,void 0,A),e.tooltip&&e.tooltip.hide(),e.o.rotate&&(e.o.rotateServices&&g(e.o.serviceSelector,n).each((function(){V(this,360-e.o.rotate)})),g(e.o.rotatable90PathSelector,n).each((function(){V(this,360-e.o.rotate)})),180===e.o.rotate&&g(e.o.rotatable180PathSelector,n).each((function(){V(this,360-e.o.rotate)})),270===e.o.rotate?g(e.o.rotatable270TextSelector,n).each((function(){V(this,180)})):180===e.o.rotate&&g(e.o.rotatable180TextSelector,n).each((function(){V(this,180)}))),e.o.stackMode.enabled){var i=!0,r=!1,a=void 0;try{for(var o,s=e.data.levels[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value,c=gA(l.id);l.no<t.no?c.removeClass("svg-map-layer-down").addClass("svg-map-layer-up"):l.no>t.no?c.removeClass("svg-map-layer-up").addClass("svg-map-layer-down"):(c.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==s.return||s.return()}finally{if(r)throw a}}e.navigation.animationStarted()&&e.navigation.removeEscalatorAnimation(),e.stackModeActive=!1}if(e.currentLevel=A,e.currentLevelNumber=t.no,e.o.cssAnimation){var u=!0,p=!1,f=void 0;try{for(var v,d=e.data.levels[Symbol.iterator]();!(u=(v=d.next()).done);u=!0){var h=v.value,m=gA(h.id);e.$map.removeClass(M("map--selected-",h.no)),m.removeClass("active").removeClass("hidden")}}catch(A){p=!0,f=A}finally{try{u||null==d.return||d.return()}finally{if(p)throw f}}var b=gA(A);e.$map.addClass(M("map--selected-",t.no)),b.addClass("active")}else g(".svg-map-layer.layer-visible",e.$map).removeClass("layer-visible"),n.addClass("layer-visible");B(),e.debug("switchLevel: SWITCHED LEVEL"),e.$el.trigger("levelSwitched",[t.id,t.no])}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(),L(.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=gA(I.id);t.removeClass("hidden").removeClass("active"),e.$map.removeClass(M("map--selected-",I.no)),t[0].setAttribute("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=$(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 sA=function(A){return o.omit(A,["$el","$rect","x","y"])},lA=function(A){return o.omit(A,["x","y"])};e.zoomIn=function(){var A=e.scale;e.scale=H(A+.8*A),e.x=G(e.x-(e.$container.width()/2-e.x)*(e.scale/A-1)),e.y=X(e.y-(e.$container.height()/2-e.y)*(e.scale/A-1)),W(e.x,e.y,e.scale,.4*u,"easeInOutCubic")},e.zoomOut=function(){var A=e.scale;e.scale=H(A-.4*A),e.x=G(e.x-(e.$container.width()/2-e.x)*(e.scale/A-1)),e.y=X(e.y-(e.$container.height()/2-e.y)*(e.scale/A-1)),W(e.x,e.y,e.scale,.4*u,"easeInOutCubic")},e.resetLevel=function(){S(0),e.hideLocation(),L(.5,.5,1,.4*u,"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=AA(A);n&&(e.navigation.setAutoMode(C),t&&e.navigation.started||oA(n.id,g,I),e.navigation.animationStarted()&&e.navigation.showOnLevel(n.no,t))},e.highlightLocation=function(A,g,I){e.debug("highlightLocation: HIGHLIGHT LOCATION? "+A);var C=q(A);if(C){var t=J(C.id);if(t){if(oA(t.id),g){var n=C.zoom?parseFloat(C.zoom):e.o.maxScale;L(eA(C),nA(C),n,I,"easeInOutCubic")}j(e.$el),N(C.$el),e.$el.trigger("locationHighlighted",sA(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=q(A);if(t){var n=J(t.id);if(n){I&&(e.debug("showLocation: close navigation"),e.closeNavigation());var i=t.action&&"default"!==t.action?t.action:e.o.action;e.debug("showLocation: action="+i);var 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)E(t.$el);else if("zoom"===i){oA(n.id,C);var a=t.zoom?parseFloat(t.zoom):e.o.maxScale;C&&L(eA(t),nA(t),a,g,"easeInOutCubic")}else if("pin"===i)oA(n.id),e.tooltip&&e.tooltip.show(t,g);else if("tooltip"===i)oA(n.id),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));j(e.$el),N(t.$el),e.$el.trigger("locationOpened",sA(t))}else e.error("showLocation: level not found")}else e.error("showLocation: location not found")},e.highlightServiceLocation=function(A,g,I){e.debug("highlightServiceLocation: HIGHLIGHT SERVICE LOCATION? "+A);var C=_(A);if(C){var t=J(C.id);if(t){if(oA(t.id),g){var n=C.zoom?parseFloat(C.zoom):e.o.maxScale;L(eA(C),nA(C),n,I,"easeInOutCubic")}j(e.$el),N(C.$el),e.$el.trigger("serviceLocationHighlighted",sA(C))}}},e.showServiceLocation=function(A,g){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.debug("showServiceLocation: id="+A);var C=_(A);if(C)if("kiosk"!==C.type){var t=J(C.id);if(t){I&&(e.debug("showServiceLocation: close navigation"),e.closeNavigation());var n=C.action&&"default"!==C.action?C.action:e.o.action;e.debug("showServiceLocation: action="+n);var i=(e.data.landmark||{}).zoom;if(e.o.landmark&&o.isBoolean(i)&&!i&&(e.debug("showServiceLocation: ZOOM NOT ENABLED FOR LANDMARK"),n="tooltip",e.o.zoomToSelected=!1),"select"===n)E(C.$el);else if("zoom"===n){oA(t.id);var r=C.zoom?parseFloat(C.zoom):e.o.maxScale;L(eA(C),nA(C),r,g,"easeInOutCubic")}else if("tooltip"===n)oA(t.id),e.tooltip&&e.tooltip.show(C,g);else if("not-empty"===n)return void(e.o.locationCannotBeSelected&&e.o.locationCannotBeSelected(C.id));j(e.$el),N(C.$el),e.$el.trigger("serviceLocationOpened",sA(C))}else e.error("showServiceLocation: level not found")}else e.error("showServiceLocation: kiosk service cannot be selected");else e.error("showServiceLocation: location not found")},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 q(A)})));if(t.length){var n=t[0],i=J(n.id);if(i){if(oA(i.id),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=iA(t);L(a.x,a.y,r,I,"easeInOutCubic")}j(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,p=t[Symbol.iterator]();!(s=(u=p.next()).done);s=!0){var f=u.value;N(f.$el)}}catch(A){l=!0,c=A}finally{try{s||null==p.return||p.return()}finally{if(l)throw c}}e.$el.trigger("locationsHighlighted")}}}},e.showServiceLocations=function(A){var g;if(e.debug("showServiceLocations: SHOW SERVICE LOCATIONS? "+A),g=Array.isArray(A)?A:[A],e.closeNavigation(),g.length<=1)e.showServiceLocation(g[0]);else{var I=o.filter(o.map(g,(function(A){return _(A)})));if(I.length){var C=I[0],t=J(C.id);if(t){oA(t.id),e.tooltip&&e.tooltip.show(I),j(e.$el);var n=!0,i=!1,r=void 0;try{for(var a,s=I[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value;N(l.$el)}}catch(A){i=!0,r=A}finally{try{n||null==s.return||s.return()}finally{if(i)throw r}}e.$el.trigger("serviceLocationOpened",sA(C))}}}},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 _(A)})));if(t.length){var n=t[0],i=J(n.id);if(i){if(oA(i.id),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=iA(t);L(a.x,a.y,r,I,"easeInOutCubic")}j(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,p=t[Symbol.iterator]();!(s=(u=p.next()).done);s=!0){var f=u.value;N(f.$el)}}catch(A){l=!0,c=A}finally{try{s||null==p.return||p.return()}finally{if(l)throw c}}e.$el.trigger("serviceLocationsHighlighted")}}}},e.hideLocation=function(){e.debug("hideLocation: HIDE LOCATION INSIDE:",e.$el),j(e.$el),e.tooltip&&e.tooltip.hide(),e.$el.trigger("locationClosed")},e.setCurrentLocationFromBlock=function(A){var g=Q(A);if(g){var I=J(A),C=$(e.currentLevel);e.userPinTooltip.addUserLocation(g,I.no),C&&C.no===e.userPinTooltip.getUserLocationFloorNumber()?(e.debug("set current location"),U(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)?AA(I):$(e.currentLevel),e.userPinTooltip.addUserLocationPoint(A,g,C.no),$(e.currentLevel).no===e.userPinTooltip.getUserLocationFloorNumber()&&B()},e.updateLocalized=function(A){var g=A.youAreHereText,I=A.navigationText,C=A.closeText,t=A.detailText,n=A.floorText;g&&e.userPinTooltip.updateLocalized(g),(I||C||t||n)&&e.tooltip.updateLocalized({navigationText:I,closeText:C,detailText:t,floorText:n})},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)?AA(I):$(e.currentLevel),e.user?e.user.resetUserLocation():e.user=new h,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)?AA(g):$(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];e.__navigationData={navigationDetails:A,autoMode:g,zoomEnabled:I,showPins:C};try{return e.navigation.init(A),e.navigation.show(g,I,C),!0}catch(A){return e.error(A),!1}},e.closeNavigation=function(){var A=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];C.navigation.removePathAnimations(),C.navigation.setAutoMode(!1),C.navigation.removeEscalatorAnimation(),C.navigation.activeFloor=null,e.__navigationData=null,A&&e.resetLevel(),e.$el.trigger("navigationCancelled")},e.restartNavigation=function(){var A=e.o.cssAnimation?e.o.cssAnimationTime:.1*u,g=e.__navigationData||{},I=g.navigationDetails,C=g.autoMode,t=g.zoomEnabled,n=g.showPins;I&&(e.__navigationData=null,setTimeout((function(){e.closeNavigation(!0),e.showNavigation(I,C,t,n)}),A))},e.mto=function(A,g,I,C,t,e){L(A,g,I,C,t,e)},e.zto=function(A,g,I,C,t){W(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)}};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),I(/*! ./sp/v2 */65)),u=1e3;g.default=function(g){l(g);var I=function(I){var C=this,e=this;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*u},draggable:!0,landmark:!1,mapFill:!1,height:420,zoomToSelected:!0,rotatable:!1,action:"tooltip",hoverTip:!0,tooltip:{enabled:!0,navigation:!1,detail:!1,renderTemplate:!1},smartip:!0,fillColor:"",developer:!1,mouseWheel:!0,maxScale:4,animationScale:1.5,cssAnimation:!0,cssAnimationTime:u,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.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.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=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}y(g)}),.1*u),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)))}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.$close&&this.$close.on("click touchend",(function(A){A.preventDefault(),e.hideLocation(),e.o.zoom||L(.5,.5,1,1.2*u,"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(tA(A)),this.$detail&&this.$detail.text(e.o.tooltip.detail.text||"DETAIL"),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){var A=e.$map.offset().left+e.$map.width()*eA(this.location)-e.$container.offset().left,g=e.$map.offset().top+e.$map.height()*nA(this.location)-e.$container.offset().top,I=100*eA(this.location),C=100*nA(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 L(.5,.5,1,1.2*u,"easeInOutCubic");var I=A.zoom?parseFloat(A.zoom):e.o.maxScale,C=((e.$container.height()-this.drop)/2+this.drop)/e.$container.height();L(eA(A),nA(A),I,g||1.2*u,"easeInOutCubic",C)}},{key:"hide",value:function(){var A=this;this.location=null,this.$el.stop().fadeOut(.3*u,(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&&(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.text(A.closeText),A.detailText&&this.$detail.text(A.detailText),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=q(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=_(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(tA(A)),this.position(A),this.$el.stop().fadeIn(.1*u)))}},{key:"position",value:function(A){var g,I=e.$map.offset().left+e.$map.width()*eA(A)-e.$container.offset().left,C=e.$map.offset().top+e.$map.height()*nA(A)-e.$container.offset().top,t=100*eA(A),n=100*nA(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*u)}}]),A}(),v=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:"restart-nav",text:"restart navigation"})),A.append(g("<button/>",{id:"stack-mode",text:"show stack mode"})),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("#restart-nav").click((function(){e.restartNavigation()})),g("#stack-mode").click((function(){e.stackMode()}))}}],[{key:"startSlider",value:function(){g("#slider").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))}})}},{key:"updateSlider",value:function(){e.navigation.tween&&g("#slider").slider("value",100*e.navigation.tween.progress())}}]),A}(),d=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=$(e.currentLevel);if(A&&A.no===this.currentUserLocation.floorNo){if(!this.isUserLocationPointAvailable()){e.debug("UserPinTooltip: PATCHING..");var g=this.currentUserLocation.location;U(g)}var I=gA(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*u)}},{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 m,this.currentUserLocation.addPoint(A/e.contentWidth,g/e.contentHeight,I)}},{key:"addUserLocation",value:function(A,g){this.currentUserLocation=new m(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}(),h=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=rA(A,g);this.addUserLocationPoint(C.x,C.y,I)}},{key:"show",value:function(){if(this.remove(),$(e.currentLevel).no===this.getUserLocationFloorNumber()&&this.isUserLocationAvailable()){var A=gA(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&&L(this.currentLocation.getX(),this.currentLocation.getY(),2,.6*u,"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 m,this.currentLocation.addPoint(A/e.contentWidth,g/e.contentHeight,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()*e.contentWidth,y:this.currentLocation.getY()*e.contentHeight});var n=b.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/u,l=o.map(I,(function(A){var g=rA(A.x,A.y);return{left:g.x/e.contentWidth*100+"%",top:g.y/e.contentHeight*100+"%"}}));t&&l.unshift({left:t.x/e.contentWidth*100+"%",top:t.y/e.contentHeight*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}(),m=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}(),b=function(){function A(){t()(this,A),this.routeData=[],this.activeFloors=[],this.activeFloor=null,this.startLocation=null,this.$startPin=null,this.endLocation=null,this.$endPin=null,this.autoMode=!1,this.zoomEnabled=!0,this.showPins=!0,this.started=!1,this.$path=null,this.tween=null,this.animationListener=null,this.elementSelector=".walking"}return n()(A,[{key:"init",value:function(g){if(this.routeData=[],this.activeFloors=g.direction,this.endLocation=Q(g.end),!this.activeFloors||0===this.activeFloors.length)throw new Error("No direction found in SP");if(g.start){var I=g.start;if(I.location){var C=Q(I.location);C&&(this.startLocation=C)}}var t=!0,n=!1,i=void 0;try{for(var r,a=g.floors[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var o=r.value,s={no:o.no,points:[]},l=!0,c=!1,u=void 0;try{for(var p,f=o.lines[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var v=p.value;s.points.push({x:v.x1,y:v.y1})}}catch(A){c=!0,u=A}finally{try{l||null==f.return||f.return()}finally{if(c)throw u}}var d=o.lines[o.lines.length-1];if(s.points.push({x:d.x2,y:d.y2}),s.end_floor=!d.level_changer,s.level_changer=d.level_changer,s.path=A.convertLinesToPath(s.points),!s.path)throw new Error("Path cannot be calculated of floor:"+o.no);this.routeData.push(s)}}catch(A){n=!0,i=A}finally{try{t||null==a.return||a.return()}finally{if(n)throw i}}"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=AA(g.no),C=gA(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=AA(g.no);gA(I.id).removeClass("escalator-up").removeClass("escalator-down")}}))}},{key:"show",value:function(A,g,I){this.autoMode=A,this.zoomEnabled=g,this.showPins=I,(this.startLocation&&this.startLocation.$el||this.endLocation&&this.endLocation.$el)&&(j(e.$el),this.startLocation&&this.startLocation.$el&&(Z(this.startLocation.$el,"svg-map-active"),Z(this.startLocation.$el,"svg-map-navigation-start")),this.endLocation&&this.endLocation.$el&&(Z(this.endLocation.$el,"svg-map-active"),Z(this.endLocation.$el,"svg-map-navigation-end"))),this.advanceToNextFloor()}},{key:"navigationEvent",value:function(){var A=this.activeFloors.indexOf(this.activeFloor),I=this.activeFloors[A],C=this.activeFloors[0]===I,t=this.activeFloors[this.activeFloors.length-1]===I,n=t?null:this.activeFloors[A+1];e.$el.trigger("navigation",{isFirst:C,isLast:t,current:I,next:n}),e.o.developer&&g("#navigatingText").text("Current Floor = ".concat(I," | Is First Floor = ").concat(C," | Is Last Floor = ").concat(t," | Next Floor = ").concat(n))}},{key:"showOnLevel",value:function(A){var g=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],I=o.find(this.routeData,{no:A});if(I)if(this.activeFloor!==A){var C=AA(A);if(g){if(e.o.animation.stackAnimation&&e.o.stackMode.enabled&&!e.stackModeActive)return void e.stackMode(C.id,this.autoMode);oA(C.id,!0)}this.activeFloor=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}),this.started=!0}else e.debug("Navigation.showOnLevel: ACTIVE FLOOR SP ALREADY SHOWN");else e.debug("Navigation.showOnLevel: 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=rA(A.x,A.y),C=gA(e.currentLevel),t=I.x/e.contentWidth*100,n=I.y/e.contentHeight*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=rA(A.x,A.y),C=gA(e.currentLevel),t=I.x/e.contentWidth*100,n=I.y/e.contentHeight*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&&this.activeFloor===this.activeFloors[0]}},{key:"isOnLastNavigationFloor",value:function(){return this.activeFloors&&this.activeFloor===this.activeFloors[this.activeFloors.length-1]}},{key:"navigationWay",value:function(){return this.activeFloors[0]>this.activeFloors[1]?1:0}},{key:"animatePathOnLevel",value:function(A,I,C){e.debug("Navigation.animatePathOnLevel: pathString=",A,"| points=",I);var t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",A);var n=t.getTotalLength()+150,i=n*e.o.animation.speedFactor/u;e.debug("Navigation.animatePathOnLevel: PATH LENGTH="+n,"ANIMATION DURATION="+i);var r=IA(e.currentLevel),s=gA(e.currentLevel),l=this,c=16/e.o.animation.frequencyFactor,p=16/e.o.animation.speedFactor;e.debug("Navigation.animatePathOnLevel: COEFFICIENT FOR ANIMATION=".concat(c," | COEFFICIENT FOR SPEED=").concat(p));var f=[],d=[],h={left:null,right:null},m=i*c;if(e.debug("Navigation.animatePathOnLevel: POINT LENGTH ".concat(m," or ARRAY LENGTH ").concat(I.length)),this.$path=g(t),this.$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:n,strokeDashoffset:n}).appendTo(r),"line"===e.o.animation.mode)this.$path.addClass("navigation-line-animation");else if(o.includes(e.o.animation.pointModes,e.o.animation.mode))for(var b=0;b<i*c*100;b++)f.push(g("<a/>",{class:this.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<i*c;y++)d.push(g("<img/>",{class:"foot"}));function z(){e.debug("Navigation.animatePathOnLevel: ANIMATION COMPLETE"),setTimeout((function(){l.autoMode&&l.started&&l.advanceToNextFloor()}),u)}function P(A,g,I){A&&g&&A.from(g,I,{css:{top:"-=30%",opacity:0},ease:Bounce.easeOut})}setTimeout((function(){var A=t.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=rA(g.x,g.y)).x/e.contentWidth,y:g.y/e.contentHeight},l.zoomEnabled&&L(g.x,g.y,e.o.animationScale,.6*u,"easeInOutCubic"),l.isOnFirstNavigationFloor()&&l.addStartPin(I[0]),l.isOnLastNavigationFloor()&&l.addEndPin(I[I.length-1]),e.o.developer&&v.startSlider(),l.tween=new a.b({onUpdate:e.o.developer?v.updateSlider:function(){}}),o.includes(e.o.animation.pointModes,e.o.animation.mode)){e.debug("Navigation.animatePathOnLevel: OF POINTS IN ANIMATION=".concat(f.length));for(var C=0;C<f.length;C++)s.append(f[C]);var n=o.map(I,(function(A){return{left:((A=rA(A.x,A.y)).x-f[0].width()/2)/e.contentWidth*100+"%",top:(A.y-f[0].height()/2)/e.contentHeight*100+"%"}})),r=.5/p;e.debug("Navigation.animatePathOnLevel: STAGGER TIME=".concat(r)),l.tween.progress(0).clear().set(l.elementSelector,{css:{left:n[0].left,top:n[0].top,opacity:0},transformOrigin:"top left"}),l.isOnFirstNavigationFloor()&&P(l.tween,l.$startPin,1),l.isOnLastNavigationFloor()&&P(l.tween,l.$endPin,1),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:1},ease:"linear"},r);var c=l.tween.duration(),b=i/2,y=r*(f.length-1);l.tween.staggerTo(l.elementSelector,b,{bezier:{type:"thru",curviness:0,values:n,autoRotate:"arrow"===e.o.animation.mode?0:90},ease:"linear"},r,"-=".concat(y)),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:0},ease:"linear"},r,"-=".concat(y)),e.debug(l.tween.duration()),setTimeout((function(){z()}),(c/100+2)*u)}else if("foot"===e.o.animation.mode){e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES..");var R=a.a.config(I.length);s.append(h.left),s.append(h.right);var x=o.map(I,(function(A){return{left:(A.x-h.left.width()/2)/e.contentWidth*100+"%",top:(A.y-h.left.height()/2)/e.contentHeight*100+"%"}})),w=.5/p;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",x,"STAGGER TIME ".concat(w)),l.tween.progress(0).clear().set(l.elementSelector,{css:{left:x[0].left,top:x[0].top,opacity:0}}),l.tween.to(h.left,.5,{autoAlpha:1,ease:"linear"},w),l.tween.to(h.right,.5,{autoAlpha:1,ease:"linear"},w);var M=i/2,Z=w*(m-1)-M;Z<0&&(Z=w),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(Z)),l.tween.to(h.left,M,{bezier:{type:"thru",curviness:0,values:x,autoRotate:90},transformOrigin:"50% -50%",ease:R},w),l.tween.to(h.right,M,{bezier:{type:"thru",curviness:0,values:x,autoRotate:90},transformOrigin:"50% -50%",ease:R},1.5*w);var D=l.tween.duration();setTimeout((function(){z()}),(D+2)*u)}else if("feet"===e.o.animation.mode){var T=a.a.config(I.length);e.debug("Navigation.animatePathOnLevel: ADDING FOOT IMAGES... | OF FOOT IN ANIMATION: ".concat(d.length));for(var O=0;O<d.length;O++)s.append(d[O]);var j=o.map(I,(function(A){return{left:(A.x-d[0].width()/2)/e.contentWidth*100+"%",top:(A.y-d[0].height()/2)/e.contentHeight*100+"%"}})),N=.5/p;e.debug("Navigation.animatePathOnLevel: FIXED POINTS",j,"STAGGER TIME ".concat(N)),l.tween.progress(0).clear().set(l.elementSelector,{css:{left:j[0].left,top:j[0].top,opacity:0}}),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:1},ease:"linear"},N);var E=i/2,G=N*(d.length-1)-E,X=N*(d.length-1);G<0&&(G=N),e.debug("Navigation.animatePathOnLevel: REPEAT DELAY ".concat(G)),l.tween.staggerTo(l.elementSelector,E,{bezier:{type:"thru",curviness:0,values:j,autoRotate:90},ease:T,repeatDelay:G},N,"-=".concat(X)),l.tween.staggerTo(l.elementSelector,.1,{css:{opacity:0},ease:"linear"},N,"-=".concat(X));var H=l.tween.duration();setTimeout((function(){z()}),(H+2)*u)}else l.isOnFirstNavigationFloor()&&P(l.tween,l.$startPin,1.5),l.isOnLastNavigationFloor()&&P(l.tween,l.$endPin,1.5),l.tween.to(l.$path,i,{strokeDashoffset:0,ease:"easeInOutPower2",delay:0,onComplete:z})}),e.o.cssAnimation?e.o.cssAnimationTime:.1*u),this.animationListener&&this.animationListener(C)}},{key:"advanceToNextFloor",value:function(){var A=this.activeFloors.indexOf(this.activeFloor),g=Math.min(this.activeFloors.length-1,A+1);A!==g?this.showOnLevel(this.activeFloors[g]):this.setAutoMode(!1)}},{key:"setAnimationListener",value:function(A){this.animationListener=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}(),y=function(I){e.data=I;var C=null;if(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("processData: ROTATE "+e.o.rotate);var t=parseFloat(I.mapWidth),n=parseFloat(I.mapHeight),i=Math.max(t,n);e.offsetDueToRotation=i-Math.min(t,n),e.debug("processData: OFFSET DUE TO ROTATION "+e.offsetDueToRotation),e.contentWidth=i,e.contentHeight=i,e.offsetCoefficient=t>n?{90:{x:1,y:0},270:{x:1,y:0}}:{90:{x:0,y:1},270:{x:0,y:1}}}else e.debug("processData: NO ROTATE OR 180"),e.contentWidth=parseFloat(I.mapWidth),e.contentHeight=parseFloat(I.mapHeight);e.$container.css("width","100%");var r=0;I.levels&&I.levels.forEach((function(t,n){e.debug("processData: ADDING LEVEL: "+t.no);var i=t.map,a=g("<div/>",{class:"svg-map-layer "+(e.o.cssAnimation?"svg-map-layer-animated ":"")+M("svg-map-layer-",t.no),"data-floor":t.id,"data-floor-number":t.no}).appendTo(e.$map),s=g("<div/>").addClass("svg-map-map-image").addClass(e.o.locale.language);s.appendTo(a),s.append(i),r++,s.find("svg").attr({class:"svg-map-real-svg"}),e.o.rotate&&F(s,e.o.rotate),t.svgReady=!0,g(e.o.selector,s).each((function(){var A=q(g(this).attr("id"));if(A){if("not-empty"===A.action?Z(g(this),"svg-map-not-clickable"):Z(g(this),"svg-map-clickable"),A.category){var I=K(A.category);I&&g(this).css({fill:"#".concat(I)})}if(A.$el=g(this),A.pin){var C=100*nA(A),t=100*eA(A),n=g("<a/>",{href:"#",class:"svg-map-pin"}).css({top:C+"%",left:t+"%"}).appendTo(a);o.isString(A.pin)&&A.pin.indexOf("pin-image")>-1&&A.thumbnail&&n.addClass("pin-image").css("background-image","url("+A.thumbnail+")"),n.on("click touchend",(function(g){g.preventDefault(),e.dragging||e.showServiceLocation(A.id,1.2*u,!0,!0)}))}}})),g(e.o.serviceSelector,s).each((function(){e.debug("processData: LOAD SERVICE LOCATION ID: "+g(this).attr("id"));var A=_(g(this).attr("id"));A&&(Z(this,"svg-map-clickable"),A.$el=g(this))})),g(e.o.rectSelector,s).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],e=Q(t);e&&(e.$rect=g(this))}}})),e.o.landmark||(g(e.o.selector,s).on("click touchend",(function(){e.dragging?e.debug("processData: selector:click -> dragging (noting action)"):(e.debug("processData: selector:click -> calling self.showLocation"),e.showLocation(g(this).attr("id"),1.2*u,!0,!0))})),g(e.o.serviceSelector,s).on("click touchend",(function(){e.dragging?e.debug("processData: serviceSelector:click -> dragging (noting action)"):(e.debug("processData: serviceSelector:click -> calling self.showLocation"),e.showServiceLocation(g(this).attr("id")))}))),e.$el.trigger("floorReady",[t.id,t.no]),C&&!t.show||(C=t.id),r===I.levels.length&&A.nextTick((function(){e.callbackMapReady(C)}))})),e.callbackMapReady=function(A){if(e.$el.removeClass("svg-map-loading"),oA(A),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*u,!0,e.data.landmark.zoom)}else L(.5,.5,1,0),e.o.stackMode.enabled&&e.stackMode();z((function(A){A?e.debug(A):e.debug("processData: NODES ADDED")})),setTimeout((function(){R((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 d,e.o.hoverTip&&(e.hoverTip=new f,e.hoverTip.init()),e.o.developer&&(e.devTools=new v,e.devTools.init()),e.navigation=new b,g(window).resize((function(){e.$container.height("100%");var A=e.$container.width()/e.contentWidth,g=e.$container.height()/e.contentHeight;e.o.mapFill?(e.debug("processData: MAP FILL"),e.fitscale=A>g?A:g):e.fitscale=A<g?A:g,e.scale=H(e.scale),e.x=G(e.x),e.y=X(e.y),W(e.x,e.y,e.scale,.1*u)})).resize(),e.o.zoom&&w()},z=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};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=gA(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;P(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()}},P=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",lA(A))})).appendTo(I);var t=rA(A.x,A.y),n=t.x/e.contentWidth*100,i=t.y/e.contentHeight*100;C.css({top:i+"%",left:n+"%"})},R=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=IA(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 p=c.value;p.$rect&&x(p,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()},x=function(A,I,C){var t=A.$rect[0]&&A.$rect[0].getBBox();if(t){e.debug("addTextIntoRect: ADDING TEXT:",tA(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/e.scale,"px"))):a.setAttribute("font-size","".concat(i,"px")),g(a).html(tA(A)),g(e.o.noPointerGroupSelector,I).append(g(a)),"dynamic"===e.o.textOnRect.mode?(t.height>t.width?V(a,e.o.rotate<180?270:90):V(a,90===e.o.rotate||180===e.o.rotate?180:0),k(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)&&(D(A,"text-hidden"),Z(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.vertical.x)),A.setAttribute("y","".concat(n.y+C.vertical.y)),V(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)&&(D(A,"text-hidden"),Z(A,"text-visible"),A.setAttribute("x","".concat(n.x+C.horizontal.x)),A.setAttribute("y","".concat(n.y+C.horizontal.y)),V(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)}},w=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=G(I),C=X(C),W(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=e.scale;g===e.o.maxScale?e.scale=H(e.fitscale):e.scale=H(2*g),e.x=G(e.x-(A.pageX-e.$container.offset().left-e.x)*(e.scale/g-1)),e.y=X(e.y-(A.pageY-e.$container.offset().top-e.y)*(e.scale/g-1)),W(e.x,e.y,e.scale,.4*u,"easeInOutCubic")})),e.o.mouseWheel&&g(".svg-map-layer",e.$el).bind("mousewheel DOMMouseScroll",(function(A,g){A.preventDefault();var I=e.scale;e.scale=H(I+I*g/5),e.x=G(e.x-(A.pageX-e.$container.offset().left-e.x)*(e.scale/I-1)),e.y=X(e.y-(A.pageY-e.$container.offset().top-e.y)*(e.scale/I-1)),W(e.x,e.y,e.scale,.2*u,"easeOutCubic")})),!("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=G(C.changedTouches[0].pageX-A.data("touchX")),e.y=X(C.changedTouches[0].pageY-A.data("touchY")),W(e.x,e.y,e.scale,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=e.scale/e.fitscale,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=e.scale;e.scale=H(n*e.fitscale),e.x=G(e.x-(A.center.x-e.$container.offset().left-e.x)*(e.scale/g-1)),e.y=X(e.y-(A.center.y-e.y)*(e.scale/g-1)),W(e.x,e.y,e.scale,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,S(e.rotation-i);break;case"rotateend":e.rotation=e.rotation-i}}))}}},M=function(A,g){return"".concat(A).concat(.5===g?"0-5":g)},Z=function(A,g){var I=O(A);function C(A){A.classList?A.classList.add(g):T(A,g)||A.setAttribute("class","".concat(A.getAttribute("class")," ").concat(g))}I&&(Array.isArray(I)?I.forEach((function(A){C(A)})):C(I))},D=function(A,g){var I=O(A);function C(A){A.classList?A.classList.remove(g):T(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))},T=function(A,g){var I=O(A);return!!I&&(I.classList?I.classList.contains(g):I.getAttribute("class")&&I.getAttribute("class").indexOf(g)>-1)},O=function(A){return A?A.jquery?o.times(A.length,(function(g){return A[g]})):A:null},j=function(A){D(g(".svg-map-navigation-start",A),"svg-map-navigation-start"),D(g(".svg-map-navigation-end",A),"svg-map-navigation-end"),D(g(".svg-map-active",A),"svg-map-active")},N=function(A){A&&Z(A,"svg-map-active")},E=function(A){A&&(T(A,"svg-map-active")?D(A,"svg-map-active"):Z(A,"svg-map-active"))},G=function(A){var g=e.$container.width()-e.contentWidth*e.scale;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},X=function(A){var g=e.$container.height()-e.contentHeight*e.scale;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},H=function(A){return A<e.fitscale?A=e.fitscale:A>e.o.maxScale&&(A=e.o.maxScale),A},k=function(A,g){A.setAttribute("font-size","".concat(e.o.textOnRect.fontSize/e.scale,"px")),A.getBBox().width>g.width?A.getBBox().width>g.height||A.getBBox().height>g.width?(D(A,"text-visible"),Z(A,"text-hidden")):(D(A,"text-hidden"),Z(A,"text-visible")):A.getBBox().width>g.width||A.getBBox().height>g.height?(D(A,"text-visible"),Z(A,"text-hidden")):(D(A,"text-hidden"),Z(A,"text-visible"))},Y=o.debounce((function(){var A=IA(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&&k(this,{width:A,height:g})}))}),600),W=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&&Y(),e.$map.stop().animate({left:A,top:g,width:e.contentWidth*I,height:e.contentHeight*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}))},L=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=CA(i)):r=CA(e.currentLevel),e.debug("moveTo: INITAL SCALE FACTOR: ".concat(r)),C=void 0!==C?C:.4*u,n=void 0!==n?n:.5,I=void 0!==I?Math.min(I*r,e.o.maxScale):e.scale/e.fitscale,e.scale=H(e.fitscale*I),e.x=G(.5*e.$container.width()-e.scale*e.contentWidth*A),e.y=X(e.$container.height()*n-e.scale*e.contentHeight*g),e.debug("moveTo: CONTAINER: (".concat(e.$container.width(),", ").concat(e.$container.height(),") | CONTENT: (").concat(e.contentWidth,", ").concat(e.contentHeight,") | RY: ").concat(n," FITSCALE: ").concat(e.fitscale," SCALE: ").concat(I," | COORD: (").concat(e.x,",").concat(e.y,") SCALE: ").concat(e.scale," DURATION: ").concat(C)),W(e.x,e.y,e.scale,C,t)},S=function(A){F(e.$map,A)},F=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)},V=function(A,g,I){F(A,g,!0,I)},U=function(A){var g={x:eA(A)*e.contentWidth,y:nA(A)*e.contentHeight};e.setCurrentLocation(g.x,g.y,e.userPinTooltip.getUserLocationFloorNumber())},B=function(){e.userPinTooltip&&e.userPinTooltip.show(),e.user&&e.user.show()},J=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},K=function(A){if(!A)return null;var g=o.find(e.data.categories,{slug:A});return g&&g.color},Q=function(A,g){if(!A)return null;var I,C={id:A};g&&(C.type=g);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},q=function(A){return"picker"===e.o.mode?Q(A):Q(A,"store")},_=function(A){return"picker"===e.o.mode?Q(A):Q(A,"service")||Q(A,"kiosk")},$=function(A){return o.find(e.data.levels,{id:A})},AA=function(A){return o.find(e.data.levels,{no:A})},gA=function(A){return g('.svg-map-layer[data-floor="'+A+'"]',e.$el)},IA=function(A){return gA(A).find("svg")},CA=function(A){var g=$(A);return o.get(g,"initialScaleFactor",e.o.initialScaleFactor)},tA=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)},eA=function(A){return A.x&&A.y||aA(A),A.x},nA=function(A){return A.x&&A.y||aA(A),A.y},iA=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,eA(o)),I=Math.max(I,eA(o)),C=Math.min(C,nA(o)),t=Math.max(t,nA(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}},rA=function(A,g){var I={x:A,y:g};return 90===e.o.rotate?I={x:e.contentWidth-I.y-e.offsetCoefficient[90].x*e.offsetDueToRotation/2,y:I.x+e.offsetCoefficient[90].y*e.offsetDueToRotation/2}:270===e.o.rotate?I={x:I.y+e.offsetCoefficient[270].x*e.offsetDueToRotation/2,y:e.contentHeight-I.x-e.offsetCoefficient[270].y*e.offsetDueToRotation/2}:180===e.o.rotate&&(I={x:e.contentWidth-I.x,y:e.contentHeight-I.y}),I},aA=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=rA(C.x,C.y),A.x=C.x/e.contentWidth,A.y=C.y/e.contentHeight}return}}var t=A.$el[0];if(t){var n=t.getBBox();if(n){var i={x:n.x+n.width/2,y:n.y+n.height/2};i=rA(i.x,i.y),A.x=i.x/e.contentWidth,A.y=i.y/e.contentHeight}}}},oA=function(A,I,C){if(C&&e.hideLocation(),A){var t=$(A);if(t){var n=gA(A);if(e.currentLevel!==A)if(e.o.cssAnimation||!n.hasClass("layer-visible")){if(e.debug("switchLevel: FLOOR CURRENT:".concat(e.currentLevelNumber,", SWITCH TO:").concat(t.no)),I&&L(.5,.5,1,0,void 0,void 0,A),e.tooltip&&e.tooltip.hide(),e.o.rotate&&(e.o.rotateServices&&g(e.o.serviceSelector,n).each((function(){V(this,360-e.o.rotate)})),g(e.o.rotatable90PathSelector,n).each((function(){V(this,360-e.o.rotate)})),180===e.o.rotate&&g(e.o.rotatable180PathSelector,n).each((function(){V(this,360-e.o.rotate)})),270===e.o.rotate?g(e.o.rotatable270TextSelector,n).each((function(){V(this,180)})):180===e.o.rotate&&g(e.o.rotatable180TextSelector,n).each((function(){V(this,180)}))),e.o.stackMode.enabled){var i=!0,r=!1,a=void 0;try{for(var o,s=e.data.levels[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var l=o.value,c=gA(l.id);l.no<t.no?c.removeClass("svg-map-layer-down").addClass("svg-map-layer-up"):l.no>t.no?c.removeClass("svg-map-layer-up").addClass("svg-map-layer-down"):(c.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==s.return||s.return()}finally{if(r)throw a}}e.navigation.animationStarted()&&e.navigation.removeEscalatorAnimation(),e.stackModeActive=!1}if(e.currentLevel=A,e.currentLevelNumber=t.no,e.o.cssAnimation){var u=!0,p=!1,f=void 0;try{for(var v,d=e.data.levels[Symbol.iterator]();!(u=(v=d.next()).done);u=!0){var h=v.value,m=gA(h.id);e.$map.removeClass(M("map--selected-",h.no)),m.removeClass("active").removeClass("hidden")}}catch(A){p=!0,f=A}finally{try{u||null==d.return||d.return()}finally{if(p)throw f}}var b=gA(A);e.$map.addClass(M("map--selected-",t.no)),b.addClass("active")}else g(".svg-map-layer.layer-visible",e.$map).removeClass("layer-visible"),n.addClass("layer-visible");B(),e.debug("switchLevel: SWITCHED LEVEL"),e.$el.trigger("levelSwitched",[t.id,t.no])}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(),L(.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=gA(I.id);t.removeClass("hidden").removeClass("active"),e.$map.removeClass(M("map--selected-",I.no)),t[0].setAttribute("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=$(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 sA=function(A){return o.omit(A,["$el","$rect","x","y"])},lA=function(A){return o.omit(A,["x","y"])};e.zoomIn=function(){var A=e.scale;e.scale=H(A+.8*A),e.x=G(e.x-(e.$container.width()/2-e.x)*(e.scale/A-1)),e.y=X(e.y-(e.$container.height()/2-e.y)*(e.scale/A-1)),W(e.x,e.y,e.scale,.4*u,"easeInOutCubic")},e.zoomOut=function(){var A=e.scale;e.scale=H(A-.4*A),e.x=G(e.x-(e.$container.width()/2-e.x)*(e.scale/A-1)),e.y=X(e.y-(e.$container.height()/2-e.y)*(e.scale/A-1)),W(e.x,e.y,e.scale,.4*u,"easeInOutCubic")},e.resetLevel=function(){S(0),e.hideLocation(),L(.5,.5,1,.4*u,"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=AA(A);n&&(e.navigation.setAutoMode(C),t&&e.navigation.started||oA(n.id,g,I),e.navigation.animationStarted()&&e.navigation.showOnLevel(n.no,t))},e.highlightLocation=function(A,g,I){e.debug("highlightLocation: HIGHLIGHT LOCATION? "+A);var C=q(A);if(C){var t=J(C.id);if(t){if(oA(t.id),g){var n=C.zoom?parseFloat(C.zoom):e.o.maxScale;L(eA(C),nA(C),n,I,"easeInOutCubic")}j(e.$el),N(C.$el),e.$el.trigger("locationHighlighted",sA(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=q(A);if(t){var n=J(t.id);if(n){I&&(e.debug("showLocation: close navigation"),e.closeNavigation());var i=t.action&&"default"!==t.action?t.action:e.o.action;e.debug("showLocation: action="+i);var 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)E(t.$el);else if("zoom"===i){oA(n.id,C);var a=t.zoom?parseFloat(t.zoom):e.o.maxScale;C&&L(eA(t),nA(t),a,g,"easeInOutCubic")}else if("pin"===i)oA(n.id),e.tooltip&&e.tooltip.show(t,g);else if("tooltip"===i)oA(n.id),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));j(e.$el),N(t.$el),e.$el.trigger("locationOpened",sA(t))}else e.error("showLocation: level not found")}else e.error("showLocation: location not found")},e.highlightServiceLocation=function(A,g,I){e.debug("highlightServiceLocation: HIGHLIGHT SERVICE LOCATION? "+A);var C=_(A);if(C){var t=J(C.id);if(t){if(oA(t.id),g){var n=C.zoom?parseFloat(C.zoom):e.o.maxScale;L(eA(C),nA(C),n,I,"easeInOutCubic")}j(e.$el),N(C.$el),e.$el.trigger("serviceLocationHighlighted",sA(C))}}},e.showServiceLocation=function(A,g){var I=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.debug("showServiceLocation: id="+A);var C=_(A);if(C)if("kiosk"!==C.type){var t=J(C.id);if(t){I&&(e.debug("showServiceLocation: close navigation"),e.closeNavigation());var n=C.action&&"default"!==C.action?C.action:e.o.action;e.debug("showServiceLocation: action="+n);var i=(e.data.landmark||{}).zoom;if(e.o.landmark&&o.isBoolean(i)&&!i&&(e.debug("showServiceLocation: ZOOM NOT ENABLED FOR LANDMARK"),n="tooltip",e.o.zoomToSelected=!1),"select"===n)E(C.$el);else if("zoom"===n){oA(t.id);var r=C.zoom?parseFloat(C.zoom):e.o.maxScale;L(eA(C),nA(C),r,g,"easeInOutCubic")}else if("tooltip"===n)oA(t.id),e.tooltip&&e.tooltip.show(C,g);else if("not-empty"===n)return void(e.o.locationCannotBeSelected&&e.o.locationCannotBeSelected(C.id));j(e.$el),N(C.$el),e.$el.trigger("serviceLocationOpened",sA(C))}else e.error("showServiceLocation: level not found")}else e.error("showServiceLocation: kiosk service cannot be selected");else e.error("showServiceLocation: location not found")},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 q(A)})));if(t.length){var n=t[0],i=J(n.id);if(i){if(oA(i.id),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=iA(t);L(a.x,a.y,r,I,"easeInOutCubic")}j(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,p=t[Symbol.iterator]();!(s=(u=p.next()).done);s=!0){var f=u.value;N(f.$el)}}catch(A){l=!0,c=A}finally{try{s||null==p.return||p.return()}finally{if(l)throw c}}e.$el.trigger("locationsHighlighted")}}}},e.showServiceLocations=function(A){var g;if(e.debug("showServiceLocations: SHOW SERVICE LOCATIONS? "+A),g=Array.isArray(A)?A:[A],e.closeNavigation(),g.length<=1)e.showServiceLocation(g[0]);else{var I=o.filter(o.map(g,(function(A){return _(A)})));if(I.length){var C=I[0],t=J(C.id);if(t){oA(t.id),e.tooltip&&e.tooltip.show(I),j(e.$el);var n=!0,i=!1,r=void 0;try{for(var a,s=I[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value;N(l.$el)}}catch(A){i=!0,r=A}finally{try{n||null==s.return||s.return()}finally{if(i)throw r}}e.$el.trigger("serviceLocationOpened",sA(C))}}}},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 _(A)})));if(t.length){var n=t[0],i=J(n.id);if(i){if(oA(i.id),g){var r=n.zoom?parseFloat(n.zoom):e.o.maxScale,a=iA(t);L(a.x,a.y,r,I,"easeInOutCubic")}j(e.$el);var s=!0,l=!1,c=void 0;try{for(var u,p=t[Symbol.iterator]();!(s=(u=p.next()).done);s=!0){var f=u.value;N(f.$el)}}catch(A){l=!0,c=A}finally{try{s||null==p.return||p.return()}finally{if(l)throw c}}e.$el.trigger("serviceLocationsHighlighted")}}}},e.hideLocation=function(){e.debug("hideLocation: HIDE LOCATION INSIDE:",e.$el),j(e.$el),e.tooltip&&e.tooltip.hide(),e.$el.trigger("locationClosed")},e.setCurrentLocationFromBlock=function(A){var g=Q(A);if(g){var I=J(A),C=$(e.currentLevel);e.userPinTooltip.addUserLocation(g,I.no),C&&C.no===e.userPinTooltip.getUserLocationFloorNumber()?(e.debug("set current location"),U(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)?AA(I):$(e.currentLevel),e.userPinTooltip.addUserLocationPoint(A,g,C.no),$(e.currentLevel).no===e.userPinTooltip.getUserLocationFloorNumber()&&B()},e.updateLocalized=function(A){var g=A.youAreHereText,I=A.navigationText,C=A.closeText,t=A.detailText,n=A.floorText;g&&e.userPinTooltip.updateLocalized(g),(I||C||t||n)&&e.tooltip.updateLocalized({navigationText:I,closeText:C,detailText:t,floorText:n})},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)?AA(I):$(e.currentLevel),e.user?e.user.resetUserLocation():e.user=new h,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)?AA(g):$(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];e.__navigationData={navigationDetails:A,autoMode:g,zoomEnabled:I,showPins:C};try{return e.navigation.init(A),e.navigation.show(g,I,C),!0}catch(A){return e.error(A),!1}},e.closeNavigation=function(){var A=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];C.navigation.removePathAnimations(),C.navigation.setAutoMode(!1),C.navigation.removeEscalatorAnimation(),C.navigation.activeFloor=null,e.__navigationData=null,A&&e.resetLevel(),e.$el.trigger("navigationCancelled")},e.restartNavigation=function(){var A=e.o.cssAnimation?e.o.cssAnimationTime:.1*u,g=e.__navigationData||{},I=g.navigationDetails,C=g.autoMode,t=g.zoomEnabled,n=g.showPins;I&&(e.__navigationData=null,setTimeout((function(){e.closeNavigation(!0),e.showNavigation(I,C,t,n)}),A))},e.mto=function(A,g,I,C,t,e){L(A,g,I,C,t,e)},e.zto=function(A,g,I,C,t){W(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)?SP(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)?c(A,g,{nodes:t,paths:n},I):(e.error("Required nodes or paths in data"),null)}};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
  \*****************************************/
@@ -494,22 +494,76 @@ C.e._gsDefine("easing.Back",["easing.Ease"],(function(){var A,g,I,t,e=C.e.GreenS
494
494
  * Released under the MIT license
495
495
  * http://jquery.org/license
496
496
  */C=function(A){var g,I,C=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],e=Array.prototype.slice;if(A.event.fixHooks)for(var n=C.length;n;)A.event.fixHooks[C[--n]]=A.event.mouseHooks;var i=A.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var g=t.length;g;)this.addEventListener(t[--g],r,!1);else this.onmousewheel=r;A.data(this,"mousewheel-line-height",i.getLineHeight(this)),A.data(this,"mousewheel-page-height",i.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var g=t.length;g;)this.removeEventListener(t[--g],r,!1);else this.onmousewheel=null;A.removeData(this,"mousewheel-line-height"),A.removeData(this,"mousewheel-page-height")},getLineHeight:function(g){var I=A(g),C=I["offsetParent"in A.fn?"offsetParent":"parent"]();return C.length||(C=A("body")),parseInt(C.css("fontSize"),10)||parseInt(I.css("fontSize"),10)||16},getPageHeight:function(g){return A(g).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function r(C){var t,n=C||window.event,r=e.call(arguments,1),s=0,l=0,c=0,u=0,p=0;if((C=A.event.fix(n)).type="mousewheel","detail"in n&&(c=-1*n.detail),"wheelDelta"in n&&(c=n.wheelDelta),"wheelDeltaY"in n&&(c=n.wheelDeltaY),"wheelDeltaX"in n&&(l=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(l=-1*c,c=0),s=0===c?l:c,"deltaY"in n&&(s=c=-1*n.deltaY),"deltaX"in n&&(l=n.deltaX,0===c&&(s=-1*l)),0!==c||0!==l){if(1===n.deltaMode){var f=A.data(this,"mousewheel-line-height");s*=f,c*=f,l*=f}else if(2===n.deltaMode){var v=A.data(this,"mousewheel-page-height");s*=v,c*=v,l*=v}if(t=Math.max(Math.abs(c),Math.abs(l)),(!I||t<I)&&(I=t,o(n,t)&&(I/=40)),o(n,t)&&(s/=40,l/=40,c/=40),s=Math[s>=1?"floor":"ceil"](s/I),l=Math[l>=1?"floor":"ceil"](l/I),c=Math[c>=1?"floor":"ceil"](c/I),i.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();u=C.clientX-d.left,p=C.clientY-d.top}return C.deltaX=l,C.deltaY=c,C.deltaFactor=I,C.offsetX=u,C.offsetY=p,C.deltaMode=0,r.unshift(C,s,l,c),g&&clearTimeout(g),g=setTimeout(a,200),(A.event.dispatch||A.event.handle).apply(this,r)}}function a(){I=null}function o(A,g){return i.settings.adjustOldDeltas&&"mousewheel"===A.type&&g%120==0}A.fn.extend({mousewheel:function(A){return A?this.bind("mousewheel",A):this.trigger("mousewheel")},unmousewheel:function(A){return this.unbind("mousewheel",A)}})},A.exports=C},
497
- /*!*************************!*\
498
- !*** ./src/sp/index.js ***!
499
- \*************************/
497
+ /*!****************************!*\
498
+ !*** ./src/sp/v1/index.js ***!
499
+ \****************************/
500
500
  /*! no static exports found */
501
501
  /*! all exports used */
502
- /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1),t=I(/*! ./select_best_path */63),e=I(/*! ./construct_json_from_path */64);function n(A,g){return C.filter(A,(function(A){return A.locations.includes(g)}))}function i(A,g,I){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",e=C.filter(A,(function(A){var C="auto"===t,e=g.includes(A.sn),n=I.includes(A.en),i=!!C||A.t===t;return e&&n&&i}));return C.sortBy(e,["floorChanges"])}A.exports=function(A,g,I){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"p",a=I||{},o=a.levels,s=a.nodes,l=a.paths,c=n(s,A),u=n(s,g);if(0===c.length||0===u.length)return null;var p=C.intersectionBy(c,u,"_id");if(p.length>0)return null;var f=C.map(c,"node_id"),v=C.map(u,"node_id"),d=i(l,f,v,r);if(0===d.length)return null;var h=t(d,r);return e(o,s,h)}},
503
- /*!************************************!*\
504
- !*** ./src/sp/select_best_path.js ***!
505
- \************************************/
502
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1),t=I(/*! ./select_best_path */63),e=I(/*! ./construct_json_from_path_v1 */64);function n(A,g){return C.filter(A,(function(A){return A.locations.includes(g)}))}function i(A,g,I){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",e=C.filter(A,(function(A){var C="auto"===t,e=g.includes(A.sn),n=I.includes(A.en),i=!!C||A.t===t;return e&&n&&i}));return C.sortBy(e,["floorChanges"])}A.exports=function(A,g,I){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"p",a=I||{},o=a.levels,s=a.nodes,l=a.paths,c=n(s,A),u=n(s,g);if(0===c.length||0===u.length)return null;var p=C.intersectionBy(c,u,"_id");if(p.length>0)return null;var f=C.map(c,"node_id"),v=C.map(u,"node_id"),d=i(l,f,v,r);if(0===d.length)return null;var h=t(d,r);return e(o,s,h)}},
503
+ /*!***************************************!*\
504
+ !*** ./src/sp/v1/select_best_path.js ***!
505
+ \***************************************/
506
506
  /*! no static exports found */
507
507
  /*! all exports used */
508
508
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g){var I={FLOOR:100,PATH:1,PREFERRED_TYPE_BONUS:-1e3},C=new Map;function t(A,g){var t="".concat(A._id,"_").concat(g);if(C.has(t))return C.get(t);for(var e=0,n=A.p,i=0;i<n.length-1;i++){var r=n[i],a=n[i+1];r[0]===a[0]?e+=I.PATH:e+=I.FLOOR}return"auto"===g?(C.set(t,e),e):(A.t===g&&(e+=I.PREFERRED_TYPE_BONUS),C.set(t,e),e)}A.exports=function(A){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";if(A.length<=1)return A[0];var I=Number.MAX_VALUE,C=null;if("auto"===g){var 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,s=t(o,"auto");s<I&&(I=s,C=o)}}catch(A){n=!0,i=A}finally{try{e||null==a.return||a.return()}finally{if(n)throw i}}return C}var l=A.sort((function(A,I){return t(A,g)-t(I,g)})),c=!0,u=!1,p=void 0;try{for(var f,v=l[Symbol.iterator]();!(c=(f=v.next()).done);c=!0){var d=f.value,h=t(d,g);h<I&&(I=h,C=d)}}catch(A){u=!0,p=A}finally{try{c||null==v.return||v.return()}finally{if(u)throw p}}return C}},
509
- /*!********************************************!*\
510
- !*** ./src/sp/construct_json_from_path.js ***!
511
- \********************************************/
509
+ /*!**************************************************!*\
510
+ !*** ./src/sp/v1/construct_json_from_path_v1.js ***!
511
+ \**************************************************/
512
+ /*! no static exports found */
513
+ /*! all exports used */
514
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1),t="A",e="K",n=new Map,i=new Map,r=new Map;function a(A,g){var I="node_".concat(g);if(n.has(I))return n.get(I);var t=C.find(A,{node_id:g});return n.set(I,t),t}function o(A,g){var I="floor_".concat(g);if(i.has(I))return i.get(I);var t=C.find(A,{no:g});return i.set(I,t),t}function s(A){if(!A||!A.locations||0===A.locations.length)return null;var g="nav_type_".concat(A.node_id);if(r.has(g))return r.get(g);var I=null;return A.locations[0].includes("elevator")?I="elevator":A.locations[0].includes("escalator")&&(I="escalator"),r.set(g,I),I}function l(A,g){var I=g.map((function(g){return a(A,g)}));if(0===I.length)return[];1===I.length&&I.push(I[0]);for(var C=[],t=0;t<I.length-1;t++){var e=I[t],n=I[t+1],i={x1:parseInt(e.location.x),y1:parseInt(e.location.y),x2:parseInt(n.location.x),y2:parseInt(n.location.y)};e.level_changer?i.level_changer=e.level_changer:n.level_changer&&(i.level_changer=n.level_changer),C.push(i)}return C}function c(A){if(!A||0===A.length)return 0;var g=A.substring(0,1);return g<e?g.charCodeAt(0)-t.charCodeAt(0):-(g.charCodeAt(0)-e.charCodeAt(0)+1)}A.exports=function(A,g,I){var t=I.p,e=function(A){var g=[],I=null,C=!0,t=!1,e=void 0;try{for(var n,i=A[Symbol.iterator]();!(C=(n=i.next()).done);C=!0){var r=n.value,a=c(r);a!==I?(g.push({no:a,nodes:[r]}),I=a):g[g.length-1].nodes.push(r)}}catch(A){t=!0,e=A}finally{try{C||null==i.return||i.return()}finally{if(t)throw e}}return g}(t),n=[],i=!0,r=!1,u=void 0;try{for(var p,f=e[Symbol.iterator]();!(i=(p=f.next()).done);i=!0){var v=p.value,d=s(a(g,v.nodes[v.nodes.length-1])),h=o(A,v.no);if(!h)break;n.push({no:h.no,lines:l(g,v.nodes,h.no),type:v!==e[e.length-1]?d||"escalator":null})}}catch(A){r=!0,u=A}finally{try{i||null==f.return||f.return()}finally{if(r)throw u}}return{nodes:t,direction:C.map(e,"no"),floors:n}}},
515
+ /*!****************************!*\
516
+ !*** ./src/sp/v2/index.js ***!
517
+ \****************************/
518
+ /*! no static exports found */
519
+ /*! all exports used */
520
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1),t=I(/*! ./select_best_path */66),e=I(/*! ./construct_json_from_path_v2 */67),n=I(/*! ./get-node-by-location */71),i=I(/*! ./find_paths */72),r=I(/*! ./find_nodes */73);A.exports=function(A,g,I){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",o=I||{},s=o.nodes,l=o.paths;C.isArray(g)||(g=[g]);var c=n(s,A),u=n(s,g);if(c&&u&&c[0]===u[0])return null;var p=C.map(c,"node_id"),f=C.map(u,"node_id"),v=i(l,p,f);if(!v.length)return null;var d="auto"===a?v:C.filter(v,(function(A){return A.t===a})),h=t(d),m=C.filter(v,(function(A){return A.t!==h.t})),b=t(m),y=C.concat(h&&h.p||[],b&&b.p||[]),z=r(s,y);return e(z,h,b)}},
521
+ /*!***************************************!*\
522
+ !*** ./src/sp/v2/select_best_path.js ***!
523
+ \***************************************/
524
+ /*! no static exports found */
525
+ /*! all exports used */
526
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){"use strict";A.exports=function(A){if(1===A.length)return A[0];var g=Number.MAX_VALUE,I=null;return A.forEach((function(A){for(var C=0,t=A.p,e=0;e<t.length-1;e++){var n=t[e],i=t[e+1];n[0]===i[0]?C+=1:C+=100}C<g&&(g=C,I=A)})),I}},
527
+ /*!**************************************************!*\
528
+ !*** ./src/sp/v2/construct_json_from_path_v2.js ***!
529
+ \**************************************************/
530
+ /*! no static exports found */
531
+ /*! all exports used */
532
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){"use strict";var C=I(/*! lodash */1),t=I(/*! ./floors-by-nodes */68),e=I(/*! ./merge-lines */70);function n(A,g){var I=t(g.p);return e(I,A),{type:g.t,direction:C.map(I,"no"),floors:I}}A.exports=function(A,g,I){return{route:g&&n(A,g),alternative:I&&n(A,I),version:2}}},
533
+ /*!**************************************!*\
534
+ !*** ./src/sp/v2/floors-by-nodes.js ***!
535
+ \**************************************/
536
+ /*! no static exports found */
537
+ /*! all exports used */
538
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! ./get-floor-no-by-node-id */69);A.exports=function(A){var g=[],I=null,t=!0,e=!1,n=void 0;try{for(var i,r=A[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var a=i.value,o=C(a);o!==I?(g.push({no:o,nodes:[a]}),I=o):g[g.length-1].nodes.push(a)}}catch(A){e=!0,n=A}finally{try{t||null==r.return||r.return()}finally{if(e)throw n}}return g}},
539
+ /*!**********************************************!*\
540
+ !*** ./src/sp/v2/get-floor-no-by-node-id.js ***!
541
+ \**********************************************/
542
+ /*! no static exports found */
543
+ /*! all exports used */
544
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){I(/*! lodash */1);A.exports=function(A){if(!A||0===A.length)return 0;var g=A.substring(0,1);return g<"K"?g.charCodeAt(0)-"A".charCodeAt(0):-(g.charCodeAt(0)-"K".charCodeAt(0)+1)}},
545
+ /*!**********************************!*\
546
+ !*** ./src/sp/v2/merge-lines.js ***!
547
+ \**********************************/
548
+ /*! no static exports found */
549
+ /*! all exports used */
550
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1);function t(A,g){var I=g.map((function(g){return C.find(A,{node_id:g})}));if(0===I.length)return[];1===I.length&&I.push(I[0]);for(var t=[],e=0;e<I.length-1;e++){var n=I[e],i=I[e+1],r={x1:parseInt(n.location.x),y1:parseInt(n.location.y),x2:parseInt(i.location.x),y2:parseInt(i.location.y)};n.level_changer?r.level_changer=n.level_changer:i.level_changer&&(r.level_changer=i.level_changer),t.push(r)}return t}A.exports=function(A,g){var I=!0,C=!1,e=void 0;try{for(var n,i=A[Symbol.iterator]();!(I=(n=i.next()).done);I=!0){var r=n.value;r.lines=t(g,r.nodes),delete r.nodes}}catch(A){C=!0,e=A}finally{try{I||null==i.return||i.return()}finally{if(C)throw e}}}},
551
+ /*!*******************************************!*\
552
+ !*** ./src/sp/v2/get-node-by-location.js ***!
553
+ \*******************************************/
554
+ /*! no static exports found */
555
+ /*! all exports used */
556
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1);A.exports=function(A,g){return C.filter(A,(function(A){return C.some(A.locations,(function(A){return C.includes(g,A)}))}))}},
557
+ /*!*********************************!*\
558
+ !*** ./src/sp/v2/find_paths.js ***!
559
+ \*********************************/
560
+ /*! no static exports found */
561
+ /*! all exports used */
562
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1);A.exports=function(A,g,I){return C.filter(A,(function(A){return g.includes(A.sn)&&I.includes(A.en)}))}},
563
+ /*!*********************************!*\
564
+ !*** ./src/sp/v2/find_nodes.js ***!
565
+ \*********************************/
512
566
  /*! no static exports found */
513
567
  /*! all exports used */
514
- /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1),t="A",e="K",n=new Map,i=new Map,r=new Map;function a(A,g){var I="node_".concat(g);if(n.has(I))return n.get(I);var t=C.find(A,{node_id:g});return n.set(I,t),t}function o(A,g){var I="floor_".concat(g);if(i.has(I))return i.get(I);var t=C.find(A,{no:g});return i.set(I,t),t}function s(A){if(!A||!A.locations||0===A.locations.length)return null;var g="nav_type_".concat(A.node_id);if(r.has(g))return r.get(g);var I=null;return A.locations[0].includes("elevator")?I="elevator":A.locations[0].includes("escalator")&&(I="escalator"),r.set(g,I),I}function l(A,g){var I=g.map((function(g){return a(A,g)}));if(0===I.length)return[];1===I.length&&I.push(I[0]);for(var C=[],t=0;t<I.length-1;t++){var e=I[t],n=I[t+1],i={x1:parseInt(e.location.x),y1:parseInt(e.location.y),x2:parseInt(n.location.x),y2:parseInt(n.location.y)};e.level_changer?i.level_changer=e.level_changer:n.level_changer&&(i.level_changer=n.level_changer),C.push(i)}return C}function c(A,g){if(!g||0===g.length)return 0;var I=g.substring(0,1);return I<e?I.charCodeAt()-t.charCodeAt():-(I.charCodeAt(0)-e.charCodeAt(0)+1)}A.exports=function(A,g,I){var t=I.p,e=function(A,g){var I=[],C=null,t=!0,e=!1,n=void 0;try{for(var i,r=g[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var a=i.value,o=c(A,a);o!==C?(I.push({no:o,nodes:[a]}),C=o):I[I.length-1].nodes.push(a)}}catch(A){e=!0,n=A}finally{try{t||null==r.return||r.return()}finally{if(e)throw n}}return I}(A,t),n=[],i=!0,r=!1,u=void 0;try{for(var p,f=e[Symbol.iterator]();!(i=(p=f.next()).done);i=!0){var v=p.value,d=s(a(g,v.nodes[v.nodes.length-1])),h=o(A,v.no);if(!h)break;n.push({no:h.no,lines:l(g,v.nodes,h.no),type:v!==e[e.length-1]?d||"escalator":null})}}catch(A){r=!0,u=A}finally{try{i||null==f.return||f.return()}finally{if(r)throw u}}return{nodes:t,direction:C.map(e,"no"),floors:n}}}])}));
568
+ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(A,g,I){var C=I(/*! lodash */1);A.exports=function(A,g){return C.filter(A,(function(A){return C.includes(g,A.node_id)}))}}])}));
515
569
  //# sourceMappingURL=map-dist.js.map
@@ -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;;;;;;AA6vIA;;;;;;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","sourceRoot":""}
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;;;;;;AAqxIA;;;;;;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":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mechanic-map",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "description": "svg based maps",
5
5
  "readme": "README.md",
6
6
  "main": "dist/map-dist.js",