/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2018 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(['sap/m/InstanceManager','sap/f/FlexibleColumnLayout','sap/ui/base/Object','sap/ui/core/routing/History',"sap/base/Log"],function(I,F,B,H,L){"use strict";var T=B.extend("sap.f.routing.TargetHandler",{constructor:function(c){this._aQueue=[];this._oNavigationOrderPromise=Promise.resolve();if(c===undefined){this._bCloseDialogs=true;}else{this._bCloseDialogs=!!c;}}});T.prototype.setCloseDialogs=function(c){this._bCloseDialogs=!!c;return this;};T.prototype.getCloseDialogs=function(){return this._bCloseDialogs;};T.prototype.addNavigation=function(p){this._aQueue.push(p);};T.prototype.navigate=function(d){var r=this._createResultingNavigations(d.navigationIdentifier),c=false,b=this._getDirection(d),n;while(r.length){n=this._applyNavigationResult(r.shift().oParams,b);c=c||n;}if(c){this._closeDialogs();}};T.prototype._chainNavigation=function(n){this._oNavigationOrderPromise=this._oNavigationOrderPromise.then(n);return this._oNavigationOrderPromise;};T.prototype._getDirection=function(d){var t=d.viewLevel,h=H.getInstance(),b=false;if(d.direction==="Backwards"){b=true;}else if(isNaN(t)||isNaN(this._iCurrentViewLevel)||t===this._iCurrentViewLevel){if(d.askHistory){b=h.getDirection()==="Backwards";}}else{b=t