Sie sind auf Seite 1von 480

// Copyright (c) 2009-2014 SAP SE, All Rights Reserved

sap.ui.predefine('sap/ushell/ui/shell/ShellFloatingActionRenderer',
['jquery.sap.global', 'sap/ui/core/Renderer', 'sap/m/ButtonRenderer'], function(q,
R, B) {
"use strict";
var S = R.extend(B);
return S;
}, true);
/*!
* SAP UI development toolkit for HTML5 (SAPUI5)
*
* (c) Copyright 2009-2016 SAP SE. All rights reserved
*/
sap.ui.predefine('sap/fiori/library', ['jquery.sap.global', 'sap/ui/core/Core',
'sap/ui/core/library', 'jquery.sap.resources'], function(q, C, l) {
"use strict";
sap.ui.getCore().initLibrary({
name: "sap.fiori",
dependencies: ["sap.ui.core"],
types: [],
interfaces: [],
controls: [],
elements: [],
version: "1.38.32"
});
var c = sap.ui.getCore().getConfiguration()
, L = c.getLanguage()
, d = c.getLanguagesDeliveredWithCore()
, a = q.sap.resources._getFallbackLocales(L, d);
L = a[0];
if (L && !window["sap-ui-debug"]) {
q.sap.require("sap.fiori.messagebundle-preload_" + L);
}
return sap.fiori;
});
sap.ui.predefine('sap/ui/generic/app/navigation/service/NavError',
["jquery.sap.global", "sap/ui/base/Object"], function(q, B) {
"use strict";
var N = B.extend("sap.ui.generic.app.navigation.service.NavError", {
metadata: {
publicMethods: ["getErrorCode"],
properties: [],
library: "sap.ui.generic.app"
},
constructor: function(e) {
B.apply(this);
this._sErrorCode = e;
}
});
N.prototype.getErrorCode = function() {
return this._sErrorCode;
}
;
return N;
});
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2016 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.predefine('jquery.sap.act', ['jquery.sap.global'], function(q) {
"use strict";
if (typeof window.jQuery.sap.act === "object" || typeof window.jQuery.sap.act
=== "function") {
return q;
}
var _ = {}
, a = true
, b = null
, c = 10000
, d = !!window.addEventListener
, e = []
, f = false
, g = null;
function h() {
b = null;
if (f && document.hidden !== true) {
j();
return;
}
a = false;
g.observe(document.documentElement, {
childList: true,
attributes: true,
subtree: true,
characterData: true
});
}
function j() {
if (document.hidden === true) {
return;
}
if (!a) {
a = true;
k(e);
g.disconnect();
}
if (b) {
f = true;
} else {
b = setTimeout(h, c);
f = false;
}
}
function k(l) {
if (l.length == 0) {
return;
}
var m = l.slice();
setTimeout(function() {
var I;
for (var i = 0, L = m.length; i < L; i++) {
I = m[i];
I.fFunction.call(I.oListener || window);
}
}, 0);
}
_.attachActivate = function(F, l) {
e.push({
oListener: l,
fFunction: F
});
}
;
_.detachActivate = function(F, l) {
for (var i = 0, L = e.length; i < L; i++) {
if (e[i].fFunction === F && e[i].oListener === l) {
e.splice(i, 1);
break;
}
}
}
;
_.isActive = !d ? function() {
return true;
}
: function() {
return a;
}
;
_.refresh = !d ? function() {}
: j;
if (d) {
var E = ["resize", "orientationchange", "mousemove", "mousedown",
"mouseup", "paste", "cut", "keydown", "keyup", "DOMMouseScroll", "mousewheel"];
if (!!('ontouchstart'in window)) {
E.push("touchstart", "touchmove", "touchend", "touchcancel");
}
for (var i = 0; i < E.length; i++) {
window.addEventListener(E[i], _.refresh, true);
}
if (window.MutationObserver) {
g = new window.MutationObserver(_.refresh);
} else if (window.WebKitMutationObserver) {
g = new window.WebKitMutationObserver(_.refresh);
} else {
g = {
observe: function() {
document.documentElement.addEventListener("DOMSubtreeModified",
_.refresh);
},
disconnect: function() {

document.documentElement.removeEventListener("DOMSubtreeModified", _.refresh);
}
};
}
if (typeof (document.hidden) === "boolean") {
document.addEventListener("visibilitychange", function() {
if (document.hidden !== true) {
_.refresh();
}
}, false);
}
j();
}
q.sap.act = _;
return q;
});
sap.ui.predefine('jquery.sap.encoder', ['jquery.sap.global'], function(q) {
"use strict";
function h(i, l) {
var g = i.toString(16);
if (l) {
while (l > g.length) {
g = "0" + g;
}
}
return g;
}
var r = /[\x00-\x2b\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\xff\u2028\u2029]/g
, a = /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/
, H = {
"<": "&lt;",
">": "&gt;",
"&": "&amp;",
"\"": "&quot;"
};
var f = function(g) {
var E = H[g];
if (!E) {
if (a.test(g)) {
E = "&#xfffd;";
} else {
E = "&#x" + h(g.charCodeAt(0)) + ";";
}
H[g] = E;
}
return E;
};
q.sap.encodeHTML = function(S) {
return S.replace(r, f);
}
;
q.sap.encodeXML = function(S) {
return S.replace(r, f);
}
;
q.sap.escapeHTML = function(S) {
return S.replace(r, f);
}
;
var b = /[\x00-\x2b\x2d\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\xff\u2028\u2029]/g
, j = {};
var J = function(g) {
var E = j[g];
if (!E) {
var i = g.charCodeAt(0);
if (i < 256) {
E = "\\x" + h(i, 2);
} else {
E = "\\u" + h(i, 4);
}
j[g] = E;
}
return E;
};
q.sap.encodeJS = function(S) {
return S.replace(b, J);
}
;
q.sap.escapeJS = function(S) {
return S.replace(b, J);
}
;
var c = /[\x00-\x2c\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\uffff]/g
, u = {};
var U = function(g) {
var E = u[g];
if (!E) {
var i = g.charCodeAt(0);
if (i < 128) {
E = "%" + h(i, 2);
} else if (i < 2048) {
E = "%" + h((i >> 6) | 192, 2) + "%" + h((i & 63) | 128, 2);
} else {
E = "%" + h((i >> 12) | 224, 2) + "%" + h(((i >> 6) & 63) | 128, 2)
+ "%" + h((i & 63) | 128, 2);
}
u[g] = E;
}
return E;
};
q.sap.encodeURL = function(S) {
return S.replace(c, U);
}
;
q.sap.encodeURLParameters = function(p) {
if (!p) {
return "";
}
var g = [];
q.each(p, function(n, v) {
if (q.type(v) === "string") {
v = q.sap.encodeURL(v);
}
g.push(q.sap.encodeURL(n) + "=" + v);
});
return g.join("&");
}
;
var d = /[\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xff\u2028\u2029][0-9A-Fa-f]?/g;
var C = function(g) {
var i = g.charCodeAt(0);
if (g.length == 1) {
return "\\" + h(i);
} else {
return "\\" + h(i) + " " + g.substr(1);
}
};
q.sap.encodeCSS = function(S) {
return S.replace(d, C);
}
;
function W(p, g, i, k) {
if (p) {
this.protocol = p.toUpperCase();
}
if (g) {
this.host = g.toUpperCase();
}
this.port = i;
this.path = k;
}
var w = [];
q.sap.clearUrlWhitelist = function() {
w.splice(0, w.length);
}
;
q.sap.addUrlWhitelist = function(p, g, i, k) {
var E = new W(p,g,i,k);
var I = w.length;
w[I] = E;
}
;
q.sap.removeUrlWhitelist = function(i) {
w.splice(i, 1);
}
;
q.sap.getUrlWhitelist = function() {
return w.slice();
}
;
q.sap.validateUrl = function(g) {
var k = /^(?:([^:\/?#]+):)?((?:\/\/((?:\[[^\]]+\]|[^\/?#:]+))(?::([0-
9]+))?)?([^?#]*))(?:\?([^#]*))?(?:#(.*))?$/.exec(g);
if (!k) {
return false;
}
var p = k[1]
, B = k[2]
, l = k[3]
, P = k[4]
, m = k[5]
, Q = k[6]
, n = k[7];
var o = /^([a-z0-9-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*$/i;
var t = /^([a-z0-9-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*$/i;
var v = t;
var x = /^([a-z0-9!$'*+:^_`{|}~-]|%[0-9a-f]{2})+(?:\.([a-z0-9!
$'*+:^_`{|}~-]|%[0-9a-f]{2})+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:
[a-z0-9-]*[a-z0-9])?$/i;
var y = /^([0-9]{1,3}\.){3}[0-9]{1,3}$/;
var z = /^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|
[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/;
var A = /^\[[^\]]+\]$/;
var D = /^\[(((([0-9a-f]{1,4}:){6}|(::([0-9a-f]{1,4}:){5})|(([0-9a-f]
{1,4})?::([0-9a-f]{1,4}:){4})|((([0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::([0-9a-f]
{1,4}:){3})|((([0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::([0-9a-f]{1,4}:){2})|((([0-9a-
f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:)|((([0-9a-f]{1,4}:){0,4}[0-9a-f]
{1,4})?::))(([0-9a-f]{1,4}:[0-9a-f]{1,4})|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-
9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])))|((([0-9a-f]
{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4})|((([0-9a-f]{1,4}:){0,6}[0-9a-f]
{1,4})?::))\]$/i;
var E = /^([a-z0-9]([a-z0-9\-]*[a-z0-9])?\.)*[a-z0-9]([a-z0-9\-]*[a-z0-9])?
$/i;
if (p) {
p = p.toUpperCase();
if (w.length <= 0) {
if (!/^(https?|ftp)/i.test(p)) {
return false;
}
}
}
if (l) {
if (y.test(l)) {
if (!z.test(l)) {
return false;
}
} else if (A.test(l)) {
if (!D.test(l)) {
return false;
}
} else if (!E.test(l)) {
return false;
}
l = l.toUpperCase();
}
if (m) {
if (p === "MAILTO") {
var F = B.split(",");
for (var i = 0; i < F.length; i++) {
if (!x.test(F[i])) {
return false;
}
}
} else {
var G = m.split("/");
for (var i = 0; i < G.length; i++) {
if (!o.test(G[i])) {
return false;
}
}
}
}
if (Q) {
if (!t.test(Q)) {
return false;
}
}
if (n) {
if (!v.test(n)) {
return false;
}
}
if (w.length > 0) {
var I = false;
for (var i = 0; i < w.length; i++) {
if (!p || !w[i].protocol || p == w[i].protocol) {
var O = false;
if (l && w[i].host && /^\*/.test(w[i].host)) {
var K = w[i].host.slice(1).replace(/[-[\]{}()*+?.,\\^$|
#\s]/g, "\\$&");
var L = RegExp(K + "$");
if (L.test(l)) {
O = true;
}
} else if (!l || !w[i].host || l == w[i].host) {
O = true;
}
if (O) {
if ((!l && !P) || !w[i].port || P == w[i].port) {
if (w[i].path && /\*$/.test(w[i].path)) {
var M = w[i].path.slice(0, -1).replace(/[-[\]{}
()*+?.,\\^$|#\s]/g, "\\$&");
var L = RegExp("^" + M);
if (L.test(m)) {
I = true;
}
} else if (!w[i].path || m == w[i].path) {
I = true;
}
}
}
}
if (I) {
break;
}
}
if (!I) {
return false;
}
}
return true;
}
;
q.sap._sanitizeHTML = function(g, o) {
return s(g, o || {
uriRewriter: function(i) {
if (q.sap.validateUrl(i)) {
return i;
}
}
});
}
;
q.sap._setHTMLSanitizer = function(s) {
s = s || e;
}
;
function e(g, o) {
if (!window.html || !window.html.sanitize) {
q.sap.require("sap.ui.thirdparty.caja-html-sanitizer");
}
var t = o.tagPolicy || window.html.makeTagPolicy(o.uriRewriter,
o.tokenPolicy);
return window.html.sanitizeWithPolicy(g, t);
}
var s = e;
return q;
});
sap.ui.predefine('jquery.sap.events', ['jquery.sap.global', 'sap/ui/Device',
'jquery.sap.keycodes', "sap/ui/thirdparty/jquery-mobile-custom"], function(q, D) {
"use strict";
var o, a, b, c, d, m, I = false;
if (D.browser.webkit && /Mobile/.test(navigator.userAgent) && D.support.touch)
{
I = true;
(function() {
var e = window.document, H = false, T = null, j = false, S, z, i = 0;
m = ["mousedown", "mouseover", "mouseup", "mouseout", "click"];
var A = function(C, E) {
if (!H) {
return;
}
var M = E.type == "touchend" ? E.changedTouches[0] : E.touches[0];
var F = e.createEvent('MouseEvent');
F.initMouseEvent(C, true, true, window, E.detail, M.screenX,
M.screenY, M.clientX, M.clientY, E.ctrlKey, E.shiftKey, E.altKey, E.metaKey,
E.button, E.relatedTarget);
F.isSynthetic = true;
window.setTimeout(function() {
T.dispatchEvent(F);
}, 0);
};
var B = function(E) {
return E.target.tagName.match(/input|textarea|select/i);
};
d = function(E) {
if (!E.isSynthetic && !B(E)) {
E.stopPropagation();
E.preventDefault();
}
}
;
o = function(E) {
var C = E.touches, F;
H = (C.length == 1 && !B(E));
j = false;
if (H) {
F = C[0];
T = F.target;
if (T.nodeType === 3) {
T = T.parentNode;
}
S = F.clientX;
z = F.clientY;
A("mousedown", E);
}
}
;
a = function(E) {
var C;
if (H) {
C = E.touches[0];
if (Math.abs(C.clientX - S) > 10 || Math.abs(C.clientY - z) >
10) {
j = true;
}
if (j) {
A("mousemove", E);
}
}
}
;
b = function(E) {
A("mouseup", E);
if (!j) {
A("click", E);
}
}
;
c = function(E) {
A("mouseup", E);
}
;
for (; i < m.length; i++) {
e.addEventListener(m[i], d, true);
}
e.addEventListener('touchstart', o, true);
e.addEventListener('touchmove', a, true);
e.addEventListener('touchend', b, true);
e.addEventListener('touchcancel', c, true);
q.sap.disableTouchToMouseHandling = function() {
var i = 0;
if (!I) {
return;
}
e.removeEventListener('touchstart', o, true);
e.removeEventListener('touchmove', a, true);
e.removeEventListener('touchend', b, true);
e.removeEventListener('touchcancel', c, true);
for (; i < m.length; i++) {
e.removeEventListener(m[i], d, true);
}
}
;
}());
}
if (!q.sap.disableTouchToMouseHandling) {
q.sap.disableTouchToMouseHandling = function() {}
;
}
q.sap.ControlEvents = ["click", "dblclick", "contextmenu", "focusin",
"focusout", "keydown", "keypress", "keyup", "mousedown", "mouseout", "mouseover",
"mouseup", "select", "selectstart", "dragstart", "dragenter", "dragover",
"dragleave", "dragend", "drop", "paste", "cut", "input"];
if (D.support.touch) {
q.sap.ControlEvents.push("touchstart", "touchend", "touchmove",
"touchcancel");
}
q.sap.PseudoEvents = {
sapdown: {
sName: "sapdown",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_DOWN && !k(e);
}
},
sapdownmodifiers: {
sName: "sapdownmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_DOWN && k(e);
}
},
sapshow: {
sName: "sapshow",
aTypes: ["keydown"],
fnCheck: function(e) {
return (e.keyCode == q.sap.KeyCodes.F4 && !k(e)) || (e.keyCode ==
q.sap.KeyCodes.ARROW_DOWN && h(e, false, true, false));
}
},
sapup: {
sName: "sapup",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_UP && !k(e);
}
},
sapupmodifiers: {
sName: "sapupmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_UP && k(e);
}
},
saphide: {
sName: "saphide",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_UP && h(e, false, true,
false);
}
},
sapleft: {
sName: "sapleft",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_LEFT && !k(e);
}
},
sapleftmodifiers: {
sName: "sapleftmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_LEFT && k(e);
}
},
sapright: {
sName: "sapright",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_RIGHT && !k(e);
}
},
saprightmodifiers: {
sName: "saprightmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ARROW_RIGHT && k(e);
}
},
saphome: {
sName: "saphome",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.HOME && !k(e);
}
},
saphomemodifiers: {
sName: "saphomemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.HOME && k(e);
}
},
saptop: {
sName: "saptop",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.HOME && h(e, true, false,
false);
}
},
sapend: {
sName: "sapend",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.END && !k(e);
}
},
sapendmodifiers: {
sName: "sapendmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.END && k(e);
}
},
sapbottom: {
sName: "sapbottom",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.END && h(e, true, false, false);
}
},
sappageup: {
sName: "sappageup",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_UP && !k(e);
}
},
sappageupmodifiers: {
sName: "sappageupmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_UP && k(e);
}
},
sappagedown: {
sName: "sappagedown",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_DOWN && !k(e);
}
},
sappagedownmodifiers: {
sName: "sappagedownmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.PAGE_DOWN && k(e);
}
},
sapselect: {
sName: "sapselect",
aTypes: ["keydown"],
fnCheck: function(e) {
return (e.keyCode == q.sap.KeyCodes.ENTER || e.keyCode ==
q.sap.KeyCodes.SPACE) && !k(e);
}
},
sapselectmodifiers: {
sName: "sapselectmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return (e.keyCode == q.sap.KeyCodes.ENTER || e.keyCode ==
q.sap.KeyCodes.SPACE) && k(e);
}
},
sapspace: {
sName: "sapspace",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.SPACE && !k(e);
}
},
sapspacemodifiers: {
sName: "sapspacemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.SPACE && k(e);
}
},
sapenter: {
sName: "sapenter",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ENTER && !k(e);
}
},
sapentermodifiers: {
sName: "sapentermodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ENTER && k(e);
}
},
sapbackspace: {
sName: "sapbackspace",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.BACKSPACE && !k(e);
}
},
sapbackspacemodifiers: {
sName: "sapbackspacemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.BACKSPACE && k(e);
}
},
sapdelete: {
sName: "sapdelete",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.DELETE && !k(e);
}
},
sapdeletemodifiers: {
sName: "sapdeletemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.DELETE && k(e);
}
},
sapexpand: {
sName: "sapexpand",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_PLUS && !k(e);
}
},
sapexpandmodifiers: {
sName: "sapexpandmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_PLUS && k(e);
}
},
sapcollapse: {
sName: "sapcollapse",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_MINUS && !k(e);
}
},
sapcollapsemodifiers: {
sName: "sapcollapsemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_MINUS && k(e);
}
},
sapcollapseall: {
sName: "sapcollapseall",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.NUMPAD_ASTERISK && !k(e);
}
},
sapescape: {
sName: "sapescape",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.ESCAPE && !k(e);
}
},
saptabnext: {
sName: "saptabnext",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.TAB && !k(e);
}
},
saptabprevious: {
sName: "saptabprevious",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.TAB && h(e, false, false, true);
}
},
sapskipforward: {
sName: "sapskipforward",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.F6 && !k(e);
}
},
sapskipback: {
sName: "sapskipback",
aTypes: ["keydown"],
fnCheck: function(e) {
return e.keyCode == q.sap.KeyCodes.F6 && h(e, false, false, true);
}
},
sapdecrease: {
sName: "sapdecrease",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var i = R ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_DOWN)
&& !k(e);
}
},
sapminus: {
sName: "sapminus",
aTypes: ["keypress"],
fnCheck: function(e) {
var C = String.fromCharCode(e.which);
return C == '-';
}
},
sapdecreasemodifiers: {
sName: "sapdecreasemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var i = R ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_DOWN)
&& k(e);
}
},
sapincrease: {
sName: "sapincrease",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var N = R ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_UP)
&& !k(e);
}
},
sapplus: {
sName: "sapplus",
aTypes: ["keypress"],
fnCheck: function(e) {
var C = String.fromCharCode(e.which);
return C == '+';
}
},
sapincreasemodifiers: {
sName: "sapincreasemodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var N = R ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_UP) &&
k(e);
}
},
sapprevious: {
sName: "sapprevious",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var i = R ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_UP)
&& !k(e);
}
},
sappreviousmodifiers: {
sName: "sappreviousmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var i = R ? q.sap.KeyCodes.ARROW_RIGHT : q.sap.KeyCodes.ARROW_LEFT;
return (e.keyCode == i || e.keyCode == q.sap.KeyCodes.ARROW_UP) &&
k(e);
}
},
sapnext: {
sName: "sapnext",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var N = R ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_DOWN)
&& !k(e);
}
},
sapnextmodifiers: {
sName: "sapnextmodifiers",
aTypes: ["keydown"],
fnCheck: function(e) {
var R = sap.ui.getCore().getConfiguration().getRTL();
var N = R ? q.sap.KeyCodes.ARROW_LEFT : q.sap.KeyCodes.ARROW_RIGHT;
return (e.keyCode == N || e.keyCode == q.sap.KeyCodes.ARROW_DOWN)
&& k(e);
}
},
sapdelayeddoubleclick: {
sName: "sapdelayeddoubleclick",
aTypes: ["click"],
fnCheck: function(e) {
var i = q(e.target);
var j = e.timeStamp;
var z = i.data("sapdelayeddoubleclick_lastClickTimestamp");
var A = z || 0;
i.data("sapdelayeddoubleclick_lastClickTimestamp", j);
var B = j - A;
return (B >= 300 && B <= 1300);
}
}
};
var P = ["sapdown", "sapdownmodifiers", "sapshow", "sapup", "sapupmodifiers",
"saphide", "sapleft", "sapleftmodifiers", "sapright", "saprightmodifiers",
"saphome", "saphomemodifiers", "saptop", "sapend", "sapendmodifiers", "sapbottom",
"sappageup", "sappageupmodifiers", "sappagedown", "sappagedownmodifiers",
"sapselect", "sapselectmodifiers", "sapspace", "sapspacemodifiers", "sapenter",
"sapentermodifiers", "sapexpand", "sapbackspace", "sapbackspacemodifiers",
"sapdelete", "sapdeletemodifiers", "sapexpandmodifiers", "sapcollapse",
"sapcollapsemodifiers", "sapcollapseall", "sapescape", "saptabnext",
"saptabprevious", "sapskipforward", "sapskipback", "sapprevious",
"sappreviousmodifiers", "sapnext", "sapnextmodifiers", "sapdecrease", "sapminus",
"sapdecreasemodifiers", "sapincrease", "sapplus", "sapincreasemodifiers",
"sapdelayeddoubleclick"];
(function initTouchEventSupport() {
q.sap.touchEventMode = "SIM";
var A = [];
var e = [];
if (D.support.touch) {
q.sap.touchEventMode = "ON";
q.event.props.push("touches", "targetTouches", "changedTouches");
}
var j = function(J, K, N) {
var Q = "__" + J + "Handler";
var R = "sap" + J;
A.push(R);
e.push({
sName: J,
aTypes: [R],
fnCheck: function(U) {
return true;
}
});
q.event.special[R] = {
add: function(U) {
var V = this
, $ = q(this)
, W = {
domRef: V,
eventName: J,
sapEventName: R,
eventHandle: U
};
var X = function(Y) {
N(Y, W);
};
U.__sapSimulatedEventHandler = X;
for (var i = 0; i < K.length; i++) {
$.on(K[i], X);
}
},
remove: function(U) {
var $ = q(this);
var N = U.__sapSimulatedEventHandler;
$.removeData(Q + U.guid);
for (var i = 0; i < K.length; i++) {
q.event.remove(this, K[i], N);
}
}
};
};
var M = function(J, K) {
var $ = q(K.domRef);
if (J.isMarked("delayedMouseEvent")) {
return;
}
if (!(J.type != "mouseout" || (J.type === "mouseout" &&
q.sap.checkMouseEnterOrLeave(J, K.domRef)))) {
var N = true;
var Q = $.data("__touchstart_control");
if (Q) {
var R = q.sap.domById(Q);
if (R && q.sap.checkMouseEnterOrLeave(J, R)) {
N = false;
}
}
if (N) {
return;
}
}
var U = q.event.fix(J.originalEvent || J);
U.type = K.sapEventName;
if (U.isMarked("firstUIArea")) {
U.setMark("handledByUIArea", false);
}
var V = [{
identifier: 1,
pageX: U.pageX,
pageY: U.pageY,
clientX: U.clientX,
clientY: U.clientY,
screenX: U.screenX,
screenY: U.screenY,
target: U.target,
radiusX: 1,
radiusY: 1,
rotationAngle: 0
}];
switch (K.eventName) {
case "touchstart":
case "touchmove":
U.touches = U.changedTouches = U.targetTouches = V;
break;
case "touchend":
U.changedTouches = V;
U.touches = U.targetTouches = [];
break;
}
if (K.eventName === "touchstart" || $.data("__touch_in_progress")) {
$.data("__touch_in_progress", "X");
var W = q.fn.control ? q(J.target).control(0) : null;
if (W) {
$.data("__touchstart_control", W.getId());
}
if (J.type === "mouseout") {
U.setMarked("fromMouseout");
}
if (J.type !== "dragstart") {
K.eventHandle.handler.call(K.domRef, U);
}
if ((K.eventName === "touchend" || J.type === "dragstart") && !
U.isMarked("fromMouseout")) {
$.removeData("__touch_in_progress");
$.removeData("__touchstart_control");
}
}
};
if (!(D.support.pointer && D.support.touch)) {
j("touchstart", ["mousedown"], M);
j("touchend", ["mouseup", "mouseout"], M);
j("touchmove", ["mousemove", "dragstart"], M);
}
if (D.support.touch && !(D.os.windows_phone && D.os.version < 10)) {
var F = false, z = q.vmouse.moveDistanceThreshold, S, B, O, C, L;
var E = function(J, K, N) {
var Q = q.event.fix(J.originalEvent || J);
Q.type = K.sapEventName;
delete Q.touches;
delete Q.changedTouches;
delete Q.targetTouches;
Q.screenX = N.screenX;
Q.screenY = N.screenY;
Q.clientX = N.clientX;
Q.clientY = N.clientY;
Q.ctrlKey = N.ctrlKey;
Q.altKey = N.altKey;
Q.shiftKey = N.shiftKey;
Q.button = 0;
return Q;
};
var T = function(J, K) {
if (J.isMarked("handledByTouchToMouse")) {
return;
}
J.setMarked("handledByTouchToMouse");
if (!F) {
var N = J.originalEvent.touches[0];
F = (Math.abs(N.pageX - S) > z || Math.abs(N.pageY - B) > z);
}
if (D.os.blackberry) {
if (L && J.timeStamp - L < 50) {
return;
}
L = J.timeStamp;
}
var Q = E(J, K, J.touches[0]);
q.sap.delayedCall(0, this, function() {
Q.setMark("handledByUIArea", false);
K.eventHandle.handler.call(K.domRef, Q);
});
};
var H = function(J, K) {
if (J.isMarked("handledByTouchToMouse")) {
return;
}
J.setMarked("handledByTouchToMouse");
var N, Q, R;
function U() {
return E(J, K, K.eventName === "mouseup" ?
J.changedTouches[0] : J.touches[0]);
}
if (J.type === "touchstart") {
var V = J.originalEvent.touches[0];
F = false;
L = 0;
S = V.pageX;
B = V.pageY;
O = Math.round(V.pageX - q(J.target).offset().left);
C = Math.round(V.pageY - q(J.target).offset().top);
N = U();
q.sap.delayedCall(0, this, function() {
N.setMark("handledByUIArea", false);
K.eventHandle.handler.call(K.domRef, N);
});
} else if (J.type === "touchend") {
Q = U();
R = !F;
q.sap.delayedCall(0, this, function() {
Q.setMark("handledByUIArea", false);
K.eventHandle.handler.call(K.domRef, Q);
if (R) {
Q.type = "click";
Q.getPseudoTypes = q.Event.prototype.getPseudoTypes;
Q.setMark("handledByUIArea", false);
Q.offsetX = O;
Q.offsetY = C;
K.eventHandle.handler.call(K.domRef, Q);
}
});
}
};
q.sap.disableTouchToMouseHandling();
j("mousedown", ["touchstart"], H);
j("mousemove", ["touchmove"], T);
j("mouseup", ["touchend", "touchcancel"], H);
}
A.push("swipe", "tap", "swipeleft", "swiperight", "scrollstart",
"scrollstop");
e.push({
sName: "swipebegin",
aTypes: ["swipeleft", "swiperight"],
fnCheck: function(J) {
var R = sap.ui.getCore().getConfiguration().getRTL();
return (R && J.type === "swiperight") || (!R && J.type ===
"swipeleft");
}
});
e.push({
sName: "swipeend",
aTypes: ["swipeleft", "swiperight"],
fnCheck: function(J) {
var R = sap.ui.getCore().getConfiguration().getRTL();
return (!R && J.type === "swiperight") || (R && J.type ===
"swipeleft");
}
});
if (q.sap.Version(q.fn.jquery).compareTo("1.9.1") < 0) {
q.sap.ControlEvents = q.sap.ControlEvents.concat(A);
} else {
q.sap.ControlEvents = A.concat(q.sap.ControlEvents);
}
for (var i = 0; i < e.length; i++) {
q.sap.PseudoEvents[e[i].sName] = e[i];
P.push(e[i].sName);
}
}());
function f() {
var e = q.sap.PseudoEvents
, R = [];
for (var N in e) {
if (e[N].aTypes) {
for (var j = 0, i = e[N].aTypes.length; j < i; j++) {
var T = e[N].aTypes[j];
if (q.inArray(T, R) == -1) {
R.push(T);
}
}
}
}
return R;
}
var g = f();
function h(e, C, A, S) {
return e.shiftKey == S && e.altKey == A && l(e) == C;
}
function k(e) {
return e.shiftKey || e.altKey || l(e);
}
function l(e) {
return !!(e.metaKey || e.ctrlKey);
}
q.Event.prototype.getPseudoTypes = function() {
var e = [];
if (q.inArray(this.type, g) != -1) {
var j = P;
var z = j.length;
var A = null;
for (var i = 0; i < z; i++) {
A = q.sap.PseudoEvents[j[i]];
if (A.aTypes && q.inArray(this.type, A.aTypes) > -1 && A.fnCheck &&
A.fnCheck(this)) {
e.push(A.sName);
}
}
}
this.getPseudoTypes = function() {
return e.slice();
}
;
return e.slice();
}
;
q.Event.prototype.isPseudoType = function(T) {
var e = this.getPseudoTypes();
if (T) {
return q.inArray(T, e) > -1;
} else {
return e.length > 0;
}
}
;
q.sap.bindAnyEvent = function bindAnyEvent(C) {
if (C) {
q(document).bind(q.sap.ControlEvents.join(" "), C);
}
}
;
q.sap.unbindAnyEvent = function unbindAnyEvent(C) {
if (C) {
q(document).unbind(q.sap.ControlEvents.join(" "), C);
}
}
;
q.sap.checkMouseEnterOrLeave = function checkMouseEnterOrLeave(E, i) {
if (E.type != "mouseover" && E.type != "mouseout") {
return false;
}
var j = false;
var z = i;
var A = E.relatedTarget;
try {
while (A && A !== z) {
A = A.parentNode;
}
if (A !== z) {
j = true;
}
} catch (e) {}
return j;
}
;
q.sap.isSpecialKey = function(e) {
var K = q.sap.KeyCodes
, i = e.which
, S = n(e) || p(e) || (i >= 33 && i <= 36) || (i >= 44 && i <= 46) || (i
>= 112 && i <= 123) || (i === K.BREAK) || (i === K.BACKSPACE) || (i === K.TAB) ||
(i === K.ENTER) || (i === K.ESCAPE) || (i === K.SCROLL_LOCK);
switch (e.type) {
case "keydown":
case "keyup":
return S;
case "keypress":
return (i === 0 || i === K.BACKSPACE || i === K.ESCAPE || i ===
K.ENTER) || false;
default:
return false;
}
}
;
function n(e) {
var K = q.sap.KeyCodes
, i = e.which;
return (i === K.SHIFT) || (i === K.CONTROL) || (i === K.ALT) || (i ===
K.CAPS_LOCK) || (i === K.NUM_LOCK);
}
function p(e) {
var K = e.which
, A = (K >= 37 && K <= 40);
switch (e.type) {
case "keydown":
case "keyup":
return A;
case "keypress":
return K === 0;
default:
return false;
}
}
q.Event.prototype.getOffsetX = function() {
if (this.type == 'click') {
if (this.offsetX) {
return this.offsetX;
}
if (this.layerX) {
return this.layerX;
}
if (this.originalEvent.layerX) {
return this.originalEvent.layerX;
}
}
return 0;
}
;
q.Event.prototype.getOffsetY = function() {
if (this.type == 'click') {
if (this.offsetY) {
return this.offsetY;
}
if (this.layerY) {
return this.layerY;
}
if (this.originalEvent.layerY) {
return this.originalEvent.layerY;
}
}
return 0;
}
;
var s = q.Event.prototype.stopImmediatePropagation;
q.Event.prototype.stopImmediatePropagation = function(S) {
s.apply(this, arguments);
if (S) {
this._bIsStopHandlers = true;
}
}
;
q.Event.prototype.isImmediateHandlerPropagationStopped = function() {
return !!this._bIsStopHandlers;
}
;
var G = function(e) {
while (e && e.originalEvent && e !== e.originalEvent) {
e = e.originalEvent;
}
return e;
};
q.Event.prototype.setMark = function(K, V) {
K = K || "handledByControl";
V = arguments.length < 2 ? true : V;
var N = G(this);
N["_sapui_" + K] = V;
}
;
q.Event.prototype.setMarked = q.Event.prototype.setMark;
q.Event.prototype.isMarked = function(K) {
return !!this.getMark(K);
}
;
q.Event.prototype.getMark = function(K) {
K = K || "handledByControl";
var N = G(this);
return N["_sapui_" + K];
}
;
q.sap._FASTNAVIGATIONKEY = "sap-ui-fastnavgroup";
function r(R) {
var $ = q(R).closest('[data-sap-ui-customfastnavgroup="true"]');
return $[0];
}
function t(R) {
var e = r(R);
if (e) {
return e;
}
var $ = q(R).closest('[data-' + q.sap._FASTNAVIGATIONKEY + '="true"]');
return $[0];
}
function u(R, S, N) {
var $ = q(R), A, T;
if (N) {
A = q.merge($.find("*"), q.merge($.nextAll(), $.parents().nextAll()));
T = A.find(':sapTabbable').addBack(':sapTabbable');
} else {
A = q.merge($.prevAll(), $.parents().prevAll());
T = q.merge($.parents(':sapTabbable'),
A.find(':sapTabbable').addBack(':sapTabbable'));
}
var T = q.unique(T);
return T.filter(function() {
return w(S, this);
});
}
function v(R, S) {
var e = q.sap.domById("sap-ui-static");
if (!e) {
return R;
}
var j = [];
for (var i = 0; i < S.length; i++) {
if (q.contains(e, S[i])) {
j.push(S[i]);
}
}
return R.filter(function() {
if (j.length && w(j, this)) {
return true;
}
return !q.contains(e, this);
});
}
function w(C, R) {
for (var i = 0; i < C.length; i++) {
if (C[i] === R || q.contains(C[i], R)) {
return true;
}
}
return false;
}
function x(F, T, S, e) {
var j, $;
for (var i = T.length - 1; i >= 0; i--) {
j = t(T[i]);
if (j != S) {
if (e) {
S = j;
e = false;
} else {
$ = q(T[i + 1]);
break;
}
}
}
if (!$ && !e) {
$ = F;
}
return $;
}
function y(S, e, F) {
if (!e || e.length == 0) {
e = [document];
}
if (!w(e, S)) {
return;
}
var j = t(S), A = v(q(e).find(':sapTabbable').addBack(':sapTabbable'), e),
$ = A.first(), T = v(u(S, e, F), e), z, B;
if (F) {
for (var i = 0; i < T.length; i++) {
z = t(T[i]);
if (z != j) {
B = q(T[i]);
break;
}
}
if (!B || !B.length) {
B = $;
}
} else {
B = x($, T, j, true);
if (!B || !B.length) {
if (A.length == 1) {
B = q(A[0]);
} else if (A.length > 1) {
j = t(A.eq(-1));
z = t(A.eq(-2));
if (j != z) {
B = A.eq(-1);
} else {
B = x($, A, j, false);
}
}
}
}
if (B && B.length) {
var C = B[0]
, E = null
, H = r(C);
if (H && H.id) {
var J = sap.ui.getCore().byId(H.id);
if (J) {
E = q.Event("BeforeFastNavigationFocus");
E.target = C;
E.source = S;
E.forward = F;
J._handleEvent(E);
}
}
if (!E || !E.isDefaultPrevented()) {
q.sap.focus(C);
}
}
}
q.sap.handleF6GroupNavigation = function(e, S) {
if (e.type != "keydown" || e.keyCode != q.sap.KeyCodes.F6 ||
e.isMarked("sapui5_handledF6GroupNavigation") || e.isMarked() ||
e.isDefaultPrevented()) {
return;
}
e.setMark("sapui5_handledF6GroupNavigation");
e.setMarked();
e.preventDefault();
if (S && S.skip) {
return;
}
var T = S && S.target ? S.target : document.activeElement
, i = null;
if (S && S.scope) {
i = q.isArray(S.scope) ? S.scope : [S.scope];
}
y(T, i, !e.shiftKey);
}
;
q(function() {
q(document).on("keydown", function(e) {
q.sap.handleF6GroupNavigation(e, null);
});
});
q.sap._refreshMouseEventDelayedFlag = function() {
q.sap.isMouseEventDelayed = !!(D.browser.mobile && !((D.os.ios &&
D.os.version >= 8 && D.browser.safari && !D.browser.webview) || (D.browser.chrome
&& !/SAMSUNG/.test(navigator.userAgent) && D.browser.version >= 32)));
}
;
q.sap._refreshMouseEventDelayedFlag();
return q;
});
sap.ui.predefine('jquery.sap.keycodes', ['jquery.sap.global'], function(q) {
"use strict";
q.sap.KeyCodes = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CONTROL: 17,
ALT: 18,
BREAK: 19,
CAPS_LOCK: 20,
ESCAPE: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
ARROW_LEFT: 37,
ARROW_UP: 38,
ARROW_RIGHT: 39,
ARROW_DOWN: 40,
PRINT: 44,
INSERT: 45,
DELETE: 46,
DIGIT_0: 48,
DIGIT_1: 49,
DIGIT_2: 50,
DIGIT_3: 51,
DIGIT_4: 52,
DIGIT_5: 53,
DIGIT_6: 54,
DIGIT_7: 55,
DIGIT_8: 56,
DIGIT_9: 57,
A: 65,
B: 66,
C: 67,
D: 68,
E: 69,
F: 70,
G: 71,
H: 72,
I: 73,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
Q: 81,
R: 82,
S: 83,
T: 84,
U: 85,
V: 86,
W: 87,
X: 88,
Y: 89,
Z: 90,
WINDOWS: 91,
CONTEXT_MENU: 93,
TURN_OFF: 94,
SLEEP: 95,
NUMPAD_0: 96,
NUMPAD_1: 97,
NUMPAD_2: 98,
NUMPAD_3: 99,
NUMPAD_4: 100,
NUMPAD_5: 101,
NUMPAD_6: 102,
NUMPAD_7: 103,
NUMPAD_8: 104,
NUMPAD_9: 105,
NUMPAD_ASTERISK: 106,
NUMPAD_PLUS: 107,
NUMPAD_MINUS: 109,
NUMPAD_COMMA: 110,
NUMPAD_SLASH: 111,
F1: 112,
F2: 113,
F3: 114,
F4: 115,
F5: 116,
F6: 117,
F7: 118,
F8: 119,
F9: 120,
F10: 121,
F11: 122,
F12: 123,
NUM_LOCK: 144,
SCROLL_LOCK: 145,
OPEN_BRACKET: 186,
PLUS: 187,
COMMA: 188,
SLASH: 189,
DOT: 190,
PIPE: 191,
SEMICOLON: 192,
MINUS: 219,
GREAT_ACCENT: 220,
EQUALS: 221,
SINGLE_QUOTE: 222,
BACKSLASH: 226
};
return q;
});
sap.ui.predefine('jquery.sap.mobile', ['jquery.sap.global', 'sap/ui/Device',
'jquery.sap.dom', 'jquery.sap.events'], function(q, D) {
"use strict";
(function($) {
var F = /(?:\?|&)sap-ui-xx-fakeOS=([^&]+)/;
$.sap.simulateMobileOnDesktop = false;
if ((D.browser.webkit || (D.browser.msie && D.browser.version >= 10)) && !
q.support.touch) {
var r = document.location.search.match(F);
var a = r && r[1] || q.sap.byId("sap-ui-bootstrap").attr("data-sap-ui-
xx-fakeOS");
if (a) {
$.sap.simulateMobileOnDesktop = true;
var u = {
ios: "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X)
AppleWebKit/534.48 (KHTML, like Gecko) Version/5.1 Mobile/9A406 Safari/7534.48.3",
iphone: "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS
X) AppleWebKit/534.48 (KHTML, like Gecko) Version/5.1 Mobile/9A406
Safari/7534.48.3",
ipad: "Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X)
AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206",
android: "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; GT-I9100
Build/IML74K) AppleWebKit/534.46 (KHTML, like Gecko) Version/4.0 Mobile
Safari/534.46",
android_phone: "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us;
GT-I9100 Build/IML74K) AppleWebKit/534.46 (KHTML, like Gecko) Version/4.0 Mobile
Safari/534.46",
android_tablet: "Mozilla/5.0 (Linux; Android 4.1.2; Nexus 7
Build/JZ054K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166
Safari/535.19",
blackberry: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+
(KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+",
winphone: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone
8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)"
}[a];
if (u && (D.browser.webkit && a !== "winphone" || D.browser.msie &&
a === "winphone")) {
if (D.browser.safari) {
var _ = window.navigator;
window.navigator = {};
window.navigator.__proto__ = _;
window.navigator.__defineGetter__('userAgent', function() {
return u;
});
} else {
Object.defineProperty(navigator, "userAgent", {
get: function() {
return u;
}
});
}
if (D.browser.webkit) {
q.browser.msie = q.browser.opera = q.browser.mozilla =
false;
q.browser.webkit = true;
q.browser.version = "534.46";
}
D._update($.sap.simulateMobileOnDesktop);
}
}
}
$.os = $.extend({
os: D.os.name,
version: D.os.versionStr,
fVersion: D.os.version
}, $.os);
$.os[D.os.name] = true;
$.extend($.support, {
retina: window.devicePixelRatio >= 2
});
$.device = $.extend({}, $.device);
$.device.is = $.extend({
standalone: window.navigator.standalone,
landscape: D.orientation.landscape,
portrait: D.orientation.portrait,
iphone: D.os.ios && D.system.phone,
ipad: D.os.ios && D.system.tablet,
android_phone: D.system.phone && D.os.android,
android_tablet: D.system.tablet && D.os.android,
tablet: D.system.tablet,
phone: D.system.phone,
desktop: D.system.desktop
}, $.device.is);
if (D.os.windows_phone) {
var t;
t = document.createElement("meta");
t.setAttribute("name", "msapplication-tap-highlight");
t.setAttribute("content", "no");
document.head.appendChild(t);
t = document.createElement("style");
t.appendChild(document.createTextNode('@-ms-viewport{width:device-
width;}'));
document.head.appendChild(t);
}
var b = false;
$.sap.initMobile = function(o) {
var c = $("head");
if (!b) {
b = true;
o = $.extend({}, {
viewport: true,
statusBar: "default",
hideBrowser: true,
preventScroll: true,
preventPhoneNumberDetection: true,
useFullScreenHeight: true,
homeIconPrecomposed: false,
mobileWebAppCapable: "default"
}, o);
if (D.os.ios && o.preventPhoneNumberDetection) {
c.append($('<meta name="format-detection"
content="telephone=no">'));
} else if (D.browser.msie) {
c.append($('<meta http-equiv="cleartype" content="on">'));
c.append($('<meta name="msapplication-tap-highlight"
content="no">'));
}
var i = D.os.ios && D.os.version >= 7 && D.os.version < 8 &&
D.browser.name === "sf";
if (o.viewport) {
var m;
if (i && D.system.phone) {
m = 'minimal-ui, initial-scale=1.0, maximum-scale=1.0,
user-scalable=0';
} else if (i && D.system.tablet) {
m = 'initial-scale=1.0, maximum-scale=1.0, user-
scalable=no';
} else if ($.device.is.iphone &&
(Math.max(window.screen.height, window.screen.width) === 568)) {
m = "user-scalable=0, initial-scale=1.0";
} else if (D.os.android && D.os.version < 3) {
m = "width=device-width, height=device-height, initial-
scale=1.0, maximum-scale=1.0, user-scalable=no";
} else {
m = "width=device-width, initial-scale=1.0, maximum-
scale=1.0, user-scalable=no";
}
c.append($('<meta name="viewport" content="' + m + '">'));
}
if (o.mobileWebAppCapable === "default") {
if (D.os.ios) {
c.append($('<meta name="apple-mobile-web-app-capable"
content="yes">'));
}
} else {
$.sap.setMobileWebAppCapable(o.mobileWebAppCapable);
}
if (D.os.ios) {
c.append($('<meta name="apple-mobile-web-app-status-bar-style"
content="' + o.statusBar + '">'));
}
if (o.preventScroll && !D.os.blackberry) {
$(window).bind("touchmove", function
sapInitMobileTouchMoveHandle(e) {
if (!e.isMarked()) {
e.preventDefault();
}
});
}
if (o.useFullScreenHeight) {
$(function() {
document.documentElement.style.height = "100%";
});
}
}
if (o && o.homeIcon) {
var I;
if (typeof o.homeIcon === "string") {
I = {
phone: o.homeIcon
};
} else {
I = $.extend({}, o.homeIcon);
}
I.precomposed = o.homeIconPrecomposed || I.precomposed;
I.favicon = o.homeIcon.icon || I.favicon;
I.icon = undefined;
$.sap.setIcons(I);
}
}
;
$.sap.setIcons = function(i) {
if (!i || (typeof i !== "object")) {
$.sap.log.warning("Call to jQuery.sap.setIcons() has been ignored
because there were no icons given or the argument was not an object.");
return;
}
var c = $("head")
, p = i.precomposed ? "-precomposed" : ""
, g = function(h) {
return i[h] || i['tablet@2'] || i['phone@2'] || i['phone'] ||
i['tablet'];
}
, s = {
"phone": "",
"tablet": "76x76",
"phone@2": "120x120",
"tablet@2": "152x152"
};
if (i["favicon"]) {
var d = c.find("[rel^=shortcut]");
d.each(function() {
if (this.rel === "shortcut icon") {
$(this).remove();
}
});
c.append($('<link rel="shortcut icon" href="' + i["favicon"] +
'" />'));
}
if (g("phone")) {
c.find("[rel=apple-touch-icon]").remove();
c.find("[rel=apple-touch-icon-precomposed]").remove();
}
for (var e in s) {
i[e] = i[e] || g(e);
if (i[e]) {
var f = s[e];
c.append($('<link rel="apple-touch-icon' + p + '" ' + (f ?
'sizes="' + f + '"' : "") + ' href="' + i[e] + '" />'));
}
}
}
;
$.sap.setMobileWebAppCapable = function(v) {
if (!D.system.tablet && !D.system.phone) {
return;
}
var h = $("head"), p = ["", "apple"], n = "mobile-web-app-capable", c =
v ? "yes" : "no", i, N, w;
for (i = 0; i < p.length; i++) {
N = p[i] ? (p[i] + "-" + n) : n;
w = h.children('meta[name="' + N + '"]');
if (w.length) {
w.attr("content", c);
} else {
h.append($('<meta name="' + N + '" content="' + c + '">'));
}
}
}
;
}
)(q);
return q;
});
sap.ui.predefine('jquery.sap.properties', ['jquery.sap.global', 'sap/ui/Device',
'jquery.sap.sjax'], function(q, D) {
"use strict";
var P = function() {
this.mProperties = {};
this.aKeys = null;
};
P.prototype.getProperty = function(k, d) {
var v = this.mProperties[k];
if (typeof (v) == "string") {
return v;
} else if (d) {
return d;
}
return null;
}
;
P.prototype.getKeys = function() {
return this.aKeys || (this.aKeys = Object.keys(this.mProperties));
}
;
P.prototype.setProperty = function(k, v) {
if (typeof (v) != "string") {
return;
}
if (typeof (this.mProperties[k]) != "string" && this.aKeys) {
this.aKeys.push(k);
}
this.mProperties[k] = v;
}
;
P.prototype.clone = function() {
var c = new P();
c.mProperties = q.extend({}, this.mProperties);
return c;
}
;
var f = D.browser.chrome ? function(s, c) {
if (c > 2 && 40 * c > s.length) {
Number(s);
}
return s;
}
: function(s) {
return s;
}
;
var r = /(?:\r\n|\r|\n|^)[ \t\f]*/;
var a = /(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)|([ \t\f]*[ \t\f:=][ \t\f]*)/g;
var b = /(\\u[0-9a-fA-F]{0,4})|(\\.)|(\\$)/g;
var E = {
'\\f': '\f',
'\\n': '\n',
'\\r': '\r',
'\\t': '\t'
};
function p(t, o) {
var l = t.split(r), L, c, k, v, i, m, d, C;
function e(s) {
if (v) {
v = v + s;
C++;
} else {
v = s;
C = 0;
}
}
o.mProperties = {};
for (i = 0; i < l.length; i++) {
L = l[i];
if (L === "" || L.charAt(0) === "#" || L.charAt(0) === "!") {
continue;
}
c = a;
c.lastIndex = d = 0;
k = null;
v = "";
while ((m = c.exec(L)) !== null) {
if (d < m.index) {
e(L.slice(d, m.index));
}
d = c.lastIndex;
if (m[1]) {
if (m[1].length !== 6) {
throw new Error("Incomplete Unicode Escape '" + m[1] +
"'");
}
e(String.fromCharCode(parseInt(m[1].slice(2), 16)));
} else if (m[2]) {
e(E[m[2]] || m[2].slice(1));
} else if (m[3]) {
L = l[++i];
c.lastIndex = d = 0;
} else if (m[4]) {
k = v;
v = "";
c = b;
c.lastIndex = d;
}
}
if (d < L.length) {
e(L.slice(d));
}
if (k == null) {
k = v;
v = "";
}
o.mProperties[k] = f(v, v ? C : 0);
}
}
q.sap.properties = function properties(m) {
m = q.extend({
url: undefined,
headers: {}
}, m);
var A = !!m.async
, o = new P();
function _(t) {
if (typeof (t) == "string") {
p(t, o);
}
}
function c() {
var R;
if (typeof (m.url) == "string") {
R = q.sap.loadResource({
url: m.url,
dataType: 'text',
headers: m.headers,
failOnError: false,
async: A
});
}
return R;
}
if (A) {
return new Promise(function(d, g) {
var R = c();
if (!R) {
d(o);
return;
}
R.then(function(v) {
try {
_(v);
d(o);
} catch (e) {
g(e);
}
}, function(v) {
g(v instanceof Error ? v : new Error("Problem during loading of
property file '" + m.url + "': " + v));
});
}
);
} else {
_(c());
return o;
}
}
;
return q;
});
sap.ui.predefine('jquery.sap.resources', ['jquery.sap.global',
'jquery.sap.properties', 'jquery.sap.strings'], function(q) {
"use strict";
var r = /^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]
{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-
WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;
var M = {
"he": "iw",
"yi": "ji",
"id": "in",
"sr": "sh"
};
var a = {
"iw": "he",
"ji": "yi",
"in": "id",
"sn": "sr"
};
var b = {
"en_US_saptrc": "1Q",
"en_US_sappsd": "2Q"
};
var c = /(?:^|-)(saptrc|sappsd)(?:-|$)/i;
function n(L) {
var m;
if (typeof L === 'string' && (m = r.exec(L.replace(/_/g, '-')))) {
var h = m[1].toLowerCase();
h = M[h] || h;
var S = m[2] ? m[2].toLowerCase() : undefined;
var R = m[3] ? m[3].toUpperCase() : undefined;
var V = m[4] ? m[4].slice(1) : undefined;
var p = m[6];
if ((p && (m = c.exec(p))) || (V && (m = c.exec(V)))) {
return "en_US_" + m[1].toLowerCase();
}
if (h === "zh" && !R) {
if (S === "hans") {
R = "CN";
} else if (S === "hant") {
R = "TW";
}
}
return h + (R ? "_" + R + (V ? "_" + V.replace("-", "_") : "") : "");
}
}
function d() {
var L;
if (window.sap && sap.ui && sap.ui.getCore) {
L = sap.ui.getCore().getConfiguration().getLanguage();
L = n(L);
}
return L || "en";
}
function e(L) {
var m;
if (typeof L === 'string' && (m = r.exec(L.replace(/_/g, '-')))) {
var h = m[1].toLowerCase();
h = a[h] || h;
return h + (m[3] ? "-" + m[3].toUpperCase() + (m[4] ? "-" +
m[4].slice(1).replace("_", "-") : "") : "");
}
}
var f = /^((?:[^?#]*\/)?[^\/?#]*)(\.[^.\/?#]+)((?:\?([^#]*))?(?:#(.*))?)$/;
var v = [".properties", ".hdbtextbundle"];
function s(u) {
var m = f.exec(u);
return m && {
url: u,
prefix: m[1],
ext: m[2],
query: m[4],
hash: (m[5] || ""),
suffix: m[2] + (m[3] || "")
};
}
var B = function(u, L, i, A) {
this.sLocale = n(L) || d();
this.oUrlInfo = s(u);
if (!this.oUrlInfo || q.inArray(this.oUrlInfo.ext, v) < 0) {
throw new Error("resource URL '" + u + "' has unknown type (should be
one of " + v.join(",") + ")");
}
this.bIncludeInfo = i;
this.aCustomBundles = [];
this.aPropertyFiles = [];
this.aLocales = [];
var p = l(this, this.sLocale, A);
if (A) {
this._promise = p;
}
};
B.prototype = {};
B.prototype._enhance = function(C) {
if (C && C instanceof B) {
this.aCustomBundles.push(C);
} else {
q.sap.log.error("Custom ResourceBundle is either undefined or not an
instanceof jQuery.sap.util.ResourceBundle. Therefore this custom ResourceBundle
will be ignored!");
}
}
;
B.prototype.getText = function(k, A, C) {
var V = null, i;
for (i = this.aCustomBundles.length - 1; i >= 0; i--) {
V = this.aCustomBundles[i].getText(k, A, true);
if (V != null) {
return V;
}
}
for (i = 0; i < this.aPropertyFiles.length; i++) {
V = this.aPropertyFiles[i].getProperty(k);
if (typeof (V) === "string") {
break;
}
}
if (typeof (V) !== "string") {
var t = this.aLocales[0];
while (t.length > 0) {
if (t == "zh_HK") {
t = "zh_TW";
} else {
var p = t.lastIndexOf('_');
if (p >= 0) {
t = t.substring(0, p);
} else if (t != "en") {
t = "en";
} else {
t = "";
}
}
var P = l(this, t);
if (P == null) {
continue;
}
V = P.getProperty(k);
if (typeof (V) === "string") {
break;
}
}
}
if (!C && typeof (V) !== "string") {
V = k;
}
if (typeof (V) === "string") {
if (A) {
V = q.sap.formatMessage(V, A);
}
if (this.bIncludeInfo) {
V = new String(V);
V.originInfo = {
source: "Resource Bundle",
url: this.oUrlInfo.url,
locale: this.sLocale,
key: k
};
}
}
return V;
}
;
B.prototype.hasText = function(k) {
return this.aPropertyFiles.length > 0 && typeof
this.aPropertyFiles[0].getProperty(k) === "string";
}
;
function l(o, L, A) {
var u = o.oUrlInfo, U, R, p, P;
if (q.inArray(L, o.aLocales) == -1) {
if (g(L)) {
switch (u.ext) {
case '.hdbtextbundle':
if (b[L]) {
U = u.prefix + u.suffix + '?' + (u.query ? u.query + "&" :
"") + "sap-language=" + b[L] + (u.hash ? "#" + u.hash : "");
} else {
U = u.url;
}
R = {
url: U,
headers: {
"Accept-Language": e(L) || ""
}
};
break;
default:
R = {
url: u.prefix + (L ? "_" + L : "") + u.suffix
};
break;
}
if (A) {
R.async = true;
P = Promise.resolve(q.sap.properties(R));
} else {
p = q.sap.properties(R);
}
} else {
p = {
getProperty: function() {
return undefined;
}
};
if (A) {
P = Promise.resolve(p);
}
}
if (A) {
P.then(function(h) {
o.aPropertyFiles.push(h);
o.aLocales.push(L);
});
return P;
} else {
o.aPropertyFiles.push(p);
o.aLocales.push(L);
return p;
}
}
return A ? Promise.resolve(null) : null;
}
function g(L) {
var h = window.sap && sap.ui && sap.ui.getCore &&
sap.ui.getCore().getConfiguration().getSupportedLanguages();
if (h && h.length > 0) {
return q.inArray(L, h) >= 0;
}
return true;
}
q.sap.resources = function resources(p) {
p = q.extend({
url: "",
locale: undefined,
includeInfo: false
}, p);
var A = !!p.async;
var o = new B(p.url,p.locale,p.includeInfo,A);
if (A) {
return new Promise(function(h, i) {
function _() {
h(o);
delete o._promise;
}
o._promise.then(_, _);
}
);
} else {
return o;
}
}
;
q.sap.resources.isBundle = function(o) {
return o && o instanceof B;
}
;
q.sap.resources._getFallbackLocales = function(L, S) {
var t = n(L)
, h = [];
function i(L) {
return !S || S.length === 0 || q.inArray(L, S) >= 0;
}
while (t) {
if (i(t)) {
h.push(t);
}
if (t === "zh_HK") {
t = "zh_TW";
} else {
var p = t.lastIndexOf('_');
if (p > 0) {
t = t.slice(0, p);
} else if (t !== "en") {
t = "en";
} else {
t = "";
}
}
}
if (i("")) {
h.push("");
}
return h;
}
;
return q;
});
sap.ui.predefine('jquery.sap.script', ['jquery.sap.global'], function(q) {
"use strict";
var I = 0;
q.sap.uid = function uid() {
return "id-" + new Date().valueOf() + "-" + I++;
}
;
q.sap.delayedCall = function delayedCall(d, o, m, p) {
return setTimeout(function() {
if (q.type(m) == "string") {
m = o[m];
}
m.apply(o, p || []);
}, d);
}
;
q.sap.clearDelayedCall = function clearDelayedCall(d) {
clearTimeout(d);
return this;
}
;
q.sap.intervalCall = function intervalCall(i, o, m, p) {
return setInterval(function() {
if (q.type(m) == "string") {
m = o[m];
}
m.apply(o, p || []);
}, i);
}
;
q.sap.clearIntervalCall = function clearIntervalCall(i) {
clearInterval(i);
return this;
}
;
var U = function(u) {
this.mParams = {};
var Q = u || window.location.href;
if (Q.indexOf('#') >= 0) {
Q = Q.slice(0, Q.indexOf('#'));
}
if (Q.indexOf("?") >= 0) {
Q = Q.slice(Q.indexOf("?") + 1);
var p = Q.split("&"), P = {}, a, n, v;
for (var i = 0; i < p.length; i++) {
a = p[i].split("=");
n = decodeURIComponent(a[0]);
v = a.length > 1 ? decodeURIComponent(a[1].replace(/\+/g, ' ')) :
"";
if (n) {
if (!Object.prototype.hasOwnProperty.call(P, n)) {
P[n] = [];
}
P[n].push(v);
}
}
this.mParams = P;
}
};
U.prototype = {};
U.prototype.get = function(n, a) {
var v = Object.prototype.hasOwnProperty.call(this.mParams, n) ?
this.mParams[n] : [];
return a === true ? v : (v[0] || null);
}
;
q.sap.getUriParameters = function getUriParameters(u) {
return new U(u);
}
;
q.sap.unique = function(a) {
var l = a.length;
if (l > 1) {
a.sort();
var j = 0;
for (var i = 1; i < l; i++) {
if (a[i] !== a[j]) {
a[++j] = a[i];
}
}
if (++j < l) {
a.splice(j, l - j);
}
}
return a;
}
;
q.sap.equal = function(a, b, m, c, d) {
if (typeof m == "boolean") {
c = m;
m = undefined;
}
if (!d) {
d = 0;
}
if (!m) {
m = 10;
}
if (d > m) {
return false;
}
if (a === b) {
return true;
}
if (q.isArray(a) && q.isArray(b)) {
if (!c) {
if (a.length != b.length) {
return false;
}
} else {
if (a.length > b.length) {
return false;
}
}
for (var i = 0; i < a.length; i++) {
if (!q.sap.equal(a[i], b[i], m, c, d + 1)) {
return false;
}
}
return true;
}
if (typeof a == "object" && typeof b == "object") {
if (!a || !b) {
return false;
}
if (a.constructor != b.constructor) {
return false;
}
if (a.nodeName && b.nodeName && a.namespaceURI && b.namespaceURI) {
return q.sap.isEqualNode(a, b);
}
if (a instanceof Date) {
return a.valueOf() == b.valueOf();
}
for (var i in a) {
if (!q.sap.equal(a[i], b[i], m, c, d + 1)) {
return false;
}
}
if (!c) {
for (var i in b) {
if (a[i] === undefined) {
return false;
}
}
}
return true;
}
return false;
}
;
q.sap.each = function(o, c) {
var a = q.isArray(o), l, i;
if (a) {
for (i = 0,
l = o.length; i < l; i++) {
if (c.call(o[i], i, o[i]) === false) {
break;
}
}
} else {
for (i in o) {
if (c.call(o[i], i, o[i]) === false) {
break;
}
}
}
return o;
}
;
q.sap.forIn = {
toString: null
}.propertyIsEnumerable("toString") ? function(o, c) {
for (var n in o) {
if (c(n, o[n]) === false) {
return;
}
}
}
: (function() {
var D = ["toString", "valueOf", "toLocaleString", "hasOwnProperty",
"isPrototypeOf", "propertyIsEnumerable", "constructor"]
, a = D.length
, o = Object.prototype
, h = o.hasOwnProperty;
return function(O, c) {
var n, i;
for (n in O) {
if (c(n, O[n]) === false) {
return;
}
}
for (var i = 0; i < a; i++) {
n = D[i];
if (h.call(O, n) || O[n] !== o[n]) {
if (c(n, O[n]) === false) {
return;
}
}
}
}
;
}());
q.sap.hashCode = function(s) {
var h, l, c, i;
h = 0;
l = s.length;
for (i = 0; i < l; i++) {
c = s.charCodeAt(i);
h = (h << 5) - h + c;
h = h & h;
}
return h;
}
;
q.sap.arraySymbolDiff = function(o, n, s) {
var S = {}, O = [], N = [], a, v, b, c = 0, d = 0, e, f, g, h, D = [];
if (o === n || q.sap.equal(o, n)) {
return D;
}
s = s || function(V) {
if (typeof V !== "string") {
V = JSON.stringify(V) || "";
}
return q.sap.hashCode(V);
}
;
for (var i = 0; i < n.length; i++) {
v = s(n[i]);
b = S[v];
if (!b) {
b = S[v] = {
iNewCount: 0,
iOldCount: 0
};
}
b.iNewCount++;
N[i] = {
symbol: b
};
}
for (var i = 0; i < o.length; i++) {
v = s(o[i]);
b = S[v];
if (!b) {
b = S[v] = {
iNewCount: 0,
iOldCount: 0
};
}
b.iOldCount++;
b.iOldLine = i;
O[i] = {
symbol: b
};
}
for (var i = 0; i < N.length; i++) {
b = N[i].symbol;
if (b.iNewCount === 1 && b.iOldCount === 1) {
N[i].line = b.iOldLine;
O[b.iOldLine].line = i;
}
}
for (var i = 0; i < N.length - 1; i++) {
a = N[i].line;
if (a !== undefined && a < O.length - 1) {
if (O[a + 1].symbol === N[i + 1].symbol) {
O[a + 1].line = i + 1;
N[i + 1].line = a + 1;
}
}
}
for (var i = N.length - 1; i > 0; i--) {
a = N[i].line;
if (a !== undefined && a > 0) {
if (O[a - 1].symbol === N[i - 1].symbol) {
O[a - 1].line = i - 1;
N[i - 1].line = a - 1;
}
}
}
while (c < o.length || d < n.length) {
f = O[c] && O[c].line;
e = N[d] && N[d].line;
if (c < o.length && (f === undefined || f < d)) {
D.push({
index: d,
type: "delete"
});
c++;
} else if (d < n.length && (e === undefined || e < c)) {
D.push({
index: d,
type: "insert"
});
d++;
} else if (d === f) {
d++;
c++;
} else {
h = f - d;
g = e - c;
if (h <= g) {
D.push({
index: d,
type: "insert"
});
d++;
} else {
D.push({
index: d,
type: "delete"
});
c++;
}
}
}
return D;
}
;
q.sap.arrayDiff = function(o, n, c, u) {
c = c || function(v, V) {
return q.sap.equal(v, V);
}
;
var O = [];
var N = [];
var m = [];
for (var i = 0; i < n.length; i++) {
var a = n[i];
var f = 0;
var t;
if (u && c(o[i], a)) {
f = 1;
t = i;
} else {
for (var j = 0; j < o.length; j++) {
if (c(o[j], a)) {
f++;
t = j;
if (u || f > 1) {
break;
}
}
}
}
if (f == 1) {
var M = {
oldIndex: t,
newIndex: i
};
if (m[t]) {
delete O[t];
delete N[m[t].newIndex];
} else {
N[i] = {
data: n[i],
row: t
};
O[t] = {
data: o[t],
row: i
};
m[t] = M;
}
}
}
for (var i = 0; i < n.length - 1; i++) {
if (N[i] && !N[i + 1] && N[i].row + 1 < o.length && !O[N[i].row + 1] &&
c(o[N[i].row + 1], n[i + 1])) {
N[i + 1] = {
data: n[i + 1],
row: N[i].row + 1
};
O[N[i].row + 1] = {
data: O[N[i].row + 1],
row: i + 1
};
}
}
for (var i = n.length - 1; i > 0; i--) {
if (N[i] && !N[i - 1] && N[i].row > 0 && !O[N[i].row - 1] &&
c(o[N[i].row - 1], n[i - 1])) {
N[i - 1] = {
data: n[i - 1],
row: N[i].row - 1
};
O[N[i].row - 1] = {
data: O[N[i].row - 1],
row: i - 1
};
}
}
var d = [];
if (n.length == 0) {
for (var i = 0; i < o.length; i++) {
d.push({
index: 0,
type: 'delete'
});
}
} else {
var b = 0;
if (!O[0]) {
for (var i = 0; i < o.length && !O[i]; i++) {
d.push({
index: 0,
type: 'delete'
});
b = i + 1;
}
}
for (var i = 0; i < n.length; i++) {
if (!N[i] || N[i].row > b) {
d.push({
index: i,
type: 'insert'
});
} else {
b = N[i].row + 1;
for (var j = N[i].row + 1; j < o.length && (!O[j] || O[j].row <
i); j++) {
d.push({
index: i + 1,
type: 'delete'
});
b = j + 1;
}
}
}
}
return d;
}
;
q.sap._createJSTokenizer = function() {
var a, b, e = {
'"': '"',
'\'': '\'',
'\\': '\\',
'/': '/',
b: '\b',
f: '\f',
n: '\n',
r: '\r',
t: '\t'
}, t, d = function(m) {
throw {
name: 'SyntaxError',
message: m,
at: a,
text: t
};
}, n = function(c) {
if (c && c !== b) {
d("Expected '" + c + "' instead of '" + b + "'");
}
b = t.charAt(a);
a += 1;
return b;
}, f = function() {
var f, s = '';
if (b === '-') {
s = '-';
n('-');
}
while (b >= '0' && b <= '9') {
s += b;
n();
}
if (b === '.') {
s += '.';
while (n() && b >= '0' && b <= '9') {
s += b;
}
}
if (b === 'e' || b === 'E') {
s += b;
n();
if (b === '-' || b === '+') {
s += b;
n();
}
while (b >= '0' && b <= '9') {
s += b;
n();
}
}
f = +s;
if (!isFinite(f)) {
d("Bad number");
} else {
return f;
}
}, s = function() {
var c, i, s = '', k, u;
if (b === '"' || b === '\'') {
k = b;
while (n()) {
if (b === k) {
n();
return s;
}
if (b === '\\') {
n();
if (b === 'u') {
u = 0;
for (i = 0; i < 4; i += 1) {
c = parseInt(n(), 16);
if (!isFinite(c)) {
break;
}
u = u * 16 + c;
}
s += String.fromCharCode(u);
} else if (typeof e[b] === 'string') {
s += e[b];
} else {
break;
}
} else {
s += b;
}
}
}
d("Bad string");
}, g = function() {
var g = ''
, c = function(b) {
return b === "_" || b === "$" || (b >= "0" && b <= "9") || (b >=
"a" && b <= "z") || (b >= "A" && b <= "Z");
};
if (c(b)) {
g += b;
} else {
d("Bad name");
}
while (n()) {
if (b === ' ') {
n();
return g;
}
if (b === ':') {
return g;
}
if (c(b)) {
g += b;
} else {
d("Bad name");
}
}
d("Bad name");
}, w = function() {
while (b && b <= ' ') {
n();
}
}, h = function() {
switch (b) {
case 't':
n('t');
n('r');
n('u');
n('e');
return true;
case 'f':
n('f');
n('a');
n('l');
n('s');
n('e');
return false;
case 'n':
n('n');
n('u');
n('l');
n('l');
return null;
}
d("Unexpected '" + b + "'");
}, v, j = function() {
var j = [];
if (b === '[') {
n('[');
w();
if (b === ']') {
n(']');
return j;
}
while (b) {
j.push(v());
w();
if (b === ']') {
n(']');
return j;
}
n(',');
w();
}
}
d("Bad array");
}, o = function() {
var k, o = {};
if (b === '{') {
n('{');
w();
if (b === '}') {
n('}');
return o;
}
while (b) {
if (b >= "0" && b <= "9") {
k = f();
} else if (b === '"' || b === '\'') {
k = s();
} else {
k = g();
}
w();
n(':');
if (Object.hasOwnProperty.call(o, k)) {
d('Duplicate key "' + k + '"');
}
o[k] = v();
w();
if (b === '}') {
n('}');
return o;
}
n(',');
w();
}
}
d("Bad object");
};
v = function() {
w();
switch (b) {
case '{':
return o();
case '[':
return j();
case '"':
case '\'':
return s();
case '-':
return f();
default:
return b >= '0' && b <= '9' ? f() : h();
}
}
;
function p(c, i) {
var r;
t = c;
a = i || 0;
b = ' ';
r = v();
if (isNaN(i)) {
w();
if (b) {
d("Syntax error");
}
return r;
} else {
return {
result: r,
at: a - 1
};
}
}
return {
array: j,
error: d,
getIndex: function() {
return a - 1;
},
getCh: function() {
return b;
},
init: function(c, i) {
t = c;
a = i || 0;
b = ' ';
},
name: g,
next: n,
number: f,
parseJS: p,
setIndex: function(i) {
if (i < a - 1) {
throw new Error("Must not set index " + i + " before previous
index " + (a - 1));
}
a = i;
n();
},
string: s,
value: v,
white: w,
word: h
};
}
;
q.sap.parseJS = q.sap._createJSTokenizer().parseJS;
q.sap.extend = function() {
var s, c, a, n, o, b, t = arguments[0] || {}, i = 1, l = arguments.length,
d = false;
if (typeof t === "boolean") {
d = t;
t = arguments[i] || {};
i++;
}
if (typeof t !== "object" && !q.isFunction(t)) {
t = {};
}
for (; i < l; i++) {
o = arguments[i];
for (n in o) {
s = t[n];
a = o[n];
if (t === a) {
continue;
}
if (d && a && (q.isPlainObject(a) || (c = q.isArray(a)))) {
if (c) {
c = false;
b = s && q.isArray(s) ? s : [];
} else {
b = s && q.isPlainObject(s) ? s : {};
}
t[n] = q.sap.extend(d, b, a);
} else {
t[n] = a;
}
}
}
return t;
}
;
return q;
});
sap.ui.predefine('jquery.sap.sjax', ['jquery.sap.global'], function(q) {
"use strict";
q.sap.sjaxSettings = {
complexResult: true,
fallback: undefined
};
q.sap.sjax = function sjax(o) {
var s = q.extend(true, {}, q.sap.sjaxSettings, o, {
async: false,
success: function(d, t, x) {
r = {
success: true,
data: d,
status: t,
statusCode: x && x.status
};
},
error: function(x, t, e) {
r = {
success: false,
data: undefined,
status: t,
error: e,
statusCode: x.status,
errorResponse: x.responseText
};
}
});
var r;
q.ajax(s);
if (!s.complexResult) {
return r.success ? r.data : s.fallback;
}
return r;
}
;
q.sap.syncHead = function(u) {
return q.sap.sjax({
type: 'HEAD',
url: u
}).success;
}
;
q.sap.syncGet = function syncGet(u, d, D) {
return q.sap.sjax({
url: u,
data: d,
type: 'GET',
dataType: D || 'text'
});
}
;
q.sap.syncPost = function syncPost(u, d, D) {
return q.sap.sjax({
url: u,
data: d,
type: 'POST',
dataType: D || 'text'
});
}
;
q.sap.syncGetText = function syncGetText(u, d, f) {
return q.sap.sjax({
url: u,
data: d,
type: 'GET',
dataType: 'text',
fallback: f,
complexResult: (arguments.length < 3)
});
}
;
q.sap.syncGetJSON = function syncGetJSON(u, d, f) {
return q.sap.sjax({
url: u,
data: d || null,
type: 'GET',
dataType: 'json',
fallback: f,
complexResult: (arguments.length < 3)
});
}
;
return q;
});
sap.ui.predefine('jquery.sap.storage', ['jquery.sap.global'], function(q) {
"use strict";
var s = !!(window.JSON && JSON.parse && JSON.stringify);
var S = "state.key_";
var f = function(a, b) {
var t = "unknown"
, P = b || S;
P += "-";
var T = P + "___sapui5TEST___", o;
if (!a || typeof (a) === "string") {
t = a || "session";
try {
o = window[t + "Storage"];
} catch (e) {
o = null;
}
try {
if (o) {
o.setItem(T, "1");
o.removeItem(T);
}
} catch (e) {
o = null;
}
} else if (typeof (a) === "object") {
t = a.getType ? a.getType() : "unknown";
o = a;
}
var c = !!o;
this.isSupported = function() {
if (!c) {
return false;
}
if (typeof (o.isSupported) == "function") {
return o.isSupported();
}
return true;
}
;
this.put = function(i, d) {
if (this.isSupported() && i) {
try {
o.setItem(P + i, s ? JSON.stringify(d) : d);
return true;
} catch (e) {
return false;
}
} else {
return false;
}
}
;
this.get = function(i) {
if (this.isSupported() && i) {
try {
var I = o.getItem(P + i);
return s ? JSON.parse(I) : I;
} catch (e) {
return null;
}
} else {
return null;
}
}
;
this.remove = function(i) {
if (this.isSupported() && i) {
try {
o.removeItem(P + i);
return true;
} catch (e) {
return false;
}
} else {
return false;
}
}
;
this.removeAll = function(I) {
if (this.isSupported() && o.length && (document.addEventListener ?
/function/ : /function|object/).test(typeof (o.key))) {
try {
var l = o.length;
var k = [];
var d, i;
var p = P + (I || "");
for (i = 0; i < l; i++) {
d = o.key(i);
if (d && d.indexOf(p) == 0) {
k.push(d);
}
}
for (i = 0; i < k.length; i++) {
o.removeItem(k[i]);
}
return true;
} catch (e) {
return false;
}
} else {
return false;
}
}
;
this.clear = function() {
if (this.isSupported()) {
try {
o.clear();
return true;
} catch (e) {
return false;
}
} else {
return false;
}
}
;
this.getType = function() {
return t;
}
;
};
var m = {};
q.sap.storage = function(o, i) {
if (!o) {
o = q.sap.storage.Type.session;
}
if (typeof (o) === "string" && q.sap.storage.Type[o]) {
var k = o;
if (i && i != S) {
k = o + "_" + i;
}
return m[k] || (m[k] = new f(o,i));
}
return new f(o,i);
}
;
q.sap.storage.Type = {
local: "local",
session: "session",
global: "global"
};
f.apply(q.sap.storage);
m[q.sap.storage.Type.session] = q.sap.storage;
return q;
});
sap.ui.predefine('jquery.sap.strings', ['jquery.sap.global'], function(q) {
"use strict";
q.sap.endsWith = function endsWith(s, e) {
if (typeof (e) != "string" || e == "") {
return false;
}
var p = s.lastIndexOf(e);
return p >= 0 && p == s.length - e.length;
}
;
q.sap.endsWithIgnoreCase = function endsWithIgnoreCase(s, e) {
if (typeof (e) != "string" || e == "") {
return false;
}
s = s.toUpperCase();
e = e.toUpperCase();
return q.sap.endsWith(s, e);
}
;
q.sap.startsWith = function startsWith(s, S) {
if (typeof (S) != "string" || S == "") {
return false;
}
if (s == S) {
return true;
}
return s.indexOf(S) == 0;
}
;
q.sap.startsWithIgnoreCase = function startsWithIgnoreCase(s, S) {
if (typeof (S) != "string" || S == "") {
return false;
}
s = s.toUpperCase();
S = S.toUpperCase();
return q.sap.startsWith(s, S);
}
;
q.sap.charToUpperCase = function charToUpperCase(s, p) {
if (!s) {
return s;
}
if (!p || isNaN(p) || p <= 0 || p >= s.length) {
p = 0;
}
var C = s.charAt(p).toUpperCase();
if (p > 0) {
return s.substring(0, p) + C + s.substring(p + 1);
}
return C + s.substring(p + 1);
}
;
q.sap.padLeft = function padLeft(s, p, l) {
if (!s) {
s = "";
}
while (s.length < l) {
s = p + s;
}
return s;
}
;
q.sap.padRight = function padRight(s, p, l) {
if (!s) {
s = "";
}
while (s.length < l) {
s = s + p;
}
return s;
}
;
var r = /-(.)/ig;
q.sap.camelCase = function camelCase(s) {
return s.replace(r, function(m, C) {
return C.toUpperCase();
});
}
;
var a = /([A-Z])/g;
q.sap.hyphen = function hyphen(s) {
return s.replace(a, function(m, C) {
return "-" + C.toLowerCase();
});
}
;
var b = /[[\]{}()*+?.\\^$|]/g;
q.sap.escapeRegExp = function escapeRegExp(s) {
return s.replace(b, "\\$&");
}
;
q.sap.formatMessage = function formatMessage(p, v) {
if (arguments.length > 2 || (v != null && !q.isArray(v))) {
v = Array.prototype.slice.call(arguments, 1);
}
v = v || [];
return p.replace(c, function($, d, e, f, o) {
if (d) {
return "'";
} else if (e) {
return e.replace(/''/g, "'");
} else if (f) {
return String(v[parseInt(f, 10)]);
}
throw new Error("formatMessage: pattern syntax error at pos. " + o);
});
}
;
var c = /('')|'([^']+(?:''[^']*)*)(?:'|$)|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g;
return q;
});
sap.ui.predefine('jquery.sap.trace', ['jquery.sap.global', 'sap/ui/thirdparty/URI',
'sap/ui/Global'], function(q, U) {
"use strict";
(function() {
var f = k(), t, I, m, R = D(), C = D().substr(-8, 8) + R, H =
window.location.host, a = sap.ui.Device.os.name + "_" + sap.ui.Device.os.version, b
= sap.ui.Device.browser.name + "_" + sap.ui.Device.browser.version, A = "", c = "",
e, T, F, p = {}, S = 0, d, o, g, h, j = 0;
function k() {
var i = !!document.querySelector("meta[name=sap-ui-fesr]
[content=true]")
, P = window.location.search.match(/[\?|&]sap-ui-(?:xx-)?fesr=(true|
x|X|false)&?/);
if (P) {
i = P[1] && P[1] != "false";
}
return i;
}
function l() {
if (!(window.performance && window.performance.getEntries)) {
q.sap.log.warning("Interaction tracking is not supported on
browsers with insufficient performance API");
}
if (!m) {
m = true;
var X = window.XMLHttpRequest.prototype.open
, i = window.XMLHttpRequest.prototype.send
, s = window.XMLHttpRequest.prototype.setRequestHeader;
window.XMLHttpRequest.prototype.open = function() {
X.apply(this, arguments);
if (I || f || t) {
var E = new U(arguments[1]).host();
if (!E || E === H) {
T = D();
if (I || f) {
this.addEventListener("readystatechange", n);
this.pendingInteraction = p;
if (f) {
if (g) {
this.setRequestHeader("SAP-Perf-FESRec",
g);
this.setRequestHeader("SAP-Perf-FESRec-
opt", h);
g = null;
h = null;
F = T;
S++;
} else if (!F) {
F = T;
}
if (c != p.appVersion) {
c = p.appVersion;
A = c ? w(c) : "";
}
this.setRequestHeader("SAP-PASSPORT", B(e, R,
T, p.component + A, p.trigger + "_" + p.event + "_" + S));
}
}
if (!f && t) {
this.setRequestHeader("SAP-PASSPORT", B(e, R, T));
}
}
}
}
;
window.XMLHttpRequest.prototype.send = function() {
i.apply(this, arguments);
if ((I || f) && this.pendingInteraction) {
this.pendingInteraction.bytesSent += arguments[0] ?
arguments[0].length * 2 : 0;
}
}
;
window.XMLHttpRequest.prototype.setRequestHeader = function(E, V) {
s.apply(this, arguments);
if (I || f) {
if (!this.requestHeaderLength) {
this.requestHeaderLength = 0;
}
this.requestHeaderLength += (E.length + V.length + 3) * 2;
}
}
;
window.addEventListener("scroll",
q.sap.interaction.notifyScrollEvent);
window.addEventListener("mousewheel",
q.sap.interaction.notifyScrollEvent);
}
}
function n() {
if (this.readyState === 4 && this.pendingInteraction && !
this.pendingInteraction.completed) {
var s = this.getResponseHeader("content-length")
, i = this.getResponseHeader("content-encoding") === "gzip"
, E = this.getResponseHeader("sap-perf-fesrec");
this.pendingInteraction.bytesReceived += s ? parseInt(s, 10) : 0;
this.pendingInteraction.bytesReceived +=
this.getAllResponseHeaders().length * 2;
this.pendingInteraction.bytesSent += this.requestHeaderLength || 0;
this.pendingInteraction.requestCompression = i &&
(this.pendingInteraction.requestCompression !== false);
this.pendingInteraction.networkTime += E ? Math.round(parseFloat(E,
10) / 1000) : 0;
var G = this.getResponseHeader("sap-statistics");
if (G) {
var J = q.sap.measure.getRequestTimings();
this.pendingInteraction.sapStatistics.push({
url: this.responseURL,
statistics: G,
timing: J ? J[J.length - 1] : undefined
});
}
delete this.requestHeaderLength;
delete this.pendingInteraction;
}
}
function r(i) {
return [v(R, 32), v(F, 32), v(i.navigation, 16), v(i.roundtrip, 16),
v(i.duration, 16), v(i.requests.length - i.incompleteRequests, 8), v(C, 40),
v(i.networkTime, 16), v(i.requestTime, 16), v(a, 20), "SAP_UI5"].join(",");
}
function u(i) {
return [v(i.component, 20, true), v(i.trigger + "_" + p.event, 20,
true), "", v(b, 20), v(i.bytesSent, 16), v(i.bytesReceived, 16), "", "",
v(i.processing, 16), i.requestCompression ? "X" : "", "", "", "", "",
v(i.busyDuration, 16), "", "", "", ""].join(",");
}
function v(i, L, s) {
if (!i) {
i = i === 0 ? "0" : "";
} else if (typeof i === "number") {
var E = i;
i = Math.round(i).toString();
if (i.length > L || E < 0) {
i = "-1";
}
} else {
i = s ? i.substr(-L, L) : i.substr(0, L);
}
return i;
}
function w(V) {
var i = new q.sap.Version(V);
return "@" + i.getMajor() + "." + i.getMinor() + "." + i.getPatch();
}
q.sap.interaction = {};
q.sap.interaction.setActive = function(i) {
if (i && !I) {
l();
}
I = i;
}
;
q.sap.interaction.getActive = function() {
return I || f;
}
;
q.sap.interaction.notifyStepStart = function(E, i) {
if (I || f) {
if (o || i) {
var s;
if (i) {
s = "startup";
} else if (o.originalEvent) {
s = o.originalEvent.type;
} else {
s = o.type;
}
q.sap.measure.startInteraction(s, E);
var G = q.sap.measure.getAllInteractionMeasurements();
var J = G[G.length - 1];
var P = q.sap.measure.getPendingInteractionMeasurement();
p = P ? P : p;
if (f && J && J.requests.length > 0) {
g = r(J);
h = u(J);
}
o = null;
}
}
}
;
q.sap.interaction.notifyStepEnd = function() {
if (I || f) {
if (d) {
q.sap.clearDelayedCall(d);
}
d = q.sap.delayedCall(1, q.sap.measure, "endInteraction");
}
}
;
q.sap.interaction.notifyEventStart = function(E) {
o = (I || f) ? E : null;
}
;
function x() {
q.sap.interaction.notifyStepStart();
j = 0;
}
q.sap.interaction.notifyScrollEvent = function(E) {
if (I || f) {
if (!j) {
q.sap.interaction.notifyEventStart(E);
} else {
q.sap.clearDelayedCall(j);
}
j = q.sap.delayedCall(250, undefined, x);
}
}
;
q.sap.interaction.notifyEventEnd = function() {
if (o) {
if (o.type.match(/^(mousedown|touchstart|keydown)$/)) {
q.sap.measure.endInteraction(true);
}
}
}
;
q.sap.interaction.setStepComponent = function(s) {
if ((I || f) && s) {
p.component = s;
}
}
;
q.sap.fesr = {};
q.sap.fesr.setActive = function(i) {
if (i && !f) {
f = true;
if (!I) {
l();
}
} else if (!i) {
f = false;
}
}
;
q.sap.fesr.getActive = function() {
return f;
}
;
q.sap.fesr.getCurrentTransactionId = function() {
return T;
}
;
q.sap.fesr.getRootId = function() {
return R;
}
;
q.sap.fesr.addBusyDuration = function(i) {
if (!p.busyDuration) {
p.busyDuration = 0;
}
p.busyDuration += i;
}
;
q.sap.passport = {};
q.sap.passport.setActive = function(i) {
if (i && !t) {
t = true;
l();
} else if (!i) {
t = false;
}
}
;
function y(s) {
var E = [];
for (var i = 0; i < s.length; ++i) {
E.push(s.charCodeAt(i));
}
return E;
}
function z(s) {
var E = "";
for (var i = 0; i < s.length; i++) {
var G = s[i].toString(16);
G = Array(2 - G.length + 1).join("0") + G;
E += G;
}
return E;
}
function B(i, s, E, G, J) {
var K = [0x2A, 0x54, 0x48, 0x2A, 0x03, 0x00, 0xE6, 0x00, 0x00, 0x53,
0x41, 0x50, 0x5F, 0x45, 0x32, 0x45, 0x5F, 0x54, 0x41, 0x5F, 0x50, 0x6C, 0x75, 0x67,
0x49, 0x6E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x00, 0x00, 0x53, 0x41, 0x50, 0x5F, 0x45, 0x32, 0x45, 0x5F, 0x54,
0x41, 0x5F, 0x55, 0x73, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x41, 0x50, 0x5F, 0x45,
0x32, 0x45, 0x5F, 0x54, 0x41, 0x5F, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x05, 0x53, 0x41, 0x50, 0x5F, 0x45,
0x32, 0x45, 0x5F, 0x54, 0x41, 0x5F, 0x50, 0x6C, 0x75, 0x67, 0x49, 0x6E, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x34,
0x36, 0x33, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x31, 0x31, 0x45, 0x45,
0x30, 0x41, 0x35, 0x44, 0x32, 0x35, 0x30, 0x39, 0x39, 0x39, 0x43, 0x33, 0x39, 0x32,
0x42, 0x36, 0x38, 0x20, 0x20, 0x20, 0x00, 0x07, 0x46, 0x35, 0x00, 0x00, 0x00, 0x31,
0x1E, 0xE0, 0xA5, 0xD2, 0x4E, 0xDB, 0xB2, 0xE4, 0x4B, 0x68, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xE2, 0x2A, 0x54, 0x48, 0x2A];
var L = [372, 32];
var M = [149, 32];
var N = [9, 32];
var P = [117, 32];
var O = [75, 40];
var Q = [7, 2];
var V = y("SAP_E2E_TA_UI5LIB");
V = V.concat(y(new Array(32 + 1 - V.length).join(' ')));
if (G) {
G = y(G.substr(-32, 32));
G = G.concat(y(new Array(32 + 1 - G.length).join(' ')));
K.splice.apply(K, N.concat(G));
K.splice.apply(K, P.concat(G));
} else {
K.splice.apply(K, N.concat(V));
K.splice.apply(K, P.concat(V));
}
K.splice.apply(K, M.concat(y(E)));
K.splice.apply(K, Q.concat(i));
if (J) {
J = y(J.substr(-40, 40));
J = J.concat(y(new Array(40 + 1 - J.length).join(' ')));
K.splice.apply(K, O.concat(J));
}
var W = z(K).toUpperCase();
return W.substring(0, L[0]).concat(s) + W.substring(L[0] + L[1]);
}
q.sap.passport.traceFlags = function(i) {
switch (i) {
case 'low':
e = [0x00, 0x00];
break;
case 'medium':
e = [0x89, 0x0A];
break;
case 'high':
e = [0x9F, 0x0D];
break;
default:
e = [];
e.push((parseInt(i, 16) & 0xFF00) / 256);
e.push((parseInt(i, 16) & 0xFF));
}
return e;
}
;
function D() {
var i = function() {
var J = Math.floor(Math.random() * 0x10000);
return (new Array(4 + 1 - J.toString(16).length)).join('0') +
J.toString(16);
};
var s = function() {
var J = (Math.floor(Math.random() * 0x10000) & 0x0fff) + 0x4000;
return (new Array(4 + 1 - J.toString(16).length)).join('0') +
J.toString(16);
};
var E = function() {
var J = (Math.floor(Math.random() * 0x10000) & 0x3fff) + 0x8000;
return (new Array(4 + 1 - J.toString(16).length)).join('0') +
J.toString(16);
};
var G = (i() + i() + i() + s() + E() + i() + i() + i());
return G.toUpperCase();
}
e = q.sap.passport.traceFlags();
q.sap.interaction.notifyStepStart(null, true);
if (f) {
l();
}
if (/sap-ui-xx-e2e-trace=(true|x|X)/.test(location.search)) {
q.sap.require("sap.ui.core.support.trace.E2eTraceLib");
}
}());
return q;
});
sap.ui.predefine('jquery.sap.ui', ['jquery.sap.global', 'sap/ui/Global'],
function(q) {
"use strict";
function u(i) {
return sap.ui.getCore().getUIArea(this.id) != null;
}
function f(i, o) {
return sap.ui.getCore().getUIArea(this.id);
}
function a(c, i) {
return c.getUIArea().getInterface();
}
q.fn.root = function(r) {
if (r) {
sap.ui.getCore().setRoot(this.get(0), r);
return this;
}
var c = this.control();
if (c.length > 0) {
return q.map(c, a);
}
var U = this.uiarea();
if (U.length > 0) {
return U;
}
this.each(function(i) {
sap.ui.getCore().createUIArea(this);
});
return this;
}
;
q.fn.uiarea = function(i) {
var U = this.slice("[id]").filter(u).map(f).get();
return typeof (i) === "number" ? U[i] : U;
}
;
function b() {
if (!this || !this.nodeType || this.nodeType === 9) {
return null;
}
try {
var i = q(this).closest("[data-sap-ui]").attr("id");
return i ? sap.ui.getCore().byId(i) : null;
} catch (e) {
return null;
}
}
q.fn.control = function(i) {
var c = this.map(b);
if (i === undefined || isNaN(i)) {
return c.get();
} else {
return c.get(i);
}
}
;
q.fn.sapui = function(c, i, C) {
return this.each(function() {
var o = null;
if (this) {
if (c.indexOf(".") == -1) {
c = "sap.ui.commons." + c;
}
var d = q.sap.getObject(c);
if (d) {
if (typeof C == 'object' && typeof C.press == 'function') {
C.press = q.proxy(C.press, this);
}
o = new (d)(i,C);
o.placeAt(this);
}
}
});
}
;
return q;
});
sap.ui.predefine('jquery.sap.xml', ['jquery.sap.global', 'sap/ui/Device'],
function(q, D) {
"use strict";
q.sap.parseXML = function parseXML(x) {
var X;
if (window.DOMParser) {
var p = new DOMParser();
try {
X = p.parseFromString(x, "text/xml");
} catch (e) {
var P = q.sap.getParseError(X);
X = {};
P.reason = e.message;
X.parseError = P;
return X;
}
} else {
X = new ActiveXObject("Microsoft.XMLDOM");
X.async = false;
X.loadXML(x);
}
var P = q.sap.getParseError(X);
if (P) {
if (!X.parseError) {
X.parseError = P;
}
}
return X;
}
;
q.sap.serializeXML = function serializeXML(x) {
var X = "";
if (window.ActiveXObject) {
X = x.xml;
if (X) {
return X;
}
}
if (window.XMLSerializer) {
var s = new XMLSerializer();
X = s.serializeToString(x);
}
return X;
}
;
q.sap.isEqualNode = function(n, N) {
if (n === N) {
return true;
}
if (!n || !N) {
return false;
}
if (n.isEqualNode) {
return n.isEqualNode(N);
}
if (n.nodeType != N.nodeType) {
return false;
}
if (n.nodeValue != N.nodeValue) {
return false;
}
if (n.baseName != N.baseName) {
return false;
}
if (n.nodeName != N.nodeName) {
return false;
}
if (n.nameSpaceURI != N.nameSpaceURI) {
return false;
}
if (n.prefix != N.prefix) {
return false;
}
if (n.nodeType != 1) {
return true;
}
if (n.attributes.length != N.attributes.length) {
return false;
}
for (var i = 0; i < n.attributes.length; i++) {
if (!q.sap.isEqualNode(n.attributes[i], N.attributes[i])) {
return false;
}
}
if (n.childNodes.length != N.childNodes.length) {
return false;
}
for (var i = 0; i < n.childNodes.length; i++) {
if (!q.sap.isEqualNode(n.childNodes[i], N.childNodes[i])) {
return false;
}
}
return true;
}
;
q.sap.getParseError = function getParseError(d) {
var p = {
errorCode: -1,
url: "",
reason: "unknown error",
srcText: "",
line: -1,
linepos: -1,
filepos: -1
};
if (!!D.browser.internet_explorer && d && d.parseError &&
d.parseError.errorCode != 0) {
return d.parseError;
}
if ((!!D.browser.firefox || !!D.browser.edge) && d && d.documentElement &&
d.documentElement.tagName == "parsererror") {
var e = d.documentElement.firstChild.nodeValue
, r = /XML Parsing Error: (.*)\nLocation: (.*)\nLine Number (\d+),
Column (\d+):(.*)/;
if (r.test(e)) {
p.reason = RegExp.$1;
p.url = RegExp.$2;
p.line = parseInt(RegExp.$3, 10);
p.linepos = parseInt(RegExp.$4, 10);
p.srcText = RegExp.$5;
}
return p;
}
if (!!D.browser.webkit && d && d.documentElement &&
d.documentElement.tagName == "html" && d.getElementsByTagName("parsererror").length
> 0) {
var e = q.sap.serializeXML(d)
, r = /error on line (\d+) at column (\d+): ([^<]*)/;
if (r.test(e)) {
p.reason = RegExp.$3;
p.url = "";
p.line = parseInt(RegExp.$1, 10);
p.linepos = parseInt(RegExp.$2, 10);
p.srcText = "";
}
return p;
}
if (!d || !d.documentElement) {
return p;
}
return {
errorCode: 0
};
}
;
return q;
});
sap.ui.predefine('sap/m/ActionSheet', ['jquery.sap.global', './Dialog',
'./Popover', './library', 'sap/ui/core/Control',
'sap/ui/core/delegate/ItemNavigation', 'sap/ui/core/InvisibleText'], function(q, D,
P, l, C, I, a) {
"use strict";
var A = C.extend("sap.m.ActionSheet", {
metadata: {
library: "sap.m",
properties: {
placement: {
type: "sap.m.PlacementType",
group: "Appearance",
defaultValue: sap.m.PlacementType.Bottom
},
showCancelButton: {
type: "boolean",
group: "Appearance",
defaultValue: true
},
cancelButtonText: {
type: "string",
group: "Appearance",
defaultValue: null
},
title: {
type: "string",
group: "Appearance",
defaultValue: null
}
},
aggregations: {
buttons: {
type: "sap.m.Button",
multiple: true,
singularName: "button"
},
_cancelButton: {
type: "sap.m.Button",
multiple: false,
visibility: "hidden"
},
_invisibleAriaTexts: {
type: "sap.ui.core.InvisibleText",
multiple: true,
visibility: "hidden"
}
},
events: {
cancelButtonTap: {
deprecated: true
},
beforeOpen: {},
afterOpen: {},
beforeClose: {
origin: {
type: "sap.m.Button"
}
},
afterClose: {
origin: {
type: "sap.m.Button"
}
},
cancelButtonPress: {}
}
}
});
A.prototype.init = function() {
this._fnOrientationChange = this._orientationChange.bind(this);
}
;
A.prototype.exit = function() {
sap.ui.Device.resize.detachHandler(this._fnOrientationChange);
if (this._parent) {
this._parent.destroy();
this._parent = null;
}
if (this._oCancelButton) {
this._oCancelButton.destroy();
this._oCancelButton = null;
}
this._clearItemNavigation();
}
;
A.prototype._clearItemNavigation = function() {
if (this._oItemNavigation) {
this.removeDelegate(this._oItemNavigation);
this._oItemNavigation.destroy();
delete this._oItemNavigation;
}
}
;
A.prototype._setItemNavigation = function() {
var b = this._getAllButtons()
, d = []
, o = this.getDomRef();
if (o) {
this._oItemNavigation.setRootDomRef(o);
for (var i = 0; i < b.length; i++) {
if (b[i].getEnabled() && b[i].getVisible()) {
d.push(b[i].getFocusDomRef());
}
}
if (this._oCancelButton) {
d.push(this._oCancelButton.getFocusDomRef());
}
this._oItemNavigation.setItemDomRefs(d);
this._oItemNavigation.setSelectedIndex(0);
this._oItemNavigation.setPageSize(5);
}
}
;
A.prototype.onBeforeRendering = function() {
this._clearItemNavigation();
}
;
A.prototype.onAfterRendering = function() {
this._oItemNavigation = new I();
this._oItemNavigation.setCycling(false);
this.addDelegate(this._oItemNavigation);
this._setItemNavigation();
}
;
A.prototype.sapfocusleave = function() {
this.close();
}
;
A.prototype.openBy = function(c) {
var t = this;
if (!this._parent) {
var o = this.getParent();
if (o) {
this.setParent(null);
}
if (!sap.ui.Device.system.phone) {
this._parent = new P({
placement: this.getPlacement(),
showHeader: false,
content: [this],
beforeOpen: function() {
t.fireBeforeOpen();
},
afterOpen: function() {
t.focus();
t.fireAfterOpen();
},
beforeClose: function() {
t.fireBeforeClose();
},
afterClose: function() {
if (t.getShowCancelButton()) {
t.fireCancelButtonTap();
t.fireCancelButtonPress();
}
t.fireAfterClose();
}
}).addStyleClass("sapMActionSheetPopover");
if (sap.ui.Device.browser.internet_explorer) {
this._parent._fnAdjustPositionAndArrow = q.proxy(function() {
P.prototype._adjustPositionAndArrow.apply(this);
var $ = this.$()
, f = $.children(".sapMPopoverCont")
[0].getBoundingClientRect().width;
q.each($.find(".sapMActionSheet > .sapMBtn"), function(i,
b) {
var d = q(b), B;
d.css("width", "");
B = b.getBoundingClientRect().width;
if (B <= f) {
d.css("width", "100%");
}
});
}, this._parent);
}
} else {
this._parent = new D({
title: this.getTitle(),
type: sap.m.DialogType.Standard,
content: [this],
beforeOpen: function() {
t.fireBeforeOpen();
},
afterOpen: function() {
t.focus();
t.fireAfterOpen();
},
beforeClose: function(e) {
t.fireBeforeClose({
origin: e.getParameter("origin")
});
},
afterClose: function(e) {
t.fireAfterClose({
origin: e.getParameter("origin")
});
sap.ui.Device.resize.detachHandler(t._fnOrientationChange);
}
}).addStyleClass("sapMActionSheetDialog");
if (this.getTitle()) {
this._parent.addStyleClass("sapMActionSheetDialogWithTitle");
}
if (!sap.ui.Device.system.phone) {
this._parent.setBeginButton(this._getCancelButton());
}
if (sap.ui.Device.system.phone) {
this._parent.oPopup.setModal(true);
this._parent._setDimensions = function() {
sap.m.Dialog.prototype._setDimensions.apply(this);
this.$("cont").css("max-height", "");
}
;
this._parent._adjustScrollingPane = function() {
var h = this.$().height();
this.$("cont").css("max-height", h);
if (this._oScroller) {
this._oScroller.refresh();
}
}
;
}
}
if (o) {
o.addDependent(this._parent);
}
}
if (!sap.ui.Device.system.phone) {
this._parent.openBy(c);
} else {
this._parent.open();
sap.ui.Device.resize.attachHandler(this._fnOrientationChange);
}
}
;
A.prototype.close = function(c) {
if (this._parent) {
this._parent.close();
}
}
;
A.prototype.isOpen = function(c) {
return !!this._parent && this._parent.isOpen();
}
;
A.prototype._createCancelButton = function() {
if (!this._oCancelButton) {
var c = (this.getCancelButtonText()) ? this.getCancelButtonText() :
sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("ACTIONSHEET_CANCELBUTTO
N_TEXT")
, t = this;
this._oCancelButton = new sap.m.Button(this.getId() + '-cancelBtn',{
text: c,
type: sap.m.ButtonType.Reject,
press: function() {
if (sap.ui.Device.system.phone && t._parent) {
t._parent._oCloseTrigger = this;
}
t.close();
t.fireCancelButtonTap();
t.fireCancelButtonPress();
}
}).addStyleClass("sapMActionSheetButton sapMActionSheetCancelButton
sapMBtnTransparent sapMBtnInverted");
if (sap.ui.Device.system.phone) {
this.setAggregation("_cancelButton", this._oCancelButton, true);
}
}
return this;
}
;
A.prototype._getCancelButton = function() {
if (sap.ui.Device.system.phone && this.getShowCancelButton()) {
this._createCancelButton();
return this._oCancelButton;
}
return null;
}
;
A.prototype.setCancelButtonText = function(t) {
this.setProperty("cancelButtonText", t, true);
if (this._oCancelButton) {
this._oCancelButton.setText(t);
}
return this;
}
;
A.prototype._preProcessActionButton = function(b) {
var t = b.getType();
if (t !== sap.m.ButtonType.Accept && t !== sap.m.ButtonType.Reject) {
b.setType(sap.m.ButtonType.Transparent);
}
b.addStyleClass("sapMBtnInverted");
this._parent && this._parent.invalidate();
return this;
}
;
A.prototype.setShowCancelButton = function(v) {
if (this._parent) {
if (sap.ui.Device.system.phone) {
this.setProperty("showCancelButton", v, false);
}
} else {
this.setProperty("showCancelButton", v, true);
}
return this;
}
;
A.prototype.setTitle = function(t) {
this.setProperty("title", t, true);
if (this._parent && sap.ui.Device.system.phone) {
this._parent.setTitle(t);
this._parent.toggleStyleClass("sapMDialog-NoHeader", !t);
}
if (this._parent) {
if (t) {
this._parent.addStyleClass("sapMActionSheetDialogWithTitle");
} else {
this._parent.removeStyleClass("sapMActionSheetDialogWithTitle");
}
}
return this;
}
;
A.prototype.setPlacement = function(p) {
this.setProperty("placement", p, true);
if (!sap.ui.Device.system.phone) {
if (this._parent) {
this._parent.setPlacement(p);
}
}
return this;
}
;
A.prototype._buttonSelected = function() {
if (sap.ui.Device.system.phone && this._parent) {
this._parent._oCloseTrigger = this;
}
this.close();
}
;
A.prototype._orientationChange = function() {
this._parent._adjustScrollingPane();
}
;
A.prototype._addAriaHiddenTexts = function(b) {
var B = b.getId();
if (sap.ui.getCore().getConfiguration().getAccessibility()) {
var i = new a(B + "-actionSheetHiddenText");
this.addAggregation("_invisibleAriaTexts", i, false);
if (b.getAriaLabelledBy().indexOf(B) === -1) {
b.addAriaLabelledBy(B);
}
b.addAriaLabelledBy(i.getId());
}
}
;
A.prototype._removeAriaHiddenTexts = function(b) {
b.getAriaLabelledBy().forEach(function(i) {
var c = sap.ui.getCore().byId(i);
if (c instanceof a && i.indexOf("actionSheetHiddenText") > -1) {
this.removeAggregation("_invisibleAriaTexts", c, false);
b.removeAriaLabelledBy(c);
c.destroy();
}
}, this);
}
;
A.prototype.addButton = function(b) {
this.addAggregation("buttons", b, false);
this._addAriaHiddenTexts(b);
this._preProcessActionButton(b);
b.attachPress(this._buttonSelected, this);
return this;
}
;
A.prototype.insertButton = function(b, i) {
this.insertAggregation("buttons", b, i, false);
this._addAriaHiddenTexts(b);
this._preProcessActionButton(b);
b.attachPress(this._buttonSelected, this);
return this;
}
;
A.prototype.removeButton = function(b) {
var r = this.removeAggregation("buttons", b, false);
if (r) {
r.detachPress(this._buttonSelected, this);
this._removeAriaHiddenTexts(r);
}
return r;
}
;
A.prototype.removeAllButtons = function() {
var r = this.removeAllAggregation("buttons", false)
, t = this;
q.each(r, function(i, b) {
b.detachPress(t._buttonSelected, t);
t._removeAriaHiddenTexts(b);
});
return r;
}
;
A.prototype.clone = function() {
var b = this.getButtons();
for (var i = 0; i < b.length; i++) {
b[i].detachPress(this._buttonSelected, this);
}
var c = C.prototype.clone.apply(this, arguments);
for (var j = 0; j < b.length; j++) {
b[i].attachPress(this._buttonSelected, this);
}
return c;
}
;
A.prototype._getAllButtons = function() {
return this.getButtons();
}
;
return A;
}, true);
sap.ui.predefine('sap/m/ActionSheetRenderer', ['jquery.sap.global'], function(q) {
"use strict";
var A = {};
A.render = function(r, c) {
var a = c._getAllButtons(), I = c.getAggregation("_invisibleAriaTexts"), R
= sap.ui.getCore().getLibraryResourceBundle('sap.m'), b = a.length, d =
sap.ui.getCore().getConfiguration().getAccessibility(), v = a.filter(function(B) {
return B.getVisible();
}).length, i, m, B, V = 1;
for (i = 0; i < b; i++) {
B = a[i];
B.removeStyleClass("sapMActionSheetButtonNoIcon");
if (B.getIcon() && B.getVisible()) {
m = true;
} else {
B.addStyleClass("sapMActionSheetButtonNoIcon");
}
}
r.write("<div");
r.writeControlData(c);
r.addClass("sapMActionSheet");
if (m) {
r.addClass("sapMActionSheetMixedButtons");
}
r.writeClasses();
var t = c.getTooltip_AsString();
if (t) {
r.writeAttributeEscaped("title", t);
}
r.write(">");
for (i = 0; i < b; i++) {
B = a[i];
r.renderControl(a[i].addStyleClass("sapMActionSheetButton"));
if (d && B.getVisible()) {
I[i].setText(R.getText('ACTIONSHEET_BUTTON_INDEX', [V, v]));
V++;
r.renderControl(I[i]);
}
}
if (sap.ui.Device.system.phone && c.getShowCancelButton()) {
r.renderControl(c._getCancelButton());
}
r.write("</div>");
}
;
return A;
}, true);
sap.ui.predefine('sap/m/App', ['jquery.sap.global', './NavContainer', './library'],
function(q, N, l) {
"use strict";
var A = N.extend("sap.m.App", {
metadata: {
library: "sap.m",
properties: {
homeIcon: {
type: "any",
group: "Misc",
defaultValue: null
},
backgroundColor: {
type: "string",
group: "Appearance",
defaultValue: null
},
backgroundImage: {
type: "sap.ui.core.URI",
group: "Appearance",
defaultValue: null
},
backgroundRepeat: {
type: "boolean",
group: "Appearance",
defaultValue: false
},
backgroundOpacity: {
type: "float",
group: "Appearance",
defaultValue: 1
}
},
events: {
orientationChange: {
deprecated: true,
parameters: {
landscape: {
type: "boolean"
}
}
}
}
}
});
A.prototype.init = function() {
N.prototype.init.apply(this, arguments);
this.addStyleClass("sapMApp");
q.sap.initMobile({
viewport: !this._debugZoomAndScroll,
statusBar: "default",
hideBrowser: true,
preventScroll: !this._debugZoomAndScroll,
rootId: this.getId()
});
q(window).bind("resize", q.proxy(this._handleOrientationChange, this));
}
;
A.prototype.onBeforeRendering = function() {
if (N.prototype.onBeforeRendering) {
N.prototype.onBeforeRendering.apply(this, arguments);
}
q.sap.initMobile({
homeIcon: this.getHomeIcon()
});
}
;
A.prototype.onAfterRendering = function() {
if (N.prototype.onAfterRendering) {
N.prototype.onAfterRendering.apply(this, arguments);
}
var r = this.getDomRef().parentNode;
while (r && r !== document.documentElement) {
var $ = q(r);
if ($.attr("data-sap-ui-root-content")) {
break;
}
if (!r.style.height) {
r.style.height = "100%";
}
r = r.parentNode;
}
}
;
A.prototype.exit = function() {
q(window).unbind("resize", this._handleOrientationChange);
if (this._sInitTimer) {
q.sap.clearDelayedCall(this._sInitTimer);
}
}
;
A.prototype._handleOrientationChange = function() {
var $ = q(window);
var i = $.width() > $.height();
if (this._oldIsLandscape !== i) {
this.fireOrientationChange({
landscape: i
});
this._oldIsLandscape = i;
}
}
;
A.prototype.setBackgroundOpacity = function(o) {
if (o > 1 || o < 0) {
q.sap.log.warning("Invalid value " + o + " for
App.setBackgroundOpacity() ignored. Valid values are: floats between 0 and 1.");
return this;
}
this.$("BG").css("opacity", o);
return this.setProperty("backgroundOpacity", o, true);
}
;
return A;
}, true);
sap.ui.predefine('sap/m/AppRenderer', ['jquery.sap.global',
'./NavContainerRenderer', 'sap/ui/core/Renderer'], function(q, N, R) {
"use strict";
var A = {};
var A = R.extend(N);
A.renderAttributes = function(r, c) {
sap.m.BackgroundHelper.addBackgroundColorStyles(r, c.getBackgroundColor(),
c.getBackgroundImage());
}
;
A.renderBeforeContent = function(r, c) {
sap.m.BackgroundHelper.renderBackgroundImageTag(r, c, "sapMAppBG",
c.getBackgroundImage(), c.getBackgroundRepeat(), c.getBackgroundOpacity());
}
;
return A;
}, true);
sap.ui.predefine('sap/m/AssociativeOverflowToolbar', ['./OverflowToolbar',
'./OverflowToolbarRenderer', './Toolbar'], function(O, a, T) {
"use strict";
var A = O.extend("sap.m.AssociativeOverflowToolbar", {
metadata: {
associations: {
content: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "content"
}
}
},
renderer: a
});
A.prototype.getContent = function() {
var b = this.getAssociation("content") || [];
return b.map(function(c) {
return sap.ui.getCore().byId(c);
});
}
;
A.prototype.exit = function() {
O.prototype.exit.apply(this, arguments);
return this._callToolbarMethod('destroyContent', [true]);
}
;
A.prototype.indexOfContent = function(c) {
var b = this.getAssociation("content") || [];
return b.indexOf(c.getId());
}
;
A.prototype._callToolbarMethod = function(f, b) {
switch (f) {
case 'addContent':
return this.addAssociation("content", b[0]);
case 'getContent':
return this.getContent();
case 'insertContent':
return this.addAssociation("content", b[0], b[3]);
case 'removeContent':
return sap.ui.getCore().byId(this.removeAssociation("content", b[0],
b[1], b[2])) || null;
case 'destroyContent':
var c = this.removeAllAssociation("content", b[0]).map(function(d) {
return sap.ui.getCore().byId(d);
});
c.forEach(function(d) {
if (d) {
d.destroy();
}
});
return this;
case 'removeAllContent':
return this.removeAllAssociation("content", b[0]).map(function(d) {
return sap.ui.getCore().byId(d);
});
default:
return T.prototype[f].apply(this, b);
}
}
;
return A;
}, false);
sap.ui.predefine('sap/m/Bar', ['jquery.sap.global', './BarInPageEnabler',
'./library', 'sap/ui/core/Control'], function(q, B, l, C) {
"use strict";
var a = C.extend("sap.m.Bar", {
metadata: {
interfaces: ["sap.m.IBar"],
library: "sap.m",
properties: {
enableFlexBox: {
type: "boolean",
group: "Misc",
defaultValue: false,
deprecated: true
},
translucent: {
type: "boolean",
group: "Appearance",
defaultValue: false,
deprecated: true
},
design: {
type: "sap.m.BarDesign",
group: "Appearance",
defaultValue: sap.m.BarDesign.Auto
}
},
aggregations: {
contentLeft: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "contentLeft"
},
contentMiddle: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "contentMiddle"
},
contentRight: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "contentRight"
}
},
designtime: true
}
});
a.prototype.onBeforeRendering = function() {
this._removeAllListeners();
}
;
a.prototype.onAfterRendering = function() {
this._handleResize();
}
;
a.prototype.init = function() {
this.data("sap-ui-fastnavgroup", "true", true);
}
;
a.prototype.exit = function() {
this._removeAllListeners();
if (this._oflexBox) {
this._oflexBox.destroy();
this._oflexBox = null;
}
this._$MidBarPlaceHolder = null;
this._$RightBar = null;
this._$LeftBar = null;
}
;
a._aResizeHandlers = ["_sResizeListenerId", "_sResizeListenerIdMid",
"_sResizeListenerIdRight", "_sResizeListenerIdLeft"];
a.prototype._removeAllListeners = function() {
var t = this;
a._aResizeHandlers.forEach(function(i) {
t._removeListenerFailsave(i);
});
}
;
a.prototype._removeListenerFailsave = function(L) {
if (this[L]) {
sap.ui.core.ResizeHandler.deregister(this[L]);
this[L] = null;
}
}
;
a.prototype._handleResize = function() {
this._removeAllListeners();
var c = !!this.getContentLeft().length
, b = !!this.getContentMiddle().length
, d = !!this.getContentRight().length;
if (!this.getVisible()) {
return;
}
if (!c && !b && !d) {
return;
}
this._$LeftBar = this.$("BarLeft");
this._$RightBar = this.$("BarRight");
this._$MidBarPlaceHolder = this.$("BarPH");
this._updatePosition(c, b, d);
this._sResizeListenerId =
sap.ui.core.ResizeHandler.register(this.getDomRef(), q.proxy(this._handleResize,
this));
if (this.getEnableFlexBox()) {
return;
}
if (c) {
this._sResizeListenerIdLeft =
sap.ui.core.ResizeHandler.register(this._$LeftBar[0], q.proxy(this._handleResize,
this));
}
if (b) {
this._sResizeListenerIdMid =
sap.ui.core.ResizeHandler.register(this._$MidBarPlaceHolder[0],
q.proxy(this._handleResize, this));
}
if (d) {
this._sResizeListenerIdRight =
sap.ui.core.ResizeHandler.register(this._$RightBar[0], q.proxy(this._handleResize,
this));
}
}
;
a.prototype._updatePosition = function(c, b, d) {
if (!c && !d && b) {
return;
}
if (c && !b && !d) {
return;
}
if (!c && !b && d) {
return;
}
var i = this.$().outerWidth(true);
this._$RightBar.css({
width: ""
});
this._$LeftBar.css({
width: ""
});
this._$MidBarPlaceHolder.css({
position: "",
width: "",
visibility: 'hidden'
});
var r = this._$RightBar.outerWidth(true);
if (r > i) {
if (c) {
this._$LeftBar.css({
width: "0px"
});
}
if (b) {
this._$MidBarPlaceHolder.css({
width: "0px"
});
}
this._$RightBar.css({
width: i + "px"
});
return;
}
var L = this._getBarContainerWidth(this._$LeftBar);
if (i < (L + r)) {
L = i - r;
this._$LeftBar.css({
width: L + "px"
});
this._$MidBarPlaceHolder.css({
width: "0px"
});
return;
}
this._$MidBarPlaceHolder.css(this._getMidBarCss(r, i, L));
}
;
a.prototype._getMidBarCss = function(r, b, L) {
var m = this._$MidBarPlaceHolder.outerWidth(true)
, R = sap.ui.getCore().getConfiguration().getRTL()
, s = R ? "right" : "left"
, M = {
visibility: ""
};
if (this.getEnableFlexBox()) {
m = b - L - r - parseInt(this._$MidBarPlaceHolder.css('margin-left'),
10) - parseInt(this._$MidBarPlaceHolder.css('margin-right'), 10);
M.position = "absolute";
M.width = m + "px";
M[s] = L;
return M;
}
var S = b - L - r
, i = (b / 2) - (m / 2)
, c = L > i
, d = (b / 2) + (m / 2)
, e = (b - r) < d;
if (S > 0 && (c || e)) {
M.position = "absolute";
M.width = S + "px";
M.left = R ? r : L;
}
return M;
}
;
a.prototype._getBarContainerWidth = function(c) {
var i, b = 0, d = c.children(), e = 0;
if (sap.ui.Device.browser.webkit || sap.ui.Device.browser.firefox ||
sap.ui.Device.browser.edge) {
for (i = 0; i < d.length; i++) {
e += q(d[i]).outerWidth(true);
}
b = c.outerWidth(true);
} else {
var o;
for (i = 0; i < d.length; i++) {
o = window.getComputedStyle(d[i]);
if (o.width == "auto") {
e += q(d[i]).width() + 1;
} else {
e += parseFloat(o.width);
}
e += parseFloat(o.marginLeft);
e += parseFloat(o.marginRight);
e += parseFloat(o.paddingLeft);
e += parseFloat(o.paddingRight);
}
var f = window.getComputedStyle(c[0]);
b += parseFloat(f.width);
b += parseFloat(f.marginLeft);
b += parseFloat(f.marginRight);
b += parseFloat(f.paddingLeft);
b += parseFloat(f.paddingRight);
}
if (b < e) {
b = e;
}
return b;
}
;
a.prototype.isContextSensitive = B.prototype.isContextSensitive;
a.prototype.setHTMLTag = B.prototype.setHTMLTag;
a.prototype.getHTMLTag = B.prototype.getHTMLTag;
a.prototype.applyTagAndContextClassFor =
B.prototype.applyTagAndContextClassFor;
a.prototype._setLandmarkInfo = B.prototype._setLandmarkInfo;
a.prototype._writeLandmarkInfo = B.prototype._writeLandmarkInfo;
return a;
}, true);
sap.ui.predefine('sap/m/BarInPageEnabler', ['sap/ui/base/Object',
'./PageAccessibleLandmarkInfo', 'sap/ui/core/InvisibleText'], function(O, P, I) {
"use strict";
var c = {
footer: {
contextClass: "sapMFooter-CTX sapContrast sapContrastPlus",
tag: "Footer",
internalAriaLabel: "BAR_ARIA_DESCRIPTION_FOOTER"
},
header: {
contextClass: "sapMHeader-CTX",
tag: "Header",
internalAriaLabel: "BAR_ARIA_DESCRIPTION_HEADER"
},
subheader: {
contextClass: "sapMSubHeader-CTX",
tag: "Header",
internalAriaLabel: "BAR_ARIA_DESCRIPTION_SUBHEADER"
}
};
var a = "sapMIBar";
var _ = {}
, b = sap.ui.getCore().getLibraryResourceBundle("sap.m");
var d = function(t, T) {
if (typeof _[t] === "undefined") {
_[t] = new I({
text: T
}).toStatic().getId();
}
return _[t];
};
var B = O.extend("sap.m.BarInPageEnabler", {
isContextSensitive: function() {
return this.getDesign && this.getDesign() === "Auto";
},
setHTMLTag: function(n) {
if (n === this.sTag) {
return this;
}
this.sTag = n;
return this;
},
getHTMLTag: function() {
if (!this.hasOwnProperty("sTag")) {
this.sTag = sap.m.IBarHTMLTag.Div;
}
return this.sTag;
},
applyTagAndContextClassFor: function(C) {
var o = c[C];
if (!o) {
jQuery.sap.log.error("The context " + C + " is not known", this);
return this;
}
if (!this.isContextSensitive || !this.setHTMLTag) {
jQuery.sap.log.error("The bar control you are using does not
implement all the members of the IBar interface", this);
return this;
}
if (!this.getRenderer().shouldAddIBarContext()) {
this.addStyleClass(a + "-CTX");
}
this.setHTMLTag(o.tag);
if (o.internalAriaLabel) {
this._sInternalAriaLabelId = d(o.tag,
b.getText(o.internalAriaLabel));
}
if (this.isContextSensitive()) {
this.addStyleClass(o.contextClass);
}
return this;
},
_setLandmarkInfo: function(h, C) {
this._bHasLandmarkInfo = h;
if (h) {
this._sLandmarkContext = C;
} else {
this._sLandmarkContext = null;
}
},
_writeLandmarkInfo: function(r, C) {
var e;
if (C._bHasLandmarkInfo) {
P._writeLandmarkInfo(r, C.getParent(), C._sLandmarkContext);
} else {
e = sap.m.Dialog && C.getParent()instanceof sap.m.Dialog ?
"heading" : "toolbar";
r.writeAccessibilityState(C, {
role: e
});
}
},
render: function(r, C) {
var t = C.getHTMLTag().toLowerCase();
r.write("<" + t);
r.addClass(a);
if (C._sInternalAriaLabelId) {
r.writeAccessibilityState(C, {
"labelledby": {
value: C._sInternalAriaLabelId,
append: true
}
});
}
if (this.shouldAddIBarContext(C)) {
r.addClass(a + "-CTX");
}
r.writeControlData(C);
B.renderTooltip(r, C);
this.decorateRootElement(r, C);
r.writeClasses();
r.writeStyles();
r.write(">");
this.renderBarContent(r, C);
r.write("</" + t + ">");
}
});
B.renderTooltip = function(r, C) {
var t = C.getTooltip_AsString();
if (t) {
r.writeAttributeEscaped("title", t);
}
}
;
B.addChildClassTo = function(C) {
C.addStyleClass("sapMBarChild");
}
;
B.prototype.exit = function() {
if (this._sInternalAriaLabelId) {
this._sInternalAriaLabelId.destroy();
this._sInternalAriaLabelId = null;
}
}
;
return B;
}, true);
sap.ui.predefine('sap/m/BarRenderer', ['jquery.sap.global', './BarInPageEnabler'],
function(q, B) {
"use strict";
var a = {};
a.render = B.prototype.render;
a.decorateRootElement = function(r, c) {
r.addClass("sapMBar");
r.addClass(this.getContext(c));
c._writeLandmarkInfo(r, c);
if (c.getTranslucent() && (sap.ui.Device.support.touch ||
q.sap.simulateMobileOnDesktop)) {
r.addClass("sapMBarTranslucent");
}
r.addClass("sapMBar-CTX");
}
;
a.shouldAddIBarContext = function() {
return true;
}
;
a.renderBarContent = function(r, c) {
var C = "</div>";
r.write("<div id='" + c.getId() + "-BarLeft' ");
r.addClass('sapMBarLeft');
r.addClass('sapMBarContainer');
r.writeClasses();
w("left", r, c);
r.write(">");
this.renderAllControls(c.getContentLeft(), r, c);
r.write(C);
r.write("<div id='" + c.getId() + "-BarMiddle' ");
r.addClass('sapMBarMiddle');
r.writeClasses();
r.write(">");
if (c.getEnableFlexBox()) {
c._oflexBox = c._oflexBox || new sap.m.HBox(c.getId() + "-BarPH",{
alignItems: "Center"
}).addStyleClass("sapMBarPH").setParent(c, null, true);
var b = !!c.getContentLeft().length
, d = !!c.getContentMiddle().length
, e = !!c.getContentRight().length;
if (d && !b && !e) {
c._oflexBox.addStyleClass("sapMBarFlexBoxWidth100");
}
c.getContentMiddle().forEach(function(m) {
c._oflexBox.addItem(m);
});
r.renderControl(c._oflexBox);
} else {
r.write("<div id='" + c.getId() + "-BarPH' ");
r.addClass('sapMBarPH');
r.addClass('sapMBarContainer');
w("middle", r, c);
r.writeClasses();
r.write(">");
this.renderAllControls(c.getContentMiddle(), r, c);
r.write(C);
}
r.write(C);
r.write("<div id='" + c.getId() + "-BarRight'");
r.addClass('sapMBarRight');
r.addClass('sapMBarContainer');
if (sap.ui.getCore().getConfiguration().getRTL()) {
r.addClass("sapMRTL");
}
r.writeClasses();
w("right", r, c);
r.write(">");
this.renderAllControls(c.getContentRight(), r, c);
r.write(C);
}
;
a.renderAllControls = function(c, r, b) {
c.forEach(function(C) {
sap.m.BarInPageEnabler.addChildClassTo(C, b);
r.renderControl(C);
});
}
;
a._mContexts = {
Header: "sapMHeader-CTX",
SubHeader: "sapMSubHeader-CTX",
Footer: "sapMFooter-CTX",
Default: "sapMContent-CTX"
};
a.getContext = function(c) {
var d = c.getDesign()
, C = a._mContexts;
return C[d] || C.Default;
}
;
function w(A, r, c) {
var C = !!c.getContentLeft().length
, b = !!c.getContentMiddle().length
, d = !!c.getContentRight().length;
function e() {
r.addStyle("width", "100%");
r.writeStyles();
}
switch (A.toLowerCase()) {
case "left":
if (C && !b && !d) {
e();
}
break;
case "middle":
if (b && !C && !d) {
e();
}
break;
case "right":
if (d && !C && !b) {
e();
}
break;
default:
q.sap.log.error("Cannot determine which of the three content
aggregations is alone");
}
}
return a;
}, true);
sap.ui.predefine('sap/m/BusyIndicator', ['jquery.sap.global', './library',
'sap/ui/core/Control', 'sap/ui/core/theming/Parameters'], function(q, l, C, P) {
"use strict";
var B = C.extend("sap.m.BusyIndicator", {
metadata: {
library: "sap.m",
properties: {
text: {
type: "string",
group: "Data",
defaultValue: ""
},
textDirection: {
type: "sap.ui.core.TextDirection",
group: "Appearance",
defaultValue: sap.ui.core.TextDirection.Inherit
},
customIcon: {
type: "sap.ui.core.URI",
group: "Misc",
defaultValue: ""
},
customIconRotationSpeed: {
type: "int",
group: "Appearance",
defaultValue: 1000
},
customIconDensityAware: {
type: "boolean",
defaultValue: true
},
customIconWidth: {
type: "sap.ui.core.CSSSize",
group: "Appearance",
defaultValue: "44px"
},
customIconHeight: {
type: "sap.ui.core.CSSSize",
group: "Appearance",
defaultValue: "44px"
},
size: {
type: "sap.ui.core.CSSSize",
group: "Misc",
defaultValue: "1rem"
},
design: {
type: "string",
group: "Appearance",
defaultValue: "auto"
}
},
associations: {
ariaLabelledBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaLabelledBy"
}
}
}
});
B.prototype.init = function() {
this.setBusyIndicatorDelay(0);
}
;
B.prototype.setText = function(t) {
this.setProperty("text", t, true);
this._createLabel("setText", t);
return this;
}
;
B.prototype.setTextDirection = function(d) {
this.setProperty("textDirection", d, true);
this._createLabel("setTextDirection", d);
return this;
}
;
B.prototype.setCustomIcon = function(s) {
this.setProperty("customIcon", s, false);
this._createCustomIcon("setSrc", s);
return this;
}
;
B.prototype.setCustomIconRotationSpeed = function(s) {
if (isNaN(s) || s < 0) {
s = 0;
}
if (s !== this.getCustomIconRotationSpeed()) {
this.setProperty("customIconRotationSpeed", s, true);
this._setRotationSpeed();
}
return this;
}
;
B.prototype.setCustomIconDensityAware = function(a) {
this.setProperty("customIconDensityAware", a, true);
this._createCustomIcon("setDensityAware", a);
return this;
}
;
B.prototype.setCustomIconWidth = function(w) {
this.setProperty("customIconWidth", w, true);
this._createCustomIcon("setWidth", w);
return this;
}
;
B.prototype.setCustomIconHeight = function(h) {
this.setProperty("customIconHeight", h, true);
this._createCustomIcon("setHeight", h);
return this;
}
;
B.prototype.setSize = function(s) {
this.setProperty("size", s, true);
var d = this.getDomRef();
if (d) {
d.style.fontSize = s;
}
return this;
}
;
B.prototype.onBeforeRendering = function() {
if (this.getCustomIcon()) {
this.setBusy(false);
} else {
this.setBusy(true, "busy-area");
}
}
;
B.prototype.exit = function() {
if (this._iconImage) {
this._iconImage.destroy();
this._iconImage = null;
}
if (this._busyLabel) {
this._busyLabel.destroy();
this._busyLabel = null;
}
}
;
B.prototype._createCustomIcon = function(n, v) {
if (!this._iconImage) {
this._iconImage = new sap.m.Image(this.getId() + "-icon",{
width: "44px",
height: "44px"
}).addStyleClass("sapMBsyIndIcon");
this._iconImage.addEventDelegate({
onAfterRendering: function() {
this._setRotationSpeed();
}
}, this);
}
this._iconImage[n](v);
this._setRotationSpeed();
}
;
B.prototype._createLabel = function(n, v) {
if (!this._busyLabel) {
this._busyLabel = new sap.m.Label(this.getId() + "-label",{
labelFor: this.getId(),
textAlign: "Center"
});
}
this._busyLabel[n](v);
}
;
B.prototype._setRotationSpeed = function() {
if (!this._iconImage) {
return;
}
if (q.support.cssAnimations) {
var $ = this._iconImage.$();
var r = this.getCustomIconRotationSpeed() + "ms";
$.css("-webkit-animation-duration", r).css("animation-duration", r);
$.css("display", "none");
setTimeout(function() {
$.css("display", "inline");
}, 0);
} else {
this._rotateCustomIcon();
}
}
;
B.prototype._rotateCustomIcon = function() {
if (!this._iconImage) {
return;
}
var $ = this._iconImage.$();
if (!$[0] || !$[0].offsetWidth) {
return;
}
var r = this.getCustomIconRotationSpeed();
if (!r) {
return;
}
if (!this._fnRotateCustomIcon) {
this._fnRotateCustomIcon = q.proxy(this._rotateCustomIcon, this);
}
var R = this._fnRotateCustomIcon;
if (!this._$CustomRotator) {
this._$CustomRotator = q({
deg: 0
});
}
var a = this._$CustomRotator;
if (a.running) {
return;
}
a[0].deg = 0;
a.animate({
deg: 360
}, {
duration: r,
easing: "linear",
step: function(n) {
a.running = true;
$.css("-ms-transform", 'rotate(' + n + 'deg)');
},
complete: function() {
a.running = false;
window.setTimeout(R, 10);
}
});
}
;
return B;
}, true);
sap.ui.predefine('sap/m/BusyIndicatorRenderer', ['jquery.sap.global'], function(q)
{
"use strict";
var B = {};
B.render = function(r, b) {
this.startBusyIndicator(r, b);
this.renderBusyIndication(r, b);
this.renderLabel(r, b);
this.endBusyIndicator(r);
}
;
B.startBusyIndicator = function(r, b) {
var a = {
role: "progressbar",
valuemin: "0",
valuemax: "100"
};
r.write("<div tabindex='0' ");
r.writeControlData(b);
r.addClass("sapMBusyIndicator");
r.writeClasses();
r.addStyle("font-size", b.getSize());
r.writeStyles();
r.writeAccessibilityState(b, a);
this.renderTooltip(r, b.getTooltip_AsString());
r.write(">");
}
;
B.renderTooltip = function(r, t) {
if (t) {
r.writeAttributeEscaped("title", t);
}
}
;
B.renderBusyIndication = function(r, b) {
if (b.getCustomIcon()) {
r.renderControl(b._iconImage);
} else {
r.write("<div class='sapMBusyIndicatorBusyArea'");
r.writeAttribute("id", b.getId() + "-busy-area");
r.write("></div>");
}
}
;
B.renderLabel = function(r, b) {
if (b.getText()) {
r.renderControl(b._busyLabel);
}
}
;
B.endBusyIndicator = function(r) {
r.write("</div>");
}
;
return B;
}, true);
sap.ui.predefine('sap/m/Button', ['jquery.sap.global', './library',
'sap/ui/core/Control', 'sap/ui/core/EnabledPropagator', 'sap/ui/core/IconPool',
'sap/ui/Device'], function(q, l, C, E, I, D) {
"use strict";
var B = C.extend("sap.m.Button", {
metadata: {
library: "sap.m",
properties: {
text: {
type: "string",
group: "Misc",
defaultValue: null
},
type: {
type: "sap.m.ButtonType",
group: "Appearance",
defaultValue: sap.m.ButtonType.Default
},
width: {
type: "sap.ui.core.CSSSize",
group: "Misc",
defaultValue: null
},
enabled: {
type: "boolean",
group: "Behavior",
defaultValue: true
},
icon: {
type: "sap.ui.core.URI",
group: "Appearance",
defaultValue: null
},
iconFirst: {
type: "boolean",
group: "Appearance",
defaultValue: true
},
activeIcon: {
type: "sap.ui.core.URI",
group: "Misc",
defaultValue: null
},
iconDensityAware: {
type: "boolean",
group: "Misc",
defaultValue: true
},
textDirection: {
type: "sap.ui.core.TextDirection",
group: "Appearance",
defaultValue: sap.ui.core.TextDirection.Inherit
}
},
associations: {
ariaDescribedBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaDescribedBy"
},
ariaLabelledBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaLabelledBy"
}
},
events: {
tap: {
deprecated: true
},
press: {}
}
}
});
E.call(B.prototype);
B.prototype.exit = function() {
if (this._image) {
this._image.destroy();
}
if (this._iconBtn) {
this._iconBtn.destroy();
}
}
;
B.prototype.onBeforeRendering = function() {
this._bRenderActive = this._bActive;
}
;
B.prototype.onAfterRendering = function() {
if (this._bRenderActive) {
this._activeButton();
this._bRenderActive = this._bActive;
}
}
;
B.prototype.ontouchstart = function(e) {
e.setMarked();
if (this._bRenderActive) {
delete this._bRenderActive;
}
if (e.targetTouches.length === 1) {
this._activeButton();
}
if (this.getEnabled() && this.getVisible()) {
if (D.browser.safari && (e.originalEvent && e.originalEvent.type ===
"mousedown")) {
this.focus();
e.preventDefault();
}
}
}
;
B.prototype.ontouchend = function(e) {
this._inactiveButton();
if (this._bRenderActive) {
delete this._bRenderActive;
if (e.originalEvent && e.originalEvent.type in {
mouseup: 1,
touchend: 1
}) {
this.ontap(e);
}
}
}
;
B.prototype.ontouchcancel = function() {
this._inactiveButton();
}
;
B.prototype.ontap = function(e) {
e.setMarked();
if (this.getEnabled() && this.getVisible()) {
if ((e.originalEvent && e.originalEvent.type === "touchend")) {
this.focus();
}
this.fireTap({});
this.firePress({});
}
}
;
B.prototype.onkeydown = function(e) {
if (e.which === q.sap.KeyCodes.SPACE || e.which === q.sap.KeyCodes.ENTER) {
e.setMarked();
this._activeButton();
}
if (e.which === q.sap.KeyCodes.ENTER) {
this.firePress({});
}
}
;
B.prototype.onkeyup = function(e) {
if (e.which === q.sap.KeyCodes.SPACE || e.which === q.sap.KeyCodes.ENTER) {
e.setMarked();
this._inactiveButton();
}
if (e.which === q.sap.KeyCodes.SPACE) {
this.firePress({});
}
}
;
B.prototype.onfocusout = function() {
this._inactiveButton();
}
;
B.prototype._activeButton = function() {
if (!this._isUnstyled()) {
this.$("inner").addClass("sapMBtnActive");
}
this._bActive = this.getEnabled();
if (this._bActive) {
if (this.getIcon() && this.getActiveIcon() && this._image) {
this._image.setSrc(this.getActiveIcon());
}
}
}
;
B.prototype._inactiveButton = function() {
if (!this._isUnstyled()) {
this.$("inner").removeClass("sapMBtnActive");
}
this._bActive = false;
if (this.getEnabled()) {
if (this.getIcon() && this.getActiveIcon() && this._image) {
this._image.setSrc(this.getIcon());
}
}
}
;
B.prototype._isHoverable = function() {
return this.getEnabled() && D.system.desktop;
}
;
B.prototype._getImage = function(i, s, a, b) {
if (this._image && (this._image.getSrc() !== s)) {
this._image.destroy();
this._image = undefined;
}
var o = this._image;
var c = this.getIconFirst();
if (!!o) {
o.setSrc(s);
if (o instanceof sap.m.Image) {
o.setActiveSrc(a);
o.setDensityAware(b);
}
} else {
o = I.createControlByURI({
id: i,
src: s,
activeSrc: a,
densityAware: b,
useIconTooltip: false
}, sap.m.Image).addStyleClass("sapMBtnCustomIcon").setParent(this,
null, true);
}
o.addStyleClass("sapMBtnIcon");
o.toggleStyleClass("sapMBtnIconLeft", c);
o.toggleStyleClass("sapMBtnIconRight", !c);
this._image = o;
return this._image;
}
;
B.prototype._getInternalIconBtn = function(i, s) {
var o = this._iconBtn;
if (o) {
o.setSrc(s);
} else {
o = I.createControlByURI({
id: i,
src: s,
useIconTooltip: false
}, sap.m.Image).setParent(this, null, true);
}
o.addStyleClass("sapMBtnIcon");
o.addStyleClass("sapMBtnIconLeft");
this._iconBtn = o;
return this._iconBtn;
}
;
B.prototype._isUnstyled = function() {
var u = false;
if (this.getType() === sap.m.ButtonType.Unstyled) {
u = true;
}
return u;
}
;
B.prototype.setText = function(t) {
var v = this.getText();
if (t === null || t === undefined) {
t = "";
}
if (v !== t) {
var d = this.getDomRef("content");
var s = !!d;
this.setProperty("text", t, s);
if (s) {
t = this.getText();
d.innerHTML = q.sap.encodeHTML(t);
this.$("inner").toggleClass("sapMBtnText", !!t);
}
}
return this;
}
;
B.prototype.setIcon = function(i) {
var v = this.getIcon() || "";
i = i || "";
if (v !== i) {
var s = !!v && !!i && I.isIconURI(i) === I.isIconURI(v);
this.setProperty("icon", i, s);
if (s && this._image) {
this._image.setSrc(i);
}
}
return this;
}
;
B.prototype.getPopupAnchorDomRef = function() {
return this.getDomRef("inner");
}
;
B.prototype._getText = function() {
return this.getText();
}
;
B.prototype._getTooltip = function() {
var t = this.getTooltip_AsString();
if (!t && !this.getText()) {
var i = sap.ui.core.IconPool.getIconInfo(this.getIcon());
if (i && i.text) {
t = i.text;
}
}
return t;
}
;
B.prototype.setType = function(t) {
this.setProperty("type", t);
var T = "";
var r;
switch (t) {
case sap.m.ButtonType.Accept:
if (!sap.m.Button._oStaticAcceptText) {
r = sap.ui.getCore().getLibraryResourceBundle("sap.m");
T = r.getText("BUTTON_ARIA_TYPE_ACCEPT");
sap.m.Button._oStaticAcceptText = new sap.ui.core.InvisibleText({
text: T
});
sap.m.Button._oStaticAcceptText.toStatic();
}
break;
case sap.m.ButtonType.Reject:
if (!sap.m.Button._oStaticRejectText) {
r = sap.ui.getCore().getLibraryResourceBundle("sap.m");
T = r.getText("BUTTON_ARIA_TYPE_REJECT");
sap.m.Button._oStaticRejectText = new sap.ui.core.InvisibleText({
text: T
});
sap.m.Button._oStaticRejectText.toStatic();
}
break;
case sap.m.ButtonType.Emphasized:
if (!sap.m.Button._oStaticEmphasizedText) {
r = sap.ui.getCore().getLibraryResourceBundle("sap.m");
T = r.getText("BUTTON_ARIA_TYPE_EMPHASIZED");
sap.m.Button._oStaticEmphasizedText = new
sap.ui.core.InvisibleText({
text: T
});
sap.m.Button._oStaticEmphasizedText.toStatic();
}
break;
default:
break;
}
return this;
}
;
B.prototype.getAccessibilityInfo = function() {
var d = this.getText() || this.getTooltip_AsString();
if (!d && this.getIcon()) {
var i = sap.ui.core.IconPool.getIconInfo(this.getIcon());
if (i) {
d = i.text || i.name;
}
}
return {
role: "button",
type:
sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("ACC_CTR_TYPE_BUTTON"),
description: d,
focusable: this.getEnabled(),
enabled: this.getEnabled()
};
}
;
return B;
}, true);
sap.ui.predefine('sap/m/ButtonRenderer', ['jquery.sap.global'], function(q) {
"use strict";
var B = {};
B.render = function(r, b) {
var t = b.getType();
var e = b.getEnabled();
var w = b.getWidth();
var T = b._getTooltip();
var s = b._getText();
var a = b.getTextDirection();
var i = sap.ui.Device.browser.internet_explorer ||
sap.ui.Device.browser.edge;
var c = sap.ui.core.IconPool.getIconURI("nav-back");
r.write("<button");
r.writeControlData(b);
r.addClass("sapMBtnBase");
if (!b._isUnstyled()) {
r.addClass("sapMBtn");
if ((t === sap.m.ButtonType.Back || t === sap.m.ButtonType.Up) &&
b.getIcon() && !s) {
r.addClass("sapMBtnBack");
}
}
var A = {};
var d = "";
switch (t) {
case sap.m.ButtonType.Accept:
d = sap.m.Button._oStaticAcceptText.getId();
break;
case sap.m.ButtonType.Reject:
d = sap.m.Button._oStaticRejectText.getId();
break;
case sap.m.ButtonType.Emphasized:
d = sap.m.Button._oStaticEmphasizedText.getId();
break;
default:
break;
}
if (d) {
A["describedby"] = {
value: d,
append: true
};
}
if (b.getAriaLabelledBy() && b.getAriaLabelledBy().length > 0) {
A["labelledby"] = {
value: b.getId(),
append: true
};
}
if (this.renderAccessibilityAttributes) {
this.renderAccessibilityAttributes(r, b, A);
}
r.writeAccessibilityState(b, A);
if (!e) {
r.writeAttribute("disabled", "disabled");
if (!b._isUnstyled()) {
r.addClass("sapMBtnDisabled");
}
} else {
switch (t) {
case sap.m.ButtonType.Accept:
case sap.m.ButtonType.Reject:
case sap.m.ButtonType.Emphasized:
r.addClass("sapMBtnInverted");
break;
default:
break;
}
}
if (T) {
r.writeAttributeEscaped("title", T);
}
r.writeClasses();
if (w != "" || w.toLowerCase() === "auto") {
r.addStyle("width", w);
r.writeStyles();
}
r.write(">");
r.write("<div");
r.writeAttribute("id", b.getId() + "-inner");
if (!b._isUnstyled()) {
r.addClass("sapMBtnInner");
}
if (b._isHoverable()) {
r.addClass("sapMBtnHoverable");
}
if (e) {
r.addClass("sapMFocusable");
if (i) {
r.addClass("sapMIE");
}
}
if (!b._isUnstyled()) {
if (s) {
r.addClass("sapMBtnText");
}
if (t === sap.m.ButtonType.Back || t === sap.m.ButtonType.Up) {
r.addClass("sapMBtnBack");
}
if (b.getIcon()) {
if (b.getIconFirst()) {
r.addClass("sapMBtnIconFirst");
} else {
r.addClass("sapMBtnIconLast");
}
}
}
if (this.renderButtonAttributes) {
this.renderButtonAttributes(r, b);
}
if (!b._isUnstyled() && t !== "") {
r.addClass("sapMBtn" + q.sap.encodeHTML(t));
}
r.writeClasses();
r.write(">");
if (t === sap.m.ButtonType.Back || t === sap.m.ButtonType.Up) {
this.writeInternalIconPoolHtml(r, b, c);
}
if (b.getIcon()) {
this.writeImgHtml(r, b);
}
if (s) {
r.write("<span");
r.addClass("sapMBtnContent");
if (a !== sap.ui.core.TextDirection.Inherit) {
r.writeAttribute("dir", a.toLowerCase());
}
r.writeClasses();
r.writeAttribute("id", b.getId() + "-content");
r.write(">");
r.writeEscaped(s);
r.write("</span>");
}
if (i && e) {
r.write('<div class="sapMBtnFocusDiv"></div>');
}
r.write("</div>");
r.write("</button>");
}
;
B.writeImgHtml = function(r, b) {
r.renderControl(b._getImage((b.getId() + "-img"), b.getIcon(),
b.getActiveIcon(), b.getIconDensityAware()));
}
;
B.writeInternalIconPoolHtml = function(r, b, u) {
r.renderControl(b._getInternalIconBtn((b.getId() + "-iconBtn"), u));
}
;
return B;
}, true);
sap.ui.predefine('sap/m/Dialog', ['jquery.sap.global', './Bar',
'./InstanceManager', './AssociativeOverflowToolbar', './ToolbarSpacer',
'./library', 'sap/ui/core/Control', 'sap/ui/core/IconPool', 'sap/ui/core/Popup',
'sap/ui/core/delegate/ScrollEnablement', 'sap/ui/core/theming/Parameters',
'sap/ui/core/RenderManager', 'sap/ui/core/ResizeHandler', 'sap/ui/Device'],
function(q, B, I, A, T, l, C, a, P, S, b, R, c, D) {
"use strict";
var V = sap.ui.core.ValueState;
var d = D.browser.internet_explorer && (D.browser.version < 10);
var f = C.extend("sap.m.Dialog", {
metadata: {
interfaces: ["sap.ui.core.PopupInterface"],
library: "sap.m",
properties: {
icon: {
type: "sap.ui.core.URI",
group: "Appearance",
defaultValue: null
},
title: {
type: "string",
group: "Appearance",
defaultValue: null
},
showHeader: {
type: "boolean",
group: "Appearance",
defaultValue: true
},
type: {
type: "sap.m.DialogType",
group: "Appearance",
defaultValue: sap.m.DialogType.Standard
},
state: {
type: "sap.ui.core.ValueState",
group: "Appearance",
defaultValue: V.None
},
stretchOnPhone: {
type: "boolean",
group: "Appearance",
defaultValue: false,
deprecated: true
},
stretch: {
type: "boolean",
group: "Appearance",
defaultValue: false
},
contentWidth: {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: null
},
contentHeight: {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: null
},
horizontalScrolling: {
type: "boolean",
group: "Behavior",
defaultValue: true
},
verticalScrolling: {
type: "boolean",
group: "Behavior",
defaultValue: true
},
resizable: {
type: "boolean",
group: "Behavior",
defaultValue: false
},
draggable: {
type: "boolean",
group: "Behavior",
defaultValue: false
}
},
defaultAggregation: "content",
aggregations: {
content: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "content"
},
subHeader: {
type: "sap.m.IBar",
multiple: false
},
customHeader: {
type: "sap.m.IBar",
multiple: false
},
beginButton: {
type: "sap.m.Button",
multiple: false
},
endButton: {
type: "sap.m.Button",
multiple: false
},
buttons: {
type: "sap.m.Button",
multiple: true,
singularName: "button"
},
_header: {
type: "sap.ui.core.Control",
multiple: false,
visibility: "hidden"
},
_title: {
type: "sap.ui.core.Control",
multiple: false,
visibility: "hidden"
},
_icon: {
type: "sap.ui.core.Control",
multiple: false,
visibility: "hidden"
},
_toolbar: {
type: "sap.m.OverflowToolbar",
multiple: false,
visibility: "hidden"
}
},
associations: {
leftButton: {
type: "sap.m.Button",
multiple: false,
deprecated: true
},
rightButton: {
type: "sap.m.Button",
multiple: false,
deprecated: true
},
initialFocus: {
type: "sap.ui.core.Control",
multiple: false
},
ariaDescribedBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaDescribedBy"
},
ariaLabelledBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaLabelledBy"
}
},
events: {
beforeOpen: {},
afterOpen: {},
beforeClose: {
parameters: {
origin: {
type: "sap.m.Button"
}
}
},
afterClose: {
parameters: {
origin: {
type: "sap.m.Button"
}
}
}
}
}
});
f._bPaddingByDefault =
(sap.ui.getCore().getConfiguration().getCompatibilityVersion("sapMDialogWithPadding
").compareTo("1.16") < 0);
f._mStateClasses = {};
f._mStateClasses[V.None] = "";
f._mStateClasses[V.Success] = "sapMDialogSuccess";
f._mStateClasses[V.Warning] = "sapMDialogWarning";
f._mStateClasses[V.Error] = "sapMDialogError";
f._mIcons = {};
f._mIcons[V.Success] = a.getIconURI("message-success");
f._mIcons[V.Warning] = a.getIconURI("message-warning");
f._mIcons[V.Error] = a.getIconURI("message-error");
f.prototype.init = function() {
var t = this;
this._externalIcon = undefined;
this._oManuallySetSize = null;
this._oManuallySetPosition = null;
this._bRTL = sap.ui.getCore().getConfiguration().getRTL();
this._scrollContentList = ["NavContainer", "Page", "ScrollContainer",
"SplitContainer", "MultiInput"];
this.oPopup = new P();
this.oPopup.setShadow(true);
this.oPopup.setNavigationMode("SCOPE");
if (q.device.is.iphone && !this._bMessageType) {
this.oPopup.setModal(true, "sapMDialogTransparentBlk");
} else {
this.oPopup.setModal(true, "sapMDialogBlockLayerInit");
}
this.oPopup.setAnimations(q.proxy(this._openAnimation, this),
q.proxy(this._closeAnimation, this));
this.oPopup.onsapescape = q.proxy(function(e) {
if (e.originalEvent && e.originalEvent._sapui_handledByControl) {
return;
}
this.close();
e.stopPropagation();
}, this);
this.oPopup._applyPosition = function(p, F) {
t._setDimensions();
t._adjustScrollingPane();
p.at = {};
if (t._oManuallySetPosition) {
p.at.left = t._oManuallySetPosition.x;
p.at.top = t._oManuallySetPosition.y;
} else {
p.at.top = 'calc(50% + ' + (window.scrollY === undefined ?
window.pageYOffset : window.scrollY) + 'px)';
if (t._bRTL) {
p.at.left = 'auto';
} else {
p.at.left = 'calc(50% + ' + (window.scrollX === undefined ?
window.pageXOffset : window.scrollX) + 'px)';
}
}
t._deregisterContentResizeHandler();
P.prototype._applyPosition.call(this, p);
t._registerContentResizeHandler();
}
;
if (f._bPaddingByDefault) {
this.addStyleClass("sapUiPopupWithPadding");
}
}
;
f.prototype.onBeforeRendering = function() {
if (this._hasSingleScrollableContent()) {
this.setProperty("verticalScrolling", false);
this.setProperty("horizontalScrolling", false);
q.sap.log.info("VerticalScrolling and horizontalScrolling in
sap.m.Dialog with ID " + this.getId() + " has been disabled because there's
scrollable content inside");
} else if (!this._oScroller) {
this._oScroller = new S(this,this.getId() + "-scroll",{
horizontal: this.getHorizontalScrolling(),
vertical: this.getVerticalScrolling()
});
}
this._createToolbarButtons();
}
;
f.prototype.onAfterRendering = function() {
this._$scrollPane = this.$("scroll");
this._$content = this.$("cont");
this._$dialog = this.$();
if (this.isOpen()) {
this._setInitialFocus();
}
}
;
f.prototype.exit = function() {
I.removeDialogInstance(this);
this._deregisterContentResizeHandler();
this._deregisterResizeHandler();
if (this.oPopup) {
this.oPopup.detachOpened(this._handleOpened, this);
this.oPopup.detachClosed(this._handleClosed, this);
this.oPopup.destroy();
this.oPopup = null;
}
if (this._oScroller) {
this._oScroller.destroy();
this._oScroller = null;
}
if (this._header) {
this._header.destroy();
this._header = null;
}
if (this._headerTitle) {
this._headerTitle.destroy();
this._headerTitle = null;
}
if (this._iconImage) {
this._iconImage.destroy();
this._iconImage = null;
}
if (this._toolbarSpacer) {
this._toolbarSpacer.destroy();
this._toolbarSpacer = null;
}
}
;
f.prototype.open = function() {
var p = this.oPopup;
p.setInitialFocusId(this.getId());
var o = p.getOpenState();
switch (o) {
case sap.ui.core.OpenState.OPEN:
case sap.ui.core.OpenState.OPENING:
return this;
case sap.ui.core.OpenState.CLOSING:
this._bOpenAfterClose = true;
break;
default:
}
this._oCloseTrigger = null;
this.fireBeforeOpen();
p.attachOpened(this._handleOpened, this);
p.setContent(this);
p.open();
this._registerResizeHandler();
I.addDialogInstance(this);
return this;
}
;
f.prototype.close = function() {
this._bOpenAfterClose = false;
this.$().removeClass('sapDialogDisableTransition');
this._deregisterResizeHandler();
var p = this.oPopup;
var e = this.oPopup.getOpenState();
if (!(e === sap.ui.core.OpenState.CLOSED || e ===
sap.ui.core.OpenState.CLOSING)) {
sap.m.closeKeyboard();
this.fireBeforeClose({
origin: this._oCloseTrigger
});
p.attachClosed(this._handleClosed, this);
this._bDisableRepositioning = false;
this._oManuallySetPosition = null;
this._oManuallySetSize = null;
p.close();
this._deregisterContentResizeHandler();
}
return this;
}
;
f.prototype.isOpen = function() {
return this.oPopup && this.oPopup.isOpen();
}
;
f.prototype._handleOpened = function() {
this.oPopup.detachOpened(this._handleOpened, this);
this._setInitialFocus();
this.fireAfterOpen();
}
;
f.prototype._handleClosed = function() {
if (!this.oPopup) {
return;
}
this.oPopup.detachClosed(this._handleClosed, this);
if (this.getDomRef()) {
R.preserveContent(this.getDomRef());
this.$().remove();
}
I.removeDialogInstance(this);
this.fireAfterClose({
origin: this._oCloseTrigger
});
if (this._bOpenAfterClose) {
this._bOpenAfterClose = false;
this.open();
}
}
;
f.prototype.onfocusin = function(e) {
var s = e.target;
if (s.id === this.getId() + "-firstfe") {
var L = this.$("footer").lastFocusableDomRef() || this.$
("cont").lastFocusableDomRef() || (this.getSubHeader() && this.getSubHeader().$
().firstFocusableDomRef()) || (this._getAnyHeader() && this._getAnyHeader().$
().lastFocusableDomRef());
if (L) {
q.sap.focus(L);
}
} else if (s.id === this.getId() + "-lastfe") {
var F = (this._getAnyHeader() && this._getAnyHeader().$
().firstFocusableDomRef()) || (this.getSubHeader() && this.getSubHeader().$
().firstFocusableDomRef()) || this.$("cont").firstFocusableDomRef() || this.$
("footer").firstFocusableDomRef();
if (F) {
q.sap.focus(F);
}
}
}
;
f.prototype._openAnimation = function(r, i, o) {
q.sap.delayedCall(0, this, function() {
r.addClass("sapMDialogOpen");
});
if (d) {
r.fadeIn(200, o);
} else {
r.css("display", "block");
setTimeout(o, 210);
}
}
;
f.prototype._closeAnimation = function(r, i, e) {
r.removeClass("sapMDialogOpen");
if (d) {
r.fadeOut(200, e);
} else {
setTimeout(e, 210);
}
}
;
f.prototype._setDimensions = function() {
var $ = this.$()
, s = this.getStretch()
, e = this.getStretchOnPhone() && D.system.phone
, m = this._bMessageType
, o = {};
if (!s) {
if (!this._oManuallySetSize) {
o.width = this.getContentWidth() || undefined;
o.height = this.getContentHeight() || undefined;
} else {
o.width = this._oManuallySetSize.width;
o.height = this._oManuallySetSize.height;
}
}
if ((s && !m) || (e)) {
this.$().addClass('sapMDialogStretched');
}
$.css(o);
if (!s && !this._oManuallySetSize && !this._bDisableRepositioning) {
this._applyCustomTranslate();
}
if (window.navigator.userAgent.toLowerCase().indexOf("chrome") !== -1 &&
this.getStretch()) {
$.find('> footer').css({
bottom: '0.001px'
});
}
}
;
f.prototype._adjustScrollingPane = function() {
if (this._oScroller) {
this._oScroller.refresh();
}
}
;
f.prototype._reposition = function() {}
;
f.prototype._repositionAfterOpen = function() {}
;
f.prototype._reapplyPosition = function() {
this._adjustScrollingPane();
}
;
f.prototype._onResize = function() {
var $ = this.$(), e = this.$('cont'), i, h, j;
if (this._oManuallySetSize) {
return;
}
if (!this.getContentHeight()) {
e.css({
height: 'auto'
});
i = parseFloat($.height());
h = parseFloat($.css("border-top-width"));
j = parseFloat($.css("border-bottom-width"));
e.height(Math.round(i + h + j));
}
if (!this.getStretch() && !this._oManuallySetSize && !
this._bDisableRepositioning) {
this._applyCustomTranslate();
}
}
;
f.prototype._applyCustomTranslate = function() {
var $ = this.$(), t, s, i = $.innerWidth(), e = $.innerHeight();
if (D.system.desktop && (i % 2 !== 0 || e % 2 !== 0)) {
if (!this._bRTL) {
t = '-' + Math.floor(i / 2) + "px";
} else {
t = Math.floor(i / 2) + "px";
}
s = '-' + Math.floor(e / 2) + "px";
$.css('transform', 'translate(' + t + ',' + s + ') scale(1)');
} else {
$.css('transform', '');
}
}
;
f.prototype._createHeader = function() {
if (!this._header) {
this._header = new B(this.getId() + "-
header").addStyleClass("sapMDialogTitle");
this.setAggregation("_header", this._header, false);
}
}
;
f.prototype._hasSingleScrollableContent = function() {
var e = this.getContent(), i;
while (e.length === 1 && e[0]instanceof sap.ui.core.mvc.View) {
e = e[0].getContent();
}
if (e.length === 1) {
for (i = 0; i < this._scrollContentList.length; i++) {
if (e[0]instanceof sap.m[this._scrollContentList[i]]) {
return true;
}
}
}
return false;
}
;
f.prototype._initBlockLayerAnimation = function() {
this.oPopup._hideBlockLayer = function() {
var $ = q("#sap-ui-blocklayer-popup");
$.removeClass("sapMDialogTransparentBlk");
P.prototype._hideBlockLayer.call(this);
}
;
}
;
f.prototype._clearBlockLayerAnimation = function() {
if (q.device.is.iphone && !this._bMessageType) {
delete this.oPopup._showBlockLayer;
this.oPopup._hideBlockLayer = function() {
var $ = q("#sap-ui-blocklayer-popup");
$.removeClass("sapMDialogTransparentBlk");
P.prototype._hideBlockLayer.call(this);
}
;
}
}
;
f.prototype._getFocusId = function() {
return this.getInitialFocus() || this._getFirstFocusableContentSubHeader()
|| this._getFirstFocusableContentElementId() || this._getFirstVisibleButtonId() ||
this.getId();
}
;
f.prototype._getFirstVisibleButtonId = function() {
var o = this.getBeginButton()
, e = this.getEndButton()
, h = this.getButtons()
, s = "";
if (o && o.getVisible()) {
s = o.getId();
} else if (e && e.getVisible()) {
s = e.getId();
} else if (h && h.length > 0) {
for (var i = 0; i < h.length; i++) {
if (h[i].getVisible()) {
s = h[i].getId();
break;
}
}
}
return s;
}
;
f.prototype._getFirstFocusableContentSubHeader = function() {
var $ = this.$().find('.sapMDialogSubHeader');
var r;
var F = $.firstFocusableDomRef();
if (F) {
r = F.id;
}
return r;
}
;
f.prototype._getFirstFocusableContentElementId = function() {
var r = "";
var $ = this.$("cont");
var F = $.firstFocusableDomRef();
if (F) {
r = F.id;
}
return r;
}
;
f.prototype._setInitialFocus = function() {
var F = this._getFocusId();
var o = sap.ui.getCore().byId(F);
var e;
if (o) {
if (o.getVisible && !o.getVisible()) {
this.focus();
return;
}
e = o.getFocusDomRef();
}
e = e || q.sap.domById(F);
if (!e) {
this.setInitialFocus("");
e = sap.ui.getCore().byId(this._getFocusId());
}
if (!this.getInitialFocus()) {
this.setAssociation('initialFocus', e ? e.id : this.getId(), true);
}
if (D.system.desktop || (e && !/input|textarea|select/i.test(e.tagName))) {
q.sap.focus(e);
} else {
this.focus();
}
}
;
f.prototype.getScrollDelegate = function() {
return this._oScroller;
}
;
f.prototype._composeAggreNameInHeader = function(p) {
var h;
if (p === "Begin") {
h = "contentLeft";
} else if (p === "End") {
h = "contentRight";
} else {
h = "content" + p;
}
return h;
}
;
f.prototype._isToolbarEmpty = function() {
var e = this._oToolbar.getContent().filter(function(h) {
return h.getMetadata().getName() !== 'sap.m.ToolbarSpacer';
});
return e.length === 0;
}
;
f.prototype._setButton = function(o, p, s) {
return this;
}
;
f.prototype._getButton = function(p) {
var s = p.toLowerCase() + "Button"
, e = "_o" + this._firstLetterUpperCase(p) + "Button";
if (D.system.phone) {
return this.getAggregation(s, null, true);
} else {
return this[e];
}
}
;
f.prototype._getButtonFromHeader = function(p) {
if (this._header) {
var h = this._composeAggreNameInHeader(this._firstLetterUpperCase(p))
, e = this._header.getAggregation(h);
return e && e[0];
} else {
return null;
}
}
;
f.prototype._firstLetterUpperCase = function(v) {
return v.charAt(0).toUpperCase() + v.slice(1);
}
;
f.prototype._getAnyHeader = function() {
var o = this.getCustomHeader();
if (o) {
return o;
} else {
var s = this.getShowHeader();
if (!s) {
return null;
}
this._createHeader();
return this._header;
}
}
;
f.prototype._deregisterResizeHandler = function() {
if (this._resizeListenerId) {
c.deregister(this._resizeListenerId);
this._resizeListenerId = null;
}
D.resize.detachHandler(this._onResize, this);
}
;
f.prototype._registerResizeHandler = function() {
var _ = this.$("scroll");
this._resizeListenerId = c.register(_.get(0), q.proxy(this._onResize,
this));
D.resize.attachHandler(this._onResize, this);
this._onResize();
}
;
f.prototype._deregisterContentResizeHandler = function() {
if (this._sContentResizeListenerId) {
c.deregister(this._sContentResizeListenerId);
this._sContentResizeListenerId = null;
}
}
;
f.prototype._registerContentResizeHandler = function() {
if (!this._sContentResizeListenerId) {
this._sContentResizeListenerId =
c.register(this.getDomRef("scrollCont"), q.proxy(this._onResize, this));
}
this._onResize();
}
;
f.prototype._attachHandler = function(o) {
var t = this;
if (!this._oButtonDelegate) {
this._oButtonDelegate = {
ontap: function() {
t._oCloseTrigger = this;
}
};
}
if (o) {
o.addDelegate(this._oButtonDelegate, true, o);
}
}
;
f.prototype._createToolbarButtons = function() {
var t = this._getToolbar();
var e = this.getButtons();
var h = this.getBeginButton();
var i = this.getEndButton()
, j = this
, k = [h, i];
k.forEach(function(o) {
if (o && j._oButtonDelegate) {
o.removeDelegate(j._oButtonDelegate);
}
});
t.removeAllContent();
if (!("_toolbarSpacer"in this)) {
this._toolbarSpacer = new T();
}
t.addContent(this._toolbarSpacer);
k.forEach(function(o) {
j._attachHandler(o);
});
if (e && e.length) {
e.forEach(function(m) {
t.addContent(m);
});
} else {
if (h) {
t.addContent(h);
}
if (i) {
t.addContent(i);
}
}
}
;
f.prototype._getToolbar = function() {
if (!this._oToolbar) {
this._oToolbar = new A(this.getId() + "-
footer").addStyleClass("sapMTBNoBorders").applyTagAndContextClassFor("footer");
this._oToolbar._isControlsInfoCached = function() {
return false;
}
;
this.setAggregation("_toolbar", this._oToolbar);
}
return this._oToolbar;
}
;
f.prototype.setSubHeader = function(o) {
this.setAggregation("subHeader", o);
if (o) {
o.setVisible = function(i) {
this.$().toggleClass('sapMDialogWithSubHeader', i);
o.setProperty("visible", i);
}
.bind(this);
}
return o;
}
;
f.prototype.setLeftButton = function(v) {
if (!(v instanceof sap.m.Button)) {
v = sap.ui.getCore().byId(v);
}
this.setBeginButton(v);
return this.setAssociation("leftButton", v);
}
;
f.prototype.setRightButton = function(v) {
if (!(v instanceof sap.m.Button)) {
v = sap.ui.getCore().byId(v);
}
this.setEndButton(v);
return this.setAssociation("rightButton", v);
}
;
f.prototype.getLeftButton = function() {
var o = this.getBeginButton();
return o ? o.getId() : null;
}
;
f.prototype.getRightButton = function() {
var e = this.getEndButton();
return e ? e.getId() : null;
}
;
f.prototype.getAggregation = function(s, o, p) {
var e = C.prototype.getAggregation.apply(this,
Array.prototype.slice.call(arguments, 0, 2));
if (s === 'buttons' && e.length === 0) {
this.getBeginButton() && e.push(this.getBeginButton());
this.getEndButton() && e.push(this.getEndButton());
}
return e;
}
;
f.prototype.getAriaLabelledBy = function() {
var h = this._getAnyHeader()
, e = this.getAssociation("ariaLabelledBy", []).slice();
var s = this.getSubHeader();
if (s) {
e.unshift(s.getId());
}
if (h) {
e.unshift(h.getId());
}
return e;
}
;
f.prototype.setTitle = function(t) {
this.setProperty("title", t, true);
if (this._headerTitle) {
this._headerTitle.setText(t);
} else {
this._headerTitle = new sap.m.Title(this.getId() + "-title",{
text: t,
level: "H1"
}).addStyleClass("sapMDialogTitle");
this._createHeader();
this._header.addContentMiddle(this._headerTitle);
}
return this;
}
;
f.prototype.setCustomHeader = function(o) {
if (o) {
o.addStyleClass("sapMDialogTitle");
}
this.setAggregation("customHeader", o);
}
;
f.prototype.setState = function(s) {
var F = {}, $ = this.$(), n;
F[s] = true;
this.setProperty("state", s, true);
for (n in f._mStateClasses) {
$.toggleClass(f._mStateClasses[n], !!F[n]);
}
this.setIcon(f._mIcons[s], true);
}
;
f.prototype.setIcon = function(i, e) {
if (!e) {
this._externalIcon = i;
} else {
if (this._externalIcon) {
i = this._externalIcon;
}
}
if (i) {
if (i !== this.getIcon()) {
if (this._iconImage) {
this._iconImage.setSrc(i);
} else {
this._iconImage = a.createControlByURI({
id: this.getId() + "-icon",
src: i,
useIconTooltip: false
}, sap.m.Image).addStyleClass("sapMDialogIcon");
this._createHeader();
this._header.insertAggregation("contentMiddle",
this._iconImage, 0);
}
}
} else {
var s = this.getState();
if (!e && s !== V.None) {
if (this._iconImage) {
this._iconImage.setSrc(f._mIcons[s]);
}
} else {
if (this._iconImage) {
this._iconImage.destroy();
this._iconImage = null;
}
}
}
this.setProperty("icon", i, true);
return this;
}
;
f.prototype.setType = function(t) {
var o = this.getType();
if (o === t) {
return this;
}
this._bMessageType = (t === sap.m.DialogType.Message);
return this.setProperty("type", t, false);
}
;
f.prototype.setStretch = function(s) {
this._bStretchSet = true;
return this.setProperty("stretch", s);
}
;
f.prototype.setStretchOnPhone = function(s) {
if (this._bStretchSet) {
q.sap.log.warning("sap.m.Dialog: stretchOnPhone property is deprecated.
Setting stretchOnPhone property is ignored when there's already stretch property
set.");
return this;
}
this.setProperty("stretchOnPhone", s);
return this.setProperty("stretch", s && D.system.phone);
}
;
f.prototype.setVerticalScrolling = function(v) {
var o = this.getVerticalScrolling()
, h = this._hasSingleScrollableContent();
if (h) {
q.sap.log.warning("sap.m.Dialog: property verticalScrolling
automatically reset to false. See documentation.");
v = false;
}
if (o === v) {
return this;
}
this.$().toggleClass("sapMDialogVerScrollDisabled", !v);
this.setProperty("verticalScrolling", v);
if (this._oScroller) {
this._oScroller.setVertical(v);
}
return this;
}
;
f.prototype.setHorizontalScrolling = function(v) {
var o = this.getHorizontalScrolling()
, h = this._hasSingleScrollableContent();
if (h) {
q.sap.log.warning("sap.m.Dialog: property horizontalScrolling
automatically reset to false. See documentation.");
v = false;
}
if (o === v) {
return this;
}
this.$().toggleClass("sapMDialogHorScrollDisabled", !v);
this.setProperty("horizontalScrolling", v);
if (this._oScroller) {
this._oScroller.setHorizontal(v);
}
return this;
}
;
f.prototype.setInitialFocus = function(i) {
return this.setAssociation("initialFocus", i, true);
}
;
f.prototype.forceInvalidate = C.prototype.invalidate;
f.prototype.invalidate = function(o) {
if (this.isOpen()) {
this.forceInvalidate(o);
}
}
;
function g(e) {
var $ = q(e);
var o = $.control(0);
if (!o || o.getMetadata().getInterfaces().indexOf("sap.m.IBar") > -1) {
return true;
}
return $.hasClass('sapMDialogTitle');
}
if (D.system.desktop) {
f.prototype.ondblclick = function(e) {
if (g(e.target)) {
this._bDisableRepositioning = false;
this._oManuallySetPosition = null;
this._oManuallySetSize = null;
this.oPopup &&
this.oPopup._applyPosition(this.oPopup._oLastPosition, true);
this._$dialog.removeClass('sapMDialogTouched');
}
}
;
f.prototype.onmousedown = function(e) {
if (e.which === 3) {
return;
}
if (this.getStretch() || (!this.getDraggable() && !
this.getResizable())) {
return;
}
var t;
var h = this;
var $ = q(document);
var i = q(e.target);
var r = i.hasClass('sapMDialogResizeHandler') && this.getResizable();
var m = function(v) {
t = t ? clearTimeout(t) : setTimeout(function() {
v();
}, 0);
};
var j = 30;
var w = window.innerWidth;
var k = window.innerHeight;
var n = {
x: e.pageX,
y: e.pageY,
width: h._$dialog.width(),
height: h._$dialog.height(),
offset: {
x: e.offsetX ? e.offsetX : e.originalEvent.layerX,
y: e.offsetY ? e.offsetY : e.originalEvent.layerY
},
position: {
x: h._$dialog.offset().left,
y: h._$dialog.offset().top
}
};
function o() {
var v = h.$()
, x = h.$('cont');
$.off("mouseup.sapMDialog, mousemove.sapMDialog");
if (r) {
h._$dialog.removeClass('sapMDialogResizing');
x.height(parseInt(v.height(), 10) + parseInt(v.css("border-top-
width"), 10) + parseInt(v.css("border-bottom-width"), 10));
}
}
if ((g(e.target) && this.getDraggable()) || r) {
h._bDisableRepositioning = true;
h._$dialog.addClass('sapDialogDisableTransition');
h._$dialog.addClass('sapMDialogTouched');
h._oManuallySetPosition = {
x: n.position.x,
y: n.position.y
};
h._$dialog.css({
left: Math.min(Math.max(0, h._oManuallySetPosition.x), w - j),
top: Math.min(Math.max(0, h._oManuallySetPosition.y), k - j),
transform: ""
});
}
if (g(e.target) && this.getDraggable()) {
$.on("mousemove.sapMDialog", function(e) {
if (e.buttons === 0) {
o();
return;
}
m(function() {
h._bDisableRepositioning = true;
h._oManuallySetPosition = {
x: e.pageX - n.offset.x,
y: e.pageY - n.offset.y
};
h._$dialog.css({
left: Math.min(Math.max(0, h._oManuallySetPosition.x),
w - j),
top: Math.min(Math.max(0, h._oManuallySetPosition.y), k
- j),
transform: ""
});
});
});
} else if (r) {
h._$dialog.addClass('sapMDialogResizing');
var s = {};
var p = parseInt(h._$dialog.css('min-width'), 10);
var u = n.x + n.width - p;
h.$('cont').height('');
$.on("mousemove.sapMDialog", function(e) {
m(function() {
h._bDisableRepositioning = true;
h._oManuallySetSize = {
width: n.width + e.pageX - n.x,
height: n.height + e.pageY - n.y
};
if (h._bRTL) {
s.left = Math.min(Math.max(e.pageX, 0), u);
s.transform = "";
h._oManuallySetSize.width = n.width + n.x -
Math.max(e.pageX, 0);
}
s.width = h._oManuallySetSize.width;
s.height = h._oManuallySetSize.height;
h._$dialog.css(s);
});
});
} else {
return;
}
$.on("mouseup.sapMDialog", o);
e.preventDefault();
e.stopPropagation();
}
;
}
return f;
}, true);
sap.ui.predefine('sap/m/DialogRenderer', ['jquery.sap.global', './BarRenderer'],
function(q, B) {
"use strict";
var D = {};
D.render = function(r, c) {
var a = c.getId()
, t = c.getType()
, h = c._getAnyHeader()
, s = c.getSubHeader()
, m = (t === sap.m.DialogType.Message)
, l = c.getBeginButton()
, R = c.getEndButton()
, H = c.getHorizontalScrolling()
, v = c.getVerticalScrolling()
, S = c.getState()
, b = c.getStretch()
, d = c.getStretchOnPhone() && sap.ui.Device.system.phone
, e = c.getResizable()
, f = c.getDraggable();
if (h) {
h.applyTagAndContextClassFor("header");
}
if (s) {
s.applyTagAndContextClassFor("subheader");
}
var g = c.getContentWidth() ? ' width: ' + c.getContentWidth() + ';' : '';
var j = c.getContentHeight() ? ' height: ' + c.getContentHeight() + ';' :
'';
var k = "style='" + g + j + "'";
r.write('<div ' + k);
r.writeControlData(c);
r.addClass("sapMDialog");
r.addClass("sapMDialog-CTX");
r.addClass("sapMPopup-CTX");
if (c.isOpen()) {
r.addClass("sapMDialogOpen");
}
if (window.devicePixelRatio > 1) {
r.addClass("sapMDialogHighPixelDensity");
}
if (c._bDisableRepositioning) {
r.addClass("sapMDialogTouched");
}
if (b || (d)) {
r.addClass("sapMDialogStretched");
}
r.addClass(sap.m.Dialog._mStateClasses[S]);
var n = !c._oToolbar && !l && !R;
var o = c._oToolbar && c._isToolbarEmpty() && !l && !R;
if (n || o) {
r.addClass("sapMDialog-NoFooter");
}
if (!h) {
r.addClass("sapMDialog-NoHeader");
}
if (S === "Error" || S === "Warning") {
r.writeAccessibilityState(c, {
role: "alertdialog"
});
} else {
r.writeAccessibilityState(c, {
role: "dialog"
});
}
if (c._forceDisableScrolling) {
r.addClass("sapMDialogWithScrollCont");
}
if (s && s.getVisible()) {
r.addClass("sapMDialogWithSubHeader");
}
if (m) {
r.addClass("sapMMessageDialog");
}
if (!v) {
r.addClass("sapMDialogVerScrollDisabled");
}
if (!H) {
r.addClass("sapMDialogHorScrollDisabled");
}
if (sap.ui.Device.system.phone) {
r.addClass("sapMDialogPhone");
}
if (f && !b) {
r.addClass("sapMDialogDraggable");
}
if (sap.m._bSizeCompact) {
r.addClass("sapUiSizeCompact");
}
r.writeClasses();
var T = c.getTooltip_AsString();
if (T) {
r.writeAttributeEscaped("title", T);
}
r.writeAttribute("tabindex", "-1");
r.write(">");
if (sap.ui.Device.system.desktop) {
if (e && !b) {
r.write('<div class="sapMDialogResizeHandler"></div>');
}
r.write('<span id="' + c.getId() + '-firstfe" tabindex="0"/>');
}
if (h) {
r.renderControl(h);
}
if (s) {
r.renderControl(s.addStyleClass("sapMDialogSubHeader"));
}
r.write('<section id="' + a + '-cont" class="sapMDialogSection">');
r.write('<div id="' + a + '-scroll" class="sapMDialogScroll">');
r.write('<div id="' + a + '-scrollCont" class="sapMDialogScrollCont');
if (c.getStretch() || j) {
r.write(' sapMDialogStretchContent');
}
r.write('">');
var C = c.getContent();
for (var i = 0; i < C.length; i++) {
r.renderControl(C[i]);
}
r.write("</div>");
r.write("</div>");
r.write("</section>");
if (!(n || o)) {
r.renderControl(c._oToolbar);
}
if (sap.ui.Device.system.desktop) {
r.write('<span id="' + c.getId() + '-lastfe" tabindex="0"/>');
}
r.write("</div>");
}
;
return D;
}, true);
sap.ui.predefine('sap/m/FlexBox', ['jquery.sap.global', './FlexBoxStylingHelper',
'./library', 'sap/ui/core/Control'], function(q, F, l, C) {
"use strict";
var a = C.extend("sap.m.FlexBox", {
metadata: {
library: "sap.m",
properties: {
height: {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: ''
},
width: {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: ''
},
displayInline: {
type: "boolean",
group: "Appearance",
defaultValue: false
},
direction: {
type: "sap.m.FlexDirection",
group: "Appearance",
defaultValue: sap.m.FlexDirection.Row
},
fitContainer: {
type: "boolean",
group: "Appearance",
defaultValue: false
},
renderType: {
type: "sap.m.FlexRendertype",
group: "Misc",
defaultValue: sap.m.FlexRendertype.Div
},
justifyContent: {
type: "sap.m.FlexJustifyContent",
group: "Appearance",
defaultValue: sap.m.FlexJustifyContent.Start
},
alignItems: {
type: "sap.m.FlexAlignItems",
group: "Appearance",
defaultValue: sap.m.FlexAlignItems.Stretch
},
wrap: {
type: "sap.m.FlexWrap",
group: "Appearance",
defaultValue: sap.m.FlexWrap.NoWrap
},
alignContent: {
type: "sap.m.FlexAlignContent",
group: "Appearance",
defaultValue: sap.m.FlexAlignContent.Stretch
},
backgroundDesign: {
type: "sap.m.BackgroundDesign",
group: "Appearance",
defaultValue: sap.m.BackgroundDesign.Transparent
}
},
defaultAggregation: "items",
aggregations: {
items: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "item"
}
}
}
});
a.prototype.init = function() {
if (this instanceof sap.m.HBox && (this.getDirection() !==
sap.m.FlexDirection.Row || this.getDirection() !== sap.m.FlexDirection.RowReverse))
{
this.setDirection('Row');
}
if (this instanceof sap.m.VBox && (this.getDirection() !==
sap.m.FlexDirection.Column || this.getDirection() !==
sap.m.FlexDirection.ColumnReverse)) {
this.setDirection('Column');
}
}
;
a.prototype.addItem = function(i) {
this.addAggregation("items", i);
if (i && !(i instanceof sap.m.FlexBox)) {
i.attachEvent("_change", this.onItemChange, this);
}
return this;
}
;
a.prototype.insertItem = function(i, I) {
this.insertAggregation("items", i, I);
if (i && !(i instanceof sap.m.FlexBox)) {
i.attachEvent("_change", this.onItemChange, this);
}
return this;
}
;
a.prototype.removeItem = function(i) {
var I = this.removeAggregation("items", i, true);
if (I && !(I instanceof sap.m.FlexBox)) {
I.detachEvent("_change", this.onItemChange, this);
if (I instanceof sap.m.FlexBox) {
I.$().remove();
} else {
I.$().parent().remove();
}
}
return I;
}
;
a.prototype.removeAllItems = function() {
var I = this.getItems();
for (var i = 0; i < I.length; i++) {
I[i].detachEvent("_change", this.onItemChange, this);
}
return this.removeAllAggregation("items");
}
;
a.prototype.onItemChange = function(c) {
if (c.getParameter("name") !== "visible" || (this.getRenderType() !==
sap.m.FlexRendertype.List && this.getRenderType() !== sap.m.FlexRendertype.Div)) {
return;
}
var i = sap.ui.getCore().byId(c.getParameter("id"))
, w = null;
if (i.getLayoutData()) {
w = q.sap.byId(i.getLayoutData().getId());
} else {
w = q.sap.byId(sap.ui.core.RenderPrefixes.Invisible +
i.getId()).parent();
}
if (c.getParameter("newValue")) {
w.removeClass("sapUiHiddenPlaceholder").removeAttr("aria-hidden");
} else {
w.addClass("sapUiHiddenPlaceholder").attr("aria-hidden", "true");
}
}
;
a.prototype.setDisplayInline = function(i) {
this.setProperty("displayInline", i, true);
this.$().toggleClass("sapMFlexBoxInline", this.getDisplayInline());
return this;
}
;
a.prototype.setDirection = function(v) {
this.setProperty("direction", v, true);
if (this.getDirection() === sap.m.FlexDirection.Column ||
this.getDirection() === sap.m.FlexDirection.ColumnReverse) {
this.$().removeClass("sapMHBox").addClass("sapMVBox");
} else {
this.$().removeClass("sapMVBox").addClass("sapMHBox");
}
if (this.getDirection() === sap.m.FlexDirection.RowReverse ||
this.getDirection() === sap.m.FlexDirection.ColumnReverse) {
this.$().addClass("sapMFlexBoxReverse");
} else {
this.$().removeClass("sapMFlexBoxReverse");
}
return this;
}
;
a.prototype.setFitContainer = function(v) {
this.setProperty("fitContainer", v, true);
this.$().toggleClass("sapMFlexBoxFit", this.getFitContainer());
return this;
}
;
a.prototype.setWrap = function(v) {
var o = this.getWrap();
this.setProperty("wrap", v, true);
this.$().removeClass("sapMFlexBoxWrap" + o).addClass("sapMFlexBoxWrap" +
this.getWrap());
return this;
}
;
a.prototype.setJustifyContent = function(v) {
var o = this.getJustifyContent();
this.setProperty("justifyContent", v, true);
this.$().removeClass("sapMFlexBoxJustify" +
o).addClass("sapMFlexBoxJustify" + this.getJustifyContent());
return this;
}
;
a.prototype.setAlignItems = function(v) {
var o = this.getAlignItems();
this.setProperty("alignItems", v, true);
this.$().removeClass("sapMFlexBoxAlignItems" +
o).addClass("sapMFlexBoxAlignItems" + this.getAlignItems());
return this;
}
;
a.prototype.setAlignContent = function(v) {
var o = this.getAlignContent();
this.setProperty("alignContent", v, true);
this.$().removeClass("sapMFlexBoxAlignContent" +
o).addClass("sapMFlexBoxAlignContent" + this.getAlignContent());
return this;
}
;
a.prototype.setHeight = function(v) {
this.setProperty("height", v, true);
this.$().css("height", this.getHeight());
return this;
}
;
a.prototype.setWidth = function(v) {
this.setProperty("width", v, true);
this.$().css("width", this.getWidth());
return this;
}
;
a.prototype.setBackgroundDesign = function(v) {
var o = this.getBackgroundDesign();
this.setProperty("backgroundDesign", v, true);
this.$().removeClass("sapMFlexBoxBG" + o).addClass("sapMFlexBoxBG" +
this.getBackgroundDesign());
return this;
}
;
a.prototype.getAccessibilityInfo = function() {
var c = this.getItems();
var b = [];
for (var i = 0; i < c.length; i++) {
if (c[i].getAccessibilityInfo) {
var I = c[i].getAccessibilityInfo();
if (I) {
b.push(I);
}
}
}
return {
children: b
};
}
;
return a;
}, true);
sap.ui.predefine('sap/m/FlexBoxCssPropertyMap', ['jquery.sap.global'], function(q)
{
"use strict";
var F = {
'spec0907': {
'order': {
'<number>': {
'box-ordinal-group': '<integer>'
}
},
'flex-grow': {
'<number>': {
'box-flex': '<number>'
}
},
'flex-shrink': null,
'flex-basis': null
},
'specie10': {
'order': {
'<number>': {
'flex-order': '<number>'
}
},
'flex-grow': {
'<number>': {
'flex-positive': '<number>',
'flex-preferred-size': 'auto'
}
},
'flex-shrink': {
'<number>': {
'flex-negative': '<number>'
}
},
'flex-basis': {
'<number>': {
'flex-preferred-size': '<number>'
}
}
}
};
return F;
}, true);
sap.ui.predefine('sap/m/FlexBoxRenderer', ['jquery.sap.global',
'./FlexBoxStylingHelper'], function(q, F) {
"use strict";
if (!q.support.flexBoxLayout && !q.support.newFlexBoxLayout && !
q.support.ie10FlexBoxLayout) {
q.sap.log.warning("This browser does not support flexible box layouts
natively.");
}
var a = {};
a.render = function(r, c) {
if (c.getRenderType() === sap.m.FlexRendertype.List) {
r.write('<ul');
} else {
r.write('<div');
}
r.writeControlData(c);
var p = c.getParent();
if (c.getParent()instanceof sap.m.FlexBox) {
r.addClass("sapMFlexItem");
var l = c.getLayoutData();
if (l instanceof sap.m.FlexItemData) {
F.setFlexItemStyles(r, l);
}
if (p.getRenderType() === sap.m.FlexRendertype.List) {
r.write('<li');
}
} else if (c.getFitContainer()) {
r.addClass("sapMFlexBoxFit");
}
r.addClass("sapMFlexBox");
if (c.getDisplayInline()) {
r.addClass("sapMFlexBoxInline");
}
if (c.getDirection() === sap.m.FlexDirection.Column || c.getDirection() ===
sap.m.FlexDirection.ColumnReverse) {
r.addClass("sapMVBox");
} else {
r.addClass("sapMHBox");
}
if (c.getDirection() === sap.m.FlexDirection.RowReverse || c.getDirection()
=== sap.m.FlexDirection.ColumnReverse) {
r.addClass("sapMFlexBoxReverse");
}
r.addClass("sapMFlexBoxJustify" + c.getJustifyContent());
r.addClass("sapMFlexBoxAlignItems" + c.getAlignItems());
r.addClass("sapMFlexBoxWrap" + c.getWrap());
r.addClass("sapMFlexBoxAlignContent" + c.getAlignContent());
r.addClass("sapMFlexBoxBG" + c.getBackgroundDesign());
r.writeClasses();
if (c.getHeight()) {
r.addStyle("height", c.getHeight());
}
if (c.getWidth()) {
r.addStyle("width", c.getWidth());
}
r.writeStyles();
var t = c.getTooltip_AsString();
if (t) {
r.writeAttributeEscaped("title", t);
}
r.write(">");
a.renderItems(c, r);
if (c.getRenderType() === sap.m.FlexRendertype.List) {
r.write("</ul>");
} else {
r.write("</div>");
}
}
;
a.renderItems = function(c, r) {
var C = c.getItems()
, w = '';
for (var i = 0; i < C.length; i++) {
if (C[i]instanceof sap.m.FlexBox) {
w = "";
} else if (c.getRenderType() === sap.m.FlexRendertype.List) {
w = "li";
} else {
w = "div";
}
a.renderItem(C[i], w, r);
}
}
;
a.renderItem = function(i, w, r) {
if (w) {
r.write('<' + w);
var l = i.getLayoutData();
if (l instanceof sap.m.FlexItemData) {
if (l.getId()) {
r.writeAttributeEscaped("id", l.getId());
}
if (l.getStyleClass()) {
r.addClass(q.sap.encodeHTML(l.getStyleClass()));
}
r.addClass("sapMFlexItemAlign" + l.getAlignSelf());
r.addClass("sapMFlexBoxBG" + l.getBackgroundDesign());
F.setFlexItemStyles(r, l);
r.writeStyles();
if (i instanceof sap.m.ScrollContainer) {
r.addClass("sapMFlexBoxScroll");
}
if (!i.getVisible()) {
r.addClass("sapUiHiddenPlaceholder");
}
}
r.addClass("sapMFlexItem");
r.writeClasses();
r.write(">");
}
r.renderControl(i);
if (w) {
r.write('</' + w + '>');
}
}
;
return a;
}, true);
sap.ui.predefine('sap/m/FlexBoxStylingHelper', ['jquery.sap.global',
'./FlexBoxCssPropertyMap'], function(q, F) {
"use strict";
var a = {};
a.setFlexItemStyles = function(r, l) {
r = r || null;
var o = l.getOrder()
, g = l.getGrowFactor()
, s = l.getShrinkFactor()
, b = l.getBaseSize().toLowerCase()
, m = l.getMinHeight()
, M = l.getMaxHeight()
, c = l.getMinWidth()
, d = l.getMaxWidth();
if (o) {
a.setStyle(r, l, "order", o);
}
if (g != undefined) {
a.setStyle(r, l, "flex-grow", g);
}
if (q.support.newFlexBoxLayout || q.support.ie10FlexBoxLayout) {
if (s !== 1) {
a.setStyle(r, l, "flex-shrink", s);
}
if (b != undefined) {
a.setStyle(r, l, "flex-basis", b);
}
}
if (m != undefined) {
a.setStyle(r, l, "min-height", m);
}
if (M != undefined) {
a.setStyle(r, l, "max-height", M);
}
if (c != undefined) {
a.setStyle(r, l, "min-width", c);
}
if (d != undefined) {
a.setStyle(r, l, "max-width", d);
}
}
;
a.setStyle = function(r, l, p, v) {
if (typeof (v) === "string") {
v = v.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
}
if (q.support.flexBoxPrefixed) {
if (sap.ui.Device.browser.webkit) {
this.sVendorPrefix = "-webkit-";
} else if (sap.ui.Device.browser.mozilla) {
this.sVendorPrefix = "-moz-";
} else if (sap.ui.Device.browser.internet_explorer) {
this.sVendorPrefix = "-ms-";
}
} else {
this.sVendorPrefix = "";
}
if (q.support.newFlexBoxLayout || ["min-height", "max-height", "min-width",
"max-width"].indexOf(p) !== -1) {
a.writeStyle(r, l, p, v);
} else if (q.support.flexBoxLayout || q.support.ie10FlexBoxLayout) {
a.setOldSpecStyle(r, l, p, v);
}
}
;
a.setOldSpecStyle = function(r, l, p, v) {
var s = "";
if (this.sVendorPrefix == "-ms-") {
s = "specie10";
} else {
s = "spec0907";
}
if (F[s][p] !== null && F[s][p] !== "<idem>") {
var L = null;
if (typeof (F[s][p]) === "object") {
if (F[s][p]["<number>"]) {
L = {};
for (var k in F[s][p]["<number>"]) {
if (F[s][p]["<number>"][k] === "<number>") {
L[k] = v;
} else {
L[k] = F[s][p]["<number>"][k];
}
}
} else {
L = F[s][p][v];
}
} else {
L = F[s][p][v];
}
if (L !== null && L !== "<idem>") {
if (typeof (L) === "object") {
for (var b in L) {
a.writeStyle(r, l, b, L[b]);
}
}
}
}
}
;
a.writeStyle = function(r, l, p, v) {
var P = "";
var V = "";
if (p !== "display") {
P = this.sVendorPrefix;
} else {
V = this.sVendorPrefix;
}
if (sap.ui.Device.browser.internet_explorer && (p === "flex-basis" || p ===
"flex-preferred-size")) {
P = "";
if (l.getParent()) {
if (l.getParent().getParent().getDirection().indexOf("Row") > -1) {
p = "width";
} else {
p = "height";
}
}
}
if (r) {
r.addStyle(P + p, V + v);
} else {
l.$().css(P + p, V + v);
}
}
;
return a;
}, true);
sap.ui.predefine('sap/m/GenericTile', ['jquery.sap.global', './library',
'sap/ui/core/Control', 'sap/m/Text', 'sap/ui/core/HTML', 'sap/ui/core/Icon',
'sap/ui/core/IconPool'], function(q, l, C, T, H, I) {
"use strict";
var G = C.extend("sap.m.GenericTile", {
metadata: {
library: "sap.m",
properties: {
"mode": {
type: "sap.m.GenericTileMode",
group: "Appearance",
defaultValue: sap.m.GenericTileMode.ContentMode
},
"header": {
type: "string",
group: "Appearance",
defaultValue: null
},
"subheader": {
type: "string",
group: "Appearance",
defaultValue: null
},
"failedText": {
type: "string",
group: "Appearance",
defaultValue: null
},
"size": {
type: "sap.m.Size",
group: "Misc",
defaultValue: sap.m.Size.Auto
},
"frameType": {
type: "sap.m.FrameType",
group: "Misc",
defaultValue: sap.m.FrameType.OneByOne
},
"backgroundImage": {
type: "sap.ui.core.URI",
group: "Misc",
defaultValue: null
},
"headerImage": {
type: "sap.ui.core.URI",
group: "Misc",
defaultValue: null
},
"state": {
type: "sap.m.LoadState",
group: "Misc",
defaultValue: sap.m.LoadState.Loaded
},
"imageDescription": {
type: "string",
group: "Misc",
defaultValue: null
}
},
aggregations: {
"tileContent": {
type: "sap.m.TileContent",
multiple: true,
bindable: "bindable"
},
"icon": {
type: "sap.ui.core.Control",
multiple: false
},
"_titleText": {
type: "sap.m.Text",
multiple: false,
visibility: "hidden"
},
"_failedMessageText": {
type: "sap.m.Text",
multiple: false,
visibility: "hidden"
}
},
events: {
"press": {}
}
}
});
G.prototype.init = function() {
this._rb = sap.ui.getCore().getLibraryResourceBundle("sap.m");
this._oTitle = new T(this.getId() + "-title");
this._oTitle.addStyleClass("sapMGTTitle");
this._oTitle.cacheLineHeight = false;
this.setAggregation("_titleText", this._oTitle, true);
this._sFailedToLoad = this._rb.getText("INFOTILE_CANNOT_LOAD_TILE");
this._sLoading = this._rb.getText("INFOTILE_LOADING");
this._oFailedText = new T(this.getId() + "-failed-txt",{
maxLines: 2
});
this._oFailedText.cacheLineHeight = false;
this._oFailedText.addStyleClass("sapMGTFailed");
this.setAggregation("_failedMessageText", this._oFailedText, true);
this._oWarningIcon = new I(this.getId() + "-warn-icon",{
src: "sap-icon://notification",
size: "1.37rem"
});
this._oWarningIcon.addStyleClass("sapMGTFtrFldIcnMrk");
this._oBusy = new H(this.getId() + "-overlay");
this._oBusy.setBusyIndicatorDelay(0);
this._bThemeApplied = true;
if (!sap.ui.getCore().isInitialized()) {
this._bThemeApplied = false;
sap.ui.getCore().attachInit(this._handleCoreInitialized.bind(this));
} else {
this._handleCoreInitialized();
}
}
;
G.prototype._handleCoreInitialized = function() {
this._bThemeApplied = sap.ui.getCore().isThemeApplied();
if (!this._bThemeApplied) {
sap.ui.getCore().attachThemeChanged(this._handleThemeApplied, this);
}
}
;
G.prototype._handleThemeApplied = function() {
this._bThemeApplied = true;
this._oTitle.clampHeight();
sap.ui.getCore().detachThemeChanged(this._handleThemeApplied, this);
}
;
G.prototype.onBeforeRendering = function() {
var s = this.getSubheader() ? true : false;
if (this.getMode() === l.GenericTileMode.HeaderMode) {
this._applyHeaderMode(s);
} else {
this._applyContentMode(s);
}
var t = this.getTileContent().length;
for (var i = 0; i < t; i++) {
this.getTileContent()[i].setDisabled(this.getState() ==
sap.m.LoadState.Disabled);
}
this._generateFailedText();
this.$().unbind("mouseenter", this._updateAriaAndTitle);
}
;
G.prototype.onAfterRendering = function() {
this.$().bind("mouseenter", this._updateAriaAndTitle.bind(this));
}
;
G.prototype.exit = function() {
this._oWarningIcon.destroy();
if (this._oImage) {
this._oImage.destroy();
}
this._oBusy.destroy();
}
;
G.prototype.ontouchstart = function() {
if (this.$("hover-overlay").length > 0) {
this.$("hover-overlay").addClass("sapMGTPressActive");
}
if (sap.ui.Device.browser.internet_explorer && this.getState() !==
sap.m.LoadState.Disabled) {
this.$().focus();
}
}
;
G.prototype.ontouchcancel = function() {
if (this.$("hover-overlay").length > 0) {
this.$("hover-overlay").removeClass("sapMGTPressActive");
}
}
;
G.prototype.ontouchend = function() {
if (this.$("hover-overlay").length > 0) {
this.$("hover-overlay").removeClass("sapMGTPressActive");
}
if (sap.ui.Device.browser.internet_explorer && this.getState() !==
sap.m.LoadState.Disabled) {
this.$().focus();
}
}
;
G.prototype.ontap = function(e) {
if (this.getState() !== sap.m.LoadState.Disabled) {
if (sap.ui.Device.browser.internet_explorer) {
this.$().focus();
}
this.firePress();
e.preventDefault();
}
}
;
G.prototype.onkeydown = function(e) {
if (q.sap.PseudoEvents.sapselect.fnCheck(e) && this.getState() !==
sap.m.LoadState.Disabled) {
if (this.$("hover-overlay").length > 0) {
this.$("hover-overlay").addClass("sapMGTPressActive");
}
e.preventDefault();
}
}
;
G.prototype.onkeyup = function(e) {
if (q.sap.PseudoEvents.sapselect.fnCheck(e) && this.getState() !==
sap.m.LoadState.Disabled) {
if (this.$("hover-overlay").length > 0) {
this.$("hover-overlay").removeClass("sapMGTPressActive");
}
this.firePress();
e.preventDefault();
}
}
;
G.prototype.getHeader = function() {
return this._oTitle.getText();
}
;
G.prototype.setHeader = function(t) {
this._oTitle.setText(t);
return this;
}
;
G.prototype.setHeaderImage = function(u) {
var v = !q.sap.equal(this.getHeaderImage(), u);
if (v) {
if (this._oImage) {
this._oImage.destroy();
this._oImage = undefined;
}
if (u) {
this._oImage = sap.ui.core.IconPool.createControlByURI({
id: this.getId() + "-icon-image",
src: u
}, sap.m.Image);
this._oImage.addStyleClass("sapMGTHdrIconImage");
}
}
return this.setProperty("headerImage", u);
}
;
G.prototype._applyHeaderMode = function(s) {
if (s) {
this._oTitle.setMaxLines(4);
} else {
this._oTitle.setMaxLines(5);
}
this._changeTileContentContentVisibility(false);
}
;
G.prototype._applyContentMode = function(s) {
if (s) {
this._oTitle.setMaxLines(2);
} else {
this._oTitle.setMaxLines(3);
}
this._changeTileContentContentVisibility(true);
}
;
G.prototype._changeTileContentContentVisibility = function(v) {
var t;
t = this.getTileContent();
for (var i = 0; i < t.length; i++) {
t[i].setRenderContent(v);
}
}
;
G.prototype._getHeaderAriaAndTooltipText = function() {
var t = "";
var i = true;
if (this.getHeader()) {
t += this.getHeader();
i = false;
}
if (this.getSubheader()) {
t += (i ? "" : "\n") + this.getSubheader();
i = false;
}
if (this.getImageDescription()) {
t += (i ? "" : "\n") + this.getImageDescription();
}
return t;
}
;
G.prototype._getContentAriaAndTooltipText = function() {
var t = "";
var b = true;
var a = this.getTileContent();
for (var i = 0; i < a.length; i++) {
if (q.isFunction(a[i]._getAriaAndTooltipText)) {
t += (b ? "" : "\n") + a[i]._getAriaAndTooltipText();
} else if (a[i].getTooltip_AsString()) {
t += (b ? "" : "\n") + a[i].getTooltip_AsString();
}
b = false;
}
return t;
}
;
G.prototype._getAriaAndTooltipText = function() {
var a = (this.getTooltip_AsString() && !this._isTooltipSuppressed()) ?
this.getTooltip_AsString() : (this._getHeaderAriaAndTooltipText() + "\n" +
this._getContentAriaAndTooltipText());
switch (this.getState()) {
case sap.m.LoadState.Disabled:
return "";
case sap.m.LoadState.Loading:
return a + "\n" + this._sLoading;
case sap.m.LoadState.Failed:
return a + "\n" + this._oFailedText.getText();
default:
if (q.trim(a).length === 0) {
return "";
} else {
return a;
}
}
}
;
G.prototype._getAriaText = function() {
var a = this.getTooltip_Text();
if (!a || this._isTooltipSuppressed()) {
a = this._getAriaAndTooltipText();
}
return a;
}
;
G.prototype._getTooltipText = function() {
var t = this.getTooltip_Text();
if (!t) {
t = this._getAriaText();
} else if (this._isTooltipSuppressed() === true) {
t = null;
}
return t;
}
;
G.prototype._checkFooter = function(t, c) {
if (c.getProperty("state") === sap.m.LoadState.Failed) {
t.setRenderFooter(false);
} else {
t.setRenderFooter(true);
}
}
;
G.prototype._generateFailedText = function() {
var c = this.getFailedText();
var f = c ? c : this._sFailedToLoad;
this._oFailedText.setText(f);
this._oFailedText.setTooltip(f);
}
;
G.prototype._isTooltipSuppressed = function() {
var t = this.getTooltip_Text();
if (t && t.length > 0 && q.trim(t).length === 0) {
return true;
} else {
return false;
}
}
;
G.prototype._updateAriaAndTitle = function() {
var a = this._getAriaAndTooltipText();
var t = this._getTooltipText();
var A = this._getAriaText();
var $ = this.$();
if ($.attr("title") !== a) {
$.attr("aria-label", A).attr("title", t);
}
$.find('*').removeAttr("aria-
label").removeAttr("title").unbind("mouseenter");
}
;
return G;
}, true);
sap.ui.predefine('sap/m/GenericTileRenderer', [], function() {
"use strict";
var G = {};
G.render = function(r, c) {
var t = c._getTooltipText();
var a = c._getAriaText();
var h = c.getHeaderImage();
var H = c.hasListeners("press");
r.write("<div");
r.writeControlData(c);
if (t) {
r.writeAttributeEscaped("title", t);
}
r.addClass("sapMGT");
r.addClass(c.getFrameType());
if (H) {
r.writeAttribute("role", "button");
} else {
r.writeAttribute("role", "presentation");
}
r.writeAttributeEscaped("aria-label", a);
if (c.getState() !== sap.m.LoadState.Disabled) {
r.addClass("sapMPointer");
r.writeAttribute("tabindex", "0");
}
if (c.getBackgroundImage()) {
r.write(" style='background-image:url(");
r.writeEscaped(c.getBackgroundImage());
r.write(");'");
r.addClass("sapMGTBackgroundImage");
}
if (c.getMode() === sap.m.GenericTileMode.HeaderMode) {
r.addClass("sapMGTHeaderMode");
}
r.writeClasses();
r.write(">");
if (c.getState() !== sap.m.LoadState.Loaded) {
this._renderStateOverlay(r, c, t);
} else {
this._renderHoverOverlay(r, c);
}
this._renderFocusDiv(r, c);
r.write("<div");
r.addClass("sapMGTHdrContent");
r.addClass(c.getFrameType());
if (t) {
r.writeAttributeEscaped("title", t);
}
r.writeClasses();
r.write(">");
if (h) {
r.renderControl(c._oImage);
}
this._renderHeader(r, c);
if (c.getSubheader()) {
this._renderSubheader(r, c);
}
r.write("</div>");
r.write("<div");
r.addClass("sapMGTContent");
r.writeClasses();
r.writeAttribute("id", c.getId() + "-content");
r.write(">");
var T = c.getTileContent();
var l = T.length;
for (var i = 0; i < l; i++) {
c._checkFooter(T[i], c);
r.renderControl(T[i]);
}
r.write("</div>");
r.write("</div>");
}
;
G._renderFocusDiv = function(r, c) {
r.write("<div");
r.addClass("sapMGTFocusDiv");
r.writeClasses();
r.writeAttribute("id", c.getId() + "-focus");
r.write(">");
r.write("</div>");
}
;
G._renderStateOverlay = function(r, c, t) {
var s = c.getState();
r.write("<div");
r.addClass("sapMGTOverlay");
r.writeClasses();
r.writeAttribute("id", c.getId() + "-overlay");
if (t) {
r.writeAttributeEscaped("title", t);
}
r.write(">");
switch (s) {
case sap.m.LoadState.Loading:
c._oBusy.setBusy(s == sap.m.LoadState.Loading);
r.renderControl(c._oBusy);
break;
case sap.m.LoadState.Failed:
r.write("<div");
r.writeAttribute("id", c.getId() + "-failed-ftr");
r.addClass("sapMGenericTileFtrFld");
r.writeClasses();
r.write(">");
r.write("<div");
r.writeAttribute("id", c.getId() + "-failed-icon");
r.addClass("sapMGenericTileFtrFldIcn");
r.writeClasses();
r.write(">");
r.renderControl(c._oWarningIcon);
r.write("</div>");
r.write("<div");
r.writeAttribute("id", c.getId() + "-failed-text");
r.addClass("sapMGenericTileFtrFldTxt");
r.writeClasses();
r.write(">");
r.renderControl(c.getAggregation("_failedMessageText"));
r.write("</div>");
r.write("</div>");
break;
default:
}
r.write("</div>");
}
;
G._renderHoverOverlay = function(r, c) {
r.write("<div");
if (c.getBackgroundImage()) {
r.addClass("sapMGTWithImageHoverOverlay");
} else {
r.addClass("sapMGTWithoutImageHoverOverlay");
}
r.writeClasses();
r.writeAttribute("id", c.getId() + "-hover-overlay");
r.write(">");
r.write("</div>");
}
;
G._renderHeader = function(r, c) {
r.write("<div");
r.addClass("sapMGTHdrTxt");
r.writeClasses();
r.writeAttribute("id", c.getId() + "-hdr-text");
r.write(">");
r.renderControl(c._oTitle);
r.write("</div>");
}
;
G._renderSubheader = function(r, c) {
r.write("<div");
r.addClass("sapMGTSubHdrTxt");
r.writeClasses();
r.writeAttribute("id", c.getId() + "-subHdr-text");
r.write(">");
r.writeEscaped(c.getSubheader());
r.write("</div>");
}
;
return G;
}, true);
sap.ui.predefine('sap/m/GroupHeaderListItem', ['jquery.sap.global',
'./ListItemBase', './library'], function(q, L, l) {
"use strict";
var G = L.extend("sap.m.GroupHeaderListItem", {
metadata: {
library: "sap.m",
properties: {
title: {
type: "string",
group: "Data",
defaultValue: null
},
count: {
type: "string",
group: "Data",
defaultValue: null
},
upperCase: {
type: "boolean",
group: "Appearance",
defaultValue: true
},
titleTextDirection: {
type: "sap.ui.core.TextDirection",
group: "Appearance",
defaultValue: sap.ui.core.TextDirection.Inherit
}
}
}
});
G.prototype.getMode = function() {
return sap.m.ListMode.None;
}
;
G.prototype.shouldClearLastValue = function() {
return true;
}
;
G.prototype.getTable = function() {
var p = this.getParent();
if (p instanceof sap.m.Table) {
return p;
}
if (p && p.getMetadata().getName() == "sap.m.Table") {
return p;
}
}
;
G.prototype.onBeforeRendering = function() {
var p = this.getParent();
if (p && sap.m.Table && p instanceof sap.m.Table) {
p.getColumns().forEach(function(c) {
c.clearLastValue();
});
}
}
;
return G;
}, true);
sap.ui.predefine('sap/m/GroupHeaderListItemRenderer', ['jquery.sap.global',
'./ListItemBaseRenderer', 'sap/ui/core/Renderer'], function(q, L, R) {
"use strict";
var G = R.extend(L);
G.openItemTag = function(r, l) {
r.write(l.getTable() ? "<tr" : "<li");
}
;
G.closeItemTag = function(r, l) {
r.write(l.getTable() ? "</tr>" : "</li>");
}
;
G.renderType = function(r, l) {
var t = l.getTable();
t && r.write('<td role="gridcell" class="sapMListTblNavCol">');
L.renderType.apply(this, arguments);
t && r.write('</td>');
}
;
G.handleNoFlex = function(r, l) {}
;
G.renderCounter = function(r, l) {}
;
G.getAriaRole = function(l) {
return l.getTable() ? "row" : "option";
}
;
G.getAriaDescribedBy = function(l) {
var d = this.getAriaAnnouncement("group_header")
, b = L.getAriaDescribedBy.call(this, l) || "";
return d + " " + b;
}
;
G.renderLIAttributes = function(r, l) {
r.addClass("sapMGHLI");
if (l.getUpperCase()) {
r.addClass("sapMGHLIUpperCase");
}
}
;
G.renderLIContentWrapper = function(r, l) {
var t = l.getTable();
if (t) {
r.write('<td class="sapMGHLICell" role="gridcell"');
r.writeAttribute("colspan", t.getColSpan());
r.write(">");
}
L.renderLIContentWrapper.apply(this, arguments);
if (t) {
r.write("</td>");
}
}
;
G.renderLIContent = function(r, l) {
var t = l.getTitleTextDirection();
r.write("<label class='sapMGHLITitle'");
if (t != sap.ui.core.TextDirection.Inherit) {
r.writeAttribute("dir", t.toLowerCase());
}
r.write(">");
r.writeEscaped(l.getTitle());
var c = l.getCount();
if (c) {
r.writeEscaped(" (" + c + ")");
}
r.write("</label>");
}
;
G.addLegacyOutlineClass = function(r, l) {
if (!l.getTable()) {
L.addLegacyOutlineClass.apply(this, arguments);
}
}
;
return G;
}, true);
sap.ui.predefine('sap/m/Image', ['jquery.sap.global', './library',
'sap/ui/core/Control'], function(q, l, C) {
"use strict";
var I = C.extend("sap.m.Image", {
metadata: {
library: "sap.m",
properties: {
src: {
type: "sap.ui.core.URI",
group: "Data",
defaultValue: null
},
width: {
type: "sap.ui.core.CSSSize",
group: "Appearance",
defaultValue: null
},
height: {
type: "sap.ui.core.CSSSize",
group: "Appearance",
defaultValue: null
},
decorative: {
type: "boolean",
group: "Accessibility",
defaultValue: true
},
alt: {
type: "string",
group: "Accessibility",
defaultValue: null
},
useMap: {
type: "string",
group: "Misc",
defaultValue: null
},
densityAware: {
type: "boolean",
group: "Misc",
defaultValue: true
},
activeSrc: {
type: "sap.ui.core.URI",
group: "Data",
defaultValue: ""
},
mode: {
type: "sap.m.ImageMode",
group: "Misc",
defaultValue: "Image"
},
backgroundSize: {
type: "string",
group: "Appearance",
defaultValue: "cover"
},
backgroundPosition: {
type: "string",
group: "Appearance",
defaultValue: "initial"
},
backgroundRepeat: {
type: "string",
group: "Appearance",
defaultValue: "no-repeat"
}
},
events: {
tap: {},
press: {},
load: {},
error: {}
}
}
});
I._currentDevicePixelRatio = (function() {
var r = (window.devicePixelRatio === undefined ? 1 :
window.devicePixelRatio);
if (r <= 1) {
r = 1;
} else {
r *= 2;
r = Math.round(r);
r /= 2;
}
if (r > 2) {
r = 2;
}
return r;
}());
I.prototype.onload = function(e) {
if (!this._defaultEventTriggered) {
this._defaultEventTriggered = true;
}
this._bVersion2Tried = false;
var d = this.$()
, D = d[0];
if (this.getMode() === sap.m.ImageMode.Background) {
d.css("background-image", "url(" + this._oImage.src + ")");
}
if (!this._isWidthOrHeightSet()) {
if (this._iLoadImageDensity > 1) {
if ((d.width() === D.naturalWidth) && (d.height() ===
D.naturalHeight)) {
d.width(d.width() / this._iLoadImageDensity);
}
}
}
d.removeClass("sapMNoImg");
this.fireLoad();
}
;
I.prototype.onerror = function(e) {
if (!this._defaultEventTriggered) {
this._defaultEventTriggered = true;
}
var D = this.$()
, m = this.getMode()
, s = (m === sap.m.ImageMode.Image) ? D.attr("src") : this._oImage.src
, d = I._currentDevicePixelRatio
, c = this._isActiveState ? this.getActiveSrc() : this.getSrc();
D.addClass("sapMNoImg");
if (!s || this._iLoadImageDensity === 1) {
D.removeClass("sapMNoImg");
this.fireError();
return;
}
if (d === 2 || d < 1) {
this._iLoadImageDensity = 1;
this._updateDomSrc(this._generateSrcByDensity(c, 1));
} else if (d === 1.5) {
if (this._bVersion2Tried) {
setTimeout(q.proxy(function() {
this._iLoadImageDensity = 1;
this._updateDomSrc(this._generateSrcByDensity(c, 1));
}, this), 0);
} else {
setTimeout(q.proxy(function() {
this._iLoadImageDensity = 2;
this._updateDomSrc(this._generateSrcByDensity(c, 2));
this._bVersion2Tried = true;
}, this), 0);
}
}
}
;
I.prototype.onBeforeRendering = function() {
this._defaultEventTriggered = false;
}
;
I.prototype.onAfterRendering = function() {
var d = this.$(), m = this.getMode(), D;
if (m === sap.m.ImageMode.Image) {
d.on("load", q.proxy(this.onload, this));
d.on("error", q.proxy(this.onerror, this));
D = d[0];
}
if (m === sap.m.ImageMode.Background) {
D = this._oImage;
}
if (D && D.complete && !this._defaultEventTriggered) {
if (D.naturalWidth > 0) {
this.onload({});
} else {
this.onerror({});
}
}
}
;
I.prototype.exit = function() {
if (this._oImage) {
q(this._oImage).off("load", this.onload).off("error", this.onerror);
this._oImage = null;
} else {
this.$().off("load", this.onload).off("error", this.onerror);
}
}
;
I.prototype.ontouchstart = function(e) {
if (e.srcControl.mEventRegistry["press"] ||
e.srcControl.mEventRegistry["tap"]) {
e.setMarked();
}
if (e.targetTouches.length === 1 && this.getActiveSrc()) {
this._updateDomSrc(this._getDensityAwareActiveSrc());
this._isActiveState = true;
}
}
;
I.prototype.ontouchend = function(e) {
if (e.targetTouches.length === 0 && this.getActiveSrc()) {
this._isActiveState = false;
this._updateDomSrc(this._getDensityAwareSrc());
this.$().removeClass("sapMNoImg");
}
}
;
I.prototype.setSrc = function(s) {
if (s === this.getSrc()) {
return this;
}
this.setProperty("src", s, true);
var d = this.getDomRef();
if (d) {
this._updateDomSrc(this._getDensityAwareSrc());
}
return this;
}
;
I.prototype.setActiveSrc = function(a) {
if (!a) {
a = "";
}
this.setProperty("activeSrc", a, true);
}
;
I.prototype.attachPress = function() {
Array.prototype.unshift.apply(arguments, ["press"]);
sap.ui.core.Control.prototype.attachEvent.apply(this, arguments);
if (this.hasListeners("press")) {
this.$().attr("tabindex", "0");
this.$().attr("role", "button");
}
return this;
}
;
I.prototype.detachPress = function() {
Array.prototype.unshift.apply(arguments, ["press"]);
sap.ui.core.Control.prototype.detachEvent.apply(this, arguments);
if (!this.hasListeners("press")) {
this.$().removeAttr("tabindex");
if (this.getDecorative()) {
this.$().attr("role", "presentation");
} else {
this.$().removeAttr("role");
}
}
return this;
}
;
I.prototype.ontap = function(e) {
this.fireTap({});
this.firePress({});
}
;
I.prototype.onkeyup = function(e) {
if (e.which === q.sap.KeyCodes.SPACE || e.which === q.sap.KeyCodes.ENTER) {
this.firePress({});
e.stopPropagation();
}
}
;
I.prototype._updateDomSrc = function(s) {
var d = this.$()
, m = this.getMode();
if (d.length) {
if (m === sap.m.ImageMode.Image) {
d.attr("src", s);
} else {
d.addClass("sapMNoImg");
q(this._oImage).attr("src", s);
}
}
}
;
I.prototype._preLoadImage = function(s) {
if (this.getMode() !== sap.m.ImageMode.Background) {
return;
}
var i = q(this._oImage);
if (!this._oImage) {
this._oImage = new window.Image();
i = q(this._oImage);
i.on("load", q.proxy(this.onload, this)).on("error",
q.proxy(this.onerror, this));
}
this._oImage.src = s;
}
;
I.prototype._isWidthOrHeightSet = function() {
return (this.getWidth() && this.getWidth() !== '') || (this.getHeight() &&
this.getHeight() !== '');
}
;
I.prototype._getDensityAwareSrc = function() {
var s = this.getSrc()
, D = this.getDensityAware()
, d = D ? I._currentDevicePixelRatio : 1;
this._iLoadImageDensity = d;
if (d === 1) {
return s;
}
return this._generateSrcByDensity(s, d);
}
;
I.prototype._getDensityAwareActiveSrc = function() {
var a = this.getActiveSrc()
, D = this.getDensityAware()
, d = D ? I._currentDevicePixelRatio : 1;
this._iLoadImageDensity = d;
if (d === 1) {
return a;
}
return this._generateSrcByDensity(a, d);
}
;
I.prototype._generateSrcByDensity = function(s, d) {
if (!s) {
return "";
}
if (this._isDataUri(s)) {
this._iLoadImageDensity = 1;
return s;
}
if (d === 1) {
return s;
}
var L = s.lastIndexOf(".")
, i = s.lastIndexOf("/")
, n = s.substring(0, L)
, e = s.substring(L);
if (L === -1 || (i > L)) {
return s + "@" + d;
}
n = n + "@" + d;
return n + e;
}
;
I.prototype._isDataUri = function(s) {
return s ? s.indexOf("data:") === 0 : false;
}
;
I.prototype.getAccessibilityInfo = function() {
var h = this.hasListeners("press");
if (this.getDecorative() && !this.getUseMap() && !h) {
return null;
}
return {
role: h ? "button" : "img",
type: sap.ui.getCore().getLibraryResourceBundle("sap.m").getText(h ?
"ACC_CTR_TYPE_BUTTON" : "ACC_CTR_TYPE_IMAGE"),
description: this.getAlt() || this.getTooltip_AsString() || "",
focusable: h
};
}
;
return I;
}, true);
sap.ui.predefine('sap/m/ImageContent', ['jquery.sap.global', './library',
'sap/ui/core/Control', 'sap/m/Image', 'sap/ui/core/IconPool'], function(q, l, C, I,
a) {
"use strict";
var b = C.extend("sap.m.ImageContent", {
metadata: {
library: "sap.m",
properties: {
"src": {
type: "sap.ui.core.URI",
group: "Appearance",
defaultValue: null
},
"description": {
type: "string",
group: "Accessibility",
defaultValue: null
}
},
defaultAggregation: "_content",
aggregations: {
"_content": {
type: "sap.ui.core.Control",
multiple: false,
visibility: "hidden"
}
},
events: {
"press": {}
}
}
});
b.prototype.onBeforeRendering = function() {
var i, u, d;
i = this.getAggregation("_content");
u = this.getSrc();
d = this.getDescription();
if (!i || u !== i.getSrc() || d !== i.getAlt()) {
if (i) {
i.destroy();
i = null;
}
i = a.createControlByURI({
id: this.getId() + "-icon-image",
src: u,
alt: d,
decorative: false
}, I);
this.setAggregation("_content", i, true);
this._setPointerOnImage();
}
if (d) {
this.setTooltip(d.trim());
}
}
;
b.prototype._setPointerOnImage = function() {
var i = this.getAggregation("_content");
if (i && this.hasListeners("press")) {
i.addStyleClass("sapMPointer");
} else if (i && i.hasStyleClass("sapMPointer")) {
i.removeStyleClass("sapMPointer");
}
}
;
b.prototype.ontap = function(e) {
if (sap.ui.Device.browser.internet_explorer) {
this.$().focus();
}
this.firePress();
}
;
b.prototype.onkeydown = function(e) {
if (e.which === q.sap.KeyCodes.ENTER || e.which === q.sap.KeyCodes.SPACE) {
this.firePress();
e.preventDefault();
}
}
;
b.prototype.attachEvent = function(e, d, f, c) {
sap.ui.core.Control.prototype.attachEvent.call(this, e, d, f, c);
if (this.hasListeners("press")) {
this.$().attr("tabindex", 0).addClass("sapMPointer");
this._setPointerOnImage();
}
return this;
}
;
b.prototype.detachEvent = function(e, f, c) {
sap.ui.core.Control.prototype.detachEvent.call(this, e, f, c);
if (!this.hasListeners("press")) {
this.$().removeAttr("tabindex").removeClass("sapMPointer");
this._setPointerOnImage();
}
return this;
}
;
b.prototype.getAltText = function() {
var c = this.getAggregation("_content");
if (c && c.getAlt() !== "") {
return c.getAlt();
} else if (c) {
return c.getAccessibilityInfo().description;
}
}
;
return b;
});
sap.ui.predefine('sap/m/ImageContentRenderer', [], function() {
"use strict";
var I = {};
I.render = function(r, c) {
r.write("<div");
r.writeControlData(c);
r.addClass("sapMImageContent");
var t = c.getTooltip_AsString();
if (t) {
r.writeAttributeEscaped("title", t);
}
if (c.hasListeners("press")) {
r.addClass("sapMPointer");
r.writeAttribute("tabindex", "0");
}
r.writeClasses();
r.write(">");
var C = c.getAggregation("_content");
if (C) {
C.addStyleClass("sapMImageContentImageIcon");
r.renderControl(C);
}
r.write("</div>");
}
;
return I;
}, true);
sap.ui.predefine('sap/m/ImageRenderer', ['jquery.sap.global'], function(q) {
"use strict";
var I = {};
I.render = function(r, i) {
var m = i.getMode()
, a = i.getAlt()
, t = i.getTooltip_AsString()
, h = i.hasListeners("press");
r.write(m === sap.m.ImageMode.Image ? "<img" : "<span");
r.writeControlData(i);
if (m === sap.m.ImageMode.Image) {
r.writeAttributeEscaped("src", i._getDensityAwareSrc());
} else {
i._preLoadImage(i._getDensityAwareSrc());
r.addStyle("background-size", q.sap.encodeHTML(i.getBackgroundSize()));
r.addStyle("background-position",
q.sap.encodeHTML(i.getBackgroundPosition()));
r.addStyle("background-repeat",
q.sap.encodeHTML(i.getBackgroundRepeat()));
}
r.addClass("sapMImg");
if (i.hasListeners("press") || i.hasListeners("tap")) {
r.addClass("sapMPointer");
}
if (i.getUseMap() || !i.getDecorative()) {
r.addClass("sapMImgFocusable");
}
r.writeClasses();
var u = i.getUseMap();
if (u) {
if (!(q.sap.startsWith(u, "#"))) {
u = "#" + u;
}
r.writeAttributeEscaped("useMap", u);
}
if (i.getDecorative() && !u && !h) {
r.writeAttribute("role", "presentation");
r.writeAttribute("aria-hidden", "true");
r.write(" alt=''");
} else {
if (a || t) {
r.writeAttributeEscaped("alt", a || t);
}
}
if (a || t) {
r.writeAttributeEscaped("aria-label", a || t);
}
if (t) {
r.writeAttributeEscaped("title", t);
}
if (h) {
r.writeAttribute("role", "button");
r.writeAttribute("tabIndex", 0);
}
if (i.getWidth() && i.getWidth() != '') {
r.addStyle("width", i.getWidth());
}
if (i.getHeight() && i.getHeight() != '') {
r.addStyle("height", i.getHeight());
}
r.writeStyles();
r.write(" />");
}
;
return I;
}, true);
sap.ui.predefine('sap/m/InstanceManager', ['jquery.sap.global'], function(q) {
"use strict";
var I = {};
(function() {
var r = {}
, e = [];
var p = "_POPOVER_"
, d = "_DIALOG_";
I.addInstance = function(c, i) {
if (!r[c]) {
r[c] = [];
}
if (r[c].indexOf(i) === -1) {
r[c].push(i);
}
return this;
}
;
I.removeInstance = function(c, o) {
var C = r[c], i;
if (!C) {
q.sap.log.warning("Can't remove control from a non-managed category
id: " + c);
return null;
}
i = C.indexOf(o);
return (i === -1) ? null : C.splice(i, 1);
}
;
I.getInstancesByCategoryId = function(c) {
return r[c] || e;
}
;
I.isInstanceManaged = function(c, i) {
var C = r[c];
if (!C || !i) {
return false;
}
return C.indexOf(i) !== -1;
}
;
I.isCategoryEmpty = function(c) {
var C = r[c];
return !C || C.length === 0;
}
;
I.addPopoverInstance = function(P) {
if (typeof P.close === "function") {
I.addInstance(p, P);
} else {
q.sap.log.warning("In method addPopoverInstance: the parameter
doesn't have a close method and can't be managed.");
}
return this;
}
;
I.addDialogInstance = function(D) {
if (typeof D.close === "function") {
I.addInstance(d, D);
} else {
q.sap.log.warning("In method addDialogInstance: the parameter
doesn't have a close method and can't be managed.");
}
return this;
}
;
I.removePopoverInstance = function(P) {
return I.removeInstance(p, P);
}
;
I.removeDialogInstance = function(D) {
return I.removeInstance(d, D);
}
;
I.hasOpenPopover = function() {
return !I.isCategoryEmpty(p);
}
;
I.hasOpenDialog = function() {
return !I.isCategoryEmpty(d);
}
;
I.isDialogOpen = function(D) {
return I.isInstanceManaged(d, D);
}
;
I.isPopoverOpen = function(P) {
return I.isInstanceManaged(p, P);
}
;
I.getOpenPopovers = function() {
return I.getInstancesByCategoryId(p);
}
;
I.getOpenDialogs = function() {
return I.getInstancesByCategoryId(d);
}
;
I.closeAllPopovers = function() {
var a = I.getOpenPopovers(), i;
for (i = 0; i < a.length; i++) {
a[i].close();
}
return this;
}
;
I.closeAllDialogs = function(c) {
var D, a = [], b = I.getOpenDialogs(), f, i;
for (i = 0; i < b.length; i++) {
f = b[i];
if (c) {
D = new q.Deferred().done();
a.push(D);
f.attachEvent("afterClose", (function(g) {
return function() {
g.resolve();
}
;
}(D)));
}
f.close();
}
if (c) {
q.when.apply(this, a).then(c);
}
return this;
}
;
}());
return I;
}, true);
sap.ui.predefine('sap/m/Label', ['jquery.sap.global', './library',
'sap/ui/core/Control', 'sap/ui/core/LabelEnablement'], function(q, l, C, L) {
"use strict";
var a = C.extend("sap.m.Label", {
metadata: {
interfaces: ["sap.ui.core.Label", "sap.ui.core.IShrinkable"],
library: "sap.m",
properties: {
design: {
type: "sap.m.LabelDesign",
group: "Appearance",
defaultValue: sap.m.LabelDesign.Standard
},
text: {
type: "string",
group: "Misc",
defaultValue: null
},
textAlign: {
type: "sap.ui.core.TextAlign",
group: "Appearance",
defaultValue: sap.ui.core.TextAlign.Begin
},
textDirection: {
type: "sap.ui.core.TextDirection",
group: "Appearance",
defaultValue: sap.ui.core.TextDirection.Inherit
},
width: {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: ''
},
required: {
type: "boolean",
group: "Misc",
defaultValue: false
}
},
associations: {
labelFor: {
type: "sap.ui.core.Control",
multiple: false
}
}
}
});
a.prototype.setText = function(t) {
var v = this.getText();
if (v !== t) {
this.setProperty("text", t, true);
this.$().html(q.sap.encodeHTML(this.getProperty("text")));
if (t) {
this.$().removeClass("sapMLabelNoText");
} else {
this.$().addClass("sapMLabelNoText");
}
}
return this;
}
;
a.prototype.setTooltip = function(t) {
var v = this.getTooltip();
if (v !== t) {
this.setAggregation("tooltip", t, true);
this.$().attr("title", this.getTooltip());
}
return this;
}
;
a.prototype.getAccessibilityInfo = function() {
return {
description: this.getText()
};
}
;
L.enrich(a.prototype);
return a;
}, true);
sap.ui.predefine('sap/m/LabelRenderer', ['jquery.sap.global',
'sap/ui/core/Renderer'], function(q, R) {
"use strict";
var L = {};
L.render = function(a, l) {
var r = L;
a.write("<label");
a.writeControlData(l);
a.addClass("sapMLabel");
a.addClass("sapUiSelectable");
if (l.getDesign() == sap.m.LabelDesign.Bold) {
a.addStyle("font-weight", "bold");
}
if (l.getRequired()) {
a.addClass("sapMLabelRequired");
}
if (l.getLabelForRendering()) {
sap.ui.core.LabelEnablement.writeLabelForAttribute(a, l);
} else if (l.getParent()instanceof sap.m.Toolbar) {
a.addClass("sapMLabelTBHeader");
}
var t = l.getTextDirection();
if (t !== sap.ui.core.TextDirection.Inherit) {
a.writeAttribute("dir", t.toLowerCase());
}
var w = l.getWidth();
if (w) {
a.addStyle("width", w);
} else {
a.addClass("sapMLabelMaxWidth");
}
var T = l.getTextAlign();
if (T) {
var T = r.getTextAlign(T, t);
if (T) {
a.addStyle("text-align", T);
}
}
var s = l.getText();
if (s == "") {
a.addClass("sapMLabelNoText");
}
a.writeStyles();
a.writeClasses();
var b = l.getTooltip_AsString();
if (b) {
a.writeAttributeEscaped("title", b);
}
a.write(">");
if (s) {
a.writeEscaped(s);
}
a.write("</label>");
}
;
L.getTextAlign = R.getTextAlign;
return L;
}, true);
sap.ui.predefine('sap/m/Link', ['jquery.sap.global', './library',
'sap/ui/core/Control', 'sap/ui/core/InvisibleText',
'sap/ui/core/EnabledPropagator', 'sap/ui/core/LabelEnablement'], function(q, l, C,
I, E, L) {
"use strict";
var a = C.extend("sap.m.Link", {
metadata: {
interfaces: ["sap.ui.core.IShrinkable"],
library: "sap.m",
properties: {
text: {
type: "string",
group: "Data",
defaultValue: ''
},
enabled: {
type: "boolean",
group: "Behavior",
defaultValue: true
},
target: {
type: "string",
group: "Behavior",
defaultValue: null
},
width: {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: null
},
href: {
type: "sap.ui.core.URI",
group: "Data",
defaultValue: null
},
wrapping: {
type: "boolean",
group: "Appearance",
defaultValue: false
},
textAlign: {
type: "sap.ui.core.TextAlign",
group: "Appearance",
defaultValue: sap.ui.core.TextAlign.Initial
},
textDirection: {
type: "sap.ui.core.TextDirection",
group: "Appearance",
defaultValue: sap.ui.core.TextDirection.Inherit
},
subtle: {
type: "boolean",
group: "Behavior",
defaultValue: false
},
emphasized: {
type: "boolean",
group: "Behavior",
defaultValue: false
}
},
associations: {
ariaDescribedBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaDescribedBy"
},
ariaLabelledBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaLabelledBy"
}
},
events: {
press: {
allowPreventDefault: true
}
}
}
});
E.call(a.prototype);
a.prototype.onBeforeRendering = function() {
this.removeAssociation("ariaLabelledBy", this.getId(), true);
if (this.getAriaLabelledBy().length > 0 ||
L.getReferencingLabels(this).length > 0) {
this.addAssociation("ariaLabelledBy", this.getId(), true);
}
}
;
a.prototype.onsapspace = function(e) {
this._handlePress(e);
if (this.getHref() && !e.isDefaultPrevented()) {
e.preventDefault();
e.setMarked();
var c = document.createEvent('MouseEvents');
c.initEvent('click', false, true);
this.getDomRef().dispatchEvent(c);
}
}
;
a.prototype._handlePress = function(e) {
if (this.getEnabled()) {
e.setMarked();
if (!this.firePress() || !this.getHref()) {
e.preventDefault();
}
} else {
e.preventDefault();
}
}
;
if (sap.ui.Device.support.touch) {
a.prototype.ontap = a.prototype._handlePress;
} else {
a.prototype.onclick = a.prototype._handlePress;
}
a.prototype.ontouchstart = function(e) {
if (this.getEnabled()) {
e.setMarked();
}
}
;
a.prototype.setText = function(t) {
var $ = this.$();
this.setProperty("text", t, true);
t = this.getProperty("text");
$.text(t);
if (t) {
$.attr("tabindex", "0");
} else {
$.attr("tabindex", "-1");
}
return this;
}
;
a.prototype.setHref = function(u) {
this.setProperty("href", u, true);
if (this.getEnabled()) {
u = this.getProperty("href");
this.$().attr("href", u);
}
return this;
}
;
a.prototype.setSubtle = function(s) {
this.setProperty("subtle", s, true);
var $ = this.$();
if ($.length) {
$.toggleClass("sapMLnkSubtle", s);
if (s) {
a._addToDescribedBy($, this._sAriaLinkSubtleId);
} else {
a._removeFromDescribedBy($, this._sAriaLinkSubtleId);
}
}
if (s && !a.prototype._sAriaLinkSubtleId) {
a.prototype._sAriaLinkSubtleId =
a._getARIAInvisibleTextId("LINK_SUBTLE");
}
return this;
}
;
a.prototype.setEmphasized = function(e) {
this.setProperty("emphasized", e, true);
var $ = this.$();
if ($.length) {
$.toggleClass("sapMLnkEmphasized", e);
if (e) {
a._addToDescribedBy($, this._sAriaLinkEmphasizedId);
} else {
a._removeFromDescribedBy($, this._sAriaLinkEmphasizedId);
}
}
if (e && !a.prototype._sAriaLinkEmphasizedId) {
a.prototype._sAriaLinkEmphasizedId =
a._getARIAInvisibleTextId("LINK_EMPHASIZED");
}
return this;
}
;
a.prototype.setWrapping = function(w) {
this.setProperty("wrapping", w, true);
this.$().toggleClass("sapMLnkWrapping", w);
return this;
}
;
a.prototype.setEnabled = function(e) {
if (e !== this.getProperty("enabled")) {
this.setProperty("enabled", e, true);
var $ = this.$();
$.toggleClass("sapMLnkDsbl", !e);
if (e) {
$.attr("disabled", false);
if (this.getText()) {
$.attr("tabindex", "0");
} else {
$.attr("tabindex", "-1");
}
$.removeAttr("aria-disabled");
if (this.getHref()) {
$.attr("href", this.getHref());
}
} else {
$.attr("disabled", true);
$.attr("tabindex", "-1");
$.attr("aria-disabled", true);
$.attr("href", "javascript:void(0);");
}
}
return this;
}
;
a.prototype.setWidth = function(w) {
this.setProperty("width", w, true);
this.$().toggleClass("sapMLnkMaxWidth", !w);
this.$().css("width", w);
return this;
}
;
a.prototype.setTarget = function(t) {
this.setProperty("target", t, true);
if (!t) {
this.$().removeAttr("target");
} else {
this.$().attr("target", t);
}
return this;
}
;
a._getResourceBundle = function() {
return sap.ui.getCore().getLibraryResourceBundle("sap.m");
}
;
a._getARIAInvisibleTextId = function(r) {
var R = a._getResourceBundle();
return new I({
text: R.getText(r)
}).toStatic().getId();
}
;
a._addToDescribedBy = function($, i) {
var A = $.attr("aria-describedby");
if (A) {
$.attr("aria-describedby", A + " " + i);
} else {
$.attr("aria-describedby", i);
}
}
;
a._removeFromDescribedBy = function($, i) {
var A = $.attr("aria-describedby");
if (A && A.indexOf(i) !== -1) {
A = A.replace(i, '');
if (A.length > 1) {
$.attr("aria-describedby", A);
} else {
$.removeAttr("aria-describedby");
}
}
}
;
a.prototype.getAccessibilityInfo = function() {
return {
role: "link",
type:
sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("ACC_CTR_TYPE_LINK"),
description: this.getText() || this.getHref() || "",
focusable: this.getEnabled(),
enabled: this.getEnabled()
};
}
;
return a;
}, true);
sap.ui.predefine('sap/m/LinkRenderer', ['jquery.sap.global',
'sap/ui/core/Renderer'], function(q, R) {
"use strict";
var L = {};
L.render = function(r, c) {
var t = c.getTextDirection()
, T = R.getTextAlign(c.getTextAlign(), t)
, a = {
role: 'link'
};
r.write("<a");
r.writeControlData(c);
r.addClass("sapMLnk");
if (c.getSubtle()) {
r.addClass("sapMLnkSubtle");
if (a.describedby) {
a.describedby += " " + c._sAriaLinkSubtleId;
} else {
a.describedby = c._sAriaLinkSubtleId;
}
}
if (c.getEmphasized()) {
r.addClass("sapMLnkEmphasized");
if (a.describedby) {
a.describedby += " " + c._sAriaLinkEmphasizedId;
} else {
a.describedby = c._sAriaLinkEmphasizedId;
}
}
if (!c.getEnabled()) {
r.addClass("sapMLnkDsbl");
r.writeAttribute("disabled", "true");
r.writeAttribute("tabIndex", "-1");
} else if (c.getText()) {
r.writeAttribute("tabIndex", "0");
} else {
r.writeAttribute("tabIndex", "-1");
}
if (c.getWrapping()) {
r.addClass("sapMLnkWrapping");
}
if (c.getTooltip_AsString()) {
r.writeAttributeEscaped("title", c.getTooltip_AsString());
}
if (c.getHref() && c.getEnabled()) {
r.writeAttributeEscaped("href", c.getHref());
} else {
r.writeAttribute("href", "javascript:void(0);");
}
if (c.getTarget()) {
r.writeAttributeEscaped("target", c.getTarget());
}
if (c.getWidth()) {
r.addStyle("width", c.getWidth());
} else {
r.addClass("sapMLnkMaxWidth");
}
if (T) {
r.addStyle("text-align", T);
}
if (t !== sap.ui.core.TextDirection.Inherit) {
r.writeAttribute("dir", t.toLowerCase());
}
r.writeAccessibilityState(c, a);
r.writeClasses();
r.writeStyles();
r.write(">");
this.renderText(r, c);
r.write("</a>");
}
;
L.renderText = function(r, c) {
r.writeEscaped(c.getText());
}
;
return L;
}, true);
sap.ui.predefine('sap/m/List', ['jquery.sap.global', './ListBase', './library'],
function(q, L, l) {
"use strict";
var a = L.extend("sap.m.List", {
metadata: {
library: "sap.m",
properties: {
backgroundDesign: {
type: "sap.m.BackgroundDesign",
group: "Appearance",
defaultValue: sap.m.BackgroundDesign.Solid
}
},
aggregations: {
columns: {
type: "sap.m.Column",
multiple: true,
singularName: "column",
deprecated: true
}
}
}
});
a.prototype.onBeforeRendering = function() {
if (L.prototype.onBeforeRendering) {
L.prototype.onBeforeRendering.call(this);
}
if (!this.getColumns().length || this._isColumnsIncompatible()) {
return;
}
q.sap.require("sap.m.Table");
var p = sap.m.Table.prototype;
Object.keys(p).forEach(function(k) {
this[k] = p[k];
}, this);
if (!this.mProperties.hasOwnProperty("backgroundDesign")) {
this.setBackgroundDesign("Translucent");
}
}
;
a.prototype._isColumnsIncompatible = function() {
return
sap.ui.getCore().getConfiguration().getCompatibilityVersion("sapMListAsTable").comp
areTo("1.16") >= 0;
}
;
return a;
}, true);
sap.ui.predefine('sap/m/ListBase', ['jquery.sap.global', './GroupHeaderListItem',
'./library', 'sap/ui/core/Control', 'sap/ui/core/delegate/ItemNavigation',
'sap/ui/core/theming/Parameters'], function(q, G, l, C, I, P) {
"use strict";
var L = C.extend("sap.m.ListBase", {
metadata: {
library: "sap.m",
properties: {
inset: {
type: "boolean",
group: "Appearance",
defaultValue: false
},
headerText: {
type: "string",
group: "Misc",
defaultValue: null
},
headerDesign: {
type: "sap.m.ListHeaderDesign",
group: "Appearance",
defaultValue: sap.m.ListHeaderDesign.Standard,
deprecated: true
},
footerText: {
type: "string",
group: "Misc",
defaultValue: null
},
mode: {
type: "sap.m.ListMode",
group: "Behavior",
defaultValue: sap.m.ListMode.None
},
width: {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: '100%'
},
includeItemInSelection: {
type: "boolean",
group: "Behavior",
defaultValue: false
},
showUnread: {
type: "boolean",
group: "Misc",
defaultValue: false
},
noDataText: {
type: "string",
group: "Misc",
defaultValue: null
},
showNoData: {
type: "boolean",
group: "Misc",
defaultValue: true
},
enableBusyIndicator: {
type: "boolean",
group: "Behavior",
defaultValue: true
},
modeAnimationOn: {
type: "boolean",
group: "Misc",
defaultValue: true
},
showSeparators: {
type: "sap.m.ListSeparators",
group: "Appearance",
defaultValue: sap.m.ListSeparators.All
},
swipeDirection: {
type: "sap.m.SwipeDirection",
group: "Misc",
defaultValue: sap.m.SwipeDirection.Both
},
growing: {
type: "boolean",
group: "Behavior",
defaultValue: false
},
growingThreshold: {
type: "int",
group: "Misc",
defaultValue: 20
},
growingTriggerText: {
type: "string",
group: "Appearance",
defaultValue: null
},
growingScrollToLoad: {
type: "boolean",
group: "Behavior",
defaultValue: false
},
rememberSelections: {
type: "boolean",
group: "Behavior",
defaultValue: true
},
keyboardMode: {
type: "sap.m.ListKeyboardMode",
group: "Behavior",
defaultValue: sap.m.ListKeyboardMode.Navigation
}
},
defaultAggregation: "items",
aggregations: {
items: {
type: "sap.m.ListItemBase",
multiple: true,
singularName: "item",
bindable: "bindable"
},
swipeContent: {
type: "sap.ui.core.Control",
multiple: false
},
headerToolbar: {
type: "sap.m.Toolbar",
multiple: false
},
infoToolbar: {
type: "sap.m.Toolbar",
multiple: false
}
},
associations: {
ariaLabelledBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaLabelledBy"
}
},
events: {
select: {
deprecated: true,
parameters: {
listItem: {
type: "sap.m.ListItemBase"
}
}
},
selectionChange: {
parameters: {
listItem: {
type: "sap.m.ListItemBase"
},
listItems: {
type: "sap.m.ListItemBase[]"
},
selected: {
type: "boolean"
}
}
},
"delete": {
parameters: {
listItem: {
type: "sap.m.ListItemBase"
}
}
},
swipe: {
allowPreventDefault: true,
parameters: {
listItem: {
type: "sap.m.ListItemBase"
},
swipeContent: {
type: "sap.ui.core.Control"
},
srcControl: {
type: "sap.ui.core.Control"
}
}
},
growingStarted: {
deprecated: true,
parameters: {
actual: {
type: "int"
},
total: {
type: "int"
}
}
},
growingFinished: {
deprecated: true,
parameters: {
actual: {
type: "int"
},
total: {
type: "int"
}
}
},
updateStarted: {
parameters: {
reason: {
type: "string"
},
actual: {
type: "int"
},
total: {
type: "int"
}
}
},
updateFinished: {
parameters: {
reason: {
type: "string"
},
actual: {
type: "int"
},
total: {
type: "int"
}
}
},
itemPress: {
parameters: {
listItem: {
type: "sap.m.ListItemBase"
},
srcControl: {
type: "sap.ui.core.Control"
}
}
}
}
}
});
L.prototype.sNavItemClass = "sapMLIB";
L.prototype.init = function() {
this._oGrowingDelegate = null;
this._bSelectionMode = false;
this._bReceivingData = false;
this._oSelectedItem = null;
this._aSelectedPaths = [];
this._aNavSections = [];
this._bUpdating = false;
this._bRendering = false;
this._bActiveItem = false;
this.data("sap-ui-fastnavgroup", "true", true);
}
;
L.prototype.onBeforeRendering = function() {
this._bRendering = true;
this._bActiveItem = false;
this._aNavSections = [];
this._removeSwipeContent();
}
;
L.prototype.onAfterRendering = function() {
this._bRendering = false;
this._sLastMode = this.getMode();
if (sap.ui.Device.system.desktop) {
this._bItemNavigationInvalidated = true;
}
}
;
L.prototype.exit = function() {
this._oSelectedItem = null;
this._aNavSections = [];
this._aSelectedPaths = [];
this._destroyGrowingDelegate();
this._destroyItemNavigation();
}
;
L.prototype.refreshItems = function(r) {
this._showBusyIndicator();
if (this._oGrowingDelegate) {
this._oGrowingDelegate.refreshItems(r);
} else {
if (!this._bReceivingData) {
this._updateStarted(r);
this._bReceivingData = true;
}
this.refreshAggregation("items");
}
}
;
L.prototype.updateItems = function(r) {
if (this._oGrowingDelegate) {
this._oGrowingDelegate.updateItems(r);
} else {
if (this._bReceivingData) {
this._bReceivingData = false;
} else {
this._updateStarted(r);
}
this.updateAggregation("items");
this._updateFinished();
}
}
;
L.prototype.setBindingContext = function() {
this._resetItemsBinding();
return C.prototype.setBindingContext.apply(this, arguments);
}
;
L.prototype._bindAggregation = function(n) {
n == "items" && this._resetItemsBinding();
return C.prototype._bindAggregation.apply(this, arguments);
}
;
L.prototype.destroyItems = function(s) {
if (!this.getItems(true).length) {
return this;
}
this._oSelectedItem = null;
this.destroyAggregation("items", "KeepDom");
if (!s) {
this.invalidate();
}
return this;
}
;
L.prototype.removeAllItems = function(a) {
this._oSelectedItem = null;
return this.removeAllAggregation("items");
}
;
L.prototype.removeItem = function(i) {
var o = this.removeAggregation("items", i);
if (o && o === this._oSelectedItem) {
this._oSelectedItem = null;
}
return o;
}
;
L.prototype.getItems = function(r) {
if (r) {
return this.mAggregations["items"] || [];
}
return this.getAggregation("items", []);
}
;
L.prototype.getId = function(s) {
var i = this.sId;
return s ? i + "-" + s : i;
}
;
L.prototype.setGrowing = function(g) {
g = !!g;
if (this.getGrowing() != g) {
this.setProperty("growing", g, !g);
if (g) {
q.sap.require("sap.m.GrowingEnablement");
this._oGrowingDelegate = new sap.m.GrowingEnablement(this);
} else if (this._oGrowingDelegate) {
this._oGrowingDelegate.destroy();
this._oGrowingDelegate = null;
}
}
return this;
}
;
L.prototype.setGrowingThreshold = function(t) {
return this.setProperty("growingThreshold", t, true);
}
;
L.prototype.setEnableBusyIndicator = function(e) {
this.setProperty("enableBusyIndicator", e, true);
if (!this.getEnableBusyIndicator()) {
this._hideBusyIndicator();
}
return this;
}
;
L.prototype.setNoDataText = function(n) {
this.setProperty("noDataText", n, true);
this.$("nodata-text").text(this.getNoDataText());
return this;
}
;
L.prototype.getNoDataText = function(c) {
if (c && this._bBusy) {
return "";
}
var n = this.getProperty("noDataText");
n = n ||
sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("LIST_NO_DATA");
return n;
}
;
L.prototype.getSelectedItem = function() {
var a = this.getItems(true);
for (var i = 0; i < a.length; i++) {
if (a[i].getSelected()) {
return a[i];
}
}
return null;
}
;
L.prototype.setSelectedItem = function(o, s, f) {
if (this.indexOfItem(o) < 0) {
q.sap.log.warning("setSelectedItem is called without valid ListItem
parameter on " + this);
return;
}
if (this._bSelectionMode) {
o.setSelected((s === undefined) ? true : !!s);
f && this._fireSelectionChangeEvent([o]);
}
}
;
L.prototype.getSelectedItems = function() {
return this.getItems(true).filter(function(i) {
return i.getSelected();
});
}
;
L.prototype.setSelectedItemById = function(i, s) {
var o = sap.ui.getCore().byId(i);
return this.setSelectedItem(o, s);
}
;
L.prototype.getSelectedContexts = function(a) {
var b = this.getBindingInfo("items")
, m = (b || {}).model
, M = this.getModel(m);
if (!b || !M) {
return [];
}
if (a && this.getRememberSelections()) {
return this._aSelectedPaths.map(function(p) {
return M.getContext(p);
});
}
return this.getSelectedItems().map(function(i) {
return i.getBindingContext(m);
});
}
;
L.prototype.removeSelections = function(a, f, d) {
var c = [];
this._oSelectedItem = null;
a && (this._aSelectedPaths = []);
this.getItems(true).forEach(function(i) {
if (!i.getSelected()) {
return;
}
if (d && i.isSelectedBoundTwoWay()) {
return;
}
i.setSelected(false, true);
c.push(i);
!a && this._updateSelectedPaths(i);
}, this);
if (f && c.length) {
this._fireSelectionChangeEvent(c);
}
return this;
}
;
L.prototype.selectAll = function(f) {
if (this.getMode() != "MultiSelect") {
return this;
}
var c = [];
this.getItems(true).forEach(function(i) {
if (!i.getSelected()) {
i.setSelected(true, true);
c.push(i);
this._updateSelectedPaths(i);
}
}, this);
if (f && c.length) {
this._fireSelectionChangeEvent(c);
}
return this;
}
;
sap.m.ListBase.prototype.getLastMode = function(m) {
return this._sLastMode;
}
;
L.prototype.setMode = function(m) {
m = this.validateProperty("mode", m);
var o = this.getMode();
if (o == m) {
return this;
}
this._bSelectionMode = m.indexOf("Select") > -1;
if (!this._bSelectionMode) {
this.removeSelections(true);
} else {
var s = this.getSelectedItems();
if (s.length > 1) {
this.removeSelections(true);
} else if (o === sap.m.ListMode.MultiSelect) {
this._oSelectedItem = s[0];
}
}
return this.setProperty("mode", m);
}
;
L.prototype.getGrowingInfo = function() {
return this._oGrowingDelegate ? this._oGrowingDelegate.getInfo() : null;
}
;
L.prototype.setRememberSelections = function(r) {
this.setProperty("rememberSelections", r, true);
!this.getRememberSelections() && (this._aSelectedPaths = []);
return this;
}
;
sap.m.ListBase.prototype.setSelectedContextPaths = function(s) {
this._aSelectedPaths = s || [];
}
;
sap.m.ListBase.prototype.getSelectedContextPaths = function() {
return this._aSelectedPaths.slice(0);
}
;
L.prototype.isAllSelectableSelected = function() {
var i = this.getItems(true)
, s = this.getSelectedItems().length
, S = i.filter(function(o) {
return o.isSelectable();
}).length;
return i.length > 0 && s == S;
}
;
L.prototype.getVisibleItems = function() {
return this.getItems(true).filter(function(i) {
return i.getVisible();
});
}
;
L.prototype.getActiveItem = function() {
return this._bActiveItem;
}
;
L.prototype.onItemDOMUpdate = function(o) {
if (!this._bRendering && this.bOutput) {
this._startItemNavigation(true);
}
}
;
L.prototype.onItemActiveChange = function(o, a) {
this._bActiveItem = a;
}
;
L.prototype.onItemSelectedChange = function(o, s) {
if (this.getMode() == sap.m.ListMode.MultiSelect) {
this._updateSelectedPaths(o, s);
return;
}
if (s) {
this._aSelectedPaths = [];
this._oSelectedItem && this._oSelectedItem.setSelected(false, true);
this._oSelectedItem = o;
} else if (this._oSelectedItem === o) {
this._oSelectedItem = null;
}
this._updateSelectedPaths(o, s);
}
;
L.prototype.getItemsContainerDomRef = function() {
return this.getDomRef("listUl");
}
;
L.prototype.checkGrowingFromScratch = function() {}
;
L.prototype.onBeforePageLoaded = function(g, c) {
this._fireUpdateStarted(c, g);
this.fireGrowingStarted(g);
}
;
L.prototype.onAfterPageLoaded = function(g, c) {
this._fireUpdateFinished(g);
this.fireGrowingFinished(g);
}
;
L.prototype.addNavSection = function(i) {
this._aNavSections.push(i);
return i;
}
;
L.prototype.getMaxItemsCount = function() {
var b = this.getBinding("items");
if (b) {
return b.getLength() || 0;
}
return this.getItems(true).length;
}
;
L.prototype.shouldRenderItems = function() {
return true;
}
;
L.prototype._resetItemsBinding = function() {
if (this.isBound("items")) {
this._bUpdating = false;
this._bReceivingData = false;
this.removeSelections(true, false, true);
this._oGrowingDelegate && this._oGrowingDelegate.reset();
this._hideBusyIndicator();
if (this._oItemNavigation) {
this._oItemNavigation.iFocusedIndex = -1;
}
}
}
;
L.prototype._updateStarted = function(r) {
if (!this._bReceivingData && !this._bUpdating) {
this._bUpdating = true;
this._fireUpdateStarted(r);
}
}
;
L.prototype._fireUpdateStarted = function(r, i) {
this._sUpdateReason = q.sap.charToUpperCase(r || "Refresh");
this.fireUpdateStarted({
reason: this._sUpdateReason,
actual: i ? i.actual : this.getItems(true).length,
total: i ? i.total : this.getMaxItemsCount()
});
}
;
L.prototype._updateFinished = function() {
if (!this._bReceivingData && this._bUpdating) {
this._fireUpdateFinished();
this._bUpdating = false;
}
}
;
L.prototype._fireUpdateFinished = function(i) {
this._hideBusyIndicator();
q.sap.delayedCall(0, this, function() {
this._bItemNavigationInvalidated = true;
this.fireUpdateFinished({
reason: this._sUpdateReason,
actual: i ? i.actual : this.getItems(true).length,
total: i ? i.total : this.getMaxItemsCount()
});
});
}
;
L.prototype._showBusyIndicator = function() {
if (this.getEnableBusyIndicator() && !this.getBusy() && !this._bBusy) {
this._bBusy = true;
this._sBusyTimer = q.sap.delayedCall(this.getBusyIndicatorDelay(),
this, function() {
this.$("nodata-text").text("");
});
this.setBusy(true, "listUl");
}
}
;
L.prototype._hideBusyIndicator = function() {
if (this._bBusy) {
this._bBusy = false;
this.setBusy(false, "listUl");
q.sap.clearDelayedCall(this._sBusyTimer);
if (!this.getItems(true).length) {
this.$("nodata-text").text(this.getNoDataText());
}
}
}
;
L.prototype.onItemBindingContextSet = function(i) {
if (!this._bSelectionMode || !this.getRememberSelections() || !
this.isBound("items")) {
return;
}
if (i.isSelectedBoundTwoWay()) {
return;
}
var p = i.getBindingContextPath();
if (p) {
var s = (this._aSelectedPaths.indexOf(p) > -1);
i.setSelected(s);
}
}
;
L.prototype.onItemInserted = function(i, s) {
if (s) {
this.onItemSelectedChange(i, true);
}
if (!this._bSelectionMode || !this._aSelectedPaths.length || !
this.getRememberSelections() || !this.isBound("items") || i.isSelectedBoundTwoWay()
|| i.getSelected()) {
return;
}
var p = i.getBindingContextPath();
if (p && this._aSelectedPaths.indexOf(p) > -1) {
i.setSelected(true);
}
}
;
L.prototype.onItemSelect = function(o, s) {
if (this.getMode() == sap.m.ListMode.MultiSelect) {
this._fireSelectionChangeEvent([o]);
} else if (this._bSelectionMode && s) {
this._fireSelectionChangeEvent([o]);
}
}
;
L.prototype._fireSelectionChangeEvent = function(a) {
var o = a && a[0];
if (!o) {
return;
}
this.fireSelectionChange({
listItem: o,
listItems: a,
selected: o.getSelected()
});
this.fireSelect({
listItem: o
});
}
;
L.prototype.onItemDelete = function(o) {
this.fireDelete({
listItem: o
});
}
;
L.prototype.onItemPress = function(o, s) {
if (o.getType() == sap.m.ListType.Inactive) {
return;
}
q.sap.delayedCall(0, this, function() {
this.fireItemPress({
listItem: o,
srcControl: s
});
});
}
;
L.prototype._updateSelectedPaths = function(i, s) {
if (!this.getRememberSelections() || !this.isBound("items")) {
return;
}
var p = i.getBindingContextPath();
if (!p) {
return;
}
s = (s === undefined) ? i.getSelected() : s;
var a = this._aSelectedPaths.indexOf(p);
if (s) {
a < 0 && this._aSelectedPaths.push(p);
} else {
a > -1 && this._aSelectedPaths.splice(a, 1);
}
}
;
L.prototype._destroyGrowingDelegate = function() {
if (this._oGrowingDelegate) {
this._oGrowingDelegate.destroy();
this._oGrowingDelegate = null;
}
}
;
L.prototype._destroyItemNavigation = function() {
if (this._oItemNavigation) {
this.removeEventDelegate(this._oItemNavigation);
this._oItemNavigation.destroy();
this._oItemNavigation = null;
}
}
;
L.prototype._getTouchBlocker = function() {
return this.$().children();
}
;
L.prototype._getSwipeContainer = function() {
return this._$swipeContainer || (q.sap.require("sap.m.InstanceManager"),
this._$swipeContainer = q("<div>", {
"id": this.getId("swp"),
"class": "sapMListSwp"
}));
}
;
L.prototype._setSwipePosition = function() {
if (this._isSwipeActive) {
return this._getSwipeContainer().css("top", this._swipedItem.$
().position().top);
}
}
;
L.prototype._renderSwipeContent = function() {
var $ = this._swipedItem.$()
, a = this._getSwipeContainer();
this.$().prepend(a.css({
top: $.position().top,
height: $.outerHeight(true)
}));
if (this._bRerenderSwipeContent) {
this._bRerenderSwipeContent = false;
var r = sap.ui.getCore().createRenderManager();
r.render(this.getSwipeContent(), a.empty()[0]);
r.destroy();
}
return this;
}
;
L.prototype._swipeIn = function() {
var t = this
, $ = t._getTouchBlocker()
, a = t._getSwipeContainer();
t._isSwipeActive = true;
t._renderSwipeContent();
sap.m.InstanceManager.addDialogInstance(t);
window.document.activeElement.blur();
q(window).on("resize.swp", function() {
t._setSwipePosition();
});
$.css("pointer-events", "none").on("touchstart.swp mousedown.swp",
function(e) {
if (!a[0].firstChild.contains(e.target)) {
e.preventDefault();
e.stopPropagation();
}
});
a.bind("webkitAnimationEnd animationend", function() {
q(this).unbind("webkitAnimationEnd animationend");
a.css("opacity", 1).focus();
$.parent().on("touchend.swp touchcancel.swp mouseup.swp", function(e) {
if (!a[0].firstChild.contains(e.target)) {
t.swipeOut();
}
});
}).removeClass("sapMListSwpOutAnim").addClass("sapMListSwpInAnim");
}
;
L.prototype._onSwipeOut = function(c) {
this._getSwipeContainer().css("opacity", 0).remove();
q(window).off("resize.swp");
this._getTouchBlocker().css("pointer-events", "auto").off("touchstart.swp
mousedown.swp");
if (typeof c == "function") {
c.call(this, this._swipedItem, this.getSwipeContent());
}
this._isSwipeActive = false;
sap.m.InstanceManager.removeDialogInstance(this);
}
;
L.prototype.swipeOut = function(c) {
if (!this._isSwipeActive) {
return this;
}
var t = this
, $ = this._getSwipeContainer();
this._getTouchBlocker().parent().off("touchend.swp touchend.swp
touchcancel.swp mouseup.swp");
$.bind("webkitAnimationEnd animationend", function() {
q(this).unbind("webkitAnimationEnd animationend");
t._onSwipeOut(c);
}).removeClass("sapMListSwpInAnim").addClass("sapMListSwpOutAnim");
return this;
}
;
L.prototype._removeSwipeContent = function() {
if (this._isSwipeActive) {
this.swipeOut()._onSwipeOut();
}
}
;
L.prototype.close = L.prototype._removeSwipeContent;
L.prototype._onSwipe = function(e) {
var c = this.getSwipeContent()
, s = e.srcControl;
if (c && s && !this._isSwipeActive && this !== s && !
this._eventHandledByControl && (sap.ui.Device.support.touch ||
(sap.ui.Device.os.windows && sap.ui.Device.os.version >= 8))) {
for (var a = s; a && !(a instanceof sap.m.ListItemBase); a = a.oParent)
;
if (a instanceof sap.m.ListItemBase) {
this._swipedItem = a;
this.fireSwipe({
listItem: this._swipedItem,
swipeContent: c,
srcControl: s
}, true) && this._swipeIn();
}
}
}
;
L.prototype.ontouchstart = function(e) {
this._eventHandledByControl = e.isMarked();
}
;
L.prototype.onswipeleft = function(e) {
var a = sap.ui.getCore().getConfiguration().getRTL() ? "RightToLeft" :
"LeftToRight";
if (this.getSwipeDirection() != a) {
this._onSwipe(e);
}
}
;
L.prototype.onswiperight = function(e) {
var a = sap.ui.getCore().getConfiguration().getRTL() ? "LeftToRight" :
"RightToLeft";
if (this.getSwipeDirection() != a) {
this._onSwipe(e);
}
}
;
L.prototype.setSwipeDirection = function(d) {
return this.setProperty("swipeDirection", d, true);
}
;
L.prototype.getSwipedItem = function() {
return (this._isSwipeActive ? this._swipedItem : null);
}
;
L.prototype.setSwipeContent = function(c) {
this._bRerenderSwipeContent = true;
this.toggleStyleClass("sapMListSwipable", !!c);
return this.setAggregation("swipeContent", c, !this._isSwipeActive);
}
;
L.prototype.invalidate = function(o) {
if (o && o === this.getSwipeContent()) {
this._bRerenderSwipeContent = true;
this._isSwipeActive && this._renderSwipeContent();
return this;
}
C.prototype.invalidate.apply(this, arguments);
return this;
}
;
L.prototype.addItemGroup = function(g, h, s) {
h = h || new G({
title: g.text || g.key
});
h._bGroupHeader = true;
this.addAggregation("items", h, s);
return h;
}
;
L.prototype.removeGroupHeaders = function(s) {
this.getItems(true).forEach(function(i) {
if (i.isGroupHeader()) {
i.destroy(s);
}
});
}
;
L.prototype.getRole = function() {
var m = this.getMode()
, M = sap.m.ListMode;
return (m == M.None || m == M.Delete) ? "list" : "listbox";
}
;
L.prototype.onNavigationItemFocus = function(e) {
var i = e.getParameter("index")
, a = this._oItemNavigation.getItemDomRefs()
, o = a[i]
, s = a.length
, b = this.getBinding("items");
if (this.getGrowing() && this.getGrowingScrollToLoad() && b &&
b.isLengthFinal()) {
s = b.getLength();
if (b.isGrouped()) {
s += this.getItems(true).filter(function(c) {
return c.isGroupHeader() && c.getVisible();
}).length;
}
}
this.getNavigationRoot().setAttribute("aria-activedescendant", o.id);
o.setAttribute("aria-posinset", i + 1);
o.setAttribute("aria-setsize", s);
}
;
L.prototype.getNavigationRoot = function() {
return this.getDomRef("listUl");
}
;
L.prototype.getFocusDomRef = function() {
return this.getNavigationRoot();
}
;
L.prototype._startItemNavigation = function(i) {
if (!sap.ui.Device.system.desktop) {
return;
}
var k = this.getKeyboardMode()
, K = sap.m.ListKeyboardMode;
if (k == K.Edit && !this.getItems(true).length) {
return;
}
if (i && !this.getNavigationRoot().contains(document.activeElement)) {
this._bItemNavigationInvalidated = true;
return;
}
if (!this._oItemNavigation) {
this._oItemNavigation = new I();
this._oItemNavigation.setCycling(false);
this.addEventDelegate(this._oItemNavigation);
var t = (k == K.Edit) ? -1 : 0;
this._setItemNavigationTabIndex(t);
this._oItemNavigation.setTableMode(true, true).setColumns(1);
this._oItemNavigation.setDisabledModifiers({
sapnext: ["alt"],
sapprevious: ["alt"]
});
this._oItemNavigation.attachEvent(I.Events.BeforeFocus,
this.onNavigationItemFocus, this);
}
this._oItemNavigation.setPageSize(this.getGrowingThreshold());
var n = this.getNavigationRoot();
this._oItemNavigation.setRootDomRef(n);
this.setNavigationItems(this._oItemNavigation, n);
this._bItemNavigationInvalidated = false;
}
;
L.prototype.setNavigationItems = function(i, n) {
var N = q(n).children(".sapMLIB").get();
i.setItemDomRefs(N);
if (i.getFocusedIndex() == -1) {
i.setFocusedIndex(0);
}
}
;
L.prototype.getItemNavigation = function() {
return this._oItemNavigation;
}
;
L.prototype._setItemNavigationTabIndex = function(t) {
if (this._oItemNavigation) {
this._oItemNavigation.iActiveTabIndex = t;
this._oItemNavigation.iTabIndex = t;
}
}
;
L.prototype.setKeyboardMode = function(k) {
this.setProperty("keyboardMode", k, true);
if (this.isActive()) {
var t = (k == sap.m.ListKeyboardMode.Edit) ? -1 : 0;
this.$("listUl").prop("tabIndex", t);
this.$("after").prop("tabIndex", t);
this._setItemNavigationTabIndex(t);
}
return this;
}
;
L.prototype.setItemFocusable = function(o) {
if (!this._oItemNavigation) {
return;
}
var i = this._oItemNavigation.getItemDomRefs();
var a = i.indexOf(o.getDomRef());
if (a >= 0) {
this._oItemNavigation.setFocusedIndex(a);
}
}
;
L.prototype.forwardTab = function(f) {
this._bIgnoreFocusIn = true;
this.$(f ? "after" : "before").focus();
}
;
L.prototype.onsaptabnext = function(e) {
if (e.isMarked() || this.getKeyboardMode() == sap.m.ListKeyboardMode.Edit)
{
return;
}
if (e.target.id == this.getId("nodata")) {
this.forwardTab(true);
e.setMarked();
}
}
;
L.prototype.onsaptabprevious = function(e) {
if (e.isMarked() || this.getKeyboardMode() == sap.m.ListKeyboardMode.Edit)
{
return;
}
var t = e.target.id;
if (t == this.getId("nodata")) {
this.forwardTab(false);
} else if (t == this.getId("trigger")) {
this.focusPrevious();
e.preventDefault();
}
}
;
L.prototype._navToSection = function(f) {
var t;
var i = 0;
var s = f ? 1 : -1;
var a = this._aNavSections.length;
this._aNavSections.some(function(S, b) {
var d = q.sap.domById(S);
if (d && d.contains(document.activeElement)) {
i = b;
return true;
}
});
var o = this.getItemsContainerDomRef();
var c = q.sap.byId(this._aNavSections[i]);
if (c[0] === o && this._oItemNavigation) {
c.data("redirect", this._oItemNavigation.getFocusedIndex());
}
this._aNavSections.some(function() {
i = (i + s + a) % a;
t = q.sap.byId(this._aNavSections[i]);
if (t[0] === o && this._oItemNavigation) {
var r = t.data("redirect");
var b = this._oItemNavigation.getItemDomRefs();
var T = b[r] || o.children[0];
t = q(T);
}
if (t.is(":focusable")) {
t.focus();
return true;
}
}, this);
return t;
}
;
L.prototype.onsapshow = function(e) {
if (e.isMarked() || e.which == q.sap.KeyCodes.F4 || e.target.id !=
this.getId("trigger") && !q(e.target).hasClass(this.sNavItemClass)) {
return;
}
if (this._navToSection(true)) {
e.preventDefault();
e.setMarked();
}
}
;
L.prototype.onsaphide = function(e) {
if (e.isMarked() || e.target.id != this.getId("trigger") && !
q(e.target).hasClass(this.sNavItemClass)) {
return;
}
if (this._navToSection(false)) {
e.preventDefault();
e.setMarked();
}
}
;
L.prototype.onkeydown = function(e) {
var c = (e.which == q.sap.KeyCodes.A) && (e.metaKey || e.ctrlKey);
if (e.isMarked() || !c || !q(e.target).hasClass(this.sNavItemClass)) {
return;
}
e.preventDefault();
if (this.getMode() !== sap.m.ListMode.MultiSelect) {
return;
}
if (this.isAllSelectableSelected()) {
this.removeSelections(false, true);
} else {
this.selectAll(true);
}
e.setMarked();
}
;
L.prototype.onmousedown = function(e) {
if (this._bItemNavigationInvalidated) {
this._startItemNavigation();
}
}
;
L.prototype.focusPrevious = function() {
if (!this._oItemNavigation) {
return;
}
var n = this._oItemNavigation.getItemDomRefs();
var i = this._oItemNavigation.getFocusedIndex();
var $ = q(n[i]);
var r = $.control(0) || {};
var t = r.getTabbables ? r.getTabbables() : $.find(":sapTabbable");
var f = t.eq(-1).add($).eq(-1);
f.focus();
}
;
L.prototype.onfocusin = function(e) {
if (this._bIgnoreFocusIn) {
this._bIgnoreFocusIn = false;
e.stopImmediatePropagation(true);
return;
}
if (this._bItemNavigationInvalidated) {
this._startItemNavigation();
}
if (e.isMarked() || !this._oItemNavigation || this.getKeyboardMode() ==
sap.m.ListKeyboardMode.Edit || e.target.id != this.getId("after")) {
return;
}
this.focusPrevious();
e.setMarked();
}
;
L.prototype.onItemArrowUpDown = function(o, e) {
var i = this.getItems(true)
, a = i.indexOf(o) + (e.type == "sapup" ? -1 : 1)
, b = i[a];
if (b.isGroupHeader()) {
b = i[a + (e.type == "sapup" ? -1 : 1)];
}
if (!b) {
return;
}
var t = b.getTabbables()
, f = o.getTabbables().index(e.target)
, E = t.eq(t[f] ? f : -1);
E[0] ? E.focus() : b.focus();
e.preventDefault();
e.setMarked();
}
;
return L;
}, true);
sap.ui.predefine('sap/m/ListBaseRenderer', ['jquery.sap.global',
'sap/ui/core/theming/Parameters', './ListItemBaseRenderer'], function(q, P, L) {
"use strict";
var a = {};
a.ModeOrder = {
None: 0,
Delete: 1,
MultiSelect: -1,
SingleSelect: 1,
SingleSelectLeft: -1,
SingleSelectMaster: 0
};
a.render = function(r, c) {
r.write("<div");
r.addClass("sapMList");
r.writeControlData(c);
r.writeAttribute("tabindex", "-1");
if (c.getInset()) {
r.addClass("sapMListInsetBG");
}
if (c.getWidth()) {
r.addStyle("width", c.getWidth());
}
if (c.getBackgroundDesign) {
r.addClass("sapMListBG" + c.getBackgroundDesign());
}
var t = c.getTooltip_AsString();
if (t) {
r.writeAttributeEscaped("title", t);
}
this.renderContainerAttributes(r, c);
r.writeStyles();
r.writeClasses();
r.write(">");
var h = c.getHeaderText();
var H = c.getHeaderToolbar();
if (H) {
H.setDesign(sap.m.ToolbarDesign.Transparent, true);
H.addStyleClass("sapMListHdrTBar");
r.renderControl(H);
} else if (h) {
r.write("<header class='sapMListHdr'");
r.writeAttribute("id", c.getId("header"));
r.write(">");
r.writeEscaped(h);
r.write("</header>");
}
var I = c.getInfoToolbar();
if (I) {
I.setDesign(sap.m.ToolbarDesign.Info, true);
I.addStyleClass("sapMListInfoTBar");
r.renderControl(I);
}
var b = c.getItems(true)
, s = c.getShowNoData()
, R = c.shouldRenderItems() && b.length
, T = c.getKeyboardMode() == sap.m.ListKeyboardMode.Edit ? -1 : 0;
if (R || s) {
this.renderDummyArea(r, c, "before", -1);
}
this.renderListStartAttributes(r, c);
r.writeAccessibilityState(c, this.getAccessibilityState(c));
r.addClass("sapMListUl");
r.writeAttribute("id", c.getId("listUl"));
if (R || s) {
r.writeAttribute("tabindex", T);
}
r.addClass("sapMListShowSeparators" + c.getShowSeparators());
r.addClass("sapMListMode" + c.getMode());
c.getInset() && r.addClass("sapMListInset");
r.writeClasses();
r.writeStyles();
r.write(">");
this.renderListHeadAttributes(r, c);
if (R) {
for (var i = 0; i < b.length; i++) {
r.renderControl(b[i]);
}
}
if (!R && s) {
this.renderNoData(r, c);
}
this.renderListEndAttributes(r, c);
if (R || s) {
this.renderDummyArea(r, c, "after", T);
}
this.renderGrowing(r, c);
if (c.getFooterText()) {
r.write("<footer class='sapMListFtr'");
r.writeAttribute("id", c.getId("footer"));
r.write(">");
r.writeEscaped(c.getFooterText());
r.write("</footer>");
}
r.write("</div>");
}
;
a.renderContainerAttributes = function(r, c) {}
;
a.renderListHeadAttributes = function(r, c) {}
;
a.renderListStartAttributes = function(r, c) {
r.write("<ul");
c.addNavSection(c.getId("listUl"));
}
;
a.getAriaRole = function(c) {
return "listbox";
}
;
a.getAriaLabelledBy = function(c) {
var h = c.getHeaderToolbar();
if (h) {
return h.getTitleId();
}
if (c.getHeaderText()) {
return c.getId("header");
}
}
;
a.getAriaDescribedBy = function(c) {
if (c.getFooterText()) {
return c.getId("footer");
}
}
;
a.getAccessibilityState = function(c) {
var m = sap.m.ListMode, M = c.getMode(), b;
if (M == m.MultiSelect) {
b = true;
} else if (M != m.None && M != m.Delete) {
b = false;
}
return {
role: this.getAriaRole(c),
multiselectable: b,
labelledby: {
value: this.getAriaLabelledBy(c),
append: true
},
describedby: {
value: this.getAriaDescribedBy(c),
append: true
}
};
}
;
a.renderListEndAttributes = function(r, c) {
r.write("</ul>");
}
;
a.renderNoData = function(r, c) {
r.write("<li");
r.writeAttribute("tabindex", c.getKeyboardMode() ==
sap.m.ListKeyboardMode.Navigation ? -1 : 0);
r.writeAttribute("id", c.getId("nodata"));
r.addClass("sapMLIB sapMListNoData sapMLIBTypeInactive");
L.addFocusableClasses.call(L, r);
r.writeClasses();
r.write(">");
r.write("<div");
r.addClass("sapMListNoDataText");
r.writeAttribute("id", c.getId("nodata-text"));
r.writeClasses();
r.write(">");
r.writeEscaped(c.getNoDataText(true));
r.write("</div>");
r.write("</li>");
}
;
a.renderDummyArea = function(r, c, A, t) {
r.write("<div");
r.writeAttribute("id", c.getId(A));
r.writeAttribute("tabindex", t);
if (sap.ui.Device.browser.msie) {
r.addClass("sapMListDummyArea").writeClasses();
}
r.write("></div>");
}
;
a.renderGrowing = function(r, c) {
var g = c._oGrowingDelegate;
if (!g) {
return;
}
g.render(r);
}
;
return a;
}, true);
sap.ui.predefine('sap/m/ListItemBase', ['jquery.sap.global', './library',
'sap/ui/core/Control', 'sap/ui/core/IconPool', 'sap/ui/core/Icon'], function(q, l,
C, I, a) {
"use strict";
var L = C.extend("sap.m.ListItemBase", {
metadata: {
library: "sap.m",
properties: {
type: {
type: "sap.m.ListType",
group: "Misc",
defaultValue: sap.m.ListType.Inactive
},
visible: {
type: "boolean",
group: "Appearance",
defaultValue: true
},
unread: {
type: "boolean",
group: "Misc",
defaultValue: false
},
selected: {
type: "boolean",
defaultValue: false
},
counter: {
type: "int",
group: "Misc",
defaultValue: null
}
},
associations: {
ariaLabelledBy: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "ariaLabelledBy"
}
},
events: {
tap: {
deprecated: true
},
detailTap: {
deprecated: true
},
press: {},
detailPress: {}
}
}
});
L.prototype.DetailIconURI = I.getIconURI("edit");
L.prototype.DeleteIconURI = I.getIconURI("sys-cancel");
L.prototype.NavigationIconURI = I.getIconURI("slim-arrow-right");
L.prototype.init = function() {
this._active = false;
this._bGroupHeader = false;
}
;
L.prototype.onAfterRendering = function() {
this.informList("DOMUpdate", true);
}
;
L.prototype.getBindingContextPath = function(m) {
var o = this.getList();
if (o && !m) {
m = (o.getBindingInfo("items") || {}).model;
}
var c = this.getBindingContext(m);
if (c) {
return c.getPath();
}
}
;
L.prototype.isSelectedBoundTwoWay = function() {
var b = this.getBinding("selected");
if (b && b.getBindingMode() == sap.ui.model.BindingMode.TwoWay) {
return true;
}
}
;
L.prototype.getList = function() {
var p = this.getParent();
if (p instanceof sap.m.ListBase) {
return p;
}
}
;
L.prototype.getListProperty = function(p, f) {
var o = this.getList();
if (o) {
p = q.sap.charToUpperCase(p);
return o["get" + p]();
}
return f;
}
;
L.prototype.informList = function(e, p, P) {
var o = this.getList();
if (o) {
var m = "onItem" + e;
if (o[m]) {
o[m](this, p, P);
}
}
}
;
L.prototype.informSelectedChange = function(s) {
var o = this.getList();
if (o) {
o.onItemSelectedChange(this, s);
this.bSelectedDelayed = undefined;
} else {
this.bSelectedDelayed = s;
}
}
;
L.prototype.getMode = function() {
return this.getListProperty("mode", "");
}
;
L.prototype.updateAccessibilityState = function(A) {
var t = this.$();
if (!t.length) {
return;
}
var i = t.parent().children(".sapMLIB");
t.attr(q.extend({
"aria-setsize": i.length,
"aria-posinset": i.index(t) + 1
}, A));
}
;
L.prototype.getDeleteControl = function() {
if (this._oDeleteControl) {
return this._oDeleteControl;
}
this._oDeleteControl = new a({
id: this.getId() + "-imgDel",
src: this.DeleteIconURI,
useIconTooltip: false,
noTabStop: true
}).setParent(this, null,
true).addStyleClass("sapMLIBIconDel").attachPress(function(e) {
this.informList("Delete");
}, this);
return this._oDeleteControl;
}
;
L.prototype.getDetailControl = function() {
if (this._oDetailControl) {
return this._oDetailControl;
}
this._oDetailControl = new a({
id: this.getId() + "-imgDet",
src: this.DetailIconURI,
useIconTooltip: false,
noTabStop: true
}).setParent(this, null, true).attachPress(function() {
this.fireDetailTap();
this.fireDetailPress();
}, this).addStyleClass("sapMLIBType sapMLIBIconDet");
return this._oDetailControl;
}
;
L.prototype.getNavigationControl = function() {
if (this._oNavigationControl) {
return this._oNavigationControl;
}
this._oNavigationControl = new a({
id: this.getId() + "-imgNav",
src: this.NavigationIconURI,
useIconTooltip: false,
noTabStop: true
}).setParent(this, null, true).addStyleClass("sapMLIBType sapMLIBImgNav");
return this._oNavigationControl;
}
;
L.prototype.getSingleSelectControl = function() {
if (this._oSingleSelectControl) {
return this._oSingleSelectControl;
}
this._oSingleSelectControl = new sap.m.RadioButton({
id: this.getId() + "-selectSingle",
groupName: this.getListProperty("id") + "_selectGroup",
activeHandling: false,
selected: this.getSelected()
}).setParent(this, null, true).setTabIndex(-1).attachSelect(function(e) {
var s = e.getParameter("selected");
this.setSelected(s);
this.informList("Select", s);
}, this);
return this._oSingleSelectControl;
}
;
L.prototype.getMultiSelectControl = function() {
if (this._oMultiSelectControl) {
return this._oMultiSelectControl;
}
this._oMultiSelectControl = new sap.m.CheckBox({
id: this.getId() + "-selectMulti",
activeHandling: false,
selected: this.getSelected()
}).setParent(this, null, true).setTabIndex(-1).attachSelect(function(e) {
var s = e.getParameter("selected");
this.setSelected(s);
this.informList("Select", s);
}, this);
return this._oMultiSelectControl;
}
;
L.prototype.getModeControl = function(u) {
var m = this.getMode()
, b = sap.m.ListMode;
if (!m || m == b.None) {
return;
}
if (m == b.Delete) {
return this.getDeleteControl();
}
var s = null;
if (m == b.MultiSelect) {
s = this.getMultiSelectControl();
} else {
s = this.getSingleSelectControl();
}
if (s && u) {
s.setSelected(this.getSelected());
}
return s;
}
;
L.prototype.getTypeControl = function() {
var t = this.getType()
, T = sap.m.ListType;
if (t == T.Detail || t == T.DetailAndActive) {
return this.getDetailControl();
}
if (t == T.Navigation) {
return this.getNavigationControl();
}
}
;
L.prototype.destroyControls = function(c) {
c.forEach(function(s) {
s = "_o" + s + "Control";
if (this[s]) {
this[s].destroy("KeepDom");
this[s] = null;
}
}, this);
}
;
L.prototype.isActionable = function() {
return this.getListProperty("includeItemInSelection") || this.getMode() ==
sap.m.ListMode.SingleSelectMaster || (this.getType() != sap.m.ListType.Inactive &&
this.getType() != sap.m.ListType.Detail);
}
;
L.prototype.exit = function() {
this._oLastFocused = null;
this.setActive(false);
this.destroyControls(["Delete", "SingleSelect", "MultiSelect", "Detail",
"Navigation"]);
}
;
L.prototype.isSelectable = function() {
var m = this.getMode();
return !(m == sap.m.ListMode.None || m == sap.m.ListMode.Delete);
}
;
L.prototype.getSelected = function() {
if (this.isSelectable()) {
return this.getProperty("selected");
}
return false;
}
;
L.prototype.isSelected = L.prototype.getSelected;
L.prototype.setSelected = function(s, d) {
s = this.validateProperty("selected", s);
if (!this.isSelectable() || s == this.getSelected()) {
return this;
}
if (!d) {
this.informSelectedChange(s);
}
var S = this.getModeControl();
if (S) {
S.setSelected(s);
}
this.updateSelectedDOM(s, this.$());
this.setProperty("selected", s, true);
return this;
}
;
L.prototype.updateSelectedDOM = function(s, t) {
t.toggleClass("sapMLIBSelected", s);
t.attr("aria-selected", s);
}
;
L.prototype.setParent = function(p) {
C.prototype.setParent.apply(this, arguments);
if (!p) {
this._bGroupHeader = false;
return;
}
this.informList("Inserted", this.bSelectedDelayed);
return this;
}
;
L.prototype.setBindingContext = function() {
C.prototype.setBindingContext.apply(this, arguments);
this.informList("BindingContextSet");
return this;
}
;
L.prototype.isGroupHeader = function() {
return this._bGroupHeader;
}
;
L.prototype.isIncludedIntoSelection = function() {
var m = this.getMode()
, M = sap.m.ListMode;
return (m == M.SingleSelectMaster ||
(this.getListProperty("includeItemInSelection") && (m == M.SingleSelectLeft || m ==
M.SingleSelect || m == M.MultiSelect)));
}
;
L.prototype.hasActiveType = function() {
var t = sap.m.ListType
, T = this.getType();
return (T == t.Active || T == t.Navigation || T == t.DetailAndActive);
}
;
L.prototype.setActive = function(A) {
if (A == this._active) {
return this;
}
if (A && this.getListProperty("activeItem")) {
return this;
}
var t = this.$();
this._active = A;
this._activeHandling(t);
if (this.getType() == sap.m.ListType.Navigation) {
this._activeHandlingNav(t);
}
if (A) {
this._activeHandlingInheritor(t);
} else {
this._inactiveHandlingInheritor(t);
}
this.informList("ActiveChange", A);
}
;
L.prototype.ontap = function(e) {
if (this._eventHandledByControl) {
return;
}
if (this.isIncludedIntoSelection()) {
if (this.getMode() == sap.m.ListMode.MultiSelect) {
this.setSelected(!this.getSelected());
this.informList("Select", this.getSelected());
} else if (!this.getSelected()) {
this.setSelected(true);
this.informList("Select", true);
}
} else if (this.hasActiveType()) {
window.clearTimeout(this._timeoutIdStart);
window.clearTimeout(this._timeoutIdEnd);
this.setActive(true);
q.sap.delayedCall(180, this, function() {
this.setActive(false);
});
q.sap.delayedCall(0, this, function() {
this.fireTap();
this.firePress();
});
}
this.informList("Press", e.srcControl);
}
;
L.prototype.ontouchstart = function(e) {
this._eventHandledByControl = e.isMarked();
var t = e.targetTouches[0];
this._touchedY = t.clientY;
this._touchedX = t.clientX;
if (this._eventHandledByControl || e.touches.length != 1 || !
this.hasActiveType()) {
return;
}
this._timeoutIdStart = q.sap.delayedCall(100, this, function() {
this.setActive(true);
e.setMarked();
});
}
;
L.prototype.ontouchmove = function(e) {
if ((this._active || this._timeoutIdStart) && (Math.abs(this._touchedY -
e.targetTouches[0].clientY) > 10 || Math.abs(this._touchedX -
e.targetTouches[0].clientX) > 10)) {
clearTimeout(this._timeoutIdStart);
this._timeoutIdStart = null;
this._timeoutIdEnd = null;
this.setActive(false);
}
}
;
L.prototype.ontouchend = function(e) {
if (e.targetTouches.length == 0 && this.hasActiveType()) {
this._timeoutIdEnd = q.sap.delayedCall(100, this, function() {
this.setActive(false);
});
}
}
;
L.prototype.ontouchcancel = L.prototype.ontouchend;
L.prototype._activeHandlingNav = function() {}
;
L.prototype._activeHandlingInheritor = function() {}
;
L.prototype._inactiveHandlingInheritor = function() {}
;
L.prototype._activeHandling = function(t) {
t.toggleClass("sapMLIBActive", this._active);
if (this.isActionable()) {
t.toggleClass("sapMLIBHoverable", !this._active);
}
}
;
L.prototype.onsapspace = function(e) {
if (e.srcControl !== this) {
return;
}
e.preventDefault();
if (e.isMarked() || !this.isSelectable()) {
return;
}
if (this.getMode() == sap.m.ListMode.MultiSelect) {
this.setSelected(!this.getSelected());
this.informList("Select", this.getSelected());
} else if (!this.getSelected()) {
this.setSelected(true);
this.informList("Select", true);
}
e.setMarked();
}
;
L.prototype.onsapenter = function(e) {
var o = this.getList();
if (e.isMarked() || !o) {
return;
}
var k = sap.m.ListKeyboardMode;
if (e.srcControl !== this && o.getKeyboardMode() == k.Edit) {
o.setKeyboardMode(k.Navigation);
this._switchFocus(e);
return;
}
if (e.srcControl !== this) {
return;
}
if (this.isIncludedIntoSelection()) {
this.onsapspace(e);
} else if (this.hasActiveType()) {
e.setMarked();
this.setActive(true);
q.sap.delayedCall(180, this, function() {
this.setActive(false);
});
q.sap.delayedCall(0, this, function() {
this.fireTap();
this.firePress();
});
}
o.onItemPress(this, e.srcControl);
}
;
L.prototype.onsapdelete = function(e) {
if (e.isMarked() || e.srcControl !== this || this.getMode() !=
sap.m.ListMode.Delete) {
return;
}
this.informList("Delete");
e.preventDefault();
e.setMarked();
}
;
L.prototype._switchFocus = function(e) {
var o = this.getList();
if (!o) {
return;
}
var t = this.getTabbables();
if (e.srcControl !== this) {
o._iLastFocusPosOfItem = t.index(e.target);
this.focus();
} else if (t.length) {
var f = o._iLastFocusPosOfItem || 0;
f = t[f] ? f : -1;
t.eq(f).focus();
}
e.preventDefault();
e.setMarked();
}
;
L.prototype.onkeydown = function(e) {
if (e.isMarked()) {
return;
}
var k = q.sap.KeyCodes;
if (e.which == k.F7) {
this._switchFocus(e);
return;
}
if (e.which == k.F2) {
if (e.srcControl === this && this.getType().indexOf("Detail") == 0 &&
this.hasListeners("detailPress") || this.hasListeners("detailTap")) {
this.fireDetailTap();
this.fireDetailPress();
e.preventDefault();
e.setMarked();
} else {
var o = this.getList();
if (o) {
this.$().prop("tabIndex", -1);
var K = sap.m.ListKeyboardMode;
o.setKeyboardMode(o.getKeyboardMode() == K.Edit ?
K.Navigation : K.Edit);
this._switchFocus(e);
}
}
}
}
;
L.prototype.getTabbables = function() {
return this.$().find(":sapTabbable");
}
;
L.prototype.onsaptabnext = function(e) {
var o = this.getList();
if (!o || e.isMarked() || o.getKeyboardMode() ==
sap.m.ListKeyboardMode.Edit) {
return;
}
var b = this.getTabbables().get(-1) || this.getDomRef();
if (e.target === b) {
o.forwardTab(true);
e.setMarked();
}
}
;
L.prototype.onsaptabprevious = function(e) {
var o = this.getList();
if (!o || e.isMarked() || o.getKeyboardMode() ==
sap.m.ListKeyboardMode.Edit) {
return;
}
if (e.target === this.getDomRef()) {
o.forwardTab(false);
e.setMarked();
}
}
;
L.prototype.onfocusin = function(e) {
var o = this.getList();
if (!o || e.isMarked() || o.getKeyboardMode() ==
sap.m.ListKeyboardMode.Edit || e.srcControl === this || !
q(e.target).is(":sapFocusable")) {
return;
}
q.sap.delayedCall(0, o, "setItemFocusable", [this]);
e.setMarked();
}
;
L.prototype.onsapup = function(e) {
if (e.isMarked() || e.srcControl === this ||
this.getListProperty("keyboardMode") === sap.m.ListKeyboardMode.Navigation) {
return;
}
this.informList("ArrowUpDown", e);
}
;
L.prototype.onsapdown = L.prototype.onsapup;
return L;
}, true);
sap.ui.predefine('sap/m/ListItemBaseRenderer', ['jquery.sap.global',
'sap/ui/core/IconPool', 'sap/ui/core/theming/Parameters'], function(q, I, P) {
"use strict";
var L = {};
var a = {};
L.renderInvisible = function(r, l) {
this.openItemTag(r, l);
r.writeInvisiblePlaceholderData(l);
r.write(">");
this.closeItemTag(r, l);
}
;
L.isModeMatched = function(m, o) {
var O = (sap.m.ListBaseRenderer || {}).ModeOrder || {};
return (O[m] == o);
}
;
L.renderMode = function(r, l, o) {
var m = l.getMode();
if (!this.isModeMatched(m, o)) {
return;
}
var M = l.getModeControl(true);
if (M) {
this.renderModeContent(r, l, M);
}
}
;
L.renderModeContent = function(r, l, m) {
var M = l.getMode()
, b = {
Delete: "D",
MultiSelect: "M",
SingleSelect: "S",
SingleSelectLeft: "SL"
};
r.write("<div");
r.writeAttribute("id", l.getId() + "-mode");
r.addClass("sapMLIBSelect" + b[M]);
this.decorateMode(r, l);
r.writeClasses();
r.writeStyles();
r.write(">");
r.renderControl(m);
r.write("</div>");
}
;
L.decorateMode = function(r, l) {
if (!sap.ui.getCore().getConfiguration().getAnimation() || !
l.getListProperty("modeAnimationOn")) {
return;
}
var m = l.getMode()
, s = l.getListProperty("lastMode");
if (!s || s == m) {
return;
}
if (m == sap.m.ListMode.None) {
r.addClass("sapMLIBUnselectAnimation");
} else {
r.addClass("sapMLIBSelectAnimation");
}
}
;
L.renderCounter = function(r, l) {
var c = l.getCounter();
if (c) {
this.renderCounterContent(r, l, c);
}
}
;
L.renderCounterContent = function(r, l, c) {
r.write("<div");
r.writeAttribute("id", l.getId() + "-counter");
var A =
sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("LIST_ITEM_COUNTER", c);
r.writeAttribute("aria-label", A);
r.addClass("sapMLIBCounter");
r.writeClasses();
r.write(">");
r.write(c);
r.write("</div>");
}
;
L.renderType = function(r, l) {
var t = l.getTypeControl();
if (t) {
r.renderControl(t);
}
}
;
L.openItemTag = function(r, l) {
r.write("<li");
}
;
L.closeItemTag = function(r, l) {
r.write("</li>");
}
;
L.handleNoFlex = function(r, l) {
return !q.support.hasFlexBoxSupport;
}
;
L.renderTabIndex = function(r, l) {
r.writeAttribute("tabindex", "-1");
}
;
L.renderTooltip = function(r, l) {
var t = l.getTooltip_AsString();
if (t) {
r.writeAttributeEscaped("title", t);
}
}
;
L.addFocusableClasses = function(r, l) {
if (sap.ui.Device.system.desktop) {
r.addClass("sapMLIBFocusable");
this.addLegacyOutlineClass(r, l);
}
}
;
L.addLegacyOutlineClass = function(r, l) {
if (sap.ui.Device.browser.msie) {
r.addClass("sapMLIBLegacyOutline");
}
}
;
L.getAriaAnnouncement = function(k, b) {
if (a[k]) {
return a[k];
}
b = b || "LIST_ITEM_" + k.toUpperCase();
a[k] = new sap.ui.core.InvisibleText({
text: sap.ui.getCore().getLibraryResourceBundle("sap.m").getText(b)
}).toStatic().getId();
return a[k];
}
;
L.getAriaRole = function(l) {
return "option";
}
;
L.getAriaLabelledBy = function(l) {
if (l.getAriaLabelledBy().length) {
return l.getId();
}
}
;
L.getAriaDescribedBy = function(l) {
var d = []
, t = l.getType()
, T = sap.m.ListType;
if (l.getListProperty("showUnread") && l.getUnread()) {
d.push(this.getAriaAnnouncement("unread"));
}
if (l.getMode() == sap.m.ListMode.Delete) {
d.push(this.getAriaAnnouncement("deletable"));
}
if (t == T.Navigation) {
d.push(this.getAriaAnnouncement("navigation"));
} else {
if (t == T.Detail || t == T.DetailAndActive) {
d.push(this.getAriaAnnouncement("detail"));
}
if (t == T.Active || t == T.DetailAndActive) {
d.push(this.getAriaAnnouncement("active"));
}
}
return d.join(" ");
}
;
L.getAccessibilityState = function(l) {
var A = this.getAriaLabelledBy(l)
, s = this.getAriaDescribedBy(l)
, m = {
role: this.getAriaRole(l)
};
if (l.isSelectable()) {
m.selected = l.getProperty("selected");
}
if (A) {
m.labelledby = {
value: A.trim(),
append: true
};
}
if (s) {
m.describedby = {
value: s.trim(),
append: true
};
}
return m;
}
;
L.renderLIContent = function(r, l) {}
;
L.renderLIAttributes = function(r, l) {}
;
L.renderLIContentWrapper = function(r, l) {
r.write('<div class="sapMLIBContent"');
r.writeAttribute("id", l.getId() + "-content");
r.write(">");
if (this.handleNoFlex()) {
r.write('<div class="sapMLIBContentNF">');
}
this.renderLIContent(r, l);
if (this.handleNoFlex()) {
r.write('</div>');
}
r.write('</div>');
}
;
L.render = function(r, l) {
if (!l.getVisible()) {
this.renderInvisible(r, l);
return false;
}
this.openItemTag(r, l);
r.writeControlData(l);
r.addClass("sapMLIB");
r.addClass("sapMLIB-CTX");
r.addClass("sapMLIBShowSeparator");
r.addClass("sapMLIBType" + l.getType());
if (sap.ui.Device.system.desktop && l.isActionable()) {
r.addClass("sapMLIBActionable");
r.addClass("sapMLIBHoverable");
}
if (l.getSelected()) {
r.addClass("sapMLIBSelected");
}
if (this.handleNoFlex()) {
r.addClass("sapMLIBNoFlex");
}
if (l.getListProperty("showUnread") && l.getUnread()) {
r.addClass("sapMLIBUnread");
}
this.addFocusableClasses(r, l);
this.renderTooltip(r, l);
this.renderTabIndex(r, l);
if (sap.ui.getCore().getConfiguration().getAccessibility()) {
r.writeAccessibilityState(l, this.getAccessibilityState(l));
}
this.renderLIAttributes(r, l);
r.writeClasses();
r.writeStyles();
r.write(">");
this.renderMode(r, l, -1);
this.renderLIContentWrapper(r, l);
this.renderCounter(r, l);
this.renderType(r, l);
this.renderMode(r, l, 1);
this.closeItemTag(r, l);
}
;
return L;
}, true);
sap.ui.predefine('sap/m/ListRenderer', ['jquery.sap.global',
'sap/ui/core/Renderer', './ListBaseRenderer'], function(q, R, L) {
"use strict";
var a = R.extend(L);
a.render = function(r, c) {
if (!c.getColumns().length) {
L.render.call(this, r, c);
return;
}
if (c._isColumnsIncompatible()) {
q.sap.log.warning("Does not render sap.m.List#" + c.getId() + " with
columns aggregation when compatibility version is 1.16 or higher. Instead use
sap.m.Table control!");
return;
}
q.sap.require("sap.m.TableRenderer");
var o = q.extend({}, this, sap.m.TableRenderer);
L.render.call(o, r, c);
}
;
return a;
}, true);
jQuery.sap.registerPreloadedModules({
"version": "2.0",
"modules": {
// Copyright (c) 2009-2014 SAP SE, All Rights Reserved
"sap/ushell/services/Container.js": function() {
(function() {
"use strict";
var S = "sap.ushell.services.Container", a =
"sap.ushell.Container.dirtyState.", c, p, f;
jQuery.sap.declare(S);
jQuery.sap.require("sap.ushell.utils");
jQuery.sap.require("sap.ushell.System");
function b() {
close();
}
function r() {
document.location = "about:blank";
}
function g(P) {
if (p && p[P]) {
return p[P];
}
return "sap.ushell.adapters." + P;
}
function d(s) {
return (c.services && c.services[s]) || {};
}
function h(n, s, P) {
var A = d(n).adapter || {}
, e = A.module || g(s.getPlatform()) + "." + n + "Adapter";
jQuery.sap.require(e);
return new (jQuery.sap.getObject(e))(s,P,{
config: A.config || {}
});
}
function C(A) {
var E = new sap.ui.base.EventProvider(), j = false, R = [], o =
{}, s = "sap.ushell.Container." + A.getSystem().getPlatform() + ".remoteSystem.", m
= {}, G, k, l = sap.ushell.utils.getLocalStorage(), n = new sap.ushell.utils.Map(),
q = "sap.ushell.Container." + A.getSystem().getPlatform() + ".sessionTermination",
t = this;
this.cancelLogon = function() {
if (this.oFrameLogonManager) {
this.oFrameLogonManager.cancelXHRLogon();
}
}
;
this.createRenderer = function(e) {
var i, w, x, y, z;
e = e || c.defaultRenderer;
if (!e) {
throw new Error("Missing renderer name");
}
z = (c.renderers && c.renderers[e]) || {};
w = z.module || (e.indexOf(".") < 0 ?
"sap.ushell.renderers." + e + ".Renderer" : e);
jQuery.sap.require(w);
if (z.componentData && z.componentData.config) {
i = {
config: z.componentData.config
};
}
x = new (jQuery.sap.getObject(w))({
componentData: i
});
if (x instanceof sap.ui.core.UIComponent) {
y = new sap.ui.core.ComponentContainer({
component: x,
height: "100%",
width: "100%"
});
} else {
y = x;
}
if (!(y instanceof sap.ui.core.Control)) {
throw new Error("Unsupported renderer type for name " +
e);
}
o[e] = y;
E.fireEvent("rendererCreated", {
renderer: x
});
return y;
}
;
this.getRenderer = function(e) {
var i, w;
e = e || c.defaultRenderer;
if (e) {
i = o[e];
} else {
w = Object.keys(o);
if (w.length === 1) {
i = o[w[0]];
} else {
jQuery.sap.log.warning("getRenderer() - cannot
determine renderer, because no default renderer is configured and multiple
instances exist.", undefined, S);
}
}
if (i instanceof sap.ui.core.ComponentContainer) {
return i.getComponentInstance();
}
return i;
}
;
this.DirtyState = {
CLEAN: "CLEAN",
DIRTY: "DIRTY",
MAYBE_DIRTY: "MAYBE_DIRTY",
PENDING: "PENDING",
INITIAL: "INITIAL"
};
this.getGlobalDirty = function() {
var i, D = new jQuery.Deferred(), U = jQuery.sap.uid(), w,
P = 0, x = this.DirtyState.CLEAN;
function y() {
if (P === 0 || x === t.DirtyState.DIRTY) {
D.resolve(x);
jQuery.sap.log.debug("getGlobalDirty() Resolving: "
+ x, null, "sap.ushell.Container");
}
}
function z(B) {
if (B.key.indexOf(a) === 0 && B.newValue !==
t.DirtyState.INITIAL && B.newValue !== t.DirtyState.PENDING) {
jQuery.sap.log.debug("getGlobalDirty() Receiving
event key: " + B.key + " value: " + B.newValue, null, "sap.ushell.Container");
if (B.newValue === t.DirtyState.DIRTY || B.newValue
=== t.DirtyState.MAYBE_DIRTY) {
x = B.newValue;
}
P -= 1;
y();
}
}
try {
l.setItem(U, "CHECK");
l.removeItem(U);
} catch (e) {
jQuery.sap.log.warning("Error calling
localStorage.setItem(): " + e, null, "sap.ushell.Container");
return
D.resolve(this.DirtyState.MAYBE_DIRTY).promise();
}
if (G) {
throw new Error("getGlobalDirty already called!");
}
G = D;
window.addEventListener('storage', z);
D.always(function() {
window.removeEventListener('storage', z);
G = undefined;
});
for (i = l.length - 1; i >= 0; i -= 1) {
w = l.key(i);
if (w.indexOf(a) === 0) {
if (l.getItem(w) === 'PENDING') {
l.removeItem(w);
jQuery.sap.log.debug("getGlobalDirty() Cleanup
of unresolved 'PENDINGS':" + w, null, "sap.ushell.Container");
} else {
P += 1;
sap.ushell.utils.localStorageSetItem(w,
this.DirtyState.PENDING, true);
jQuery.sap.log.debug("getGlobalDirty()
Requesting status for: " + w, null, "sap.ushell.Container");
}
}
}
y();
setTimeout(function() {
if (D.state() !== "resolved") {
D.resolve('MAYBE_DIRTY');
jQuery.sap.log.debug("getGlobalDirty() Timeout
reached, - resolved 'MAYBE_DIRTY'", null, "sap.ushell.Container");
}
}, P * 2000);
return D.promise();
}
;
this.getLogonSystem = function() {
return A.getSystem();
}
;
this.getUser = function() {
return A.getUser();
}
;
this.getDirtyFlag = function() {
for (var i = 0; i < R.length; i++) {
j = j || R[i].call();
}
return j;
}
;
this.setDirtyFlag = function(i) {
j = i;
}
;
this.registerDirtyStateProvider = function(D) {
if (typeof D !== "function") {
throw new Error("fnDirty must be a function");
}
R.push(D);
}
;
this.getService = function(e, P) {
var i = {}, M, K, w, x, y, z, B;
function D(F) {
var H = new jQuery.Deferred();
if (!F) {
throw new Error("Missing system");
}
H.resolve(h(e, F, P));
sap.ushell.Container.addRemoteSystem(F);
return H.promise();
}
if (!e) {
throw new Error("Missing service name");
}
if (e.indexOf(".") >= 0) {
throw new Error("Unsupported service name");
}
z = d(e);
M = z.module || "sap.ushell.services." + e;
K = M + "/" + (P || "");
B = {
config: z.config || {}
};
if (!n.containsKey(K)) {
jQuery.sap.require(M);
w = jQuery.sap.getObject(M);
if (w.hasNoAdapter === true) {
x = new w(i,P,B);
} else {
y = h(e, A.getSystem(), P);
i.createAdapter = D;
x = new w(y,i,P,B);
}
n.put(K, x);
return x;
}
return n.get(K);
}
;
function u() {
var w, x, i, K;
for (i = l.length - 1; i >= 0; i -= 1) {
K = l.key(i);
if (K.indexOf(s) === 0) {
try {
w = K.substring(s.length);
x = JSON.parse(l.getItem(K));
m[w] = new sap.ushell.System(x);
} catch (e) {
l.removeItem(K);
}
}
}
return m;
}
function v() {
function e(i, w, F) {
jQuery.sap.log.warning(i, null,
"sap.ushell.Container");
if (F) {
setTimeout(F.bind(null, i), 5000);
}
return {
abort: function() {
return;
}
};
}
OData.read = function(i, w, F) {
return e("OData.read('" + (i && i.Uri ? i.requestUri :
i) + "') disabled during logout processing", w, F);
}
;
OData.request = function(i, w, F) {
return e("OData.request('" + (i ? i.requestUri : "") +
"') disabled during logout processing", w, F);
}
;
}
this.addRemoteSystem = function(e) {
var i = e.getAlias()
, O = m[i];
if (O) {
if (O.toString() === e.toString()) {
return;
}
jQuery.sap.log.warning("Replacing " + O + " by " + e,
null, "sap.ushell.Container");
} else {
jQuery.sap.log.debug("Added " + e, null,
"sap.ushell.Container");
}
m[i] = e;
sap.ushell.utils.localStorageSetItem(s + i, e);
}
;
this.addRemoteSystemForServiceUrl = function(e) {
var M, i = {
baseUrl: ";o="
};
if (!e || e.charAt(0) !== '/' || e.indexOf('//') === 0) {
return;
}
M = /^[^?]*;o=([^\/;?]*)/.exec(e);
if (M && M.length >= 2) {
i.alias = M[1];
}
e = e.replace(/;[^\/?]*/g, "");
if (/^\/sap\/(bi|hana|hba)\//.test(e)) {
i.platform = "hana";
i.alias = i.alias || "hana";
} else if (/^\/sap\/opu\//.test(e)) {
i.platform = "abap";
}
if (i.alias && i.platform) {
this.addRemoteSystem(new sap.ushell.System(i));
}
}
;
this.attachLogoutEvent = function(F) {
E.attachEvent("Logout", F);
}
;
this.detachLogoutEvent = function(F) {
E.detachEvent("Logout", F);
}
;
this.attachRendererCreatedEvent = function(F) {
E.attachEvent("rendererCreated", F);
}
;
this.detachRendererCreatedEvent = function(F) {
E.detachEvent("rendererCreated", F);
}
;
this.logout = function() {
var D = new jQuery.Deferred();
function i() {
A.logout(true).always(function() {
l.removeItem(q);
D.resolve();
});
}
function w() {
if (E.fireEvent("Logout", true)) {
i();
} else {
setTimeout(i, 1000);
}
}
function x() {
var m, y = [];
if (k) {
window.removeEventListener('storage', k);
}
sap.ushell.utils.localStorageSetItem(q, "pending");
t._suppressOData();
m = t._getRemoteSystems();
Object.keys(m).forEach(function(z) {
try {
y.push(h("Container", m[z]).logout(false));
} catch (e) {
jQuery.sap.log.warning("Could not create
adapter for " + z, e.toString(), "sap.ushell.Container");
}
l.removeItem(s + z);
});
jQuery.when.apply(jQuery, y).done(w);
}
if (typeof A.addFurtherRemoteSystems === 'function') {
A.addFurtherRemoteSystems().always(x);
} else {
x();
}
return D.promise();
}
;
this.setLogonFrameProvider = function(L) {
if (this.oFrameLogonManager) {
this.oFrameLogonManager.setLogonFrameProvider(L);
}
}
;
this._closeWindow = b;
this._redirectWindow = r;
this._getRemoteSystems = u;
this._suppressOData = v;

sap.ui.getCore().getEventBus().subscribe("sap.ushell.Container",
"addRemoteSystemForServiceUrl", function(e, i, D) {
t.addRemoteSystemForServiceUrl(D);
});
if (typeof A.logoutRedirect === 'function') {
k = function(e) {
function i() {
t._closeWindow();
t._redirectWindow();
}
if (sap.ushell.Container !== t) {
return;
}
if (e.key.indexOf(s) === 0 && e.newValue &&
e.newValue !== l.getItem(e.key)) {
sap.ushell.utils.localStorageSetItem(e.key,
e.newValue);
}
if (e.key === q) {
if (e.newValue === "pending") {
t._suppressOData();
if (E.fireEvent("Logout", true)) {
i();
} else {
setTimeout(i, 1000);
}
}
}
}
;
window.addEventListener('storage', k);
}
}
sap.ushell.bootstrap = function(P, A) {
var o, e;
if (sap.ushell.Container !== undefined) {
e = new Error("Unified shell container is already
initialized - cannot initialize twice.\nStacktrace of first initialization:" + f);
jQuery.sap.log.error(e, e.stack, S);
throw e;
}
sap.ushell.Container = null;
f = (new Error()).stack;
c = jQuery.extend({}, true, window["sap-ushell-config"] || {});
p = A;
if (typeof window["sap.ushell.bootstrap.callback"] ===
"function") {
setTimeout(window["sap.ushell.bootstrap.callback"]);
}
if (c.modulePaths) {
Object.keys(c.modulePaths).forEach(function(m) {
jQuery.sap.registerModulePath(m, c.modulePaths[m]);
});
}
o = h("Container", new sap.ushell.System({
alias: "",
platform: c.platform || P
}));
return o.load().done(function() {
sap.ushell.Container = new C(o);

sap.ushell.Container.getService("PluginManager").registerPlugins(c.bootstrapPlugins
);
});
}
;
}());
},
"sap/ushell/services/CrossApplicationNavigation.js": function() {
(function() {
"use strict";

jQuery.sap.declare("sap.ushell.services.CrossApplicationNavigation");
jQuery.sap.require("sap.ushell.services.Personalization");
jQuery.sap.require("jquery.sap.storage");
sap.ushell.services.CrossApplicationNavigation = function(c, p, s)
{
var a, S;
if (s && s.config) {
S = s.config;
}
function g(t, C) {
var r, d, e, o, f, h;
if (typeof t !== "string" && !jQuery.isPlainObject(t) &&
t !== undefined) {
jQuery.sap.log.error("Unexpected input type", null,
"sap.ushell.services.CrossApplicationNavigation");
return undefined;
}
if (t === undefined) {
return undefined;
}
var n;
if (C) {
if (typeof C.getComponentData !== "function" || !
jQuery.isPlainObject(C.getComponentData()) || !
C.getComponentData().startupParameters || !
jQuery.isPlainObject(C.getComponentData().startupParameters)) {
jQuery.sap.log.error("Cannot call getComponentData
on component", "the component should be an application root component",
"sap.ushell.services.CrossApplicationNavigation");
} else {
h = C.getComponentData().startupParameters;
if (h.hasOwnProperty("sap-system")) {
e = h["sap-system"][0];
}
if (h.hasOwnProperty("sap-ushell-next-navmode")) {
n = h["sap-ushell-next-navmode"][0];
}
}
} else {
r =
sap.ushell.Container.getService("NavTargetResolution").getCurrentResolution();
if (r && r["sap-system"]) {
e = r["sap-system"];
} else if (r && r.url) {
e = jQuery.sap.getUriParameters(r.url).get("sap-
system");
}
if (r && r["sap-ushell-next-navmode"]) {
n = r["sap-ushell-next-navmode"];
} else if (r && r.url) {
n = jQuery.sap.getUriParameters(r.url).get("sap-
ushell-next-navmode");
}
}
if (jQuery.isPlainObject(t)) {
o = jQuery.extend(true, {}, t);
if (!e && !n) {
return o;
}
if (o.target && o.target.shellHash) {
if (typeof o.target.shellHash === "string") {
o.target.shellHash = g(o.target.shellHash, C);
}
return o;
}
o.params = o.params || {};
if (e && !
Object.prototype.hasOwnProperty.call(o.params, "sap-system")) {
o.params["sap-system"] = e;
}
if (n && !
Object.prototype.hasOwnProperty.call(o.params, "sap-ushell-navmode")) {
o.params["sap-ushell-navmode"] = [n];
}
return o;
} else {
f = t;
if (!(e || n)) {
return f;
}
if (e && !/[?&]sap-system=/.test(f)) {
d = (f.indexOf("?") > -1) ? "&" : "?";
f += d + "sap-system=" + e;
}
if (n && !/[?&]sap-ushell-navmode=/.test(f)) {
d = (f.indexOf("?") > -1) ? "&" : "?";
f += d + "sap-ushell-navmode=" + n;
}
return f;
}
}
function b(t) {
var d, C, e;
if (localStorage && localStorage["sap-ushell-enc-test"] ===
"false") {
return t;
}
if (!S || !S["sap-ushell-enc-test"]) {
if (localStorage && localStorage["sap-ushell-enc-test"]
!== "true") {
return t;
}
}
if (typeof t !== "string" && !jQuery.isPlainObject(t) &&
t !== undefined) {
jQuery.sap.log.error("Unexpected input type", null,
"sap.ushell.services.CrossApplicationNavigation");
return undefined;
}
if (t === undefined) {
return undefined;
}
if (jQuery.isPlainObject(t)) {
C = jQuery.extend(true, {}, t);
if (C.target && C.target.shellHash) {
if (typeof C.target.shellHash === "string") {
if (C.target.shellHash !== "#" &&
C.target.shellHash !== "") {
C.target.shellHash = b(C.target.shellHash);
}
}
return C;
}
C.params = C.params || {};
C.params["sap-ushell-enc-test"] = ["A B%20C"];
return C;
} else {
e = t;
if (!/[?&]sap-system=/.test(e)) {
d = (e.indexOf("?") > -1) ? "&" : "?";
e += d + "sap-ushell-enc-test=" +
encodeURIComponent("A B%20C");
}
return e;
}
}
this.hrefForExternal = function(A, C, d) {
var o;
if (sap.ushell && sap.ushell.services &&
sap.ushell.Container && typeof sap.ushell.Container.getService === "function" &&
sap.ushell.Container.getService("ShellNavigation")) {
o = g(A, C);
o = b(o);
return
sap.ushell.Container.getService("ShellNavigation").hrefForExternal(o, undefined, C,
d);
}
jQuery.sap.log.debug("Shell not available, no Cross App
Navigation");
if (d) {
return (new jQuery.Deferred()).resolve("").promise();
}
return "";
}
;
this.expandCompactHash = function(h) {
return
sap.ushell.Container.getService("NavTargetResolution").expandCompactHash(h);
}
;
this.backToPreviousApp = function() {
this.historyBack();
}
;
this.historyBack = function() {
window.history.back();
}
;
this.isInitialNavigation = function() {
var o = sap.ushell && sap.ushell.Container && typeof
sap.ushell.Container.getService === "function" &&
sap.ushell.Container.getService("ShellNavigation");
if (!o) {
jQuery.sap.log.debug("ShellNavigation service not
available", "This will be treated as the initial navigation",
"sap.ushell.services.CrossApplicationNavigation");
return true;
}
var i = o.isInitialNavigation();
if (typeof i === "undefined") {
return true;
}
return i;
}
;
this.toExternal = function(A, C) {
var o;
if (sap.ushell && sap.ushell.services &&
sap.ushell.Container && typeof sap.ushell.Container.getService === "function" &&
sap.ushell.Container.getService("ShellNavigation")) {
o = g(A, C);
o = b(o);

sap.ushell.Container.getService("ShellNavigation").toExternal(o, C);
return;
}
jQuery.sap.log.debug("Shell not avialable, no Cross App
Navigation");
return;
}
;
this.hrefForAppSpecificHash = function(A) {
if (sap.ushell && sap.ushell.services &&
sap.ushell.Container && typeof sap.ushell.Container.getService === "function" &&
sap.ushell.Container.getService("ShellNavigation")) {
return
sap.ushell.Container.getService("ShellNavigation").hrefForAppSpecificHash(A);
}
jQuery.sap.log.debug("Shell not available, no Cross App
Navigation; fallback to app-specific part only");
return "#" + encodeURI(A);
}
;
this.getSemanticObjectLinks = function(d, P, i, C, A, e) {
var m, o, E;
m = g({
params: P
}, C).params;
m = b({
params: m
}).params;
o = sap.ushell.Container.getService("NavTargetResolution");
var v;
if (jQuery.isArray(d)) {
v = [];
d.forEach(function(f) {
v.push([{
semanticObject: f[0],
params: f[1],
ignoreFormFactor: !!f[2],
ui5Component: f[3],
appStateKey: f[4],
compactIntents: !!(f[5])
}]);
});
} else {
v = {
semanticObject: d,
params: m,
ignoreFormFactor: i,
ui5Component: C,
appStateKey: A,
compactIntents: !!e
};
}
E =
sap.ushell.utils.invokeUnfoldingArrayArguments(o.getLinks.bind(o), [v]);
return E;
}
;
this.getLinks = function(A) {
var e;
e =
sap.ushell.utils.invokeUnfoldingArrayArguments(this._getLinks.bind(this), [A]);
return e;
}
;
this._getLinks = function(n) {
var N, P, o =
sap.ushell.Container.getService("NavTargetResolution");
if (typeof n === "undefined") {
n = {};
}
N = jQuery.extend(true, {}, n);
N.compactIntents = !!N.compactIntents;
N.action = N.action || undefined;
P = g({
params: N.params
}, N.ui5Component).params;
P = b({
params: P
}).params;
if (N.appStateKey) {
P["sap-xapp-state"] = [N.appStateKey];
delete N.appStateKey;
}
N.params = P;
return o.getLinks(N);
}
;
this.getDistinctSemanticObjects = function() {
var o =
sap.ushell.Container.getService("NavTargetResolution");
return o.getDistinctSemanticObjects();
}
;
this.isIntentSupported = function(i, C) {
var d = new jQuery.Deferred()
, o = {}
, e = i.map(function(I) {
var f = g(I, C);
o[f] = I;
return f;
});

sap.ushell.Container.getService("NavTargetResolution").isIntentSupported(e).done(fu
nction(I) {
var m = {};
Object.keys(I).forEach(function(k) {
m[o[k]] = I[k];
});
d.resolve(m);
}).fail(d.reject.bind(d));
return d.promise();
}
;
this.isNavigationSupported = function(i, C) {
var d = i.map(function(I) {
return g(I, C);
});
return
sap.ushell.Container.getService("NavTargetResolution").isNavigationSupported(d);
}
;
this.isUrlSupported = function(u) {
var d = new jQuery.Deferred(), U, h;
if (typeof u !== "string") {
d.reject();
return d.promise();
}
U = sap.ushell.Container.getService("URLParsing");
if (U.isIntentUrl(u)) {
h = U.getHash(u);
this.isIntentSupported(["#" + h]).done(function(r) {
if (r["#" + h] && r["#" + h].supported) {
d.resolve();
} else {
d.reject();
}
}).fail(function() {
d.reject();
});
} else {
d.resolve();
}
return d.promise();
}
;
this.createComponentInstance = function(i, C, o) {
var d, u, e, f;
if (!C) {
C = {};
} else {
f = Object.keys(C).length;
if (f > 1 || (f === 1 && !C.componentData)) {
throw "`oConfig` argument should either be an empty
object or contain only the `componentData` property.";
}
}
if (C.componentData) {
delete C.componentData.startupParameters;
delete C.componentData.config;
delete C.componentData["sap-xapp-state"];
}
d = sap.ushell.Container;
u = d.getService("URLParsing");
e = u.constructShellHash(u.parseShellHash(i));
if (!e) {
return new jQuery.Deferred(function(D) {
D.reject("Navigation intent invalid!");
}
).promise();
}
return
d.getService("NavTargetResolution").resolveHashFragment("#" + e).then(function(r) {
if (r.applicationType !==
sap.ushell.components.container.ApplicationType.URL && !
(/^SAPUI5\.Component=/.test(r.additionalInformation))) {
return new jQuery.Deferred(function(D) {
D.reject("The resolved target mapping is not of
type UI5 component.");
}
).promise();
}
r = jQuery.extend(true, {}, r, C);
if (!r.ui5ComponentName && r.additionalInformation) {
r.ui5ComponentName =
r.additionalInformation.replace(/^SAPUI5\.Component=/, "");
}
return new jQuery.Deferred(function(D) {
var h = d.getService("Ui5ComponentLoader");
if (o) {
o.runAsOwner(function() {
j(r);
});
} else {
j(r);
}
function j(A) {
A.loadDefaultDependencies = false;
h.createComponent(A).then(function(k) {
D.resolve(k.componentHandle.getInstance());
}, function(E) {
E = E || "";
jQuery.sap.log.error("Cannot create UI5
component: " + E, E.stack, "sap.ushell.services.CrossApplicationNavigation");
D.reject(E);
});
}
}
).promise();
});
}
;
this.createEmptyAppState = function(A) {
if (!a) {
a = sap.ushell.Container.getService("AppState");
}
if (!(A instanceof sap.ui.core.UIComponent)) {
throw new Error("oAppComponent passed must be a UI5
Component");
}
return a.createEmptyAppState(A);
}
;
this.getStartupAppState = function(A) {
this._checkComponent(A);
var C = A.getComponentData() && A.getComponentData()["sap-
xapp-state"] && A.getComponentData()["sap-xapp-state"][0];
return this.getAppState(A, C);
}
;
this._checkComponent = function(A) {
if (!(A instanceof sap.ui.core.UIComponent)) {
throw new Error("oComponent passed must be a UI5
Component");
}
}
;
this.getAppState = function(A, d) {
var C, D = new jQuery.Deferred();
this._checkComponent(A);
if (!a) {
a = sap.ushell.Container.getService("AppState");
}
if (typeof d !== "string") {
if (d !== undefined) {
jQuery.sap.log.error("Illegal Argument sAppStateKey
");
}
setTimeout(function() {
C = a.createEmptyUnmodifiableAppState(A);
D.resolve(C);
}, 0);
return D.promise();
}
return a.getAppState(d);
}
;
this.getAppStateData = function(A) {
return
sap.ushell.utils.invokeUnfoldingArrayArguments(this._getAppStateData.bind(this),
[A]);
}
;
this._getAppStateData = function(A) {
var d = new jQuery.Deferred();
if (!a) {
a = sap.ushell.Container.getService("AppState");
}
if (typeof A !== "string") {
if (A !== undefined) {
jQuery.sap.log.error("Illegal Argument sAppStateKey
");
}
setTimeout(function() {
d.resolve(undefined);
}, 0);
} else {
a.getAppState(A).done(function(o) {
d.resolve(o.getData());
}).fail(d.resolve.bind(d, undefined));
}
return d.promise();
}
;
this.saveMultipleAppStates = function(A) {
var r = []
, d = new jQuery.Deferred();
A.forEach(function(o) {
r.push(o.save());
});
jQuery.when.apply(this, r).done(function() {
d.resolve(r);
}).fail(function() {
d.reject("save failed");
});
return d.promise();
}
;
}
;
sap.ushell.services.CrossApplicationNavigation.hasNoAdapter = true;
}());
},
"sap/ushell/services/EndUserFeedback.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.EndUserFeedback");
function g(p, o) {
return jQuery.sap.getObject(p, undefined, o) || "";
}
sap.ushell.services.EndUserFeedback = function(a, c, p, s) {
var S = (s && s.config) || {};
this.sendFeedback = function(e) {
var u, n, A, b, E, f, U, d, h;
u =
g("clientContext.navigationData.applicationInformation.url", e);
n = g("clientContext.navigationData.navigationHash", e);
A =
g("clientContext.navigationData.applicationInformation.additionalInformation", e);
b =
g("clientContext.navigationData.applicationInformation.applicationType", e);
f = g("clientContext.navigationData.formFactor", e);
U = g("clientContext.userDetails.userId", e);
d = g("clientContext.userDetails.eMail", e);
h = e.feedbackText || "";
E = {
feedbackText: h.slice(0, 2000),
ratings: e.ratings || {},
additionalInformation: A,
applicationType: b,
url: u ? this.getPathOfURL(u) : "",
navigationIntent: n.replace(/\?.*$/, ''),
formFactor: f,
isAnonymous: e.isAnonymous || false,
userId: e.isAnonymous ? "" : U,
eMail: e.isAnonymous ? "" : d
};
return a.sendFeedback(E);
}
;
this.getLegalText = function() {
return a.getLegalText();
}
;
this.isEnabled = function() {
var d = new jQuery.Deferred();
if (S.enabled === false) {
setTimeout(function() {
d.reject();
}, 0);
return d.promise();
}
a.isEnabled().done(function(l) {
d.resolve();
}).fail(function(e) {
d.reject();
});
return d.promise();
}
;
this.getPathOfURL = function(u) {
var U = new URI(u);
return U.pathname();
}
;
}
;
}());
},
"sap/ushell/services/LaunchPage.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.LaunchPage");
sap.ushell.services.LaunchPage = function(a, c) {
var t = this
, T = [];
this.getGroups = function() {
var p = a.getGroups();
p.fail(function() {
jQuery.sap.log.error("getGroups failed");
});
return p;
}
;
this.getDefaultGroup = function() {
var p = a.getDefaultGroup();
p.fail(function() {
jQuery.sap.log.error("getDefaultGroup failed");
});
return p;
}
;
this.getGroupTitle = function(g) {
return a.getGroupTitle(g);
}
;
this.getGroupId = function(g) {
return a.getGroupId(g);
}
;
this.getGroupTiles = function(g) {
return a.getGroupTiles(g);
}
;
this.getLinkTiles = function(g) {
return a.getLinkTiles(g);
}
;
this.addGroupAt = function(s, i) {
var p, b = i;
if (a.addGroupAt) {
p = a.addGroupAt(s, i);
p.fail(function() {
jQuery.sap.log.error("addGroup " + s + " failed");
});
} else {
var d = new jQuery.Deferred();
p = a.addGroup(s);
p.done(function(n, g) {
var m = this.moveGroup(n, b)
, e = n;
m.done(function() {
d.resolve(e);
});
m.fail(function() {
d.reject();
});
}
.bind(this));
p.fail(function() {
jQuery.sap.log.error("addGroup " + s + " failed");
d.reject();
});
return d.promise();
}
return p;
}
;
this.addGroup = function(s) {
var p = a.addGroup(s);
p.fail(function() {
jQuery.sap.log.error("addGroup " + s + " failed");
});
return p;
}
;
this.removeGroup = function(g, i) {
var p = a.removeGroup(g, i);
p.fail(function() {
jQuery.sap.log.error("Fail to removeGroup " +
t.getGroupTitle(g));
});
return p;
}
;
this.resetGroup = function(g, i) {
var p = a.resetGroup(g, i);
p.fail(function() {
jQuery.sap.log.error("Fail to resetGroup " +
t.getGroupTitle(g));
});
return p;
}
;
this.isGroupRemovable = function(g) {
return a.isGroupRemovable(g);
}
;
this.isGroupLocked = function(g) {
if (typeof a.isGroupLocked === "function") {
return a.isGroupLocked(g);
}
return false;
}
;
this.moveGroup = function(g, n) {
var p = a.moveGroup(g, n);
p.fail(function() {
jQuery.sap.log.error("Fail to moveGroup " +
t.getGroupTitle(g));
});
return p;
}
;
this.setGroupTitle = function(g, s) {
var p = a.setGroupTitle(g, s);
p.fail(function() {
jQuery.sap.log.error("Fail to set Group title: " +
t.getGroupTitle(g));
});
return p;
}
;
this.hideGroups = function(h) {
var d = jQuery.Deferred();
if (typeof a.hideGroups !== "function") {
d.reject('hideGroups() is not implemented in the
Adapter.');
} else {
a.hideGroups(h).done(function() {
d.resolve();
}).fail(function(m) {
jQuery.sap.log.error("Fail to store groups
visibility." + m);
d.reject();
});
}
return d.promise();
}
;
this.isGroupVisible = function(g) {
if (typeof a.isGroupVisible === "function") {
return a.isGroupVisible(g);
}
return true;
}
;
this.addTile = function(C, g) {
var p = a.addTile(C, g);
p.fail(function() {
jQuery.sap.log.error("Fail to add Tile: " +
t.getCatalogTileId(C));
});
return p;
}
;
this.removeTile = function(g, o, i) {
var p = a.removeTile(g, o, i);
p.fail(function() {
jQuery.sap.log.error("Fail to remove Tile: " +
t.getTileId(o));
});
return p;
}
;
this.moveTile = function(o, s, i, S, b) {
var p = a.moveTile(o, s, i, S, b);
p.fail(function() {
jQuery.sap.log.error("Fail to move Tile: " +
t.getTileId(o));
});
return p;
}
;
this.getTileId = function(o) {
return a.getTileId(o);
}
;
this.getTileTitle = function(o) {
return a.getTileTitle(o);
}
;
this.getTileType = function(o) {
if (a.getTileType) {
return a.getTileType(o);
}
return 'tile';
}
;
this.getTileView = function(o) {
var d = a.getTileView(o);
if (!jQuery.isFunction(d.promise)) {
d = jQuery.Deferred().resolve(d).promise();
}
return d;
}
;
this.getTileSize = function(o) {
return a.getTileSize(o);
}
;
this.getTileTarget = function(o) {
return a.getTileTarget(o);
}
;
this.getTileDebugInfo = function(o) {
if (typeof a.getTileDebugInfo === "function") {
return a.getTileDebugInfo(o);
}
return undefined;
}
;
this.isTileIntentSupported = function(o) {
if (typeof a.isTileIntentSupported === "function") {
return a.isTileIntentSupported(o);
}
return true;
}
;
this.refreshTile = function(o) {
a.refreshTile(o);
}
;
this.setTileVisible = function(o, n) {
return a.setTileVisible(o, n);
}
;
this.registerTileActionsProvider = function(p) {
if (typeof p !== 'function') {
throw new Error("Tile actions Provider is not a
function");
}
T.push(p);
}
;
this.getTileActions = function(o) {
var b = [];
var A;
if (typeof a.getTileActions === 'function') {
A = a.getTileActions(o);
if (A && A.length && A.length > 0) {
b.push.apply(b, A);
}
}
for (var i = 0; i < T.length; i++) {
A = T[i](o);
if (A && A.length && A.length > 0) {
b.push.apply(b, A);
}
}
return b;
}
;
this.getCatalogs = function() {
return a.getCatalogs();
}
;
this.isCatalogsValid = function() {
return a.isCatalogsValid();
}
;
this.getCatalogData = function(C) {
if (typeof a.getCatalogData !== "function") {
jQuery.sap.log.warning("getCatalogData not implemented
in adapter", null, "sap.ushell.services.LaunchPage");
return {
id: this.getCatalogId(C)
};
}
return a.getCatalogData(C);
}
;
this.getCatalogError = function(C) {
return a.getCatalogError(C);
}
;
this.getCatalogId = function(C) {
return a.getCatalogId(C);
}
;
this.getCatalogTitle = function(C) {
return a.getCatalogTitle(C);
}
;
this.getCatalogTiles = function(C) {
var p = a.getCatalogTiles(C);
p.fail(function() {
jQuery.sap.log.error("Fail to get Tiles of Catalog: " +
t.getCatalogTitle(C));
});
return p;
}
;
this.getCatalogTileId = function(o) {
return a.getCatalogTileId(o);
}
;
this.getCatalogTileTitle = function(C) {
return a.getCatalogTileTitle(C);
}
;
this.getCatalogTileSize = function(C) {
return a.getCatalogTileSize(C);
}
;
this.getCatalogTileView = function(C) {
return a.getCatalogTileView(C);
}
;
this.getCatalogTileTargetURL = function(C) {
return a.getCatalogTileTargetURL(C);
}
;
this.getCatalogTileTags = function(C) {
if (typeof a.getCatalogTileTags === "function") {
return a.getCatalogTileTags(C);
}
return [];
}
;
this.getCatalogTileKeywords = function(C) {
return a.getCatalogTileKeywords(C);
}
;
this.getCatalogTilePreviewTitle = function(C) {
return a.getCatalogTilePreviewTitle(C);
}
;
this.getCatalogTilePreviewIcon = function(C) {
return a.getCatalogTilePreviewIcon(C);
}
;
this.addBookmark = function(p, g) {
var P, d, m;
if (!p.title) {
jQuery.sap.log.error("Add Bookmark - Missing title");
throw new Error("Title missing in bookmark
configuration");
}
if (!p.url) {
jQuery.sap.log.error("Add Bookmark - Missing URL");
throw new Error("URL missing in bookmark
configuration");
}
if (g && this.isGroupLocked(g)) {
d = new jQuery.Deferred();
P = d.promise();
m = 'Tile cannot be added, target group (' +
this.getGroupTitle(g) + ')is locked!';
d.reject(m);
jQuery.sap.log.error(m);
} else {
P = a.addBookmark(p, g);
P.fail(function() {
jQuery.sap.log.error("Fail to add bookmark for URL:
" + p.url + " and Title: " + p.title);
});
}
return P;
}
;
this.countBookmarks = function(u) {
if (!u || typeof u !== "string") {
jQuery.sap.log.error("Fail to count bookmarks. No valid
URL");
throw new Error("Missing URL");
}
var p = a.countBookmarks(u);
p.fail(function() {
jQuery.sap.log.error("Fail to count bookmarks");
});
return p;
}
;
this.deleteBookmarks = function(u) {
if (!u || typeof u !== "string") {
throw new Error("Missing URL");
}
var p = a.deleteBookmarks(u);
p.fail(function() {
jQuery.sap.log.error("Fail to delete bookmark for: " +
u);
});
return p;
}
;
this.updateBookmarks = function(u, p) {
if (!u || typeof u !== "string") {
jQuery.sap.log.error("Fail to update bookmark. No valid
URL");
throw new Error("Missing URL");
}
if (!p || typeof p !== "object") {
jQuery.sap.log.error("Fail to update bookmark. No valid
parameters, URL is: " + u);
throw new Error("Missing parameters");
}
var P = a.updateBookmarks(u, p);
P.fail(function() {
jQuery.sap.log.error("Fail to update bookmark for: " +
u);
});
return P;
}
;
this.onCatalogTileAdded = function(s) {
return a.onCatalogTileAdded(s);
}
;
}
;
}());
},
"sap/ushell/services/Message.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.Message");
sap.ushell.services.Message = function() {
var s = null;
this.init = function(S) {
s = S;
return this;
}
;
this.show = function(t, m, p) {
if (!m) {
jQuery.sap.log.error("Message must not be empty.");
} else {
if (s) {
s(t, m, p || {});
} else {
jQuery.sap.log.error("MessageService not
initialized. [Message: '" + m + "']");
}
}
}
;
this.info = function(m, d) {
this.show(sap.ushell.services.Message.Type.INFO, m, {
duration: d || 3000
});
}
;
this.error = function(m, t) {
m = (t !== undefined) ? t + " , " + m : m;
jQuery.sap.log.error(m);
this.show(sap.ushell.services.Message.Type.ERROR, m, {
title: t
});
}
;
this.confirm = function(m, c, t, a) {
this.show(sap.ushell.services.Message.Type.CONFIRM, m, {
title: t,
callback: c,
actions: a
});
}
;
}
;
sap.ushell.services.Message.hasNoAdapter = true;
sap.ushell.services.Message.Type = {
INFO: 0,
ERROR: 1,
CONFIRM: 2
};
}());
},
"sap/ushell/services/NavTargetResolution.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.NavTargetResolution");
jQuery.sap.require("sap.ushell.utils");
jQuery.sap.require("sap.ushell.services.AppConfiguration");
sap.ushell.services.NavTargetResolution = function(A, c, p, s) {
var S = s && s.config, I = function() {
return !!(S && S.enableClientSideTargetResolution);
}, r = function(h) {
var o = I() ? this._resolveHashFragmentClientSide(h) :
A.resolveHashFragment(h);
return o;
}, l, R = [{
name: "DefaultAdapter",
isApplicable: function() {
return true;
},
resolveHashFragment: r.bind(this)
}], C;
this._isClientSideTargetResolutionEnabled = I;
this._nextResolveHashFragment = function(a, h) {
var o, f;
o = a.pop();
if (o.isApplicable(h)) {
jQuery.sap.log.info("NavTargetResolution: custom
resolver " + o.name + " resolves " + h);
f = this._nextResolveHashFragment.bind(this, a);
return o.resolveHashFragment(h, f);
}
return this._nextResolveHashFragment(a, h);
}
;
this._resolveHashFragmentClientSide = function(h) {
var H = this._validateHashFragment(h), f;
if (!H.success) {
return new jQuery.Deferred().reject(h + " is not a
valid hash fragment").promise();
}
f = H.hashFragmentWithoutHash;
return
this._resolveHashFragmentClientSideAndFixApplicationType(f);
}
;
this._resolveHashFragmentClientSideAndFixApplicationType =
function(f) {
var d = new jQuery.Deferred();

sap.ushell.Container.getService("ClientSideTargetResolution").resolveHashFragment(f
).done(function(o) {
if (o && o.applicationType === "SAPUI5") {
o.applicationType = "URL";
}
d.resolve(o);
}).fail(function() {
d.reject.apply(d, arguments);
});
return d.promise();
}
;
this._validateHashFragment = function(h) {
var H = ""
, v = {
success: false
};
if (h && h.charAt(0) !== "#") {
throw new sap.ushell.utils.Error("Hash fragment
expected in _validateHashFragment","sap.ushell.services.NavTargetResolution");
}
H = h.substring(1);
if (H) {
v.success = true;
}
v.hashFragmentWithoutHash = H;
return v;
}
;
this.expandCompactHash = function(h) {
var u = sap.ushell.Container.getService("URLParsing"), P, d
= new jQuery.Deferred();
P = u.parseShellHash(h);
if (P && P.params && P.params["sap-intent-param"]) {

sap.ushell.Container.getService("AppState").getAppState(P.params["sap-intent-
param"][0]).done(function(o) {
var v = o.getData("sap-intent-param")
, H = h;
if (v) {
H =
sap.ushell.Container.getService("URLShortening").expandParamGivenRetrievalFunction(
h, "sap-intent-param", function() {
return v;
});
}
d.resolve(H);
}).fail(function() {
d.resolve(h);
});
} else {
d.resolve(h);
}
return d.promise();
}
;
var w = ["NWBC", "WDA", "TR"];
this._getNavigationMode = function(o) {
var a = o.additionalInformation, b = o.applicationType, d =
sap.ushell.services.AppConfiguration.getCurrentAppliction() || {}, u, U;
if (o.navigationMode) {
return o.navigationMode;
}
if (w.indexOf(d.applicationType) > -1 && !
d.explicitNavMode) {
return 'newWindowThenEmbedded';
}
if ((a === null || typeof a === "string" || typeof a ===
"undefined") && b === "URL") {
if (a && a.indexOf("managed=") === 0) {
if (a === "managed=FioriWave1") {
return "embedded";
}
if (a === "managed=") {
return "newWindow";
}
return undefined;
}
if (a && a.indexOf("SAPUI5.Component=") === 0) {
u = "[a-zA-Z0-9_]+";
U = ["^SAPUI5.Component=", u, "([.]", u,
")*$"].join("");
if (!(new RegExp(U)).test(a)) {
jQuery.sap.log.warning(["The UI5 component name
in", a, "is not valid.", "Please use names satisfying", U].join(" "));
}
return "embedded";
}
return "newWindow";
}
if (b === "NWBC" || b === "TR") {
return "newWindowThenEmbedded";
}
return undefined;
}
;
this._adjustResolutionResultForUi5Components = function(o) {
var m, a;
if (typeof o !== "object") {
return;
}
delete o["sap.platform.runtime"];
if (o && o.applicationType && o.applicationType ===
"SAPUI5") {
o.applicationType = "URL";
}
if ((o.applicationType === "URL")) {
m =
/^SAPUI5\.Component=(.*)/.exec(o.additionalInformation);
a = m && m[1];
if (a) {
o.ui5ComponentName = a;
}
}
}
;
this._getSapSystem = function(h, o) {
var a;
if (o && o["sap-system"]) {
return o["sap-system"];
}
if (o && o.url) {
a = jQuery.sap.getUriParameters(o.url).get("sap-
system");
if (a) {
return a;
}
}
if (w.indexOf(o.applicationType) >= 0 && h &&
h.substring(1)) {
a =
jQuery.sap.getUriParameters(h.substring(1)).get("sap-system");
if (a) {
return a;
}
}
return undefined;
}
;
this.resolveHashFragment = function(h) {
var d = new jQuery.Deferred(), a = /sap-ushell-enc-
test=([^&]*)(&.*)?$/, m, b, e, t = this;
sap.ushell.utils.addTime("resolveHashFragment");

jQuery.sap.measure.average("sap.ushell.navigation.resolveHashFragment");
this.expandCompactHash(h).done(function(H) {
if (H.indexOf("sap-ushell-enc-test") >= 0) {
m = a.exec(H);
if (m) {
b = m[1];
if (b !== "A%20B%2520C") {

sap.ushell.Container.getService("Message").error("This navigation is flagged as


erroneous because" + " (likely the calling procedure) generated a wrong encoded
hash." + " Please track down the encoding error and make sure to use the
CrossApplicationNavigation service for navigation.", "Navigation encoding wrong");
}
H = H.replace(/sap-ushell-enc-test=([^&]*)&/,
"");
H = H.replace(/(&|\?)sap-ushell-enc-
test=([^&]*)$/, "");
}
}
var P = t._invokeResolveHashChain(H);
if (typeof A.processPostResolution === "function") {
P = A.processPostResolution(H, P);
}
P.done(function(o) {
t._adjustResolutionResultForUi5Components(o);
if (jQuery.isPlainObject(o) && !
o.hasOwnProperty("navigationMode")) {
o.navigationMode = t._getNavigationMode(o);
}
if (jQuery.isPlainObject(o) && !
o.hasOwnProperty("sap-system")) {
e = t._getSapSystem(h, o);
if (e) {
o["sap-system"] = e;
}
}

jQuery.sap.measure.end("sap.ushell.navigation.resolveHashFragment");

sap.ushell.services.AppConfiguration.setCurrentApplication(o);
d.resolve(o);
}).fail(function(M) {
d.reject(M);
});
}).fail(function(M) {
d.reject(M);
});
return d.promise();
}
;
this._invokeResolveHashChain = function(h) {
var o = R.map(function(a) {
return a;
});
return this._nextResolveHashFragment(o, h).done(function(a)
{
C = a;
});
}
;
this.baseResolveHashFragment = r.bind(this);
this._getGetLinksResolver = function(a) {
var g;
if (this._isClientSideTargetResolutionEnabled()) {
g = this._getLinksClientSide.bind(this);
return {
resolver: g,
warning: undefined,
isGetSemanticObjectLinksCall: false
};
}
g = A && A.getLinks && A.getLinks.bind(A);
if (g) {
return {
resolver: g,
warning: undefined,
isGetSemanticObjectLinksCall: false
};
}
g = A && A.getSemanticObjectLinks &&
A.getSemanticObjectLinks.bind(A);
if (g) {
return {
resolver: g,
warning: a.hasOwnProperty("action") ? "the action
argument was given, however, NavTargetResolutionAdapter does not implement getLinks
method. Action will be ignored." : undefined,
isGetSemanticObjectLinksCall: true
};
}
return {
resolver: undefined,
warning: "Cannot determine resolver for getLinks
method",
isGetSemanticObjectLinksCall: undefined
};
}
;
this.getLinks = function(a) {
var t = this;
var b = a.semanticObject
, P = a.params
, i = a.ignoreFormFactor
, o = a.ui5Component
, d = a.appStateKey
, e = a.compactIntents;
var f, h, g = new jQuery.Deferred(), j, k;
if (/\?/.test(b)) {
throw new Error("Parameter must not be part of semantic
object");
}
f = (P === undefined) ? undefined :
JSON.parse(JSON.stringify(P));
if (d) {
f = f || {};
f["sap-xapp-state"] = encodeURIComponent(d);
}
h = {
target: {
semanticObject: b,
action: "dummyAction"
},
params: f
};
j = sap.ushell.Container.getService("ShellNavigation");
j.hrefForExternal(h, true, o, true).done(function(m) {
f = m.params || f;
var n = t._getGetLinksResolver(a);
if (n.warning) {
jQuery.sap.log.warning("A problem occurred while
determining the resolver for getLinks", n.warning,
"sap.ushell.services.NavTargetResolution");
}
k = n.resolver;
if (k) {
var H = function(E) {
g.reject(E);
};
var q = function(u) {
if (e) {
t._shortenGetSemanticObjectLinksResults(u,
o).done(function(v) {
g.resolve(v);
});
} else {
g.resolve(u);
}
};
if (n.isGetSemanticObjectLinksCall) {
k(b, f, i).done(q).fail(H);
} else {
k(a).done(q).fail(H);
}
} else {
g.resolve([]);
}
}).fail(function(m) {
g.reject(m);
});
return g.promise();
}
;
this.getDistinctSemanticObjects = function() {
if (this._isClientSideTargetResolutionEnabled()) {
var o =
sap.ushell.Container.getService("ClientSideTargetResolution");
return o.getDistinctSemanticObjects();
}
if (A && A.getDistinctSemanticObjects) {
return A.getDistinctSemanticObjects.call(A);
}
jQuery.sap.log.error("Cannot execute
getDistinctSemanticObjects method", "ClientSideTargetResolution must be enabled or
NavTargetResolutionAdapter must implement getDistinctSemanticObjects method",
"sap.ushell.services.NavTargetResolution");
return new jQuery.Deferred().reject("Cannot execute
getDistinctSemanticObjects").promise();
}
;
this._getLinksClientSide = function(a) {
var d = new jQuery.Deferred()
, o = new jQuery.Deferred()
, u = sap.ushell.Container.getService("URLParsing");
if ((a.params || {}).hasOwnProperty("sap-intent-param")) {
var b = "#" + a.semanticObject + "-" + "dummyAction?" +
u.paramsToString(a.params);
this.expandCompactHash(b).done(function(e) {
o.resolve(u.parseShellHash(e).params);
}).fail(d.reject.bind(d));
} else {
o.resolve(a.params);
}
o.done(function(e) {

sap.ushell.Container.getService("ClientSideTargetResolution").getLinks(a).done(d.re
solve.bind(d)).fail(d.reject.bind(d));
});
return d.promise();
}
;
this._shortenGetSemanticObjectLinksResults = function(g, o) {
var t = this
, a = []
, i = 0
, P = g.length
, u = sap.ushell.Container.getService("URLParsing")
, b = sap.ushell.Container.getService("ShellNavigation")
, d = new jQuery.Deferred();
g.forEach(function(e) {
var U = u.parseShellHash(e.intent)
, f = b.compactParams(U.params, undefined, o);
a.push(f);
a[i].done(function(h, j) {
a[h] = {
text: e.text,
intent: "#" + U.semanticObject + "-" + U.action
+ "?" + u.paramsToString(j)
};
}
.bind(t, i)).fail(function(h, m) {
jQuery.sap.log.warning("Cannot shorten
GetSemanticObjectLinks result, using expanded form", "Failure message: " + m + ";
intent had title ''" + e.title + "'' and link ''" + e.intent + "'",
"sap.ushell.services.NavTargetResolution");
a[h] = {
text: e.text,
intent: e.intent
};
}
.bind(t, i)).always(function() {
P--;
if (P === 0) {
d.resolve(a);
}
});
i++;
});
return d.promise();
}
;
this.isIntentSupported = function(i) {
var m = {}, o;
if (this._isClientSideTargetResolutionEnabled()) {
o =
sap.ushell.Container.getService("ClientSideTargetResolution");
return o.isIntentSupported(i);
}
if (A.isIntentSupported) {
return A.isIntentSupported(i);
}
i.forEach(function(a) {
m[a] = {
supported: undefined
};
});
return (new jQuery.Deferred()).resolve(m).promise();
}
;
this.isNavigationSupported = function(i) {
var u = sap.ushell.Container.getService("URLParsing")
, d = new jQuery.Deferred()
, a = [];
a = i.map(function(o) {
if (typeof o === "string") {
return o;
}
return "#" + u.constructShellHash(o);
});
this.isIntentSupported(a).done(function(o) {
var b = a.map(function(e) {
return o[e] || {
supported: false
};
});
d.resolve(b);
}).fail(d.reject.bind(d));
return d.promise();
}
;
this.registerCustomResolver = function(o) {
if (typeof o.name !== "string") {
jQuery.sap.log.error("NavTargetResolution: Custom
Resolver must have name {string} member");
return false;
}
if (typeof o.isApplicable !== "function") {
jQuery.sap.log.error("NavTargetResolution: Custom
Resolver must have isApplicable member");
return false;
}
if (typeof o.resolveHashFragment !== "function") {
jQuery.sap.log.error("NavTargetResolution: Custom
Resolver must have \"resolveHashFragment\" member");
return false;
}
R.push(o);
return true;
}
;
if (S && jQuery.isArray(S.resolveLocal)) {
l = S.resolveLocal.map(function(a) {
return a.linkId;
});
this.registerCustomResolver({
name: "localResolveNavigationResolver",
cleanHash: function(h) {
if (h === "") {
return "#";
}
var a =
sap.ushell.Container.getService("URLParsing").parseShellHash(h.substring(1));
if (!a) {
return "#";
}
h = "#" + a.semanticObject + "-" + a.action;
return h;
},
_getIndex: function(o) {
var h = this.cleanHash(o);
return l.indexOf(h.substring(1));
},
isApplicable: function(o) {
return this._getIndex(o) >= 0;
},
resolveHashFragment: function(h) {
var d, i = this._getIndex(h), o, a, b, n;
d = new jQuery.Deferred();
o =
JSON.parse(JSON.stringify(S.resolveLocal[i].resolveTo));
a =
sap.ushell.Container.getService("URLParsing").parseShellHash(h);
if (a && a.params) {
n =
sap.ushell.Container.getService("URLParsing").paramsToString(a.params);
if (n) {
b = o.url.indexOf('?') >= 0;
o.url = o.url + (b ? "&" : "?") + n;
}
}
d.resolve(o);
return d.promise();
}
});
}
this.registerCustomResolver({
name: "StandaloneLocalResolver",
aElement: undefined,
cleanHash: function(h) {
if (h === "") {
return undefined;
}
var a =
sap.ushell.Container.getService("URLParsing").parseShellHash(h.substring(1));
if (!a) {
return undefined;
}
h = "#" + a.semanticObject + "-" + a.action;
return h;
},
isRunStandaloneHash: function(h) {
return typeof h === "string" && h.indexOf("#Shell-
runStandaloneApp") === 0;
},
isApplicable: function(h) {
h = this.cleanHash(h);
if (!h) {
return false;
}
return h === "#Test-url" || h === "#Test-local1" || h
=== "#Test-local2" || h === "#Test-config" || h === "#Test-clear" ||
this.isRunStandaloneHash(h);
},
parseUrl: function(u) {
if (!this.aElement) {
this.aElement = window.document.createElement('a');
}
this.aElement.href = u;
return this.aElement;
},
resolveHashFragment: function(h) {
var d = new jQuery.Deferred(), b = null, t = this, e,
P, L, f, g, n, i, o, F = h, u;
h = this.cleanHash(h);
if (!h) {
return false;
}
b = {
"#Test-config": {
applicationType: "URL",
url: "/sap/bc/ui5_ui5/ui2/ushell/test-
resources/sap/ushell/demoapps/FioriSandboxConfigApp",
additionalInformation:
"SAPUI5.Component=sap.ushell.demoapps.FioriSandboxConfigApp"
},
"none": {
applicationType: "URL",
url: "",
additionalInformation: ""
}
};
function j(K) {
if (localStorage) {
return localStorage[K];
}
return undefined;
}
function k(o, K) {
var e = {}, a;
for (a in o) {
if (o.hasOwnProperty(a)) {
if (a !== K) {
e[a] = o[a];
}
}
}
return e;
}
function m(U) {
if (sap.ushell.utils.calculateOrigin(t.parseUrl(U))
!== sap.ushell.utils.calculateOrigin(window.location)) {
return undefined;
}
var a = (new
URI(t.parseUrl(U).href)).normalizePathname().pathname(), y =
jQuery.sap.getObject("runStandaloneAppFolderWhitelist", 0, S), E;
if (!y) {
return undefined;
}
for (E in y) {
if (y.hasOwnProperty(E)) {
if (y[E]) {
if (E === "*" || a.indexOf((new
URI(t.parseUrl(E).href)).normalizePathname().pathname()) === 0) {
return U;
}
}
}
}
return undefined;
}
function q(K) {
return jQuery.sap.getUriParameters().get(K);
}
function v(a, K) {
return (a.params && a.params[K] && a.params[K][0])
|| q(K);
}
function x(K, V) {
if (localStorage) {
localStorage[K] = V;
}
}
if (b[h]) {
e = b[h];
} else if (h === "#Test-clear") {
x("sap.ushell.#Test-local1", undefined);
x("sap.ushell.#Test-local2", undefined);
jQuery.sap.log.info("NavTargetResolution: Local
storage keys for #Test have been cleared");
e = b["#Test-config"];
} else if (this.isRunStandaloneHash(h)) {
L = {
applicationType: "URL"
};
P =
sap.ushell.Container.getService("URLParsing").parseShellHash(F);
f = (v(P, "sap-ushell-SAPUI5.Component") &&
"SAPUI5.Component=" + v(P, "sap-ushell-SAPUI5.Component")) || (v(P, "sap-ushell-
additionalInformation"));
u = v(P, "sap-ushell-url") || "";
o = k(P.params, "sap-ushell-SAPUI5.Component");
o = k(o, "sap-ushell-additionalInformation");
o = k(o, "sap-ushell-url");
n =
sap.ushell.Container.getService("URLParsing").paramsToString(o);
i = u.indexOf('?') >= 0;
if (n) {
u = u + (i ? (((u[u.length - 1] !== "&") &&
"&") || "") : "?") + n;
}
L.url = m(u);
L.additionalInformation = f;
e = L;
} else if (h === "#Test-local1" || h === "#Test-local2"
|| h === "#Test-url") {
e = j("sap.ushell." + h);
if (!e || e === "undefined") {
L = {
applicationType: "URL"
};
} else {
L = JSON.parse(e);
}
if ((window.location.hostname === "localhost") ||
S.allowTestUrlComponentConfig) {
g = "sap-ushell-test-" + h.substring(6);
f = q(g + "-additionalInformation");
if (f) {
L.additionalInformation = f;
}
u = q(g + "-url");
if (u) {
L.url = m(u);
}
}
if (!L.url) {
jQuery.sap.log.info("NavTargetResolution: No
configured app for " + h + " found ( local storage or url params sap-ushell-test-
local1-url sap-ushell-test-local1-additionalInfo not supplied? ");
jQuery.sap.log.info("NavTargetResolution:
Defaulting to config app ...\n");
d.reject("URL is not resolvable");
return d.promise();
}
L.url = m(L.url);
e = L;
}
if (e.url === undefined) {
d.reject("URL is not resolvable");
return d.promise();
}
jQuery.sap.log.info("NavTargetResolution: As URL:
http://localhost:8080/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?
sap-ushell-test-local1-url=" + encodeURIComponent((e && e.url) || "") + "&sap-
ushell-test-local1-additionalInformation=" + encodeURIComponent((e &&
e.additionalInfo) || "") + "#Test-local1");
jQuery.sap.log.info("NavTargetResolution: Resolving " +
h + " to " + JSON.stringify(e));
d.resolve(e);
return d.promise();
}
});
this.getCurrentResolution = function() {
return C;
}
;
}
;
}());
},
"sap/ushell/services/Notifications.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.Notifications");
jQuery.sap.require("sap.ui.thirdparty.datajs");
sap.ushell.services.Notifications = function(c, p, s) {
var m = new sap.ui.model.json.JSONModel(), t = new Date(), S =
s && s.config, r = {
getNotifications: {},
getNotificationsByType: {},
getBadgeNumber: {},
resetBadgeNumber: {}
}, w, W = S.webSocketUrl ||
"/sap/bc/apc/iwngw/notification_push_apc", P = S.pollingIntervalInSeconds || 60, u
= [], U = [], i = false, C = [], I = false, o = false, E = true, h, d, a = 5000, b
= 6000, f = false, g = {
NOTIFICATIONS: 0,
NOTIFICATIONS_BY_TYPE: 1,
GET_BADGE_NUMBER: 2,
RESET_BADGE_NUMBER: 3
}, M = {
PACKAGED_APP: 0,
FIORI_CLIENT: 1,
WEB_SOCKET: 2,
POLLING: 3
}, j, F = false;
this.isEnabled = function() {
if (!S.enabled || !S.serviceUrl) {
E = false;
if (S.enabled && !S.serviceUrl) {
jQuery.sap.log.warning("No serviceUrl was found in
the service configuration");
}
} else {
E = true;
}
return E;
}
;
this.init = function() {
if ((!I) && (this.isEnabled())) {
this._setWorkingMode();
I = true;
}
}
;
this.getUnseenNotificationsCount = function() {
var D = jQuery.Deferred();
D.resolve(m.getProperty("/UnseenCount"));
return D.promise();
}
;
this.getNotificationsByTypeWithGroupHeaders = function() {
var H, R, D = new jQuery.Deferred(), e =
this._getRequestURI(g.NOTIFICATIONS_BY_TYPE);
R = {
requestUri: e
};
if (!this._getHeaderXcsrfToken()) {
H = {};
H["X-CSRF-Token"] = "fetch";
R.headers = H;
}
OData.request(R, function(k) {
D.resolve(k);
}, function(k) {
if (k.response && k.response.statusCode === 200 &&
k.response.body) {
D.resolve(k.response.body);
} else {
D.reject();
jQuery.sap.log.error("Notification service - oData
executeAction failed: ", k, "sap.ushell.services.Notifications");
}
});
return D.promise();
}
;
this.getNotifications = function() {
var R, D = jQuery.Deferred();
if ((j === M.FIORI_CLIENT) || (j === M.PACKAGED_APP)) {
R = this._readNotificationsData(false);
R.done(function() {
D.resolve(m.getProperty("/Notifications"));
}).fail(function(e) {
D.reject();
});
} else {
D.resolve(m.getProperty("/Notifications"));
}
return D.promise();
}
;
this.executeBulkAction = function(n, A) {
var D = new jQuery.Deferred()
, e = []
, k = []
, R = {
succededNotifications: e,
failedNotifications: k
}
, l = []
, q = this;
n.forEach(function(N, v) {
var x = new jQuery.Deferred();
l.push(x.promise());
q.executeAction(N, A).done(function() {
e.push(N);
x.resolve();
}).fail(function() {
k.push(N);
x.resolve();
});
});
jQuery.when.apply(jQuery, l).always(function() {
if (k.length) {
D.reject(R);
} else {
D.resolve(R);
}
});
return D.promise();
}
;
this.dismissBulkNotifications = function(n) {
var D = new jQuery.Deferred()
, e = []
, k = []
, R = {
succededNotifications: e,
failedNotifications: k
}
, l = []
, q = this;
n.forEach(function(N, v) {
var x = new jQuery.Deferred();
l.push(x.promise());
q.dismissNotification(N).done(function() {
e.push(N);
x.resolve();
}).fail(function() {
k.push(N);
x.resolve();
});
});
jQuery.when.apply(jQuery, l).always(function() {
if (k.length) {
D.reject(R);
} else {
D.resolve(R);
}
});
return D.promise();
}
;
this.executeAction = function(n, A) {
var e = S.serviceUrl + "/ExecuteAction"
, R = {
NotificationId: n,
ActionId: A
}
, k = {
requestUri: e,
method: "POST",
data: R,
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/json",
"DataServiceVersion": d,
"X-CSRF-Token": h
}
}
, D = jQuery.Deferred();
OData.request(k, function(l) {
D.resolve();
}, function(l) {
if (l.response && l.response.statusCode === 200 &&
l.response.body) {
D.resolve();
} else {
D.reject();
jQuery.sap.log.error("Notification service - oData
executeAction failed: ", l, "sap.ushell.services.Notifications");
}
});
return D.promise();
}
;
this.markRead = function(n) {
var A = S.serviceUrl + "/MarkRead"
, R = {
NotificationId: n
}
, e = {
requestUri: A,
method: "POST",
data: R,
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/json",
"DataServiceVersion": d,
"X-CSRF-Token": h
}
}
, D = jQuery.Deferred();
OData.request(e, function(k) {
D.resolve();
}, function(k) {
D.reject();
jQuery.sap.log.error("Notification service - oData
markRead failed: ", k, "sap.ushell.services.Notifications");
});
return D.promise();
}
;
this.dismissNotification = function(n) {
var A = S.serviceUrl + "/Dismiss"
, R = {
NotificationId: n
}
, e = {
requestUri: A,
method: "POST",
data: R,
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/json",
"DataServiceVersion": d,
"X-CSRF-Token": h
}
}
, D = jQuery.Deferred();
OData.request(e, function(k) {
D.resolve();
}, function(k) {
D.reject();
jQuery.sap.log.error("Notification service - oData
dismiss notification failed: ", k, "sap.ushell.services.Notifications");
});
return D.promise();
}
;
this.registerNotificationsUpdateCallback = function(e) {
u.push(e);
}
;
this.registerNotificationCountUpdateCallback = function(e) {
U.push(e);
}
;
this.notificationsSeen = function() {
this._setNotificationsAsSeen();
}
;
this.isFirstDataLoaded = function() {
return F;
}
;
this.destroy = function() {
o = true;
if ((j === M.WEB_SOCKET) && w) {
w.close();
}
}
;
this._readNotificationsData = function(e) {
var k = this, H, R, l, n, D = new jQuery.Deferred(), q =
this._getRequestURI(g.NOTIFICATIONS);
R = {
requestUri: q
};
if (!this._getHeaderXcsrfToken()) {
H = {};
H["X-CSRF-Token"] = "fetch";
R.headers = H;
}
OData.read(R, function(v, x) {
n = v.results;
k._notificationAlert(n);
l = k._notificationsDescendingSortBy(n, "CreatedAt");
m.setProperty("/Notifications", l);
if (e) {
k._updateNotificationsConsumers();
}
if (!k._getHeaderXcsrfToken()) {
h = x.headers["x-csrf-token"];
}
if (!k._getDataServiceVersion()) {
d = x.headers.DataServiceVersion;
}
D.resolve();
}, function(v) {
if (v.response && v.response.statusCode === 200 &&
v.response.body) {
n = JSON.parse(v.response.body);
k._notificationAlert(n.value);
l = k._notificationsDescendingSortBy(n.value,
"CreatedAt");
m.setProperty("/Notifications", l);
if (e) {
k._updateNotificationsConsumers();
}
if (!k._getHeaderXcsrfToken()) {
h = v.response.headers["x-csrf-token"];
}
if (!k._getDataServiceVersion()) {
d = v.response.headers.DataServiceVersion;
}
D.resolve();
} else {
jQuery.sap.log.error("Notification service - oData
read notifications failed: ", v.message, "sap.ushell.services.Notifications");
D.reject();
}
});
return D.promise();
}
;
this._readUnseenNotificationsCount = function(e) {
var k = this
, G = this._getRequestURI(g.GET_BADGE_NUMBER)
, R = {
requestUri: G
};
OData.read(R, function(l, n) {
m.setProperty("/UnseenCount",
n.data.GetBadgeNumber.Number);
if (e) {
k._updateNotificationsCountConsumers();
}
}, function(l) {
if (l.response && l.response.statusCode === 200 &&
l.response.body) {
var n = JSON.parse(l.response.body);
m.setProperty("/UnseenCount", n.value);
if (e) {
k._updateNotificationsCountConsumers();
}
} else {
jQuery.sap.log.error("Notification service - oData
read unseen notifications count failed: ", l.message,
"sap.ushell.services.Notifications");
}
});
}
;
this._setNotificationsAsSeen = function() {
var R = this._getRequestURI(g.RESET_BADGE_NUMBER)
, e = {
requestUri: R,
method: "POST",
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/json",
"DataServiceVersion": d,
"X-CSRF-Token": h
}
};
OData.request(e, function(k, l) {}, function(k) {
jQuery.sap.log.error("Notification service - oData
reset badge number failed: ", k, "sap.ushell.services.Notifications");
});
}
;
this._readAllNotificationsData = function(e) {
var R, D = new jQuery.Deferred();
this._readUnseenNotificationsCount(e);
R = this._readNotificationsData(e);
R.done(function() {
D.resolve();
}).fail(function(k) {
D.reject();
});
return D.promise();
}
;
this._getHeaderXcsrfToken = function() {
return h;
}
;
this._getDataServiceVersion = function() {
return d;
}
;
this._getRequestURI = function(R) {
var e, k = encodeURI(this._getConsumedIntents(R));
switch (R) {
case g.NOTIFICATIONS:
if (r.getNotifications.basic === undefined) {
r.getNotifications.basic = S.serviceUrl +
"/Notifications?$expand=Actions,NavigationTargetParams&$filter=IsGroupHeader%20eq
%20false";
}
if (this._isIntentBasedConsumption()) {
if (r.getNotifications.byIntents === undefined) {
r.getNotifications.byIntents =
r.getNotifications.basic.concat("&intents%20eq%20" + k);
}
return r.getNotifications.byIntents;
}
return r.getNotifications.basic;
case g.NOTIFICATIONS_BY_TYPE:
if (r.getNotificationsByType.basic === undefined) {
r.getNotificationsByType.basic = S.serviceUrl +
"/Notifications?$expand=Actions,NavigationTargetParams";
}
if (this._isIntentBasedConsumption()) {
if (r.getNotificationsByType.byIntents ===
undefined) {
r.getNotificationsByType.byIntents =
r.getNotificationsByType.basic.concat("&$filter=intents%20eq%20" + k);
}
return r.getNotificationsByType.byIntents;
}
return r.getNotificationsByType.basic;
case g.GET_BADGE_NUMBER:
if (r.getBadgeNumber.basic === undefined) {
r.getBadgeNumber.basic = S.serviceUrl +
"/GetBadgeNumber()";
}
if (this._isIntentBasedConsumption()) {
if (r.getBadgeNumber.byIntents === undefined) {
r.getBadgeNumber.byIntents = S.serviceUrl +
"/GetBadgeCountByIntent(" + k + ")";
}
return r.getBadgeNumber.byIntents;
}
return r.getBadgeNumber.basic;
case g.RESET_BADGE_NUMBER:
if (r.resetBadgeNumber.basic === undefined) {
r.resetBadgeNumber.basic = S.serviceUrl +
"/ResetBadgeNumber";
}
return r.resetBadgeNumber.basic;
default:
e = "";
}
return e;
}
;
this._updateNotificationsConsumers = function() {
u.forEach(function(e) {
e();
});
}
;
this._updateNotificationsCountConsumers = function() {
U.forEach(function(e) {
e();
});
}
;
this._getModel = function() {
return m;
}
;
this._getMode = function() {
return j;
}
;
this._setWorkingMode = function() {
var e;
if (S.intentBasedConsumption === true) {
C =
this._getIntentsFromConfiguration(S.consumedIntents);
if (C.length > 0) {
i = true;
}
}
if (this._isPackagedMode()) {
j = M.PACKAGED_APP;
e =
this._getIntentsFromConfiguration(window.fiori_client_appConfig.applications);
if (e.length > 0) {
C = e;
}
if (C.length > 0) {
i = true;
}
this._registerForPush();
this._readAllNotificationsData(true);
return;
}
this._performFirstRead();
}
;
this._performFirstRead = function() {
var e = this, k, R = this._readAllNotificationsData(true);
R.done(function() {
k = e._getFioriClientRemainingDelay();
if (k <= 0) {
e._fioriClientStep();
} else {
setTimeout(function() {
e._fioriClientStep();
}, k);
}
F = true;
}).fail(function(l) {
jQuery.sap.log.error("Notifications oData read failed.
Error: " + l);
return;
});
}
;
this._fioriClientStep = function() {
if (this._isFioriClientMode()) {
j = M.FIORI_CLIENT;
this._addPushNotificationHandler();
} else {
this._webSocketStep();
}
}
;
this._webSocketStep = function() {
j = M.WEB_SOCKET;
this._establishWebSocketConnection();
}
;
this._webSocketRecoveryStep = function() {
if (f === false) {
f = true;
setTimeout(function() {
this._webSocketStep();
}
.bind(this), a);
} else {
this._activatePolling();
}
}
;
this._activatePolling = function() {
var e = this;
j = M.POLLING;
this._readAllNotificationsData(true);
this.timer = setTimeout(e._activatePolling.bind(e, P,
false), (P * 1000));
}
;
this._formatAsDate = function(e) {
return new Date(e);
}
;
this._notificationAlert = function(e) {
var n, N = [], k = 0;
for (n in e) {
if (this.lastNotificationDate &&
this._formatAsDate(e[n].CreatedAt) > this.lastNotificationDate) {
if (e[n].Priority === "HIGH") {
N.push(e[n]);
}
}
if (k < this._formatAsDate(e[n].CreatedAt)) {
k = this._formatAsDate(e[n].CreatedAt);
}
}
if (this.lastNotificationDate && N && N.length > 0) {

sap.ui.getCore().getEventBus().publish("sap.ushell.services.Notifications",
"onNewNotifications", N);
}
this.lastNotificationDate = k;
}
;
this._getFioriClientRemainingDelay = function() {
return b - (new Date() - t);
}
;
this._establishWebSocketConnection = function() {
var k = this, l;
jQuery.sap.require("sap.ui.core.ws.SapPcpWebSocket");
try {
w = new sap.ui.core.ws.SapPcpWebSocket(W,
[sap.ui.core.ws.SapPcpWebSocket.SUPPORTED_PROTOCOLS.v10]);
w.attachMessage(this, function(n, D) {
l = n.getParameter("pcpFields");
if ((l) && (l.Command) && (l.Command ===
"Notification")) {
k._readAllNotificationsData(true);
}
});
w.attachClose(this, function(n, D) {
jQuery.sap.log.error("Notifications UShell service
WebSocket: attachClose called with code: " + n.mParameters.code + " and reason: " +
n.mParameters.reason);
if (!o) {
k._webSocketRecoveryStep();
}
});
w.attachError(this, function(n, D) {
jQuery.sap.log.error("Notifications UShell service
WebSocket: attachError called!");
});
} catch (e) {
jQuery.sap.log.error("Exception occurred while creating
new sap.ui.core.ws.SapPcpWebSocket. Message: " + e.message);
}
}
;
this._isFioriClientMode = function() {
return !(sap.FioriClient === undefined);
}
;
this._isPackagedMode = function() {
return (window.fiori_client_appConfig &&
window.fiori_client_appConfig.prepackaged === true);
}
;
this._getIntentsFromConfiguration = function(e) {
var T = [], k, l;
if (e && e.length > 0) {
for (l = 0; l < e.length; l++) {
k = e[l].intent;
T.push(k);
}
}
return T;
}
;
this._handlePushedNotification = function(D) {
if (!(D === undefined) && !(D.additionalData ===
undefined)) {
if (D.additionalData.foreground) {
this._readAllNotificationsData(true);
} else {
this._readAllNotificationsData(true);
}
}
}
;
this._registerForPush = function() {

sap.Push.initPush(this._handlePushedNotification.bind(this));
}
;
this._addPushNotificationHandler = function() {
document.addEventListener("deviceready",
this._registerForPush.bind(this), false);
}
;
this._isIntentBasedConsumption = function() {
return i;
}
;
this._getConsumedIntents = function(R) {
var e = "", k;
if (!this._isIntentBasedConsumption()) {
return e;
}
if (C.length > 0) {
if (R !== g.GET_BADGE_NUMBER) {
e = "&";
}
for (k = 0; k < C.length; k++) {
if (R === g.GET_BADGE_NUMBER) {
if (k === 0) {
e = C[k];
} else {
e = e + "," + C[k];
}
} else {
e = e + "NavigationIntent%20eq%20%27" + C[k] +
"%27";
}
}
}
return e;
}
;
this._notificationsAscendingSortBy = function(n, e) {
n.sort(function(x, y) {
var v = x[e]
, k = y[e];
if (v === k) {
v = x.id;
k = y.id;
}
return k > v ? -1 : 1;
});
return n;
}
;
this._notificationsDescendingSortBy = function(n, e) {
n.sort(function(x, y) {
var v = x[e]
, k = y[e];
if (v === k) {
v = x.id;
k = y.id;
return v > k ? -1 : 1;
}
if (e === "Priority") {
if (v === "HIGH") {
return -1;
}
if (k === "HIGH") {
return 1;
}
if (v === "MEDIUM") {
return -1;
}
return 1;
}
return v > k ? -1 : 1;
});
return n;
}
;
}
;
sap.ushell.services.Notifications.hasNoAdapter = true;
}());
},
"sap/ushell/services/PageBuilding.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.PageBuilding");
jQuery.sap.require("sap.ui2.srvc.factory");
jQuery.sap.require("sap.ui2.srvc.page");
sap.ushell.services.PageBuilding = function(a, c) {
this.getFactory = function() {
return a.getFactory();
}
;
this.getPage = function(p) {
return a.getFactory().createPage(p);
}
;
this.getPageSet = function(i) {
var d = new jQuery.Deferred();
a.getFactory().createPageSet(i, d.resolve.bind(d),
d.reject.bind(d));
return d.promise();
}
;
}
;
}());
},
"sap/ushell/services/Personalization.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.Personalization");
jQuery.sap.require("sap.ushell.utils");
jQuery.sap.require("sap.ui.core.format.DateFormat");
var c = "sap.ushell.personalization#"
, I = "ITEM#"
, v = "VARIANTSET#"
, A = "yyyyMMddHHmmss"
, d = "ADMIN#"
, f = "sap-ushell-container-scope"
, g = "sap-ushell-container-storageUTCTimestamp"
, h = "sap-ushell-container-expireUTCTimestamp";
function j(C) {
return c + C;
}
sap.ushell.services.Personalization = function(a, C, P, b) {
this._oConfig = b;
this._sSeed = jQuery.sap.getObject("config.seed", undefined, b)
|| "ABC";
this._oAdapterWithBackendAdapter = new
sap.ushell.services.Personalization.WindowAdapter(this,a);
this._oAdapterWindowOnly = new
sap.ushell.services.Personalization.WindowAdapter(this,undefined);
this._supportsGetWithoutSubsequentLoad = (a &&
a.supportsGetWithoutSubsequentLoad === true);
this._oContainerMap = new sap.ushell.utils.Map();
this._oPendingOperationsMap = new sap.ushell.utils.Map();
}
;
sap.ushell.services.Personalization.prototype.SAVE_DEFERRED_DROPPED
= "Deferred save dropped (OK) - Data superseeded by subsequent save";
sap.ushell.services.Personalization.prototype.constants = {
keyCategory: {
"FIXED_KEY": "FIXED_KEY",
"GENERATED_KEY": "GENERATED_KEY"
},
writeFrequency: {
"HIGH": "HIGH",
"LOW": "LOW"
}
};
sap.ushell.services.Personalization.prototype.getGeneratedKey =
function() {
var C = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", D = new
Date().getTime().toString(), r = "", s, a = 0, i;
while (this._sSeed.length < 40) {
this._sSeed = this._sSeed +
Math.random().toString().substring(2);
}
for (i = 0; i < 3; i = i + 1) {
a = this._sSeed.charCodeAt(i) + 31 * a;
a = a & a;
r = r + C[Math.abs(a % 36)];
}
s = Math.random().toString().substring(2) + D +
Math.random().toString().substring(2) + D + "1234523413542345698772";
for (i = 0; i < 37; i = i + 1) {
a = this._sSeed.charCodeAt(i) + parseInt(s[i], 10) + 31 *
a;
a = a & a;
r = r + C[Math.abs(a % 36)];
}
return r.substring(0, 40);
}
;
sap.ushell.services.Personalization.prototype.getPersonalizer =
function(P, s, C) {
return new
sap.ushell.services.Personalizer(this,this._oAdapterWithBackendAdapter,P,s,C);
}
;

sap.ushell.services.Personalization.prototype.getTransientPersonalizer = function()
{
return new sap.ushell.services.TransientPersonalizer();
}
;
function k(e, a) {
var b;
for (b in a) {
if (typeof a[b] !== 'function') {
if (a.hasOwnProperty(b)) {
if (b === e) {
return true;
}
}
}
}
return false;
}
function l(s) {
var C = sap.ushell.services.Personalization.prototype.constants
, D = {
validity: Infinity,
keyCategory: C.keyCategory.GENERATED_KEY,
writeFrequency: C.writeFrequency.HIGH,
clientStorageAllowed: false
};
if (!s) {
return D;
}
D.validity = s && s.validity;
if (D.validity === null || D.validity === undefined || typeof
D.validity !== "number") {
D.validity = Infinity;
}
if (!(typeof D.validity === "number" && ((D.validity >= 0 &&
D.validity < 1000) || D.validity === Infinity))) {
D.liftime = Infinity;
}
D.keyCategory = k(s.keyCategory, C.keyCategory) ? s.keyCategory
: D.keyCategory;
D.writeFrequency = k(s.writeFrequency, C.writeFrequency) ?
s.writeFrequency : D.writeFrequency;
if (typeof s.clientStorageAllowed === 'boolean' &&
(s.clientStorageAllowed === true || s.clientStorageAllowed === false)) {
D.clientStorageAllowed = s.clientStorageAllowed;
}
return D;
}
function m(C, s, _, a) {
var P = "", L, b;
if (typeof C !== "string") {
throw new sap.ushell.utils.Error("sContainerKey is not a
string: sap.ushell.services.Personalization"," ");
}
if (C.length > 40) {
jQuery.sap.log.error("Personalization Service container key
(\"" + C + "\") should be less than 40 characters [current :" + C.length + "]");
}
s = this._adjustScope(s);
P = j(C);
L = window["sap-ushell-config"] && window["sap-ushell-
config"].services && window["sap-ushell-config"].services.ShellNavigation &&
window["sap-ushell-config"].services.ShellNavigation.config && window["sap-ushell-
config"].services.ShellNavigation.config.reload;
b = _;
if (s && s.validity === 0) {
if (L) {
s.validity = 1440;
} else {
b = a;
}
}
return {
oAdapterForScope: b,
oScope: s,
sPrefixedContainerKey: P
};
}
sap.ushell.services.Personalization.prototype.getContainer =
function(C, s, a) {
return this._createContainer(C, s, false, a);
}
;
sap.ushell.services.Personalization.prototype.createEmptyContainer
= function(C, s, a) {
return this._createContainer(C, s, true, a);
}
;
sap.ushell.services.Personalization.prototype._createContainer =
function(C, s, b, a) {
var D = new jQuery.Deferred(), r, L, e;
r = this._adjustScopePickAdapter(C, s,
this._oAdapterWithBackendAdapter, this._oAdapterWindowOnly);
e = new
sap.ushell.services.Personalization.ContextContainer(this,r.oAdapterForScope,r.sPre
fixedContainerKey,r.oScope,a);
if (b && this._supportsGetWithoutSubsequentLoad) {
L = new jQuery.Deferred();
L.resolve(e);
} else {
L = e.load();
}
L.fail(function() {
D.reject();
}).done(function() {
if (b || e._isExpired()) {
e.clear();
}
D.resolve(e);
});
return D.promise();
}
;
sap.ushell.services.Personalization.prototype.delContainer =
function(C, s) {
var D = {}, P, a = "", t = this;
s = t._adjustScope(s);
a = j(C);
D = new jQuery.Deferred();
P = t._pendingContainerOperations_cancelAddNext(C, null);
P.always(function() {
t.getContainer(C, s).fail(function() {
t._pendingContainerOperations_cancelAddNext(C, D);
D.reject();
}).done(function(b) {
var e;
t._pendingContainerOperations_cancelAddNext(C, D);
if (s.validity === 0) {
e = t._oAdapterWindowOnly;
} else {
e = t._oAdapterWithBackendAdapter;
}
e.delAdapterContainer(a, s).fail(function() {
D.reject();
}).done(function() {
D.resolve();
});
});
});
return D.promise();
}
;

sap.ushell.services.Personalization.prototype._pendingContainerOperations_flushAddN
ext = function(C, D) {
var P, s;
P = this._oPendingOperationsMap.get(C);
if (!P) {
P = new jQuery.Deferred();
P.resolve();
}
if (D !== null) {
this._oPendingOperationsMap.put(C, D);
}
if (!P || P.state() !== "pending") {
return P;
}
clearTimeout(P._sapTimeoutId);
P._sapTimeoutId = undefined;
if (typeof P._sapFnSave === "function") {
s = P._sapFnSave;
P._sapFnSave = undefined;
s();
}
return P;
}
;

sap.ushell.services.Personalization.prototype._pendingContainerOperations_cancelAdd
Next = function(C, D) {
var P;
P = this._oPendingOperationsMap.get(C);
if (!P) {
P = new jQuery.Deferred();
P.resolve();
}
if (D !== null) {
this._oPendingOperationsMap.put(C, D);
}
if (!P || P.state() !== "pending") {
return P;
}
if (P._sapTimeoutId) {
clearTimeout(P._sapTimeoutId);
P._sapTimeoutId = undefined;

P.resolve(sap.ushell.services.Personalization.prototype.SAVE_DEFERRED_DROPPED);
}
return P;
}
;

sap.ushell.services.Personalization.prototype.getPersonalizationContainer =
function(C) {
var P = ""
, a = {}
, D = {};
if (typeof C !== "string") {
throw new sap.ushell.utils.Error("sContainerKey is not a
string: sap.ushell.services.Personalization"," ");
}
P = j(C);
if (this._oContainerMap.containsKey(P)) {
return this._oContainerMap.get(P).promise();
}
D = new jQuery.Deferred();
a = new
sap.ushell.services.PersonalizationContainer(this._oAdapterWithBackendAdapter,P);
a.done(function(b) {
D.resolve(b);
}).fail(function(b) {
D.reject(b);
});
this._oContainerMap.put(P, D);
return D.promise();
}
;

sap.ushell.services.Personalization.prototype.delPersonalizationContainer =
function(C) {
var D = {}
, P = ""
, t = this;
P = j(C);
D = new jQuery.Deferred();
this.getPersonalizationContainer(C).fail(function() {
D.reject();
}).done(function(a) {
t._oAdapterWithBackendAdapter.delAdapterContainer(P).fail(function() {
D.reject();
}).done(function() {
t._oContainerMap.remove(P);
D.resolve();
});
});
return D.promise();
}
;
sap.ushell.services.Personalization.prototype._adjustScope = l;

sap.ushell.services.Personalization.prototype._adjustScopePickAdapter = m;
sap.ushell.services.Personalizer = function(s, a, P, S, C) {
this._sPersContainer = "";
this._sPersItem = "";
this._sPersVariant = null;
this._oAdapter = a;
this._oService = s;
this._oScope = S;
this._oComponent = C;
if (!P || !P.container || !P.item || typeof P.container !==
"string" || typeof P.item !== "string") {
throw new sap.ushell.utils.Error("Invalid input for
oPersId: sap.ushell.services.Personalization"," ");
}
this._sPersContainer = P.container;
this._sPersItem = P.item;
}
;
sap.ushell.services.Personalizer.prototype._getContainer =
function(P) {
if (!this._oGetContainerPromise) {
this._oGetContainerPromise = this._oService.getContainer(P,
this._oScope, this._oComponent);
}
return this._oGetContainerPromise;
}
;
sap.ushell.services.Personalizer.prototype.getPersData = function()
{
var D = {}
, t = this;
D = new jQuery.Deferred();
this._getContainer(this._sPersContainer).fail(function() {
D.reject();
}).done(function(C) {
D.resolve(C.getItemValue(t._sPersItem));
});
D.fail(function() {
jQuery.sap.log.error("Fail to get Personalization data for
Personalizer container: " + t._sPersContainer);
});
return D.promise();
}
;
sap.ushell.services.Personalizer.prototype.setPersData =
function(V) {
var D = {}
, t = this;
D = new jQuery.Deferred();
this._getContainer(this._sPersContainer).fail(function() {
D.reject();
}).done(function(C) {
C.setItemValue(t._sPersItem, V);
C.save().fail(function() {
D.reject();
}).done(function() {
D.resolve();
});
});
D.fail(function() {
jQuery.sap.log.error("Fail to set Personalization data for
Personalizer container: " + t._sPersContainer);
});
return D.promise();
}
;
sap.ushell.services.Personalizer.prototype.delPersData = function()
{
var D = {}, t = this, M;
D = new jQuery.Deferred();

this._oService.getPersonalizationContainer(this._sPersContainer).fail(function() {
D.reject();
}).done(function(C) {
C.delItem(t._sPersItem);
C.save().fail(function() {
D.reject();
}).done(function() {
D.resolve();
});
});
M = D.promise();
M.fail(function() {
jQuery.sap.log.error("Fail to delete Personalization data
for Personalizer container: " + this._sPersContainer);
});
return M;
}
;
sap.ushell.services.TransientPersonalizer = function() {
this._oValue = undefined;
}
;
sap.ushell.services.TransientPersonalizer.prototype.getPersData =
function() {
var D;
D = new jQuery.Deferred();
D.resolve(this._oValue);
return D.promise();
}
;
sap.ushell.services.TransientPersonalizer.prototype.setPersData =
function(V) {
var D;
D = new jQuery.Deferred();
this._oValue = V;
D.resolve();
return D.promise();
}
;
sap.ushell.services.TransientPersonalizer.prototype.delPersData =
function() {
var D;
D = new jQuery.Deferred();
this._oValue = undefined;
D.resolve();
return D.promise();
}
;
sap.ushell.services.TransientPersonalizer.prototype.setValue =
function(V) {
this._oValue = V;
}
;
sap.ushell.services.TransientPersonalizer.prototype.getValue =
function() {
return this._oValue;
}
;
sap.ushell.services.PersonalizationContainer = function(a, C) {
this._sContainerKey = C;
this._oAdapterContainer = {};
this._aLoadedVariantSetKeys = [];
this._aLoadedItemKeys = [];
var D = {}
, t = this;
this._init();
D = new jQuery.Deferred();
if (!this._sContainerKey || typeof this._sContainerKey !==
"string") {
throw new sap.ushell.utils.Error("Invalid container key:
sap.ushell.services.Personalization"," ");
}
this._oAdapterContainer =
a.getAdapterContainer(this._sContainerKey);
this.load().fail(function() {
D.reject();
}).done(function() {
D.resolve(t);
});
return D.promise();
}
;
sap.ushell.services.PersonalizationContainer.prototype._init =
function() {
this._oVariantSetMap = {};
this._oItemMap = {};
this._aLoadedVariantSetKeys = [];
this._aLoadedItemKeys = [];
this._oVariantSetMap = new sap.ushell.utils.Map();
this._oItemMap = new sap.ushell.utils.Map();
}
;
function n(O) {
if (O === undefined) {
return undefined;
}
try {
return JSON.parse(JSON.stringify(O));
} catch (e) {
return undefined;
}
}
function o(O) {
if (O === undefined) {
return undefined;
}
try {
return JSON.parse(O);
} catch (e) {
return undefined;
}
}
sap.ushell.services.PersonalizationContainer.prototype.load =
function() {
var D = {}
, i = []
, V = []
, a = []
, M = []
, t = this;
function b(a) {
var N = []
, P = [];
N = a.filter(function(s) {
return s.indexOf(I) !== 0;
});
if (N.length === 0) {
return a;
}
P = a.filter(function(s) {
return s.indexOf(I) === 0;
});
N.forEach(function(s) {
var e = {}
, q = "";
q = I + s;
e = n(t._oAdapterContainer.getItemValue(s));
t._oAdapterContainer.setItemValue(q, e);
t._oAdapterContainer.delItem(s);
if (jQuery.inArray(q, P) === -1) {
P.push(q);
}
});
return P;
}
D = new jQuery.Deferred();
if (!this._sContainerKey) {
throw new sap.ushell.utils.Error("Invalid container key:
sap.ushell.services.Personalization"," ");
}
this._init();
this._oAdapterContainer.load().fail(function() {
D.reject();
}).done(function() {
i = t._oAdapterContainer.getItemKeys().splice(0);
V = i.filter(function(s) {
return s.indexOf(v) === 0;
});
V.forEach(function(s) {
var e = {};
e = new
sap.ushell.services.PersonalizationContainerVariantSet(s,t._oAdapterContainer);
t._oVariantSetMap.put(s, e);
});
a = i.filter(function(s) {
return s.indexOf(v) !== 0;
});
M = b(a);
M.forEach(function(s) {
t._oItemMap.put(s,
n(t._oAdapterContainer.getItemValue(s)));
});
t._aLoadedVariantSetKeys =
t._oVariantSetMap.keys().splice(0);
t._aLoadedItemKeys = t._oItemMap.keys().splice(0);
D.resolve();
});
return D.promise();
}
;
sap.ushell.services.PersonalizationContainer.prototype.save =
function() {
var s, i;
this._serializeVariantSets();
this._serializeItems();
s = new jQuery.Deferred();
function S() {
s.resolve();
}
function a() {
s.reject();
}
try {
i = this._oAdapterContainer.save();
i.fail(a);
i.done(S);
} catch (e) {
s.reject();
}
return s.promise();
}
;
sap.ushell.services.PersonalizationContainer.prototype.getItemKeys
= function() {
return this._oItemMap.keys().map(function(e) {
return e.replace(I, "", "");
});
}
;
sap.ushell.services.PersonalizationContainer.prototype.getItemValue
= function(i) {
if (typeof i !== "string") {
return undefined;
}
return this._oItemMap.get(I + i);
}
;
sap.ushell.services.PersonalizationContainer.prototype.containsItem
= function(i) {
if (typeof i !== "string") {
return undefined;
}
return this._oItemMap.containsKey(I + i);
}
;
sap.ushell.services.PersonalizationContainer.prototype.setItemValue
= function(i, a) {
if (typeof i !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sItemKey is not a string: sap.ushell.services.Personalization"," ");
}
this._oItemMap.put(I + i, a);
}
;
sap.ushell.services.PersonalizationContainer.prototype.delItem =
function(i) {
if (typeof i !== "string") {
return undefined;
}
if (this.containsItem(i)) {
this._oItemMap.remove(I + i);
}
}
;

sap.ushell.services.PersonalizationContainer.prototype._serializeItems = function()
{
var i = []
, D = []
, t = this;
i = this._oItemMap.keys();
i.forEach(function(s) {
t._oAdapterContainer.setItemValue(s,
n(t._oItemMap.get(s)));
});
D = this._aLoadedItemKeys.filter(function(s) {
return !(i.indexOf(s) > -1);
});
D.forEach(function(s) {
t._oAdapterContainer.delItem(s);
});
}
;

sap.ushell.services.PersonalizationContainer.prototype.getVariantSetKeys =
function() {
var V = []
, P = [];
P = this._oVariantSetMap.keys();
V = P.map(function(e) {
return e.replace(v, "", "");
});
return V;
}
;

sap.ushell.services.PersonalizationContainer.prototype.containsVariantSet =
function(V) {
return this._oVariantSetMap.containsKey(v + V);
}
;

sap.ushell.services.PersonalizationContainer.prototype.getVariantSet = function(V)
{
var P, a = {};
P = v + V;
a = this._oVariantSetMap.get(P);
return a;
}
;

sap.ushell.services.PersonalizationContainer.prototype.addVariantSet = function(V)
{
var e = {}
, a = {}
, P = "";
if (this.containsVariantSet(V)) {
throw new sap.ushell.utils.Error("Container already
contains a variant set with key '" + V + "': sap.ushell.services.Personalization","
");
}
P = v + V;
e = {
currentVariant: null,
variants: {}
};
this._oAdapterContainer.setItemValue(P, e);
a = new
sap.ushell.services.PersonalizationContainerVariantSet(P,this._oAdapterContainer);
this._oVariantSetMap.put(P, a);
return a;
}
;

sap.ushell.services.PersonalizationContainer.prototype._serializeVariantSets =
function() {
var V = []
, D = []
, t = this;
V = this._oVariantSetMap.keys();
V.forEach(function(s) {
var a = {}
, b = {};
a = t._oVariantSetMap.get(s);
b = a._serialize();
t._oAdapterContainer.setItemValue(s, n(b));
});
D = this._aLoadedVariantSetKeys.filter(function(s) {
return !(V.indexOf(s) > -1);
});
D.forEach(function(s) {
t._oAdapterContainer.delItem(s);
});
}
;

sap.ushell.services.PersonalizationContainer.prototype.delVariantSet = function(V)
{
var P = "";
P = v + V;
this._oVariantSetMap.remove(P);
return this._oAdapterContainer.delItem(P);
}
;
sap.ushell.services.Personalization.ContextContainer = function(s,
a, C, S, b) {
this._oService = s;
this._sContainerKey = C;
this._oAdapterContainer = {};
this._oScope = S ||
sap.ushell.services.Personalization.prototype._adjustScope(S);
this._aLoadedKeys = [];
this._oUnmodifiableContainer = undefined;
var e;
if (!(b instanceof sap.ui.core.UIComponent) && b !== undefined)
{
throw new Error("oComponent passed must be a UI5 Component
or must be undefined");
}
if (b && b.getMetadata && b.getMetadata().getLibraryName) {
e = b.getMetadata().getLibraryName();
}
this.clear();
if (!this._sContainerKey || typeof this._sContainerKey !==
"string") {
throw new sap.ushell.utils.Error("Invalid container key:
sap.ushell.services.Personalization"," ");
}
this._oAdapterContainer =
a.getAdapterContainer(this._sContainerKey, this._oScope, e);
return this;
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.getValidity =
function() {
return this._oScope.validity;
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.clear = function() {
this._oItemMap = {};
this._aLoadedItemKeys = [];
this._clear = true;
this._oItemMap = new sap.ushell.utils.Map();
}
;
sap.ushell.services.Personalization.ContextContainer.prototype.load
= function() {
var D = {}, P, t = this;
D = new jQuery.Deferred();
if (!this._sContainerKey) {
throw new sap.ushell.utils.Error("Invalid container key:
sap.ushell.services.Personalization"," ");
}
this.clear();
P =
this._oService._pendingContainerOperations_flushAddNext(this._sContainerKey, D);
P.always(function() {
t._oAdapterContainer.load().fail(function() {
D.reject();
}).done(function() {
t._copyFromAdapter();
if (t._isExpired()) {
t.clear();
}
D.resolve();
});
});
return D.promise();
}
;

sap.ushell.services.Personalization.ContextContainer.prototype._copyFromAdapter =
function() {
var t = this, a;
a = t._oAdapterContainer.getItemKeys().splice(0);
a.forEach(function(i) {
t._oItemMap.put(i,
JSON.stringify(t._oAdapterContainer.getItemValue(i)));
});
this._aLoadedItemKeys = t._oItemMap.keys().splice(0);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype._isExpired =
function() {
var F, t, T;
if (this.getValidity() === Infinity || this.getValidity() ===
0) {
return false;
}
t = this._getItemValueInternal(d, h);
F = sap.ui.core.format.DateFormat.getDateInstance({
pattern: A
});
T = F.format(this._getNow(), true);
return t && T > t;
}
;

sap.ushell.services.Personalization.ContextContainer.prototype._getNow = function()
{
return new Date();
}
;
sap.ushell.services.Personalization.ContextContainer.prototype._copyToAdapterUpdati
ngValidity = function() {
var i = [], D = [], t = this, N, F, T, s;
if (this._clear) {
i = this._oAdapterContainer.getItemKeys().splice(0);
i.forEach(function(a) {
t._oAdapterContainer.delItem(a);
});
this._clear = false;
}
if (this.getValidity() === Infinity || this.getValidity() ===
0) {
this._delItemInternal(d, f);
this._delItemInternal(d, h);
this._delItemInternal(d, g);
} else {
F = sap.ui.core.format.DateFormat.getDateInstance({
pattern: A
});
N = this._getNow();
s = F.format(N, true);
T = F.format(new Date(N.getTime() + this.getValidity() *
60000), true);
this._setItemValueInternal(d, f, this._oScope);
this._setItemValueInternal(d, h, T);
this._setItemValueInternal(d, g, s);
}
i = this._oItemMap.keys();
i.forEach(function(a) {
t._oAdapterContainer.setItemValue(a,
o(t._oItemMap.get(a)));
});
D = this._aLoadedItemKeys.filter(function(a) {
return !(i.indexOf(a) > -1);
});
D.forEach(function(a) {
t._oAdapterContainer.delItem(a);
});
}
;
sap.ushell.services.Personalization.ContextContainer.prototype.save
= function() {
var s, P, t = this;
this._copyToAdapterUpdatingValidity();
s = new jQuery.Deferred();
P =
this._oService._pendingContainerOperations_cancelAddNext(this._sContainerKey, s);
P.always(function() {
try {
t._oAdapterContainer.save().fail(function() {
s.reject();
}).done(function() {
s.resolve();
});
} catch (e) {
s.reject();
}
});
return s.promise();
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.saveDeferred =
function(a) {
var s, P, t = this;
this._copyToAdapterUpdatingValidity();
s = new jQuery.Deferred();
P =
this._oService._pendingContainerOperations_cancelAddNext(this._sContainerKey, s);
function D() {
P.always(function() {
try {
t._oAdapterContainer.save().fail(function() {
s.reject();
}).done(function() {
s.resolve();
});
} catch (e) {
s.reject();
}
});
}
s._sapFnSave = D;
s._sapTimeoutId = setTimeout(D, a);
return s.promise();
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.flush = function() {
var s, P;
this._copyToAdapterUpdatingValidity();
s = new jQuery.Deferred();
P =
this._oService._pendingContainerOperations_flushAddNext(this._sContainerKey, s);
P.fail(function() {
s.reject();
}).done(function() {
s.resolve();
});
return s.promise();
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.getItemKeys =
function() {
var F = this._oItemMap.keys().filter(function(s) {
return s.indexOf(I) === 0;
});
return F.map(function(e) {
return e.replace(I, "", "");
});
}
;

sap.ushell.services.Personalization.ContextContainer.prototype._getInternalKeys =
function() {
return this._oItemMap.keys().splice(0);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.getItemValue =
function(i) {
return this._getItemValueInternal(I, i);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype._getItemValueInterna
l = function(P, i) {
if (typeof i !== "string" || typeof P !== "string") {
return undefined;
}
return o(this._oItemMap.get(P + i));
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.containsItem =
function(i) {
if (typeof i !== "string") {
return undefined;
}
return this._oItemMap.containsKey(I + i);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.setItemValue =
function(i, a) {
this._setItemValueInternal(I, i, a);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype._setItemValueInterna
l = function(i, s, a) {
if (typeof s !== "string" || typeof i !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sItemKey or sItemValue is not a string: sap.ushell.services.Personalization"," ");
}
if (s.length > 40) {
jQuery.sap.log.error("Personalization Service item
key/variant set name (\"" + s + "\") should be less than 40 characters [current :"
+ s.length + "]");
}
this._oItemMap.put(i + s, JSON.stringify(a));
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.delItem =
function(i) {
this._delItemInternal(I, i);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype._delItemInternal =
function(P, i) {
if (typeof i !== "string") {
return undefined;
}
if (typeof P !== "string") {
return undefined;
}
this._oItemMap.remove(P + i);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.getKey = function()
{
return this._sContainerKey.substring(c.length);
}
;

sap.ushell.services.Personalization.ContextContainer.prototype.getUnmodifiableConta
iner = function() {
var t = this;
if (!this._oUnmodifiableContainer) {
this._oUnmodifiableContainer = (function() {
var u = {};
["clear", "delItem", "flush", "load", "save",
"saveDeferred", "setItemValue"].forEach(function(F) {
u[F] = function(N) {
throw new sap.ushell.utils.Error("Function " +
N + " can't be called on unmodifiable
container","sap.ushell.services.Personalization.ContextContainer"," ");
}
.bind(undefined, F);
});
["containsItem", "getItemKeys", "getItemValue",
"getUnmodifiableContainer", "getValidity"].forEach(function(F) {
if (t[F]) {
u[F] = t[F].bind(t);
}
});
return u;
}());
}
return this._oUnmodifiableContainer;
}
;
sap.ushell.services.Personalization.VariantSetAdapter = function(C)
{
this._oContextContainer = C;
}
;

sap.ushell.services.Personalization.VariantSetAdapter.prototype.save = function() {
return this._oContextContainer.save();
}
;

sap.ushell.services.Personalization.VariantSetAdapter.prototype.getVariantSetKeys =
function() {
var P = this._oContextContainer._getInternalKeys()
, V = [];
V = P.map(function(e) {
return e.replace(v, "", "");
});
return V;
}
;

sap.ushell.services.Personalization.VariantSetAdapter.prototype.containsVariantSet
= function(V) {
return this.getVariantSetKeys().indexOf(V) >= 0;
}
;

sap.ushell.services.Personalization.VariantSetAdapter.prototype.getVariantSet =
function(V) {
var a = this._oContextContainer._getItemValueInternal(v, V);
if (!a) {
return undefined;
}
return new
sap.ushell.services.Personalization.VariantSet(V,this._oContextContainer);
}
;

sap.ushell.services.Personalization.VariantSetAdapter.prototype.addVariantSet =
function(V) {
var e = {}
, a = {};
if (this.containsVariantSet(V)) {
throw new sap.ushell.utils.Error("Container already
contains a variant set with key '" + V + "': sap.ushell.services.Personalization","
");
}
e = {
currentVariant: null,
variants: {}
};
this._oContextContainer._setItemValueInternal(v, V, e);
a = new
sap.ushell.services.Personalization.VariantSet(V,this._oContextContainer);
return a;
}
;

sap.ushell.services.Personalization.VariantSetAdapter.prototype.delVariantSet =
function(V) {
this._oContextContainer._delItemInternal(v, V);
}
;
sap.ushell.services.Personalization.VariantSet = function(V, C) {
var s, a, b = new sap.ushell.utils.Map(), e = new
sap.ushell.utils.Map(), i, q;
this._oContextContainer = C;
this._sVariantSetKey = V;
this._oVariantSetData =
this._oContextContainer._getItemValueInternal(v, this._sVariantSetKey);
if (!
Object.prototype.hasOwnProperty.call(this._oVariantSetData, "currentVariant")) {
throw new sap.ushell.utils.Error("Corrupt variant set data:
sap.ushell.services.Personalization"," ");
}
if (Object.prototype.hasOwnProperty.call(this._oVariantSetData,
"variants")) {
for (s in this._oVariantSetData.variants) {
if
(Object.prototype.hasOwnProperty.call(this._oVariantSetData.variants, s)) {
a = this._oVariantSetData.variants[s].name;
i = this._oVariantSetData.variants[s].variantData;
if (b.containsKey(a)) {
throw new sap.ushell.utils.Error("Variant name
already exists: sap.ushell.services.Personalization"," ");
} else {
b.put(a, s);
q = new
sap.ushell.services.PersonalizationContainerVariant(s,a,i);
e.put(s, q);
}
}
}
} else {
throw new sap.ushell.utils.Error("Corrupt variant set data:
sap.ushell.services.Personalization"," ");
}
return this;
}
;

sap.ushell.services.Personalization.VariantSet.prototype._getVariantSet =
function() {
return this._oVariantSetData;
}
;
sap.ushell.services.Personalization.VariantSet.prototype._serialize
= function() {
this._oContextContainer._setItemValueInternal(v,
this._sVariantSetKey, this._oVariantSetData);
}
;

sap.ushell.services.Personalization.VariantSet.prototype.getCurrentVariantKey =
function() {
return this._getVariantSet().currentVariant;
}
;

sap.ushell.services.Personalization.VariantSet.prototype.setCurrentVariantKey =
function(V) {
this._getVariantSet().currentVariant = V;
this._serialize();
}
;

sap.ushell.services.Personalization.VariantSet.prototype.getVariantKeys =
function() {
var V = new sap.ushell.utils.Map(), a =
this._getVariantSet(this._sVariantSetKey), s;
if (Object.prototype.hasOwnProperty.call(a, "variants")) {
for (s in a.variants) {
if (Object.prototype.hasOwnProperty.call(a.variants,
s)) {
V.put(s, "dummy");
}
}
} else {
throw new sap.ushell.utils.Error("Corrupt variant set data:
sap.ushell.services.Personalization"," ");
}
return V.keys();
}
;

sap.ushell.services.Personalization.VariantSet.prototype.getVariantNamesAndKeys =
function() {
var V = new sap.ushell.utils.Map(), a = new
sap.ushell.utils.Map(), b = this._getVariantSet(this._sVariantSetKey), s, e;
if (Object.prototype.hasOwnProperty.call(b, "variants")) {
for (s in b.variants) {
if (Object.prototype.hasOwnProperty.call(b.variants,
s)) {
e = b.variants[s].name;
if (V.containsKey(e)) {
throw new sap.ushell.utils.Error("Variant name
already exists: sap.ushell.services.Personalization"," ");
} else {
V.put(e, s);
}
a.put(s, "dummy");
}
}
} else {
throw new sap.ushell.utils.Error("Corrupt variant set data:
sap.ushell.services.Personalization"," ");
}
return V.entries;
}
;
sap.ushell.services.Personalization.VariantSet.prototype.getVariant
= function(V) {
if (typeof V !== "string") {
return undefined;
}
var a = this._getVariantSet(this._sVariantSetKey), s, b, e;
if (Object.prototype.hasOwnProperty.call(a, "variants") &&
Object.prototype.hasOwnProperty.call(a.variants, V)) {
s = a.variants[V].name;
e = a.variants[V].variantData;
b = new
sap.ushell.services.Personalization.Variant(this,V,s,e);
return b;
}
return undefined;
}
;

sap.ushell.services.Personalization.VariantSet.prototype.getVariantKeyByName =
function(V) {
if (typeof V !== "string") {
return undefined;
}
var a = this._getVariantSet(this._sVariantSetKey), s;
if (Object.prototype.hasOwnProperty.call(a, "variants")) {
for (s in a.variants) {
if (Object.prototype.hasOwnProperty.call(a.variants,
s)) {
if (V === a.variants[s].name) {
return s;
}
}
}
} else {
throw new sap.ushell.utils.Error("Corrupt variant set data:
sap.ushell.services.Personalization"," ");
}
return undefined;
}
;

sap.ushell.services.Personalization.VariantSet.prototype.containsVariant =
function(V) {
var a = this._getVariantSet();
if (typeof V !== "string") {
return undefined;
}
return Object.prototype.hasOwnProperty.call(a, "variants") &&
Object.prototype.hasOwnProperty.call(a.variants, V);
}
;
sap.ushell.services.Personalization.VariantSet.prototype.addVariant
= function(V) {
var K = []
, M = 0
, s = ""
, e = {};
K = this.getVariantKeys();
M = parseInt(K.sort(function(a, b) {
return a - b;
}).reverse()[0], 10);
s = isNaN(M) ? "0" : (M + 1).toString();
if (K.indexOf(s) >= 0) {
throw new sap.ushell.utils.Error("Variant key '" + s + "'
already exists in variant set" + this._sVariantSetKey + "':
sap.ushell.services.Personalization"," ");
}
if (typeof V !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantName is not a string: sap.ushell.services.Personalization"," ");
}
if (this.getVariantKeyByName(V) !== undefined) {
throw new sap.ushell.utils.Error("Variant name '" + V + "'
already exists in variant set '" + this._sVariantSetKey + "' (Old key: '" +
this.getVariantKeyByName(V) + "' New key: '" + s + "') ':
sap.ushell.services.Personalization"," ");
}
e = new sap.ushell.services.Personalization.Variant(this,s,V);
this._getVariantSet(this._sVariantSetKey).variants[s] = {
name: V,
variantData: {}
};
this._serialize();
return e;
}
;
sap.ushell.services.Personalization.VariantSet.prototype.delVariant
= function(V) {
var a;
if (typeof V !== "string") {
return undefined;
}
a = this._getVariantSet();
if (a && a.variants) {
delete this._oVariantSetData.variants[V];
}
this._serialize();
}
;
sap.ushell.services.PersonalizationContainerVariantSet =
function(V, a) {
var b, s, e, i, q;
this._sVariantSetKey = V;
this._oAdapterContainer = a;
this._oVariantNameMap = new sap.ushell.utils.Map();
this._oVariantMap = new sap.ushell.utils.Map();
b = n(this._oAdapterContainer.getItemValue(V));
if (b.hasOwnProperty("currentVariant")) {
this._sCurrentVariantKey = b.currentVariant;
} else {
throw new sap.ushell.utils.Error("Corrupt variant set data:
sap.ushell.services.Personalization"," ");
}
if (b.hasOwnProperty("variants")) {
for (s in b.variants) {
if (b.variants.hasOwnProperty(s)) {
e = b.variants[s].name;
i = b.variants[s].variantData;
if (this._oVariantNameMap.containsKey(e)) {
throw new sap.ushell.utils.Error("Variant name
already exists: sap.ushell.services.Personalization"," ");
} else {
this._oVariantNameMap.put(e, s);
q = new
sap.ushell.services.PersonalizationContainerVariant(s,e,i);
this._oVariantMap.put(s, q);
}
}
}
} else {
throw new sap.ushell.utils.Error("Corrupt variant set data:
sap.ushell.services.Personalization"," ");
}
return this;
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.getCurrentVariantK
ey = function() {
return this._sCurrentVariantKey;
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.setCurrentVariantK
ey = function(V) {
this._sCurrentVariantKey = V;
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.getVariantKeys =
function() {
return this._oVariantMap.keys();
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.getVariantNamesAnd
Keys = function() {
return
JSON.parse(JSON.stringify(this._oVariantNameMap.entries));
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.getVariant =
function(V) {
if (typeof V !== "string") {
return undefined;
}
return this._oVariantMap.get(V);
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.getVariantKeyByNam
e = function(V) {
if (typeof V !== "string") {
return undefined;
}
return this._oVariantNameMap.get(V);
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.containsVariant =
function(V) {
if (typeof V !== "string") {
return undefined;
}
return this._oVariantMap.containsKey(V);
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.addVariant =
function(V) {
var M = 0
, s = ""
, e = {};
M = parseInt(this._oVariantMap.keys().sort(function(a, b) {
return a - b;
}).reverse()[0], 10);
s = isNaN(M) ? "0" : (M + 1).toString();
if (this._oVariantMap.containsKey(s)) {
throw new sap.ushell.utils.Error("Variant key '" + s + "'
already exists in variant set" + this._sVariantSetKey + "':
sap.ushell.services.Personalization"," ");
}
if (typeof V !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantName is not a string: sap.ushell.services.Personalization"," ");
}
if (this._oVariantNameMap.containsKey(V)) {
throw new sap.ushell.utils.Error("Variant name '" + V + "'
already exists in variant set '" + this._sVariantSetKey + "' (Old key: '" +
this._oVariantNameMap.get(V) + "' New key: '" + s + "') ':
sap.ushell.services.Personalization"," ");
}
e = new
sap.ushell.services.PersonalizationContainerVariant(s,V);
this._oVariantMap.put(s, e);
this._oVariantNameMap.put(V, s);
return e;
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype._serialize =
function() {
var V = []
, a = {}
, b = {}
, t = this;
a.currentVariant = this._sCurrentVariantKey;
V = this.getVariantKeys();
V.forEach(function(s) {
var e = {};
e = t._oVariantMap.get(s);
b[s] = e._serialize();
});
a.variants = b;
return a;
}
;

sap.ushell.services.PersonalizationContainerVariantSet.prototype.delVariant =
function(V) {
var a = this._oVariantMap.get(V);
if (a) {
this._oVariantNameMap.remove(a.getVariantName());
this._oVariantMap.remove(V);
}
}
;
sap.ushell.services.Personalization.Variant = function(V, s, a) {
if (typeof s !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantKey is not a string: sap.ushell.services.Personalization"," ");
}
if (typeof a !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantName is not a string: sap.ushell.services.Personalization"," ");
}
this._oVariantSet = V;
this._sVariantKey = s;
this._sVariantName = a;
}
;
sap.ushell.services.Personalization.Variant.prototype.getVariantKey
= function() {
return this._sVariantKey;
}
;

sap.ushell.services.Personalization.Variant.prototype.getVariantName = function() {
return this._sVariantName;
}
;

sap.ushell.services.Personalization.Variant.prototype.setVariantName = function(V)
{
var a = this._oVariantSet._getVariantSet(), b;
if (typeof V !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantName is not a string: sap.ushell.services.Personalization"," ");
}
if (this._oVariantSet.getVariantKeyByName(V) !== undefined) {
throw new sap.ushell.utils.Error("Variant with name '" + V
+ "' already exists in variant set '" + this._oVariantSet._sVariantSetKey + "':
sap.ushell.services.Personalization"," ");
}
if (Object.prototype.hasOwnProperty.call(a, "variants") &&
Object.prototype.hasOwnProperty.call(a.variants, this._sVariantKey)) {
b = a.variants[this._sVariantKey];
b.name = V;
this._sVariantName = V;
this._oVariantSet._serialize();
} else {
throw new sap.ushell.utils.Error("Variant does not longer
exist"," ");
}
}
;
sap.ushell.services.Personalization.Variant.prototype.getItemValue
= function(i) {
if (typeof i !== "string") {
return undefined;
}
var a =
this._oVariantSet._getVariantSet().variants[this._sVariantKey].variantData;
return Object.prototype.hasOwnProperty.call(a, i) && n(a[i]);
}
;
sap.ushell.services.Personalization.Variant.prototype.setItemValue
= function(i, a) {
if (typeof i !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sItemKey is not a string: sap.ushell.services.Personalization"," ");
}
var b, e = this._oVariantSet._getVariantSet().variants &&
this._oVariantSet._getVariantSet().variants[this._sVariantKey];
if (!e) {
throw new sap.ushell.utils.Error("Variant does not longer
exist"," ");
}
if (!e.variantData) {
e.variantData = {};
}
b = e.variantData;
b[i] = n(a);
this._oVariantSet._serialize();
}
;
sap.ushell.services.Personalization.Variant.prototype.containsItem
= function(i) {
if (typeof i !== "string") {
return undefined;
}
var a =
this.oAccess.variantSet._getVariantSet().variants[this._sVariantKey].variantData;
return Object.prototype.hasOwnProperty.call(a, i);
}
;
sap.ushell.services.Personalization.Variant.prototype.getItemKeys =
function() {
var a =
this._oVariantSet._getVariantSet().variants[this._sVariantKey].variantData, i, b =
[];
for (i in a) {
if (Object.prototype.hasOwnProperty.call(a, i)) {
b.push(i);
}
}
b.sort();
return b;
}
;
sap.ushell.services.Personalization.Variant.prototype.delItem =
function(i) {
if (typeof i !== "string") {
return undefined;
}
var a =
this.oVariantSet._getVariantSet().variants[this._sVariantKey].variantData;
delete a[i];
this.oVariantSet._serialize();
}
;
sap.ushell.services.PersonalizationContainerVariant = function(V,
s, a) {
if (typeof V !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantKey is not a string: sap.ushell.services.Personalization"," ");
}
if (typeof s !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantName is not a string: sap.ushell.services.Personalization"," ");
}
if (a && typeof a !== "object") {
throw new sap.ushell.utils.Error("Parameter value of
sVariantName is not a string: sap.ushell.services.Personalization"," ");
}
this._oVariantKey = V;
this._oVariantName = s;
this._oItemMap = new sap.ushell.utils.Map();
this._oItemMap.entries = a || {};
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype.getVariantKey =
function() {
return this._oVariantKey;
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype.getVariantName =
function() {
return this._oVariantName;
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype.getItemValue =
function(i) {
if (typeof i !== "string") {
return undefined;
}
return this._oItemMap.get(i);
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype.setItemValue =
function(i, a) {
if (typeof i !== "string") {
throw new sap.ushell.utils.Error("Parameter value of
sItemKey is not a string: sap.ushell.services.Personalization"," ");
}
return this._oItemMap.put(i, a);
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype.containsItem =
function(i) {
if (typeof i !== "string") {
return undefined;
}
return this._oItemMap.containsKey(i);
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype.getItemKeys =
function() {
return this._oItemMap.keys();
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype.delItem = function(i)
{
if (typeof i !== "string") {
return undefined;
}
return this._oItemMap.remove(i);
}
;

sap.ushell.services.PersonalizationContainerVariant.prototype._serialize =
function() {
var i = []
, V = {}
, a = {}
, t = this;
V.name = this.getVariantName();
i = this._oItemMap.keys();
i.forEach(function(s) {
a[s] = t.getItemValue(s);
});
V.variantData = a;
return V;
}
;
sap.ushell.services.Personalization.WindowAdapter = function(s, b)
{
this._oBackendAdapter = b;
if (!
sap.ushell.services.Personalization.WindowAdapter.prototype.data) {

sap.ushell.services.Personalization.WindowAdapter.prototype.data = {};
}
}
;

sap.ushell.services.Personalization.WindowAdapter.prototype.getAdapterContainer =
function(C, s, a) {
var b = this._oBackendAdapter &&
this._oBackendAdapter.getAdapterContainer(C, s, a);
return new
sap.ushell.services.Personalization.WindowAdapterContainer(C,s,b);
}
;

sap.ushell.services.Personalization.WindowAdapter.prototype.delAdapterContainer =
function(C, s) {
var D = new jQuery.Deferred();
delete
sap.ushell.services.Personalization.WindowAdapter.prototype.data[C];
if (this._oBackendAdapter) {
this._oBackendAdapter.delAdapterContainer(C,
s).done(function() {
D.resolve();
}).fail(function(M) {
D.reject(M);
});
} else {
D.resolve();
}
return D.promise();
}
;
sap.ushell.services.Personalization.WindowAdapterContainer =
function(C, s, b) {
this._oBackendContainer = b;
this._oItemMap = new sap.ushell.utils.Map();
this._sContainerKey = C;
}
;
function p(C) {
var i, a = C.getItemKeys();
for (i = 0; i < a.length; i = i + 1) {
C.delItem(a[i]);
}
}

sap.ushell.services.Personalization.WindowAdapterContainer.prototype.load =
function() {
var D = new jQuery.Deferred(), i, a, t = this;
if
(sap.ushell.services.Personalization.WindowAdapter.prototype.data[this._sContainerK
ey]) {
this._oItemMap.entries =
n(sap.ushell.services.Personalization.WindowAdapter.prototype.data[this._sContainer
Key]);
if (this._oBackendContainer) {
p(this._oBackendContainer);
a = this.getItemKeys();
for (i = 0; i < a.length; i = i + 1) {
this._oBackendContainer.setItemValue(a[i],
this._oItemMap.get(a[i]));
}
}
D.resolve();
} else {
if (this._oBackendContainer) {
this._oBackendContainer.load().done(function() {
a = t._oBackendContainer.getItemKeys();
for (i = 0; i < a.length; i = i + 1) {
t.setItemValue(a[i],
t._oBackendContainer.getItemValue(a[i]));
}

sap.ushell.services.Personalization.WindowAdapter.prototype.data[t._sContainerKey]
= n(t._oItemMap.entries);
D.resolve();
}).fail(function(M) {
D.reject(M);
});
} else {

sap.ushell.services.Personalization.WindowAdapter.prototype.data[this._sContainerKe
y] = {};
D.resolve();
}
}
return D.promise();
}
;

sap.ushell.services.Personalization.WindowAdapterContainer.prototype.save =
function() {
var D = new jQuery.Deferred();

sap.ushell.services.Personalization.WindowAdapter.prototype.data[this._sContainerKe
y] = n(this._oItemMap.entries);
if (this._oBackendContainer) {
this._oBackendContainer.save().done(function() {
D.resolve();
}).fail(function(M) {
D.reject(M);
});
} else {
D.resolve();
}
return D.promise();
}
;

sap.ushell.services.Personalization.WindowAdapterContainer.prototype.getItemKeys =
function() {
return this._oItemMap.keys();
}
;

sap.ushell.services.Personalization.WindowAdapterContainer.prototype.containsItem =
function(i) {
this._oItemMap.containsKey(i);
}
;

sap.ushell.services.Personalization.WindowAdapterContainer.prototype.getItemValue =
function(i) {
return this._oItemMap.get(i);
}
;

sap.ushell.services.Personalization.WindowAdapterContainer.prototype.setItemValue =
function(i, a) {
this._oItemMap.put(i, a);
if (this._oBackendContainer) {
this._oBackendContainer.setItemValue(i, a);
}
}
;

sap.ushell.services.Personalization.WindowAdapterContainer.prototype.delItem =
function(i) {
this._oItemMap.remove(i);
if (this._oBackendContainer) {
this._oBackendContainer.delItem(i);
}
}
;
}());
},
"sap/ushell/services/PluginManager.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.PluginManager");
var S = "sap.ushell.services.PluginManager"
, a = "sap-ushell-plugin-type"
, b = "RendererExtensions"
, s = [b, "UserDefaults"];
sap.ushell.services.PluginManager = function() {
var t = this;
this._oPluginCollection = {};
this._oCategoryLoadingProgress = {};
this._mInitializedComponentPromise = {};
s.forEach(function(p) {
t._oPluginCollection[p] = {};
t._oCategoryLoadingProgress[p] = new jQuery.Deferred();
});
this._handlePluginCreation = function(c, p, P) {
var t = this
, o = (t._oPluginCollection[c])[p];
try {
if (o.hasOwnProperty("component")) {
if
(t._mInitializedComponentPromise.hasOwnProperty(o.component)) {

t._mInitializedComponentPromise[o.component].then(function() {
t._instantiateComponent(o, P);
}, function() {
t._instantiateComponent(o, P);
});
} else {
t._mInitializedComponentPromise[o.component] =
t._instantiateComponent(o, P);
}
} else {
jQuery.sap.log.error("Invalid plugin configuration.
The plugin " + p + " must contain a <component> key", S);
}
} catch (e) {
jQuery.sap.log.error("Error while loading bootstrap
plugin: " + o.component || "", S);
if (P) {
P.reject(e);
}
}
}
;
this._instantiateComponent = function(p, P) {
var c = jQuery.extend(true, {}, p)
, A = {
ui5ComponentName: c.component,
url: c.url
};
c.name = c.component;
delete c.component;
A.applicationDependencies = c;
if (c.config) {
A.applicationConfiguration = c.config;
delete c.config;
}
A.loadDefaultDependencies = false;
return
sap.ushell.Container.getService("Ui5ComponentLoader").createComponent(A).done(funct
ion(l) {
if (P) {
P.resolve();
}
}).fail(function(e) {
e = e || "";
jQuery.sap.log.error("Cannot create UI5 plugin
component: " + e, e.stack, S);
if (P) {
P.reject(e);
}
});
}
;
this.getSupportedPluginCategories = function() {
return jQuery.extend(true, [], s);
}
;
this.getRegisteredPlugins = function() {
return jQuery.extend(true, {}, this._oPluginCollection);
}
;
this.registerPlugins = function(p) {
var t = this, c, P;
if (!p) {
return;
}
sap.ushell.utils.addTime("PluginManager.registerPlugins");
Object.keys(p).sort().forEach(function(d) {
c = p[d] || {};
P = c.config || {};
if (c && c.hasOwnProperty("module")) {
jQuery.sap.log.error("Plugin " + d + " cannot get
registered, because the module mechanism for plugins is not valid anymore. Plugins
need to be defined as SAPUI5 components.", S);
jQuery.sap.require(c.module);
return;
}
if (P && P.hasOwnProperty(a)) {
if (jQuery.inArray(P[a], s) !== -1) {
(t._oPluginCollection[P[a]])[d] =
jQuery.extend(true, {}, p[d]);
} else {
jQuery.sap.log.warning("Plugin " + d + " will
not be inserted into the plugin collection of the PluginManager, because of
unsupported category " + P[a], S);
}
} else {
(t._oPluginCollection[b])[d] = jQuery.extend(true,
{}, p[d]);
}
});
}
;
this.getPluginLoadingPromise = function(p) {
if (this._oCategoryLoadingProgress.hasOwnProperty(p)) {
return this._oCategoryLoadingProgress[p].promise();
}
}
;
this.loadPlugins = function(p) {
var t = this, P, o;
sap.ushell.utils.addTime("PluginManager.startLoadPlugins["
+ p + "]");
if (jQuery.inArray(p, s) !== -1) {
if
(t._oCategoryLoadingProgress[p].pluginLoadingTriggered !== undefined) {
return t._oCategoryLoadingProgress[p].promise();
} else {

t._oCategoryLoadingProgress[p].pluginLoadingTriggered = true;
}
if (Object.keys(t._oPluginCollection[p]).length > 0) {
P = [];

Object.keys(t._oPluginCollection[p]).forEach(function(c) {
o = new jQuery.Deferred();
P.push(o.promise());
t._handlePluginCreation(p, c, o);
});
jQuery.when.apply(undefined, P).done(function() {

sap.ushell.utils.addTime("PluginManager.endLoadPlugins[" + p + "]");
t._oCategoryLoadingProgress[p].resolve();
}).fail(t._oCategoryLoadingProgress[p].reject.bind(
));
} else {
t._oCategoryLoadingProgress[p].resolve();
}
} else {
jQuery.sap.log.error("Plugins with category " + p + "
cannot be loaded by the PluginManager", S);
t._oCategoryLoadingProgress[p].reject("Plugins with
category " + p + " cannot be loaded by the PluginManager");
}
return t._oCategoryLoadingProgress[p].promise();
}
;
}
;
sap.ushell.services.PluginManager.hasNoAdapter = true;
}());
},
"sap/ushell/services/Search.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.Search");

jQuery.sap.require('sap.ushell.renderers.fiori2.search.SearchHelper');
var s = sap.ushell.renderers.fiori2.search.SearchHelper;
sap.ushell.services.Search = function(a, c) {
this.init.apply(this, arguments);
}
;
sap.ushell.services.Search.prototype = {
init: function(a, c, p, S) {
this.oAdapter = a;
this.oContainerInterface = c;
this.oLpdService =
sap.ushell.Container.getService("LaunchPage");
this.optimizedAppSearch = false;
if (S && S.config && S.config.optimizedAppSearch !==
undefined) {
this.optimizedAppSearch = S.config.optimizedAppSearch;
}
},
isSearchAvailable: function() {
return this.oAdapter.isSearchAvailable();
},
getSina: function() {
return this.oAdapter.getSina();
},
isValid: function(t) {
if (this.oLpdService.isTileIntentSupported) {
return this.oLpdService.isTileIntentSupported(t);
} else {
return true;
}
},
_getCatalogTiles: function() {
var t = this;
if (t.allTilesDeferred) {
return t.allTilesDeferred;
}
var c = [];
t.allTilesDeferred =
t.oLpdService.getCatalogs().then(function(d) {
var D = [];
for (var i = 0; i < d.length; i++) {
D.push(t.oLpdService.getCatalogTiles(d[i]));
}
var o = t._getPersonalizedGroupTiles(new
jQuery.Deferred());
D.push(o);
return jQuery.when.apply(jQuery, D).then(function() {
var T = arguments;
for (var i = 0; i < T.length; i++) {
var f = T[i];
for (var j = 0; j < f.length; j++) {
try {
var g, h, k, l, m, S, I;
g = f[j];
if (!t.optimizedAppSearch) {
h =
t.oLpdService.getCatalogTileView(g);
}
k =
t.oLpdService.getCatalogTileKeywords(g);
l =
t.oLpdService.getCatalogTileTargetURL(g);
m =
t.oLpdService.getCatalogTilePreviewTitle(g) ||
t.oLpdService.getCatalogTileTitle(g);
S =
t.oLpdService.getCatalogTileSize(g);
I =
t.oLpdService.getCatalogTilePreviewIcon(g) || "sap-icon://business-objects-
experience";
if (t.isValid(g)) {
c.push({
tile: g,
keywords: k,
url: l,
title: m || '',
icon: I,
size: S
});
}
if (!t.optimizedAppSearch) {
h.destroy();
}
if (g.getContract) {
var p = g.getContract("preview");
if (p) {
p.setEnabled(false);
}
}
} catch (e) {
jQuery.sap.log.error(e);
}
}
}
c = t._removeDuplicateTiles(c);
c.sort(function(a, b) {
if (a.title.toUpperCase() <
b.title.toUpperCase()) {
return -1;
}
if (a.title.toUpperCase() >
b.title.toUpperCase()) {
return 1;
}
return 0;
});
return c;
});
});
return t.allTilesDeferred;
},
_getPersonalizedGroupTiles: function(d) {
var t = this;
t.oLpdService.getGroups().then(function(g) {
var D = [];
var G;
for (var j = 0; j < g.length; j++) {
G = t.oLpdService.getGroupTiles(g[j]) || [];
D = D.concat(G);
}
d.resolve(D);
});
return d.promise();
},
_removeDuplicateTiles: function(t) {
var I = {}, k, u = [];
for (var i = 0; i < t.length; ++i) {
var T = t[i];
if (!T.url) {
continue;
}
var f = new RegExp('DisplayFactSheet','i');
if (f.test(T.url)) {
continue;
}
k = T.title + T.url;
if (I[k] === undefined) {
I[k] = T;
u.push(T);
}
}
return u;
},
_searchTiles: function(p) {
var S = p.searchTerm;
var c = p.aCatalogTiles;
var t = p.top || 10;
var i = p.skip || 0;
var m = 0;
var b = p.searchInKeywords || false;
var f = [], T;
var a = function(T, h) {
m += 1;
if (m <= i) {
return;
}
if (m > (i + t)) {
return;
}
var r = jQuery.extend({}, T);
r.tooltip = r.title;
if (h.length > 0) {
r.label = h;
} else {
r.label = T.title;
}
f.push(r);
};
var o;
if (p.bSuggestion === true) {
o = new s.Tester(S);
} else {
o = new s.Tester(S,'',true);
}
var d;
for (var j = 0; j < c.length; j++) {
T = c[j];
d = o.test(T.title);
if (d.bMatch === true) {
a(T, d.sHighlightedText);
continue;
}
if (b && T.keywords && Array.isArray(T.keywords)) {
d = o.test(T.keywords.join(' '));
if (d.bMatch === true) {
a(T, "");
}
}
}
return {
totalResults: m,
searchTerm: S,
getElements: function() {
return f;
}
};
},
queryApplications: function(p) {
var t = this;
return this._getCatalogTiles().then(function(c) {
p.aCatalogTiles = c;
return t._searchTiles(p);
});
},
queryApplicationsByTarget: function(S, r) {
this._getCatalogTiles().done(function(c) {
var R = [];
for (var j = 0, l = S && S.length || 0; j < l; j++) {
var o = S[j]
, u =
sap.ushell.Container.getService("URLParsing");
for (var i = 0; i < c.length; i++) {
var t = u.parseShellHash(c[i].url);
if (t && (t.semanticObject ===
o.semanticObject) && (t.action === o.action)) {
R.push(c[i]);
break;
}
}
}
r(R);
});
}
};
}());
},
"sap/ushell/services/ShellNavigation.js": function() {
(function() {
"use strict";
jQuery.sap.require("sap.ui.thirdparty.signals");
jQuery.sap.require("sap.ui.thirdparty.hasher");
jQuery.sap.require("sap.ui.core.routing.HashChanger");
jQuery.sap.declare("sap.ushell.services.ShellNavigation");
function c() {
var h = window.history.length;
var m = {
onHashChanged: function() {
if (window.history.length !== h) {
m.onHashChanged = function() {}
;
m.isInitialNavigation = function() {
return false;
}
;
}
},
isInitialNavigation: function() {
return true;
}
};
return m;
}
sap.ui.core.routing.HashChanger.extend("sap.ushell.services.ShellNavigationHashChan
ger", {
constructor: function(C) {
var u;
this.oServiceConfig = C;
if (jQuery.sap.getUriParameters().get("sap-ushell-reload"))
{
if (jQuery.sap.getUriParameters().get("sap-ushell-
reload") === "X" || jQuery.sap.getUriParameters().get("sap-ushell-reload") ===
"true") {
u = true;
} else {
u = false;
}
}
if (u !== undefined) {
if (typeof this.oServiceConfig !== "object") {
this.oServiceConfig = {};
}
this.oServiceConfig.reload = u;
}
sap.ui.core.routing.HashChanger.apply(this);
this._initializedByShellNav = false;
this.oURLShortening =
sap.ushell.Container.getService("URLShortening");
this.privfnShellCallback = null;
this.privappHashPrefix = "&/";
this.privhashPrefix = "#";
this.aNavigationFilters = [];
this.NavigationFilterStatus = {
Continue: "Continue",
Custom: "Custom",
Abandon: "Abandon"
};
this.privgetCurrentShellHash = function() {
var r = this.privsplitHash(hasher.getHash());
return {
hash: "#" + ((r && r.shellPart) ? r.shellPart : "")
};
}
;
this.privconstructHash = function(A) {
var o = this.privgetCurrentShellHash();
o.hash = o.hash + A;
return o;
}
;
this.privconstructShellHash = function(s) {
return
sap.ushell.Container.getService("URLParsing").constructShellHash(s);
}
;
this.privsplitHash = function(h) {
var s, o, A;
if (h === undefined || h === null || h === "") {
return {
shellPart: null,
appSpecificRoute: null,
intent: null,
params: null
};
}
s =
sap.ushell.Container.getService("URLParsing").parseShellHash(h);
if (s === undefined || s === null) {
return null;
}
o = (s.params && !jQuery.isEmptyObject(s.params)) ?
s.params : null;
A = s.appSpecificRoute;
s.appSpecificRoute = undefined;
return {
shellPart:
this.privstripLeadingHash(this.privconstructShellHash(s)) || null,
appSpecificRoute: A || null,
intent: (s.semanticObject && s.action &&
(s.semanticObject + "-" + s.action + (s.contextRaw || ""))) || null,
params: o
};
}
;
this.privsetHash = function(f, A, w) {
hasher.prependHash = "";
f = this.privstripLeadingHash(f);
A = A || "";
if (w === undefined) {
w = true;
}
if (w) {
this.fireEvent("hashSet", {
sHash: A
});
hasher.setHash(f);
} else {
this.fireEvent("hashReplaced", {
sHash: A
});
hasher.replaceHash(f);
}
}
;
this.privstripLeadingHash = function(h) {
if (h[0] === '#') {
return h.substring(1);
}
return h;
}
;
this.registerNavigationFilter = function(f) {
if (typeof f !== "function") {
throw new Error("fnFilter must be a function");
}
this.aNavigationFilters.push(f);
}
;
function b(o, t) {
this.oAppState = undefined;
this.oPromise = (new jQuery.Deferred()).resolve();
this.getNextKey = function() {
this.oAppState =
sap.ushell.Container.getService("AppState").createEmptyAppState(o, t);
return this.oAppState.getKey();
}
;
this.store = function(v) {
var n;
this.oAppState.setData(v);
n = this.oAppState.save();
this.oPromise = jQuery.when(this.oPromise, n);
}
;
this.getPromise = function() {
return this.oPromise;
}
;
}
this.compactParams = function(p, r, o, t) {
var U = sap.ushell.Container.getService("URLParsing"),
s, d, R, P, D = new jQuery.Deferred(), h = U.constructShellHash({
"target": {
"semanticObject": "SO",
"action": "action"
},
"params": p
}, s);
if (p === undefined || Object.keys(p).length === 0) {
return D.resolve(p).promise();
}
s = new b(o,t);
R = this.oURLShortening.compactHash(h, r, s);
d = U.parseParameters(R.hash.match(/\?.*/)[0]);
P = s.getPromise();
P.done(function() {
D.resolve(d);
}).fail(function(m) {
D.reject(m);
});
return D;
}
;
this.hrefForExternal = function(A, v, o, d) {
var r = this.hrefForExternalNoEnc(A, v, o, d);
function e(R, v) {
if (v === true) {
R.hash = encodeURI(R.hash);
} else {
R = encodeURI(R);
}
return R;
}
if (!d) {
return e(r, v);
}
var D = new jQuery.Deferred();
r.done(function(R) {
D.resolve(e(R, v));
}).fail(D.reject.bind(D));
return D;
}
;
this.hrefForExternalNoEnc = function(A, v, o, d) {
var t, p, D, s = new b(o), r;
t = this.privhrefForExternalNoEnc(A, s);
if (v === true) {
r = {
hash: t.hash,
params: t.params,
skippedParams: t.skippedParams
};
} else {
r = t.hash;
}
if (!d) {
return r;
}
p = s.getPromise();
D = new jQuery.Deferred();
p.done(function() {
D.resolve(r);
}).fail(function(m) {
D.reject(m);
});
return D;
}
;
this.privhrefForExternalNoEnc = function(A, s) {
var r;
if (A === undefined) {
return this.privgetCurrentShellHash();
}
if (A && A.target && (typeof A.target.semanticObject
=== "string" || typeof A.target.shellHash === "string")) {
r = "#" + this.privconstructShellHash(A);
return this.oURLShortening.compactHash(r,
undefined, s);
}
return this.privgetCurrentShellHash();
}
;
this.privgetAppHash = function(A) {
var s, o;
if (A && A.target && (typeof A.target.shellHash ===
"string")) {
o =
sap.ushell.Container.getService("URLParsing").parseShellHash(A.target.shellHash);
s = o && o.appSpecificRoute;
s = s && s.substring(2);
}
return s;
}
;
this.hrefForAppSpecificHash = function(A) {
return
encodeURI(this.privconstructHash(this.privappHashPrefix + A).hash);
}
;
this.toExternal = function(A, o, w) {
var h, s = new b(o), d;
h = this.privhrefForExternalNoEnc(A, s).hash;
d = this.privgetAppHash(A);
this.privsetHash(h, d, w);
}
;
this.toAppHash = function(A, w) {
var h = this.privconstructHash(this.privappHashPrefix +
A).hash;
this.privsetHash(h, A, w);
}
;
}
});

sap.ushell.services.ShellNavigationHashChanger.prototype.initShellNavigation =
function(s) {
this._oInitialNavigationManager = c();
if (this._initializedByShellNav) {
jQuery.sap.log.info("initShellNavigation already called on
this ShellNavigationHashChanger instance.");
return false;
}
this.privfnShellCallback = s;
hasher.changed.add(this.treatHashChanged, this);
if (!hasher.isActive()) {
hasher.initialized.addOnce(this.treatHashChanged, this);
hasher.init();
} else {
this.treatHashChanged(hasher.getHash());
}
this._initializedByShellNav = true;
return true;
}
;
sap.ushell.services.ShellNavigationHashChanger.prototype.init =
function() {
if (this._initialized) {
jQuery.sap.log.info("init already called on this
ShellNavigationHashChanger instance.");
return false;
}
var n = this.privsplitHash(hasher.getHash())
, A = n && (n.appSpecificRoute || " ").substring(2);
this.fireEvent("hashChanged", {
newHash: A
});
this._initialized = true;
return true;
}
;

sap.ushell.services.ShellNavigationHashChanger.prototype.treatHashChanged =
function(n, o) {
if (this.inAbandonFlow) {
return;
}
this._oInitialNavigationManager.onHashChanged();
var A, O, N, b, s, d, f, g, E, i, F;
n = this.oURLShortening.expandHash(n);
o = this.oURLShortening.expandHash(o);
N = this.privsplitHash(n);
b = this.privsplitHash(o);
if (!N) {
E = new Error("Illegal new hash - cannot be parsed: '" + n
+ "'");
this.fireEvent("shellHashChanged", {
newShellHash: n,
newAppSpecificRoute: null,
oldShellHash: (b ? b.shellPart : o),
error: E
});
this.privfnShellCallback(n, null, (b ? b.shellPart : o), (b
? b.appSpecificRoute : null), E);
return;
} else {
s = N.intent;
}
if (!b) {
b = {
shellPart: o,
appSpecificRoute: null
};
} else {
d = b.intent;
}
for (i = 0; i < this.aNavigationFilters.length; i = i + 1) {
try {
F = this.aNavigationFilters[i].call(undefined, n, o);
if (F === this.NavigationFilterStatus.Custom) {
return;
}
if (F === this.NavigationFilterStatus.Abandon) {
this.inAbandonFlow = true;
hasher.replaceHash(o);
this.inAbandonFlow = false;
return;
}
} catch (e) {
jQuery.sap.log.error("Error while calling Navigation
filter! ignoring filter...", e.message, "sap.ushell.services.ShellNavigation");
}
}
if (s === d && (o !== undefined)) {
if (!this._parametersChanged(N.params, b.params)) {
A = (N.appSpecificRoute || " ").substring(2);
O = (b.appSpecificRoute || " ").substring(2);
jQuery.sap.log.info("Inner App Hash changed from '" + O
+ "' to '" + A + "'", null, "sap.ushell.services.ShellNavigation");
this.fireEvent("hashChanged", {
newHash: A,
oldHash: O
});
return;
}
if (this.hasListeners("shellHashParameterChanged")) {
f =
sap.ushell.Container.getService("URLParsing").paramsToString(N.params);
g =
sap.ushell.Container.getService("URLParsing").paramsToString(b.params);
jQuery.sap.log.info("Shell hash parameters changed from
'" + g + "' to '" + f + "'", null, "sap.ushell.services.ShellNavigation");
this.fireEvent("shellHashParameterChanged", {
oNewParameters: N.params,
oOldParameters: b.params
});
return;
}
}
function r(h) {
window.location.hash = '#' + encodeURI(h);
window.location.reload();
}
if (o !== undefined) {
if (this.oServiceConfig && this.oServiceConfig.reload) {
r(n);
}
}
jQuery.sap.log.info("Outer shell hash changed from '" + o + "'
to '" + n + "'", null, "sap.ushell.services.ShellNavigation");
this.fireEvent("shellHashChanged", {
newShellHash: N.shellPart,
newAppSpecificRoute: N.appSpecificRoute,
oldShellHash: b.shellPart,
oldAppSpecificRoute: b.appSpecificRoute
});
this.privfnShellCallback(N.shellPart, N.appSpecificRoute,
b.shellPart, b.appSpecificRoute);
}
;
function a() {
jQuery.sap.require('sap.m.MessageBox');
sap.m.MessageBox.show("Due to a configuration change on the
server,\nclient and server are out of sync.\n We strongly recommend to reload the
page soon.\nReload page now?", {
icon: sap.m.MessageBox.Icon.ERROR,
title: "Client out of sync with server.",
actions: [sap.m.MessageBox.Action.YES,
sap.m.MessageBox.Action.NO],
onClose: function(A) {
if (A === sap.m.MessageBox.Action.YES) {
window.setTimeout(function() {
window.location.reload();
}, 0);
}
}
});
}

sap.ushell.services.ShellNavigationHashChanger.prototype.isInitialNavigation =
function() {
return this._oInitialNavigationManager &&
this._oInitialNavigationManager.isInitialNavigation();
}
;
sap.ushell.services.ShellNavigationHashChanger.prototype._parametersChanged =
function(n, o) {
return !jQuery.sap.equal(n, o);
}
;
sap.ushell.services.ShellNavigationHashChanger.prototype.setHash =
function(h) {
this.toAppHash(h, true);
}
;

sap.ushell.services.ShellNavigationHashChanger.prototype.replaceHash = function(h)
{
this.toAppHash(h, false);
}
;
sap.ushell.services.ShellNavigationHashChanger.prototype.getHash =
function() {
return this.getAppHash();
}
;
sap.ushell.services.ShellNavigationHashChanger.prototype.getAppHash
= function() {
var n = this.privsplitHash(hasher.getHash())
, A = n && (n.appSpecificRoute || " ").substring(2);
return A;
}
;
sap.ushell.services.ShellNavigationHashChanger.prototype.destroy =
function() {
hasher.changed.remove(this.treatHashChanged, this);
sap.ui.core.routing.HashChanger.prototype.destroy.apply(this,
arguments);
}
;
function S(C, p, s) {
var o = s && s.config;
this.hashChanger = new
sap.ushell.services.ShellNavigationHashChanger(o);
this.isInitialNavigation = function() {
return this.hashChanger.isInitialNavigation();
}
;
this.hrefForExternal = function(A, v, b, d) {
return this.hashChanger.hrefForExternal(A, v, b, d);
}
;
this.hrefForAppSpecificHash = function(A) {
return this.hashChanger.hrefForAppSpecificHash(A);
}
;
this.compactParams = function(P, r, b, t) {
return this.hashChanger.compactParams(P, r, b, t);
}
;
this.toExternal = function(A, b, w) {
this.hashChanger.toExternal(A, b, w);
}
;
this.toAppHash = function(A, w) {
this.hashChanger.toAppHash(A, w);
}
;
this.init = function(f) {
hasher.prependHash = "";

sap.ui.core.routing.HashChanger.replaceHashChanger(this.hashChanger);
var b = sap.ui.getCore().getEventBus();

b.subscribe("sap.ui.core.UnrecoverableClientStateCorruption", "RequestReload", a);


this.hashChanger.initShellNavigation(f);
return this;
}
;
this.NavigationFilterStatus =
this.hashChanger.NavigationFilterStatus;
this.registerNavigationFilter = function(f) {
this.hashChanger.registerNavigationFilter(f);
}
;
}
sap.ushell.services.ShellNavigation = S;
sap.ushell.services.ShellNavigation.hasNoAdapter = true;
}());
},
"sap/ushell/services/SupportTicket.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.SupportTicket");
sap.ushell.services.SupportTicket = function(a, c, p, s) {
var S = (s && s.config) || {};
this.createTicket = function(o) {
return a.createTicket(o);
}
;
this.isEnabled = function() {
return S.enabled === true;
}
;
}
;
}());
},
"sap/ushell/services/URLParsing.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.URLParsing");
sap.ushell.services.URLParsing = function() {
var r = /^(([A-Za-z0-9_\/]+)-([A-Za-z0-9_\/\-]+)(~([A-Z0-9a-
z=+\/]+))?)?([?]([^&]|(&[^\/]))*&?)?$/;
this.getShellHash = function(s) {
var a = /[^#]*#(([^&]|&[^\/])*)(&\/.*)?/
, m = a.exec(s);
if (m) {
return m[1];
}
return undefined;
}
;
this.getHash = function(u) {
var a = /#(.*)/
, m = a.exec(u);
if (m) {
return m[1];
}
return undefined;
}
;
this.isIntentUrl = function(u) {
var a = /^#/, t, l, T, L, h, p;
if (typeof u !== "string") {
return false;
}
if (!a.test(u)) {
t = (new URI(u)).normalize();
T = t.protocol() + "://" + t.host() + t.pathname();
l = (new URI(window.location.href)).normalize();
L = l.protocol() + "://" + l.host() + l.pathname();
if (T !== L) {
return false;
}
}
h = this.getHash(u);
if (!h) {
return false;
}
p = this.parseShellHash(h);
if (p && p.semanticObject && p.action) {
return true;
}
return false;
}
;
this.parseParameters = function(p) {
if (!p) {
return {};
}
return jQuery.sap.getUriParameters(p).mParams || {};
}
;
this.paramsToString = function(p) {
return this.privparamsToString(p, "&", "=");
}
;
this.privparamsToString = function(p, d, A) {
var f, a, k, i, l, s = "";
f = "";
a = null;
l = [];
for (a in p) {
if (p.hasOwnProperty(a)) {
l.push(a);
}
}
l.sort();
for (k = 0; k < l.length; k = k + 1) {
a = l[k];
if (jQuery.isArray(p[a])) {
for (i = 0; i < p[a].length; i = i + 1) {
s += f + encodeURIComponent(a) + A +
encodeURIComponent(p[a][i]);
f = d;
}
} else {
s += f + encodeURIComponent(a) + A +
encodeURIComponent(p[a]);
f = d;
}
}
return s;
}
;
this.parseShellHash = function(h) {
var a = r, s, S, A, c, p, m, d;
if (!h) {
return undefined;
}
s = this.splitHash(h);
m = a.exec(s.shellPart);
if (m) {
S = m[2];
A = m[3];
c = m[5];
p = m[6];
d = this.parseParameters(p);
return {
semanticObject: S,
action: A,
contextRaw: c,
params: d,
appSpecificRoute: s.appSpecificRoute
};
}
if (s.appSpecificRoute) {
return {
semanticObject: undefined,
action: undefined,
contextRaw: undefined,
params: {},
appSpecificRoute: s.appSpecificRoute
};
}
return undefined;
}
;
this.privstripLeadingHash = function(h) {
if (h[0] === '#') {
return h.substring(1);
}
return h;
}
;
this.splitHash = function(h) {
var a = /^(?:#|)([\S\s]*?)(&\/[\S\s]*)?$/, m, s, A;
if (h === undefined || h === null || h === "") {
return {};
}
m = a.exec(h);
s = m[1];
if (s !== "" && !r.test(s)) {
return {};
}
A = m[2];
if (s || A) {
return {
shellPart: s,
appSpecificRoute: A
};
}
return {};
}
;
function b(u, a) {
if (a) {
return u + a;
}
return u;
}
this.constructShellHash = function(s) {
var c, p, d, i = null, k, l = [], f = "?", a = null;
if (!s) {
return "";
}
if (!s.target) {
s.target = {};
s.target.semanticObject = s.semanticObject;
s.target.action = s.action;
s.target.contextRaw = s.contextRaw;
}
if (s.target.shellHash || s.target.shellHash === "") {
d = this.privstripLeadingHash(s.target.shellHash);
return b(d, s.appSpecificRoute);
}
if (s.target.semanticObject && s.target.action) {
c = s.target.semanticObject + "-" +
s.target.action.replace(/[?].*/, "");
} else {
return b("", s.appSpecificRoute);
}
if (s.target.contextRaw) {
c += "~" + s.target.contextRaw;
}
f = "?";
a = null;
l = [];
for (a in s.params) {
if (s.params.hasOwnProperty(a)) {
l.push(a);
}
}
p = (s.params && JSON.parse(JSON.stringify(s.params))) ||
{};
if (s.appStateKey) {
l.push("sap-xapp-state");
p["sap-xapp-state"] = s.appStateKey;
}
l.sort();
for (k = 0; k < l.length; k = k + 1) {
a = l[k];
if (jQuery.isArray(p[a])) {
if (p[a].length > 1) {
jQuery.sap.log.error("Array startup parameters
violate the designed intent of the Unified Shell Intent, use only single-valued
parameters!");
}
for (i = 0; i < p[a].length; i = i + 1) {
c += f + encodeURIComponent(a) + "=" +
encodeURIComponent(p[a][i]);
f = "&";
}
} else {
c += f + encodeURIComponent(a) + "=" +
encodeURIComponent(p[a]);
f = "&";
}
}
return b(c, s.appSpecificRoute);
}
;
this.addSystemToServiceUrl = function(s, c) {
var R, C, S = c;
if (!s || s.indexOf('/') !== 0 || s.indexOf('//') === 0) {
throw new sap.ushell.utils.Error("Invalid URL: " +
s,"sap.ushell.services.URLParsing");
}
if (c instanceof sap.ui.core.Component) {
C = (typeof c.getComponentData === "function") &&
c.getComponentData();
S = C && C.startupParameters &&
C.startupParameters["sap-system"] && C.startupParameters["sap-system"][0];
}
R =
sap.ushell.Container.getService("NavTargetResolution").getCurrentResolution();
if (!S && !c && R && R.url) {
S = jQuery.sap.getUriParameters(R.url).get("sap-
system");
}
if (/^[^?]*(;mo([\/;?]|$))/.test(s)) {
s = s;
} else if (/^[^?]*(;o=([\/;?]|$))/.test(s)) {
s = s.replace(/;o=([\/;?]|$)/, (S ? ";o=" + S : "") +
"$1");
} else if (!/^[^?]*;o=/.test(s) && S) {
s = s.replace(/(\/[^?]*?)(\/$|$|(\/?\?.*))/, "$1;o=" +
S + "$2");
}
sap.ushell.Container.addRemoteSystemForServiceUrl(s);
return s;
}
;
}
;
sap.ushell.services.URLParsing.hasNoAdapter = true;
}());
},
"sap/ushell/services/URLShortening.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.URLShortening");
jQuery.sap.require("jquery.sap.storage");
sap.ushell.services.URLShortening = function() {
var t = this;
this.ABBREV_PARAM_NAME = "sap-intent-param";
this.URL_LENGTH_LIMIT = 1023;
this.URL_PARAMS_LENGTH_LIMIT = 512;
this._replaceSapXAppStateRawWithKeyIfRequired = function(v, s)
{
var V, k;
if (typeof v !== "string" || /^[A-Z0-9]{40}$/.test(v)) {
return v;
}
try {
V = JSON.parse(v);
} catch (e) {
jQuery.sap.log.error("This cannot happen: sap-xapp-
state parameter value is neither key nor JSON parseable");
return v;
}
k = s && s.getNextKey();
this._storeValue(k, V, s);
return k;
}
;
this.compactHash = function(u, r, s) {
var S, k, R, p, U, a, b = [this.ABBREV_PARAM_NAME, "sap-
system", "sap-xapp-state"];
if (r) {
r.forEach(function(A) {
b.push(A);
});
}
U = sap.ushell.Container.getService("URLParsing");
S = U.parseShellHash(u);
if (!S) {
jQuery.sap.log.error("the URL is not compliant and may
break in a future version " + u);
}
p = '';
if (u.charAt(0) === '#') {
p = '#';
}
var v = S && S.params && S.params["sap-xapp-state"] &&
S.params["sap-xapp-state"][0];
if (v) {
S.params["sap-xapp-state"] =
[this._replaceSapXAppStateRawWithKeyIfRequired(v, s)];
u = p + U.constructShellHash({
target: {
semanticObject: S.semanticObject,
action: S.action,
contextRaw: S.contextRaw
},
params: S.params,
appSpecificRoute: S.appSpecificRoute
});
}
if (typeof u !== "string" || u.length < t.URL_LENGTH_LIMIT)
{
return {
hash: u
};
}
if (S && ((S.params && S.params[t.ABBREV_PARAM_NAME]))) {
return {
hash: u
};
}
k = s && s.getNextKey();
R = this._splitParameters(S.params, b, k);
if (!R.key) {
return {
hash: u
};
}
a = U.paramsToString(R.tailParams);
this._storeValue(R.key, a, s);
return {
hash: p + U.constructShellHash({
target: {
semanticObject: S.semanticObject,
action: S.action,
contextRaw: S.contextRaw
},
params: R.headParams,
appSpecificRoute: S.appSpecificRoute
}),
params: R.headParams,
skippedParams: R.tailParams
};
}
;
this.checkHashLength = function(u) {
var s, r, p, U;
if (typeof u !== "string" || u.length < t.URL_LENGTH_LIMIT)
{
return {
hash: u
};
}
U = sap.ushell.Container.getService("URLParsing");
s = U.parseShellHash(u);
p = '';
if (u.charAt(0) === '#') {
p = '#';
}
r = this._splitParameters(s.params, [], "DummyKey");
if (r.key) {
jQuery.sap.log.error("Application startup parameter
length exceeds " + t.URL_PARAMS_LENGTH_LIMIT + " characters, truncation occured!");
delete r.headParams[this.ABBREV_PARAM_NAME];
return {
hash: p + U.constructShellHash({
target: {
semanticObject: s.semanticObject,
action: s.action,
contextRaw: s.contextRaw
},
params: r.headParams,
appSpecificRoute: s.appSpecificRoute
}),
params: r.headParams,
skippedParams: r.tailParams
};
}
jQuery.sap.log.error("URL exceeds dangerous limits,
arbitrary shortening or worse may occur!");
return {
hash: u
};
}
;
this._findIndex = function(a, T) {
var r = a.indexOf(T);
if (r >= 0) {
return r;
}
r = -1;
a.every(function(A, i) {
if (A.length > 0 && A[A.length - 1] === "*" &&
A.substring(0, A.length - 1) === T.substring(0, A.length - 1)) {
r = i;
return false;
}
return true;
});
return r;
}
;
this._cmpByList = function(a, A, b) {
var i, c;
a = a || [];
if (A === b) {
return 0;
}
i = this._findIndex(a, A);
c = this._findIndex(a, b);
if (i >= 0 && c >= 0) {
if ((i - c) !== 0) {
return i - c;
}
if (A < b) {
return -1;
}
if (A > b) {
return +1;
}
return 0;
}
if (i >= 0) {
return -1;
}
if (c >= 0) {
return +1;
}
if (A < b) {
return -1;
}
return +1;
}
;
this._sortByPriority = function(l, r) {
return l.sort(this._cmpByList.bind(this, r));
}
;
this._splitParameters = function(p, r, K) {
var a, i, k, h = {}, b = {}, c = false, o, d, e = 0, f, l =
[];
if (!K || typeof K !== "string") {
throw new
Error("sap.ushell.services.URLShortening._splitParameters: key must be supplied!");
}
for (a in p) {
if (Object.prototype.hasOwnProperty.call(p, a)) {
l.push(a);
}
}
l.sort();
l = this._sortByPriority(l, r);
for (k = 0; k < l.length; k = k + 1) {
a = l[k];
o = p[a];
if (o.length > 1) {
jQuery.sap.log.error("Array startup parameters
violate the designed intent of the Unified Shell Intent, use only single-valued
parameters!");
}
for (i = 0; i < o.length; i = i + 1) {
d = p[a][i];
f = a.length + d.length;
if (f + e > this.URL_PARAMS_LENGTH_LIMIT) {
if (b[a]) {
b[a].push(d);
} else {
b[a] = [d];
}
c = true;
} else if (h[a]) {
h[a].push(d);
} else {
h[a] = [d];
}
e = e + f + 1;
}
}
if (c) {
h[this.ABBREV_PARAM_NAME] = [K];
}
return {
key: K,
tailParams: b,
headParams: h
};
}
;
this.expandHash = function(u) {
var r = function(k) {
return t._retrieveValue(k);
};
return this.expandParamGivenRetrievalFunction(u,
this.ABBREV_PARAM_NAME, r);
}
;
this.expandParamGivenRetrievalFunction = function(u, p, r) {
var s, v, k, a, b;
if (typeof u !== "string") {
return u;
}
s =
sap.ushell.Container.getService("URLParsing").parseShellHash(u);
k = s && s.params && s.params[p] && s.params[p][0];
if (!k) {
return u;
}
a = '';
if (u.charAt(0) === '#') {
a = '#';
}
v = r(k);
if (!v) {
return u;
}
b = this._blendParameters(s.params, p, v);
return a +
sap.ushell.Container.getService("URLParsing").constructShellHash({
target: {
semanticObject: s.semanticObject,
action: s.action,
contextRaw: s.contextRaw
},
params: b,
appSpecificRoute: s.appSpecificRoute
});
}
;
this._retrieveValue = function(k) {
return undefined;
}
;
this._storeValue = function(k, v, s) {
if (s && typeof s.store === "function") {
s.store(v);
}
}
;
this._blendParameters = function(p, P, v) {
var n =
sap.ushell.Container.getService("URLParsing").parseParameters("?" + v), a;
delete p[P];
for (a in n) {
if (Object.prototype.hasOwnProperty.call(n, a)) {
if (p[a]) {
p[a] = p[a].concat(n[a]);
} else {
p[a] = n[a];
}
}
}
return p;
}
;
}
;
sap.ushell.services.URLShortening.hasNoAdapter = true;
}());
},
"sap/ushell/services/Ui5ComponentLoader.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.Ui5ComponentLoader");
var U = function(c) {
this._oComponent = c;
};
U.onBeforeApplicationInstanceCreated = function() {
jQuery.sap.require("sap.ushell.Fiori20AdapterTest");
}
;
U.prototype.getInstance = function() {
return this._oComponent;
}
;
U.prototype.getMetadata = function() {
return this._oComponent.getMetadata();
}
;
sap.ushell.services.Ui5ComponentLoader = function(c, p, C) {
this._oConfig = (C && C.config) || {};
function g(u) {
var P = jQuery.sap.getUriParameters(u).mParams, x = P["sap-
xapp-state"], r;
delete P["sap-xapp-state"];
r = {
startupParameters: P
};
if (x) {
r["sap-xapp-state"] = x;
}
return r;
}
this.createComponent = function(a, P, w) {
var d = new jQuery.Deferred(), s = window["sap-ui-debug"] ?
"sap/fiori/core-ext-light-dbg.js" : "sap/fiori/core-ext-light.js", b = a && a.url,
o, l = true, e = jQuery.sap.isDeclared('sap.fiori.core', true) ||
jQuery.sap.isDeclared('sap.fiori.core-ext-light', true), L = true, A = a &&
a.applicationDependencies || {}, i, u, f, h = (this._oConfig &&
this._oConfig.hasOwnProperty("amendedLoading")) ? this._oConfig.amendedLoading :
true, j = false;
if (jQuery.isArray(A.messages)) {
A.messages.forEach(function(m) {
var S =
String.prototype.toLowerCase.call(m.severity || "");
S = ["trace", "debug", "info", "warning", "error",
"fatal"].indexOf(S) !== -1 ? S : "error";
jQuery.sap.log[S](m.text, m.details, A.name);
});
}
if (a && a.ui5ComponentName) {
o = jQuery.extend(true, {}, a.applicationDependencies);
f = jQuery.extend(true, {
startupParameters: {}
}, a.componentData);
if (b) {
i = b.indexOf("?");
if (i >= 0) {
u = g(b);
f.startupParameters = u.startupParameters;
if (u["sap-xapp-state"]) {
f["sap-xapp-state"] = u["sap-xapp-state"];
}
b = b.slice(0, i);
}
}
if (a.applicationConfiguration) {
f.config = jQuery.extend(true, {},
a.applicationConfiguration);
}
o.componentData = f;
if (a.hasOwnProperty("loadDefaultDependencies")) {
L = a.loadDefaultDependencies;
delete a.loadDefaultDependencies;
}
if (this._oConfig &&
this._oConfig.hasOwnProperty("loadDefaultDependencies")) {
L = L && this._oConfig.loadDefaultDependencies;
}
L = L && h;
if (!o.asyncHints) {
o.asyncHints = L ? {
"libs": ["sap.ca.scfld.md", "sap.ca.ui",
"sap.me", "sap.ui.unified"]
} : {};
}
if (a.hasOwnProperty("loadCoreExt")) {
l = a.loadCoreExt;
delete a.loadCoreExt;
}
if (l && h && !e) {
o.asyncHints.preloadBundles =
o.asyncHints.preloadBundles || [];
o.asyncHints.preloadBundles.push(s);
}
j = l && (l || e || (h === false));
if (w) {
o.asyncHints.waitFor = w;
}
if (!o.name) {
o.name = a.ui5ComponentName;
}
if (b) {
o.url = b;
}
o.async = true;
if (P) {
o.id = "application-" + P.semanticObject + "-" +
P.action + "-component";
U.onBeforeApplicationInstanceCreated(o);
}
sap.ui.component(o).then(function(k) {
a.componentHandle = new U(k);
if (j) {
a.coreResourcesFullyLoaded = true;
}
d.resolve(a);
}, function(E) {
var m = "Failed to load UI5 component with
properties '" + JSON.stringify(o) + "'.", D;
if (typeof E === "object" && E.stack) {
D = E.stack;
} else {
D = E;
}
jQuery.sap.log.error(m, D,
"sap.ushell.services.Ui5ComponentLoader");
d.reject(E);
});
} else {
d.resolve(a);
}
return d.promise();
}
;
}
;
sap.ushell.services.Ui5ComponentLoader.hasNoAdapter = true;
}
)();
},
"sap/ushell/services/UsageAnalytics.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.UsageAnalytics");
sap.ushell.services.UsageAnalytics = function(c, p, S) {
var o = (S && S.config) || {}, D = [], a = false, i = false, l,
I;
window.oCustomProperties = {};
this.setLegalText = function(t) {
l = t;
if (I) {
this.init(I.usageAnalyticsTitle, I.iAgree, I.iDisagree,
I.remindMeLater);
}
}
;
this.getLegalText = function() {
return l;
}
;
this.setTrackUsageAnalytics = function(s) {
var d = jQuery.Deferred();
var u;
var b = s;
var f =
sap.ushell.Container.getUser().getTrackUsageAnalytics();
try {
var g = sap.ushell.Container.getService("UserInfo");
if (f !== b) {

sap.ushell.Container.getUser().setTrackUsageAnalytics(b);
u =
g.updateUserPreferences(sap.ushell.Container.getUser());
u.done(function() {

sap.ushell.Container.getUser().resetChangedProperties();
if (!i && b) {
this.start();
} else if (i && b === false) {
window.swa.disable();
} else if (i && b) {
window.swa.enable();
}
d.resolve();
}
.bind(this));
u.fail(function(E) {

sap.ushell.Container.getUser().setTrackUsageAnalytics(f);

sap.ushell.Container.getUser().resetChangedProperties();
jQuery.sap.log.error(E);
d.reject(E);
});
} else {
d.resolve();
}
} catch (e) {
jQuery.sap.log.error("Getting UserInfo service
failed.");
d.reject("Getting UserInfo service failed.");
}
return d.promise();
}
;
this.showLegalPopup = function() {
setTimeout(function() {
jQuery.sap.require('sap.m.MessageBox');
var b = new
sap.ui.layout.VerticalLayout('usageAnalyticsPopUpLayout',{
content: [new sap.m.Text({
text: l
})]
});
var d = new sap.m.Dialog('agreementMessageBox',{
title: I.usageAnalyticsTitle,
type: 'Message',
stretch: sap.ui.Device.system.phone,
buttons: [new sap.m.Button('remindMeLaterButton',{
text: I.remindMeLater,
press: function() {
d.close();
}
}), new sap.m.Button('iAgreeButton',{
text: I.iAgree,
type: 'Accept',
press: function() {

sap.ushell.Container.getService("UsageAnalytics").setTrackUsageAnalytics(true);
d.close();
}
}), new sap.m.Button('iDisagreeButton',{
text: I.iDisagree,
press: function() {

sap.ushell.Container.getService("UsageAnalytics").setTrackUsageAnalytics(false);
d.close();
}
})],
afterClose: function() {
d.destroy();
}
}).addStyleClass('sapUshellUsageAnalyticsPopUp');
d.addContent(b);
d.open();
}, 100);
}
;
this.systemEnabled = function() {
if (!o.enabled || !o.pubToken ||
(this.isSetUsageAnalyticsPermitted() && !l)) {
if (!o.pubToken) {
jQuery.sap.log.warning("No valid pubToken was found
in the service configuration");
}
if (!l) {
jQuery.sap.log.warning("No Legal text message
found.");
}
return false;
} else {
return true;
}
}
;
this.userEnabled = function() {
var u = sap.ushell.Container.getUser();
if (!this.systemEnabled()) {
return false;
}
return u.getTrackUsageAnalytics();
}
;
this.start = function() {

sap.ui.getCore().getEventBus().publish("sap.ushell.services.UsageAnalytics",
"usageAnalyticsStarted");
this._initUsageAnalyticsLogging();
i = true;
window.swa.custom2 = {
ref: sap.ui.getCore().getConfiguration().getLanguage()
};
}
;
this.init = function(u, s, b, r) {
I = {
usageAnalyticsTitle: u,
iAgree: s,
iDisagree: b,
remindMeLater: r
};
if (this.systemEnabled() && !i) {
if (!this.isSetUsageAnalyticsPermitted()) {
this.start();
} else if (l) {
if (this.userEnabled() === true) {
this.start();
} else if (this.userEnabled() === null ||
this.userEnabled() === undefined) {
this.showLegalPopup();
}
}
}
}
;
this.setCustomAttributes = function(C) {
var b, P = "attribute", s, d = "custom", e, f, F =
"customFunction";
if (!this.userEnabled() &&
this.isSetUsageAnalyticsPermitted()) {
return;
}
for (b = 1; b < 6; b++) {
e = d.concat(b + 4);
if (window.swa[e] !== undefined) {
continue;
}
s = P + b;
if (C[s] === undefined) {
continue;
}
if (jQuery.isFunction(C[s])) {
f = F + b;
window[f] = C[s];
window.swa[e] = {
ref: f
};
} else {
window.swa[e] = {
ref: C[s]
};
}
}
}
;
this.logCustomEvent = function(e, b, A) {
if (!this.userEnabled() &&
this.isSetUsageAnalyticsPermitted()) {
return;
}
if (!this._isAnalyticsScriptLoaded()) {
this._addDelayedEvent(e, b, A);
return;
}
if (A) {
A.unshift(b);
A.unshift(e);

window.swa.trackCustomEvent.apply(window.swa.trackCustomEvent, A);
} else {
window.swa.trackCustomEvent(e, b);
}
}
;
window._trackingScriptsLoaded = function() {
var b, t;
a = true;
for (b = 0; b < D.length; b++) {
t = D[b];
this.logCustomEvent(t.eventType, t.customEventValue,
t.aAdditionalValues);
}
D = null;
}
;
this._initUsageAnalyticsLogging = function() {
if (window.swa === undefined) {
window.swa = {};
}
window.swa.pubToken = o.pubToken;
window.swa.baseUrl = o.baseUrl;
window.swa.bannerEnabled = false;
window.swa.loggingEnabled = true;
window.swa.visitorCookieTimeout = 63113852;
window.swa.dntLevel = 1;
window.swa.trackerReadyCallback =
window._trackingScriptsLoaded.bind(this);
window.swa.clicksEnabled = (o.logClickEvents === false ?
false : true);
window.swa.pageLoadEnabled = (o.logPageLoadEvents === false
? false : true);
this._handlingTrackingScripts();
}
;
this._handlingTrackingScripts = function() {
var d = document
, g = d.createElement('script')
, s = d.getElementsByTagName('script')[0];
g.onerror = function() {
jQuery.sap.log.warning("SWA scripts not loaded!");
}
;
g.type = 'text/javascript';
g.defer = true;
g.async = true;
g.src = window.swa.baseUrl + 'js/privacy.js';
s.parentNode.insertBefore(g, s);
}
;
this._isAnalyticsScriptLoaded = function() {
return a;
}
;
this.isSetUsageAnalyticsPermitted = function() {
if (o.setUsageAnalyticsPermitted === undefined) {
return true;
}
return o.setUsageAnalyticsPermitted;
}
;
this._addDelayedEvent = function(e, b, A) {
var d = {
eventType: e,
customEventValue: b,
aAdditionalValues: A
};
D.push(d);
}
;
}
;
sap.ushell.services.UsageAnalytics.hasNoAdapter = true;
}());
},
"sap/ushell/services/UserDefaultParameterPersistence.js": function() {
(function() {
"use strict";

jQuery.sap.declare("sap.ushell.services.UserDefaultParameterPersistence");
var v = ["value", "extendedValue", "noEdit", "alwaysAskPlugin",
"_shellData", "pluginData"];
sap.ushell.services.UserDefaultParameterPersistence = function(a,
c, p, C) {
this._oAdapter = a;
this._oData = {};
}
;

sap.ushell.services.UserDefaultParameterPersistence.prototype._cleanseValue =
function(V) {
var r = jQuery.extend(true, {}, V), a;
for (a in r) {
if (r.hasOwnProperty(a)) {
if (v.indexOf(a) < 0) {
delete r[a];
}
}
}
return r;
}
;

sap.ushell.services.UserDefaultParameterPersistence.prototype._testValue =
function(V) {
return true;
}
;

sap.ushell.services.UserDefaultParameterPersistence.prototype.loadParameterValue =
function(p) {
var d = new jQuery.Deferred()
, t = this;
if (this._oData[p]) {
d.resolve(this._oData[p]);
} else {
this._oAdapter.loadParameterValue(p).done(function(V) {
var c = t._cleanseValue(V);
if (t._testValue(c)) {
d.resolve(c);
} else {
jQuery.sap.log.error("flawed value returned from
persistence");
d.reject("flawed value returned from persistence");
}
}).fail(d.reject.bind(this));
}
return d.promise();
}
;

sap.ushell.services.UserDefaultParameterPersistence.prototype.saveParameterValue =
function(p, V) {
var d, c;
if (!V) {
return this.deleteParameter(p);
}
c = this._cleanseValue(V);
d = new jQuery.Deferred();
if (!this._testValue(c) || (V && V.noStore === true)) {
return d.resolve().promise();
}
this._oData[p] = c;
return this._oAdapter.saveParameterValue(p, c);
}
;

sap.ushell.services.UserDefaultParameterPersistence.prototype.deleteParameter =
function(p) {
delete this._oData[p];
return this._oAdapter.deleteParameter(p);
}
;

sap.ushell.services.UserDefaultParameterPersistence.prototype.getStoredParameterNam
es = function() {
var d = new jQuery.Deferred();
this._oAdapter.getStoredParameterNames().done(function(r) {
r.sort();
d.resolve(r);
}).fail(d.reject.bind(d));
return d.promise();
}
;
}());
},
"sap/ushell/services/UserDefaultParameters.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.UserDefaultParameters");
var e = "valueStored";
var r = ["value", "noEdit", "noStore", "extendedValue",
"alwaysAskPlugin"];
sap.ushell.services.UserDefaultParameters = function(a, c, p, C) {
this._aPlugins = [];
this._oUserDefaultParametersNames = undefined;
var t = this
, s = new sap.ui.base.EventProvider();
function g(P) {
var v = (typeof P.getComponentData === "function" &&
P.getComponentData() && P.getComponentData().config &&
P.getComponentData().config["sap-priority"]) || 0;
if (typeof v !== "number" || isNaN(v)) {
return 0;
}
return v;
}
this._insertPluginOrdered = function(P, o) {
var f = g(o), i, h;
for (i = 0; (i < P.length) && o; ++i) {
h = g(P[i]);
if (o && (f > h)) {
P.splice(i, 0, o);
o = undefined;
}
}
if (o) {
P.push(o);
}
return P;
}
;
this.registerPlugin = function(P) {
this._aPlugins = this._insertPluginOrdered(this._aPlugins,
P);
}
;
function b(i, P, f, v, D) {
if (i >= P.length) {
D.resolve(v);
return;
}
if (typeof P[i].getUserDefault !== "function") {
b(i + 1, P, f, v, D);
return;
}
P[i].getUserDefault(f, v).done(function(n) {
if (n) {
b(i + 1, P, f, n, D);
} else {
b(i + 1, P, f, v, D);
}
}).fail(function() {
jQuery.sap.log.error("invocation of getUserDefault(\""
+ f + "\") for plugin " + t._getComponentNameOfPlugin(P[i]) + " rejected.", null,
"sap.ushell.services.UserDefaultParameters");
b(i + 1, P, f, v, D);
});
return;
}
function d(o) {
return jQuery.extend(true, {}, o);
}
this._getStoreDate = function() {
return new Date().toString();
}
;
this._storeValue = function(P, v, f) {
var h = new jQuery.Deferred();
var D = new jQuery.Deferred();
if (f && v.extendedValue) {

sap.ushell.Container.getService("ClientSideTargetResolution").getUserDefaultParamet
erNames(true).done(function(o) {
var E = t._extractKeyArrays(o);
var i = E.extended;
D.resolve(i.indexOf(P) < 0);
}).fail(function() {
D.resolve(false);
});
} else {
D.resolve(false);
}
D.done(function(R) {
if (R) {
v.extendedValue = undefined;
}
if (f && t._isInitial(v)) {
v = undefined;
} else {
v._shellData = jQuery.extend(true, {
storeDate: t._getStoreDate()
}, v._shellData);
}

sap.ushell.Container.getService("UserDefaultParameterPersistence").saveParameterVal
ue(P, v).always(function() {
var S = {
parameterName: P,
parameterValue: d(v)
};
s.fireEvent(e, S);
h.resolve();
});
});
return h.promise();
}
;
this._getCurrentValue = function(P) {
var D = new jQuery.Deferred();

sap.ushell.Container.getService("UserDefaultParameterPersistence").loadParameterVal
ue(P).done(function(v) {
D.resolve(v);
}).fail(function() {
D.resolve({
value: undefined
});
});
return D.promise();
}
;
this._isNeverSetValue = function(v) {
return !v || (!v._shellData && !v.value && !
v.extendedValue);
}
;
this._isInitial = function(v) {
return !(v && (v.value || v.extendedValue));
}
;
this._isStoreDistinct = function(v, V) {
return !r.every(function(m) {
return (v[m] === V[m] || jQuery.sap.equal(v[m], V[m]));
});
}
;
this._getUserDefaultParameterNames = function() {
if (!this._oUserDefaultParametersNames) {
this._oUserDefaultParametersNames = new
jQuery.Deferred();

sap.ushell.Container.getService("ClientSideTargetResolution").getUserDefaultParamet
erNames(true).done(function(P) {
var E = t._extractKeyArrays(P);
var f = E.extended;
var A = E.allParameters;
var m = t._arrayToObject(A);
if (m.length === 0) {
t._oUserDefaultParametersNames.resolve({});
} else {
t._oUserDefaultParametersNames.resolve({
aAllParameterNames: A,
aExtendedParameterNames: f,
oMetadataObject: m
});
}
});
}
return this._oUserDefaultParametersNames.promise();
}
;
this._isRelevantParameter = function(P) {
var D = new jQuery.Deferred();
this._getUserDefaultParameterNames().done(function(R) {
if (R.aAllParameterNames &&
R.aAllParameterNames.indexOf(P) !== -1) {
D.resolve();
} else {
D.reject();
}
});
return D.promise();
}
;
this.hasRelevantMaintainableParameters = function() {
var t = this
, R = new jQuery.Deferred()
, h = false
, G = [];
t._getUserDefaultParameterNames().done(function(P) {
if (!jQuery.isEmptyObject(P) && P.aAllParameterNames) {
P.aAllParameterNames.forEach(function(f) {
var o = t.getValue(f);
G.push(o);
o.done(function(v) {
if (v && !v.hasOwnProperty("noEdit")) {
h = true;
return;
}
});
});
jQuery.when.apply(undefined, G).done(function() {
R.resolve(h);
}).fail(function() {
R.resolve();
});
} else {
R.resolve();
}
});
return R.promise();
}
;
this.getValue = function(P) {
var t = this
, D = new jQuery.Deferred()
, o = new jQuery.Deferred();
this._isRelevantParameter(P).fail(function() {
D.resolve({});
}).done(function() {
t._getCurrentValue(P).done(function(v) {
var O;
if (!v) {
v = {};
}
O = d(v);
if ((v._shellData || !t._isInitial(v)) && !
v.noStore && !v.alwaysAskPlugin) {
o.resolve(v);
} else {

sap.ushell.Container.getService("PluginManager").loadPlugins("UserDefaults").done(f
unction() {
b(0, t._aPlugins, P, v, o);
}).fail(function() {
jQuery.sap.log.error("Cannot get value for
" + P + ". One or more plugins could not be loaded.");
o.reject("Initialization of plugins
failed");
});
}
o.done(function(n) {
if (t._isNeverSetValue(O) ||
t._isStoreDistinct(O, n)) {
t._storeValue(P, n);
}
D.resolve(n);
}).fail(D.reject.bind(D));
});
});
return D.promise();
}
;
this._addParameterValuesToParameters = function(P, f) {
var D = new jQuery.Deferred();
var h = [];
var t = this;
f.forEach(function(i) {
var n = t.getValue(i);
h.push(n);
n.done(function(v) {
P[i].valueObject = v;
});
});
jQuery.when.apply(jQuery, h).done(D.resolve.bind(D,
P)).fail(D.reject.bind(D, P));
return D.promise();
}
;
this._arrayToObject = function(P) {
var R = {};
P.forEach(function(f) {
R[f] = {};
});
return R;
}
;
this._getComponentNameOfPlugin = function(P) {
if (typeof P !== "object" || typeof P.getMetadata !==
"function" || !P.getMetadata() || typeof P.getMetadata().getComponentName !==
"function") {
return "'name of plugin could not be determined'";
}
return P.getMetadata().getComponentName() || "";
}
;
this._getEditorDataAndValue = function(D, A, E, m) {
var t = this;
var P = [];
var R = [];
t._aPlugins.forEach(function(o, i) {
if (typeof o.getEditorMetadata === "function") {
var n = new jQuery.Deferred();
P.push(n);
try {
var f = P.length - 1;
o.getEditorMetadata(m).done(function(j) {
R[f] = j;
}).always(function() {
n.resolve();
}).fail(function() {
jQuery.sap.log.error("EditorMetadata for
plugin " + t._getComponentNameOfPlugin(o) + "cannot be invoked.", null,
"sap.ushell.services.UserDefaultParameters");
n.resolve();
});
} catch (h) {
jQuery.sap.log.error("Error invoking
getEditorMetaData on plugin: " + h + h.stack, null,
"sap.ushell.services.UserDefaultParameters");
n.resolve();
}
}
});
jQuery.when.apply(jQuery, P).done(function() {
var f = [];
var o = R.reverse().reduce(function(h, n) {
A.forEach(function(i) {
if (n[i] && n[i].editorMetadata) {
h[i].editorMetadata = n[i].editorMetadata;
}
});
return h;
}, m);
A.forEach(function(h) {
if (!(o[h] && o[h].editorMetadata)) {
f.push(h);
}
});
t._addParameterValuesToParameters(o,
A).done(function(h) {
var i = jQuery.extend(true, {}, h), k;
E.forEach(function(j) {
if (i[j]) {
i[j].editorMetadata = i[j].editorMetadata
|| {};
i[j].editorMetadata.extendedUsage = true;
}
});
k = Object.keys(i).splice(0);
k.forEach(function(j) {
var l;
if (i[j].valueObject && i[j].valueObject.noEdit
=== true) {
delete i[j];
l = f.indexOf(j);
if (l >= 0) {
f.splice(l, 1);
}
}
});
if (f.length > 0) {
jQuery.sap.log.error("The following parameter
names have no editor metadata and thus likely no configured plugin:\n\"" +
f.join("\",\n\"") + "\".");
}
D.resolve(i);
}).fail(D.reject.bind(D));
});
}
;
this.editorGetParameters = function() {
var D = new jQuery.Deferred();
var t = this;
this._getUserDefaultParameterNames().done(function(P) {
if (P.oMetadataObject.length === 0) {
D.resolve({});
} else {

sap.ushell.Container.getService("PluginManager").loadPlugins("UserDefaults").done(f
unction() {
t._getEditorDataAndValue(D,
P.aAllParameterNames, P.aExtendedParameterNames, P.oMetadataObject);
}).fail(function() {
jQuery.sap.log.error("One or more plugins could
not be loaded");
D.reject("Initialization of plugins failed");
});
}
});
return D.promise();
}
;
this._extractKeyArrays = function(P) {
var R = {
extended: [],
simple: [],
allParameters: []
};
R.simple = (P && P.simple && Object.keys(P.simple).sort())
|| [];
R.extended = (P && P.extended &&
Object.keys(P.extended).sort()) || [];
R.allParameters =
R.simple.concat(R.extended.filter(function(S) {
return R.simple.indexOf(S) < 0;
})).sort();
return R;
}
;
this.editorSetValue = function(P, v) {
return this._storeValue(P, v, true);
}
;
this.attachValueStored = function(f) {
s.attachEvent(e, f);
}
;
this.detachValueStored = function(f) {
s.detachEvent(e, f);
}
;
}
;
sap.ushell.services.UserDefaultParameters.hasNoAdapter = true;
}());
},
"sap/ushell/services/UserRecents.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.services.UserRecents");
jQuery.sap.require("sap.ushell.services.Personalization");
sap.ushell.services.AppType = {
OVP: "OVP",
SEARCH: "Search",
FACTSHEET: "FactSheet",
COPILOT: "Co-Pilot",
APP: "Application",
getDisplayName: function(A) {
switch (A) {
case this.OVP:
case this.SEARCH:
case this.FACTSHEET:
case this.COPILOT:
return A;
default:
return "App";
}
}
};
function R(m, e, c, l, s) {
var r = []
, u = function(I, t) {
return r.some(function(o) {
var f;
if (e(o.oItem, I)) {
o.oItem = I;
o.iTimestamp = t;
o.iCount = o.iCount + 1;
f = true;
} else {
f = false;
}
return f;
});
}
, i = function(I, t) {
var n = {
oItem: I,
iTimestamp: t,
iCount: 1
};
if (r.length === m) {
r.sort(c);
r.pop();
}
r.push(n);
};
this.newItem = function(I) {
var d = new jQuery.Deferred();
var t = +new Date(), A;
l().done(function(L) {
r = L || [];
A = u(I, t);
if (!A) {
i(I, t);
}
s(r).done(function(f) {
d.resolve(f);
}).fail(function() {
d.reject();
});
});
return d.promise();
}
;
this.getRecentItems = function() {
var d = new jQuery.Deferred();
l().done(function(L) {
L = L || [];
L.sort(c);
r = L.slice(0, m);
d.resolve(jQuery.map(r, function(o) {
return o.oItem;
}));
});
return d.promise();
}
;
}
function a(m, e, c, l, s) {
var r = []
, u = function(I, t) {
return r.some(function(o) {
var f;
if (e(o.oItem, I)) {
if ((o.oItem.appType === I.appType) ||
(o.oItem.appType !== I.appType && I.appType !== 'Application')) {
jQuery.extend(o.oItem, I);
o.iTimestamp = t;
o.oItem.timestamp = t;
o.iCount = o.iCount + 1;
o.mobile = undefined;
o.tablet = undefined;
o.desktop = undefined;
}
f = true;
r.sort(c);
} else {
f = false;
}
return f;
});
}
, i = function(I, t, d) {
I.timestamp = t;
I.icon = d;
var n = {
oItem: I,
iTimestamp: t,
iCount: 1,
mobile: undefined,
tablet: undefined,
desktop: undefined
};
if (r.length === m) {
r.pop();
}
r.unshift(n);
};
this.newItem = function(I) {
var d = new jQuery.Deferred();
var t = +new Date(), f = I.icon ? I.icon :
this.getActivityIcon(I.appType), A;
l().done(function(L) {
r = L || [];
A = u(I, t);
if (!A) {
i(I, t, f);
}
s(r).done(function(g) {
d.resolve(g);
}).fail(function() {
d.reject();
});
});
return d.promise();
}
;
this.getActivityIcon = function(A) {
switch (A) {
case sap.ushell.services.AppType.OVP:
return "sap-icon://competitor";
case sap.ushell.services.AppType.SEARCH:
return "sap-icon://search";
case sap.ushell.services.AppType.COPILOT:
return "sap-icon://BusinessSuiteInAppSymbols/icon-
heart";
case sap.ushell.services.AppType.FACTSHEET:
return "sap-icon://lead";
default:
return "sap-icon://BusinessSuiteInAppSymbols/icon-
heart";
}
}
;
this.getRecentItems = function() {
var d = new jQuery.Deferred(), f, A, C, I = false, g = [],
h = function(L) {
var j = [], D = 0, k;
for (k = 0; k < L.length && D < 30; k++) {
A = L[k];
if (A[C]) {
j.push(A);
D++;
}
}
d.resolve(jQuery.map(j, function(o) {
return o.oItem;
}));
};
if (sap.ui.Device.system.desktop) {
C = "desktop";
} else if (sap.ui.Device.system.tablet) {
C = "tablet";
} else {
C = "mobile";
}
l().done(function(L) {
L = L || [];
for (f = 0; f < L.length && !I; f++) {
A = L[f];
if (A[C] === undefined) {
g.push(A.oItem.appId);
} else {
I = true;
}
}
if (g.length > 0) {

sap.ushell.Container.getService("CrossApplicationNavigation").isIntentSupported(g).
done(function(o) {
I = false;
for (f = 0; f < L.length && !I; f++) {
A = L[f];
if (A[C] === undefined) {
var j = o[A.oItem.appId];
A[C] = j && j.supported ? true : false;
} else {
I = true;
}
}
s(L).done(function(k) {
d.resolve(h(L));
}).fail(function() {
d.reject();
});
}).fail(function(M) {
d.reject(M);
});
} else {
h(L);
}
});
return d.promise();
}
;
}
function b(l, s) {
var A, t = this, m = 30;
this.init = function() {
var t = this, p, c =
this.getDayFromDateObj(this.getCurrentDate()), d = false;
if (t._oInitDeferred === undefined) {
t._oInitDeferred = jQuery.Deferred();
}
if (!d || c !== A.recentDay) {
d = true;
p = l();
p.done(function(e) {
A = e || {
recentDay: null,
recentAppsUsageMap: {}
};
t.calculateInitialUsage(c);
t._oInitDeferred.resolve(A);
});
p.fail(function() {
jQuery.sap.log.error("UShell-lib ;
RecentAppsUsage ; Load data in Init failed");
t._oInitDeferred.reject();
});
}
return this._oInitDeferred.promise();
}
;
this.calculateInitialUsage = function(c) {
var t = this;
if (c != A.recentDay) {
this.addNewDay();
A.recentDay = c;
setTimeout(function() {
t.cleanUnusedHashes();
}, 3000);
this.saveAppsUsage(A);
}
}
;
this.addAppUsage = function(h) {
if (!sap.ushell.utils.validHash(h)) {
return jQuery.Deferred().reject("Non valid
hash").promise();
}
var p = this.init();
p.done(function() {
var c = A.recentAppsUsageMap[h] || [];
if (c.length == 0) {
c[0] = 1;
} else {
c[c.length - 1] += 1;
}
A.recentAppsUsageMap[h] = c;
t.saveAppsUsage(A);
});
p.fail(function() {
jQuery.sap.log.error("Ushell-lib ; addAppUsage ;
Initialization falied!");
});
return p;
}
;
this.getAppsUsage = function() {
var r, p, t = this, d = jQuery.Deferred();
p = t.init();
p.done(function() {
r = t.summarizeUsage();
d.resolve(r);
});
p.fail(function() {
d.reject("Not initialized yet");
});
return d.promise();
}
;
this.summarizeUsage = function() {
var u = {}, h, c, d, f = true;
for (h in A.recentAppsUsageMap) {
u[h] = this.getHashUsageSum(h);
if (f) {
c = d = u[h];
f = false;
} else {
if (u[h] < d) {
d = u[h];
} else if (u[h] > c) {
c = u[h];
}
}
}
return {
usageMap: u,
maxUsage: c,
minUsage: d
};
}
;
this.addNewDay = function() {
var h, c;
for (h in A.recentAppsUsageMap) {
c = A.recentAppsUsageMap[h];
c[c.length] = 0;
if (c.length > m) {
c = c.shift();
}
}
}
;
this.cleanUnusedHashes = function() {
var u, h;
for (h in A.recentAppsUsageMap) {
u = t.getHashUsageSum(h);
if (u == 0) {
delete (A.recentAppsUsageMap[h]);
}
}
}
;
this.getHashUsageSum = function(h) {
var c = 0, d, e = A.recentAppsUsageMap[h], f = e.length;
for (d = 0; d < f; d++) {
c += e[d];
}
return c;
}
;
this.saveAppsUsage = function(o) {
var p = s(o);
p.fail(function() {
jQuery.sap.log.error("Ushell-lib ; saveAppsUsage ; Save
action failed");
});
p.done(function(d) {});
return p;
}
;
this.getCurrentDate = function() {
return new Date();
}
;
this.getDayFromDateObj = function(d) {
return (d.getUTCFullYear() + "/" + (d.getUTCMonth() + 1) +
"/" + d.getUTCDate());
}
;
}
sap.ushell.services.UserRecents = function() {
var r, o, c, A, d, p, e, s, f, D, g, l, S, h = "RecentApps", i
= "RecentActivity", j = "AppsUsage", k = "RecentSearches", m = "RecentDataSources",
P = "sap.ushell.services.UserRecents";
this.addActivity = function(q) {
return c.newItem(q);
}
;
this.getRecentActivity = function() {
return c.getRecentItems();
}
;
this.noticeDataSource = function(q) {
if ((q && q.objectName && q.objectName.value &&
q.objectName.value.toLowerCase() === "$$all$$") || (q.objectName &&
q.objectName.toLowerCase && q.objectName.toLowerCase() === "$$all$$")) {
return;
}
d.newItem(q);
return d.getRecentItems();
}
;
this.getRecentDataSources = function() {
return d.getRecentItems();
}
;
this.noticeSearch = function(q) {
r.newItem(q);
return r.getRecentItems();
}
;
this.getRecentSearches = function() {
return r.getRecentItems();
}
;
this.noticeApp = function(q) {
o.newItem(q);
return o.getRecentItems();
}
;
this.getRecentApps = function() {
return o.getRecentItems();
}
;
this.initAppsUsage = function() {
A.init(new Date());
}
;
this.addAppUsage = function(q) {
var t = sap.ushell.utils.getBasicHash(q);
A.addAppUsage(t);
}
;
this.getAppsUsage = function() {
return A.getAppsUsage();
}
;
p = sap.ushell.Container.getService("Personalization");
try {
e = p.getPersonalizer({
container: P,
item: h
});
f = p.getPersonalizer({
container: P,
item: i
});
s = p.getPersonalizer({
container: P,
item: k
});
D = p.getPersonalizer({
container: P,
item: m
});
g = p.getPersonalizer({
container: P,
item: j
});
} catch (n) {
jQuery.sap.log.error("Personalization service does not
work:");
jQuery.sap.log.error(n.name + ": " + n.message);
}
l = function(q) {
var t, u;
try {
t = q.getPersData();
} catch (n) {
jQuery.sap.log.error("Personalization service does not
work:");
jQuery.sap.log.error(n.name + ": " + n.message);
u = new jQuery.Deferred();
u.reject(n);
t = u.promise();
}
return t;
}
;
S = function(q, L) {
var t;
try {
t = q.setPersData(L);
} catch (n) {
jQuery.sap.log.error("Personalization service does not
work:");
jQuery.sap.log.error(n.name + ": " + n.message);
}
return t;
}
;
r = new R(10,function(x, y) {
var q = false;
if (x.oDataSource && y.oDataSource) {
if (x.oDataSource.objectName &&
y.oDataSource.objectName) {
q = ((x.sTerm === y.sTerm) &&
(x.oDataSource.objectName.value === y.oDataSource.objectName.value));
}
if (!x.oDataSource.objectName && !
y.oDataSource.objectName) {
q = (x.sTerm === y.sTerm);
}
}
if (!x.oDataSource && !y.oDataSource) {
q = (x.sTerm === y.sTerm);
}
return q;
}
,function(x, y) {
return y.iTimestamp - x.iTimestamp;
}
,l.bind(this, s),S.bind(this, s));
d = new R(6,function(x, y) {
if (x.objectName && y.objectName) {
return x.objectName.value === y.objectName.value;
}
return false;
}
,function(x, y) {
return y.iTimestamp - x.iTimestamp;
}
,l.bind(this, D),S.bind(this, D));
o = new R(6,function(x, y) {
return x.semanticObject === y.semanticObject && x.action
=== y.action;
}
,function(x, y) {
return y.iTimestamp - x.iTimestamp;
}
,l.bind(this, e),S.bind(this, e));
c = new a(500,function(x, y) {
if (x.appType === y.appType) {
if (x.appType !== 'Application') {
return x.url === y.url;
} else {
return x.appId === y.appId;
}
} else {
if (x.appType === "Application" || y.appType ===
"Application") {
return (x.appId === y.appId) && (x.url === y.url);
} else {
return false;
}
}
}
,function(x, y) {
return y.iTimestamp - x.iTimestamp;
}
,l.bind(this, f),S.bind(this, f));
A = new b(l.bind(this, g),S.bind(this, g));
}
;
sap.ushell.services.UserRecents.hasNoAdapter = true;
}());
},
"sap/ushell/ui/launchpad/ActionItem.js": function() {
jQuery.sap.declare("sap.ushell.ui.launchpad.ActionItem");
jQuery.sap.require("sap.ushell.library");
jQuery.sap.require("sap.m.Button");
sap.m.Button.extend("sap.ushell.ui.launchpad.ActionItem", {
metadata: {
library: "sap.ushell",
properties: {
"actionType": {
type: "string",
group: "Appearance",
defaultValue: 'standard'
}
},
events: {
"press": {},
"afterRendering": {}
}
}
});
sap.ushell.ui.launchpad.ActionItem.M_EVENTS = {
'press': 'press',
'afterRendering': 'afterRendering'
};
(function() {
"use strict";
sap.ushell.ui.launchpad.ActionItem.prototype.init = function() {
if (sap.m.Button.prototype.init) {
sap.m.Button.prototype.init.apply(this, arguments);
}
this.sOrigType = undefined;
}
;
sap.ushell.ui.launchpad.ActionItem.prototype.setActionType =
function(t) {
if (!this.sOrigType) {
this.sOrigType = this.getType();
}
if (t === 'action') {
this.setType(sap.m.ButtonType.Unstyled);
this.addStyleClass("sapUshellActionItem");
} else {
this.sOrigType ? this.setType(this.sOrigType) :
this.setType(sap.m.ButtonType.Standard);
this.removeStyleClass("sapUshellActionItem");
}
this.setProperty('actionType', t, true);
}
;
}());
},
"sap/ushell/ui/launchpad/ActionItemRenderer.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.ui.launchpad.ActionItemRenderer");
jQuery.sap.require('sap.ui.core.Renderer');
jQuery.sap.require('sap.m.ButtonRenderer');
sap.ushell.ui.launchpad.ActionItemRenderer = {};
sap.ushell.ui.launchpad.ActionItemRenderer =
sap.ui.core.Renderer.extend(sap.m.ButtonRenderer);
}());
},
"sap/ushell/ui/launchpad/LoadingOverlay.js": function() {
jQuery.sap.declare("sap.ushell.ui.launchpad.LoadingOverlay");
jQuery.sap.require("sap.ushell.library");
jQuery.sap.require("sap.ui.core.Control");
sap.ui.core.Control.extend("sap.ushell.ui.launchpad.LoadingOverlay", {
metadata: {
library: "sap.ushell"
}
});
(function() {
"use strict";
sap.ushell.ui.launchpad.LoadingOverlay.prototype.init = function()
{
var b = document.getElementsByTagName("body")[0]
, e = document.createElement("DIV")
, a = document.createElement("DIV")
, c = document.createElement("DIV")
, d = document.createElement("DIV")
, f = document.createElement("DIV");
f.setAttribute("id", "sapUshellLoadingArea");
f.setAttribute("class", "sapUshellLoadingDialogArea");
f.setAttribute("style", "height: 0px; width: 0px; overflow:
hidden; float: left;");
b.insertBefore(f, b.firstChild);
a.setAttribute("id", "sapUshellLoadingAccessibilityHelper");
a.setAttribute("class", "sapUshellLoadingAccessibilityHelper");
c.setAttribute("id", "sapUshellLoadingAccessibilityHelper-
appInfo");
c.setAttribute("aria-atomic", "true");
d.setAttribute("id", "sapUshellLoadingAccessibilityHelper-
loadingComplete");
d.setAttribute("aria-atomic", "true");
d.setAttribute("aria-live", "polite");
e.setAttribute("id", "sapUshellLoadingOverlay");
e.setAttribute("class", "sapUshellLoadingOverlayStyle
sapUshellShellHidden");
e.setAttribute("style", "z-index: 8;visibility: visible;");
a.appendChild(c);
a.appendChild(d);
f.appendChild(a);
b.insertBefore(e, f);
}
;
sap.ushell.ui.launchpad.LoadingOverlay.prototype.openLoadingScreen
= function() {

jQuery("#sapUshellLoadingOverlay").toggleClass("sapUshellShellHidden", false);
}
;
sap.ushell.ui.launchpad.LoadingOverlay.prototype.isOpen =
function() {
return !
jQuery("#sapUshellLoadingOverlay").hasClass("sapUshellShellHidden");
}
;
sap.ushell.ui.launchpad.LoadingOverlay.prototype.closeLoadingScreen
= function() {

jQuery("#sapUshellLoadingOverlay").toggleClass("sapUshellShellHidden", true);
}
;
}());
},
"sap/ushell/ui/launchpad/Tile.js": function() {
jQuery.sap.declare("sap.ushell.ui.launchpad.Tile");
jQuery.sap.require("sap.ushell.library");
jQuery.sap.require("sap.ui.core.Control");
sap.ui.core.Control.extend("sap.ushell.ui.launchpad.Tile", {
metadata: {
library: "sap.ushell",
properties: {
"long": {
type: "boolean",
group: "Misc",
defaultValue: false
},
"uuid": {
type: "string",
group: "Misc",
defaultValue: null
},
"tileCatalogId": {
type: "string",
group: "Misc",
defaultValue: null
},
"target": {
type: "string",
group: "Misc",
defaultValue: null
},
"visible": {
type: "boolean",
group: "Misc",
defaultValue: true
},
"debugInfo": {
type: "string",
group: "Misc",
defaultValue: null
},
"rgba": {
type: "string",
group: "Misc",
defaultValue: null
},
"animationRendered": {
type: "boolean",
group: "Misc",
defaultValue: false
},
"isLocked": {
type: "boolean",
group: "Misc",
defaultValue: false
},
"showActionsIcon": {
type: "boolean",
group: "Misc",
defaultValue: false
},
"tileActionModeActive": {
type: "boolean",
group: "Misc",
defaultValue: false
},
"ieHtml5DnD": {
type: "boolean",
group: "Misc",
defaultValue: false
}
},
aggregations: {
"tileViews": {
type: "sap.ui.core.Control",
multiple: true,
singularName: "tileView"
},
"footItems": {
type: "sap.ui.core.Control",
multiple: true,
singularName: "footItem"
}
},
events: {
"press": {},
"coverDivPress": {},
"afterRendering": {},
"showActions": {},
"deletePress": {}
}
}
});
sap.ushell.ui.launchpad.Tile.M_EVENTS = {
'press': 'press',
'coverDivPress': 'coverDivPress',
'afterRendering': 'afterRendering',
'showActions': 'showActions',
'deletePress': 'deletePress'
};
(function() {
"use strict";
jQuery.sap.require("sap.ushell.override");
sap.ushell.ui.launchpad.Tile.prototype.getActionSheetIcon =
function() {
if (!this.getTileActionModeActive()) {
return undefined;
}
if (!this.actionSheetIcon) {
this.actionSheetIcon = new sap.ui.core.Icon({
src: "sap-icon://overflow"
});

this.actionSheetIcon.addStyleClass('sapUshellTileActionIconDivBottomInner');
}
return this.actionSheetIcon;
}
;
sap.ushell.ui.launchpad.Tile.prototype.ontap = function(e, u) {
jQuery.sap.log.info("Tile clicked:", this.getDebugInfo(),
"sap.ushell.ui.launchpad.Tile");
this.firePress();
return;
}
;
sap.ushell.ui.launchpad.Tile.prototype.destroy = function(s) {
this.destroyTileViews();
sap.ui.core.Control.prototype.destroy.call(this, s);
}
;
sap.ushell.ui.launchpad.Tile.prototype.addTileView = function(o, s)
{
o.setParent(null);
sap.ui.base.ManagedObject.prototype.addAggregation.call(this,
"tileViews", o, s);
}
;
sap.ushell.ui.launchpad.Tile.prototype.destroyTileViews =
function() {
if (this.mAggregations["tileViews"]) {
this.mAggregations["tileViews"].length = 0;
}
}
;
sap.ushell.ui.launchpad.Tile.prototype.onAfterRendering =
function() {
var c = this.$().find("div.sapUshellTileActionLayerDiv"), r;
if (this.getTileActionModeActive()) {
c.css("display", "block");
} else {
c.css("display", "none");
}
r = this.getRgba();
if (r) {
this._redrawRGBA();
}
this.fireAfterRendering();
}
;
sap.ushell.ui.launchpad.Tile.prototype._launchTileViaKeyboard =
function(e) {
if (this.getTileActionModeActive()) {
this.fireCoverDivPress({
id: this.getId()
});
} else {
if (e.target.tagName !== "BUTTON") {
var t = this.getTileViews()[0]
, p = false;
if (t.firePress) {
t.firePress({
id: this.getId()
});
} else {
while (t.getContent && !p) {
t = t.getContent()[0];
if (t.firePress) {
t.firePress({
id: this.getId()
});
p = true;
}
}
}
}
}
}
;
sap.ushell.ui.launchpad.Tile.prototype.onsapenter = function(e) {
this._launchTileViaKeyboard(e);
if (!this.getTileActionModeActive()) {
this._announceLoadingApplication();
}
}
;
sap.ushell.ui.launchpad.Tile.prototype.onsapspace = function(e) {
this._launchTileViaKeyboard(e);
if (!this.getTileActionModeActive()) {
this._announceLoadingApplication();
}
}
;
sap.ushell.ui.launchpad.Tile.prototype.onclick = function(e) {
if (this.getTileActionModeActive()) {
var s = e.originalEvent.srcElement;
if
(jQuery(s).closest('.sapUshellTileDeleteClickArea').length > 0) {
this.fireDeletePress();
} else {
this.fireCoverDivPress({
id: this.getId()
});
}
} else {
this._announceLoadingApplication();
}
}
;
sap.ushell.ui.launchpad.Tile.prototype._announceLoadingApplication
= function() {
var a =
document.getElementById("sapUshellLoadingAccessibilityHelper-appInfo")
, l =
sap.ushell.resources.i18n.getText("screenReaderNavigationLoading");
if (a) {
a.setAttribute("role", "alert");
a.innerHTML = l;
setTimeout(function() {
a.removeAttribute("role");
a.innerHTML = "";
}, 0);
}
}
;
sap.ushell.ui.launchpad.Tile.prototype._initDeleteAction =
function() {
var t = this;
if (!this.deleteIcon) {
this.deleteIcon = new sap.ui.core.Icon({
src: "sap-icon://decline",
tooltip:
sap.ushell.resources.i18n.getText("removeButtonTItle")
});
this.deleteIcon.addEventDelegate({
onclick: function(e) {
t.fireDeletePress();
e.stopPropagation();
}
});

this.deleteIcon.addStyleClass("sapUshellTileDeleteIconInnerClass");
}
return this.deleteIcon;
}
;
sap.ushell.ui.launchpad.Tile.prototype.setShowActionsIcon =
function(s) {
var t = this, i;
if (s) {
i = new sap.ui.core.Icon({
size: "1rem",
src: "sap-icon://overflow",
press: function(e) {
t.fireShowActions();
t.addStyleClass('showTileActionsIcon');
var E = sap.ui.getCore().getEventBus()
, a = function(n, b, c) {
c.removeStyleClass('showTileActionsIcon');
E.unsubscribe("dashboard", "actionSheetClose",
a);
};
E.subscribe("dashboard", "actionSheetClose", a);
}
});
i.addStyleClass("sapUshellTileActionsIconClass");
this.actionIcon = i;
} else if (this.actionIcon) {
this.actionIcon.destroy(true);
}
this.setProperty("showActionsIcon", s);
}
;
sap.ushell.ui.launchpad.Tile.prototype.setVisible = function(v) {
this.setProperty("visible", v, true);
return this.toggleStyleClass("sapUshellHidden", !v);
}
;
sap.ushell.ui.launchpad.Tile.prototype.setRgba = function(v) {
this.setProperty("rgba", v, true);
this._redrawRGBA(arguments);
}
;
sap.ushell.ui.launchpad.Tile.prototype.setAnimationRendered =
function(v) {
this.setProperty('animationRendered', v, true);
}
;
sap.ushell.ui.launchpad.Tile.prototype._handleTileShadow =
function(j, a) {
if (j.length) {
j.unbind('mouseenter mouseleave');
var u, t = j.css("border").split("px")[0], m =
this.getModel();
if (t > 0) {
u = j.css("border-color");
} else {
u = this.getRgba();
}
j.hover(function() {
if (!m.getProperty('/tileActionModeActive')) {
var o = jQuery(j).css('box-shadow'), T = o ?
o.split(') ')[1] : null, U;
if (T) {
U = T + " " + u;
jQuery(this).css('box-shadow', U);
}
}
}, function() {
jQuery(this).css('box-shadow', '');
});
}
}
;
sap.ushell.ui.launchpad.Tile.prototype._redrawRGBA = function(a) {
var r = this.getRgba(), j, i;
if (r) {
j = jQuery.sap.byId(this.getId());
i = (jQuery.browser.msie &&
(parseInt(jQuery.browser.version, 9) === 9));
if (!j) {
return;
}
if (!this.getModel().getProperty('/animationRendered')) {
if (i) {
j.animate({
backgroundColor: r
}, 2000);
} else {
j.css('transition', 'background-color 2s');
j.css('background-color', r);
}
} else {
j.css('background-color', r);
}
this._handleTileShadow(j, a);
}
}
;
sap.ushell.ui.launchpad.Tile.prototype.setLong = function(l) {
this.setProperty("long", l, true);
return this.toggleStyleClass("sapUshellLong", l);
}
;
sap.ushell.ui.launchpad.Tile.prototype.setUuid = function(u) {
this.setProperty("uuid", u, true);
return this;
}
;
}());
},
"sap/ushell/ui/launchpad/TileRenderer.js": function() {
(function() {
"use strict";
jQuery.sap.require("sap.ushell.resources");
jQuery.sap.declare("sap.ushell.ui.launchpad.TileRenderer");
sap.ushell.ui.launchpad.TileRenderer = {};
sap.ushell.ui.launchpad.TileRenderer.render = function(r, c) {
var t = null, m = c.getModel(), C;
try {
t = c.getTileViews()[0];
} catch (e) {
jQuery.sap.log.warning("Failed to load tile view: ",
e.message);
t = new sap.m.Text({
text: "Failed to load. "
});
}
var T = c.getParent()
, o = T.getTiles ? T.getTiles() : []
, v = o.filter(function(a) {
return a.getVisible();
})
, i = v.indexOf(c) > -1 ? v.indexOf(c) + 1 : "";
r.write("<li");
if (m && m.getProperty("/enableHelp")) {
r.writeAttribute("data-tileCatalogId",
c.getTileCatalogId());
}
r.writeControlData(c);
r.addClass("sapUshellTile");
if (t && t.getContent && sap.suite && sap.suite.ui &&
sap.suite.ui.commons && sap.suite.ui.commons.FeedTile) {
C = t.getContent();
C.forEach(function(I) {
if (I instanceof sap.suite.ui.commons.FeedTile) {
r.addClass("sapUshellFeedTileBG");
}
});
}
if (c.getFootItems() && c.getFootItems().length > 0) {
r.addClass("sapUshellTileFooter");
}
if (c.getLong()) {
r.addClass("sapUshellLong");
}
if (!c.getVisible()) {
r.addClass("sapUshellHidden");
}
if (c.getIsLocked()) {
r.addClass("sapUshellLockedTile");
}
r.writeClasses();
r.writeAccessibilityState(c, {
role: "option",
posinset: i,
setsize: v.length
});
r.writeAttribute("aria-describedby", c.getParent().getId() + "-
groupheader");
if (c.getIeHtml5DnD()) {
r.writeAttribute("draggable", "true");
}
r.writeAttributeEscaped("tabindex", "-1");
var l = c.data('layoutPosition');
if (l) {
var s = '-webkit-transform:' + l.translate3D + ';-ms-
transform:' + l.translate2D + ';transform:' + l.translate3D;
r.writeAttribute("style", s);
}
r.write(">");
r.write("<div");
r.addClass("sapUshellTileActionLayerDiv");
r.writeClasses();
r.write(">");
if (!c.getShowActionsIcon()) {
if (!c.getIsLocked() && c.getTileActionModeActive()) {
r.write("<div");
r.addClass("sapUshellTileDeleteClickArea");
r.writeClasses();
r.write(">");
r.write("<div");
r.addClass("sapUshellTileDeleteIconOuterClass");
r.writeClasses();
r.write(">");
r.renderControl(c._initDeleteAction());
r.write("</div>");
r.write("</div>");
}
}
if (c.getTileActionModeActive()) {
r.write("<div
class='sapUshellTileActionDivCenter'></div>");
r.write("<div");
r.addClass("sapUshellTileActionIconDivBottom");
r.writeClasses();
r.write(">");
r.write("<div");
r.addClass("sapUshellTileActionIconDivBottomInnerDiv");
r.writeClasses();
r.write(">");
r.renderControl(c.getActionSheetIcon());
r.write("</div>");
r.write("</div>");
}
r.write("</div>");
r.addClass("sapUshellTileInner");
if (c.getProperty('tileActionModeActive')) {
r.addClass("sapUshellTileActionBG");
}
if (this.renderTileView) {
this.renderTileView(r, t, c.getTarget());
}
if (c.getShowActionsIcon()) {
r.renderControl(c.actionIcon);
}
r.write("<footer");
if (m && m.getProperty("/enableHelp")) {
r.writeAttribute("data-tileCatalogId", "addRemoveTile-" +
c.getTileCatalogId());
}
r.addClass("sapUshellTileFooterElement");
r.writeClasses();
r.write(">");
jQuery.each(c.getFootItems(), function() {
r.renderControl(this);
});
r.write("</footer>");
r.write("</li>");
}
;
sap.ushell.ui.launchpad.TileRenderer.renderTileView = function(r,
t, T) {
if ((T || "") !== "") {
r.write("<a");
r.writeClasses();
r.writeAttributeEscaped("href", "#" + T);
r.write(">");
r.renderControl(t);
r.write("</a>");
} else {
r.write("<div");
r.writeClasses();
r.write(">");
r.renderControl(t);
r.write("</div>");
}
}
;
}());
},
"sap/ushell/ui/launchpad/ViewPortContainer.js": function() {
jQuery.sap.declare("sap.ushell.ui.launchpad.ViewPortContainer");
jQuery.sap.require("sap.ushell.library");
jQuery.sap.require("sap.ui.core.Control");
sap.ui.core.Control.extend("sap.ushell.ui.launchpad.ViewPortContainer",
{
metadata: {
library: "sap.ushell",
properties: {
"height": {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: '100%'
},
"width": {
type: "sap.ui.core.CSSSize",
group: "Dimension",
defaultValue: '100%'
},
"visible": {
type: "boolean",
group: "Appearance",
defaultValue: true
},
"defaultState": {
type: "sap.ushell.ui.launchpad.ViewPortState",
group: "Appearance",
defaultValue:
sap.ushell.ui.launchpad.ViewPortState.Center
}
},
aggregations: {
"leftViewPort": {
type: "sap.ui.core.Control",
multiple: true,
singularName: "leftViewPort"
},
"centerViewPort": {
type: "sap.ui.core.Control",
multiple: true,
singularName: "centerViewPort"
},
"rightViewPort": {
type: "sap.ui.core.Control",
multiple: true,
singularName: "rightViewPort"
}
},
associations: {
"initialCenterViewPort": {
type: "sap.ui.core.Control",
multiple: false
},
"initialRightViewPort": {
type: "sap.ui.core.Control",
multiple: false
},
"initialLeftViewPort": {
type: "sap.ui.core.Control",
multiple: false
}
},
events: {
"navigate": {},
"afterSwitchState": {
parameters: {
"from": {
type: "sap.ui.core.Control"
},
"to": {
type: "sap.ui.core.Control"
}
}
},
"afterNavigate": {
parameters: {
"from": {
type: "sap.ui.core.Control"
},
"to": {
type: "sap.ui.core.Control"
}
}
}
}
}
});
sap.ushell.ui.launchpad.ViewPortContainer.M_EVENTS = {
'navigate': 'navigate',
'afterSwitchState': 'afterSwitchState',
'afterNavigate': 'afterNavigate'
};
(function() {
"use strict";
jQuery.sap.require("sap.ushell.resources");
jQuery.sap.declare("sap.ushell.ui.launchpad.ViewPortContainer");
jQuery.sap.require('sap.ui.core.theming.Parameters');
sap.ushell.ui.launchpad.ViewPortContainer.prototype.init =
function() {
this.bShiftCenterTransition = true;
this.bShiftCenterTransitionEnabled = false;
var c = sap.ui.getCore().getConfiguration();
this.bIsRTL = !jQuery.isEmptyObject(c) && c.getRTL ? c.getRTL()
: false;
this.bTransitionEndHandlerRegistered = false;
this._oViewPortsNavigationHistory = {
leftViewPort: {
visitedControls: [],
indexOfCurrentlyDisplayedControl: null
},
centerViewPort: {
visitedControls: [],
indexOfCurrentlyDisplayedControl: null
},
rightViewPort: {
visitedControls: [],
indexOfCurrentlyDisplayedControl: null
}
};
this._states = {
Left: {
translateX: '',
visibleViewPortsData: [{
viewPortId: 'leftViewPort',
className: "leftClass",
isActive: true
}]
},
Center: {
translateX: '',
visibleViewPortsData: [{
viewPortId: 'centerViewPort',
className: "centerClass",
isActive: true
}]
},
Right: {
translateX: '',
visibleViewPortsData: [{
viewPortId: 'rightViewPort',
className: "rightClass",
isActive: true
}]
},
LeftCenter: {
translateX: '',
visibleViewPortsData: [{
viewPortId: 'leftViewPort',
className: "front",
isActive: true
}, {
viewPortId: 'centerViewPort',
className: "backLeft",
isActive: false
}]
},
CenterLeft: {
translateX: '',
visibleViewPortsData: [{
viewPortId: 'centerViewPort',
className: "frontLeft",
isActive: true
}, {
viewPortId: 'leftViewPort',
className: "back",
isActive: false
}]
},
RightCenter: {
translateX: '',
visibleViewPortsData: [{
viewPortId: 'rightViewPort',
className: "front",
isActive: true
}, {
viewPortId: 'centerViewPort',
className: "backRight",
isActive: false
}]
},
CenterRight: {
translateX: '',
visibleViewPortsData: [{
viewPortId: 'centerViewPort',
className: "frontRight",
isActive: true
}, {
viewPortId: 'rightViewPort',
className: "back",
isActive: false
}]
}
};

sap.ui.Device.media.attachHandler(this._handleSizeChange.bind(this), null,
sap.ui.Device.media.RANGESETS.SAP_STANDARD);
sap.ui.Device.orientation.attachHandler(this._handleSizeChange,
this);
jQuery(window).bind("resize", function() {
this._handleSizeChange();
}
.bind(this));
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.removeCenterViewPort =
function(c, s) {
this.removeAggregation('centerViewPort', c, s);
this._popFromViewPortNavigationHistory('centerViewPort', c);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._popFromViewPortNavigationHisto
ry = function(v, c) {
var n = this._oViewPortsNavigationHistory[v]
, V = n ? n.visitedControls : []
, i = V.indexOf(c);
if (V.length > 0) {
n.visitedControls = V.slice(i + 1,
n.visitedControls.length);
n.indexOfCurrentlyDisplayedControl =
n.visitedControls.length - 1;
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.addCenterViewPort = function(c)
{
var i = this._isInCenterViewPort(c);
c.toggleStyleClass("hidden", true);
c.addStyleClass("sapUshellViewPortItemSlideFrom");
if (!i) {
this.addAggregation('centerViewPort', c, true);
}
if (this.domRef && !i) {
this.getRenderer().renderViewPortPart(c, this.domRef,
'centerViewPort');
}
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype.addLeftViewPort
= function(c) {
c.toggleStyleClass("hidden", true);
if (this.domRef) {
this.getRenderer().renderViewPortPart(c, this.domRef,
'leftViewPort');
}
this.addAggregation('leftViewPort', c, true);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.addRightViewPort = function(c)
{
c.toggleStyleClass("hidden", true);
if (this.domRef) {
this.getRenderer().renderViewPortPart(c, this.domRef,
'rightViewPort');
}
this.addAggregation('rightViewPort', c, true);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.setInitialCenterViewPort =
function(c) {
var C = this._getCurrentlyDispalyedControl('centerViewPort')
, i = this._isInCenterViewPort(c);
c.addStyleClass("sapUshellViewPortItemSlideFrom");
if (this.domRef && !i) {
this.getRenderer().renderViewPortPart(c, this.domRef,
'centerViewPort');
}
this._setCurrentlyDisplayedControl('centerViewPort', c);
if (!i) {
this.addAggregation('centerViewPort', c, true);
}
this.setAssociation('initialCenterViewPort', c, true);
if (C && C !== c.getId()) {
this.fireAfterNavigate({
fromId: C,
from: sap.ui.getCore().byId(C),
to: sap.ui.getCore().byId(c),
toId: c.getId()
});
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.setInitialLeftViewPort =
function(c) {
var C = this._getCurrentlyDispalyedControl('leftViewPort');
this.addAggregation('leftViewPort', c, true);
this._setCurrentlyDisplayedControl('leftViewPort', c);
if (this.domRef) {
this.getRenderer().renderViewPortPart(c, this.domRef,
'leftViewPort');
}
this.setAssociation('initialLeftViewPort', c, true);
if (C && C !== c.getId()) {
this.fireAfterNavigate({
fromId: C,
from: sap.ui.getCore().byId(C),
to: sap.ui.getCore().byId(c),
toId: c.getId()
});
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.setInitialRightViewPort =
function(c) {
var C = this._getCurrentlyDispalyedControl('rightViewPort');
this.addAggregation('rightViewPort', c, true);
this._setCurrentlyDisplayedControl('rightViewPort', c);
if (this.domRef) {
this.getRenderer().renderViewPortPart(c, this.domRef,
'rightViewPort');
}
this.setAssociation('initialRightViewPort', c, true);
if (C && C !== c.getId()) {
this.fireAfterNavigate({
fromId: C,
from: sap.ui.getCore().byId(C),
to: sap.ui.getCore().byId(c),
toId: c.getId()
});
}
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype._isInViewPort =
function(v, c) {
var V = this.getAggregation(v)
, i = V ? V.indexOf(c) > -1 : false;
return i;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._isInCenterViewPort =
function(c) {
return this._isInViewPort('centerViewPort', c);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._isInLeftViewPort = function(c)
{
return this._isInViewPort('leftViewPort', c);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._isInRightViewPort =
function(c) {
return this._isInViewPort('rightViewPort', c);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.getCurrentCenterPage =
function() {
return this._getCurrentlyDispalyedControl('centerViewPort');
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.getCurrentRightPage =
function() {
return this._getCurrentlyDispalyedControl('rightViewPort');
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.getCurrentLeftPage = function()
{
return this._getCurrentlyDispalyedControl('leftViewPort');
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype.navTo =
function(v, c, t, d, T) {
var C = this._getCurrentlyDispalyedControl(v)
, V = this.getAggregation(v)
, b = V.some(function(a, i) {
if (a.getId() === c) {
return true;
}
});
if (!b) {
jQuery.sap.log.error("ViewPort Container Error: Couldn't
find target control");
} else if (!C || C !== c) {
var o = sap.ui.getCore().byId(c);
o.toggleStyleClass("hidden", false);
var O = function() {
this.fireAfterNavigate({
toId: c,
to: c ? sap.ui.getCore().byId(c) : null,
fromId: C,
from: C ? sap.ui.getCore().byId(C) : null
});
}
.bind(this);
this._setCurrentlyDisplayedControl(v, o, t, O);
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._getCurrentlyDispalyedControl =
function(v) {
var n = this._oViewPortsNavigationHistory[v];
return n.visitedControls[n.indexOfCurrentlyDisplayedControl];
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._setCurrentlyDisplayedControl =
function(v, c, t, o) {
var n = this._oViewPortsNavigationHistory[v]
, V = n.visitedControls
, C = this._getCurrentlyDispalyedControl(v)
, a = C ? sap.ui.getCore().byId(C) : null
, T = (v === 'centerViewPort' && t) ? t : 'show';
V.push(c.getId());
n.indexOfCurrentlyDisplayedControl =
jQuery.isNumeric(n.indexOfCurrentlyDisplayedControl) ?
n.indexOfCurrentlyDisplayedControl + 1 : 0;
this._handleViewPortTransition(v, T, c, a, o);
this._updateTranslateXvalues();
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._handleSizeChange = function()
{
this._updateTranslateXvalues();
var t = this._getTranslateXValue(this.sCurrentState);
if (this.getDomRef()) {
jQuery(this.getDomRef()).css(this.bIsRTL ? 'right' :
'left', t);
}
this.fixViewportScrollbars();
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._updateTranslateXvalues =
function() {
var t = sap.ui.core.theming.Parameters, l, r;
if (window.matchMedia('(min-width: 1920px)').matches) {
l = t.get('sapUshellLeftViewPortWidthLarge');
r = t.get('sapUshellRightViewPortWidthXXXLarge');
} else if (window.matchMedia('(min-width: 1600px)').matches) {
l = t.get('sapUshellLeftViewPortWidthMedium');
r = t.get('sapUshellRightViewPortWidthXXLarge');
} else if (window.matchMedia('(min-width: 1440px)').matches) {
l = t.get('sapUshellLeftViewPortWidthMedium');
r = t.get('sapUshellRightViewPortWidthXLarge');
} else if (window.matchMedia('(min-width: 1280px)').matches) {
l = t.get('sapUshellLeftViewPortWidthMedium');
r = t.get('sapUshellRightViewPortWidthLarge');
} else if (window.matchMedia('(min-width: 1024px)').matches) {
l = t.get('sapUshellLeftViewPortWidthSmall');
r = t.get('sapUshellRightViewPortWidthMedium');
} else if (window.matchMedia('(min-width: 601px)').matches) {
l = t.get('sapUshellLeftViewPortWidthSmall');
r = t.get('sapUshellRightViewPortWidthSmall');
} else if (window.matchMedia('(max-width : 600px)').matches) {
l = jQuery(window).width() /
parseFloat(jQuery("body").css("font-size"));
r = jQuery(window).width() /
parseFloat(jQuery("body").css("font-size"));
}
this._updateStatesWithTranslateXvalues(l, r);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._updateStatesWithTranslateXvalu
es = function(l, r) {
var t = 0, L;
if (l !== null && r !== null) {
this._states.Center.translateX = '-' + parseFloat(l) +
'rem';
this._states.LeftCenter.translateX = "0";
t = -1 * (parseFloat(l) + parseFloat(r));
this._states.RightCenter.translateX = t.toString() + 'rem';
L = this._calculateRightViewPortLeftPosotion();
jQuery(".sapUshellViewPortRight").css("left", L);
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._calculateRightViewPortLeftPoso
tion = function() {
var l = 0, w, L;
w = jQuery(window).width();
L = jQuery(".sapUshellViewPortLeft").width();
l = w + L;
return l;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._handleViewPortTransition =
function(v, t, T, c, o) {
if (v !== 'centerViewPort') {
return;
}
if (!c) {
t = 'show';
}
switch (t) {
case 'show':
T.toggleStyleClass("hidden", false);
if (c) {
c.toggleStyleClass("hidden");
}
if (o) {
o();
}
break;
case 'slide':
T.toggleStyleClass("hidden", false);
setTimeout(function() {
var a = jQuery(T.getDomRef());
a.css({
'transition': "transform 0.4s",
'-webkit-transform': "translateX(-100%)",
'transform': "translateX(-100%)"
});
setTimeout(function() {
a.css({
'transition': "transform 0s",
'-webkit-transform': "translateX(0%)",
'transform': "translateX(0%)"
});
c.toggleStyleClass("hidden", true);
if (o) {
o();
}
}, 500);
}, 100);
break;
case 'slideBack':
var j = jQuery('#' + this.getCurrentCenterPage());
setTimeout(function() {
j.css({
'transition': "transform 0.7s",
'-webkit-transform': "translateX(100%)",
'transform': "translateX(100%)"
});
}, 50);
setTimeout(function() {
T.toggleStyleClass("hidden", false);
setTimeout(function() {
if (c) {
j.css({
'transition': "transform 0s",
'-webkit-transform': "translateX(0%)",
'transform': "translateX(0%)"
});
c.toggleStyleClass("hidden", true);
}
if (o) {
o();
}
}, 200);
}, 500);
break;
case 'fade':
var a = jQuery(T.getDomRef());
if (c) {
var b = jQuery(c.getDomRef());
b.fadeToggle(250);
}
a.fadeIn(500, o ? o : null);
break;
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.onAfterRendering = function() {
this.domRef = this.getDomRef();
if (this.sCurrentState.indexOf("Center") == 0) {
var r =
this._states["Right"].visibleViewPortsData[0].viewPortId;
jQuery(document.getElementById(r)).css("display", "none");
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.onBeforeRendering = function()
{
this._updateTranslateXvalues();
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype.setDefaultState
= function(s) {
this.setCurrentState(s);
this.setProperty("defaultState", s, true);
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.endOfAnimationEventHandler =
function() {
var t = this._states[this.sTargetState].translateX
, v = this.getDomRef();
jQuery(v).css({
'-webkit-transform': "translateX(0%)",
'transform': "translateX(0%)",
'transition': "initial"
});
jQuery(v).css(this.bIsRTL ? 'right' : 'left', t);
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype.switchState =
function(s) {
var v, a, t = [], f = [], b, T;
this.sTargetState = s;
if (s !== this.sCurrentState) {
var c = this._getTranslateXValue(s)
, V =
this._states[this.sCurrentState].visibleViewPortsData
, d = this._states[s].visibleViewPortsData
, j = jQuery(this.getDomRef());
if (s.indexOf("Right") == 0) {
var r = d[0].viewPortId;
jQuery(document.getElementById(r)).css("display",
"block");
}
V.forEach(function(e) {
j.find('#' + e.viewPortId).removeClass(e.className);
});
this._handleCenterViewPortAnimation(s);
v = this.getDomRef();
if (this.bIsRTL) {
T = parseInt(c, 10);
T = -T;
c = T.toString() + "rem";
}
jQuery(v).css({
'-webkit-transform': "translateX(" + c + ")",
'transform': "translateX(" + c + ")",
'transition': "transform 0.5s"
});
setTimeout(function() {
this.endOfAnimationEventHandler();
}
.bind(this), 550);
for (b = 0; b <
this._states[this.sCurrentState].visibleViewPortsData.length; b++) {

f.push(this._states[this.sCurrentState].visibleViewPortsData[b].viewPortId);
}
for (b = 0; b <
this._states[s].visibleViewPortsData.length; b++) {

t.push(this._states[s].visibleViewPortsData[b].viewPortId);
}
setTimeout(function() {
var e = 0, k;
if (this.sCurrentState.indexOf("Center") == 0) {
var r =
this._states["Right"].visibleViewPortsData[0].viewPortId;
jQuery(document.getElementById(r)).css("display",
"none");
}
for (k = 0; k < f.length; k++) {
a = this.getAggregation(f[k]);
for (e = 0; e < a.length; e++) {
if (a[e].onViewStateHide) {
a[e].onViewStateHide();
}
}
}
for (k = 0; k < t.length; k++) {
a = this.getAggregation(t[k]);
for (e = 0; e < a.length; e++) {
if (a[e].onViewStateShow) {
a[e].onViewStateShow();
}
}
}
this.fixViewportScrollbars();
d.forEach(function(l) {
j.find('#' + l.viewPortId).addClass(l.className);
});
}
.bind(this), 700);
jQuery('#' + V[0].viewPortId).removeClass("active");
var S = function() {
this.switchState('Center');
}
.bind(this);
var g = function(e) {
var k =
parseInt(window.getComputedStyle(e.currentTarget).width, 10);
if (e.offsetX > k) {
this.switchState('Center');
}
}
.bind(this);
var h =
jQuery(this.getDomRef()).find('.sapUshellViewPortWrapper');
var i =
jQuery(this.getDomRef()).find('.sapUshellViewPortLeft');
if (s !== 'Center') {
h.on('click', S);
h.addClass('sapUshellViewPortWrapperClickable');
i.on('click', g);
} else {
h.off('click', S);
h.removeClass('sapUshellViewPortWrapperClickable');
i.off('click', g);
}
this.setCurrentState(s);
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.fixViewportScrollbars =
function() {
var a = this.getCurrentState()
, v = this._states[a].visibleViewPortsData;
jQuery('#' + v[0].viewPortId).css("height", "100%");
if (v[0].viewPortId === "leftViewPort") {
if (this.bIsRTL) {
var p = window.innerWidth -
jQuery("#leftViewPort").width();
jQuery("#leftViewPort").css("padding-left", p);
} else {
var b = window.innerWidth -
jQuery("#leftViewPort").width();
jQuery("#leftViewPort").css("padding-right", b);
}
}
jQuery('#' + v[0].viewPortId).addClass("active");
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype.setCurrentState
= function(s) {
var f = this.sCurrentState;
this.sCurrentState = s;
this.fireAfterSwitchState({
to: s,
from: f
});
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype.getCurrentState
= function() {
return this.sCurrentState;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.getViewPortControl =
function(v, d) {
var V = this.getAggregation(v), i;
if (V) {
for (i = 0; i < V.length; i++) {
if (V[i] && (V[i].getId() === d)) {
return V[i];
}
}
}
return null;
}
;
sap.ushell.ui.launchpad.ViewPortContainer.prototype.getViewPort =
function(p) {
var P = this.getCenterViewPort(), i;
for (i = 0; i < P.length; i++) {
if (P[i] && (P[i].getId() === p)) {
return P[i];
}
}
return null;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._handleCenterViewPortAnimation
= function(n) {
var c = this._getCenterViewPortJQueryObject()
, s = this._shiftCenterTransition();
if (this.sCurrentState === "Center") {
if (n === "RightCenter") {
if (s === true) {

c.addClass('sapUshellScaledShiftedCenterWhenInRightViewPort');
} else {

c.addClass('sapUshellScaledCenterWhenInRightViewPort');
}
} else if (n === "LeftCenter") {
c.addClass('sapUshellScaledCenterWhenInLeftViewPort');
}
} else if (n === "Center") {
if (this.sCurrentState === "RightCenter") {

c.removeClass('sapUshellScaledCenterWhenInRightViewPort');

c.removeClass('sapUshellScaledShiftedCenterWhenInRightViewPort');
} else if (this.sCurrentState === "LeftCenter") {

c.removeClass('sapUshellScaledCenterWhenInLeftViewPort');
}
} else if ((this.sCurrentState === "LeftCenter") && (n ===
"RightCenter")) {
if (s === true) {

c.addClass('sapUshellScaledShiftedCenterWhenInRightViewPort');
} else {
c.addClass('sapUshellScaledCenterWhenInRightViewPort');
}
c.removeClass('sapUshellScaledCenterWhenInLeftViewPort');
} else if ((this.sCurrentState === "RightCenter") && (n ===
"LeftCenter")) {
c.addClass('sapUshellScaledCenterWhenInLeftViewPort');
c.removeClass('sapUshellScaledCenterWhenInRightViewPort');

c.removeClass('sapUshellScaledShiftedCenterWhenInRightViewPort');
}
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.shiftCenterTransitionEnabled =
function(e) {
this.bShiftCenterTransitionEnabled = e;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype.shiftCenterTransition =
function(s) {
this.bShiftCenterTransition = s;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._shiftCenterTransition =
function() {
return
sap.ushell.Container.getService("Notifications").isEnabled() &&
this.bShiftCenterTransitionEnabled && this.bShiftCenterTransition;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._getCenterViewPortJQueryObject
= function() {
var j = jQuery(this.getDomRef())
, c = this._states.Center.visibleViewPortsData[0].viewPortId
, a = j.find('#' + c);
return a;
}
;

sap.ushell.ui.launchpad.ViewPortContainer.prototype._getTranslateXValue =
function(t, g) {
var T = this._states[t].translateX, c, i, C;
if (g !== undefined) {
c = this._states[g].translateX;
} else {
c = this._states[this.sCurrentState].translateX;
}
C = parseInt(c, 10);
i = parseInt(T, 10);
if (!g && (t === this.sCurrentState)) {
return T;
}
return (i - C).toString() + "rem";
}
;
sap.ushell.ui.launchpad.ViewPortContainer.transitions =
sap.ushell.ui.launchpad.ViewPortContainer.transitions || {};
}());
},
"sap/ushell/ui5service/ShellUIService.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.ui5service.ShellUIService");
jQuery.sap.require("sap.ui.core.service.ServiceFactoryRegistry");
jQuery.sap.require("sap.ui.core.service.ServiceFactory");
jQuery.sap.require("sap.ui.base.EventProvider");
var l;
var e = new sap.ui.base.EventProvider();
var O = {
hierarchyChanged: "hierarchyChanged",
relatedAppsChanged: "relatedAppsChanged",
titleChanged: "titleChanged"
};
var a;

sap.ui.core.service.Service.extend("sap.ushell.ui5service.ShellUIService", {
init: function() {
var t = this
, p = this.getInterface();
p.init = function() {
t._amendPublicServiceInstance.call(t, this);
}
;

sap.ui.core.service.ServiceFactoryRegistry.register("sap.ushell.ui5service.ShellUIS
ervice", new sap.ui.core.service.ServiceFactory(p));
},
_setActiveComponentId: function(i) {
a = i;
},
_getActiveComponentId: function() {
return a;
},
_getEventProvider: function() {
return e;
},
_getLastSetTitle: function() {
return l;
},
_ensureArrayOfObjectOfStrings: function(A, m) {
var v = jQuery.isArray(A) && A.every(function(o) {
return jQuery.isPlainObject(o) && Object.keys(o).length
> 0 && Object.keys(o).every(function(k) {
return typeof o[k] === "string";
});
});
if (!v) {
jQuery.sap.log.error("'" + m + "' was called with
invalid parameters", "An array of non-empty objects with string values is
expected", "sap.ushell.ui5service.ShellUIService");
}
return v;
},
_ensureString: function(A, m) {
var t = typeof A;
if (t !== "string") {
jQuery.sap.log.error("'" + m + "' was called with
invalid arguments", "the parameter should be a string, got '" + t + "' instead",
"sap.ushell.ui5service.ShellUIService");
return false;
}
return true;
},
_addCallAllowedCheck: function(p, P) {
var t = this;
p[P] = function() {
var c = p.getContext();
if (!c || c.scopeObject.getId() !== a) {
jQuery.sap.log.warning("Call to " + P + " is not
allowed", "This may be caused by an app component other than the active '" + a + "'
that tries to call the method", "sap.ushell.ui5service.ShellUIService");
return undefined;
}
return t[P].apply(p, arguments);
}
;
},
_amendPublicServiceInstance: function(p) {
var t = this, c;
c = p.getContext();
if (typeof c === "undefined") {
return;
}
["setTitle", "setHierarchy",
"setRelatedApps"].forEach(function(m) {
t._addCallAllowedCheck(p, m);
});
if (c.scopeType === "component") {
this._setActiveComponentId(c.scopeObject.getId());
return;
}
jQuery.sap.log.error("Invalid context for ShellUIService
interface", "The context must be empty or an object like { scopeType: ...,
scopeObject: ... }", "sap.ushell.ui5service.ShellUIService");
},
setHierarchy: function(h) {
if (typeof h !== "undefined" && !
sap.ushell.ui5service.ShellUIService.prototype._ensureArrayOfObjectOfStrings(h,
"setHierarchy")) {
return;
}
var c = this.getContext().scopeObject;
e.fireEvent(O.hierarchyChanged, {
data: h,
component: c
});
return;
},
setTitle: function(t) {
if (typeof t !== "undefined" && !
sap.ushell.ui5service.ShellUIService.prototype._ensureString(t, "setTitle")) {
return;
}
var c = this.getContext().scopeObject;
l = t;
e.fireEvent(O.titleChanged, {
data: t,
component: c
});
return;
},
getTitle: function() {
return this._getLastSetTitle();
},
setRelatedApps: function(r) {
if (typeof r !== "undefined" && !
sap.ushell.ui5service.ShellUIService.prototype._ensureArrayOfObjectOfStrings(r,
"setRelatedApps")) {
return;
}
var c = this.getContext().scopeObject;
e.fireEvent(O.relatedAppsChanged, {
data: r,
component: c
});
return;
},
getUxdVersion: function() {
if ((new
jQuery.sap.Version(sap.ui.version).compareTo("1.37.0")) >= 0) {
return 2;
}
return 1;
},
_attachHierarchyChanged: function(f) {
this._getEventProvider().attachEvent(O.hierarchyChanged,
f);
},
_detachHierarchyChanged: function(f) {
this._getEventProvider().detachEvent(O.hierarchyChanged,
f);
},
_attachTitleChanged: function(f) {
this._getEventProvider().attachEvent(O.titleChanged, f);
},
_detachTitleChanged: function(f) {
this._getEventProvider().detachEvent(O.titleChanged, f);
},
_attachRelatedAppsChanged: function(f) {
this._getEventProvider().attachEvent(O.relatedAppsChanged,
f);
},
_detachRelatedAppsChanged: function(f) {
this._getEventProvider().detachEvent(O.relatedAppsChanged,
f);
}
});
}());
},
"sap/ushell/utils.js": function() {
(function() {
"use strict";
jQuery.sap.declare("sap.ushell.utils");
sap.ushell.utils = {};
sap.ushell.utils.isArray = function(o) {
return Object.prototype.toString.apply(o) === '[object Array]';
}
;
sap.ushell.utils.getMember = function(o, a) {
var p = a.split(".")
, n = o;
if (!o) {
return undefined;
}
p.forEach(function(s) {
if (typeof n !== "object") {
return undefined;
}
n = n[s.replace(/[|]/g, ".")];
});
return n;
}
;
sap.ushell.utils.addTime = function(i, I, e) {
if (!window["sap-ushell-startTime"]) {
window["sap-ushell-startTime"] = Date.now();
}
var s = window["sap-ushell-startTime"];
e = e || Date.now();
if (e < s) {
e = s + 1;
}
jQuery.sap.measure.add("sap.ushell.fromStart." + i, I, s, e, e
- s, e - s);
}
;
sap.ushell.utils.Error = function(m, c) {
this.name = "sap.ushell.utils.Error";
this.message = m;
jQuery.sap.log.error(m, null, c);
}
;
sap.ushell.utils.Error.prototype = new Error();
sap.ushell.utils.localStorageSetItem = function(k, v, l) {
var E;
try {
localStorage.setItem(k, v);
if (l) {
E = document.createEvent("StorageEvent");
E.initStorageEvent("storage", false, false, k, "", v,
"", localStorage);
dispatchEvent(E);
}
} catch (e) {
jQuery.sap.log.warning("Error calling
localStorage.setItem(): " + e, null, "sap.ushell.utils");
}
}
;
sap.ushell.utils.getLocalStorage = function() {
return window.localStorage;
}
;
sap.ushell.utils.reload = function() {
location.reload();
}
;
sap.ushell.utils.calculateOrigin = function(d) {
var u;
if (d.origin) {
return d.origin;
}
if (d.protocol && d.hostname) {
return d.protocol + "//" + d.hostname + (d.port ? ':' +
d.port : '');
}
if (d.href) {
u = new URI(d.href);
return u.protocol() + "://" + u.hostname() + (u.port() ?
':' + u.port() : '');
}
}
;
sap.ushell.utils._getPrivateEpcm = function() {
if (window.external && window.external && typeof
window.external.getPrivateEpcm !== "undefined") {
return window.external.getPrivateEpcm();
}
return undefined;
}
;
sap.ushell.utils.hasNativeNavigationCapability = function() {
return sap.ushell.utils.isFeatureBitEnabled(1);
}
;
sap.ushell.utils.hasNativeLogoutCapability = function() {
return sap.ushell.utils.isFeatureBitEnabled(2);
}
;
sap.ushell.utils.isFeatureBitEnabled = function(f) {
var F = "0", p;
p = sap.ushell.utils._getPrivateEpcm();
if (p) {
try {
F = p.getNwbcFeatureBits();
jQuery.sap.log.debug("Detected epcm getNwbcFeatureBits
returned feature bits: " + F);
} catch (e) {
jQuery.sap.log.error("failed to get feature bit vector
via call getNwbcFeatureBits on private epcm object", e.stack, "sap.ushell.utils");
}
}
return (parseInt(F, 16) & f) > 0;
}
;
sap.ushell.utils.isApplicationTypeNWBCRelated = function(a) {
return a === "NWBC" || a === "TR";
}
;
sap.ushell.utils.appendUserIdToUrl = function(p, u) {
var U =
sap.ushell.Container.getService("UserInfo").getUser().getId()
, s = u.indexOf("?") >= 0 ? "&" : "?";
return u + s + p + "=" + U;
}
;
sap.ushell.utils.isNativeWebGuiNavigation = function(r) {
if (this.hasNativeNavigationCapability() && r &&
r.applicationType === "TR") {
return true;
}
return false;
}
;
sap.ushell.utils.Map = function() {
this.entries = {};
}
;
sap.ushell.utils.Map.prototype.put = function(k, v) {
var o = this.get(k);
this.entries[k] = v;
return o;
}
;
sap.ushell.utils.Map.prototype.containsKey = function(k) {
if (typeof k !== "string") {
throw new sap.ushell.utils.Error("Not a string key: " +
k,"sap.ushell.utils.Map");
}
return Object.prototype.hasOwnProperty.call(this.entries, k);
}
;
sap.ushell.utils.Map.prototype.get = function(k) {
if (this.containsKey(k)) {
return this.entries[k];
}
}
;
sap.ushell.utils.Map.prototype.keys = function() {
return Object.keys(this.entries);
}
;
sap.ushell.utils.Map.prototype.remove = function(k) {
delete this.entries[k];
}
;
sap.ushell.utils.Map.prototype.toString = function() {
var r = ['sap.ushell.utils.Map('];
r.push(JSON.stringify(this.entries));
r.push(')');
return r.join('');
}
;
sap.ushell.utils.getParameterValueBoolean = function(p, P) {
var a = jQuery.sap.getUriParameters(P).mParams &&
jQuery.sap.getUriParameters(P).mParams[p], t = ["true", "x"], f = ["false", ""], v;
if (!a || a.length === 0) {
return undefined;
}
v = a[0].toLowerCase();
if (t.indexOf(v) >= 0) {
return true;
}
if (f.indexOf(v) >= 0) {
return false;
}
return undefined;
}
;
sap.ushell.utils.call = function(s, f, a) {
var m;
if (a) {
setTimeout(function() {
sap.ushell.utils.call(s, f, false);
}, 0);
return;
}
try {
s();
} catch (e) {
m = e.message || e.toString();
jQuery.sap.log.error("Call to success handler failed: " +
m, e.stack, "sap.ushell.utils");
if (f) {
f(m);
}
}
}
;
sap.ushell.utils.handleTilesVisibility = function() {
var s = new Date(), t = sap.ushell.utils.getVisibleTiles(), d,
l;
if (t && t.length) {
l = sap.ushell.Container.getService("LaunchPage");
t.forEach(function(T) {
var a = sap.ushell.utils.getTileObject(T);
if (a !== null) {
l.setTileVisible(a, T.isDisplayedInViewPort);
}
});
jQuery.sap.log.debug("Visible Tiles: " +
t.filter(function(T) {
return T.isDisplayedInViewPort;
}).length);
jQuery.sap.log.debug("NonVisible Tiles: " +
t.filter(function(T) {
return !T.isDisplayedInViewPort;
}).length);
}
d = new Date() - s;
jQuery.sap.log.debug("Start time is: " + s + " and duration is:
" + d);
}
;
sap.ushell.utils.refreshTiles = function() {
var t = sap.ushell.utils.getVisibleTiles(), l;
if (t && t.length) {
l = sap.ushell.Container.getService("LaunchPage");
t.forEach(function(T) {
var a = sap.ushell.utils.getTileObject(T);
if (a !== null) {
l.refreshTile(a);
}
});
}
}
;
sap.ushell.utils.setTilesNoVisibility = function() {
var t = sap.ushell.utils.getVisibleTiles(), l;
if ((typeof t !== "undefined") && t.length > 0) {
l = sap.ushell.Container.getService("LaunchPage");
t.forEach(function(T) {
l.setTileVisible(sap.ushell.utils.getTileObject(T),
false);
});
jQuery.sap.log.debug("Visible Tiles: " +
t.filter(function(T) {
return T.isDisplayedInViewPort;
}).length);
jQuery.sap.log.debug("NonVisible Tiles: " +
t.filter(function(T) {
return !T.isDisplayedInViewPort;
}).length);
}
}
;
sap.ushell.utils.getBasicHash = function(h) {
if (!sap.ushell.utils.validHash(h)) {
jQuery.sap.log.debug("Utils ; getBasicHash ; Got invalid
hash");
return false;
}
var u = sap.ushell.Container.getService("URLParsing")
, s = u.parseShellHash(h);
return s ? s.semanticObject + "-" + s.action : h;
}
;
sap.ushell.utils.validHash = function(h) {
return (h && h.constructor === String && jQuery.trim(h) !==
"");
}
;
sap.ushell.utils.handleTilesOpacity = function(m) {
jQuery.sap.require("sap.ui.core.theming.Parameters");
var t, c, a, C =
sap.ui.core.theming.Parameters.get("sapUshellTileBackgroundColor"), r =
this.hexToRgb(C), j, b, R, d, s, e, o, p, g, f, i, u =
sap.ushell.Container.getService("UserRecents");
if (r) {
R = "rgba(" + r.r + "," + r.g + "," + r.b + ",{0})";
a = u.getAppsUsage();
a.done(function(h) {
t = h.usageMap;
j =
jQuery('.sapUshellTile').not('.sapUshellTileFooter');
var k = m.getProperty("/groups");
m.setProperty('/animationRendered', true);
for (i = 0; i < j.length; i++) {
d = jQuery(j[i]);
s =
this.getBasicHash(d.find('.sapUshellTileBase').attr('data-targeturl'));
if (s) {
b = this.convertToRealOpacity(t[s],
h.maxUsage);
e = R.replace("{0}", b);
c = sap.ui.getCore().byId(d.attr('id'));
o = c.getBindingContext();
p = o.sPath.split('/');
g = p[2];
f = p[4];
k[g].tiles[f].rgba = e;
}
}
m.setProperty("/groups", k);
}
.bind(this));
}
}
;
sap.ushell.utils.convertToRealOpacity = function(a, m) {
var o = [1, 0.95, 0.9, 0.85, 0.8], O = Math.floor(m /
o.length), i;
if (!a) {
return o[0];
}
if (!m) {
return o[o.length - 1];
}
i = Math.floor((m - a) / O);
return i < o.length ? o[i] : o[o.length - 1];
}
;
sap.ushell.utils.getCurrentHiddenGroupIds = function(m) {
var l = sap.ushell.Container.getService("LaunchPage"), g =
m.getProperty('/groups'), h = [], G, a, b;
for (a in g) {
if (g[a].object) {
G = l.getGroupId(g[a].object);
b = g[a].isGroupVisible;
}
if (!b && G !== undefined) {
h.push(G);
}
}
return h;
}
;
sap.ushell.utils.hexToRgb = function(h) {
var i = !h || h[0] != '#' || (h.length != 4 && h.length != 7),
r;
h = !i && h.length === 4 ? '#' + h[1] + h[1] + h[2] + h[2] +
h[3] + h[3] : h;
r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);
return r ? {
r: parseInt(r[1], 16),
g: parseInt(r[2], 16),
b: parseInt(r[3], 16)
} : null;
}
;
sap.ushell.utils.getFormFactor = function() {
var s = sap.ui.Device.system;
if (s.desktop) {
return s.SYSTEMTYPE.DESKTOP;
}
if (s.tablet) {
return s.SYSTEMTYPE.TABLET;
}
if (s.phone) {
return s.SYSTEMTYPE.PHONE;
}
}
;
sap.ushell.utils.getVisibleTiles = function() {
var n = document.body.clientHeight, c =
sap.ui.getCore().byId("dashboardGroups"), N =
sap.ui.getCore().byId("viewPortContainer"), g, t, a, b, T, d, e, f, h, s =
jQuery('#shell-hdr').height(), i = [], G, I, j;
if (c && c.getGroups() && N) {
G = jQuery(c.getDomRef());
I = G ? G.is(":visible") : false;
j = c.getGroups();
for (g = 0; g < j.length; g = g + 1) {
a = j[g];
b = a.getTiles();
if (b) {
for (t = 0; t < b.length; t = t + 1) {
T = b[t];
if (!I || window.document.hidden) {
T.isDisplayedInViewPort = false;
i.push(T);
} else {
d = jQuery(T.getDomRef());
e = d.offset();
if (e) {
f = d.offset().top;
h = f + d.height();
T.isDisplayedInViewPort =
a.getVisible() && (h > s) && (f < n);
i.push(T);
}
}
}
}
}
}
return i;
}
;
sap.ushell.utils.getTileObject = function(u) {
var b = u.getBindingContext();
return b.getObject() ? b.getObject().object : null;
}
;
sap.ushell.utils.addBottomSpace = function() {
var j =
jQuery('#dashboardGroups').find('.sapUshellTileContainer:visible');
var l = j.last(), h = jQuery(".sapUshellShellHead >
div").height(), a = l.parent().height(), g =
parseInt(l.find(".sapUshellContainerTitle").css("margin-top"), 10), b =
parseInt(jQuery('.sapUshellDashboardGroupsContainer').css("padding-bottom"), 10),
n;
if (j.length === 1) {
n = 0;
} else {
n = jQuery(window).height() - h - a - g - b;
n = (n < 0) ? 0 : n;
}
jQuery('.sapUshellDashboardGroupsContainer').css("margin-
bottom", n + "px");
}
;
sap.ushell.utils.calcVisibilityModes = function(g, p) {
var i = true
, I = true
, h = sap.ushell.utils.groupHasVisibleTiles(g.tiles,
g.links);
if (!h && (!p || (g.isGroupLocked) || (g.isDefaultGroup))) {
i = false;
}
if (!h && (!p)) {
I = false;
}
return [i, I];
}
;
sap.ushell.utils.groupHasVisibleTiles = function(g, a) {
var v = false, t, b, c = !g ? [] : g, l = !a ? [] : a;
c = c.concat(l);
if (c.length === 0) {
return false;
}
for (t = 0; t < c.length; t = t + 1) {
b = c[t];
if (b.isTileIntentSupported) {
v = true;
break;
}
}
return v;
}
;
sap.ushell.utils.invokeUnfoldingArrayArguments = function(f, A) {
var b, d, p, r, t;
if (!jQuery.isArray(A[0])) {
return f.apply(this, A);
}
b = A[0];
if (b.length === 0) {
return new jQuery.Deferred().resolve([]).promise();
}
d = new jQuery.Deferred();
p = [];
r = [];
t = new jQuery.Deferred().resolve();
b.forEach(function(n, i) {
if (!jQuery.isArray(n)) {
jQuery.sap.log.error("Expected Array as nTh Argument of
multivalue invokation: first Argument must be array of array of arguments: single
valued f(p1,p2), f(p1_2,p2_2), f(p1_3,p2_3) : multivalued : f([[p1,p2],[p1_2,p2_2],
[p1_3,p2_3]]");
throw new Error("Expected Array as nTh Argument of
multivalue invokation: first Argument must be array of array of arguments: single
valued f(p1,p2), f(p1_2,p2_2), f(p1_3,p2_3) : multivalued : f([[p1,p2],[p1_2,p2_2],
[p1_3,p2_3]]");
}
var c = f.apply(this, n)
, e = new jQuery.Deferred();
c.done(function() {
var a = Array.prototype.slice.call(arguments);
r[i] = a;
e.resolve();
}).fail(e.reject.bind(e));
p.push(e.promise());
t = jQuery.when(t, e);
});
jQuery.when.apply(jQuery, p).done(function() {
d.resolve(r);
}).fail(function() {
d.reject("failure");
});
return d.promise();
}
;
sap.ushell.utils.isClientSideNavTargetResolutionEnabled =
function() {
var d = true, l;
if (jQuery.sap.storage === undefined) {
l = window.localStorage.getItem("targetresolution-client");
l = (l === false || l === "false" || l === "") ? false :
true;
} else {
l =
jQuery.sap.storage(jQuery.sap.getObject("jQuery.sap.storage.Type.local"),
"targetresolution").get("client");
}
if (l === "" || l === false ||
sap.ushell.utils.getParameterValueBoolean("sap-ushell-nav-cs") === false) {
return false;
}
return d;
}
;
sap.ushell.utils._getCurrentDate = function() {
return new Date();
}
;
sap.ushell.utils.formatDate = function(c) {
var C, n, t, d, h, m;
C = new Date(c);
n = sap.ushell.utils._getCurrentDate();
t = n.getTime() - C;
d = parseInt(t / (1000 * 60 * 60 * 24), 10);
if (d > 0) {
if (d === 1) {
return sap.ushell.resources.i18n.getText("time_day",
d);
}
return sap.ushell.resources.i18n.getText("time_days", d);
}
h = parseInt(t / (1000 * 60 * 60), 10);
if (h > 0) {
if (h === 1) {
return sap.ushell.resources.i18n.getText("time_hour",
h);
}
return sap.ushell.resources.i18n.getText("time_hours", h);
}
m = parseInt(t / (1000 * 60), 10);
if (m > 0) {
if (m === 1) {
return sap.ushell.resources.i18n.getText("time_minute",
m);
}
return sap.ushell.resources.i18n.getText("time_minutes",
m);
}
return sap.ushell.resources.i18n.getText("just_arrived");
}
;
sap.ushell.utils.toExternalWithParameters = function(s, a, p) {
var c =
sap.ushell.Container.getService("CrossApplicationNavigation"), t = {}, P = {}, i,
T, b;
t.target = {
semanticObject: s,
action: a
};
if (p && p.length > 0) {
P = {};
for (i = 0; i < p.length; i++) {
T = p[i].Key;
b = p[i].Value;
P[T] = b;
}
t.params = P;
}
c.toExternal(t);
}
;
}());
},
/*
* Copyright (c) Microsoft. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation
* files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

* datajs.js
*/
"sap/ui/thirdparty/datajs.js": function() {
(function(w, u) {
var d = w.datajs || {};
var o = w.OData || {};
if (typeof define === 'function' && define.amd) {
define('datajs', d);
define('OData', o);
} else {
w.datajs = d;
w.OData = o;
}
var c = function(p) {
if (w.ActiveXObject) {
return new w.ActiveXObject(p);
}
return null;
};
var f = function(a) {
return a !== null && a !== u;
};
var g = function(a, b) {
var i, e;
for (i = 0,
e = a.length; i < e; i++) {
if (a[i] === b) {
return true;
}
}
return false;
};
var h = function(a, b) {
return (a !== u) ? a : b;
};
var j = function(a) {
if (arguments.length === 1) {
w.setTimeout(a, 0);
return;
}
var b = Array.prototype.slice.call(arguments, 1);
w.setTimeout(function() {
a.apply(this, b);
}, 0);
};
var k = function(a, b) {
for (var e in b) {
a[e] = b[e];
}
return a;
};
var l = function(a, b) {
if (a) {
var i, e;
for (i = 0,
e = a.length; i < e; i++) {
if (b(a[i])) {
return a[i];
}
}
}
return null;
};
var m = function(a) {
return Object.prototype.toString.call(a) === "[object Array]";
};
var n = function(a) {
return Object.prototype.toString.call(a) === "[object Date]";
};
var q = function(a) {
return typeof a === "object";
};
var r = function(a) {
return parseInt(a, 10);
};
var s = function(a, b, e) {
if (a.hasOwnProperty(b)) {
a[e] = a[b];
delete a[b];
}
};
var t = function(e) {
throw e;
};
var v = function(a) {
if (a.trim) {
return a.trim();
}
return a.replace(/^\s+|\s+$/g, '');
};
var z = function(a, b) {
return (a !== u) ? a : b;
};
var A = /^([^:\/?#]+:)?(\/\/[^\/?#]*)?([^?#:]+)?(\?[^#]*)?(#.*)?/;
var B = ["scheme", "authority", "path", "query", "fragment"];
var C = function(a) {
var b = {
isAbsolute: false
};
if (a) {
var e = A.exec(a);
if (e) {
var i, p;
for (i = 0,
p = B.length; i < p; i++) {
if (e[i + 1]) {
b[B[i]] = e[i + 1];
}
}
}
if (b.scheme) {
b.isAbsolute = true;
}
}
return b;
};
var D = function(a) {
return "".concat(a.scheme || "", a.authority || "", a.path ||
"", a.query || "", a.fragment || "");
};
var E = /^\/{0,2}(?:([^@]*)@)?([^:]+)(?::{1}(\d+))?/;
var F = /%[0-9A-F]{2}/ig;
var G = function(a) {
var b = C(a);
var e = b.scheme;
var i = b.authority;
if (e) {
b.scheme = e.toLowerCase();
if (i) {
var p = E.exec(i);
if (p) {
b.authority = "//" + (p[1] ? p[1] + "@" : "") +
(p[2].toLowerCase()) + (p[3] ? ":" + p[3] : "");
}
}
}
a = D(b);
return a.replace(F, function(x) {
return x.toLowerCase();
});
};
var H = function(a, b) {
if (!b) {
return a;
}
var e = C(a);
if (e.isAbsolute) {
return a;
}
var i = C(b);
var p = {};
var x;
if (e.authority) {
p.authority = e.authority;
x = e.path;
p.query = e.query;
} else {
if (!e.path) {
x = i.path;
p.query = e.query || i.query;
} else {
if (e.path.charAt(0) === '/') {
x = e.path;
} else {
x = I(e.path, i.path);
}
p.query = e.query;
}
p.authority = i.authority;
}
p.path = J(x);
p.scheme = i.scheme;
p.fragment = e.fragment;
return D(p);
};
var I = function(a, b) {
var p = "/";
var e;
if (b) {
e = b.lastIndexOf("/");
p = b.substring(0, e);
if (p.charAt(p.length - 1) !== "/") {
p = p + "/";
}
}
return p + a;
};
var J = function(p) {
var a = "";
var b = "";
var e;
while (p) {
if (p.indexOf("..") === 0 || p.indexOf(".") === 0) {
p = p.replace(/^\.\.?\/?/g, "");
} else if (p.indexOf("/..") === 0) {
p = p.replace(/^\/\..\/?/g, "/");
e = a.lastIndexOf("/");
if (e === -1) {
a = "";
} else {
a = a.substring(0, e);
}
} else if (p.indexOf("/.") === 0) {
p = p.replace(/^\/\.\/?/g, "/");
} else {
b = p;
e = p.indexOf("/", 1);
if (e !== -1) {
b = p.substring(0, e);
}
a = a + b;
p = p.replace(b, "");
}
}
return a;
};
var K = "http://";
var L = K + "www.w3.org/";
var M = L + "1999/xhtml";
var N = L + "2000/xmlns/";
var O = L + "XML/1998/namespace";
var P = K + "www.mozilla.org/newlayout/xml/parsererror.xml";
var Q = function(a) {
var b = /(^\s)|(\s$)/;
return b.test(a);
};
var R = function(a) {
var b = /^\s*$/;
return a === null || b.test(a);
};
var S = function(a) {
while (a !== null && a.nodeType === 1) {
var b = c1(a, "space", O);
if (b === "preserve") {
return true;
} else if (b === "default") {
break;
} else {
a = a.parentNode;
}
}
return false;
};
var T = function(a) {
var b = a.nodeName;
return b == "xmlns" || b.indexOf("xmlns:") == 0;
};
var U = function(a, b, e) {
try {
a.setProperty(b, e);
} catch (_) {}
};
var V = function() {
var a = c("Msxml2.DOMDocument.3.0");
if (a) {
U(a, "ProhibitDTD", true);
U(a, "MaxElementDepth", 256);
U(a, "AllowDocumentFunction", false);
U(a, "AllowXsltScript", false);
}
return a;
};
var W = function() {
try {
var a = c("Msxml2.DOMDocument.6.0");
if (a) {
a.async = true;
}
return a;
} catch (_) {
return V();
}
};
var X = function(a) {
var b = W();
if (!b) {
return null;
}
b.loadXML(a);
var p = b.parseError;
if (p.errorCode !== 0) {
Y(p.reason, p.srcText, a);
}
return b;
};
var Y = function(e, a, b) {
if (typeof e === "string") {
e = {
message: e
};
}
;throw k(e, {
srcText: a || "",
errorXmlText: b || ""
});
};
var Z = function(a) {
var b = w.DOMParser && new w.DOMParser();
var i;
if (!b) {
i = X(a);
if (!i) {
Y("XML DOM parser not supported");
}
return i;
}
try {
i = b.parseFromString(a, "text/xml");
} catch (e) {
Y(e, "", a);
}
var p = i.documentElement;
var x = p.namespaceURI;
var y = m1(p);
if (y === "parsererror" && x === P) {
var _ = i1(p, P, "sourcetext");
var k9 = _ ? o1(_) : "";
Y(l1(p) || "", k9, a);
}
if (y === "h3" && x === M || j1(p, M, "h3")) {
var l9 = "";
var m9 = [];
var n9 = p.firstChild;
while (n9) {
if (n9.nodeType === 1) {
l9 += l1(n9) || "";
}
m9.push(n9.nextSibling);
n9 = n9.firstChild || m9.shift();
}
l9 += l1(p) || "";
Y(l9, "", a);
}
return i;
};
var $ = function(p, a) {
return p ? p + ":" + a : a;
};
var a1 = function(a, b) {
if (Q(b.data)) {
var e = d1(a, O, "space");
if (!e) {
e = v1(a.ownerDocument, O, $("xml", "space"));
t1(a, e);
}
e.value = "preserve";
}
a.appendChild(b);
return a;
};
var b1 = function(e, a) {
var b = e.attributes;
var i, p;
for (i = 0,
p = b.length; i < p; i++) {
a(b.item(i));
}
};
var c1 = function(a, b, e) {
var i = d1(a, b, e);
return i ? o1(i) : null;
};
var d1 = function(a, b, e) {
var i = a.attributes;
if (i.getNamedItemNS) {
return i.getNamedItemNS(e || null, b);
}
return i.getQualifiedItem(b, e) || null;
};
var e1 = function(a, b) {
var e = d1(a, "base", O);
return (e ? H(e.value, b) : b) || null;
};
var f1 = function(a, b) {
p1(a, false, function(e) {
if (e.nodeType === 1) {
b(e);
}
return true;
});
};
var g1 = function(a, b, p) {
var e = p.split("/");
var i, x;
for (i = 0,
x = e.length; i < x; i++) {
a = a && i1(a, b, e[i]);
}
return a || null;
};
var h1 = function(a, b, p) {
var e = p.lastIndexOf("/");
var i = p.substring(e + 1);
var x = p.substring(0, e);
var y = x ? g1(a, b, x) : a;
if (y) {
if (i.charAt(0) === "@") {
return d1(y, i.substring(1), b);
}
return i1(y, b, i);
}
return null;
};
var i1 = function(a, b, e) {
return k1(a, b, e, false);
};
var j1 = function(a, b, e) {
if (a.getElementsByTagNameNS) {
var i = a.getElementsByTagNameNS(b, e);
return i.length > 0 ? i[0] : null;
}
return k1(a, b, e, true);
};
var k1 = function(a, b, e, i) {
var p = null;
p1(a, i, function(x) {
if (x.nodeType === 1) {
var y = !b || n1(x) === b;
var _ = !e || m1(x) === e;
if (y && _) {
p = x;
}
}
return p === null;
});
return p;
};
var l1 = function(x) {
var a = null;
var b = (x.nodeType === 9 && x.documentElement) ?
x.documentElement : x;
var e = b.ownerDocument.preserveWhiteSpace === false;
var i;
p1(b, false, function(p) {
if (p.nodeType === 3 || p.nodeType === 4) {
var y = o1(p);
var _ = e || !R(y);
if (!_) {
if (i === u) {
i = S(b);
}
_ = i;
}
if (_) {
if (!a) {
a = y;
} else {
a += y;
}
}
}
return true;
});
return a;
};
var m1 = function(a) {
return a.localName || a.baseName;
};
var n1 = function(a) {
return a.namespaceURI || null;
};
var o1 = function(a) {
if (a.nodeType === 1) {
return l1(a);
}
return a.nodeValue;
};
var p1 = function(a, b, e) {
var i = [];
var p = a.firstChild;
var x = true;
while (p && x) {
x = e(p);
if (x) {
if (b && p.firstChild) {
i.push(p.firstChild);
}
p = p.nextSibling || i.shift();
}
}
};
var q1 = function(a, b, e) {
var i = a.nextSibling;
while (i) {
if (i.nodeType === 1) {
var p = !b || n1(i) === b;
var x = !e || m1(i) === e;
if (p && x) {
return i;
}
}
i = i.nextSibling;
}
return null;
};
var r1 = function() {
var i = w.document.implementation;
return (i && i.createDocument) ? i.createDocument(null, null,
null) : W();
};
var s1 = function(p, a) {
if (!m(a)) {
return t1(p, a);
}
var i, b;
for (i = 0,
b = a.length; i < b; i++) {
a[i] && t1(p, a[i]);
}
return p;
};
var t1 = function(p, a) {
if (a) {
if (typeof a === "string") {
return a1(p, z1(p.ownerDocument, a));
}
if (a.nodeType === 2) {
p.setAttributeNodeNS ? p.setAttributeNodeNS(a) :
p.setAttributeNode(a);
} else {
p.appendChild(a);
}
}
return p;
};
var u1 = function(a, b) {
var e = document.createElement('dummy');
e.setAttributeNS(a, b, '');
var i = e.attributes[0];
e.removeAttributeNode(i);
return i;
};
var v1 = function(a, b, e, i) {
var p = a.createAttributeNS && a.createAttributeNS(b, e) ||
"createNode"in a && a.createNode(2, e, b || u) || u1(b, e);
p.value = i || "";
return p;
};
var w1 = function(a, b, e, i) {
var p = a.createElementNS && a.createElementNS(b, e) ||
a.createNode(1, e, b || u);
return s1(p, i || []);
};
var x1 = function(a, b, p) {
return v1(a, N, $("xmlns", p), b);
};
var y1 = function(a, b) {
var e = "<c>" + b + "</c>";
var i = Z(e);
var p = i.documentElement;
var x = ("importNode"in a) ? a.importNode(p, true) : p;
var y = a.createDocumentFragment();
var _ = x.firstChild;
while (_) {
y.appendChild(_);
_ = _.nextSibling;
}
return y;
};
var z1 = function(a, b) {
return a.createTextNode(b);
};
var A1 = function(a, b, e, p, x) {
var y = "";
var _ = x.split("/");
var k9 = i1;
var l9 = w1;
var m9 = b;
var i, n9;
for (i = 0,
n9 = _.length; i < n9; i++) {
y = _[i];
if (y.charAt(0) === "@") {
y = y.substring(1);
k9 = d1;
l9 = v1;
}
var o9 = k9(m9, e, y);
if (!o9) {
o9 = l9(a, e, $(p, y));
t1(m9, o9);
}
m9 = o9;
}
return m9;
};
var B1 = function(a) {
var x5 = w.XMLSerializer;
if (x5) {
var b = new x5();
return b.serializeToString(a);
}
if (a.xml) {
return a.xml;
}
throw {
message: "XML serialization unsupported"
};
};
var C1 = function(a) {
var b = a.childNodes;
var i, e = b.length;
if (e === 0) {
return "";
}
var p = a.ownerDocument;
var x = p.createDocumentFragment();
var y = p.createElement("c");
x.appendChild(y);
for (i = 0; i < e; i++) {
y.appendChild(b[i]);
}
var _ = B1(x);
_ = _.substr(3, _.length - 7);
for (i = 0; i < e; i++) {
a.appendChild(y.childNodes[i]);
}
return _;
};
var D1 = function(a) {
var x = a.xml;
if (x !== u) {
return x;
}
if (w.XMLSerializer) {
var b = new w.XMLSerializer();
return b.serializeToString(a);
}
throw {
message: "XML serialization unsupported"
};
};
var E1 = function(a, b, e) {
return function() {
a[b].apply(a, arguments);
return e;
}
;
};
var F1 = function() {
this._arguments = u;
this._done = u;
this._fail = u;
this._resolved = false;
this._rejected = false;
};
F1.prototype = {
then: function(a, e) {
if (a) {
if (!this._done) {
this._done = [a];
} else {
this._done.push(a);
}
}
if (e) {
if (!this._fail) {
this._fail = [e];
} else {
this._fail.push(e);
}
}
if (this._resolved) {
this.resolve.apply(this, this._arguments);
} else if (this._rejected) {
this.reject.apply(this, this._arguments);
}
return this;
},
resolve: function() {
if (this._done) {
var i, a;
for (i = 0,
a = this._done.length; i < a; i++) {
this._done[i].apply(null, arguments);
}
this._done = u;
this._resolved = false;
this._arguments = u;
} else {
this._resolved = true;
this._arguments = arguments;
}
},
reject: function() {
if (this._fail) {
var i, a;
for (i = 0,
a = this._fail.length; i < a; i++) {
this._fail[i].apply(null, arguments);
}
this._fail = u;
this._rejected = false;
this._arguments = u;
} else {
this._rejected = true;
this._arguments = arguments;
}
},
promise: function() {
var a = {};
a.then = E1(this, "then", a);
return a;
}
};
var G1 = function() {
if (w.jQuery && w.jQuery.Deferred) {
return new w.jQuery.Deferred();
} else {
return new F1();
}
};
var H1 = function(a, b) {
var e = ((a && a.__metadata) || {}).type;
return e || (b ? b.type : null);
};
var I1 = "Edm.";
var J1 = I1 + "Binary";
var K1 = I1 + "Boolean";
var L1 = I1 + "Byte";
var M1 = I1 + "DateTime";
var N1 = I1 + "DateTimeOffset";
var O1 = I1 + "Decimal";
var P1 = I1 + "Double";
var Q1 = I1 + "Guid";
var R1 = I1 + "Int16";
var S1 = I1 + "Int32";
var T1 = I1 + "Int64";
var U1 = I1 + "SByte";
var V1 = I1 + "Single";
var W1 = I1 + "String";
var X1 = I1 + "Time";
var Y1 = I1 + "Geography";
var Z1 = Y1 + "Point";
var $1 = Y1 + "LineString";
var _1 = Y1 + "Polygon";
var a2 = Y1 + "Collection";
var b2 = Y1 + "MultiPolygon";
var c2 = Y1 + "MultiLineString";
var d2 = Y1 + "MultiPoint";
var e2 = I1 + "Geometry";
var f2 = e2 + "Point";
var g2 = e2 + "LineString";
var h2 = e2 + "Polygon";
var i2 = e2 + "Collection";
var j2 = e2 + "MultiPolygon";
var k2 = e2 + "MultiLineString";
var l2 = e2 + "MultiPoint";
var m2 = "Point";
var n2 = "LineString";
var o2 = "Polygon";
var p2 = "MultiPoint";
var q2 = "MultiLineString";
var r2 = "MultiPolygon";
var s2 = "GeometryCollection";
var t2 = [W1, S1, T1, K1, P1, V1, M1, N1, X1, O1, Q1, L1, R1, U1,
J1];
var u2 = [e2, f2, g2, h2, i2, j2, k2, l2];
var v2 = [Y1, Z1, $1, _1, a2, b2, c2, d2];
var w2 = function(a, b) {
if (!a) {
return null;
}
if (m(a)) {
var i, e, p;
for (i = 0,
e = a.length; i < e; i++) {
p = w2(a[i], b);
if (p) {
return p;
}
}
return null;
} else {
if (a.dataServices) {
return w2(a.dataServices.schema, b);
}
return b(a);
}
};
var x2 = function(a, b) {
if (a === 0) {
a = "";
} else {
a = "." + B2(a.toString(), 3);
}
if (b > 0) {
if (a === "") {
a = ".000";
}
a += B2(b.toString(), 4);
}
return a;
};
var y2 = function(a) {
return "\/Date(" + a.getTime() + ")\/";
};
var z2 = function(a) {
if (typeof a === "string") {
return a;
}
var b = K2(a);
var e = C2(a.__offset);
if (b && e !== "Z") {
a = new Date(a.valueOf());
var i = o3(e);
var p = a.getUTCHours() + (i.d * i.h);
var x = a.getMinutes() + (i.d * i.m);
a.setUTCHours(p, x);
} else if (!b) {
e = "";
}
var y = a.getUTCFullYear();
var _ = a.getUTCMonth() + 1;
var k9 = "";
if (y <= 0) {
y = -(y - 1);
k9 = "-";
}
var ms = x2(a.getUTCMilliseconds(), a.__ns);
return k9 + B2(y, 4) + "-" + B2(_, 2) + "-" +
B2(a.getUTCDate(), 2) + "T" + B2(a.getUTCHours(), 2) + ":" + B2(a.getUTCMinutes(),
2) + ":" + B2(a.getUTCSeconds(), 2) + ms + e;
};
var A2 = function(a) {
var b = a.ms;
var e = "";
if (b < 0) {
e = "-";
b = -b;
}
var i = Math.floor(b / 86400000);
b -= 86400000 * i;
var p = Math.floor(b / 3600000);
b -= 3600000 * p;
var x = Math.floor(b / 60000);
b -= 60000 * x;
var y = Math.floor(b / 1000);
b -= y * 1000;
return e + "P" + B2(i, 2) + "DT" + B2(p, 2) + "H" + B2(x, 2) +
"M" + B2(y, 2) + x2(b, a.ns) + "S";
};
var B2 = function(a, b, e) {
var i = a.toString(10);
while (i.length < b) {
if (e) {
i += "0";
} else {
i = "0" + i;
}
}
return i;
};
var C2 = function(a) {
return (!a || a === "Z" || a === "+00:00" || a === "-00:00") ?
"Z" : a;
};
var D2 = function(a) {
if (typeof a === "string") {
var e = a.indexOf(")", 10);
if (a.indexOf("Collection(") === 0 && e > 0) {
return a.substring(11, e);
}
}
return null;
};
var E2 = function(a, b, e, P3, i, p) {
return i.request(a, function(x) {
try {
if (x.headers) {
f3(x.headers);
}
if (x.data === u && x.statusCode !== 204) {
P3.read(x, p);
}
} catch (y) {
if (y.request === u) {
y.request = a;
}
if (y.response === u) {
y.response = x;
}
e(y);
return;
}
try {
b(x.data, x);
} catch (y) {
y.bIsSuccessHandlerError = true;
throw y;
}
}, e);
};
var F2 = function(a) {
return J2(a) && m(a.__batchRequests);
};
var G2 = /Collection\((.*)\)/;
var H2 = function(a, b) {
var e = a && a.results || a;
return !!e && (I2(b)) || (!b && m(e) && !J2(e[0]));
};
var I2 = function(a) {
return G2.test(a);
};
var J2 = function(a) {
return !!a && q(a) && !m(a) && !n(a);
};
var K2 = function(a) {
return (a.__edmType === "Edm.DateTimeOffset" || (!a.__edmType
&& a.__offset));
};
var L2 = function(a) {
if (!a && !J2(a)) {
return false;
}
var b = a.__metadata || {};
var e = a.__deferred || {};
return !b.type && !!e.uri;
};
var M2 = function(a) {
return J2(a) && a.__metadata && "uri"in a.__metadata;
};
var N2 = function(a, b) {
var e = a && a.results || a;
return m(e) && ((!I2(b)) && (J2(e[0])));
};
var O2 = function(a) {
return g(v2, a);
};
var P2 = function(a) {
return g(u2, a);
};
var Q2 = function(a) {
if (!a && !J2(a)) {
return false;
}
var b = a.__metadata;
var e = a.__mediaresource;
return !b && !!e && !!e.media_src;
};
var R2 = function(a) {
return n(a) || typeof a === "string" || typeof a === "number"
|| typeof a === "boolean";
};
var S2 = function(a) {
return g(t2, a);
};
var T2 = function(a, p) {
if (L2(a)) {
return "deferred";
}
if (M2(a)) {
return "entry";
}
if (N2(a)) {
return "feed";
}
if (p && p.relationship) {
if (a === null || a === u || !N2(a)) {
return "entry";
}
return "feed";
}
return null;
};
var U2 = function(p, a) {
return l(p, function(b) {
return b.name === a;
});
};
var V2 = function(a, b, e) {
return (a) ? w2(b, function(y6) {
return c3(a, y6, e);
}) : null;
};
var W2 = function(e, a) {
return l(e, function(b) {
return b.name === a;
});
};
var X2 = function(a, b) {
return V2(a, b, "complexType");
};
var Y2 = function(a, b) {
return V2(a, b, "entityType");
};
var Z2 = function(a) {
return w2(a, function(y6) {
return l(y6.entityContainer, function(b) {
return g3(b.isDefaultEntityContainer);
});
});
};
var $2 = function(a, b) {
return V2(a, b, "entityContainer");
};
var _2 = function(a, b) {
return l(a, function(e) {
return e.name === b;
});
};
var a3 = function(a, b) {
var e = null;
if (a) {
var p = a.relationship;
var x = w2(b, function(y6) {
var _ = b3(y6["namespace"], p);
var k9 = y6.association;
if (_ && k9) {
var i, l9;
for (i = 0,
l9 = k9.length; i < l9; i++) {
if (k9[i].name === _) {
return k9[i];
}
}
}
});
if (x) {
var y = x.end[0];
if (y.role !== a.toRole) {
y = x.end[1];
}
e = y.type;
}
}
return e;
};
var b3 = function(a, b) {
if (b.indexOf(a) === 0 && b.charAt(a.length) === ".") {
return b.substr(a.length + 1);
}
return null;
};
var c3 = function(a, y6, b) {
if (a && y6) {
var e = b3(y6["namespace"], a);
if (e) {
return l(y6[b], function(i) {
return i.name === e;
});
}
}
return null;
};
var d3 = function(a, b) {
if (a === b) {
return a;
}
var e = a.split(".");
var p = b.split(".");
var x = (e.length >= p.length) ? e.length : p.length;
for (var i = 0; i < x; i++) {
var y = e[i] && r(e[i]);
var _ = p[i] && r(p[i]);
if (y > _) {
return a;
}
if (y < _) {
return b;
}
}
};
var e3 = {
"accept": "Accept",
"content-type": "Content-Type",
"dataserviceversion": "DataServiceVersion",
"maxdataserviceversion": "MaxDataServiceVersion"
};
var f3 = function(a) {
for (var b in a) {
var e = b.toLowerCase();
var i = e3[e];
if (i && b !== i) {
var p = a[b];
delete a[b];
a[i] = p;
}
}
};
var g3 = function(p) {
if (typeof p === "boolean") {
return p;
}
return typeof p === "string" && p.toLowerCase() === "true";
};
var h3 = /^(-?\d{4,})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?
(?:\.(\d+))?(.*)$/;
var i3 = function(a, b, e) {
var p = h3.exec(a);
var i = (p) ? C2(p[8]) : null;
if (!p || (!b && i !== "Z")) {
if (e) {
return null;
}
throw {
message: "Invalid date/time value"
};
}
var y = r(p[1]);
if (y <= 0) {
y++;
}
var x = p[7];
var _ = 0;
if (!x) {
x = 0;
} else {
if (x.length > 7) {
if (e) {
return null;
}
throw {
message: "Cannot parse date/time value to given
precision."
};
}
_ = B2(x.substring(3), 4, true);
x = B2(x.substring(0, 3), 3, true);
x = r(x);
_ = r(_);
}
var k9 = r(p[4]);
var l9 = r(p[5]);
var m9 = r(p[6]) || 0;
if (i !== "Z") {
var n9 = o3(i);
var o9 = -(n9.d);
k9 += n9.h * o9;
l9 += n9.m * o9;
}
var p9 = new Date();
p9.setUTCFullYear(y, r(p[2]) - 1, r(p[3]));
p9.setUTCHours(k9, l9, m9, x);
if (isNaN(p9.valueOf())) {
if (e) {
return null;
}
throw {
message: "Invalid date/time value"
};
}
if (b) {
p9.__edmType = "Edm.DateTimeOffset";
p9.__offset = i;
}
if (_) {
p9.__ns = _;
}
return p9;
};
var j3 = function(p, a) {
return i3(p, false, a);
};
var k3 = function(p, a) {
return i3(p, true, a);
};
var l3 = /^([+-])?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?
(?:(\d+)M)?(?:(\d+)(?:\.(\d+))?S)?)?/;
var m3 = function(a) {
l3.test(a);
};
var n3 = function(a) {
var p = l3.exec(a);
if (p === null) {
throw {
message: "Invalid duration value."
};
}
var y = p[2] || "0";
var b = p[3] || "0";
var e = r(p[4] || 0);
var i = r(p[5] || 0);
var x = r(p[6] || 0);
var _ = parseFloat(p[7] || 0);
if (y !== "0" || b !== "0") {
throw {
message: "Unsupported duration value."
};
}
var ms = p[8];
var ns = 0;
if (!ms) {
ms = 0;
} else {
if (ms.length > 7) {
throw {
message: "Cannot parse duration value to given
precision."
};
}
ns = B2(ms.substring(3), 4, true);
ms = B2(ms.substring(0, 3), 3, true);
ms = r(ms);
ns = r(ns);
}
ms += _ * 1000 + x * 60000 + i * 3600000 + e * 86400000;
if (p[1] === "-") {
ms = -ms;
}
var k9 = {
ms: ms,
__edmType: "Edm.Time"
};
if (ns) {
k9.ns = ns;
}
return k9;
};
var o3 = function(a) {
var b = a.substring(0, 1);
b = (b === "+") ? 1 : -1;
var e = r(a.substring(1));
var i = r(a.substring(a.indexOf(":") + 1));
return {
d: b,
h: e,
m: i
};
};
var p3 = function(a, P3, b) {
if (!a.method) {
a.method = "GET";
}
if (!a.headers) {
a.headers = {};
} else {
f3(a.headers);
}
if (a.headers.Accept === u) {
a.headers.Accept = P3.accept;
}
if (f(a.data) && a.body === u) {
P3.write(a, b);
}
if (!f(a.headers.MaxDataServiceVersion)) {
a.headers.MaxDataServiceVersion = P3.maxDataServiceVersion
|| "1.0";
}
if (a.async === u) {
a.async = true;
}
};
var q3 = function(i, a, b) {
if (i && typeof i === "object") {
for (var e in i) {
var p = i[e];
var x = q3(p, e, b);
x = b(e, x, a);
if (x !== p) {
if (p === u) {
delete i[e];
} else {
i[e] = x;
}
}
}
}
return i;
};
var r3 = function(i, a) {
return a("", q3(i, "", a));
};
var s3 = 0;
var t3 = function(a) {
if (a.method && a.method !== "GET") {
return false;
}
return true;
};
var u3 = function(a) {
var i = w.document.createElement("IFRAME");
i.style.display = "none";
var b = a.replace(/&/g, "&amp;").replace(/"/g,
"&quot;").replace(/\</g, "&lt;");
var e = "<html><head><script type=\"text/javascript\" src=\"" +
b + "\"><\/script><\/head><body><\/body><\/html>";
var p = w.document.getElementsByTagName("BODY")[0];
p.appendChild(i);
B3(i, e);
return i;
};
var v3 = function() {
if (w.XMLHttpRequest) {
return new w.XMLHttpRequest();
}
var a;
if (w.ActiveXObject) {
try {
return new w.ActiveXObject("Msxml2.XMLHTTP.6.0");
} catch (_) {
try {
return new w.ActiveXObject("Msxml2.XMLHTTP.3.0");
} catch (e) {
a = e;
}
}
} else {
a = {
message: "XMLHttpRequest not supported"
};
}
throw a;
};
var w3 = function(a) {
return a.indexOf("http://") === 0 || a.indexOf("https://") ===
0 || a.indexOf("file://") === 0;
};
var x3 = function(a) {
if (!w3(a)) {
return true;
}
var b = w.location;
var e = b.protocol + "//" + b.host + "/";
return (a.indexOf(e) === 0);
};
var y3 = function(a, b) {
try {
delete w[a];
} catch (e) {
w[a] = u;
if (b === s3 - 1) {
s3 -= 1;
}
}
};
var z3 = function(i) {
if (i) {
B3(i, "");
i.parentNode.removeChild(i);
}
return null;
};
var A3 = function(x, a) {
var b = x.getAllResponseHeaders();
if (!b) {
var D3 = x.getResponseHeader("Content-Type");
var e = x.getResponseHeader("Content-Length");
if (D3)
a["Content-Type"] = D3;
if (e)
a["Content-Length"] = e;
} else {
b = b.split(/\r?\n/);
var i, p;
for (i = 0,
p = b.length; i < p; i++) {
if (b[i]) {
var y = b[i].match(/([^:]*):\s*((?:\s*\S+)+)?\s*/);
a[y[1]] = y[2];
}
}
}
};
var B3 = function(i, a) {
var b = (i.contentWindow) ? i.contentWindow.document :
i.contentDocument.document;
b.open();
b.write(a);
b.close();
};
o.defaultHttpClient = {
callbackParameterName: "$callback",
formatQueryString: "$format=json",
enableJsonpCallback: false,
request: function(a, b, e) {
var i = {};
var x = null;
var p = false;
var y;
i.abort = function() {
y = z3(y);
if (p) {
return;
}
p = true;
if (x) {
x.abort();
x = null;
}
e({
message: "Request aborted"
});
}
;
var _ = function() {
y = z3(y);
if (!p) {
p = true;
x = null;
e({
message: "Request timed out"
});
}
};
var k9;
var l9 = a.requestUri;
var m9 = h(a.enableJsonpCallback,
this.enableJsonpCallback);
var n9 = h(a.callbackParameterName,
this.callbackParameterName);
var o9 = h(a.formatQueryString, this.formatQueryString);
if (!m9 || x3(l9)) {
x = v3();
var p9 = function() {
if (p || x === null || x.readyState !== 4) {
return;
}
var x9 = x.statusText;
var y9 = x.status;
if (y9 === 1223) {
y9 = 204;
x9 = "No Content";
}
var z9 = [];
A3(x, z9);
var A9 = {
requestUri: l9,
statusCode: y9,
statusText: x9,
headers: z9,
body: x.responseText
};
p = true;
x = null;
if (y9 >= 200 && y9 <= 299) {
b(A9);
} else {
f3(A9.headers);
e({
message: "HTTP request failed",
request: a,
response: A9
});
}
};
if (a.user && a.password) {
x.open(a.method || "GET", l9, a.async, a.user,
a.password);
} else {
x.open(a.method || "GET", l9, a.async);
}
if (a.withCredentials) {
x.withCredentials = true;
}
if (a.headers) {
for (k9 in a.headers) {
x.setRequestHeader(k9, a.headers[k9]);
}
}
if (a.timeoutMS) {
x.timeout = a.timeoutMS;
x.ontimeout = _;
}
if (a.async || (!a.async && a.async !== false)) {
x.onreadystatechange = p9;
}
x.send(typeof a.body !== 'undefined' ? a.body : null);
if (!a.async) {
p9();
}
} else {
if (!t3(a)) {
throw {
message: "Request is not local and cannot be
done through JSONP."
};
}
var q9 = s3;
s3 += 1;
var r9 = q9.toString();
var s9 = false;
var t9;
k9 = "handleJSONP_" + r9;
w[k9] = function(x9) {
y = z3(y);
if (!p) {
s9 = true;
w.clearTimeout(t9);
y3(k9, q9);
if (w.ActiveXObject && !w.DOMParser) {
x9 = w.JSON.parse(w.JSON.stringify(x9));
}
j(b, {
body: x9,
statusCode: 200,
headers: {
"Content-Type": "application/json"
}
});
}
}
;
var u9 = (a.timeoutMS) ? a.timeoutMS : 120000;
t9 = w.setTimeout(_, u9);
var v9 = n9 + "=parent." + k9;
if (this.formatQueryString) {
v9 += "&" + o9;
}
var w9 = l9.indexOf("?");
if (w9 === -1) {
l9 = l9 + "?" + v9;
} else if (w9 === l9.length - 1) {
l9 = l9 + v9;
} else {
l9 = l9 + "&" + v9;
}
y = u3(l9);
}
return i;
}
};
var C3 = "3.0";
var D3 = function(a) {
if (!a) {
return null;
}
var b = a.split(";");
var p = {};
var i, e;
for (i = 1,
e = b.length; i < e; i++) {
var x = b[i].split("=");
p[v(x[0])] = x[1];
}
return {
mediaType: v(b[0]),
properties: p
};
};
var E3 = function(D3) {
if (!D3) {
return u;
}
var a = D3.mediaType;
var p;
for (p in D3.properties) {
a += ";" + p + "=" + D3.properties[p];
}
return a;
};
var F3 = function(D3, a, b, P3) {
var e = {};
k(e, b);
k(e, {
contentType: D3,
dataServiceVersion: a,
handler: P3
});
return e;
};
var G3 = function(a, b, e) {
if (!a) {
return;
}
var i = a.headers;
if (!i[b]) {
i[b] = e;
}
};
var H3 = function(a, b) {
if (a) {
var e = a.headers;
var i = e["DataServiceVersion"];
e["DataServiceVersion"] = i ? d3(i, b) : b;
}
};
var I3 = function(a, b) {
var e = a.headers;
return (e && e[b]) || u;
};
var J3 = function(a) {
return D3(I3(a, "Content-Type"));
};
var K3 = /^\s?(\d+\.\d+);?.*$/;
var L3 = function(a) {
var b = I3(a, "DataServiceVersion");
if (b) {
var e = K3.exec(b);
if (e && e.length) {
return e[1];
}
}
};
var M3 = function(P3, a) {
return P3.accept.indexOf(a.mediaType) >= 0;
};
var N3 = function(P3, p, a, b) {
if (!a || !a.headers) {
return false;
}
var e = J3(a);
var i = L3(a) || "";
var x = a.body;
if (!f(x) || !x) {
return false;
}
if (M3(P3, e)) {
var y = F3(e, i, b, P3);
y.response = a;
a.data = p(P3, x, y);
return a.data !== u;
}
return false;
};
var O3 = function(P3, a, b, e) {
if (!b || !b.headers) {
return false;
}
var i = J3(b);
var p = L3(b);
if (!i || M3(P3, i)) {
var x = F3(i, p, e, P3);
x.request = b;
b.body = a(P3, b.data, x);
if (b.body !== u) {
H3(b, x.dataServiceVersion || "1.0");
G3(b, "Content-Type", E3(x.contentType));
G3(b, "MaxDataServiceVersion",
P3.maxDataServiceVersion);
return true;
}
}
return false;
};
var P3 = function(p, a, b, e) {
return {
accept: b,
maxDataServiceVersion: e,
read: function(i, x) {
return N3(this, p, i, x);
},
write: function(i, x) {
return O3(this, a, i, x);
}
};
};
var Q3 = function(P3, b) {
return b;
};
var R3 = function(P3, a) {
if (f(a)) {
return a.toString();
} else {
return u;
}
};
o.textHandler = P3(Q3, R3, "text/plain", C3);
var S3 = K + "www.opengis.net";
var T3 = S3 + "/gml";
var U3 = S3 + "/def/crs/EPSG/0/";
var V3 = "gml";
var W3 = function(a, b, e) {
var i = {
type: a
};
i[b] = e;
return i;
};
var X3 = function(a) {
if (m(a) && a.length >= 2) {
var b = a[0];
a[0] = a[1];
a[1] = b;
}
return a;
};
var Y3 = function(a, b, e, i, p, x) {
var y = Z3(a, e, i, p, x);
return W3(b, "coordinates", y);
};
var Z3 = function(a, b, e, i, p) {
var x = [];
f1(a, function(y) {
if (n1(y) !== T3) {
return;
}
var _ = m1(y);
if (_ === b) {
var k9 = i1(y, T3);
if (k9) {
var l9 = i(k9, p);
if (l9) {
x.push(l9);
}
}
return;
}
if (_ === e) {
f1(y, function(k9) {
if (n1(k9) !== T3) {
return;
}
var l9 = i(k9, p);
if (l9) {
x.push(l9);
}
});
}
});
return x;
};
var $3 = function(a, i) {
var b = Z3(a, "geometryMember", "geometryMembers", m4, i);
return W3(s2, "geometries", b);
};
var _3 = function(a, i) {
return W3(n2, "coordinates", f4(a, i));
};
var a4 = function(a, i) {
return Y3(a, q2, "curveMember", "curveMembers", f4, i);
};
var b4 = function(a, i) {
return Y3(a, p2, "pointMember", "pointMembers", g4, i);
};
var c4 = function(a, i) {
return Y3(a, r2, "surfaceMember", "surfaceMembers", i4, i);
};
var d4 = function(a, i) {
return W3(m2, "coordinates", g4(a, i));
};
var e4 = function(a, i) {
return W3(o2, "coordinates", i4(a, i));
};
var f4 = function(a, i) {
var b = [];
f1(a, function(e) {
var p = n1(e);
if (p !== T3) {
return;
}
var x = m1(e);
if (x === "posList") {
b = k4(e, i);
return;
}
if (x === "pointProperty") {
b.push(h4(e, i));
return;
}
if (x === "pos") {
b.push(l4(e, i));
return;
}
});
return b;
};
var g4 = function(a, i) {
var p = i1(a, T3, "pos");
return p ? l4(p, i) : [];
};
var h4 = function(a, i) {
var p = i1(a, T3, "Point");
return p ? g4(p, i) : [];
};
var i4 = function(a, i) {
var b = [];
var e = false;
f1(a, function(p) {
if (n1(p) !== T3) {
return;
}
var x = m1(p);
if (x === "exterior") {
e = true;
b.unshift(j4(p, i));
return;
}
if (x === "interior") {
b.push(j4(p, i));
return;
}
});
if (!e && b.length > 0) {
b.unshift([[]]);
}
return b;
};
var j4 = function(a, i) {
var b = [];
f1(a, function(e) {
if (n1(e) !== T3 || m1(e) !== "LinearRing") {
return;
}
b = f4(e, i);
});
return b;
};
var k4 = function(a, b) {
var e = l4(a, false);
var p = e.length;
if (p % 2 !== 0) {
throw {
message: "GML posList element has an uneven number of
numeric values"
};
}
var x = [];
for (var i = 0; i < p; i += 2) {
var y = e.slice(i, i + 2);
x.push(b ? X3(y) : y);
}
return x;
};
var l4 = function(a, i) {
var b = [];
var e = " \t\r\n";
var p = l1(a);
if (p) {
var x = p.length;
var y = 0;
var _ = 0;
while (_ <= x) {
if (e.indexOf(p.charAt(_)) !== -1) {
var k9 = p.substring(y, _);
if (k9) {
b.push(parseFloat(k9));
}
y = _ + 1;
}
_++;
}
}
return i ? X3(b) : b;
};
var m4 = function(a, i) {
var b = m1(a);
var e;
switch (b) {
case "Point":
e = d4;
break;
case "Polygon":
e = e4;
break;
case "LineString":
e = _3;
break;
case "MultiPoint":
e = b4;
break;
case "MultiCurve":
e = a4;
break;
case "MultiSurface":
e = c4;
break;
case "MultiGeometry":
e = $3;
break;
default:
throw {
message: "Unsupported element: " + b,
element: a
};
}
var p = e(a, i);
var x = c1(a, "srsName", T3) || c1(a, "srsName");
if (x) {
if (x.indexOf(U3) !== 0) {
throw {
message: "Unsupported srs name: " + x,
element: a
};
}
var y = x.substring(U3.length);
if (y) {
p.crs = {
type: "name",
properties: {
name: "EPSG:" + y
}
};
}
}
return p;
};
var n4 = function(a, b, e, i) {
var p;
switch (e) {
case m2:
p = v4;
break;
case n2:
p = w4;
break;
case o2:
p = x4;
break;
case p2:
p = z4;
break;
case q2:
p = A4;
break;
case r2:
p = B4;
break;
case s2:
p = D4;
break;
default:
return null;
}
var x = p(a, b, i);
var y = b.crs;
if (y) {
if (y.type === "name") {
var _ = y.properties;
var k9 = _ && _.name;
if (k9 && k9.indexOf("ESPG:") === 0 && k9.length > 5) {
var l9 = k9.substring(5);
var m9 = v1(a, null, "srsName", V3 + l9);
t1(x, m9);
}
}
}
return x;
};
var o4 = function(a, b, e) {
return w1(a, T3, $(V3, b), e);
};
var p4 = function(a, b, i) {
var p = m(b) ? b : [];
p = i ? X3(p) : p;
return o4(a, "pos", p.join(" "));
};
var q4 = function(a, b, e, p) {
var x = o4(a, b);
if (m(e)) {
var i, y;
for (i = 0,
y = e.length; i < y; i++) {
t1(x, p4(a, e[i], p));
}
if (y === 0) {
t1(x, o4(a, "posList"));
}
}
return x;
};
var r4 = function(a, b, i) {
return o4(a, "Point", p4(a, b, i));
};
var s4 = function(a, b, i) {
return q4(a, "LineString", b, i);
};
var t4 = function(a, b, e, i) {
var p = o4(a, b);
if (m(e) && e.length > 0) {
var x = q4(a, "LinearRing", e, i);
t1(p, x);
}
return p;
};
var u4 = function(a, b, e) {
var p = b && b.length;
var x = o4(a, "Polygon");
if (m(b) && p > 0) {
t1(x, t4(a, "exterior", b[0], e));
var i;
for (i = 1; i < p; i++) {
t1(x, t4(a, "interior", b[i], e));
}
}
return x;
};
var v4 = function(a, b, i) {
return r4(a, b.coordinates, i);
};
var w4 = function(a, b, i) {
return s4(a, b.coordinates, i);
};
var x4 = function(a, b, i) {
return u4(a, b.coordinates, i);
};
var y4 = function(a, b, e, p, x, y) {
var _ = p && p.length;
var k9 = o4(a, b);
if (m(p) && _ > 0) {
var l9 = o4(a, e);
var i;
for (i = 0; i < _; i++) {
t1(l9, x(a, p[i], y));
}
t1(k9, l9);
}
return k9;
};
var z4 = function(a, b, i) {
return y4(a, "MultiPoint", "pointMembers", b.coordinates, r4,
i);
};
var A4 = function(a, b, i) {
return y4(a, "MultiCurve", "curveMembers", b.coordinates, s4,
i);
};
var B4 = function(a, b, i) {
return y4(a, "MultiSurface", "surfaceMembers", b.coordinates,
u4, i);
};
var C4 = function(a, b, i) {
return n4(a, b, b.type, i);
};
var D4 = function(a, b, i) {
return y4(a, "MultiGeometry", "geometryMembers", b.geometries,
C4, i);
};
var E4 = "application/xml";
var F4 = K + "schemas.microsoft.com/ado/";
var G4 = F4 + "2007/08/dataservices";
var H4 = F4 + "2007/06/edmx";
var I4 = F4 + "2006/04/edm";
var J4 = F4 + "2007/05/edm";
var K4 = F4 + "2008/01/edm";
var L4 = F4 + "2008/09/edm";
var M4 = F4 + "2009/08/edm";
var N4 = F4 + "2009/11/edm";
var O4 = K + "docs.oasis-open.org/odata/ns/edm";
var P4 = G4;
var Q4 = G4 + "/metadata";
var R4 = G4 + "/related/";
var S4 = G4 + "/scheme";
var T4 = "d";
var U4 = "m";
var V4 = function(a, b) {
var e = {
name: m1(a),
value: a.value
};
e[b ? "namespaceURI" : "namespace"] = n1(a);
return e;
};
var W4 = function(a, b) {
var e = [];
var p = [];
var i, x;
var y = a.attributes;
for (i = 0,
x = y.length; i < x; i++) {
var _ = y[i];
if (n1(_) !== N) {
e.push(V4(_, b));
}
}
var k9 = a.firstChild;
while (k9 != null) {
if (k9.nodeType === 1) {
p.push(W4(k9, b));
}
k9 = k9.nextSibling;
}
;var l9 = {
name: m1(a),
value: l1(a),
attributes: e,
children: p
};
l9[b ? "namespaceURI" : "namespace"] = n1(a);
return l9;
};
var X4 = function(a) {
return n1(a) === P4 && m1(a) === "element";
};
var Y4 = function(a, e) {
return {
type: a,
extensions: e
};
};
var Z4 = function(a) {
if (i1(a, T3)) {
return e2;
}
var b = i1(a, P4);
if (!b) {
return W1;
}
if (X4(b)) {
var e = q1(b, P4);
if (e && X4(e)) {
return "Collection()";
}
}
return null;
};
var $4 = function(a) {
var b = null;
var i = false;
var e = [];
b1(a, function(p) {
var x = n1(p);
var y = m1(p);
var _ = o1(p);
if (x === Q4) {
if (y === "null") {
i = (_.toLowerCase() === "true");
return;
}
if (y === "type") {
b = _;
return;
}
}
if (x !== O && x !== N) {
e.push(V4(p, true));
return;
}
});
return {
type: (!b && i ? W1 : b),
isNull: i,
extensions: e
};
};
var _4 = function(a) {
if (n1(a) !== P4) {
return null;
}
;var p = m1(a);
var b = $4(a);
var e = b.isNull;
var i = b.type;
var x = Y4(i, b.extensions);
var y = e ? null : a5(a, i, x);
return {
name: p,
value: y,
metadata: x
};
};
var a5 = function(a, p, b) {
if (!p) {
p = Z4(a);
b.type = p;
}
var i = O2(p);
if (i || P2(p)) {
return b5(a, p, i);
}
if (S2(p)) {
return c5(a, p);
}
if (I2(p)) {
return e5(a, p, b);
}
return d5(a, p, b);
};
var b5 = function(a, p, i) {
var b = i1(a, T3);
var e = m4(b, i);
e.__metadata = {
type: p
};
return e;
};
var c5 = function(a, p) {
var b = o1(a) || "";
switch (p) {
case K1:
return g3(b);
case J1:
case O1:
case Q1:
case T1:
case W1:
return b;
case L1:
case R1:
case S1:
case U1:
return r(b);
case P1:
case V1:
return parseFloat(b);
case X1:
return n3(b);
case M1:
return j3(b);
case N1:
return k3(b);
}
;return b;
};
var d5 = function(a, p, b) {
var e = {
__metadata: {
type: p
}
};
f1(a, function(i) {
var x = _4(i);
var y = x.name;
b.properties = b.properties || {};
b.properties[y] = x.metadata;
e[y] = x.value;
});
return e;
};
var e5 = function(a, p, b) {
var i = [];
var e = b.elements = [];
var x = D2(p);
f1(a, function(y) {
if (X4(y)) {
var _ = $4(y);
var k9 = _.extensions;
var l9 = _.type || x;
var m9 = Y4(l9, k9);
var n9 = a5(y, l9, m9);
i.push(n9);
e.push(m9);
}
});
return {
__metadata: {
type: p === "Collection()" ? null : p
},
results: i
};
};
var f5 = function(x, b) {
if (n1(x) === P4) {
b = e1(x, b);
var a = m1(x);
if (a === "links") {
return g5(x, b);
}
if (a === "uri") {
return h5(x, b);
}
}
return u;
};
var g5 = function(a, b) {
var e = [];
f1(a, function(i) {
if (m1(i) === "uri" && n1(i) === P4) {
e.push(h5(i, b));
}
});
return {
results: e
};
};
var h5 = function(a, b) {
var e = l1(a) || "";
return {
uri: H(e, b)
};
};
var i5 = function(a, e) {
if (e === e2 || e === Y1) {
return a && a.type;
}
if (e === f2 || e === Z1) {
return m2;
}
if (e === g2 || e === $1) {
return n2;
}
if (e === h2 || e === _1) {
return o2;
}
if (e === i2 || e === a2) {
return s2;
}
if (e === j2 || e === b2) {
return r2;
}
if (e === k2 || e === c2) {
return q2;
}
if (e === l2 || e === d2) {
return p2;
}
return null;
};
var j5 = function(a, b, e) {
return w1(a, Q4, $(U4, b), e);
};
var k5 = function(a, b, e) {
return v1(a, Q4, $(U4, b), e);
};
var l5 = function(a, b, e) {
return w1(a, P4, $(T4, b), e);
};
var m5 = function(a, b) {
if (b === M1 || b === N1 || n(a)) {
return z2(a);
}
if (b === X1) {
return A2(a);
}
return a.toString();
};
var n5 = function(a, b) {
return {
element: a,
dsv: b
};
};
var o5 = function(a, b, e, i) {
var p = e ? k5(a, "type", e) : null;
var x = l5(a, b, p);
return s1(x, i);
};
var p5 = function(a, b, e, i) {
var p = m5(e, i);
var x = o5(a, b, i, p);
return n5(x, "1.0");
};
var q5 = function(a, b, e, i) {
var p = k5(a, "null", "true");
var x = o5(a, b, e, p);
var y = X2(e, i) ? "2.0" : "1.0";
return n5(x, y);
};
var r5 = function(a, b, e, p, x, y, _) {
var k9 = D2(p);
var l9 = m(e) ? e : e.results;
var m9 = p ? {
type: k9
} : {};
m9.properties = x.properties;
var n9 = o5(a, b, k9 ? p : null);
var i, o9;
for (i = 0,
o9 = l9.length; i < o9; i++) {
var p9 = l9[i];
var q9 = u5(a, "element", p9, m9, y, _);
t1(n9, q9.element);
}
return n5(n9, "3.0");
};
var s5 = function(a, b, e, i, p, x, y) {
var _ = o5(a, b, i);
var k9 = p.properties || {};
var l9 = X2(i, y) || {};
var m9 = "1.0";
for (var n9 in e) {
if (n9 !== "__metadata") {
var o9 = e[n9];
var p9 = U2(l9.property, n9);
var q9 = k9[n9] || {};
var r9 = u5(a, n9, o9, q9, p9, y);
m9 = d3(m9, r9.dsv);
t1(_, r9.element);
}
}
;return n5(_, m9);
};
var t5 = function(a, b, e, i, p) {
var x = i5(e, i);
var y = n4(a, e, x, p);
var _ = o5(a, b, i, y);
return n5(_, "3.0");
};
var u5 = function(a, b, e, i, p, x) {
var y = H1(e, i, p);
if (!y) {
y = H1(e, p);
}
if (R2(e)) {
return p5(a, b, e, y);
}
var _ = O2(y);
if (_ || P2(y)) {
return t5(a, b, e, y, _);
}
if (H2(e, y)) {
return r5(a, b, e, y, i, p, x);
}
if (Q2(e)) {
return null;
}
var k9 = T2(e, p);
if (k9 !== null) {
return null;
}
if (e === null) {
return q5(a, b, y);
}
return s5(a, b, e, y, i, p, x);
};
var v5 = function(a) {
if (a && q(a)) {
var b = r1();
return t1(b, l5(b, "uri", a.uri));
}
};
var w5 = function(P3, a) {
if (a) {
var b = Z(a);
var e = i1(b);
if (e) {
return f5(e);
}
}
};
var x5 = function(P3, a, b) {
var e = b.contentType = b.contentType || D3(E4);
if (e && e.mediaType === E4) {
return B1(v5(a));
}
return u;
};
o.xmlHandler = P3(w5, x5, E4, C3);
var y5 = "a";
var z5 = L + "2005/Atom";
var A5 = L + "2007/app";
var B5 = G4 + "/edit-media/";
var C5 = G4 + "/mediaresource/";
var D5 = G4 + "/relatedlinks/";
var E5 = ["application/atom+xml", "application/atomsvc+xml",
"application/xml"];
var F5 = E5[0];
var G5 = [z5, A5, O, N];
var H5 = {
SyndicationAuthorEmail: "author/email",
SyndicationAuthorName: "author/name",
SyndicationAuthorUri: "author/uri",
SyndicationContributorEmail: "contributor/email",
SyndicationContributorName: "contributor/name",
SyndicationContributorUri: "contributor/uri",
SyndicationPublished: "published",
SyndicationRights: "rights",
SyndicationSummary: "summary",
SyndicationTitle: "title",
SyndicationUpdated: "updated"
};
var I5 = function(p) {
return H5[p] || p;
};
var J5 = function(a) {
return !(g(G5, a));
};
var K5 = function(a, e, b, p, i) {
i = i || "";
var x = a["FC_TargetPath" + i];
if (!x) {
return null;
}
var y = a["FC_SourcePath" + i];
var _ = I5(x);
var k9 = p ? p + (y ? "/" + y : "") : y;
var l9 = k9 && Y5(b, e, k9);
var m9 = a["FC_NsUri" + i] || null;
var n9 = a["FC_NsPrefix" + i] || null;
var o9 = a["FC_KeepInContent" + i] || "";
if (x !== _) {
m9 = z5;
n9 = y5;
}
return {
contentKind: a["FC_ContentKind" + i],
keepInContent: o9.toLowerCase() === "true",
nsPrefix: n9,
nsURI: m9,
propertyPath: k9,
propertyType: l9,
entryPath: _
};
};
var L5 = function(e, a, b) {
var p = [];
while (e) {
var x = e.FC_SourcePath;
var y = K5(e, e, a);
if (y) {
b(y);
}
var _ = e.property || [];
var i, k9;
for (i = 0,
k9 = _.length; i < k9; i++) {
var l9 = _[i];
var m9 = 0;
var n9 = "";
while (y = K5(l9, e, a, l9.name, n9)) {
b(y);
m9++;
n9 = "_" + m9;
}
;
}
e = Y2(e.baseType, a);
}
return p;
};
var M5 = function(a) {
var e = [];
b1(a, function(b) {
var i = n1(b);
if (J5(i)) {
e.push(V4(b, true));
}
});
return e;
};
var N5 = function(a) {
return W4(a, true);
};
var O5 = function(a, b, e) {
var i = n1(a);
var p = m1(a);
if (i === A5 && p === "service") {
return j6(a, b);
}
if (i === z5) {
if (p === "feed") {
return S5(a, b, e);
}
if (p === "entry") {
return Z5(a, b, e);
}
}
};
var P5 = function(a, b) {
var e = [];
var i = {
extensions: e
};
b1(a, function(p) {
var x = m1(p);
var y = n1(p);
var _ = o1(p);
if (y === null) {
if (x === "title" || x === "metadata") {
i[x] = _;
return;
}
if (x === "target") {
i.target = H(_, e1(a, b));
return;
}
}
if (J5(y)) {
e.push(V4(p, true));
}
});
return i;
};
var Q5 = function(a, b, p) {
var e = p.actions = p.actions || [];
e.push(P5(a, b));
};
var R5 = function(a, b, p) {
var e = p.functions = p.functions || [];
e.push(P5(a, b));
};
var S5 = function(a, b, e) {
var i = M5(a);
var p = {
feed_extensions: i
};
var x = [];
var y = {
__metadata: p,
results: x
};
b = e1(a, b);
f1(a, function(_) {
var k9 = n1(_);
var l9 = m1(_);
if (k9 === Q4) {
if (l9 === "count") {
y.__count = parseInt(l1(_));
return;
}
if (l9 === "action") {
Q5(_, b, p);
return;
}
if (l9 === "function") {
R5(_, b, p);
return;
}
}
if (J5(k9)) {
i.push(W4(_));
return;
}
;if (l9 === "entry") {
x.push(Z5(_, b, e));
return;
}
if (l9 === "link") {
T5(_, y, b);
return;
}
if (l9 === "id") {
p.uri = H(l1(_), b);
p.uri_extensions = M5(_);
return;
}
if (l9 === "title") {
p.title = l1(_) || "";
p.title_extensions = M5(_);
return;
}
});
return y;
};
var T5 = function(a, b, e) {
var i = U5(a, e);
var p = i.href;
var x = i.rel;
var y = i.extensions;
var _ = b.__metadata;
if (x === "next") {
b.__next = p;
_.next_extensions = y;
return;
}
if (x === "self") {
_.self = p;
_.self_extensions = y;
return;
}
};
var U5 = function(a, b) {
b = e1(a, b);
var e = [];
var i = {
extensions: e,
baseURI: b
};
b1(a, function(p) {
var x = n1(p);
var y = m1(p);
var _ = p.value;
if (y === "href") {
i.href = H(_, b);
return;
}
if (y === "type" || y === "rel") {
i[y] = _;
return;
}
if (J5(x)) {
e.push(V4(p, true));
}
});
if (!i.href) {
throw {
error: "href attribute missing on link element",
element: a
};
}
return i;
};
var V5 = function(p, a) {
if (p.indexOf('/') === -1) {
return a[p];
} else {
var b = p.split('/');
var i, e;
for (i = 0,
e = b.length; i < e; i++) {
if (a === null) {
return u;
}
a = a[b[i]];
if (a === u) {
return a;
}
}
return a;
}
};
var W5 = function(p, a, b, e) {
var x;
if (p.indexOf('/') === -1) {
a[p] = b;
x = p;
} else {
var y = p.split('/');
var i, _;
for (i = 0,
_ = (y.length - 1); i < _; i++) {
var k9 = a[y[i]];
if (k9 === u) {
k9 = {};
a[y[i]] = k9;
} else if (k9 === null) {
return;
}
a = k9;
}
x = y[i];
a[x] = b;
}
if (e) {
var l9 = a.__metadata = a.__metadata || {};
var m9 = l9.properties = l9.properties || {};
var n9 = m9[x] = m9[x] || {};
n9.type = e;
}
};
var X5 = function(a, b, e) {
var p = a.propertyPath;
if (a.keepInContent || V5(p, e) === null) {
return;
}
var x = h1(b, a.nsURI, a.entryPath);
if (!x) {
return;
}
var i = a.propertyType;
var y;
if (a.contentKind === "xhtml") {
y = C1(x);
} else {
y = c5(x, i || "Edm.String");
}
W5(p, e, y, i);
};
var Y5 = function(a, b, p) {
var e = p.split("/");
var i, x;
while (b) {
var y = b;
for (i = 0,
x = e.length; i < x; i++) {
var _ = y.property;
if (!_) {
break;
}
var k9 = U2(_, e[i]);
if (!k9) {
break;
}
var l9 = k9.type;
if (!l9 || S2(l9)) {
return l9 || null;
}
y = X2(l9, a);
if (!y) {
return null;
}
}
b = Y2(b.baseType, a);
}
return null;
};
var Z5 = function(a, b, e) {
var i = {};
var p = {
__metadata: i
};
var x = c1(a, "etag", Q4);
if (x) {
i.etag = x;
}
b = e1(a, b);
f1(a, function(_) {
var k9 = n1(_);
var l9 = m1(_);
if (k9 === z5) {
if (l9 === "id") {
$5(_, i, b);
return;
}
if (l9 === "category") {
_5(_, i);
return;
}
if (l9 === "content") {
a6(_, p, i, b);
return;
}
if (l9 === "link") {
b6(_, p, i, b, e);
return;
}
return;
}
if (k9 === Q4) {
if (l9 === "properties") {
i6(_, p, i);
return;
}
if (l9 === "action") {
Q5(_, b, i);
return;
}
if (l9 === "function") {
R5(_, b, i);
return;
}
}
});
var y = Y2(i.type, e);
L5(y, e, function(_) {
X5(_, a, p);
});
return p;
};
var $5 = function(a, e, b) {
e.uri = H(l1(a), e1(a, b));
e.uri_extensions = M5(a);
};
var _5 = function(a, e) {
if (c1(a, "scheme") === S4) {
if (e.type) {
throw {
message: "Invalid AtomPub document: multiple
category elements defining the entry type were encounterd withing an entry",
element: a
};
}
var b = [];
b1(a, function(i) {
var p = n1(i);
var x = m1(i);
if (!p) {
if (x !== "scheme" && x !== "term") {
b.push(V4(i, true));
}
return;
}
if (J5(p)) {
b.push(V4(i, true));
}
});
e.type = c1(a, "term");
e.type_extensions = b;
}
};
var a6 = function(a, e, b, i) {
var p = c1(a, "src");
var x = c1(a, "type");
if (p) {
if (!x) {
throw {
message: "Invalid AtomPub document: content element
must specify the type attribute if the src attribute is also specified",
element: a
};
}
b.media_src = H(p, e1(a, i));
b.content_type = x;
}
f1(a, function(y) {
if (p) {
throw {
message: "Invalid AtomPub document: content element
must not have child elements if the src attribute is specified",
element: a
};
}
if (n1(y) === Q4 && m1(y) === "properties") {
i6(y, e, b);
}
});
};
var b6 = function(a, e, b, i, p) {
var x = U5(a, i);
var y = x.rel;
var _ = x.href;
var k9 = x.extensions;
if (y === "self") {
b.self = _;
b.self_link_extensions = k9;
return;
}
if (y === "edit") {
b.edit = _;
b.edit_link_extensions = k9;
return;
}
if (y === "edit-media") {
b.edit_media = x.href;
b.edit_media_extensions = k9;
h6(x, b);
return;
}
if (y.indexOf(B5) === 0) {
e6(x, e, b);
return;
}
if (y.indexOf(C5) === 0) {
f6(x, e, b);
return;
}
if (y.indexOf(R4) === 0) {
d6(a, x, e, b, p);
return;
}
if (y.indexOf(D5) === 0) {
c6(x, b);
return;
}
};
var c6 = function(a, e) {
var p = a.rel.substring(D5.length);
e.properties = e.properties || {};
var b = e.properties[p] = e.properties[p] || {};
b.associationuri = a.href;
b.associationuri_extensions = a.extensions;
};
var d6 = function(a, b, e, i, p) {
var x;
var y = i1(a, Q4, "inline");
if (y) {
var _ = i1(y);
var k9 = e1(y, b.baseURI);
x = _ ? O5(_, k9, p) : null;
} else {
x = {
__deferred: {
uri: b.href
}
};
}
var l9 = b.rel.substring(R4.length);
e[l9] = x;
i.properties = i.properties || {};
var m9 = i.properties[l9] = i.properties[l9] || {};
m9.extensions = b.extensions;
};
var e6 = function(a, e, b) {
var p = a.rel.substring(B5.length);
var i = g6(p, e, b);
var x = i.value;
var y = i.metadata;
var _ = a.href;
x.edit_media = _;
x.content_type = a.type;
y.edit_media_extensions = a.extensions;
x.media_src = x.media_src || _;
y.media_src_extensions = y.media_src_extensions || [];
h6(a, x);
};
var f6 = function(a, e, b) {
var p = a.rel.substring(C5.length);
var i = g6(p, e, b);
var x = i.value;
var y = i.metadata;
x.media_src = a.href;
y.media_src_extensions = a.extensions;
x.content_type = a.type;
};
var g6 = function(a, e, b) {
b.properties = b.properties || {};
var i = b.properties[a];
var p = e[a] && e[a].__mediaresource;
if (!p) {
p = {};
e[a] = {
__mediaresource: p
};
b.properties[a] = i = {};
}
return {
value: p,
metadata: i
};
};
var h6 = function(a, b) {
var e = a.extensions;
var i, p;
for (i = 0,
p = e.length; i < p; i++) {
if (e[i].namespaceURI === Q4 && e[i].name === "etag") {
b.media_etag = e[i].value;
e.splice(i, 1);
return;
}
}
};
var i6 = function(a, p, b) {
f1(a, function(e) {
var i = _4(e);
if (i) {
var x = i.name;
var y = b.properties = b.properties || {};
y[x] = i.metadata;
p[x] = i.value;
}
});
};
var j6 = function(a, b) {
var e = [];
var i = [];
b = e1(a, b);
f1(a, function(p) {
if (n1(p) === A5 && m1(p) === "workspace") {
e.push(k6(p, b));
return;
}
i.push(W4(p));
});
if (e.length === 0) {
throw {
message: "Invalid AtomPub service document: No
workspace element found.",
element: a
};
}
return {
workspaces: e,
extensions: i
};
};
var k6 = function(a, b) {
var e = [];
var i = [];
var p = u;
b = e1(a, b);
f1(a, function(x) {
var y = n1(x);
var _ = m1(x);
if (y === z5) {
if (_ === "title") {
if (p !== u) {
throw {
message: "Invalid AtomPub service document:
workspace has more than one child title element",
element: x
};
}
p = l1(x);
return;
}
}
if (y === A5) {
if (_ === "collection") {
e.push(l6(x, b));
}
return;
}
i.push(N5(x));
});
return {
title: p || "",
collections: e,
extensions: i
};
};
var l6 = function(a, b) {
var e = c1(a, "href");
if (!e) {
throw {
message: "Invalid AtomPub service document: collection
has no href attribute",
element: a
};
}
b = e1(a, b);
e = H(e, e1(a, b));
var i = [];
var p = u;
f1(a, function(x) {
var y = n1(x);
var _ = m1(x);
if (y === z5) {
if (_ === "title") {
if (p !== u) {
throw {
message: "Invalid AtomPub service document:
collection has more than one child title element",
element: x
};
}
p = l1(x);
}
return;
}
if (y !== A5) {
i.push(N5(a));
}
});
if (!p) {
throw {
message: "Invalid AtomPub service document: collection
has no title element",
element: a
};
}
return {
title: p,
href: e,
extensions: i
};
};
var m6 = function(a, b, e) {
return w1(a, z5, $(y5, b), e);
};
var n6 = function(a, b, e) {
return v1(a, null, b, e);
};
var o6 = function(p) {
if (p.childNodes.length > 0) {
return false;
}
var a = true;
var b = p.attributes;
var i, e;
for (i = 0,
e = b.length; i < e && a; i++) {
var x = b[i];
a = a && T(x) || (n1(x) == Q4 && m1(x) === "type");
}
return a;
};
var p6 = function(a, b, e, i, p) {
var x = null;
var y = null;
var _ = null;
var k9 = "";
if (e !== "deferred") {
x = n6(a, "type", "application/atom+xml;type=" + e);
y = j5(a, "inline");
if (i) {
k9 = i.__metadata && i.__metadata.uri || "";
_ = t6(a, i, p) || s6(a, i, p);
t1(y, _.element);
}
} else {
k9 = i.__deferred.uri;
}
;var l9 = m6(a, "link", [n6(a, "href", k9), n6(a, "rel", H(b,
R4)), x, y]);
return n5(l9, _ ? _.dsv : "1.0");
};
var q6 = function(a, b, e, i, p, x) {
if (Q2(e)) {
return null;
}
var y = u5(a, b, e, i, p, x);
if (!y) {
var _ = T2(e, p);
y = p6(a, b, _, e, x);
}
return y;
};
var r6 = function(a, e, b, i) {
var p = g1(b, P4, i.propertyPath);
var x = p && d1(p, "null", Q4);
var y;
var _ = "1.0";
if (x && x.value === "true") {
return _;
}
if (p) {
y = l1(p) || "";
if (!i.keepInContent) {
_ = "2.0";
var k9 = p.parentNode;
var l9 = k9;
k9.removeChild(p);
while (l9 !== b && o6(l9)) {
k9 = l9.parentNode;
k9.removeChild(l9);
l9 = k9;
}
}
}
var m9 = A1(a, e, i.nsURI, i.nsPrefix, i.entryPath);
if (m9.nodeType === 2) {
m9.value = y;
return _;
}
var n9 = i.contentKind;
s1(m9, [n9 && v1(a, null, "type", n9), n9 === "xhtml" ? y1(a,
y) : y]);
return _;
};
var s6 = function(a, b, e) {
var p = b.__metadata || {};
var i = p.properties || {};
var x = p.etag;
var y = p.uri;
var _ = p.type;
var k9 = Y2(_, e);
var l9 = j5(a, "properties");
var m9 = m6(a, "entry", [m6(a, "author", m6(a, "name")), x &&
k5(a, "etag", x), y && m6(a, "id", y), _ && m6(a, "category", [n6(a, "term", _),
n6(a, "scheme", S4)]), m6(a, "content", [n6(a, "type", "application/xml"), l9])]);
var n9 = "1.0";
for (var o9 in b) {
if (o9 !== "__metadata") {
var p9 = i[o9] || {};
var q9 = k9 && (U2(k9.property, o9) ||
U2(k9.navigationProperty, o9));
var r9 = q6(a, o9, b[o9], p9, q9, e);
if (r9) {
var s9 = r9.element;
var t9 = (n1(s9) === z5) ? m9 : l9;
t1(t9, s9);
n9 = d3(n9, r9.dsv);
}
}
}
;L5(k9, e, function(u9) {
var v9 = r6(a, m9, l9, u9);
n9 = d3(n9, v9);
});
return n5(m9, n9);
};
var t6 = function(a, b, e) {
var p = m(b) ? b : b.results;
if (!p) {
return null;
}
var x = "1.0";
var y = m6(a, "feed");
var i, _;
for (i = 0,
_ = p.length; i < _; i++) {
var k9 = s6(a, p[i], e);
t1(y, k9.element);
x = d3(x, k9.dsv);
}
return n5(y, x);
};
var u6 = function(a, b) {
if (a) {
var e = N2(a) && t6 || q(a) && s6;
if (e) {
var i = r1();
var p = e(i, a, b);
if (p) {
var x = p.element;
s1(x, [x1(i, Q4, U4), x1(i, P4, T4)]);
return n5(t1(i, x), p.dsv);
}
}
}
return null;
};
var v6 = function(P3, a, b) {
if (a) {
var e = Z(a);
var i = i1(e);
if (i) {
return O5(i, null, b.metadata);
}
}
};
var w6 = function(P3, a, b) {
var e = b.contentType = b.contentType || D3(F5);
if (e && e.mediaType === F5) {
var i = u6(a, b.metadata);
if (i) {
b.dataServiceVersion = d3(b.dataServiceVersion ||
"1.0", i.dsv);
return B1(i.element);
}
}
};
o.atomHandler = P3(v6, w6, E5.join(","), C3);
var x6 = function(a, e, b, i) {
return {
attributes: a,
elements: e,
text: b || false,
ns: i
};
};
var y6 = {
elements: {
Annotations: x6(["Target", "Qualifier"], ["Annotation*",
"TypeAnnotation*", "ValueAnnotation*"]),
Annotation: x6(["Term"], ["Record", "Collection"]),
Association: x6(["Name"], ["End*", "ReferentialConstraint",
"TypeAnnotation*", "ValueAnnotation*"]),
AssociationSet: x6(["Name", "Association"], ["End*",
"TypeAnnotation*", "ValueAnnotation*"]),
Binary: x6(null, null, true),
Bool: x6(null, null, true),
Collection: x6(null, ["String*", "Int*", "Float*",
"Decimal*", "Bool*", "DateTime*", "DateTimeOffset*", "Guid*", "Binary*", "Time*",
"Collection*", "Record*"]),
CollectionType: x6(["ElementType", "Nullable",
"DefaultValue", "MaxLength", "FixedLength", "Precision", "Scale", "Unicode",
"Collation", "SRID"]["CollectionType",
"ReferenceType",
"RowType",
"TypeRef"]),
ComplexType: x6(["Name", "BaseType", "Abstract"],
["Property*", "TypeAnnotation*", "ValueAnnotation*"]),
DateTime: x6(null, null, true),
DateTimeOffset: x6(null, null, true),
Decimal: x6(null, null, true),
DefiningExpression: x6(null, null, true),
Dependent: x6(["Role"], ["PropertyRef*"]),
Documentation: x6(null, null, true),
End: x6(["Type", "Role", "Multiplicity", "EntitySet"],
["OnDelete"]),
EntityContainer: x6(["Name", "Extends"], ["EntitySet*",
"AssociationSet*", "FunctionImport*", "TypeAnnotation*", "ValueAnnotation*"]),
EntitySet: x6(["Name", "EntityType"], ["TypeAnnotation*",
"ValueAnnotation*"]),
EntityType: x6(["Name", "BaseType", "Abstract",
"OpenType"], ["Key", "Property*", "NavigationProperty*", "TypeAnnotation*",
"ValueAnnotation*"]),
EnumType: x6(["Name", "UnderlyingType", "IsFlags"],
["Member*"]),
Float: x6(null, null, true),
Function: x6(["Name", "ReturnType"], ["Parameter*",
"DefiningExpression", "ReturnType", "TypeAnnotation*", "ValueAnnotation*"]),
FunctionImport: x6(["Name", "ReturnType", "EntitySet",
"IsSideEffecting", "IsComposable", "IsBindable", "EntitySetPath"], ["Parameter*",
"ReturnType", "TypeAnnotation*", "ValueAnnotation*"]),
Guid: x6(null, null, true),
Int: x6(null, null, true),
Key: x6(null, ["PropertyRef*"]),
LabeledElement: x6(["Name"], ["Path", "String", "Int",
"Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid", "Binary", "Time",
"Collection", "Record", "LabeledElement", "Null"]),
Member: x6(["Name", "Value"]),
NavigationProperty: x6(["Name", "Relationship", "ToRole",
"FromRole", "ContainsTarget"], ["TypeAnnotation*", "ValueAnnotation*"]),
Null: x6(null, null),
OnDelete: x6(["Action"]),
Path: x6(null, null, true),
Parameter: x6(["Name", "Type", "Mode", "Nullable",
"DefaultValue", "MaxLength", "FixedLength", "Precision", "Scale", "Unicode",
"Collation", "ConcurrencyMode", "SRID"], ["CollectionType", "ReferenceType",
"RowType", "TypeRef", "TypeAnnotation*", "ValueAnnotation*"]),
Principal: x6(["Role"], ["PropertyRef*"]),
Property: x6(["Name", "Type", "Nullable", "DefaultValue",
"MaxLength", "FixedLength", "Precision", "Scale", "Unicode", "Collation",
"ConcurrencyMode", "CollectionKind", "SRID"], ["CollectionType", "ReferenceType",
"RowType", "TypeAnnotation*", "ValueAnnotation*"]),
PropertyRef: x6(["Name"]),
PropertyValue: x6(["PropertyPath", "Property", "Path",
"String", "Int", "Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid",
"Binary", "Time"], ["Path", "String", "Int", "Float", "Decimal", "Bool",
"DateTime", "DateTimeOffset", "Guid", "Binary", "Time", "Collection", "Record",
"LabeledElement", "Null"]),
Record: x6(["Type"], ["PropertyValue*"]),
ReferenceType: x6(["Type"]),
ReferentialConstraint: x6(null, ["Principal",
"Dependent"]),
ReturnType: x6(["ReturnType", "Type", "EntitySet"],
["CollectionType", "ReferenceType", "RowType"]),
RowType: x6(["Property*"]),
String: x6(null, null, true),
Schema: x6(["Namespace", "Alias"], ["Using*",
"EntityContainer*", "EntityType*", "Association*", "ComplexType*", "Function*",
"ValueTerm*", "Annotations*"]),
Time: x6(null, null, true),
TypeAnnotation: x6(["Term", "Qualifier"],
["PropertyValue*"]),
TypeRef: x6(["Type", "Nullable", "DefaultValue",
"MaxLength", "FixedLength", "Precision", "Scale", "Unicode", "Collation", "SRID"]),
Using: x6(["Namespace", "Alias"]),
ValueAnnotation: x6(["Term", "Qualifier", "Path", "String",
"Int", "Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid", "Binary",
"Time"], ["Path", "String", "Int", "Float", "Decimal", "Bool", "DateTime",
"DateTimeOffset", "Guid", "Binary", "Time", "Collection", "Record",
"LabeledElement", "Null"]),
ValueTerm: x6(["Name", "Type"], ["TypeAnnotation*",
"ValueAnnotation*"]),
Edmx: x6(["Version"], ["DataServices", "Reference*",
"AnnotationsReference*"], false, H4),
DataServices: x6(null, ["Schema*"], false, H4)
}
};
var z6 = ["m:FC_ContentKind", "m:FC_KeepInContent",
"m:FC_NsPrefix", "m:FC_NsUri", "m:FC_SourcePath", "m:FC_TargetPath"];
y6.elements.Property.attributes =
y6.elements.Property.attributes.concat(z6);
y6.elements.EntityType.attributes =
y6.elements.EntityType.attributes.concat(z6);
y6.elements.Edmx = {
attributes: ["Version"],
elements: ["DataServices"],
ns: H4
};
y6.elements.DataServices = {
elements: ["Schema*"],
ns: H4
};

y6.elements.EntityContainer.attributes.push("m:IsDefaultEntityContainer");
y6.elements.Property.attributes.push("m:MimeType");
y6.elements.FunctionImport.attributes.push("m:HttpMethod");
y6.elements.FunctionImport.attributes.push("m:IsAlwaysBindable");
y6.elements.EntityType.attributes.push("m:HasStream");
y6.elements.DataServices.attributes = ["m:DataServiceVersion",
"m:MaxDataServiceVersion"];
var A6 = function(a) {
if (!a) {
return a;
}
if (a.length > 1) {
var b = a.substr(0, 2);
if (b === b.toUpperCase()) {
return a;
}
return a.charAt(0).toLowerCase() + a.substr(1);
}
return a.charAt(0).toLowerCase();
};
var B6 = function(p, a) {
if (a === "Documentation") {
return {
isArray: true,
propertyName: "documentation"
};
}
var e = p.elements;
if (!e) {
return null;
}
var i, b;
for (i = 0,
b = e.length; i < b; i++) {
var x = e[i];
var y = false;
if (x.charAt(x.length - 1) === "*") {
y = true;
x = x.substr(0, x.length - 1);
}
if (a === x) {
var _ = A6(x);
return {
isArray: y,
propertyName: _
};
}
}
return null;
};
var C6 = /^(m:FC_.*)_[0-9]+$/;
var D6 = function(a) {
return a === I4 || a === J4 || a === K4 || a === L4 || a === M4
|| a === N4 || a === O4
};
var E6 = function(e) {
var a = m1(e);
var b = n1(e);
var i = y6.elements[a];
if (!i) {
return null;
}
if (i.ns) {
if (b !== i.ns) {
return null;
}
} else if (!D6(b)) {
return null;
}
var p = {};
var x = [];
var y = i.attributes || [];
b1(e, function(_) {
var a = m1(_);
var b = n1(_);
var k9 = _.value;
if (b === N) {
return;
}
var l9 = null;
var m9 = false;
if (D6(b) || b === null) {
l9 = "";
} else if (b === Q4) {
l9 = "m:";
}
if (l9 !== null) {
l9 += a;
var n9 = C6.exec(l9);
if (n9) {
l9 = n9[1];
}
if (g(y, l9)) {
m9 = true;
p[A6(a)] = k9;
}
}
if (!m9) {
x.push(V4(_));
}
});
f1(e, function(_) {
var a = m1(_);
var k9 = B6(i, a);
if (k9) {
if (k9.isArray) {
var l9 = p[k9.propertyName];
if (!l9) {
l9 = [];
p[k9.propertyName] = l9;
}
l9.push(E6(_));
} else {
p[k9.propertyName] = E6(_);
}
} else {
x.push(W4(_));
}
});
if (i.text) {
p.text = l1(e);
}
if (x.length) {
p.extensions = x;
}
return p;
};
var F6 = function(P3, a) {
var b = Z(a);
var e = i1(b);
return E6(e) || u;
};
o.metadataHandler = P3(F6, null, E4, C3);
var G6 = "o";
var H6 = "f";
var I6 = "p";
var J6 = "c";
var K6 = "s";
var L6 = "l";
var M6 = "odata";
var N6 = M6 + ".";
var O6 = "@" + N6 + "bind";
var P6 = N6 + "metadata";
var Q6 = N6 + "navigationLinkUrl";
var R6 = N6 + "type";
var S6 = {
readLink: "self",
editLink: "edit",
nextLink: "__next",
mediaReadLink: "media_src",
mediaEditLink: "edit_media",
mediaContentType: "content_type",
mediaETag: "media_etag",
count: "__count",
media_src: "mediaReadLink",
edit_media: "mediaEditLink",
content_type: "mediaContentType",
media_etag: "mediaETag",
url: "uri"
};
var T6 = function(a) {
if (a.indexOf(".") > 0) {
var b = a.indexOf("@");
var e = b > -1 ? a.substring(0, b) : null;
var i = a.substring(b + 1);
return {
target: e,
name: i,
isOData: i.indexOf(N6) === 0
};
}
return null;
};
var U6 = function(a, b, e, i, p) {
return (J2(b) && b[R6]) || (e && e[a + "@" + R6]) || (i &&
i.type) || (a3(i, p)) || null;
};
var V6 = function(a, b) {
if (b) {
return U2(b.property, a) || U2(b.navigationProperty, a);
}
return null;
};
var W6 = function(a) {
return J2(a) && a.hasOwnProperty(N6 + "id");
};
var X6 = function(a, b, e) {
if (!!b[a + "@" + Q6] || (e && e.relationship)) {
return true;
}
var i = m(b[a]) ? b[a][0] : b[a];
return W6(i);
};
var Y6 = function(a) {
return S2(a) || O2(a) || P2(a);
};
var Z6 = function(a, b, e, i, p) {
for (var x in a) {
if (x.indexOf(".") > 0 && x.charAt(0) !== "#") {
var y = T6(x);
if (y) {
var _ = y.name;
var k9 = y.target;
var l9 = null;
var m9 = null;
if (k9) {
l9 = V6(k9, i);
m9 = U6(k9, a[k9], a, l9, p);
}
if (y.isOData) {
$6(_, k9, m9, a[x], a, b, e);
} else {
b[x] = a[x];
}
}
}
}
return b;
};
5;
var $6 = function(a, b, e, i, p, x, y) {
var _ = a.substring(N6.length);
switch (_) {
case "navigationLinkUrl":
c7(_, b, e, i, p, x, y);
return;
case "nextLink":
case "count":
a7(_, b, i, x, y);
return;
case "mediaReadLink":
case "mediaEditLink":
case "mediaContentType":
case "mediaETag":
b7(_, b, e, i, x, y);
return;
default:
_6(_, b, i, x, y);
return;
}
};
var _6 = function(a, b, e, i, p) {
var x = i.__metadata = i.__metadata || {};
var y = S6[a] || a;
if (a === "editLink") {
x.uri = H(e, p);
x[y] = x.uri;
return;
}
if (a === "readLink" || a === "associationLinkUrl") {
e = H(e, p);
}
if (b) {
var _ = x.properties = x.properties || {};
var k9 = _[b] = _[b] || {};
if (a === "type") {
k9[y] = k9[y] || e;
return;
}
k9[y] = e;
return;
}
x[y] = e;
};
var a7 = function(a, b, e, i, p) {
var x = S6[a];
var y = b ? i[b] : i;
y[x] = (a === "nextLink") ? H(e, p) : e;
};
var b7 = function(a, b, e, i, p, x) {
var y = p.__metadata = p.__metadata || {};
var _ = S6[a];
if (a === "mediaReadLink" || a === "mediaEditLink") {
i = H(i, x);
}
if (b) {
var k9 = y.properties = y.properties || {};
var l9 = k9[b] = k9[b] || {};
l9.type = l9.type || e;
p.__metadata = y;
p[b] = p[b] || {
__mediaresource: {}
};
p[b].__mediaresource[_] = i;
return;
}
y[_] = i;
};
var c7 = function(a, b, e, i, p, x, y) {
var _ = x.__metadata = x.__metadata || {};
var k9 = _.properties = _.properties || {};
var l9 = k9[b] = k9[b] || {};
var m9 = H(i, y);
if (p.hasOwnProperty(b)) {
l9.navigationLinkUrl = m9;
return;
}
x[b] = {
__deferred: {
uri: m9
}
};
l9.type = l9.type || e;
};
var d7 = function(a, b, e, i, p, x, y) {
if (typeof a === "string") {
return e7(a, b, y);
}
if (!Y6(b)) {
if (m(a)) {
return f7(a, b, e, i, x, y);
}
if (J2(a)) {
return g7(a, b, e, i, x, y);
}
}
return a;
};
var e7 = function(a, p, b) {
switch (p) {
case X1:
return n3(a);
case M1:
return j3(a, false);
case N1:
return k3(a, false);
}
if (b) {
return j3(a, true) || k3(a, true) || a;
}
return a;
};
var f7 = function(a, p, b, e, x, y) {
var _ = D2(p);
var k9 = [];
var l9 = [];
var i, m9;
for (i = 0,
m9 = a.length; i < m9; i++) {
var n9 = U6(null, a[i]) || _;
var o9 = {
type: n9
};
var p9 = d7(a[i], n9, o9, e, null, x, y);
if (!Y6(n9) && !R2(a[i])) {
k9.push(o9);
}
l9.push(p9);
}
if (k9.length > 0) {
b.elements = k9;
}
return {
__metadata: {
type: p
},
results: l9
};
};
var g7 = function(a, p, b, e, i, x) {
var y = i7(a, p, e, i, x);
var _ = y.__metadata;
var k9 = _.properties;
if (k9) {
b.properties = k9;
delete _.properties;
}
return y;
};
var h7 = function(a, p, b, e, i) {
if (m(a)) {
return k7(a, p, b, e, i);
}
if (J2(a)) {
return i7(a, p, b, e, i);
}
return null;
};
var i7 = function(a, b, e, i, p) {
var x = a[R6] || b;
var y = Y2(x, i) || X2(x, i);
var _ = {
type: x
};
var k9 = {
__metadata: _
};
var l9 = {};
for (var m9 in a) {
if (m9.indexOf("#") === 0) {
j7(m9.substring(1), a[m9], k9, e, i);
} else {
if (m9.indexOf(".") === -1) {
if (!_.properties) {
_.properties = l9;
}
var n9 = a[m9];
var o9 = V6(m9, y);
var p9 = X6(m9, a, o9);
var q9 = U6(m9, n9, a, o9, i);
var r9 = l9[m9] = l9[m9] || {
type: q9
};
k9[m9] = p9 ? h7(n9, q9, e, i, p) : d7(n9, q9, r9,
e, o9, i, p);
}
}
}
return Z6(a, k9, e, y, i);
};
var j7 = function(a, b, e, p, x) {
if (!a || !m(b) && !J2(b)) {
return;
}
var y = false;
var _ = a.lastIndexOf(".");
var k9 = a.substring(_ + 1);
var l9 = (_ > -1) ? a.substring(0, _) : "";
var m9 = (k9 === a || l9.indexOf(".") === -1) ? Z2(x) : $2(l9,
x);
if (m9) {
var n9 = _2(m9.functionImport, k9);
if (n9 && !!n9.isSideEffecting) {
y = !g3(n9.isSideEffecting);
}
}
;var o9 = e.__metadata;
var p9 = y ? "functions" : "actions";
var q9 = H(a, p);
var r9 = (m(b)) ? b : [b];
var i, s9;
for (i = 0,
s9 = r9.length; i < s9; i++) {
var t9 = r9[i];
if (t9) {
var u9 = o9[p9] = o9[p9] || [];
var v9 = {
metadata: q9,
title: t9.title,
target: H(t9.target, p)
};
u9.push(v9);
}
}
};
var k7 = function(a, b, e, p, x) {
var y = m(a) ? a : a.value;
var _ = [];
var i, k9;
for (i = 0,
k9 = y.length; i < k9; i++) {
_.push(i7(y[i], b, e, p, x));
}
var l9 = {
results: _
};
if (J2(a)) {
for (var m9 in a) {
if (m9.indexOf("#") === 0) {
l9.__metadata = l9.__metadata || {};
j7(m9.substring(1), a[m9], l9, e, p);
}
}
l9 = Z6(a, l9, e);
}
return l9;
};
var l7 = function(a, b, e, i) {
var p = {
type: b
};
var x = d7(a.value, b, p, e, null, null, i);
return Z6(a, {
__metadata: p,
value: x
}, e);
};
var m7 = function(a, b, e, i, p) {
var x = {};
var y = f7(a.value, b, x, e, i, p);
k(y.__metadata, x);
return Z6(a, y, e);
};
var n7 = function(a, b) {
var e = a.value;
if (!m(e)) {
return o7(a, b);
}
var p = [];
var i, x;
for (i = 0,
x = e.length; i < x; i++) {
p.push(o7(e[i], b));
}
var y = {
results: p
};
return Z6(a, y, b);
};
var o7 = function(a, b) {
var e = {
uri: H(a.url, b)
};
e = Z6(a, e, b);
var i = e.__metadata || {};
var p = i.properties || {};
p7(p.url);
s(p, "url", "uri");
return e;
};
var p7 = function(p) {
if (p) {
delete p.type;
}
};
var q7 = function(a, b) {
var e = a.value;
var p = [];
var x = Z6(a, {
collections: p
}, b);
var y = x.__metadata || {};
var _ = y.properties || {};
p7(_.value);
s(_, "value", "collections");
var i, k9;
for (i = 0,
k9 = e.length; i < k9; i++) {
var l9 = e[i];
var m9 = {
title: l9.name,
href: H(l9.url, b)
};
m9 = Z6(l9, m9, b);
y = m9.__metadata || {};
_ = y.properties || {};
p7(_.name);
p7(_.url);
s(_, "name", "title");
s(_, "url", "href");
p.push(m9);
}
return {
workspaces: [x]
};
};
var r7 = function(a, b) {
return {
kind: a,
type: b || null
};
};
var s7 = function(a, b, i) {
var e = a[P6];
if (!e || typeof e !== "string") {
return null;
}
var p = e.lastIndexOf("#");
if (p === -1) {
return r7(K6);
}
var x = e.indexOf("@Element", p);
var y = x - 1;
if (y < 0) {
y = e.indexOf("?", p);
if (y === -1) {
y = e.length;
}
}
var _ = e.substring(p + 1, y);
if (_.indexOf("/$links/") > 0) {
return r7(L6);
}
var k9 = _.split("/");
if (k9.length >= 0) {
var l9 = k9[0];
var m9 = k9[1];
if (Y6(l9)) {
return r7(I6, l9);
}
if (I2(l9)) {
return r7(J6, l9);
}
var n9 = m9;
if (!m9) {
var o9 = l9.lastIndexOf(".");
var p9 = l9.substring(o9 + 1);
var q9 = (p9 === l9) ? Z2(b) : $2(l9.substring(0, o9),
b);
if (q9) {
var r9 = W2(q9.entitySet, p9);
n9 = !!r9 ? r9.entityType : null
}
}
if (x > 0) {
return r7(G6, n9);
}
if (n9) {
return r7(H6, n9);
}
if (m(a.value) && !X2(l9, b)) {
var s9 = a.value[0];
if (!R2(s9)) {
if (W6(s9) || !i) {
return r7(H6, null);
}
}
}
return r7(G6, l9);
}
return null;
};
var t7 = function(a, b, e, i) {
if (!J2(a)) {
return a;
}
var p = a[P6];
var x = s7(a, b, i);
var y = null;
if (x) {
delete a[P6];
y = x.type;
switch (x.kind) {
case H6:
return k7(a, y, p, b, e);
case J6:
return m7(a, y, p, b, e);
case I6:
return l7(a, y, p, e);
case K6:
return q7(a, p);
case L6:
return n7(a, p);
}
}
return i7(a, y, p, b, e);
};
var u7 = ["type", "etag", "media_src", "edit_media",
"content_type", "media_etag"];
var v7 = function(a, b) {
var e = /\/\$links\//;
var i = {};
var p = a.__metadata;
var x = b && e.test(b.request.requestUri);
x7(a, (p && p.properties), i, x);
return i;
};
var w7 = function(a, b) {
if (a) {
var i, e;
for (i = 0,
e = u7.length; i < e; i++) {
var p = u7[i];
var x = N6 + (S6[p] || p);
F7(x, null, a[p], b);
}
}
};
var x7 = function(a, p, b, i) {
for (var e in a) {
var x = a[e];
if (e === "__metadata") {
w7(x, b);
} else if (e.indexOf(".") === -1) {
if (i && e === "uri") {
z7(x, b);
} else {
y7(e, x, p, b, i);
}
} else {
b[e] = x;
}
}
};
var y7 = function(a, b, p, e) {
var i = p && p[a] || {
properties: u,
type: u
};
var x = H1(b, i);
if (R2(b) || !b) {
F7(R6, a, x, e);
e[a] = b;
return;
}
if (N2(b, x) || M2(b)) {
C7(a, b, e);
return;
}
if (!x && L2(b)) {
A7(a, b, e);
return;
}
if (H2(b, x)) {
if (D2(x)) {
F7(R6, a, x, e);
}
B7(a, b, e);
return;
}
e[a] = {};
F7(R6, null, x, e[a]);
x7(b, i.properties, e[a]);
};
var z7 = function(a, b) {
b.url = a;
};
var A7 = function(a, b, e) {
F7(Q6, a, b.__deferred.uri, e);
};
var B7 = function(a, b, e) {
e[a] = [];
var i = m(b) ? b : b.results;
x7(i, null, e[a]);
};
var C7 = function(a, b, e) {
if (N2(b)) {
e[a] = [];
var p = m(b) ? b : b.results;
var i, x;
for (i = 0,
x = p.length; i < x; i++) {
D7(a, p[i], true, e);
}
return;
}
D7(a, b, false, e);
};
var D7 = function(a, b, i, e) {
var p = b.__metadata && b.__metadata.uri;
if (p) {
E7(a, p, i, e);
return;
}
var x = v7(b);
if (i) {
e[a].push(x);
return;
}
e[a] = x;
};
var E7 = function(a, b, i, e) {
var p = a + O6;
if (i) {
e[p] = e[p] || [];
e[p].push(b);
return;
}
e[p] = b;
};
var F7 = function(a, b, e, i) {
if (e !== u) {
b ? i[b + "@" + a] = e : i[a] = e;
}
};
var G7 = "application/json";
var H7 = D3(G7);
var I7 = function(a) {
var b = [];
for (name in a) {
var i, e;
for (i = 0,
e = a[name].length; i < e; i++) {
b.push(k({
metadata: name
}, a[name][i]));
}
}
return b;
};
var J7 = function(a, b, e, p) {
if (a && typeof a === "object") {
var x;
var y = a.__metadata;
if (y) {
if (y.actions) {
y.actions = I7(y.actions);
}
if (y.functions) {
y.functions = I7(y.functions);
}
x = y && y.type;
}
var _ = Y2(x, b) || X2(x, b);
if (_) {
var k9 = _.property;
if (k9) {
var i, l9;
for (i = 0,
l9 = k9.length; i < l9; i++) {
var m9 = k9[i];
var n9 = m9.name;
var o9 = a[n9];
if (m9.type === "Edm.DateTime" || m9.type ===
"Edm.DateTimeOffset") {
if (o9) {
o9 = e(o9);
if (!o9) {
throw {
message: "Invalid date/time
value"
};
}
a[n9] = o9;
}
} else if (m9.type === "Edm.Time") {
if (o9) {
a[n9] = n3(o9);
}
}
}
}
} else if (p) {
for (var p9 in a) {
o9 = a[p9];
if (typeof o9 === "string") {
a[p9] = e(o9) || o9;
}
}
}
}
return a;
};
var K7 = function(D3) {
if (D3) {
var o = D3.properties.odata;
return o === "nometadata" || o === "minimalmetadata" || o
=== "fullmetadata";
}
return false;
};
var L7 = function(a, b) {
var e = {
collections: []
};
var i, p;
for (i = 0,
p = a.EntitySets.length; i < p; i++) {
var x = a.EntitySets[i];
var y = {
title: x,
href: H(x, b)
};
e.collections.push(y);
}
return {
workspaces: [e]
};
};
var M7 = /^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;
var N7 = function(a) {
var b;
if (a < 0) {
b = "-";
a = -a;
} else {
b = "+";
}
var e = Math.floor(a / 60);
a = a - (60 * e);
return b + B2(e, 2) + ":" + B2(a, 2);
};
var O7 = function(a) {
var b = a && M7.exec(a);
if (b) {
var e = new Date(r(b[1]));
if (b[2]) {
var i = r(b[3]);
if (b[2] === "-") {
i = -i;
}
var p = e.getUTCMinutes();
e.setUTCMinutes(p - i);
e.__edmType = "Edm.DateTimeOffset";
e.__offset = N7(i);
}
if (!isNaN(e.valueOf())) {
return e;
}
}
};
var P7 = function(P3, a, b) {
var e = h(b.recognizeDates, P3.recognizeDates);
var i = h(b.inferJsonLightFeedAsObject,
P3.inferJsonLightFeedAsObject);
var p = b.metadata;
var x = b.dataServiceVersion;
var y = O7;
var _ = (typeof a === "string") ? w.JSON.parse(a) : a;
if ((d3("3.0", x) === x)) {
if (K7(b.contentType)) {
return t7(_, p, e, i);
}
y = j3;
}
_ = r3(_.d, function(k9, l9) {
return J7(l9, p, y, e);
});
_ = U7(_, b.dataServiceVersion);
return T7(_, b.response.requestUri);
};
var Q7 = function(a) {
var b = u;
var e = Date.prototype.toJSON;
try {
Date.prototype.toJSON = function() {
return y2(this);
}
;
b = w.JSON.stringify(a, S7);
b = b.replace(/\/Date\(([0-9.+-]+)\)\//g,
"\\/Date($1)\\/");
} finally {
Date.prototype.toJSON = e;
}
return b;
};
var R7 = function(P3, a, b) {
var e = b.dataServiceVersion || "1.0";
var i = h(b.useJsonLight, P3.useJsonLight);
var p = b.contentType = b.contentType || H7;
if (p && p.mediaType === H7.mediaType) {
var x = a;
if (i || K7(p)) {
b.dataServiceVersion = d3(e, "3.0");
x = v7(a, b);
return Q7(x);
}
if (d3("3.0", e) === e) {
p.properties.odata = "verbose";
b.contentType = p;
}
return Q7(x);
}
return u;
};
var S7 = function(_, a) {
if (a && a.__edmType === "Edm.Time") {
return A2(a);
} else {
return a;
}
};
var T7 = function(a, b) {
var i = J2(a) && !a.__metadata && m(a.EntitySets);
return i ? L7(a, b) : a;
};
var U7 = function(a, b) {
if (b && b.lastIndexOf(";") === b.length - 1) {
b = b.substr(0, b.length - 1);
}
if (!b || b === "1.0") {
if (m(a)) {
a = {
results: a
};
}
}
return a;
};
var V7 = P3(P7, R7, G7, C3);
V7.recognizeDates = false;
V7.useJsonLight = false;
V7.inferJsonLightFeedAsObject = false;
o.jsonHandler = V7;
var W7 = "multipart/mixed";
var X7 = /^HTTP\/1\.\d (\d{3}) (.*)$/i;
var Y7 = /^([^()<>@,;:\\"\/[\]?={} \t]+)\s?:\s?(.*)/;
var Z7 = function() {
return Math.floor((1 + Math.random()) *
0x10000).toString(16).substr(1);
};
var $7 = function(p) {
return p + Z7() + "-" + Z7() + "-" + Z7();
};
var _7 = function(a) {
return a.handler.partHandler;
};
var a8 = function(a) {
var b = a.boundaries;
return b[b.length - 1];
};
var b8 = function(P3, a, b) {
var e = b.contentType.properties["boundary"];
return {
__batchResponses: d8(a, {
boundaries: [e],
handlerContext: b
})
};
};
var c8 = function(P3, a, b) {
var e = b.contentType = b.contentType || D3(W7);
if (e.mediaType === W7) {
return i8(a, b);
}
};
var d8 = function(a, b) {
var i = "--" + a8(b);
h8(a, b, i);
g8(a, b);
var p = [];
var x;
while (x !== "--" && b.position < a.length) {
var y = e8(a, b);
var _ = D3(y["Content-Type"]);
if (_ && _.mediaType === W7) {
b.boundaries.push(_.properties["boundary"]);
try {
var k9 = d8(a, b);
} catch (e) {
e.response = f8(a, b, i);
k9 = [e];
}
p.push({
__changeResponses: k9
});
b.boundaries.pop();
h8(a, b, "--" + a8(b));
} else {
if (!_ || _.mediaType !== "application/http") {
throw {
message: "invalid MIME part type "
};
}
g8(a, b);
var l9 = f8(a, b, i);
try {
if (l9.statusCode >= 200 && l9.statusCode <= 299) {
_7(b.handlerContext).read(l9,
b.handlerContext);
} else {
l9 = {
message: "HTTP request failed",
response: l9
};
}
} catch (e) {
l9 = e;
}
p.push(l9);
}
x = a.substr(b.position, 2);
g8(a, b);
}
return p;
};
var e8 = function(a, b) {
var e = {};
var p;
var i;
var x;
do {
x = b.position;
i = g8(a, b);
p = Y7.exec(i);
if (p !== null) {
e[p[1]] = p[2];
} else {
b.position = x;
}
} while (i && p);f3(e);
return e;
};
var f8 = function(a, b, e) {
var p = b.position;
var i = X7.exec(g8(a, b));
var x;
var y;
var _;
if (i) {
x = i[1];
y = i[2];
_ = e8(a, b);
g8(a, b);
} else {
b.position = p;
}
return {
statusCode: x,
statusText: y,
headers: _,
body: h8(a, b, "\r\n" + e)
};
};
var g8 = function(a, b) {
return h8(a, b, "\r\n");
};
var h8 = function(a, b, e) {
var i = b.position || 0;
var p = a.length;
if (e) {
p = a.indexOf(e, i);
if (p === -1) {
return null;
}
b.position = p + e.length;
} else {
b.position = p;
}
return a.substring(i, p);
};
var i8 = function(a, b) {
if (!F2(a)) {
throw {
message: "Data is not a batch object."
};
}
var e = $7("batch_");
var p = a.__batchRequests;
var x = "";
var i, y;
for (i = 0,
y = p.length; i < y; i++) {
x += j8(e, false) + k8(p[i], b);
}
x += j8(e, true);
var _ = b.contentType.properties;
_.boundary = e;
return x;
};
var j8 = function(b, a) {
var e = "\r\n--" + b;
if (a) {
e += "--";
}
return e + "\r\n";
};
var k8 = function(p, a, b) {
var e = p.__changeRequests;
var x;
if (m(e)) {
if (b) {
throw {
message: "Not Supported: change set nested in other
change set"
};
}
var y = $7("changeset_");
x = "Content-Type: " + W7 + "; boundary=" + y + "\r\n";
var i, _;
for (i = 0,
_ = e.length; i < _; i++) {
x += j8(y, false) + k8(e[i], a, true);
}
x += j8(y, true);
} else {
x = "Content-Type: application/http\r\nContent-Transfer-
Encoding: binary\r\n\r\n";
var k9 = k({}, a);
k9.handler = P3;
k9.request = p;
k9.contentType = null;
p3(p, _7(a), k9);
x += l8(p);
}
return x;
};
var l8 = function(a) {
var b = (a.method ? a.method : "GET") + " " + a.requestUri + "
HTTP/1.1\r\n";
for (var e in a.headers) {
if (a.headers[e]) {
b = b + e + ": " + a.headers[e] + "\r\n";
}
}
if (a.body) {
function p(i) {
if (i <= 0x7F)
return 1;
if (i <= 0x7FF)
return 2;
if (i <= 0xFFFF)
return 3;
if (i <= 0x1FFFFF)
return 4;
if (i <= 0x3FFFFFF)
return 5;
if (i <= 0x7FFFFFFF)
return 6;
throw new Error("Illegal argument: " + i);
}
;function x(y) {
var _ = 0;
for (var i = 0; i < y.length; i++) {
var ch = y.charCodeAt(i);
_ += p(ch);
}
return _;
}
;b += "Content-Length: " + x(a.body) + "\r\n";
}
b += "\r\n";
if (a.body) {
b += a.body;
}
return b;
};
o.batchHandler = P3(b8, c8, W7, C3);
var m8 = [o.jsonHandler, o.atomHandler, o.xmlHandler,
o.textHandler];
var n8 = function(a, b, e) {
var i, p;
for (i = 0,
p = m8.length; i < p && !m8[i][a](b, e); i++) {}
if (i === p) {
throw {
message: "no handler for data"
};
}
};
o.defaultSuccess = function(a) {
w.alert(w.JSON.stringify(a));
}
;
o.defaultError = t;
o.defaultHandler = {
read: function(a, b) {
if (a && a.body && a.headers["Content-Type"]) {
n8("read", a, b);
}
},
write: function(a, b) {
n8("write", a, b);
},
maxDataServiceVersion: C3,
accept: "application/atomsvc+xml;q=0.8,
application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1"
};
o.defaultMetadata = [];
o.read = function(a, b, e, P3, i, p) {
var x;
if (a instanceof String || typeof a === "string") {
x = {
requestUri: a
};
} else {
x = a;
}
return o.request(x, b, e, P3, i, p);
}
;
o.request = function(a, b, e, P3, i, p) {
b = b || o.defaultSuccess;
e = e || o.defaultError;
P3 = P3 || o.defaultHandler;
i = i || o.defaultHttpClient;
p = p || o.defaultMetadata;
a.recognizeDates = h(a.recognizeDates,
o.jsonHandler.recognizeDates);
a.callbackParameterName = h(a.callbackParameterName,
o.defaultHttpClient.callbackParameterName);
a.formatQueryString = h(a.formatQueryString,
o.defaultHttpClient.formatQueryString);
a.enableJsonpCallback = h(a.enableJsonpCallback,
o.defaultHttpClient.enableJsonpCallback);
a.useJsonLight = h(a.useJsonLight,
o.jsonHandler.enableJsonpCallback);
a.inferJsonLightFeedAsObject = h(a.inferJsonLightFeedAsObject,
o.jsonHandler.inferJsonLightFeedAsObject);
var x = {
metadata: p,
recognizeDates: a.recognizeDates,
callbackParameterName: a.callbackParameterName,
formatQueryString: a.formatQueryString,
enableJsonpCallback: a.enableJsonpCallback,
useJsonLight: a.useJsonLight,
inferJsonLightFeedAsObject: a.inferJsonLightFeedAsObject
};
try {
p3(a, P3, x);
return E2(a, b, e, P3, i, x);
} catch (y) {
if (y.bIsSuccessHandlerError) {
throw y;
} else {
e(y);
}
}
}
;
o.batchHandler.partHandler = o.defaultHandler;
var o8 = null;
var p8 = function() {
var a = {
v: this.valueOf(),
t: "[object Date]"
};
for (var b in this) {
a[b] = this[b];
}
return a;
};
var q8 = function(_, a) {
if (a && a.t === "[object Date]") {
var b = new Date(a.v);
for (var e in a) {
if (e !== "t" && e !== "v") {
b[e] = a[e];
}
}
a = b;
}
return a;
};
var r8 = function(a, b) {
return a.name + "#!#" + b;
};
var s8 = function(a, b) {
return b.replace(a.name + "#!#", "");
};
var t8 = function(a) {
this.name = a;
};
t8.create = function(a) {
if (t8.isSupported()) {
o8 = o8 || w.localStorage;
return new t8(a);
}
throw {
message: "Web Storage not supported by the browser"
};
}
;
t8.isSupported = function() {
return !!w.localStorage;
}
;
t8.prototype.add = function(a, b, e, i) {
i = i || this.defaultError;
var p = this;
this.contains(a, function(x) {
if (!x) {
p.addOrUpdate(a, b, e, i);
} else {
j(i, {
message: "key already exists",
key: a
});
}
}, i);
}
;
t8.prototype.addOrUpdate = function(a, b, i, p) {
p = p || this.defaultError;
if (a instanceof Array) {
p({
message: "Array of keys not supported"
});
} else {
var x = r8(this, a);
var y = Date.prototype.toJSON;
try {
var _ = b;
if (_ !== u) {
Date.prototype.toJSON = p8;
_ = w.JSON.stringify(b);
}
o8.setItem(x, _);
j(i, a, b);
} catch (e) {
if (e.code === 22 || e.number === 0x8007000E) {
j(p, {
name: "QUOTA_EXCEEDED_ERR",
error: e
});
} else {
j(p, e);
}
} finally {
Date.prototype.toJSON = y;
}
}
}
;
t8.prototype.clear = function(a, b) {
b = b || this.defaultError;
try {
var i = 0
, p = o8.length;
while (p > 0 && i < p) {
var x = o8.key(i);
var y = s8(this, x);
if (x !== y) {
o8.removeItem(x);
p = o8.length;
} else {
i++;
}
}
;j(a);
} catch (e) {
j(b, e);
}
}
;
t8.prototype.close = function() {}
;
t8.prototype.contains = function(a, b, i) {
i = i || this.defaultError;
try {
var p = r8(this, a);
var x = o8.getItem(p);
j(b, x !== null);
} catch (e) {
j(i, e);
}
}
;
t8.prototype.defaultError = t;
t8.prototype.getAllKeys = function(a, b) {
b = b || this.defaultError;
var p = [];
var i, x;
try {
for (i = 0,
x = o8.length; i < x; i++) {
var y = o8.key(i);
var _ = s8(this, y);
if (y !== _) {
p.push(_);
}
}
j(a, p);
} catch (e) {
j(b, e);
}
}
;
t8.prototype.mechanism = "dom";
t8.prototype.read = function(a, b, i) {
i = i || this.defaultError;
if (a instanceof Array) {
i({
message: "Array of keys not supported"
});
} else {
try {
var p = r8(this, a);
var x = o8.getItem(p);
if (x !== null && x !== "undefined") {
x = w.JSON.parse(x, q8);
} else {
x = u;
}
j(b, a, x);
} catch (e) {
j(i, e);
}
}
}
;
t8.prototype.remove = function(a, b, i) {
i = i || this.defaultError;
if (a instanceof Array) {
i({
message: "Batches not supported"
});
} else {
try {
var p = r8(this, a);
o8.removeItem(p);
j(b);
} catch (e) {
j(i, e);
}
}
}
;
t8.prototype.update = function(a, b, e, i) {
i = i || this.defaultError;
var p = this;
this.contains(a, function(x) {
if (x) {
p.addOrUpdate(a, b, e, i);
} else {
j(i, {
message: "key not found",
key: a
});
}
}, i);
}
;
var u8 = w.mozIndexedDB || w.webkitIndexedDB || w.msIndexedDB ||
w.indexedDB;
var v8 = w.IDBKeyRange || w.webkitIDBKeyRange;
var w8 = w.IDBTransaction || w.webkitIDBTransaction || {};
var x8 = w8.READ_ONLY || "readonly";
var y8 = w8.READ_WRITE || "readwrite";
var z8 = function(a, b) {
return function(e) {
var i = a || b;
if (!i) {
return;
}
if (Object.prototype.toString.call(e) === "[object
IDBDatabaseException]") {
if (e.code === 11) {
i({
name: "QuotaExceededError",
error: e
});
return;
}
i(e);
return;
}
var p;
try {
var x = e.target.error || e;
p = x.name;
} catch (y) {
p = (e.type === "blocked") ? "IndexedDBBlocked" :
"UnknownError";
}
i({
name: p,
error: e
});
}
;
};
var A8 = function(a, b, e) {
var i = a.name;
var p = "_datajs_" + i;
var x = u8.open(p);
x.onblocked = e;
x.onerror = e;
x.onupgradeneeded = function() {
var y = x.result;
if (!y.objectStoreNames.contains(i)) {
y.createObjectStore(i);
}
}
;
x.onsuccess = function(y) {
var _ = x.result;
if (!_.objectStoreNames.contains(i)) {
if ("setVersion"in _) {
var k9 = _.setVersion("1.0");
k9.onsuccess = function() {
var l9 = k9.transaction;
l9.oncomplete = function() {
b(_);
}
;
_.createObjectStore(i, null, false);
}
;
k9.onerror = e;
k9.onblocked = e;
return;
}
y.target.error = {
name: "DBSchemaMismatch"
};
e(y);
return;
}
_.onversionchange = function(y) {
y.target.close();
}
;
b(_);
}
;
};
var B8 = function(a, b, e, i) {
var p = a.name;
var x = a.db;
var y = z8(i, a.defaultError);
if (x) {
e(x.transaction(p, b));
return;
}
A8(a, function(_) {
a.db = _;
e(_.transaction(p, b));
}, y);
};
var C8 = function(a) {
this.name = a;
};
C8.create = function(a) {
if (C8.isSupported()) {
return new C8(a);
}
throw {
message: "IndexedDB is not supported on this browser"
};
}
;
C8.isSupported = function() {
return !!u8;
}
;
C8.prototype.add = function(a, b, e, p) {
var x = this.name;
var y = this.defaultError;
var _ = [];
var k9 = [];
if (a instanceof Array) {
_ = a;
k9 = b;
} else {
_ = [a];
k9 = [b];
}
B8(this, y8, function(l9) {
l9.onabort = z8(p, y, a, "add");
l9.oncomplete = function() {
if (a instanceof Array) {
e(_, k9);
} else {
e(a, b);
}
}
;
for (var i = 0; i < _.length && i < k9.length; i++) {
l9.objectStore(x).add({
v: k9[i]
}, _[i]);
}
}, p);
}
;
C8.prototype.addOrUpdate = function(a, b, e, p) {
var x = this.name;
var y = this.defaultError;
var _ = [];
var k9 = [];
if (a instanceof Array) {
_ = a;
k9 = b;
} else {
_ = [a];
k9 = [b];
}
B8(this, y8, function(l9) {
l9.onabort = z8(p, y);
l9.oncomplete = function() {
if (a instanceof Array) {
e(_, k9);
} else {
e(a, b);
}
}
;
for (var i = 0; i < _.length && i < k9.length; i++) {
var m9 = {
v: k9[i]
};
l9.objectStore(x).put(m9, _[i]);
}
}, p);
}
;
C8.prototype.clear = function(a, e) {
var b = this.name;
var i = this.defaultError;
B8(this, y8, function(p) {
p.onerror = z8(e, i);
p.oncomplete = function() {
a();
}
;
p.objectStore(b).clear();
}, e);
}
;
C8.prototype.close = function() {
if (this.db) {
this.db.close();
this.db = null;
}
}
;
C8.prototype.contains = function(a, b, e) {
var i = this.name;
var p = this.defaultError;
B8(this, x8, function(x) {
var y = x.objectStore(i);
var _ = y["get"](a);
x.oncomplete = function() {
b(!!_.result);
}
;
x.onerror = z8(e, p);
}, e);
}
;
C8.prototype.defaultError = t;
C8.prototype.getAllKeys = function(a, e) {
var b = this.name;
var i = this.defaultError;
B8(this, y8, function(p) {
var x = [];
p.oncomplete = function() {
a(x);
}
;
var y = p.objectStore(b).openCursor();
y.onerror = z8(e, i);
y.onsuccess = function(_) {
var k9 = _.target.result;
if (k9) {
x.push(k9.key);
k9["continue"].call(k9);
}
}
;
}, e);
}
;
C8.prototype.mechanism = "indexeddb";
C8.prototype.read = function(a, b, e) {
var p = this.name;
var x = this.defaultError;
var y = (a instanceof Array) ? a : [a];
B8(this, x8, function(_) {
var k9 = [];
_.onerror = z8(e, x, a, "read");
_.oncomplete = function() {
if (a instanceof Array) {
b(y, k9);
} else {
b(y[0], k9[0]);
}
}
;
for (var i = 0; i < y.length; i++) {
var l9 = _.objectStore(p);
var m9 = l9["get"].call(l9, y[i]);
m9.onsuccess = function(n9) {
var o9 = n9.target.result;
k9.push(o9 ? o9.v : u);
}
;
}
}, e);
}
;
C8.prototype.remove = function(a, b, e) {
var p = this.name;
var x = this.defaultError;
var y = (a instanceof Array) ? a : [a];
B8(this, y8, function(_) {
_.onerror = z8(e, x);
_.oncomplete = function() {
b();
}
;
for (var i = 0; i < y.length; i++) {
var k9 = _.objectStore(p);
k9["delete"].call(k9, y[i]);
}
}, e);
}
;
C8.prototype.update = function(a, b, e, p) {
var x = this.name;
var y = this.defaultError;
var _ = [];
var k9 = [];
if (a instanceof Array) {
_ = a;
k9 = b;
} else {
_ = [a];
k9 = [b];
}
B8(this, y8, function(l9) {
l9.onabort = z8(p, y);
l9.oncomplete = function() {
if (a instanceof Array) {
e(_, k9);
} else {
e(a, b);
}
}
;
for (var i = 0; i < _.length && i < k9.length; i++) {
var m9 = l9.objectStore(x).openCursor(v8.only(_[i]));
var n9 = {
v: k9[i]
};
m9.pair = {
key: _[i],
value: n9
};
m9.onsuccess = function(o9) {
var p9 = o9.target.result;
if (p9) {
p9.update(o9.target.pair.value);
} else {
l9.abort();
}
}
;
}
}, p);
}
;
var D8 = function(a) {
var b = [];
var i = [];
var e = {};
this.name = a;
var p = function(y) {
return y || this.defaultError;
};
var x = function(y, _) {
var k9;
if (y instanceof Array) {
k9 = "Array of keys not supported";
}
if (y === u || y === null) {
k9 = "Invalid key";
}
if (k9) {
j(_, {
message: k9
});
return false;
}
return true;
};
this.add = function(y, _, k9, l9) {
l9 = p(l9);
if (x(y, l9)) {
if (!e.hasOwnProperty(y)) {
this.addOrUpdate(y, _, k9, l9);
} else {
l9({
message: "key already exists",
key: y
});
}
}
}
;
this.addOrUpdate = function(y, _, k9, l9) {
l9 = p(l9);
if (x(y, l9)) {
var m9 = e[y];
if (m9 === u) {
if (b.length > 0) {
m9 = b.splice(0, 1);
} else {
m9 = i.length;
}
}
i[m9] = _;
e[y] = m9;
j(k9, y, _);
}
}
;
this.clear = function(y) {
i = [];
e = {};
b = [];
j(y);
}
;
this.contains = function(y, _) {
var k9 = e.hasOwnProperty(y);
j(_, k9);
}
;
this.getAllKeys = function(y) {
var _ = [];
for (var a in e) {
_.push(a);
}
j(y, _);
}
;
this.read = function(y, _, k9) {
k9 = p(k9);
if (x(y, k9)) {
var l9 = e[y];
j(_, y, i[l9]);
}
}
;
this.remove = function(y, _, k9) {
k9 = p(k9);
if (x(y, k9)) {
var l9 = e[y];
if (l9 !== u) {
if (l9 === i.length - 1) {
i.pop();
} else {
i[l9] = u;
b.push(l9);
}
delete e[y];
if (i.length === 0) {
b = [];
}
}
j(_);
}
}
;
this.update = function(y, _, k9, l9) {
l9 = p(l9);
if (x(y, l9)) {
if (e.hasOwnProperty(y)) {
this.addOrUpdate(y, _, k9, l9);
} else {
l9({
message: "key not found",
key: y
});
}
}
}
;
};
D8.create = function(a) {
return new D8(a);
}
;
D8.isSupported = function() {
return true;
}
;
D8.prototype.close = function() {}
;
D8.prototype.defaultError = t;
D8.prototype.mechanism = "memory";
var E8 = {
indexeddb: C8,
dom: t8,
memory: D8
};
d.defaultStoreMechanism = "best";
d.createStore = function(a, b) {
if (!b) {
b = d.defaultStoreMechanism;
}
if (b === "best") {
b = (t8.isSupported()) ? "dom" : "memory";
}
var e = E8[b];
if (e) {
return e.create(a);
}
throw {
message: "Failed to create store",
name: a,
mechanism: b
};
}
;
var F8 = function(a, b) {
var e = (a.indexOf("?") >= 0) ? "&" : "?";
return a + e + b;
};
var G8 = function(a, b) {
var i = a.indexOf("?");
var e = "";
if (i >= 0) {
e = a.substr(i);
a = a.substr(0, i);
}
if (a[a.length - 1] !== "/") {
a += "/";
}
return a + b + e;
};
var H8 = function(a, b) {
return {
method: "GET",
requestUri: a,
user: b.user,
password: b.password,
withCredentials: b.withCredentials,
enableJsonpCallback: b.enableJsonpCallback,
callbackParameterName: b.callbackParameterName,
formatQueryString: b.formatQueryString
};
};
var I8 = function(a, b) {
var e = -1;
var i = a.indexOf("?");
if (i !== -1) {
var p = a.indexOf("?" + b + "=", i);
if (p === -1) {
p = a.indexOf("&" + b + "=", i);
}
if (p !== -1) {
e = p + b.length + 2;
}
}
return e;
};
var J8 = function(a, b, e, i) {
var p = K8(a, b, [], e, i);
return p;
};
var K8 = function(a, b, e, i, p) {
var x = H8(a, b);
var y = o.request(x, function(_) {
var k9 = _.__next;
var l9 = _.results;
e = e.concat(l9);
if (k9) {
y = K8(k9, b, e, i, p);
} else {
i(e);
}
}, p, u, b.httpClient, b.metadata);
return {
abort: function() {
y.abort();
}
};
};
var L8 = function(a) {
var b = this;
var e = a.source;
b.identifier = G(encodeURI(decodeURI(e)));
b.options = a;
b.count = function(i, p) {
var a = b.options;
return o.request(H8(G8(e, "$count"), a), function(x) {
var y = r(x.toString());
if (isNaN(y)) {
p({
message: "Count is NaN",
count: y
});
} else {
i(y);
}
}, p, u, a.httpClient, a.metadata);
}
;
b.read = function(i, p, x, y) {
var _ = "$skip=" + i + "&$top=" + p;
return J8(F8(e, _), b.options, x, y);
}
;
return b;
};
var M8 = function(a, p) {
var i = N8(a, p);
if (i) {
var b = i.i - p.i;
var e = b + (a.c - a.d.length);
a.d = a.d.concat(p.d.slice(b, e));
}
};
var N8 = function(x, y) {
var a = x.i + x.c;
var b = y.i + y.c;
var e = (x.i > y.i) ? x.i : y.i;
var i = (a < b) ? a : b;
var p;
if (i >= e) {
p = {
i: e,
c: i - e
};
}
return p;
};
var O8 = function(a, b) {
if (a === u || typeof a !== "number") {
throw {
message: "'" + b + "' must be a number."
};
}
if (isNaN(a) || a < 0 || !isFinite(a)) {
throw {
message: "'" + b + "' must be greater than or equal to
zero."
};
}
};
var P8 = function(a, b) {
if (a !== u) {
if (typeof a !== "number") {
throw {
message: "'" + b + "' must be a number."
};
}
if (isNaN(a) || a <= 0 || !isFinite(a)) {
throw {
message: "'" + b + "' must be greater than zero."
};
}
}
};
var Q8 = function(a, b) {
if (a !== u && (typeof a !== "number" || isNaN(a) || !
isFinite(a))) {
throw {
message: "'" + b + "' must be a number."
};
}
};
var R8 = function(a, b) {
var i, e;
for (i = 0,
e = a.length; i < e; i++) {
if (a[i] === b) {
a.splice(i, 1);
return true;
}
}
return false;
};
var S8 = function(a) {
var b = 0;
var e = typeof a;
if (e === "object" && a) {
for (var i in a) {
b += i.length * 2 + S8(a[i]);
}
} else if (e === "string") {
b = a.length * 2;
} else {
b = 8;
}
return b;
};
var T8 = function(a, b, p) {
a = Math.floor(a / p) * p;
b = Math.ceil((b + 1) / p) * p;
return {
i: a,
c: b - a
};
};
var U8 = "destroy";
var V8 = "idle";
var W8 = "init";
var X8 = "read";
var Y8 = "prefetch";
var Z8 = "write";
var $8 = "cancel";
var _8 = "end";
var a9 = "error";
var b9 = "start";
var c9 = "wait";
var d9 = "clear";
var e9 = "done";
var f9 = "local";
var g9 = "save";
var h9 = "source";
var i9 = function(a, p, i, b, e, x, y) {
var _;
var k9;
var l9 = this;
l9.p = p;
l9.i = b;
l9.c = e;
l9.d = x;
l9.s = b9;
l9.canceled = false;
l9.pending = y;
l9.oncomplete = null;
l9.cancel = function() {
if (!i) {
return;
}
var o9 = l9.s;
if (o9 !== a9 && o9 !== _8 && o9 !== $8) {
l9.canceled = true;
n9($8, _);
}
}
;
l9.complete = function() {
n9(_8, _);
}
;
l9.error = function(o9) {
if (!l9.canceled) {
n9(a9, o9);
}
}
;
l9.run = function(o9) {
k9 = o9;
l9.transition(l9.s, _);
}
;
l9.wait = function(x) {
n9(c9, x);
}
;
var m9 = function(o9, k9, x) {
switch (o9) {
case b9:
if (k9 !== W8) {
a(l9, o9, k9, x);
}
break;
case c9:
a(l9, o9, k9, x);
break;
case $8:
a(l9, o9, k9, x);
l9.fireCanceled();
n9(_8);
break;
case a9:
a(l9, o9, k9, x);
l9.canceled = true;
l9.fireRejected(x);
n9(_8);
break;
case _8:
if (l9.oncomplete) {
l9.oncomplete(l9);
}
if (!l9.canceled) {
l9.fireResolved();
}
a(l9, o9, k9, x);
break;
default:
a(l9, o9, k9, x);
break;
}
};
var n9 = function(o9, x) {
l9.s = o9;
_ = x;
m9(o9, k9, x);
};
l9.transition = n9;
return l9;
};
i9.prototype.fireResolved = function() {
var p = this.p;
if (p) {
this.p = null;
p.resolve(this.d);
}
}
;
i9.prototype.fireRejected = function(a) {
var p = this.p;
if (p) {
this.p = null;
p.reject(a);
}
}
;
i9.prototype.fireCanceled = function() {
this.fireRejected({
canceled: true,
message: "Operation canceled"
});
}
;
var j9 = function(a) {
var b = W8;
var e = {
counts: 0,
netReads: 0,
prefetches: 0,
cacheReads: 0
};
var p = [];
var x = [];
var y = [];
var k9 = 0;
var l9 = false;
var m9 = z(a.cacheSize, 1048576);
var n9 = 0;
var o9 = 0;
var p9 = 0;
var q9 = m9 === 0;
var r9 = z(a.pageSize, 50);
var s9 = z(a.prefetchSize, r9);
var t9 = "1.0";
var u9;
var v9 = 0;
var w9 = a.source;
if (typeof w9 === "string") {
w9 = new L8(a);
}
w9.options = a;
var x9 = d.createStore(a.name, a.mechanism);
var y9 = this;
y9.onidle = a.idle;
y9.stats = e;
y9.count = function() {
if (u9) {
throw u9;
}
var i = G1();
var _ = false;
if (l9) {
j(function() {
i.resolve(n9);
});
return i.promise();
}
var S9 = w9.count(function(T9) {
S9 = null;
e.counts++;
i.resolve(T9);
}, function(T9) {
S9 = null;
i.reject(k(T9, {
canceled: _
}));
});
return k(i.promise(), {
cancel: function() {
if (S9) {
_ = true;
S9.abort();
S9 = null;
}
}
});
}
;
y9.clear = function() {
if (u9) {
throw u9;
}
if (p.length === 0) {
var i = G1();
var _ = new i9(O9,i,false);
H9(_, p);
return i.promise();
}
return p[0].p;
}
;
y9.filterForward = function(i, _, S9) {
return E9(i, _, S9, false);
}
;
y9.filterBack = function(i, _, S9) {
return E9(i, _, S9, true);
}
;
y9.readRange = function(i, _) {
O8(i, "index");
O8(_, "count");
if (u9) {
throw u9;
}
var S9 = G1();
var op = new i9(Q9,S9,true,i,_,[],0);
H9(op, x);
return k(S9.promise(), {
cancel: function() {
op.cancel();
}
});
}
;
y9.ToObservable = y9.toObservable = function() {
if (!w.Rx || !w.Rx.Observable) {
throw {
message: "Rx library not available - include rx.js"
};
}
if (u9) {
throw u9;
}
return w.Rx.Observable.CreateWithDisposable(function(_) {
var S9 = false;
var T9 = 0;
var U9 = function(i) {
if (!S9) {
_.OnError(i);
}
};
var V9 = function(W9) {
if (!S9) {
var i, X9;
for (i = 0,
X9 = W9.length; i < X9; i++) {
_.OnNext(W9[i]);
}
if (W9.length < r9) {
_.OnCompleted();
} else {
T9 += r9;
y9.readRange(T9, r9).then(V9, U9);
}
}
};
y9.readRange(T9, r9).then(V9, U9);
return {
Dispose: function() {
S9 = true;
}
};
});
}
;
var z9 = function(_) {
return function(S9) {
u9 = {
message: _,
error: S9
};
var i, T9;
for (i = 0,
T9 = x.length; i < T9; i++) {
x[i].fireRejected(u9);
}
for (i = 0,
T9 = p.length; i < T9; i++) {
p[i].fireRejected(u9);
}
x = p = null;
}
;
};
var A9 = function(_) {
if (_ !== b) {
b = _;
var S9 = p.concat(x, y);
var i, T9;
for (i = 0,
T9 = S9.length; i < T9; i++) {
S9[i].run(b);
}
}
};
var B9 = function() {
var i = new F1();
x9.clear(function() {
k9 = 0;
l9 = false;
n9 = 0;
o9 = 0;
p9 = 0;
q9 = m9 === 0;
e = {
counts: 0,
netReads: 0,
prefetches: 0,
cacheReads: 0
};
y9.stats = e;
x9.close();
i.resolve();
}, function(_) {
i.reject(_);
});
return i;
};
var C9 = function(i) {
var _ = R8(p, i);
if (!_) {
_ = R8(x, i);
if (!_) {
R8(y, i);
}
}
v9--;
A9(V8);
};
var D9 = function(i) {
var _ = new F1();
var S9 = false;
var T9 = w9.read(i, r9, function(U9) {
var V9 = {
i: i,
c: U9.length,
d: U9
};
_.resolve(V9);
}, function(U9) {
_.reject(U9);
});
return k(_, {
cancel: function() {
if (T9) {
T9.abort();
S9 = true;
T9 = null;
}
}
});
};
var E9 = function(_, S9, T9, U9) {
_ = r(_);
S9 = r(S9);
if (isNaN(_)) {
throw {
message: "'index' must be a valid number.",
index: _
};
}
if (isNaN(S9)) {
throw {
message: "'count' must be a valid number.",
count: S9
};
}
if (u9) {
throw u9;
}
_ = Math.max(_, 0);
var V9 = G1();
var W9 = [];
var X9 = false;
var Y9 = null;
var Z9 = function(ba, ca) {
if (!X9) {
if (S9 >= 0 && W9.length >= S9) {
V9.resolve(W9);
} else {
Y9 = y9.readRange(ba, ca).then(function(da) {
for (var i = 0, ea = da.length; i < ea &&
(S9 < 0 || W9.length < S9); i++) {
var fa = U9 ? ea - i - 1 : i;
var ga = da[fa];
if (T9(ga)) {
var ha = {
index: ba + fa,
item: ga
};
U9 ? W9.unshift(ha) : W9.push(ha);
}
}
if ((!U9 && da.length < ca) || (U9 && ba <=
0)) {
V9.resolve(W9);
} else {
var ia = U9 ? Math.max(ba - r9, 0) : ba
+ ca;
Z9(ia, r9);
}
}, function(i) {
V9.reject(i);
});
}
}
};
var $9 = T8(_, _, r9);
var _9 = U9 ? $9.i : _;
var aa = U9 ? _ - $9.i + 1 : $9.i + $9.c - _;
Z9(_9, aa);
return k(V9.promise(), {
cancel: function() {
if (Y9) {
Y9.cancel();
}
X9 = true;
}
});
};
var F9 = function() {
if (y9.onidle && v9 === 0) {
y9.onidle();
}
};
var G9 = function(i) {
if (l9 || s9 === 0 || q9) {
return;
}
if (y.length === 0 || (y[0] && y[0].c !== -1)) {
var _ = new i9(P9,null,true,i,s9,null,s9);
H9(_, y);
}
};
var H9 = function(i, _) {
i.oncomplete = C9;
_.push(i);
v9++;
i.run(b);
};
var I9 = function(i) {
var S9 = false;
var T9 = k(new F1(), {
cancel: function() {
S9 = true;
}
});
var U9 = L9(T9, "Read page from store failure");
x9.contains(i, function(V9) {
if (S9) {
return;
}
if (V9) {
x9.read(i, function(_, W9) {
if (!S9) {
T9.resolve(W9 !== u, W9);
}
}, U9);
return;
}
T9.resolve(false);
}, U9);
return T9;
};
var J9 = function(i, _) {
var S9 = false;
var T9 = k(new F1(), {
cancel: function() {
S9 = true;
}
});
var U9 = L9(T9, "Save page to store failure");
var V9 = function() {
T9.resolve(true);
};
if (_.c > 0) {
var W9 = S8(_);
q9 = m9 >= 0 && m9 < k9 + W9;
if (!q9) {
x9.addOrUpdate(i, _, function() {
M9(_, W9);
K9(V9, U9);
}, U9);
} else {
V9();
}
} else {
M9(_, 0);
K9(V9, U9);
}
return T9;
};
var K9 = function(i, _) {
var S9 = {
actualCacheSize: k9,
allDataLocal: l9,
cacheSize: m9,
collectionCount: n9,
highestSavedPage: o9,
highestSavedPageSize: p9,
pageSize: r9,
sourceId: w9.identifier,
version: t9
};
x9.addOrUpdate("__settings", S9, i, _);
};
var L9 = function(i) {
return function() {
i.resolve(false);
}
;
};
var M9 = function(i, _) {
var S9 = i.c;
var T9 = i.i;
if (S9 === 0) {
if (o9 === T9 - r9) {
n9 = o9 + p9;
}
} else {
o9 = Math.max(o9, T9);
if (o9 === T9) {
p9 = S9;
}
k9 += _;
if (S9 < r9 && !n9) {
n9 = T9 + S9;
}
}
if (!l9 && n9 === o9 + p9) {
l9 = true;
}
};
var N9 = function(i, _, S9, T9) {
var U9 = i.canceled && _ !== _8;
if (U9) {
if (_ === $8) {
if (T9 && T9.cancel) {
T9.cancel();
}
}
}
return U9;
};
var O9 = function(i, _, S9) {
var T9 = i.transition;
if (S9 !== U8) {
A9(U8);
return true;
}
switch (_) {
case b9:
T9(d9);
break;
case _8:
F9();
break;
case d9:
B9().then(function() {
i.complete();
});
i.wait();
break;
default:
return false;
}
return true;
};
var P9 = function(i, _, S9, T9) {
if (!N9(i, _, S9, T9)) {
var U9 = i.transition;
if (S9 !== Y8) {
if (S9 === U8) {
if (_ !== $8) {
i.cancel();
}
} else if (S9 === V8) {
A9(Y8);
}
return true;
}
switch (_) {
case b9:
if (y[0] === i) {
U9(f9, i.i);
}
break;
case e9:
var V9 = i.pending;
if (V9 > 0) {
V9 -= Math.min(V9, T9.c);
}
if (l9 || V9 === 0 || T9.c < r9 || q9) {
i.complete();
} else {
i.pending = V9;
U9(f9, T9.i + r9);
}
break;
default:
return R9(i, _, S9, T9, true);
}
}
return true;
};
var Q9 = function(i, _, S9, T9) {
if (!N9(i, _, S9, T9)) {
var U9 = i.transition;
if (S9 !== X8 && _ !== b9) {
if (S9 === U8) {
if (_ !== b9) {
i.cancel();
}
} else if (S9 !== Z8) {
A9(X8);
}
return true;
}
switch (_) {
case b9:
if (S9 === V8 || S9 === Y8) {
A9(X8);
if (i.c > 0) {
var V9 = T8(i.i, i.c, r9);
U9(f9, V9.i);
} else {
U9(e9, i);
}
}
break;
case e9:
M8(i, T9);
var W9 = i.d.length;
if (i.c === W9 || T9.c < r9) {
e.cacheReads++;
G9(T9.i + T9.c);
i.complete();
} else {
U9(f9, T9.i + r9);
}
break;
default:
return R9(i, _, S9, T9, false);
}
}
return true;
};
var R9 = function(i, _, S9, T9, U9) {
var V9 = i.error;
var W9 = i.transition;
var X9 = i.wait;
var Y9;
switch (_) {
case _8:
F9();
break;
case f9:
Y9 = I9(T9).then(function(Z9, $9) {
if (!i.canceled) {
if (Z9) {
W9(e9, $9);
} else {
W9(h9, T9);
}
}
});
break;
case h9:
Y9 = D9(T9).then(function(Z9) {
if (!i.canceled) {
if (U9) {
e.prefetches++;
} else {
e.netReads++;
}
W9(g9, Z9);
}
}, V9);
break;
case g9:
if (S9 !== Z8) {
A9(Z8);
Y9 = J9(T9.i, T9).then(function(Z9) {
if (!i.canceled) {
if (!Z9 && U9) {
i.pending = 0;
}
W9(e9, T9);
}
A9(V8);
});
}
break;
default:
return false;
}
if (Y9) {
if (i.canceled) {
Y9.cancel();
} else if (i.s === _) {
X9(Y9);
}
}
return true;
};
x9.read("__settings", function(_, i) {
if (f(i)) {
var S9 = i.version;
if (!S9 || S9.indexOf("1.") !== 0) {
z9("Unsupported cache store version " + S9)();
return;
}
if (r9 !== i.pageSize || w9.identifier !== i.sourceId)
{
B9().then(function() {
A9(V8);
}, z9("Unable to clear store during
initialization"));
} else {
k9 = i.actualCacheSize;
l9 = i.allDataLocal;
m9 = i.cacheSize;
n9 = i.collectionCount;
o9 = i.highestSavedPage;
p9 = i.highestSavedPageSize;
t9 = S9;
A9(V8);
}
} else {
K9(function() {
A9(V8);
}, z9("Unable to write settings during
initialization."));
}
}, z9("Unable to read settings from store."));
return y9;
};
d.createDataCache = function(a) {
P8(a.pageSize, "pageSize");
Q8(a.cacheSize, "cacheSize");
Q8(a.prefetchSize, "prefetchSize");
if (!f(a.name)) {
throw {
message: "Undefined or null name",
options: a
};
}
if (!f(a.source)) {
throw {
message: "Undefined source",
options: a
};
}
return new j9(a);
}
;
}
)(window);
}
}
});

Das könnte Ihnen auch gefallen