/**
 * Copyright (c) 2014, 2016, Oracle and/or its affiliates.
 * The Universal Permissive License (UPL), Version 1.0
 */
"use strict";
define(["ojs/ojcore","jquery","jqueryui-amd/widget","jqueryui-amd/unique-id","jqueryui-amd/keycode","jqueryui-amd/focusable","jqueryui-amd/tabbable","ojs/ojmessaging"],function(a,g){function c(a,b){function c(){var a=g(this),d=a.data(m);if(null!=d)for(var e=0;e<d.length;e++){var h=a.data("oj-"+d[e]);null!=h&&b(h)}}var d=g(a);d.hasClass(r)&&c.call(a);d.find("."+r).each(c)}function b(a){this.$L=function(){return a}}function d(a,b,c){Object.keys(b).forEach(function(d){var e=a[d]||[],h=b[d];c?e=e.concat(h):
e.push(h);a[d]=e});return a}function e(a,b,c,d,e,f,k){var g=c,l=!1,m={};delete d[e];Object.defineProperty(d,e,{get:function(){if(l||null!=a.rz)return g;var c=f(k?k():e);return h([b,c,g],m)},set:function(b){g=b;null!=a.rz?m[a.rz]=!0:l=!0},enumerable:!0})}function f(a){if(1===a.length){var c=a[0];return c instanceof b?c.$L():null}for(var c=!1,d=0;d<a.length&&!c;d++){var e=a[d];null!=e&&e instanceof b&&(c=!0)}return c?function(c){var d=[];a.forEach(function(a){null!=a&&a instanceof b?d.push(a.$L()(c)):
d.push(a)});return h(d)}:null}function h(a,b){for(var c=void 0,d=0;d<a.length;d++){var e=a[d];void 0!==e&&(c=g.isPlainObject(e)?k(g.isPlainObject(c)?[c,e]:[e],d==a.length-1?null:b,null):e)}return c}function k(a,b,c){for(var d={},e=a.length,h=0;h<e;h++)for(var f=a[h],l=Object.keys(f),m=0;m<l.length;m++){var t=l[m],r=null==b?null:null==c?t:c+"."+t;if(null==b||!b[r]){var n=f[t];void 0!==n&&(d[t]=g.isPlainObject(n)?k(g.isPlainObject(d[t])?[d[t],n]:[n],b,r):n)}}return d}function l(){return!0}a.Components=
{};o_("Components",a.Components,a);a.Components.Dp=function(b){var c=a.Components.r5||{};Object.keys(b).forEach(function(e){var h=b[e];if(!a.Wc.isPlainObject(h))throw"Invalid default options";c[e]=d(c[e]||{},h,!1)});a.Components.r5=c};o_("Components.setDefaultOptions",a.Components.Dp,a);a.Components.Zea=function(){return a.Components.r5||{}};o_("Components.getDefaultOptions",a.Components.Zea,a);a.Components.jg=function(a){return new b(a)};o_("Components.createDynamicPropertyGetter",a.Components.jg,
a);a.Components.Kf=function(a,b){var c=g(a),d=c.data(m);return d&&(null==b?b=d[0]:0>d.indexOf(b)&&(b=void 0),null!=b&&(d=c[b],"function"===typeof d))?d.bind(c):null};o_("Components.getWidgetConstructor",a.Components.Kf,a);a.Components.Ug=function(b){a.A.Eea(b);c(b,function(a){a.Mr()})};o_("Components.subtreeAttached",a.Components.Ug,a);a.Components.wi=function(a){c(a,function(a){a.uj()})};o_("Components.subtreeDetached",a.Components.wi,a);a.Components.wr=function(b){a.A.Eea(b);c(b,function(a){a.Rp()})};
o_("Components.subtreeShown",a.Components.wr,a);a.Components.Xt=function(a){c(a,function(a){a.Nm()})};o_("Components.subtreeHidden",a.Components.Xt,a);a.Components.AY=function(a){var b=a.data(m);return g.isArray(b)&&-1<b.indexOf("ojPopup")&&a.is("."+r)?!0:!1};a.Components.Dna=function(b){for(var c={},e=a.Components.Zea(),h=b.length-1;0<=h;h--){var f=e[b[h]];void 0!==f&&(c=d(c,f,!0))}return c};a.Components.fo="data-oj-container";var m="oj-component-names",r="oj-component-initnode";a.Components.RB=
"_ojwidget";a.Components.Bx="_createPromise";a.Components.eP="_resolve";a.Components.dP="_promise";a.Components.gP={};a.Components.yP={};a.Components.Ua=function(b,c,d){b=a.hf.IA(b.toLowerCase());c?(c=a.hf.IA(c.toLowerCase()),c=a.Wc.qf({},a.Components.getMetadata(c),void 0,!0),a.Components.yP[b]=a.Wc.qf(c,d,void 0,!0)):a.Components.yP[b]=d};a.Components.getMetadata=function(b){return a.Components.yP[b.toLowerCase()]};a.Components.register=function(b,c){if(b&&document.registerElement){var d=b.toLowerCase();
if(!a.Components.gP[d]){a.Components.gP[d]=!0;var e=a.Components.Yta(c);document.registerElement(d,{prototype:e})}}};a.Components.Fga=function(b){return b?a.Components.gP[b.toLowerCase()]:!1};a.Components.bGa=function(b){var c=b[a.Components.Bx];c||(c={},c[a.Components.dP]=new Promise(function(b){c[a.Components.eP]=b}),b[a.Components.Bx]=c);return c[a.Components.dP]};a.Components.Yta=function(b){var c=Object.create(HTMLElement.prototype),d=b.properties,e=b.methods;b=b.extension;var h=b._widgetName;
a.Components.Lna(d,c);a.Components.Kna(e,c);a.Components.Rna(h,d,b,c);return c};a.Components.Lna=function(b,c){Object.keys(b).forEach(function(b){a.Components.Mna(b,c)})};a.Components.Mna=function(b,c){Object.defineProperty(c,b,{configurable:!0,enumerable:!0,get:function(){return this[a.Components.RB]("option",b)},set:function(c){if(this[a.Components.RB])this[a.Components.RB]("option",b,c)}})};a.Components.Kna=function(a,b){Object.keys(a).forEach(function(c){var d=a[c].params,e=[];d&&d.forEach(function(a){a=
a.name;-1===a.indexOf(".")&&e.push(a)});b[c]=new Function(e,"return this._ojwidget('"+c+(0<e.length?"', "+e.join():"'")+");")})};a.Components.Rna=function(b,c,d,e){e.createdCallback=function(){var b=this[a.Components.Bx];if(b){if(b=b[a.Components.eP])b(),delete this[a.Components.Bx][a.Components.eP]}else this[a.Components.Bx]={},this[a.Components.Bx][a.Components.dP]=Promise.resolve()};e.attachedCallback=function(){if(this[a.Components.RB])a.Components.Ug(this);else{var e=d._innerElement,h=this;e&&
(h=(h=this.firstElementChild)&&h.tagName.toLowerCase()===e?h:a.Components.uqa(e,this,d._defaultAttrs,d._transferAttrs));var f=d._hasWrapper?{_wrapper:this}:{},k=this,l=!1;Object.keys(c).forEach(function(b){var d=a.hf.IA(b);k.hasAttribute(d)&&(d=k.getAttribute(d),a.hf.WE(d).expr?l=!0:f[b]=a.hf.DL(b,d,c[b].type))});l||this.classList.add("oj-complete");f.optionChange=function(a,b){this.dispatchEvent(new CustomEvent(b.option+"-changed",{detail:{value:b.value,previousValue:b.previousValue}}))};g(h)[b](f);
this[a.Components.RB]=a.Components.Kf(h,b)}};e.detachedCallback=function(){a.Components.wi(this)};e.attributeChangedCallback=function(b,d,e){var h=a.hf.iX(b),f=c[h];f&&(this.dispatchEvent(new CustomEvent("attribute-changed",{detail:{attribute:b,value:e,previousValue:d}})),a.hf.WE(e).expr||(this[h]=a.hf.DL(h,e,f.type)))}};a.Components.uqa=function(a,b,c,d){var e=document.createElement(a);b.appendChild(e);a=[];for(var h=0;h<b.childNodes.length;h++)a.push(b.childNodes[h]);for(h=0;h<a.length;h++)b.appendChild(a[h]);
if(c)for(var f in c)e.setAttribute(f,c[f]);d&&d.forEach(function(a){b.hasAttribute(a)&&e.setAttribute(a,b.getAttribute(a))});g(e).append(g(b).children());return e};(function(){g.widget("oj.baseComponent",{options:{contextMenu:null,rootAttributes:null,optionChange:void 0,destroy:void 0},refresh:function(){this.hz=null},_createWidget:function(a,b){a&&(this.oe=a._wrapper);this.S$=this.options||{};this.M4=a||{};this._super(a,b);this.I0()},oH:function(){var a=this.options.rootAttributes;if(a){var b=this.widget();
if(null!=b){var c=a["class"];c&&b.addClass(c);if(c=a.style){var d=b.attr("style");d?b.attr("style",d+";"+c):b.attr("style",c)}a=g.extend({},a);delete a["class"];delete a.style;b.attr(a);delete a.id;a=Object.keys(a);if(a.length)throw Error("Unsupported values passed to rootAttributes option: "+a.toString());}}},_create:function(){this.LB(this.element);this.Wf(this.S$,this.M4);delete this.S$;delete this.M4;this._ComponentCreate();this.Lh();this.element.addClass(r)},Wf:function(a,b){this.DCa(a,b);this.Wwa(b)},
_ComponentCreate:function(){var a=this.element,b=this.widgetName,c=a.data(m);c||(c=[],a.data(m,c));0>c.indexOf(b)&&c.push(b)},Lh:function(){this.oH();this.Sl=this.eventNamespace+"contextMenu";this.hca(!0)},I0:g.noop,LB:function(){},ina:function(a){var b=this;this.LV=[];g.each(a,function(a,c){var d={},e=c.attributes;b.LV.push({element:c,attributes:d});g.each(e,function(a,b){d[b.name]={attr:b.value}})})},Bla:function(a){var b=this.LV;if(void 0===b)return null;a=a[0];for(var c=0,d=b.length;c<d;c++){var e=
b[c];if(e.element===a)return e.attributes}return{}},Qx:function(){},Oma:function(){g.each(this.LV,function(a,b){var c=g(b.element),d=b.attributes;if(1===c.length){for(var e=b.element.attributes,h=[],f=0,k=e.length;f<k;f++)e[f].name in d||h.push(e[f].name);f=0;for(k=h.length;f<k;f++)c.removeAttr(h[f]);for(var l in d)c.attr(l,d[l].attr)}})},PG:function(){return this.widgetFullName},yB:function(a,b,c){return b==c},F:function(b,c){var d={},e;2<arguments.length?d=Array.prototype.slice.call(arguments,1):
2==arguments.length&&(d=arguments[1],"object"===typeof d||d instanceof Array||(d=[d]));e=this.option(s+b);return null==e?b:a.va.Pc(e.toString(),d)},getNodeBySubId:function(a){return null==a||null==a.subId?this.element?this.element[0]:null:null},getSubIdByNode:function(){return null},destroy:function(){this._trigger("destroy");a.A.dispatchEvent(this.element[0],new CustomEvent("_ojDestroy"));this._super();this.Naa();this.element.removeClass(r);this.widget().removeClass("oj-disabled");this.CV(this.element);
var b=this.element,c=this.widgetName,d=b.data(m);d&&(c=d.indexOf(c),0<=c&&(d.splice(c,1),0===d.length&&b.removeData(m)));this.Qx();this.q9?this.element.attr("contextmenu",this.q9):this.element.removeAttr("contextmenu");this.hz=null},option:function(a,b){if(0===arguments.length)return g.widget.extend({},this.options);var c=arguments[0],d=c,e=null,h={};if("string"===typeof c){var d={},f=c.split("."),c=f.shift();if(f.length){var e=f.join("."),k;try{1<arguments.length&&(this.rz=e),k=d[c]=g.widget.extend({},
this.options[c])}finally{this.rz=null}for(c=0;c<f.length-1;c++)k[f[c]]=k[f[c]]||{},k=k[f[c]];c=f.pop();if(1===arguments.length)return void 0===k[c]?null:k[c];k[c]=b}else{if(1===arguments.length)return void 0===this.options[c]?null:this.options[c];d[c]=b}h=arguments[2]||h}else h=arguments[1]||h;null!=e&&(h=g.widget.extend({},h,{subkey:e}));(e=h?h._context:null)&&e.pb?this.wxa(d,h):this._setOptions(d,h);return this},wxa:function(a,b){for(var c in a){var d=a[c],e=this.options[c];this.options[c]=d;this.Q$(c,
d,e,b)}},_setOptions:function(a,b){for(var c in a)this._setOption(c,a[c],b);return this},_setOption:function(a,b,c){var d=this.options[a];if("disabled"===a)this.options[a]=b,this.widget().toggleClass("oj-disabled",!!b).attr("aria-disabled",b),b&&this.CV(this.widget());else{try{var e=null==c?null:c.subkey;null!=e&&(this.rz=e);this._super(a,b)}finally{this.rz=null}"contextMenu"===a&&this.hca(!1)}this.Q$(a,b,d,c);return this},Q$:function(a,b,c,d){var e=!1,h=null,f=!1,k=!1,l=null,m=null,t;d&&(e=d.changed,
h=d._context)&&(l=h.originalEvent,f=void 0===h.Ed?null!=l:h.Ed,k=h.readOnly,m=h.Ot,t=h.Rk);if(e||!this.yB(a,c,b))m=m||{},m.writeback=f?"shouldWrite":"shouldNotWrite",k&&(m.readOnly=!0),a={option:a,previousValue:c,value:b,optionMetadata:m},null!=t&&(a=g.extend({},t,a)),this._trigger("optionChange",l,a)},_trigger:function(a,b,c){return this.IW(a,b,c).proceed},IW:function(a,b,c){var d=this.options[a];c=c||{};b=g.Event(b,n);b.type=(this.widgetEventPrefix+a).toLowerCase();b.target=this.element[0];this.element.trigger(b,
c);return{proceed:!(g.isFunction(d)&&!1===d.apply(this.element[0],[b].concat(c))||b.isDefaultPrevented()),event:b}},Wwa:function(a){var b=this.element.attr("contextmenu");this.q9=b;!b||"contextMenu"in a||this.option("contextMenu",document.getElementById(b),{_context:{pb:!0}})},hca:function(b){this.Naa();if(this.options.contextMenu){var c=this.widget(),d=this.element;b&&!d.is(c)&&d.removeAttr("contextmenu");(b=g(this.options.contextMenu).attr("id"))&&c.attr("contextmenu",b);var e=this;this.baa=function(a){121==
a.which&&a.shiftKey&&e.K6().is(":visible")&&a.preventDefault()};var h=a.A.DO,f=!1,k=!1,l,m,t,r=null,n=function(a,b,d){f=d;var h=e.CS();if(f)c.one("touchend"+e.Sl,function(){h.Ux(!0);setTimeout(function(){h.Ux(!1)},50)});"touchstart"===r&&"contextmenu"===a.type||"contextmenu"===r&&"touchstart"===a.type?(r=null,clearTimeout(t)):a.isDefaultPrevented()||a.originalEvent&&a.originalEvent.defaultPrevented||e.Xf()||(e.jh(h,a,b),!e.K6().is(":visible")||(a.preventDefault(),document.addEventListener("keyup",
e.baa),"touchstart"!==a.type&&"contextmenu"!==a.type))||(r=a.type,t=setTimeout(function(){r=null},300))};this.A4=function(a){f&&(a.preventDefault(),a.stopPropagation(),f=!1)};c[0].addEventListener("click",this.A4,!0);c.on("touchstart"+this.Sl+" mousedown"+this.Sl+" keydown"+this.Sl+" ",function(a){if("mousedown"!==a.type||!e.CS().Ux()){f=!1;if("touchstart"===a.type&&1===a.originalEvent.touches.length){var b=a.originalEvent.touches[0];l=b.pageX;m=b.pageY;k=!0;this.tR=setTimeout(n.bind(void 0,a,"touch",
!0),h)}return!0}}).on("touchmove"+this.Sl,function(a){a=a.originalEvent.touches[0];if(5<Math.abs(l-a.pageX)||5<Math.abs(m-a.pageY))k=!1,clearTimeout(this.tR);return!0}).on("touchend"+this.Sl+" touchcancel"+this.Sl,function(){k=!1;clearTimeout(this.tR);return!0}).on("keydown"+this.Sl+" contextmenu"+this.Sl,function(a){("contextmenu"===a.type||121==a.which&&a.shiftKey)&&n(a,k?"touch":"keydown"===a.type?"keyboard":"mouse",!1);return!0}).addClass(a.A.Ke()?"oj-menu-context-menu-launcher":void 0)}},Kba:function(){this.Xu=
g(this.options.contextMenu).first();this.aI=this.Xu.data("oj-ojMenu");if(!this.aI)throw Error('"contextMenu" option set to "'+this.options.contextMenu+'", which does not reference a valid JET Menu.');var a=this;this.Xu.on("ojclose"+this.Sl,function(){document.removeEventListener("keyup",a.baa)})},CS:function(){this.aI||this.Kba();return this.aI},K6:function(){this.Xu||this.Kba();return this.Xu},Naa:function(){this.widget().removeAttr("contextmenu").off(this.Sl).removeClass("oj-menu-context-menu-launcher")[0].removeEventListener("click",
this.A4,!0);this.Xu&&this.Xu.off(this.Sl);clearTimeout(this.tR);this.Xu=this.aI=void 0},jh:function(a,b,c){this.kh(b,c)},kh:function(a,b,c,d,e){b={launcher:this.element,position:{mouse:{my:"start top",at:"start bottom",of:a,collision:"flipfit"},touch:{my:"start\x3e40 center",at:"start bottom",of:a,collision:"flipfit"},keyboard:{my:"start top",at:"start bottom",of:"launcher",collision:"flipfit"}}[b]};var h={initialFocus:"menu"};c=e?g.extend(b,c,h):g.extend(!0,b,c,h);e=this.CS();e.yH=!0;e.open(a,c,
d);e.yH=!1},CV:function(a){a.removeClass("oj-hover oj-focus oj-focus-highlight oj-active");a.find(".oj-hover").removeClass("oj-hover");a.find(".oj-focus").removeClass("oj-focus");a.find(".oj-focus-highlight").removeClass("oj-focus-highlight");a.find(".oj-active").removeClass("oj-active")},Dv:function(){return!a.A.QIa()},Qe:function(a){var b;g.isPlainObject(a)?b=a.element:(b=a,a={});a=a.afterToggle||g.noop;b.on("mouseenter"+this.eventNamespace,this.Qwa.bind(this,a)).on("mouseleave"+this.eventNamespace,
this.iU.bind(this,"oj-hover",a))},QP:function(a){a&&g(a).off("mouseenter"+this.eventNamespace+" mouseleave"+this.eventNamespace)},rk:function(b){var c;g.isPlainObject(b)?c=b.element:(c=b,b={});b=b.afterToggle||g.noop;if(a.A.Ke())c.on("touchstart"+this.eventNamespace,this.b3.bind(this,b)).on("touchend"+this.eventNamespace+" touchcancel"+this.eventNamespace,this.iU.bind(this,"oj-active",b));c.on("mousedown"+this.eventNamespace,this.b3.bind(this,b)).on("mouseup"+this.eventNamespace,this.iU.bind(this,
"oj-active",b))},PP:function(a){a&&g(a).off("touchstart"+this.eventNamespace+" touchend"+this.eventNamespace+" touchcancel"+this.eventNamespace+" mousedown"+this.eventNamespace+" mouseup"+this.eventNamespace)},b3:function(a,b){var c=g(b.currentTarget);c.hasClass("oj-disabled")||"touchstart"!==b.type&&!this.Dv(b)||(c.addClass("oj-active"),a(b.type))},Qwa:function(a,b){var c=g(b.currentTarget);!c.hasClass("oj-disabled")&&this.Dv(b)&&(c.addClass("oj-hover"),a(b.type))},iU:function(a,b,c){g(c.currentTarget).removeClass(a);
b(c.type)},_focusable:function(b){g.isPlainObject(b)||(b={element:b});b.component=this;a.A.kN(b)},Nu:function(a){if(a){g(a).off(this.eventNamespace);var b=this.bindings;b&&(this.bindings=g(b.not(a)))}},tfa:function(a){return this.option(s+a)},jd:function(){return a.A.yn()},Mr:function(){this.hz=null},uj:function(){this.hz=null;this.CV(this.widget())},Rp:function(){},Nm:function(){},Xf:function(){return this.options.disabled||this.u3?!0:!1},TB:function(a){this.u3=a},oua:function(){var b=[],c=this,
d=0;this.eda(function(e){e=0==d?c.PG():e.widgetFullName;d++;var h=a.va.bM(e);null==h||g.isEmptyObject(h)||b.push(e)});var e=b.length;return 0<e?function(){if(1==e)return a.va.bM(b[0]);for(var c={},d=e-1;0<=d;d--)g.widget.extend(c,a.va.bM(b[d]));return c}:null},fta:function(){if(!this.hz){var b={};this.hz=b;for(var c=this.element[0],d=c,e=[];d;){var h=d.getAttribute,h=h?h.call(d,a.Components.fo):null;null!=h&&e.push(h);d=d.parentNode}b.containers=e;b.element=c}return this.hz},DCa:function(a,b){var c=
this.options,d=this.oua(),h=b[t];null==d||void 0!==h&&!g.isPlainObject(h)||e(this,void 0,b[t],c,t,d);this.nya(a,b)},nya:function(b,c){var d=this.options,k=[];this.eda(function(a){k.push(a.widgetName)});k.push("default");var l=a.Components.Dna(k);if(!g.isEmptyObject(l)){var m=this,t=function(){return m.fta()},r;for(r in l){var n=c[r];if(void 0===n||g.isPlainObject(n)){var s=l[r];if(s){var B=f(s);B?e(this,b[r],n,d,r,B,t):(s=[b[r]].concat(s),s.push(n),d[r]=h(s))}}}}},eda:function(a){for(var b=this.constructor.prototype;null!=
b&&"oj"===b.namespace;)a(b),b=Object.getPrototypeOf(b)}});delete g.fn.baseComponent})();a.Na=function(a,b,c,d){g.widget(a,b,c);d&&delete g.fn[a.split(".")[1]];if("oj.oj"===a.substring(0,5)||"oj._oj"===a.substring(0,6)){b=a.split(".");a=b[0];b=b[1];var e=a+"-"+b;g.expr[":"][("_"===b.substring(0,1)?"_"+a+"-"+b.substring(3):a+"-"+b.substring(2)).toLowerCase()]=function(a){return!!g.data(a,e)}}};var t="translations",s=t+".",n={isDefaultPrevented:function(){return!1},preventDefault:function(){this.isDefaultPrevented=
l},stopPropagation:function(){this.isPropagationStopped=l},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l}};g(document).ready(function(){var a=g("\x3cdiv style\x3d'border: 1px solid;border-color:red green;position: absolute;top: -999px;background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs\x3d);'\x3e\x3c/div\x3e"),b;a.appendTo("body");b=a.css("backgroundImage");a.css("borderTopColor")!=a.css("borderRightColor")&&(null==b||"none"!=b&&"url (invalid-url:)"!=
b)||g("body").addClass("oj-hicontrast");a.remove()});a.A={};a.A.Dla="\x3chtml\x3e";a.A.Cla="\x3c/html\x3e";a.A.Vla={SPAN:1,B:1,I:1,EM:1,BR:1,HR:1,LI:1,OL:1,UL:1,P:1,TT:1,BIG:1,SMALL:1,PRE:1};a.A.Ula={"class":1,style:1};a.A.THa=function(b){return 0===b.indexOf(a.A.Dla)&&b.lastIndexOf(a.A.Cla)===b.length-7?!0:!1};a.A.QEa=function(b){var c=g(document.createElement("span")).get(0);(c.innerHTML=b)&&0<=b.indexOf("\x3c")&&a.A.q4(c);return c};a.A.q4=function(b){for(var c=b.childNodes,d,e,h,f,k,l=c.length-
1;0<=l;){if((d=c.item(l))&&1===d.nodeType)if(a.A.Vla[d.nodeName]){e=d.attributes;for(k=e.length-1;0<=k;k--)h=e[k],(f=void 0!==g(d).attr(h.name))&&(a.A.Ula[h.name]||d.removeAttribute(h.nodeName));a.A.q4(d)}else d&&b.removeChild(d);l--}};a.A.np=function(a,b){for(var c=b.parentNode;c;){if(c==a)return!0;c=c.parentNode}return!1};a.A.vt=function(b,c){return c==b?!0:a.A.np(b,c)};a.A.Pk=function(b,c,d){var e=g(b),h=e.data(a.A.JB);null==h&&(h=new a.A.Nma(b),e.data(a.A.JB,h),h.start());h.addListener(c,d)};
a.A.om=function(b,c){var d=g(b),e=d.data(a.A.JB);null!=e&&(e.removeListener(c),e.pi()&&(e.stop(),d.removeData(a.A.JB)))};a.A.Eea=function(b){g(b).find(".oj-helper-detect-expansion").parent().each(function(b,c){var d=g(c).data(a.A.JB);null!=d&&d.Wq(!0)})};a.A.Yq=function(b){var c=a.Ya.Uz();return a.Ya.Cm.R_===c.os?b.metaKey:b.ctrlKey};a.A.dispatchEvent=function(a,b){var c=a.disabled;try{a.disabled=!1,a.dispatchEvent(b)}finally{a.disabled=c}};a.A.xxa=(window.requestAnimationFrame||window.mozRequestAnimationFrame||
window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,0)}).bind(window);a.A.n4=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||function(a){return window.clearTimeout(a)}).bind(window);a.A.Nma=function(b){function c(a){var b=!1;if(null!=A.offsetParent){var e=A.offsetWidth,h=A.offsetHeight;if(s!==e||G!==h)r=t,f(e,h),b=!0,a&&d(!0)}return b}function d(c){var e=b.offsetWidth,h=b.offsetHeight;k.has()&&(c?(null!==n&&a.A.n4(n),n=a.A.xxa(function(){n=
null;k.fire(e,h)})):k.fire(e,h));for(c=0;c<l.length;c++)l[c].$L()(e,h)}function e(a){a.stopPropagation();!c(!0)&&0<r&&null!=A.offsetParent&&(0==A.scrollLeft||0==A.scrollTop)&&(r--,f(s,G))}function h(){d(!1)}function f(a,b){s=a;G=b;var c=A.firstChild.style,d=1;do c.width=a+d+"px",c.height=b+d+"px",A.scrollLeft=A.scrollTop=d,d++;while((0==A.scrollTop||0==A.scrollLeft)&&5>=d);H.scrollLeft=a;H.scrollTop=b}var k=g.Callbacks(),l=[],m=[],t=2,r=0,n=null,s=null,G=null,A=null,H=null,F=null,K=null;this.addListener=
function(b,c){void 0===c||0===c?k.add(b):(l.push(new a.A.Qpa(b,c)),m.push(b))};this.removeListener=function(a){var b=m.indexOf(a);0<=b?(m.splice(b,1),l.splice(b,1)[0].stop()):k.remove(a)};this.pi=function(){return!k.has()&&0==m.length};this.start=function(){K=e.bind(this);if(b.attachEvent)F=h.bind(this),b.attachEvent("onresize",F);else{var a=b.childNodes[0];A=document.createElement("div");A.className="oj-helper-detect-expansion";var c=document.createElement("div");A.appendChild(c);null!=a?b.insertBefore(A,
a):b.appendChild(A);A.addEventListener("scroll",K,!1);H=document.createElement("div");H.className="oj-helper-detect-contraction";a=document.createElement("div");a.style.width="200%";a.style.height="200%";H.appendChild(a);b.insertBefore(H,A);H.addEventListener("scroll",K,!1);this.Wq(!1)}};this.stop=function(){null!=n&&(a.A.n4(n),n=null);null!=A?(A.removeEventListener("scroll",K),H.removeEventListener("scroll",K),b.removeChild(A),b.removeChild(H)):b.detachEvent("onresize",F)};this.Wq=function(a){var b=
c(a);a&&!b&&null!=A.offsetParent&&f(s,G)}};a.A.JB="_ojResizeTracker";a.A.HM=function(a){return/^[A-Za-z][0-9A-Z_a-z-]*$/.test(a)};a.A.Qpa=function(a,b){function c(){e=Array.prototype.slice.call(arguments);null==h&&(h=window.setTimeout(d,b))}function d(){a.apply(null,e);h=null}var e=null,h=null;this.$L=function(){return c};this.stop=function(){null!=h&&(window.clearTimeout(h),h=null)}};a.A.Ke=function(){return"ontouchstart"in window||0<navigator.msMaxTouchPoints||0<navigator.maxTouchPoints};a.A.sia=
function(b){a.A.eya=b};a.A.unwrap=function(b,c){var d=a.A.eya;d&&d==b.parent().get(0)||(1<arguments.length?c.replaceWith(b):b.unwrap())};a.A.yga=function(b){function c(b){var d=b.target,e=g(d),h=d.getBoundingClientRect(),f=a.A.jM(),k="ltr"===a.A.yn();return k&&("HTML"===d.nodeName||"visible"!==e.css("overflow-x"))&&b.clientX>h.right-f?!0:!k&&"HTML"===d.nodeName&&b.clientX>h.left-f?!0:!k&&"visible"!==e.css("overflow-x")&&b.clientX<h.left+f?!0:("HTML"===d.nodeName||"visible"!==e.css("overflow-y"))&&
b.clientY>h.bottom-f?!0:!1}if(!("clientX"in b&&"clientY"in b))return!1;var d=a.Ya.Uz();if(a.Ya.Cm.l_===d.os||a.Ya.Cm.wO===d.os)b=!1;else{var e;if(a.Ya.Tn.B_===d.engine)try{e=b.originalTarget.localName?!1:!0}catch(h){e=!0}else e=a.Ya.Tn.VO===d.engine?c(b):a.Ya.tm.uO===d.browser?c(b):!1;b=e}return b};a.A.jM=function(){var b=a.A.ABa;if(g.isNumeric(b))return b;b=g("\x3cdiv /\x3e");g(document.body).append(b);b.width(50).height(50).css({overflow:"scroll",visibility:"hidden",position:"absolute"});var c=
g("\x3cdiv /\x3e");c.height(1);b.append(c);var c=c.width(),d=b.width();b.remove();return b=a.A.ABa=d-c};a.A.yn=function(){var a=document.documentElement.getAttribute("dir");a&&(a=a.toLowerCase());return"rtl"===a?"rtl":"ltr"};a.A.Nq=function(a){return isNaN(a)?a&&0<a.length&&"auto"!=a?(a=parseInt(a,10),isNaN(a)&&(a=0),a):0:a};a.A.$Fa=function(a){return isNaN(a)?a&&0<a.length?(a=parseFloat(a),isNaN(a)&&(a=0),a):0:a};a.A.xP="oj-logical-parent";a.A.kGa=function(b){if(b)return b.data(a.A.xP)};a.A.tia=
function(b,c){b&&(null===c?b.removeData(a.A.xP):b.data(a.A.xP,c))};a.A.XHa=function(b,c){a.o.fX(b);a.o.fX(c);for(var d=c;d;){if(d==b)return!0;var e=a.A.kGa(g(d)),d=e?e[0]:d.parentNode}return!1};a.A.bKa=function(a){var b=document.createElement("a");b.href=a;a=b.protocol;null!=a&&(a=a.toLowerCase());if(0>["http:","https:"].indexOf(a))throw a+" is not a valid URL protocol";};a.A.aDa=function(){g(document.body).hasClass("oj-hybrid")&&document.body.addEventListener("contextmenu",function(a){a.preventDefault()},
!0)};a.A.aDa();a.A.DO=750;a.A.QIa=function(){function a(){b=Date.now()}var b=0;document.addEventListener("touchend",a,!0);document.addEventListener("touchcancel",a,!0);return function(){return 500>Date.now()-b}}();a.A.PIa=function(){var b=0,c,d=a.A.DO+600;document.addEventListener("mousedown",function(){var d=Date.now();if(!c||d>b+a.A.DO)b=d,c=!1},!0);document.addEventListener("touchstart",function(){b=Date.now();c=!0},!0);document.addEventListener("mouseup",function(){b=Date.now();c=!1},!0);document.addEventListener("touchend",
function(){b=Date.now();c=!1},!0);return function(){return Date.now()-b<(c?d:600)}}();a.A.kN=function(){var b=0,c=(a.td.Of("oj-focus-config")||{}).focusHighlightPolicy;return function(d){var e=d.element;if(d.remove){e.removeClass("oj-focus oj-focus-highlight");var h=e.data("ojFocusable");void 0!=h&&e.off(".ojFocusable"+(""+h).split(",").join(" .ojFocusable")).removeData("ojFocusable")}else{var f=d.afterToggle||g.noop,h=function(a){a.addClass("oj-focus");f("focusin")},k=function(b){b.addClass("oj-focus");
var e;a:{e=d.getFocusHighlightPolicy;var h=d.recentPointer;switch(e?e():c){case "all":e=!0;break a;case "none":e=!1;break a;default:e=!(a.A.PIa()||h&&h())}}e&&b.addClass("oj-focus-highlight");f("focusin")};(d.setupHandlers||function(a,c){function h(a){c(g(a.currentTarget))}function f(b){a(g(b.currentTarget))}var k=d.component;if(k)k._on(e,{focusin:f,focusout:h});else{var k=b++,l=e.data("ojFocusable");e.data("ojFocusable",void 0==l?k:l+","+k);l={};k=".ojFocusable"+k;l["focusin"+k]=f;l["focusout"+k]=
h;e.on(l)}})(d.applyHighlight?k:h,function(a){a.removeClass("oj-focus oj-focus-highlight");f("focusout")})}}}();a.wb=function(a){this.Init(a)};a.b.ta(a.wb,a.b,"oj.ComponentMessaging");a.wb.Re={NONE:"none",vG:"notewindow",hB:"placeholder",dB:"inline"};a.wb.kP={};a.wb.zN=function(b,c){b&&"function"===typeof c&&(a.wb.kP[b]=c)};a.wb.prototype.Init=function(b){a.wb.u.Init.call(this);this.xa=b;this.VB=!1;this.rxa()};a.wb.prototype.ct=function(b,c,d){var e=this;a.o.hi(d);this.Id=b;this.O4=c;this.cK=a.Wc.qf(this.cK||
{},d);this.VB?this.$za():(g.each(this.Ws,function(a,b){b.ct(e)}),this.VB=!0)};a.wb.prototype.update=function(b){a.o.hi(b);a.o.Hda(this.VB);this.cK=a.Wc.qf(this.cK||{},b);this.VB&&g.each(this.Ws,function(a,c){c.NZ(b)&&c.update()})};a.wb.prototype.dp=function(){g.each(this.Ws,function(a,b){b.dp()});this.VB=!1;this.O4=this.Id=this.xa=null;this.Ws={}};a.wb.prototype.close=function(){g.each(this.Ws,function(a,b){b.close()})};a.wb.prototype.qC=function(b,c){return new (a.wb.kP[b]||a.wb.kP[a.wb.Re.NONE])(c)};
a.wb.prototype.Vsa=function(){return this.xa||null};a.wb.prototype.Bta=function(){return this.Id||null};a.wb.prototype.Wsa=function(){return this.O4||null};a.wb.prototype.Dl=function(){return this.cK||{}};a.wb.prototype.H7=function(){var b={},c=!1,d,e,h=this.xa.options.placeholder,f,k,l,m,t=this.xa.options.displayOptions||{},r={};k=Object.keys(t);for(l=0;l<k.length;l++){e=k[l];d=t[e];c=!1;f=e+"";if(Array.isArray(d))for(m=0;m<d.length;m++)e=d[m],c||(c=this.jba(f,e,h,r));else"string"===typeof d&&(c||
(c=this.jba(f,d,h,r)));c||(r[f]=a.wb.Re.NONE)}g.each(a.wb.Re,function(a,c){b[c]=[]});g.each(r,function(a,c){b[c].push(a)});return b};a.wb.prototype.jba=function(b,c,d,e){var h=!1;switch(c){case a.wb.Re.hB:"converterHint"!==b||h||d||(e[b]=c,h=!0);break;case a.wb.Re.dB:"messages"!==b||h||(e[b]=c,h=!0);break;default:h||(e[b]=c,h=!0)}return h};a.wb.prototype.rxa=function(){var b=this.H7(),c=b[a.wb.Re.vG],d=b[a.wb.Re.NONE],e=b[a.wb.Re.hB],b=b[a.wb.Re.dB],h={};0<c.length&&(h[a.wb.Re.vG]=this.qC(a.wb.Re.vG,
c));0<e.length&&(h[a.wb.Re.hB]=this.qC(a.wb.Re.hB,e));0<b.length&&(h[a.wb.Re.dB]=this.qC(a.wb.Re.dB,b));h[a.wb.Re.NONE]=this.qC(a.wb.Re.NONE,d);this.Ws=h};a.wb.prototype.$za=function(){var b=this.H7(),c,d=this;g.each(b,function(b,e){b+="";c=d.Ws[b];e&&0<e.length?c?c&&c.Qw(e):(c=d.qC(b,e),d.Ws[b]=c,c.ct(d)):c&&a.wb.Re.NONE!==b&&(c.dp(),delete d.Ws[b])})};a.md=function(a){this.Init(a)};a.b.ta(a.md,a.b,"oj.MessagingStrategy");a.md.prototype.Init=function(b){a.o.yL(b);a.md.u.Init.call(this);this.oI=b};
a.md.prototype.ct=function(a){this.fs=a};a.md.prototype.dp=function(){};a.md.prototype.close=function(){};a.md.prototype.Qw=function(a){this.Init(a)};a.md.prototype.NZ=function(){return!0};a.md.prototype.update=function(){};a.md.prototype.kl=function(){return this.fs.Bta()};a.md.prototype.E_=function(){return this.fs.Wsa()};a.md.prototype.Bm=function(){return this.fs.Vsa()};a.md.prototype.lO=function(){return this.nO().xD};a.md.prototype.kO=function(){return this.nO().Yz()};a.md.prototype.F_=function(){var a=
[],b=this.Dl();(b=b&&b.eea)&&a.push(b);return a};a.md.prototype.Qja=function(){var a=[],b=this.Dl();g.each(b&&b.eKa||[],function(b,c){a.push(c)});return a};a.md.prototype.Pja=function(){var a=this.Dl();return a&&a.title||""};a.md.prototype.nO=function(){var a=this.Dl();return a&&a.hja||null};a.md.prototype.tO=function(){var a=this.lO();return a&&0<a.length?!0:!1};a.md.prototype.w0=function(){return-1!==this.oI.indexOf("messages")?!0:!1};a.md.prototype.OO=function(){return-1!==this.oI.indexOf("converterHint")?
!0:!1};a.md.prototype.y0=function(){return-1!==this.oI.indexOf("validatorHint")?!0:!1};a.md.prototype.x0=function(){return-1!==this.oI.indexOf("title")?!0:!1};a.md.prototype.Tja=function(){return this.nO().FY()};a.md.prototype.Dl=function(){return this.fs?this.fs.Dl():{}};a.Dh=function(a){this.Init(a)};a.wb.zN(a.wb.Re.NONE,a.Dh);a.Dh.lH="oj-invalid";a.Dh.mH="oj-warning";a.b.ta(a.Dh,a.md,"oj.DefaultMessagingStrategy");a.Dh.prototype.update=function(){a.Dh.u.update.call(this);var b=this.kl(),c=this.kO(),
d=[],e=[],h=!1,f=this.Bm().widget();b&&(this.Tja()?(d.push(a.Dh.mH),e.push(a.Dh.lH),h=!0):this.tO()&&c===a.ia.Xc.WARNING?(d.push(a.Dh.lH),e.push(a.Dh.mH)):(d.push(a.Dh.lH),d.push(a.Dh.mH)),f.removeClass(d.join(" ")).addClass(e.join(" ")),this.E_().attr({"aria-invalid":h}))};a.Dh.prototype.dp=function(){this.Bm().widget().removeClass(a.Dh.lH).removeClass(a.Dh.mH);this.E_().removeAttr("aria-invalid");a.Dh.u.dp.call(this)};a.lk=function(a){this.Init(a)};a.wb.zN(a.wb.Re.hB,a.lk);a.b.ta(a.lk,a.md,"oj.PlaceholderMessagingStrategy");
a.lk.prototype.Init=function(b){a.lk.u.Init.call(this,b)};a.lk.prototype.ct=function(b){a.lk.u.ct.call(this,b);this.vV()};a.lk.prototype.Qw=function(b){a.lk.u.Qw.call(this,b);this.vV()};a.lk.prototype.NZ=function(a){return a&&void 0!==a.eea?!0:!1};a.lk.prototype.update=function(){a.lk.u.update.call(this);this.vV()};a.lk.prototype.vV=function(){var a=this.kl();this.uka()&&a&&(a=this.F_(),a=a.length?a[0]:"",this.Bm().option({placeholder:a},{_context:{PHa:!0}}))};a.lk.prototype.uka=function(){return this.OO()};
a.um=function(a,b){this.Init(a,b)};a.um.FY=function(b){return a.ia.Yz(b)>=a.ia.Xc.ERROR?!0:!1};a.b.ta(a.um,a.b,"oj.ComponentValidity");a.um.prototype.Init=function(b,c){a.um.u.Init.call(this);this.r9(c)};a.um.prototype.FY=function(){return this.Ds};a.um.prototype.Yz=function(){return this.zya};a.um.prototype.update=function(a,b){this.r9(b)};a.um.prototype.r9=function(b){this.Rpa=b;this.xD=this.vta();this.zya=a.ia.Yz(this.xD);this.Ds=a.um.FY(this.xD)};a.um.prototype.vta=function(){for(var b=this.Rpa||
[],c=[],d,e=0;e<b.length;e++)d=b[e],d instanceof a.ce&&!d.Sda()||c.push(d);return c};a.le={};a.le.w2=":tabbable";a.le.GL=function(b){var c=document.activeElement;return b&&c?a.A.vt(b,c):!1};a.le.UE=function(a){a.focus()};a.le.NX=function(b){(b=a.le.efa(b))&&a.le.UE(b)};a.le.efa=function(b){var c=g(b);return c.is(a.le.w2)?b:(b=c.find(a.le.w2))&&0<b.length?b[0]:null};a.le.lA=function(b){return g(b).is(":focusable")&&("A"!==b.nodeName||b.hasAttribute("tabindex")||a.Ya.Uz().browser!==a.Ya.tm.FO)?!0:!1};
a.Gm={};o_("Test",a.Gm,a);a.Gm.ready=!1;o_("Test.ready",a.Gm.ready,a);a.Gm.CFa=function(b){var c=b;if(a.bb.Je(b))try{c=JSON.parse(b)}catch(d){return null}return c&&c.element&&(b=g(c.element))?(b=a.Components.Kf(b[0],c.component),delete c.element,b("getNodeBySubId",c)):null};o_("Test.domNodeForLocator",a.Gm.CFa,a);a.Gm.eY=function(){return a.T.eY()};o_("Test.getOpenPopupCount",a.Gm.eY,a);a.Gm.FX=function(){return a.T.FX()};o_("Test.findOpenPopups",a.Gm.FX,a);a.Gm.tX=function(b,c){return a.T.tX(b,c)};
o_("Test.compareStackingContexts",a.Gm.tX,a);a.Components.Ua("baseComponent",null,{properties:{contextMenu:{type:"string"},rootAttributes:{type:"Object"},translations:{type:"Object"}},methods:{getNodeBySubId:{},option:{},refresh:{}},extension:{_widgetName:"baseComponent"}})});