/**
 * Copyright (c) 2014, 2017, 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 b(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 c(a){this.IM=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,k,f){var g=c,l=!1,m={};delete d[e];Object.defineProperty(d,e,{get:function(){if(l||null!=a.Jz)return g;var c=k(f?f():e);return h([b,c,g],m)},set:function(b){g=b;null!=a.Jz?m[a.Jz]=!0:l=!0},enumerable:!0})}function f(a){if(1===a.length){var b=a[0];return b instanceof c?b.IM():null}for(var b=!1,d=0;d<a.length&&!b;d++){var e=a[d];null!=e&&e instanceof c&&(b=!0)}return b?function(b){var d=[];a.forEach(function(a){null!=a&&a instanceof c?d.push(a.IM()(b)):
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 s=f[t];void 0!==s&&(d[t]=g.isPlainObject(s)?k(g.isPlainObject(d[t])?[d[t],s]:[s],b,r):s)}}return d}function l(){return!0}a.Components=
{};o_("Components",a.Components,a);a.Components.Wn=function(b){var c=a.Components.m6||{};Object.keys(b).forEach(function(e){var h=b[e];if(!a.Uc.isPlainObject(h))throw"Invalid default options";c[e]=d(c[e]||{},h,!1)});a.Components.m6=c};o_("Components.setDefaultOptions",a.Components.Wn,a);a.Components.oga=function(){return a.Components.m6||{}};o_("Components.getDefaultOptions",a.Components.oga,a);a.Components.Ne=function(a){return new c(a)};o_("Components.createDynamicPropertyGetter",a.Components.Ne,
a);a.Components.Yc=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.Yc,a);a.Components.rg=function(c){a.D.Ufa(c);b(c,function(a){a.gq()})};o_("Components.subtreeAttached",a.Components.rg,a);a.Components.Ch=function(a){b(a,function(a){a.Gj()})};o_("Components.subtreeDetached",a.Components.Ch,a);a.Components.Mr=function(c){a.D.Ufa(c);b(c,function(a){a.hq()})};
o_("Components.subtreeShown",a.Components.Mr,a);a.Components.ju=function(a){b(a,function(a){a.Vm()})};o_("Components.subtreeHidden",a.Components.ju,a);a.Components.qZ=function(a){var b=a.data(m);return g.isArray(b)&&-1<b.indexOf("ojPopup")&&a.is("."+r)?!0:!1};a.Components.epa=function(b){for(var c={},e=a.Components.oga(),h=b.length-1;0<=h;h--){var k=e[b[h]];void 0!==k&&(c=d(c,k,!0))}return c};a.Components.JY=function(b){return null==b?null:b.getAttribute("data-oj-internal")?a.Components.JY(b.parentNode):
a.Components.Yc(b)||b.classList.contains("oj-component")&&(b=g(b).find(".oj-component-initnode").not("[data-oj-internal]")[0]||b,a.Components.Yc(b))?b:a.Components.JY(b.parentNode)};o_("Components.getComponentElementByNode",a.Components.JY,a);a.Components.getSubIdByNode=function(b,c){return a.Components.cY(b,"getSubIdByNode",c)};o_("Components.getSubIdByNode",a.Components.getSubIdByNode,a);a.Components.getNodeBySubId=function(b,c){return a.Components.cY(b,"getNodeBySubId",c)};o_("Components.getNodeBySubId",
a.Components.getNodeBySubId,a);a.Components.THa=function(b,c){if(a.Components.Yc(b))return a.Components.Yc(b)("option",c);throw Error("node is not a component element");};o_("Components.getComponentOption",a.Components.THa,a);a.Components.vLa=function(b,c,d){if(a.Components.Yc(b))a.Components.Yc(b)("option",c,d);else throw Error("node is not a component element");};o_("Components.setComponentOption",a.Components.vLa,a);a.Components.cY=function(b,c,d){if(a.Components.Yc(b))return a.Components.Yc(b).apply(g(b),
[].slice.call(arguments,1));throw Error("node is not a component element");};o_("Components.callComponentMethod",a.Components.cY,a);a.Components.po="data-oj-container";var m="oj-component-names",r="oj-component-initnode";a.Components.jC="_ojwidget";a.Components.Ux="_createPromise";a.Components.OP="_resolve";a.Components.NP="_promise";a.Components.QP={};a.Components.iQ={};a.Components.Xa=function(b,c,d){b=a.sf.eB(b.toLowerCase());c?(c=a.sf.eB(c.toLowerCase()),c=a.Uc.yf({},a.Components.getMetadata(c),
void 0,!0),a.Components.iQ[b]=a.Uc.yf(c,d,void 0,!0)):a.Components.iQ[b]=d};a.Components.getMetadata=function(b){return a.Components.iQ[b.toLowerCase()]};a.Components.register=function(b,c){if(b&&document.registerElement){var d=b.toLowerCase();if(!a.Components.QP[d]){a.Components.QP[d]=!0;var e=a.Components.Hva(c);document.registerElement(d,{prototype:e})}}};a.Components.Wha=function(b){return b?a.Components.QP[b.toLowerCase()]:!1};a.Components.UHa=function(b){var c=b[a.Components.Ux];c||(c={},c[a.Components.NP]=
new Promise(function(b){c[a.Components.OP]=b}),b[a.Components.Ux]=c);return c[a.Components.NP]};a.Components.Hva=function(b){var c=Object.create(HTMLElement.prototype),d=b.properties,e=b.methods;b=b.extension;var h=b._widgetName;a.Components.mpa(d,c);a.Components.lpa(e,c);a.Components.spa(h,d,b,c);return c};a.Components.mpa=function(b,c){Object.keys(b).forEach(function(b){a.Components.npa(b,c)})};a.Components.npa=function(b,c){Object.defineProperty(c,b,{configurable:!0,enumerable:!0,get:function(){return this[a.Components.jC]("option",
b)},set:function(c){if(this[a.Components.jC])this[a.Components.jC]("option",b,c)}})};a.Components.lpa=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.spa=function(b,c,d,e){e.createdCallback=function(){var b=this[a.Components.Ux];if(b){if(b=b[a.Components.OP])b(),delete this[a.Components.Ux][a.Components.OP]}else this[a.Components.Ux]=
{},this[a.Components.Ux][a.Components.NP]=Promise.resolve()};e.attachedCallback=function(){if(this[a.Components.jC])a.Components.rg(this);else{var e=d._innerElement,h=this;e&&(h=(h=this.firstElementChild)&&h.tagName.toLowerCase()===e?h:a.Components.Zra(e,this,d._defaultAttrs,d._transferAttrs));var k=d._hasWrapper?{_wrapper:this}:{},f=this,l=!1;Object.keys(c).forEach(function(b){var d=a.sf.eB(b);f.hasAttribute(d)&&(d=f.getAttribute(d),a.sf.sF(d).expr?l=!0:k[b]=a.sf.nM(b,d,c[b].type))});l||this.classList.add("oj-complete");
k.optionChange=function(a,b){this.dispatchEvent(new CustomEvent(b.option+"-changed",{detail:{value:b.value,previousValue:b.previousValue}}))};g(h)[b](k);this[a.Components.jC]=a.Components.Yc(h,b)}};e.detachedCallback=function(){a.Components.Ch(this)};e.attributeChangedCallback=function(b,d,e){var h=a.sf.YX(b),k=c[h];k&&(this.dispatchEvent(new CustomEvent("attribute-changed",{detail:{attribute:b,value:e,previousValue:d}})),a.sf.sF(e).expr||(this[h]=a.sf.nM(h,e,k.type)))}};a.Components.Zra=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 k in c)e.setAttribute(k,c[k]);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.Az=null},_createWidget:function(a,
b){a&&(this.oe=a._wrapper);this.cba=this.options||{};this.F5=a||{};this._super(a,b);this.z1()},QH: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.dC(this.element);
this.Yf(this.cba,this.F5);delete this.cba;delete this.F5;this._ComponentCreate();this.Nh();this.element.addClass(r)},Yf:function(a,b){this.qEa(a,b);this.Gya(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)},Nh:function(){this.QH();this.cm=this.eventNamespace+"contextMenu";this.sda(!0,null)},z1:g.noop,dC:function(){},Koa:function(a){var b=this;this.vW=[];g.each(a,function(a,c){var d={},e=c.attributes;b.vW.push({element:c,
attributes:d});g.each(e,function(a,b){d[b.name]={attr:b.value}})})},cna:function(a){var b=this.vW;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{}},iy:function(){},poa:function(){g.each(this.vW,function(a,b){var c=g(b.element),d=b.attributes;if(1===c.length){for(var e=b.element.attributes,h=[],k=0,f=e.length;k<f;k++)e[k].name in d||h.push(e[k].name);k=0;for(f=h.length;k<f;k++)c.removeAttr(h[k]);for(var l in d)c.attr(l,d[l].attr)}})},
oH:function(){return this.widgetFullName},TB: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.Lc(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.D.dispatchEvent(this.element[0],
new CustomEvent("_ojDestroy"));this._super();this.Yba(this.options.contextMenu);this.element.removeClass(r);this.widget().removeClass("oj-disabled");this.mW(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.iy();this.u$?this.element.attr("contextmenu",this.u$):this.element.removeAttr("contextmenu");this.Az=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={},k=c.split("."),c=k.shift();if(k.length){var e=k.join("."),f;try{1<arguments.length&&(this.Jz=e),f=d[c]=g.widget.extend({},this.options[c])}finally{this.Jz=null}for(c=0;c<k.length-1;c++)f[k[c]]=f[k[c]]||{},f=f[k[c]];c=k.pop();if(1===arguments.length)return void 0===f[c]?null:f[c];f[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.kb?this.gza(d,h):this._setOptions(d,h);return this},gza:function(a,b){for(var c in a){var d=a[c],e=this.options[c];this.options[c]=d;this.aba(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.mW(this.widget());else{try{var e=null==c?null:c.subkey;null!=e&&(this.Jz=e);this._super(a,
b)}finally{this.Jz=null}"contextMenu"===a&&this.sda(!1,d)}this.aba(a,b,d,c);return this},aba:function(a,b,c,d){var e=!1,h=null,k=!1,f=!1,l=null,m=null,t;d&&(e=d.changed,h=d._context)&&(l=h.originalEvent,k=void 0===h.Cd?null!=l:h.Cd,f=h.readOnly,m=h.$t,t=h.bl);if(e||!this.TB(a,c,b))m=m||{},m.writeback=k?"shouldWrite":"shouldNotWrite",f&&(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.wX(a,
b,c).proceed},wX:function(a,b,c){var d=this.options[a];c=c||{};b=g.Event(b,q);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}},Gya:function(a){var b=this.element.attr("contextmenu");this.u$=b;!b||"contextMenu"in a||this.option("contextMenu",document.getElementById(b),{_context:{kb:!0}})},sda:function(b,c){this.Yba(c);if(this.options.contextMenu){var d=
this.widget(),e=this.element;b&&!e.is(d)&&e.removeAttr("contextmenu");(e=g(this.options.contextMenu).attr("id"))&&d.attr("contextmenu",e);var h=this;this.nba=function(a){121==a.which&&a.shiftKey&&h.G7().is(":visible")&&a.preventDefault()};var k=a.D.nP,f=!1,l=!1,m,t,r,s=null,q=function(a,b,c){f=c;var e=h.kT();if(f)d.one("touchend"+h.cm,function(){e.ny(!0);setTimeout(function(){e.ny(!1)},50)});"touchstart"===s&&"contextmenu"===a.type||"contextmenu"===s&&"touchstart"===a.type?(s=null,clearTimeout(r)):
a.isDefaultPrevented()||a.originalEvent&&a.originalEvent.defaultPrevented||h.Zf()||(h.ph(e,a,b),!e.widget().is(":visible")||(a.preventDefault(),document.addEventListener("keyup",h.nba),"touchstart"!==a.type&&"contextmenu"!==a.type))||(s=a.type,r=setTimeout(function(){s=null},300))};this.t5=function(a){f&&(a.preventDefault(),a.stopPropagation(),f=!1)};d[0].addEventListener("click",this.t5,!0);d.on("touchstart"+this.cm+" mousedown"+this.cm+" keydown"+this.cm+" ",function(a){if("mousedown"!==a.type||
!h.kT().ny()){f=!1;if("touchstart"===a.type&&1===a.originalEvent.touches.length){var b=a.originalEvent.touches[0];m=b.pageX;t=b.pageY;l=!0;this.eS=setTimeout(q.bind(void 0,a,"touch",!0),k)}return!0}}).on("touchmove"+this.cm,function(a){a=a.originalEvent.touches[0];if(5<Math.abs(m-a.pageX)||5<Math.abs(t-a.pageY))l=!1,clearTimeout(this.eS);return!0}).on("touchend"+this.cm+" touchcancel"+this.cm,function(){l=!1;clearTimeout(this.eS);return!0}).on("keydown"+this.cm+" contextmenu"+this.cm,function(a){("contextmenu"===
a.type||121==a.which&&a.shiftKey)&&q(a,l?"touch":"keydown"===a.type?"keyboard":"mouse",!1);return!0}).addClass(a.D.jf()?"oj-menu-context-menu-launcher":void 0)}},kT:function(){var b=a.Components.Yc(this.G7()[0],"ojMenu"),b=b&&b("instance");if(!b)throw Error('"contextMenu" option set to "'+this.options.contextMenu+'", which does not reference a valid JET Menu.');if(!this.J5){var c=this;b.widget().on("ojclose"+this.cm,function(){document.removeEventListener("keyup",c.nba)});this.J5=!0}return b},G7:function(){return g(this.options.contextMenu).first()},
Yba:function(a){this.widget().removeAttr("contextmenu").off(this.cm).removeClass("oj-menu-context-menu-launcher")[0].removeEventListener("click",this.t5,!0);clearTimeout(this.eS);g(a).off(this.cm);this.J5=!1},ph:function(a,b,c){this.qh(b,c)},qh: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.kT();e.$H=!0;e.open(a,c,d);e.$H=!1},mW: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")},Qv:function(){return!a.D.yja()},We:function(a){var b;g.isPlainObject(a)?b=a.element:(b=a,a={});a=a.afterToggle||g.noop;
b.on("mouseenter"+this.eventNamespace,this.Aya.bind(this,a)).on("mouseleave"+this.eventNamespace,this.RU.bind(this,"oj-hover",a))},BQ:function(a){a&&g(a).off("mouseenter"+this.eventNamespace+" mouseleave"+this.eventNamespace)},Gk:function(b){var c;g.isPlainObject(b)?c=b.element:(c=b,b={});b=b.afterToggle||g.noop;if(a.D.jf())c.on("touchstart"+this.eventNamespace,this.T3.bind(this,b)).on("touchend"+this.eventNamespace+" touchcancel"+this.eventNamespace,this.RU.bind(this,"oj-active",b));c.on("mousedown"+
this.eventNamespace,this.T3.bind(this,b)).on("mouseup"+this.eventNamespace,this.RU.bind(this,"oj-active",b))},AQ:function(a){a&&g(a).off("touchstart"+this.eventNamespace+" touchend"+this.eventNamespace+" touchcancel"+this.eventNamespace+" mousedown"+this.eventNamespace+" mouseup"+this.eventNamespace)},T3:function(a,b){var c=g(b.currentTarget);c.hasClass("oj-disabled")||"touchstart"!==b.type&&!this.Qv(b)||(c.addClass("oj-active"),a(b.type))},Aya:function(a,b){var c=g(b.currentTarget);!c.hasClass("oj-disabled")&&
this.Qv(b)&&(c.addClass("oj-hover"),a(b.type))},RU: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.D.TN(b)},Zu:function(a){if(a){g(a).off(this.eventNamespace);var b=this.bindings;b&&(this.bindings=g(b.not(a)))}},Jga:function(a){return this.option(s+a)},nd:function(){return a.D.In()},gq:function(){this.Az=null},Gj:function(){this.Az=null;this.mW(this.widget())},hq:function(){},Vm:function(){},Zf:function(){return this.options.disabled||
this.m4?!0:!1},lC:function(a){this.m4=a},Yva:function(){var b=[],c=this,d=0;this.sea(function(e){e=0==d?c.oH():e.widgetFullName;d++;var h=a.va.KM(e);null==h||g.isEmptyObject(h)||b.push(e)});var e=b.length;return 0<e?function(){if(1==e)return a.va.KM(b[0]);for(var c={},d=e-1;0<=d;d--)g.widget.extend(c,a.va.KM(b[d]));return c}:null},Oua:function(){if(!this.Az){var b={};this.Az=b;for(var c=this.element[0],d=c,e=[];d;){var h=d.getAttribute,h=h?h.call(d,a.Components.po):null;null!=h&&e.push(h);d=d.parentNode}b.containers=
e;b.element=c}return this.Az},qEa:function(a,b){var c=this.options,d=this.Yva(),h=b[t];null==d||void 0!==h&&!g.isPlainObject(h)||e(this,void 0,b[t],c,t,d);this.Zza(a,b)},Zza:function(b,c){var d=this.options,k=[];this.sea(function(a){k.push(a.widgetName)});k.push("default");var l=a.Components.epa(k);if(!g.isEmptyObject(l)){var m=this,t=function(){return m.Oua()},r;for(r in l){var s=c[r];if(void 0===s||g.isPlainObject(s)){var q=l[r];if(q){var B=f(q);B?e(this,b[r],s,d,r,B,t):(q=[b[r]].concat(q),q.push(s),
d[r]=h(q))}}}}},sea:function(a){for(var b=this.constructor.prototype;null!=b&&"oj"===b.namespace;)a(b),b=Object.getPrototypeOf(b)}});delete g.fn.baseComponent})();a.Ra=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+".",q=
{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.D={};a.D.ena="\x3chtml\x3e";a.D.dna="\x3c/html\x3e";a.D.wna={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.D.vna={"class":1,style:1};a.D.LJa=function(b){return 0===b.indexOf(a.D.ena)&&b.lastIndexOf(a.D.dna)===b.length-7?!0:!1};a.D.IGa=function(b){var c=g(document.createElement("span")).get(0);(c.innerHTML=b)&&0<=b.indexOf("\x3c")&&
a.D.h5(c);return c};a.D.h5=function(b){for(var c=b.childNodes,d,e,h,k,f,l=c.length-1;0<=l;){if((d=c.item(l))&&1===d.nodeType)if(a.D.wna[d.nodeName]){e=d.attributes;for(f=e.length-1;0<=f;f--)h=e[f],(k=void 0!==g(d).attr(h.name))&&(a.D.vna[h.name]||d.removeAttribute(h.nodeName));a.D.h5(d)}else d&&b.removeChild(d);l--}};a.D.Dp=function(a,b){for(var c=b.parentNode;c;){if(c==a)return!0;c=c.parentNode}return!1};a.D.Gt=function(b,c){return c==b?!0:a.D.Dp(b,c)};a.D.$k=function(b,c,d){var e=g(b),h=e.data(a.D.bC);
null==h&&(h=new a.D.ooa(b),e.data(a.D.bC,h),h.start());h.addListener(c,d)};a.D.xm=function(b,c){var d=g(b),e=d.data(a.D.bC);null!=e&&(e.removeListener(c),e.vi()&&(e.stop(),d.removeData(a.D.bC)))};a.D.Ufa=function(b){g(b).find(".oj-helper-detect-expansion").parent().each(function(b,c){var d=g(c).data(a.D.bC);null!=d&&d.pr(!0)})};a.D.qr=function(b){var c=a.Oa.er();return a.Oa.yl.H0===c.os?b.metaKey:b.ctrlKey};a.D.dispatchEvent=function(a,b){var c=a.disabled;try{a.disabled=!1,a.dispatchEvent(b)}finally{a.disabled=
c}};a.D.hza=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,0)}).bind(window);a.D.e5=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||function(a){return window.clearTimeout(a)}).bind(window);a.D.ooa=function(b){function c(a){var b=!1;if(null!=A.offsetParent){var e=A.offsetWidth,h=A.offsetHeight;if(q!==e||Q!==h)r=t,k(e,h),b=!0,a&&d(!0)}return b}function d(c){var e=
b.offsetWidth,h=b.offsetHeight;f.has()&&(c?(null!==s&&a.D.e5(s),s=a.D.hza(function(){s=null;f.fire(e,h)})):f.fire(e,h));for(c=0;c<l.length;c++)l[c].IM()(e,h)}function e(a){a.stopPropagation();!c(!0)&&0<r&&null!=A.offsetParent&&(0==A.scrollLeft||0==A.scrollTop)&&(r--,k(q,Q))}function h(){d(!1)}function k(a,b){q=a;Q=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);J.scrollLeft=a;J.scrollTop=b}var f=g.Callbacks(),
l=[],m=[],t=2,r=0,s=null,q=null,Q=null,A=null,J=null,D=null,M=null;this.addListener=function(b,c){void 0===c||0===c?f.add(b):(l.push(new a.D.tra(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()):f.remove(a)};this.vi=function(){return!f.has()&&0==m.length};this.start=function(){M=e.bind(this);if(b.attachEvent)D=h.bind(this),b.attachEvent("onresize",D);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",M,!1);J=document.createElement("div");J.className="oj-helper-detect-contraction";a=document.createElement("div");a.style.width="200%";a.style.height="200%";J.appendChild(a);b.insertBefore(J,A);J.addEventListener("scroll",M,!1);this.pr(!1)}};this.stop=function(){null!=s&&(a.D.e5(s),s=null);null!=A?(A.removeEventListener("scroll",M),J.removeEventListener("scroll",M),b.removeChild(A),
b.removeChild(J)):b.detachEvent("onresize",D)};this.pr=function(a){var b=c(a);a&&!b&&null!=A.offsetParent&&k(q,Q)}};a.D.bC="_ojResizeTracker";a.D.qN=function(a){return/^[A-Za-z][0-9A-Z_a-z-]*$/.test(a)};a.D.tra=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.IM=function(){return c};this.stop=function(){null!=h&&(window.clearTimeout(h),h=null)}};a.D.jf=function(){return"ontouchstart"in
window||0<navigator.msMaxTouchPoints||0<navigator.maxTouchPoints};a.D.Uja=function(b){a.D.Qza=b};a.D.unwrap=function(b,c){var d=a.D.Qza;d&&d==b.parent().get(0)||(1<arguments.length?c.replaceWith(b):b.unwrap())};a.D.Qha=function(b){function c(b){var d=b.target,e=g(d),h=d.getBoundingClientRect(),k=a.D.RM(),f="ltr"===a.D.In();return f&&("HTML"===d.nodeName||"visible"!==e.css("overflow-x"))&&b.clientX>h.right-k?!0:!f&&"HTML"===d.nodeName&&b.clientX>h.left-k?!0:!f&&"visible"!==e.css("overflow-x")&&b.clientX<
h.left+k?!0:("HTML"===d.nodeName||"visible"!==e.css("overflow-y"))&&b.clientY>h.bottom-k?!0:!1}if(!("clientX"in b&&"clientY"in b))return!1;var d=a.Oa.er();if(a.Oa.yl.a0===d.os||a.Oa.yl.fP===d.os)b=!1;else{var e;if(a.Oa.bo.r0===d.engine)try{e=b.originalTarget.localName?!1:!0}catch(h){e=!0}else e=a.Oa.bo.EP===d.engine?c(b):a.Oa.xk.SG===d.browser?c(b):!1;b=e}return b};a.D.RM=function(){var b=a.D.nDa;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.D.nDa=d-c};a.D.In=function(){var a=document.documentElement.getAttribute("dir");a&&(a=a.toLowerCase());return"rtl"===a?"rtl":"ltr"};a.D.hr=function(a){return isNaN(a)?a&&0<a.length&&"auto"!=a?(a=parseInt(a,10),isNaN(a)&&(a=0),a):0:a};a.D.RHa=function(a){return isNaN(a)?a&&0<a.length?(a=parseFloat(a),isNaN(a)&&(a=0),a):0:a};a.D.hQ="oj-logical-parent";a.D.dIa=
function(b){if(b)return b.data(a.D.hQ)};a.D.Vja=function(b,c){b&&(null===c?b.removeData(a.D.hQ):b.data(a.D.hQ,c))};a.D.QJa=function(b,c){a.p.UX(b);a.p.UX(c);for(var d=c;d;){if(d==b)return!0;var e=a.D.dIa(g(d)),d=e?e[0]:d.parentNode}return!1};a.D.eMa=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.D.SEa=function(){g(document.body).hasClass("oj-hybrid")&&document.body.addEventListener("contextmenu",
function(a){a.preventDefault()},!0)};a.D.SEa();a.D.nP=750;a.D.yja=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.D.JKa=function(){var b=0,c,d=a.D.nP+600;document.addEventListener("mousedown",function(){var d=Date.now();if(!c||d>b+a.D.nP)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.D.TN=function(){var b=0,c=(a.Wc.De("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 k=d.afterToggle||g.noop,h=function(a){a.addClass("oj-focus");
k("focusin")},f=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.D.JKa()||h&&h())}}e&&b.addClass("oj-focus-highlight");k("focusin")};(d.setupHandlers||function(a,c){function h(a){c(g(a.currentTarget))}function k(b){a(g(b.currentTarget))}var f=d.component;if(f)f._on(e,{focusin:k,focusout:h});else{var f=b++,l=e.data("ojFocusable");e.data("ojFocusable",void 0==l?f:l+","+f);l={};
f=".ojFocusable"+f;l["focusin"+f]=k;l["focusout"+f]=h;e.on(l)}})(d.applyHighlight?f:h,function(a){a.removeClass("oj-focus oj-focus-highlight");k("focusout")})}}}();a.ub=function(a){this.Init(a)};a.b.sa(a.ub,a.b,"oj.ComponentMessaging");a.ub.Xe={NONE:"none",VG:"notewindow",CB:"placeholder",yB:"inline"};a.ub.VP={};a.ub.iO=function(b,c){b&&"function"===typeof c&&(a.ub.VP[b]=c)};a.ub.prototype.Init=function(b){a.ub.u.Init.call(this);this.xa=b;this.nC=!1;this.bza()};a.ub.prototype.tt=function(b,c,d){var e=
this;a.p.mi(d);this.Jd=b;this.H5=c;this.IK=a.Uc.yf(this.IK||{},d);this.nC?this.NBa():(g.each(this.lt,function(a,b){b.tt(e)}),this.nC=!0)};a.ub.prototype.update=function(b){a.p.mi(b);a.p.Wea(this.nC);this.IK=a.Uc.yf(this.IK||{},b);this.nC&&g.each(this.lt,function(a,c){c.F_(b)&&c.update()})};a.ub.prototype.rp=function(){g.each(this.lt,function(a,b){b.rp()});this.nC=!1;this.H5=this.Jd=this.xa=null;this.lt={}};a.ub.prototype.close=function(){g.each(this.lt,function(a,b){b.close()})};a.ub.prototype.LC=
function(b,c){return new (a.ub.VP[b]||a.ub.VP[a.ub.Xe.NONE])(c)};a.ub.prototype.Cua=function(){return this.xa||null};a.ub.prototype.kva=function(){return this.Jd||null};a.ub.prototype.Dua=function(){return this.H5||null};a.ub.prototype.Ol=function(){return this.IK||{}};a.ub.prototype.K8=function(){var b={},c=!1,d,e,h=this.xa.options.placeholder,k,f,l,m,t=this.xa.options.displayOptions||{},r={};f=Object.keys(t);for(l=0;l<f.length;l++){e=f[l];d=t[e];c=!1;k=e+"";if(Array.isArray(d))for(m=0;m<d.length;m++)e=
d[m],c||(c=this.vca(k,e,h,r));else"string"===typeof d&&(c||(c=this.vca(k,d,h,r)));c||(r[k]=a.ub.Xe.NONE)}g.each(a.ub.Xe,function(a,c){b[c]=[]});g.each(r,function(a,c){b[c].push(a)});return b};a.ub.prototype.vca=function(b,c,d,e){var h=!1;switch(c){case a.ub.Xe.CB:"converterHint"!==b||h||d||(e[b]=c,h=!0);break;case a.ub.Xe.yB:"messages"!==b||h||(e[b]=c,h=!0);break;default:h||(e[b]=c,h=!0)}return h};a.ub.prototype.bza=function(){var b=this.K8(),c=b[a.ub.Xe.VG],d=b[a.ub.Xe.NONE],e=b[a.ub.Xe.CB],b=b[a.ub.Xe.yB],
h={};0<c.length&&(h[a.ub.Xe.VG]=this.LC(a.ub.Xe.VG,c));0<e.length&&(h[a.ub.Xe.CB]=this.LC(a.ub.Xe.CB,e));0<b.length&&(h[a.ub.Xe.yB]=this.LC(a.ub.Xe.yB,b));h[a.ub.Xe.NONE]=this.LC(a.ub.Xe.NONE,d);this.lt=h};a.ub.prototype.NBa=function(){var b=this.K8(),c,d=this;g.each(b,function(b,e){b+="";c=d.lt[b];e&&0<e.length?c?c&&c.ix(e):(c=d.LC(b,e),d.lt[b]=c,c.tt(d)):c&&a.ub.Xe.NONE!==b&&(c.rp(),delete d.lt[b])})};a.md=function(a){this.Init(a)};a.b.sa(a.md,a.b,"oj.MessagingStrategy");a.md.prototype.Init=function(b){a.p.hM(b);
a.md.u.Init.call(this);this.RI=b};a.md.prototype.tt=function(a){this.As=a};a.md.prototype.rp=function(){};a.md.prototype.close=function(){};a.md.prototype.ix=function(a){this.Init(a)};a.md.prototype.F_=function(){return!0};a.md.prototype.update=function(){};a.md.prototype.wl=function(){return this.As.kva()};a.md.prototype.u0=function(){return this.As.Dua()};a.md.prototype.Im=function(){return this.As.Cua()};a.md.prototype.ZO=function(){return this.aP().YD};a.md.prototype.YO=function(){return this.aP().pA()};
a.md.prototype.v0=function(){var a=[],b=this.Ol();(b=b&&b.tfa)&&a.push(b);return a};a.md.prototype.rla=function(){var a=[],b=this.Ol();g.each(b&&b.hMa||[],function(b,c){a.push(c)});return a};a.md.prototype.qla=function(){var a=this.Ol();return a&&a.title||""};a.md.prototype.aP=function(){var a=this.Ol();return a&&a.Kka||null};a.md.prototype.eP=function(){var a=this.ZO();return a&&0<a.length?!0:!1};a.md.prototype.k1=function(){return-1!==this.RI.indexOf("messages")?!0:!1};a.md.prototype.zP=function(){return-1!==
this.RI.indexOf("converterHint")?!0:!1};a.md.prototype.m1=function(){return-1!==this.RI.indexOf("validatorHint")?!0:!1};a.md.prototype.l1=function(){return-1!==this.RI.indexOf("title")?!0:!1};a.md.prototype.ula=function(){return this.aP().wZ()};a.md.prototype.Ol=function(){return this.As?this.As.Ol():{}};a.Gh=function(a){this.Init(a)};a.ub.iO(a.ub.Xe.NONE,a.Gh);a.Gh.NH="oj-invalid";a.Gh.OH="oj-warning";a.b.sa(a.Gh,a.md,"oj.DefaultMessagingStrategy");a.Gh.prototype.update=function(){a.Gh.u.update.call(this);
var b=this.wl(),c=this.YO(),d=[],e=[],h=!1,k=this.Im().widget();b&&(this.ula()?(d.push(a.Gh.OH),e.push(a.Gh.NH),h=!0):this.eP()&&c===a.ia.Vc.WARNING?(d.push(a.Gh.NH),e.push(a.Gh.OH)):(d.push(a.Gh.NH),d.push(a.Gh.OH)),k.removeClass(d.join(" ")).addClass(e.join(" ")),this.u0().attr({"aria-invalid":h}))};a.Gh.prototype.rp=function(){this.Im().widget().removeClass(a.Gh.NH).removeClass(a.Gh.OH);this.u0().removeAttr("aria-invalid");a.Gh.u.rp.call(this)};a.Bk=function(a){this.Init(a)};a.ub.iO(a.ub.Xe.CB,
a.Bk);a.b.sa(a.Bk,a.md,"oj.PlaceholderMessagingStrategy");a.Bk.prototype.Init=function(b){a.Bk.u.Init.call(this,b)};a.Bk.prototype.tt=function(b){a.Bk.u.tt.call(this,b);this.fW()};a.Bk.prototype.ix=function(b){a.Bk.u.ix.call(this,b);this.fW()};a.Bk.prototype.F_=function(a){return a&&void 0!==a.tfa?!0:!1};a.Bk.prototype.update=function(){a.Bk.u.update.call(this);this.fW()};a.Bk.prototype.fW=function(){var a=this.wl();this.Yla()&&a&&(a=this.v0(),a=a.length?a[0]:"",this.Im().option({placeholder:a},{_context:{GJa:!0}}))};
a.Bk.prototype.Yla=function(){return this.zP()};a.Cm=function(a,b){this.Init(a,b)};a.Cm.wZ=function(b){return a.ia.pA(b)>=a.ia.Vc.ERROR?!0:!1};a.b.sa(a.Cm,a.b,"oj.ComponentValidity");a.Cm.prototype.Init=function(b,c){a.Cm.u.Init.call(this);this.v$(c)};a.Cm.prototype.wZ=function(){return this.Us};a.Cm.prototype.pA=function(){return this.lAa};a.Cm.prototype.update=function(a,b){this.v$(b)};a.Cm.prototype.v$=function(b){this.ura=b;this.YD=this.dva();this.lAa=a.ia.pA(this.YD);this.Us=a.Cm.wZ(this.YD)};
a.Cm.prototype.dva=function(){for(var b=this.ura||[],c=[],d,e=0;e<b.length;e++)d=b[e],d instanceof a.be&&!d.gfa()||c.push(d);return c};a.me={};a.me.n3=":tabbable";a.me.qM=function(b){var c=document.activeElement;return b&&c?a.D.Gt(b,c):!1};a.me.qF=function(a){a.focus()};a.me.BY=function(b){(b=a.me.tga(b))&&a.me.qF(b)};a.me.tga=function(b){var c=g(b);return c.is(a.me.n3)?b:(b=c.find(a.me.n3))&&0<b.length?b[0]:null};a.me.EA=function(b){return g(b).is(":focusable")&&("A"!==b.nodeName||b.hasAttribute("tabindex")||
a.Oa.er().browser!==a.Oa.xk.qP)?!0:!1};a.Mm={};o_("Test",a.Mm,a);a.Mm.ready=!1;o_("Test.ready",a.Mm.ready,a);a.Mm.vHa=function(b){var c=b;if(a.cb.Re(b))try{c=JSON.parse(b)}catch(d){return null}return c&&c.element&&(b=g(c.element))?(b=a.Components.Yc(b[0],c.component),delete c.element,b("getNodeBySubId",c)):null};o_("Test.domNodeForLocator",a.Mm.vHa,a);a.Mm.TY=function(){return a.T.TY()};o_("Test.getOpenPopupCount",a.Mm.TY,a);a.Mm.tY=function(){return a.T.tY()};o_("Test.findOpenPopups",a.Mm.tY,a);
a.Mm.iY=function(b,c){return a.T.iY(b,c)};o_("Test.compareStackingContexts",a.Mm.iY,a);a.Components.Xa("baseComponent",null,{properties:{contextMenu:{type:"string"},rootAttributes:{type:"Object"},translations:{type:"Object"}},methods:{getNodeBySubId:{},option:{},refresh:{}},extension:{_widgetName:"baseComponent"}})});