/**
 * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
 * The Universal Permissive License (UPL), Version 1.0
 */
"use strict";
define(["ojs/ojcore","jquery","ojs/ojcomponentcore","ojs/ojdomscroller","ojs/ojanimation","promise"],function(a,g){a.me=function(a,b,d){this.fa=b;this.D=a;this.xd=!1;this.hra(d);this.Init()};a.f.xa(a.me,a.f,"oj.DataSourceContentHandler");a.me.prototype.Init=function(){a.me.N.Init.call(this)};a.f.j("DataSourceContentHandler.prototype.Init",{Init:a.me.prototype.Init});a.me.prototype.Mm=function(){};a.me.prototype.PD=function(){};a.me.prototype.Xh=function(){null!=this.T4&&(this.fa=this.T4);g(this.fa).empty();
this.T4=this.fa=this.D=null};a.me.prototype.eA=function(){return!this.xd};a.me.prototype.w5=function(){this.jk()?this.fa.setAttribute("role","grid"):this.Cl()?this.fa.setAttribute("role","tree"):this.fa.setAttribute("role","listbox")};a.me.prototype.g7=function(){var a,b;this.bc();this.w5();this.jk()&&this.Mh()&&!this.Cl()&&(a=document.createElement("li"),b=document.createElement("ul"),a.appendChild(b),g(a).attr("role","presentation").css("width","100%"),g(b).attr("role","row").addClass(this.D.nh()),
this.fa.appendChild(a),this.T4=this.fa,this.fa=b);this.Yq(!1);this.Ub()};a.me.prototype.ug=function(a){return a.key};a.me.prototype.We=function(a){var b,d,e;b=g(this.fa).find("."+this.D.Kg());for(d=0;d<b.length;d++)if(e=b[d],a==this.ug(e))return e;return null};a.me.prototype.hra=function(a){this.lb=a};a.me.prototype.Yq=function(){this.D.aE()};a.me.prototype.B2=function(a,b,d,e,f){var h,k;h=document.createElement("li");g(h).uniqueId();k=g(a).children("."+this.D.Kg()+", .oj-listview-no-data-message");
a.insertBefore(h,b===k.length?null:k[b]);k=g(a).children().index(h);this.n$(h,k,a,b,d,e,f)};a.me.prototype.tUa=function(a,b,d,e,f){var h,k,l;this.bc();h=a.parentNode;k=g(h).children().index(a);l=document.createElement("li");g(a).replaceWith(l);this.n$(l,k,h,b,d,e,f)};a.me.prototype.n$=function(a,b,d,e,f,h,k){var l;void 0==k&&(k=this.az.bind(this));e=this.W2(e,f,h,a);h=this.D.nDa();null!=h?(h=h.call(this,e),null!=h&&(null===h.parentNode||h.parentNode instanceof DocumentFragment?a.appendChild(h):null==
h.parentNode&&h.toString&&(l=document.createElement("span"),l.appendChild(document.createTextNode(h.toString())),a.appendChild(l)))):(l=document.createElement("span"),l.appendChild(document.createTextNode(null==f?"":f.toString())),a.appendChild(l));a=d.children[b];e.parentElement=a;g.data(a,"data",f);k(a,e)};a.me.prototype.az=function(a,b){var d;a.key=b.key;a=g(a);a.uniqueId();d=this.D.YQ(a);this.jk()?void 0==b.leaf||b.leaf?this.Mh()?d.attr("role","gridcell"):(a.attr("role","row"),d!=a?d.attr("role",
"gridcell"):d.children().wrapAll("\x3cdiv role\x3d'gridcell' class\x3d'oj-listview-cell-element'\x3e\x3c/div\x3e")):a.attr("role","presentation"):(d.attr("role",this.Cl()?"treeitem":"option"),d!=a&&a.attr("role","presentation"));d.addClass(this.D.Cn());this.wD(b)||a.addClass("oj-skipfocus");a.addClass(this.D.Kg())};a.me.prototype.W2=function(a,b,d,e){var f,g;f={};f.parentElement=e;f.index=a;f.data=b;f.component=this.D.nd();f.datasource=this.lb;this.D.Sr&&(f=this.D.Sr(f));for(g in d)d.hasOwnProperty(g)&&
(f[g]=d[g]);return f};a.me.prototype.wD=function(a){return this.D.A3(a)};a.me.prototype.tR=function(a){return this.D.Hna(a)};a.me.prototype.Mh=function(){return this.D.Mh()};a.me.prototype.jk=function(){return this.D.pA()};a.me.prototype.bc=function(){this.D&&this.D.bc()};a.me.prototype.Ub=function(){this.D&&this.D.Ub()};a.jc=function(c,b,d){a.jc.N.constructor.call(this,c,b,d)};a.f.xa(a.jc,a.me,"oj.TableDataSourceContentHandler");a.jc.prototype.Init=function(){a.jc.N.Init.call(this)};a.jc.prototype.Cl=
function(){return!1};a.jc.prototype.Xh=function(){a.jc.N.Xh.call(this);this.IH();null!=this.CD&&(this.CD.destroy(),this.F4=this.CD=null);this.yJ=null};a.jc.prototype.Mm=function(a,b){this.qi()&&void 0!=this.aw&&this.aw!=b&&(this.aw=b,this.checkViewport())};a.jc.prototype.PD=function(){this.qi()&&this.checkViewport()};a.jc.prototype.qi=function(){return"loadMoreOnScroll"==this.D.options.scrollPolicy?!0:!1};a.jc.prototype.pq=function(){return Math.max(0,this.D.options.scrollPolicyOptions.fetchSize)};
a.jc.prototype.tq=function(){var c=this.D.options.scrollPolicyOptions.scroller;return null!=c&&g.contains(c,this.fa)?(this.Hx=a.Yf.EPa(c,this.fa),c):this.D.Xj()};a.jc.prototype.EY=function(){return this.D.options.scrollPolicyOptions.maxCount};a.jc.prototype.hra=function(c){var b;this.IH();if(null!=c){this.qi()&&(b=this,this.F4=function(a){null!=a?(b.bc(),b.w0(),b.eA()&&b.bc(),b.CZ(a),a.maxCountLimit?b.IZ():b.F$(),b.Ub(),b.Ub()):void 0===a&&(b.w0(),b.Ub())},this.CD=new a.Yf(this.tq(),c,{fetchSize:this.pq(),
fetchTrigger:this.Hx,maxCount:this.EY(),success:this.F4,error:this.Ub}),this.CD.JZ=function(c,e){1>=e-c&&b.bc();a.Yf.prototype.JZ.call(this,c,e)});this.Cpa=this.lSa.bind(this);this.Bpa=this.kSa.bind(this);this.xpa=this.gSa.bind(this);this.Apa=this.iSa.bind(this);this.ypa=this.hSa.bind(this);this.KR=this.jSa.bind(this);if(a.Ma&&c instanceof a.Ma)c.on("sync",this.Cpa);c.on("sort",this.Bpa);c.on("add",this.xpa);c.on("remove",this.Apa);c.on("change",this.ypa);c.on("reset",this.KR);c.on("refresh",this.KR)}this.lb=
c};a.jc.prototype.F$=function(){var a,b;null==this.yJ&&(a=g(document.createElement("li")),a.uniqueId().attr("role","presentation").addClass(this.D.kg()).addClass("oj-listview-loading-icon-container"),b=g(document.createElement("div")),b.addClass("oj-icon oj-listview-loading-icon"),a.append(b),g(this.fa).append(a),this.yJ=a)};a.jc.prototype.w0=function(){null!=this.yJ&&this.yJ.remove();this.yJ=null};a.jc.prototype.az=function(c,b){var d;a.jc.N.az.call(this,c,b);g(c).addClass(this.D.kg());this.D.Rc()&&
this.tR(b)&&this.D.Pf(g(c)).attr("aria-selected",!1);this.qi()&&(d=Math.min(this.lb.totalSize(),this.EY()),-1===d&&(d=this.EY()),0<d&&g(c).attr("aria-setsize",d).attr("aria-posinset",b.index+1));this.D.rz(c,b)};a.jc.prototype.cPa=function(a,b){var d,e;this.bc();this.az(a,b);d=g(a);d.outerHeight();e=this.D.kg();d.children().wrapAll("\x3cdiv\x3e\x3c/div\x3e");d.removeClass(e).addClass("oj-listview-item-add-remove-transition");d.children().first().addClass(e);this.bc();var f=this;this.D.Uw(a,"add").then(function(){f.CEa(b,
a)});this.Ub()};a.jc.prototype.IZ=function(){a.C.error("max count reached")};a.jc.prototype.IH=function(){null!=this.lb&&(this.lb.off("sync",this.Cpa),this.lb.off("sort",this.Bpa),this.lb.off("add",this.xpa),this.lb.off("remove",this.Apa),this.lb.off("change",this.ypa),this.lb.off("reset",this.KR),this.lb.off("refresh",this.KR))};a.jc.prototype.wNa=function(a){return this.qi()&&null!=a&&a.keys&&0<a.keys.length&&(-1==this.lb.totalSize()||this.lb.totalSize()>a.keys.length)};a.jc.prototype.Oga=function(){return a.Ma&&
this.lb instanceof a.Ma};a.jc.prototype.Yq=function(c){var b=!0,d;this.bc();if(this.eA()&&(this.xd=!0,a.jc.N.Yq.call(this,c),this.Oga()&&(b=!1,this.bc()),b||c)){b&&this.bc();c={fetchType:"init",startIndex:0};this.qi()&&(c.pageSize=this.pq());d=this;c=this.lb.fetch(c);c.then(function(a){null!=d.D&&b&&(g(d.fa).empty(),d.CZ(a),d.wNa(a)&&(d.F$(),d.D.FS()))},function(a){d.Es(a);d.Ub()});this.Ub();return}this.Ub()};a.jc.prototype.Es=function(c){a.C.error(c);this.qi()&&this.w0();this.D.qw()};a.jc.prototype.Su=
function(a,b){var d,e,f;d=this.fa.childElementCount;for(e=0;e<a.length;e++)f=a[e],this.B2(this.fa,d,f,this.getMetadata(d,b[e],f)),d+=1};a.jc.prototype.gSa=function(a){var b,d,e;if(null!=this.fa){this.bc();b=a.data;d=a.keys;a=a.indexes;if(null!=b&&null!=d&&0<d.length&&0<b.length&&d.length==b.length&&null!=a&&d.length==a.length){for(e=0;e<b.length;e++)this.bc(),this.B2(this.fa,a[e],b[e],this.getMetadata(a[e],d[e],b[e]),this.cPa.bind(this)),this.Ub();this.eA()&&this.bc();this.Xma()}this.Ub()}};a.jc.prototype.CEa=
function(a,b){null!=this.D&&(g(b).removeClass("oj-listview-item-add-remove-transition").addClass(this.D.kg()).children().children().unwrap(),this.D.fpa(b,a));this.Ub()};a.jc.prototype.iSa=function(a){var b,d;a=a.keys;if(null!=this.fa&&null!=a&&0!=a.length){this.bc();for(b=0;b<a.length;b++)d=this.We(a[b]),null!=d&&(this.bc(),this.fLa(d),this.Ub());this.D.yw();this.Ub()}};a.jc.prototype.fLa=function(a){var b,d=this;this.bc();b=this.D.kg();a=g(a);a.children().wrapAll("\x3cdiv class\x3d'"+b+"'\x3e\x3c/div\x3e");
a.removeClass(b).addClass("oj-listview-item-add-remove-transition");this.bc();b=a.get(0);this.D.Uw(b,"remove").then(function(){d.lGa(a)});this.Ub()};a.jc.prototype.lGa=function(a){if(null!=this.D){a=g(a);var b=a.parent();0!=b.length&&(this.D.q4(a.get(0)),a.remove(),0==b.get(0).childElementCount&&this.D.qw())}this.Ub()};a.jc.prototype.hSa=function(a){var b,d,e,f;b=a.keys;if(null!=this.fa&&null!=b&&0!=b.length){this.bc();d=a.data;a=a.indexes;for(e=0;e<b.length;e++)f=this.We(b[e]),null!=f&&(this.bc(),
this.tUa(f,a[e],d[e],this.getMetadata(a[e],b[e],d[e]),this.bPa.bind(this)),this.Ub());this.D.yw();this.Ub()}};a.jc.prototype.bPa=function(a,b){var d=this;this.bc();this.az(a,b);this.D.Uw(a,"update").then(function(){d.mGa(a)});this.Ub()};a.jc.prototype.mGa=function(a){null!=this.D&&(g(a).removeClass("oj-listview-item-add-remove-transition"),this.D.CUa());this.Ub()};a.jc.prototype.jSa=function(){null!=this.fa&&(this.bc(),this.D.yw(),this.Yq(this.Oga()?!1:!0),this.Ub())};a.jc.prototype.CZ=function(a){var b;
null!=this.fa&&(b=a.data,a=a.keys,Array.isArray(b)&&Array.isArray(a)&&b.length==a.length&&(this.Su(b,a),this.Xma()))};a.jc.prototype.lSa=function(a){null!=this.fa&&(this.bc(),0===a.startIndex&&g(this.fa).empty(),this.D.yw(),this.CZ(a),this.Ub())};a.jc.prototype.kSa=function(){null!=this.fa&&(this.bc(),this.D.yw(),this.D.Ro()&&this.D.$l(!0),this.Yq(!0),this.Ub())};a.jc.prototype.Xma=function(){this.xd=!1;this.D.qw();this.checkViewport();this.Ub()};a.jc.prototype.checkViewport=function(){var a=this,
b;this.bc();null!=this.CD&&0<this.lb.totalSize()&&this.eA()&&(b=this.CD.checkViewport(),null!=b&&(this.bc(),b.then(function(b){a.F4(b);a.Ub()},null)));this.Ub()};a.jc.prototype.getMetadata=function(a,b,d){d=d.context;null==d&&(d={});null==d.index&&(d.index=a);null==d.key&&(d.key=b);return d};a.Hj=function(c,b,d){a.Hj.N.constructor.call(this,c,b,d)};a.f.xa(a.Hj,a.me,"oj.TreeDataSourceContentHandler");a.Hj.prototype.Init=function(){a.Hj.N.Init.call(this)};a.Hj.prototype.Cl=function(){return!0};a.Hj.prototype.Yq=
function(c){this.bc();a.Hj.N.Yq.call(this,c);this.fetchChildren(0,null,this.fa,null);this.Ub()};a.Hj.prototype.fetchChildren=function(a,b,d,e){this.bc();this.xd=!0;a={start:a,count:this.lb.getChildCount(b)};this.lb.fetchChildren(b,a,{success:function(a){this.Su(a,b,d,e)}.bind(this),error:function(a){this.Es(a)}.bind(this)});this.Ub()};a.Hj.prototype.Su=function(a,b,d,e){var f,h,k,l,m;this.bc();f=a.getStart();h=a.getCount();for(k=0;k<h;k++)l=a.getData(f+k),m=a.getMetadata(f+k),this.B2(d,f+k,l,m);this.jk()&&
this.Mh()&&null!=b&&1<h&&g(d.parentNode.firstElementChild.firstElementChild).attr("aria-colspan",h);this.xd=!1;null!=e&&e.call(null,d);this.D.qw();this.rj=!0;this.Ub()};a.Hj.prototype.az=function(c,b){var d,e,f,h,k,l;this.bc();a.Hj.N.az.call(this,c,b);d=this.D.nh();e=this.D.kg();f=this.D.jg(!0);h=this.D.jz();l=this.D.lp();k=this.D.Cn();c=g(c);!1==b.leaf?(c.children().wrapAll("\x3cdiv\x3e\x3c/div\x3e"),c.hasClass(k)?c.removeClass(k).children().first().addClass(k).attr("aria-expanded","false"):c.children().first().attr("role",
"presentation").find("."+k).attr("aria-expanded","false"),e=c.children().first(),e.uniqueId().addClass(f),this.D.vD()&&(c.addClass("oj-collapsed"),f=document.createElement("a"),g(f).attr("href","#").attr("aria-labelledby",e.get(0).id).addClass("oj-component-icon oj-clickable-icon-nocontext").addClass(l),e.prepend(f)),this.jk()&&(e.get(0).removeAttribute("aria-expanded"),e.removeClass(k),e.attr("role","row"),e.children().wrapAll("\x3cdiv role\x3d'gridcell' aria-expanded\x3d'false' class\x3d'oj-listview-cell-element "+
k+"'\x3e\x3c/div\x3e")),k=document.createElement("ul"),g(k).addClass(d).addClass(h).attr("role",this.jk()?this.Mh()?"row":"presentation":"group"),c.append(k)):!0==b.leaf&&c.addClass(e);this.D.Rc()&&this.tR(b)&&this.D.Pf(c).attr("aria-selected",!1);this.D.rz(c[0],b);this.Ub()};a.Hj.prototype.Es=function(c){this.bc();a.C.error(c);this.D.qw();this.Ub()};a.Hj.prototype.$z=function(a,b){var d,e;this.bc();d=this.ug(a[0]);e=a.children("ul")[0];this.fetchChildren(0,d,e,b);this.Ub()};a.Hj.prototype.Yz=function(a){a.empty()};
a.ae=function(a,b){this.D=a;this.fa=b};a.f.xa(a.ae,a.f,"oj.StaticContentHandler");a.ae.prototype.Init=function(){a.ae.N.Init.call(this)};a.ae.prototype.Xh=function(){this.fa.hasAttribute("role")&&(this.Xqa(this.fa,0),this.CVa(),this.jk()&&this.Mh()&&!this.Cl()&&g(this.fa).children().first().children().unwrap().children().unwrap())};a.ae.prototype.eA=function(){return!0};a.ae.prototype.Mm=function(){};a.ae.prototype.PD=function(){};a.ae.prototype.g7=function(){var a=this.fa;this.jk()&&this.Mh()&&!this.Cl()&&
(g(this.fa).children().wrapAll("\x3cli role\x3d'presentation' style\x3d'width:100%'\x3e\x3cul role\x3d'row' class\x3d'"+this.D.nh()+"'\x3e\x3c/ul\x3e\x3c/li\x3e"),a=g(this.fa).children("li").first().children("ul").first().get(0));this.bqa(a,0);this.w5();this.D.qw()};a.ae.prototype.$z=function(a,b){var d;d="."+this.D.nh();d=g(a).children(d)[0];g(d).css("display","");b.call(null,d)};a.ae.prototype.Yz=function(){};a.ae.prototype.Cl=function(){null==this.K4&&(this.K4=0<g(this.fa).children("li").children("ul").length);
return this.K4};a.ae.prototype.Xqa=function(a,b){var d,e,f,h,k,l,m,p,t,s;d=this.D.nh();e=this.D.jz();f=this.D.aD();h=this.D.jg(!0);k=this.D.kg();l=this.D.Kg();m=a.children;for(p=0;p<m.length;p++)t=m[p],this.AVa(t),t=g(t),t.removeClass(l).removeClass(k).removeClass(this.D.w3(b)).removeClass("oj-skipfocus").removeClass("oj-focus").removeClass("oj-hover").removeClass("oj-expanded").removeClass("oj-collapsed").removeClass("oj-selected"),s=t.children("ul"),0<s.length&&(t.children("."+h).children().unwrap(),
this.jk()&&this.BVa(t),t.children(".oj-component-icon").remove(),t=g(s[0]),t.removeClass(d).removeClass(f).removeClass(e).removeAttr("role"),this.Xqa(t[0],b+1))};a.ae.prototype.bqa=function(a,b){var d,e,f,h,k,l,m,p,t,s,n,r,q,u,v,w;d=this.D.kg();e=this.D.Kg();f=this.D.nh();h=this.D.jg(!0);k=this.D.jz();l=this.D.lp();m=this.D.Cn();p=a.children;t=this.D.vD();for(s=0;s<p.length;s++)n=g(p[s]),r=this.W2(n),this.NUa(n,r),n.uniqueId().addClass(e),0<b&&n.addClass(this.D.w3(b)),this.wD(r)||n.addClass("oj-skipfocus"),
q=n.children("ul"),0<q.length?(this.K4=!0,n.children(":not(ul)").wrapAll("\x3cdiv\x3e\x3c/div\x3e"),u=n.children().first(),u.addClass(h),w=this.fRa(q[0]),0<w&&(n.hasClass(m)?(n.removeClass(m),u.addClass(m).attr("aria-expanded","false")):(u.attr("role","presentation"),u.find("."+m).attr("aria-expanded","false")),t&&(n.addClass("oj-collapsed"),u.uniqueId(),v=document.createElement("a"),g(v).attr("href","#").attr("role","button").attr("aria-labelledby",u.get(0).id).addClass("oj-component-icon oj-clickable-icon-nocontext").addClass(l),
u.prepend(v))),this.jk()&&this.SUa(u,w),q=g(q[0]),q.addClass(f).addClass(k).attr("role",this.jk()?this.Mh()?"row":"presentation":"group").css("display","none"),this.bqa(q[0],b+1)):n.addClass(d),this.D.Rc()&&this.tR(r)&&this.D.Pf(n).attr("aria-selected",!1),this.D.rz(n[0],r)};a.ae.prototype.w5=function(){this.jk()?this.fa.setAttribute("role","grid"):this.Cl()?this.fa.setAttribute("role","tree"):this.fa.setAttribute("role","listbox")};a.ae.prototype.CVa=function(){this.fa.removeAttribute("role")};a.ae.prototype.fRa=
function(a){return g(a).children("li").length};a.ae.prototype.W2=function(a){var b;b={};b.key=a.attr("id");b.parentElement=a.children().first()[0];b.index=a.index();b.data=a[0];b.component=this.D.nd();this.Cl()&&(b.leaf=0==a.children("ul").length,a=a.parents("li."+this.D.Kg()),b.depth=a.length,b.parentKey=0==a.length?null:a.first().attr("id"));return b};a.ae.prototype.NUa=function(a,b){var d=this.D.YQ(a);this.jk()?void 0==b.leaf||b.leaf?this.Mh()?d.attr("role","gridcell"):(a.attr("role","row"),d!=
a?d.attr("role","gridcell"):d.children().wrapAll("\x3cdiv role\x3d'gridcell' class\x3d'oj-listview-cell-element'\x3e\x3c/div\x3e")):(a.attr("role","presentation"),d!=a&&d.attr("role","gridcell")):(d.attr("role",this.Cl()?"treeitem":"option"),d!=a&&a.attr("role","presentation"));d.addClass(this.D.Cn())};a.ae.prototype.SUa=function(a,b){var d=this.D.Cn();a.get(0).removeAttribute("aria-expanded");a.removeClass(d);a.attr("role","row");a.children().wrapAll("\x3cdiv role\x3d'gridcell' aria-expanded\x3d'false' class\x3d'oj-listview-cell-element "+
d+"'\x3e\x3c/div\x3e");this.Mh()&&1<b&&a.children().first().attr("aria-colspan",b)};a.ae.prototype.BVa=function(a){a.children("div").first().children().unwrap()};a.ae.prototype.AVa=function(a){var b=this.D.YQ(g(a));b.removeAttr("role");b.removeAttr("aria-selected");b.removeAttr("aria-expanded");b.removeClass(this.D.Cn());this.jk()&&!this.Mh()&&(b!=a?(g(a).removeAttr("role"),b.children().first().children().unwrap()):b.children().first().children().unwrap().children().unwrap())};a.ae.prototype.ug=function(a){return g(a).attr("id")};
a.ae.prototype.We=function(a){return document.getElementById(a)};a.ae.prototype.wD=function(a){return this.D.A3(a)};a.ae.prototype.tR=function(a){return this.D.Hna(a)};a.ae.prototype.Mh=function(){return this.D.Mh()};a.ae.prototype.jk=function(){return this.D.pA()};a.S_=function(c,b){function d(){}a.f.xa(d,c,"");d.prototype=g.extend(d.prototype,b);return d}(Object,{df:37,Zf:39,Al:40,Ll:38,HK:9,cT:13,eT:27,fT:113,MT:32,mo:0,lo:1,h7:2,MVa:0,Hw:1,Gn:function(c){var b=this,d;this.vr=[];this.element=c.element;
this.bc();this.ea=c.ea;this.$d=c.$d;this.options=c;this.element.uniqueId().addClass(this.oT()+" oj-component-initnode");this.GK();"undefined"!=typeof a.jb&&(this.Sf=d=new a.jb(this),this.ea._on(this.element,{dragstart:function(a){return d.xZ(a)},dragenter:function(a){return d.uZ(a)},dragover:function(a){return d.wZ(a)},dragleave:function(a){return d.vZ(a)},dragend:function(a){return d.tZ(a)},drag:function(a){return d.ZEa(a)},drop:function(a){return d.yZ(a)}}));this.ea._on(this.element,{click:function(a){b.wT(a)},
touchstart:function(a){b.mK(a)},touchend:function(a){b.qE(a)},touchcancel:function(a){b.qE(a)},mousedown:function(a){0===a.button?b.xia()||b.mK(a):b.CJ=!0},mouseup:function(a){b.sfa(a);b.CJ=!1},mouseout:function(a){b.qfa(a)},mouseover:function(a){b.cGa(a)},keydown:function(a){b.lK(a)},ojpanmove:function(a){b.sfa(a)}});this.ea._on(this.ea.element,{focus:function(a){b.Ir(a)},blur:function(a){b.Hr(a)}});a.Qa.vm().browser===a.Qa.Di.gK&&this.eh().attr("tabIndex",-1);this.Hw===this.Hw?this.ea._on(this.ea.element,
{focusin:function(a){b.Ir(a)},focusout:function(a){b.Nsa(a)}}):this.ea._on(this.element,{focus:function(a){b.Ir(a)},blur:function(a){b.Hr(a)}});this.ea.document.bind("touchend.ojlistview touchcancel.ojlistview",this.qE.bind(this));this.Kia();this.ea._focusable({applyHighlight:!0,recentPointer:b.f7(),setupHandlers:function(a,c){b.sB=a;b.Lx=c}})},JC:function(){var a;this.vya();this.pu();this.Yfa();a=this.eh();this.Xo(a[0]);this.Ub()},refresh:function(){this.gja();this.bc();this.DK();this.pu();this.Yfa();
this.Kia();this.Ub()},whenReady:function(){return this.Kqa},destroy:function(){this.element.removeClass(this.oT()+" oj-component-initnode");this.un(this.eh());this.gja();a.Q.unwrap(this.element,this.eh());this.ea.document.off(".ojlistview")},gja:function(){var a=this;this.u7();this.Vya(this.element);null!=this.Rf&&(this.Rf.Xh(),delete this.Rf,this.Rf=null);this.$v=this.V=null;this.vr=[];this.Kqa=new Promise(function(b){a.Lqa=b});this.yw();this.sm&&(this.sm(null),this.sm=null);null!=this.Sf&&this.Sf.reset()},
fS:function(){this.FS()},lqa:function(){this.eh().removeClass("oj-focus-ancestor");null!=this.V&&g(this.V.elem).removeClass("oj-focus oj-focus-highlight");null!=this.L4&&this.Ws(this.L4,"oj-hover")},PD:function(){this.FS();null!=this.Rf&&this.Rf.PD()},getNodeBySubId:function(a){var b;if(null==a)return this.element?this.element[0]:null;b=a.subId;if("oj-listview-disclosure"===b||"oj-listview-icon"===b)if(a=a.key,a=this.We(a),null!=a&&(a=g(a).find(".oj-clickable-icon-nocontext").first(),a.hasClass(this.nt())||
a.hasClass(this.lp())))return a.get(0);return null},getSubIdByNode:function(a){if(null!=a&&g(a).hasClass(this.nt())||g(a).hasClass(this.lp()))if(a=this.fo(a),null!=a&&0<a.length&&(a=this.ug(a[0]),null!=a))return{subId:"oj-listview-disclosure",key:a};return null},getContextByNode:function(a){var b,d,e;a=this.fo(a);return null!=a&&0<a.length&&(b=this.ug(a[0]),null!=b)?(d=a.parent(),e=d.children("li").index(a),b={subId:"oj-listview-item",key:b,index:e},d.get(0)!=this.element.get(0)&&(b.parent=d.parent().get(0)),
a.children().first().hasClass(this.jg())?b.group=!0:b.group=!1,b):null},getDataForVisibleItem:function(a){var b;b=a.index;a=a.parent;a=null==a?this.element.get(0):g(a).children("ul."+this.nh()).first();b=g(a).children("li").get(b);return null!=b&&g(b).hasClass(this.kg())?this.pda(b):null},pda:function(a){return null==this.Nd("data")?a:g.data(a,"data")},pu:function(a){null!=this.Sf&&this.Sf.ZOa(a)},un:function(c){c&&this.Ih&&a.Q.ul(c,this.Ih)},Xo:function(c){c&&(null==this.Ih&&(this.Ih=this.Mm.bind(this)),
a.Q.al(c,this.Ih))},Mm:function(a,b){0<a&&0<b&&null!=this.Rf&&this.Rf.Mm(a,b)},Dta:function(){return!0},f7:function(){return function(){return!1}},n7:function(a){return null!=a.data||null!=a.drillMode||null!=a.groupHeaderPosition||null!=a.item||null!=a.scrollPolicy||null!=a.scrollPolicyOptions},xS:function(a){var b,d,e;if(this.n7(a))return null!=a.data&&(null==a.currentItem&&this.Fj("currentItem",null),null==a.selection&&this.$l(!0)),!0;if(null!=a.expanded&&this.Rf.Cl()&&(this.gq=void 0,d=a.expanded,
Array.isArray(d))){this.bc();this.nza();this.Qfa=!0;try{b=this,g.each(d,function(a,c){b.g3(c,!0,!0,!0)})}finally{this.Qfa=void 0,this.Ub()}}null!=a.currentItem?(d=this.We(a.currentItem),null!=d&&(d=g(d),this.Gj(d)||((e=document.activeElement)&&this.element.get(0).contains(e)?this.Fm(d,null):this.Zc(d,null,!0)))):null===a.currentItem&&(this.CE(),this.V=null,this.GK());this.nK(a);null!=a.selectionMode&&(this.$l(!0),this.DK(),this.Lta(a.selectionMode));null!=a.contextMenu&&this.pu(a.contextMenu);null!=
a.scrollTop&&(d=this.tq(),e=a.scrollTop,null==e||isNaN(e)||(d.scrollTop=e));null!=this.Sf&&null!=this.V&&null!=a.dnd&&null!=a.dnd.reorder&&("enabled"===a.dnd.reorder.items?this.Sf.Wja(this.V.elem):"disabled"===a.dnd.reorder.items&&this.Sf.vOa(this.V.elem));return!1},nK:function(a){var b,d;if(null!=a.selection&&this.Rc())for(a.selection=this.YBa(a.selection),b=a.selection,this.$l(!1),d=0;d<b.length;d++)a=this.We(b[d]),null!=a&&this.oF(a,b[d])},Kl:function(a,b,d){return this.ea._trigger(a,b,d)},Fj:function(a,
b,d){this.ea.option(a,b,d)},Nd:function(a){return this.ea.option(a)},bc:function(){var c=this,b;this.vr&&(0==this.vr.length&&(this.Kqa=new Promise(function(a){c.Lqa=a}),b=a.Context.getContext(this.element[0]).ye(),c.sm=b.Ed({})),this.vr.push(1))},Ub:function(){this.vr&&0<this.vr.length&&(this.vr.pop(),0==this.vr.length&&(this.Lqa(null),this.sm(null),this.sm=null))},Lra:function(a){if(this.vr)for(;0<this.vr.length;)this.Ub();throw a;},eRa:function(a){var b,d=this,e=[];g.each(a,function(a,c){b=d.We(c);
null!=b&&e.push(b)});return e},Mh:function(){return this.element.hasClass("oj-listview-card-layout")},pA:function(){return!0},Yfa:function(){var c;this.bc();c=this.Nd("data");null!=c?("undefined"!==typeof a.ga&&"undefined"!==typeof a.au||this.Lra("oj.TableDataSource or oj.TreeDataSource not found. Ensure the required modules are imported"),c instanceof a.ga?this.Rf=new a.jc(this,this.element[0],c):c instanceof a.au?this.Rf=new a.Hj(this,this.element[0],c):this.Lra("Invalid data")):this.Rf=new a.ae(this,
this.element[0]);this.aE();this.Rf.g7();this.Ub()},Kta:function(a){this.element.attr("aria-activedescendant",a.attr("id"))},DK:function(){this.Ro()?this.element.attr("aria-multiselectable",!0):this.Rc()&&this.element.attr("aria-multiselectable",!1)},u7:function(){this.element.removeAttr("aria-activedescendant").removeAttr("aria-multiselectable")},Lta:function(a){var b=this,d,e;"none"==a?(this.element.removeAttr("aria-multiselectable"),a=function(a){b.Pf(a).removeAttr("aria-selected")}):("single"==
a?this.element.attr("aria-multiselectable",!1):this.element.attr("aria-multiselectable",!0),a=function(a){b.Pf(a).attr("aria-selected","false")});d=this.xs();for(e=0;e<d.length;e++)a(g(d[e]))},vya:function(){var a,b;a=this.eh();this.DK();b=this.yya();a.append(b);this.Tn=b;b=this.pya();a.append(b);this.xD=b;this.ln()&&null!=this.Sf&&a.append(this.qya())},yya:function(){var a=g(document.createElement("div"));a.addClass("oj-listview-status-message oj-listview-status").attr({id:this.Dx("status"),role:"status"});
return a},pya:function(){var a=g(document.createElement("div"));a.addClass("oj-helper-hidden-accessible").attr({id:this.Dx("info"),role:"status"});return a},qya:function(){var a=g(document.createElement("div"));a.addClass("oj-helper-hidden-accessible").attr({id:this.Dx("instr")});a.text(this.ea.R("accessibleReorderTouchInstructionText"));return a},Jh:function(a){""!=a&&this.xD.text()!=a&&this.xD.text(a)},aE:function(){var a=this.ea.R("msgFetchingData");this.Tn.text(a).css("left",this.element.outerWidth()/
2-this.Tn.outerWidth()/2).show()},ut:function(){this.Tn.hide()},Xj:function(){return this.eh()},eh:function(){null==this.lJ&&(this.lJ=this.aAa());return this.lJ},aAa:function(){var a;this.$d?a=g(this.$d):(a=g(document.createElement("div")),this.element.parent()[0].replaceChild(a[0],this.element[0]));a.addClass(this.u6()).addClass("oj-component");a.prepend(this.element);return a},vda:function(){return this.ea.R("msgNoData")},wF:function(){var a,b;a=this.vda();b=document.createElement("li");b.id=this.Dx("empty");
b.className="oj-listview-no-data-message oj-listview-empty-text";b.textContent=a;return b},ai:function(a){a=this.Pf(a).attr("aria-expanded");return"true"==a?this.mo:"false"==a?this.lo:this.h7},Tw:function(a,b){var d=this.vD();b==this.mo?(this.Pf(a).attr("aria-expanded","true"),d&&a.removeClass("oj-collapsed").addClass("oj-expanded")):b==this.lo&&(this.Pf(a).attr("aria-expanded","false"),d&&a.removeClass("oj-expanded").addClass("oj-collapsed"))},zY:function(a,b,d){a=this.options.item[a];return"function"==
typeof a&&d?a.call(this,b):a},A3:function(a){return this.zY("focusable",a,!0)},Hna:function(a){return this.A3(a)&&this.zY("selectable",a,!0)},nDa:function(){var a=this.zY("renderer",null,!1);return"function"!=typeof a?null:a},fpa:function(){},q4:function(a){var b;null!=this.V&&this.V.elem&&g(this.V.elem).get(0)==a&&this.Fj("currentItem",null);if(null!=a&&a.id&&null!=this.kr)for(b in this.kr)if(this.kr.hasOwnProperty(b)&&this.kr[b]===a.id){delete this.kr[b];break}},rz:function(a,b){var d,e,f,h;null!=
this.Sf&&this.Sf.rz(a);this.SF(a);if(this.Rc())if(d=this.Nd("selection"),this.Dl(a))for(f=0;f<d.length;f++){if(d[f]==b.key&&(this.oF(a,d[f]),!this.Ro())){1<d.length&&(e=g(this.We(b.key)),this.Fj("selection",[b.key],{_context:{originalEvent:null,kb:!0,fl:{items:e}},changed:!0}));break}}else if(f=d.indexOf(b.key),-1<f){d=d.slice(0);d.splice(f,1);e=Array(d.length);for(f=0;f<d.length;f++)e[f]=this.We(d[f]);this.Fj("selection",d,{_context:{originalEvent:null,kb:!0,fl:{items:g(e)}},changed:!0})}this.Rf.Cl()&&
void 0==this.Qfa&&this.ai(g(a))==this.lo&&(f=this.Nd("expanded"),this.NB()?void 0==this.gq&&this.Gw(g(a),null,!1,null,!1,!1,!1):Array.isArray(f)&&(h=this,g.each(f,function(d,e){e!=b.key||void 0!=h.gq&&-1!=h.gq.indexOf(e)||h.Gw(g(a),null,!1,null,!1,!1,!1)})));null!=this.V&&b.key==this.V.key&&null!=this.V.elem&&a!=this.V.elem.get(0)&&(this.V.elem=g(a))},qw:function(){var a,b;this.ut();g(document.getElementById(this.Dx("empty"))).remove();0==this.element[0].childElementCount?(a=this.wF(),this.element.append(a)):
(this.GD=null,a=this.Nd("currentItem"),null!=a&&(b=this.We(a),null==b?this.Fj("currentItem",null):null!=this.V||this.Gj(g(b))||this.Fm(g(b),null)),this.eh().hasClass("oj-focus-ancestor")&&null==this.V&&null==a&&this.cga(),this.FS());this.Kl("ready",null,{})},FS:function(){var a,b;a=this.Nd("scrollTop");if(!isNaN(a)&&(b=this.tq(),a!=b.scrollTop&&(b.scrollTop=a,b.scrollTop!=a))){this.u1=!0;return}this.u1=!1},CUa:function(){var a=this.Nd("currentItem");null!=a&&(a=this.We(a),null==a||this.Gj(g(a))||
this.Fm(g(a),null))},yw:function(){this.J4=this.GD=null},Uw:function(c,b,d){null==d&&(d=this.gz(b));return a.ha.Yn(c,b,d,this.ea)},kqa:function(a,b,d){if(this.qK(g(b.target)))return!1;a=g(b.target).closest("."+this.Kg());0<a.length&&!this.Gj(g(a[0]))&&this.Fm(g(a[0]),null);a=this.element;null!=this.V&&(a=this.V.elem);a={launcher:a,initialFocus:"menu"};"keyboard"===d&&(a.position={my:"start top",at:"start bottom",of:this.V.elem});this.ea.oi(b,d,a)},H6:function(a){return null!=a.prop("nodeName").match(/^INPUT|SELECT|OPTION|BUTTON|^A\b|TEXTAREA/)},
qK:function(a){for(;null!=a&&a[0]!=this.element[0]&&"LI"!=a.prop("nodeName");){if(3!=a[0].nodeType){var b=a.attr("tabIndex"),d=a.attr("data-oj-tabindex");if(null!=b&&0<=b&&!a.hasClass(this.Cn())&&!a.hasClass("oj-listview-cell-element")||this.H6(a)&&(-1!=b||-1!=d))return!0}a=a.parent()}return!1},SF:function(a,b){var d,e;d=g(a);d.hasClass(this.kg())||(d=g(d.get(0).firstElementChild));d.find("a, input, select, textarea, button, object, .oj-component-initnode").each(function(){g(this).removeAttr("data-first").removeAttr("data-last");
e=parseInt(g(this).attr("tabIndex"),10);!(isNaN(e)||0<=e)||void 0!==b&&this==document.activeElement||g(this).attr("tabIndex",-1).attr("data-tabmod",isNaN(e)?-1:e)})},WAa:function(a){var b,d;b=this.xs();a=b.index(a);for(d=0;d<=a;d++)this.SF(b[d],!0)},VAa:function(a){var b;b=this.xs();a=b.index(a);if(-1!=a)for(;a<=b.length-1;a++)this.SF(b[a],!0)},CBa:function(a){var b;a=g(a).find("[data-tabmod]").each(function(){b=parseInt(g(this).attr("data-tabmod"),10);g(this).removeAttr("data-tabmod");-1==b?g(this).removeAttr("tabIndex"):
g(this).attr("tabIndex",b)});a.first().attr("data-first","true");a.last().attr("data-last","true")},Vya:function(a){g(a).find("[data-tabmod]").removeAttr("tabIndex").removeAttr("data-tabmod").removeAttr("data-first").removeAttr("data-last")},Gj:function(a){return a.hasClass("oj-skipfocus")},l_:function(a){return void 0===a.relatedTarget||null!=a.relatedTarget&&g.contains(this.ea.element.get(0),a.relatedTarget)?!0:!1},Ir:function(a){var b;this.eh().addClass("oj-focus-ancestor");null==this.V?(b=this.bh(g(a.target)),
this.CJ||this.l_(a)||null!=b&&!this.Gj(b)||this.cga(a)):(this.CJ||a.target!==this.ea.element[0]||this.l_(a)||(this.cA(),this.bG(this.V.elem)),this.HT(),this.g1(this.V.elem))},cga:function(a){var b,d,e;b=this.xs();for(d=0;d<b.length;d++)if(e=g(b[d]),!this.Gj(e)){this.Fm(e,a);break}},Nsa:function(a){this.Hr(a)},ONa:function(){var c=a.Qa.vm();return c.browser==a.Qa.Di.gK&&48>parseInt(c.browserVersion,10)?!1:!0},THa:function(c){var b=a.Qa.vm();return null==c.relatedTarget&&b.browser==a.Qa.Di.sE&&c.target==
this.ea.element.get(0)?!0:!1},Hr:function(a){!this.ONa()||this.THa(a)||this.l_(a)||(this.eh().removeClass("oj-focus-ancestor"),this.CE(),null!=this.V&&this.lja(this.V.elem),this.GK())},qfa:function(a){a=this.fo(a.target);null!=a&&(this.L4=null,this.Ws(a,"oj-hover"))},cGa:function(a){this.xia()||(a=this.fo(a.target),null==a||this.Gj(a)||(this.L4=a,this.jO(a,"oj-hover")))},xia:function(){return 500>Date.now()-this.BIa},lK:function(a){var b,d;if(this.vD()&&(b=a.keyCode,b===this.df||b===this.Zf))if(d=
this.V.elem,b===this.df){if(this.ai(d)==this.mo){this.Tt(d,a,!0,this.V.key,!0,!0);return}}else if(this.ai(d)==this.lo){this.Gw(d,a,!0,this.V.key,!0,!0,!0);return}b=this.E6(a);null!=this.Sf&&(b=b||this.Sf.lK(a));!0===b&&a.preventDefault()},sfa:function(a){this.Bz&&this.Ws(this.Bz,"oj-focus");null!=this.Sf&&this.Sf.yla(g(a.target))},mK:function(a){var b,d;d=g(a.target);null!=this.Sf&&this.Sf.Sja(d);b=this.bh(d,!0);null!=b&&this.tga(b)&&(this.CJ=!0,b=null);null==b||0==b.length||this.Gj(b)||d.hasClass("oj-listview-drag-handle")||
(this.CJ=!0,this.eh().hasClass("oj-focus-ancestor")||this.eh().addClass("oj-focus-ancestor"),this.Bz=b,this.jO(b,"oj-focus"),this.B_(null!=this.V?this.V.elem:null,b),b.get(0).contains(document.activeElement)||this.bG(b),a.originalEvent.touches&&0<a.originalEvent.touches.length&&(this.ZR={x:a.originalEvent.changedTouches[0].pageX,y:a.originalEvent.changedTouches[0].pageY}))},qE:function(a){var b,d;null!=this.Bz&&(this.Ws(this.Bz,"oj-focus"),null!=this.ZR&&(b=this.Bz.offset(),d=this.gz("pointerUp"),
d.offsetX=this.ZR.x-b.left+"px",d.offsetY=this.ZR.y-b.top+"px",b=this.Bz.children("."+this.jg()),b=0<b.length?b.get(0):this.Pf(this.Bz).get(0),this.Uw(b,"pointerUp",d),this.ZR=null));this.BIa=Date.now();this.qfa(a)},WF:function(){var a;a=this.V.elem;this.SF(a);this.CBa(a);0<a.find("[data-first]").length&&this.Jja(!0)},Fu:function(){this.Jja(!1);this.SF(this.V.elem)},wT:function(a){var b,d,e,f;0===a.button&&(b=this.lp(),d=this.nt(),e=this.jg(),f=g(a.target),f.hasClass(d)?(this.bm(a),a.preventDefault()):
f.hasClass(b)?(this.uf(a),a.preventDefault()):(b=this.bh(f),null==b||0==b.length||this.Gj(b)||(this.sga()&&null!=this.V&&this.V.elem.get(0)!=b.get(0)&&this.Fu(),this.eh().hasClass("oj-focus-ancestor")||this.eh().addClass("oj-focus-ancestor"),this.Rc()&&this.Dl(b[0])?(this.ln()?this.CGa(b,a):this.Msa(b,a),this.pA()&&a.target==b.get(0)&&this.bG(b),null!=this.Sf&&this.Sf.XUa()):this.C6(b,a),this.YHa(f.get(0))?this.WF():this.vD()&&f.closest("."+e)&&(this.ai(b)==this.lo?this.uf(a):this.ai(b)==this.mo&&
this.bm(a)))))},ln:function(){return a.Q.Re()},fIa:function(){return this.ln()&&a.Qa.vm().os!=a.Qa.Gl.A7},aX:function(c){return a.Q.vt(c)},Dx:function(a){return[this.element.attr("id"),a].join(":")},fo:function(a){return g(a).closest("."+this.Kg())},tga:function(a){return a.hasClass("oj-clickthrough-disabled")},bh:function(a,b){for(var d=a;0<d.length;){if(this.tga(d)){if(b)return d;break}if(d.hasClass(this.Kg()))return d;d=d.parent()}return null},uDa:function(){null==this.ppa&&(this.ppa=parseInt(this.eh().css("border-top-width"),
10)+parseInt(this.eh().css("border-bottom-width"),10));return this.ppa},scrollToItem:function(a){a=a.key;null!=a&&(a=this.We(a),null!=a&&(g(a).hasClass(this.kg())?this.P0(a):(a=g(a).children("."+this.jg()).first(),this.O0(a.get(0)))))},P0:function(a){var b,d,e,f,h,k,l=0;b=a.offsetTop;d=a.offsetHeight;a=this.eh()[0];e=a.scrollTop;f=a.offsetHeight;null!=this.Ph&&(h=parseInt(this.Ph.style.top,10),k=g(this.Ph).outerHeight(),b<=h&&h<b+d?l=(d+b-h)/2:b>=h&&b<h+k&&(l=(h+k-b)/2));b>=e&&b+d<=e+f?0<l&&(a.scrollTop=
e-l):(b=Math.max(0,Math.min(b-l,Math.abs(b+d-f))),b>e&&(b+=this.uDa()),a.scrollTop=b)},ug:function(a){return this.Rf.ug(a)},We:function(a){var b;return null!=this.kr&&(b=this.kr[a],null!=b)?document.getElementById(b):this.Rf.We(a)},dA:function(a){return this.Mh()?a==this.Ll||a==this.Al||a==this.df||a==this.Zf:a==this.Ll||a==this.Al},xs:function(){var a,b,d;null==this.GD&&(a=this.jz(),b="."+this.Kg()+":visible",this.GD=this.element.find(b).filter(function(){return(d=g(this).parent().hasClass(a))?!g(this).parent().parent().hasClass("oj-collapsed"):
!0}));return this.GD},PFa:function(a){var b=a.get(0).nextElementSibling;null!=b&&g(b).hasClass(this.Kg())||this.Rf.Cl()&&a.parent().hasClass(this.nh())&&null!=a.parent().parent().get(0).nextElementSibling||(a=this.tq(),a.scrollTop<a.scrollHeight&&(a.scrollTop=a.scrollHeight))},Lw:function(a,b,d){var e,f;if(!this.Rf.eA())return!0;e=!b||this.NR?this.V.elem:this.Te;f=!1;switch(a){case this.Ll:if(this.Mh()&&g(e).hasClass(this.kg()))break;this.Yea(e,b,d);f=!0;break;case this.Al:if(this.Mh()&&g(e).hasClass(this.kg()))break;
this.Wea(e,b,d);f=!0;break;case this.df:case this.Zf:this.Mh()&&("rtl"==this.ea.sd()&&(a=a==this.df?this.Zf:this.df),a==this.df?this.Yea(e,b,d):this.Wea(e,b,d),f=!0)}return f},Wea:function(a,b,d){var e,f;e=this.xs();a=e.index(a);a++;if(a<e.length){for(f=g(e[a]);this.Gj(f);){a++;if(a==e.length)return;f=g(e[a])}b?(this.FX(f,d),this.NR=!1):(this.Fm(f,d),this.NR=!0,this.PFa(f))}},Yea:function(a,b,d){var e,f;e=this.xs();a=e.index(a);a--;if(0<=a){for(f=g(e[a]);this.Gj(f);){a--;if(0>a)return;f=g(e[a])}b?
(this.FX(f,d),this.NR=!1):(this.Fm(f,d),this.NR=!0)}},sga:function(){return"actionable"==this.Kpa},Jja:function(a){this.Kpa=a?"actionable":"navigation";a||this.element[0].focus()},NVa:function(){return this.Hw},Pf:function(a){var b;return a.hasClass(this.Cn())?this.pA()&&"row"==a.attr("role")?(b=a.children(".oj-listview-cell-element").first(),0==b.length?a.children().first():b):a:g(a.find("."+this.Cn()).first())},GK:function(){this.element.attr("tabIndex",0)},HT:function(){this.element.removeAttr("tabIndex")},
g1:function(a){this.Pf(a).attr("tabIndex",0)},lja:function(c){var b;b=!0;if("presentation"===c.attr("role")||a.Qa.vm().browser===a.Qa.Di.c6)b=!1;c=this.Pf(c);b?c.removeAttr("tabIndex"):c.attr("tabIndex",-1)},B_:function(a,b){this.Hw===this.Hw?(null!=a&&this.lja(a),this.g1(b),this.HT()):this.Kta(b)},YQ:function(a){var b;b=a.children("a, input, select, textarea, button");return 1===b.length&&0===b.first().find("a, input, select, textarea, button").length?b.first():a},Zc:function(a,b,d){var e,f,g;null!=
a?(e=a[0],e=this.ug(e),null==this.V||e!=this.V.key?(f={key:e,item:a},null!=this.V&&(f.previousKey=this.V.key,f.previousItem=this.V.elem,null!=this.Sf&&this.ln()&&this.Sf.yla(f.previousItem)),g=!this.Kl("beforeCurrentItem",b,f),g||(this.V=g={key:e,elem:a},null!=this.Sf&&this.ln()&&this.Sf.Sja(a),void 0!==d&&d||(this.B_(f.previousItem,a),this.cA()),this.Fj("currentItem",e,{_context:{originalEvent:b,kb:!0,fl:{item:a}},changed:!0}))):e==this.V.key&&(this.V=g={key:e,elem:a},void 0!==d&&d||this.B_(null,
a))):this.V=null},bG:function(a){this.Hw==this.Hw&&this.Pf(a).focus()},cA:function(){var a;null!=this.V&&this.eh().hasClass("oj-focus-ancestor")&&(a=this.V.elem,this.jO(a,"oj-focus"))},CE:function(){null!=this.V&&this.Ws(this.V.elem,"oj-focus")},C6:function(a,b){var d=null!=this.V?this.V.elem.get(0):null;null==d||g(d).hasClass(this.kg())||(d=d.firstElementChild);null!=b&&null!=d&&d!=b.target&&d.contains(b.target)||this.Fm(a,b,this.pA()?b.target!=a.get(0):!0)},Fm:function(a,b,d){this.P0(a[0]);this.CE();
this.Zc(a,b);this.cA();void 0!==d&&d||this.bG(a)},Rc:function(){return"none"!=this.Nd("selectionMode")},Ro:function(){return"multiple"==this.Nd("selectionMode")},Dl:function(a){a=this.Pf(g(a)).get(0);return a.hasAttribute("aria-selected")},YBa:function(a){var b,d,e;b=[];for(d=0;d<a.length&&(e=this.We(a[d]),null==e||!this.Dl(e)||(b.push(a[d]),this.Ro()));d++);return b},sOa:function(){var a,b;null!=this.kr&&(a=this,g.each(this.Nd("selection"),function(d,e){b=a.We(e);null!=b&&a.Ws(b,"oj-selected")}))},
jO:function(a,b){this.rE(a,b,!0)},Ws:function(a,b){this.rE(a,b,!1)},rE:function(a,b,d){var e;a=g(a);"oj-selected"==b&&this.Pf(a).attr("aria-selected",d?"true":"false");e=a.children("."+this.jg());0<e.length&&(a=g(e[0]));"oj-focus"===b?d?"actionable"!=this.Kpa&&this.sB(a):this.Lx(a):d?a.addClass(b):a.removeClass(b)},Msa:function(a,b){var d,e;this.P0(a[0]);d=this.aX(b);e=b.shiftKey;this.Ro()?d||e?!d&&e?this.FX(a,b):this.XV(a,b):this.wE(a,b):this.wE(a,b)},CGa:function(a,b){this.Ro()?this.XV(a,b):this.wE(a,
b)},$l:function(a){this.sOa();a&&this.Fj("selection",[],{_context:{originalEvent:null,kb:!0,fl:{items:g()}},changed:!0});this.Te=null},wE:function(a,b){this.$l(!1);this.XV(a,b,[])},FX:function(a,b){var d;null!=this.V&&(d=this.Te,d!=a&&(this.Ws(a,"oj-focus"),this.Bca(this.V.elem,a,b)))},Bca:function(a,b,d){this.$l(!1);this.Te=b;this.VGa(a,b,d);this.cA()},VGa:function(a,b,d){var e,f,h,k,l;e=[];f=[];h=this.xs();a=h.index(a);k=h.index(b);a>k?b=k:(b=a,a=k);for(;b<=a;b++)k=h[b],this.Dl(k)&&(l=this.Rf.ug(k),
this.oF(k,l),e.push(l),f.push(k));this.Fj("selection",e,{_context:{originalEvent:d,kb:!0,fl:{items:g(f)}},changed:!0})},oF:function(a,b){null==this.kr&&(this.kr={});this.kr[b]=g(a).attr("id");this.jO(a,"oj-selected")},XV:function(a,b,d){var e,f;e=this.ug(a[0]);void 0==d&&(d=this.Nd("selection").slice(0));f=null!=this.V?this.V.elem.get(0):null;null==f||g(f).hasClass(this.kg())||(f=f.firstElementChild);null==b||null!=f&&f!=b.target&&f.contains(b.target)||(this.CE(),this.Zc(a,b),this.cA());f=null!=this.V?
this.V.elem.get(0):null;if(null==f||f!=a.get(0))null!=d&&0==d.length&&this.Fj("selection",d,{_context:{originalEvent:b,kb:!0,fl:{items:g([])}},changed:!0});else{f=d.indexOf(e);-1<f?(this.Ws(a,"oj-selected"),d.splice(f,1)):(this.Te=a,this.oF(a,e),d.push(e));a=Array(d.length);for(e=0;e<d.length;e++)a[e]=this.We(d[e]);this.Fj("selection",d,{_context:{originalEvent:b,kb:!0,fl:{items:g(a)}},changed:!0})}},IK:function(a,b,d){var e,f,h,k;e=this.Nd("selection").slice(0);f=this.V.elem;h=this.V.key;k=e.indexOf(h);
if(-1<k){if(d)return;this.Ws(f,"oj-selected");e.splice(k,1);0==e.length&&(this.Te=null)}else this.Dl(f[0])&&(b||(this.$l(!1),e.length=0),this.Te=f,this.oF(f,h),e.push(h));b=Array(e.length);for(d=0;d<e.length;d++)b[d]=this.We(e[d]);this.Fj("selection",e,{_context:{originalEvent:a,kb:!0,fl:{items:g(b)}},changed:!0})},YHa:function(a){return null!=a.nodeName.match(/^INPUT|SELECT|OPTION|TEXTAREA/)&&!a.readOnly},E6:function(a){var b,d,e,f=!1;if(null==this.V)return!1;b=a.keyCode;d=this.V.elem;this.sga()?
b==this.eT?(this.Fu(),this.cA(),this.bG(d),this.g1(d),f=!0):b===this.HK&&(b=d.find("[data-first]"),d=d.find("[data-last]"),a.shiftKey?0<b.length&&0<d.length&&b!=d&&a.target==b[0]&&(d[0].focus(),f=!0):0<b.length&&0<d.length&&b!=d&&a.target==d[0]&&(b[0].focus(),f=!0)):b==this.fT?(this.WF(),b=d.find("[data-first]"),0<b.length&&(b[0].focus(),d.removeClass("oj-focus-highlight"))):b==this.MT&&this.Rc()?(d=this.aX(a),(e=a.shiftKey)&&!d&&null!=this.Te&&this.Ro()?this.Bca(this.Te,this.V.elem,a):this.IK(a,
d&&!e&&this.Ro(),!1),f=!0):b==this.cT&&this.Rc()?this.IK(a,!1,!0):this.dA(b)?(d=this.aX(a),e=a.shiftKey,d||(f=this.Lw(b,e&&this.Rc()&&this.Ro(),a))):b===this.HK&&(a.shiftKey?this.WAa(d):this.VAa(d));return f},yga:function(a){return a&&this.$v?-1<this.$v.indexOf(a):!1},xP:function(a,b){var d;if(null!=a)if(null==this.$v&&(this.$v=[]),b)this.$v.push(a);else for(d=this.$v.indexOf(a);-1<d;)this.$v.splice(d,1),d=this.$v.indexOf(a)},gz:function(c){var b;null==this.Nma&&(b=a.wc.Kd(this.Mna()),this.Nma=b.animation);
return this.Nma[c]},vD:function(){return"none"!=this.Nd("drillMode")},NB:function(){var a=this.Nd("expanded");if("auto"===a){if(!this.vD())return!0}else if("all"===a)return!0;return!1},g3:function(a,b,d,e,f){var h=this.We(a);null!=h&&this.Gw(g(h),null,f,a,b,e,d)},uf:function(a){var b=this.fo(a.target);null!=b&&0<b.length&&this.Gw(b,a,!0,null,!0,!0,!0)},Gw:function(a,b,d,e,f,g,k){var l;if(this.ai(a)==this.lo&&(null==e&&(e=this.ug(a[0])),!d||!this.yga(e))){l={item:a,key:e};if(k&&(k=!this.Kl("beforeExpand",
b,l))&&f)return;this.bc();d&&this.xP(e,!0);this.Rf.$z(a,function(a){this.NBa(a,d,b,l,g)}.bind(this));this.GD=null;null!=b&&b.stopPropagation();null!=this.gq&&(a=this.gq.indexOf(e),-1!=a&&this.gq.splice(a,1));this.Ub()}},NBa:function(a,b,d,e,f){var h,k,l,m=this;this.bc();a.key=e.key;b=this.VS(g(a),b,d);a=a.parentNode;a=g(a);this.Tw(a,this.mo);h=this.lp();k=this.nt();l=this.jg();a.children("."+l).find("."+h).removeClass(h).addClass(k);f&&b.then(function(){m.Kl("expand",d,e)});b.then(function(){m.Ub()})},
v$:function(a,b){var d;a.parentsUntil("ul.oj-component-initnode","ul."+this.nh()).each(function(){d=parseInt(g(this).css("maxHeight"),10);0<d&&g(this).css("maxHeight",d+b+"px")})},VS:function(a,b){var d=0,e,f,h=this,k;e=new Promise(function(a){f=a});b?(this.bc(),a.children().each(function(){d+=g(this).outerHeight(!0)}),this.ln()&&this.v$(a,d),a.css("maxHeight",d+"px"),this.bc(),k=a.get(0),k=this.Uw(k,"expand"),k.then(function(){h.gFa(a,f)}),this.Ub()):(this.ln()?(a.children().each(function(){d+=g(this).outerHeight(!0)}),
a.css("maxHeight",d+"px"),this.v$(a,d)):a.css("maxHeight",""),this.WS(a),f(null));return e},gFa:function(a,b){this.ln()||a.css("maxHeight","");this.WS(a);b(null);this.Ub()},WS:function(a){a.removeClass(this.jz()).addClass(this.aD());this.xP(a[0].key,!1)},pma:function(a,b,d,e){var f=this.We(a);null!=f&&this.Tt(g(f),null,e,a,b,d)},bm:function(a){var b=this.fo(a.target);null!=b&&0<b.length&&this.Tt(b,a,!0,null,!0,!0)},Tt:function(a,b,d,e,f,g){var k,l,m=this;this.ai(a)==this.mo&&(null==e&&(e=this.ug(a[0])),
d&&this.yga(e)||(k={item:a,key:e},l=!this.Kl("beforeCollapse",b,k),l&&f||(this.bc(),d&&this.xP(e,!0),l=this.TS(a,e,d,b),this.Tw(a,this.lo),d=this.lp(),f=this.nt(),a.find("."+f).first().removeClass(f).addClass(d),this.GD=null,null!=b&&b.stopPropagation(),g&&l.then(function(){m.Kl("collapse",b,k)}),void 0==this.gq&&(this.gq=[]),-1==this.gq.indexOf(e)&&this.gq.push(e),l.then(function(){m.Ub()}))))},TS:function(a,b,d){var e=0,f,h,k,l=this;h=new Promise(function(a){k=a});f=a.children("ul").first();f[0].key=
b;d?(this.bc(),f.children().each(function(){e+=g(this).outerHeight()}),f.css("maxHeight",e+"px"),a=this.gz("collapse"),a.persist="all",this.bc(),b=f.get(0),a=this.Uw(b,"collapse",a),a.then(function(){l.NEa(f,k)}),this.Ub()):(f.css("maxHeight","0px"),this.US(f),k(null));return h},NEa:function(a,b){this.US(a);b(null);this.Ub()},US:function(a){a.removeClass(this.aD()).addClass(this.jz());null!=this.Rf&&this.Rf.Yz(a);this.xP(a[0].key,!1)},nza:function(){var a;this.bc();a=this;this.xs().each(function(){a.Tt(g(this),
null,!1,null,!1,!1)});this.Ub()},getExpanded:function(){var a,b,d;a=[];b=this;this.xs().each(function(){d=g(this);b.ai(d)==b.mo&&a.push(b.ug(d[0]))});return a},nd:function(){return a.Components.nd(this.element)},u6:function(){return this.fIa()?"oj-listview oj-listview-container-touch":"oj-listview oj-listview-container"},oT:function(){return"oj-listview-element"},kg:function(){return"oj-listview-item"},Cn:function(){return"oj-listview-focused-element"},Kg:function(){return"oj-listview-item-element"},
jg:function(a){return a&&this.xO()&&this.yO()?"oj-listview-group-item oj-sticky":"oj-listview-group-item"},nh:function(){return"oj-listview-group"},aD:function(){return"oj-listview-collapsible-transition"},jz:function(){return this.aD()},lp:function(){return"oj-listview-collapse-icon"},nt:function(){return"oj-listview-expand-icon"},CXa:function(){return"oj-listview-no-data-message"},w3:function(){return""},Mna:function(){return"oj-listview-option-defaults"},yO:function(){return this.ln()&&a.Qa.vm().os===
a.Qa.Gl.pK},eKa:function(a,b){var d=b.originalEvent.wheelDelta;isNaN(d)||(0>d?a.scrollTop+a.clientHeight+Math.abs(d)>=a.scrollHeight&&(a.scrollTop=a.scrollHeight,b.preventDefault()):0>=a.scrollTop-d&&(a.scrollTop=0,b.preventDefault()))},JN:function(){var a=this.tq();return a==document.body||a==document.documentElement?window:a},Kia:function(){var a=this,b;b=g(this.JN());this.ea._off(b,"scroll mousewheel");this.ea._on(b,{scroll:function(b){a.u1||a.Fj("scrollTop",a.tq().scrollTop,{_context:{originalEvent:b,
kb:!0}});a.u1=!1;a.xO()&&!a.yO()&&a.vfa()}});"loadMoreOnScroll"==this.options.scrollPolicy&&this.ea._on(b,{mousewheel:function(b){a.eKa(a.tq(),b)}})},xO:function(){return"static"!=this.Nd("groupHeaderPosition")},nG:function(){var a;null==this.J4&&(a="."+this.jg()+":visible",this.J4=this.element.find(a).filter(function(){return!g(this).parent().hasClass("oj-collapsed")&&0<g(this).next().children().length?!0:!1}));return this.J4},d2:function(a){g(a).removeClass("oj-pinned");a.style.top="auto";a.style.width=
"auto"},eea:function(a){var b;b=this.nG();a=b.index(a);return-1<a&&a<b.length-1?b[a+1]:null},RJa:function(a,b){var d,e,f;d=a.offsetWidth;e=a.offsetHeight;f=this.eea(a);null!=f&&f.offsetTop<=b+e+5&&(b-=e);g(a).addClass("oj-pinned");a.style.top=b+"px";a.style.width=d+"px"},vfa:function(){var a,b,d,e,f,g,k,l;a=this.tq().scrollTop;if(null!=this.Ph&&0==a)this.d2(this.Ph),this.Ph=null;else{d=this.nG();e=0;null!=this.Ph&&(e=this.Ph.offsetHeight);for(f=0;f<d.length;f++)if(g=d[f],this.Ph!=g&&(k=d[f].offsetTop,
l=k+g.parentNode.offsetHeight,k<a&&l>a+e)){b=g;break}null!=b&&b!=this.Ph?(null!=this.Ph&&this.d2(this.Ph),this.RJa(b,a),this.Ph=b):null!=this.Ph&&(b=this.eea(this.Ph),this.Ph.style.top=null!=b&&b.offsetTop<=a+e?b.offsetTop-e+"px":a+"px")}},tq:function(){var a;a=this.Nd("scrollPolicyOptions");return null!=a&&(a=a.scroller,null!=a)?a:this.eh().get(0)},O0:function(a){var b,d,e;b=this.tq();d=b.scrollTop;null!=this.Ph&&(this.d2(this.Ph),this.Ph=null);e=a.offsetTop;this.xO()&&this.yO()&&e<d&&(e=Math.max(0,
e-a.parentNode.offsetHeight+a.offsetHeight));b.scrollTop=e;this.xO()&&!this.yO()&&d==b.scrollTop&&this.vfa();this.FMa(a)},FMa:function(a){var b=this,d;g(a).next().children().each(function(){d=g(this);if(!b.Gj(d))return b.Fj("currentItem",this.key),!1})}});o_("_ojListView",a.S_,a);a.ab("oj.ojListView",g.oj.baseComponent,{widgetEventPrefix:"oj",options:{currentItem:null,data:null,dnd:{drag:null,drop:null,reorder:{items:"disabled"}},drillMode:"collapsible",expanded:"auto",groupHeaderPosition:"sticky",
item:{focusable:!0,renderer:null,selectable:!0},scrollPolicy:"auto",scrollPolicyOptions:{fetchSize:25,maxCount:500},scrollTop:0,selection:[],selectionMode:"none",animateStart:null,animateEnd:null,beforeCurrentItem:null,beforeExpand:null,beforeCollapse:null,collapse:null,copy:null,cut:null,expand:null,optionChange:null,paste:null,ready:null,reorder:null},_ComponentCreate:function(){this._super();this.hb()},hb:function(){var c={};c.element=this.element;c.$d=this.$d;c.ea=this;c=g.extend(this.options,
c);this.Ia=new a.S_;this.Ia.Gn(c)},Tg:function(){this._super();var a=this;this.Ia.Sr=function(b){return a.Sr(b)};this.Ia.JC()},_destroy:function(){this.Ia.destroy();this._super()},mi:function(a,b,d){this.Ia.kqa(a,b,d)},_setOptions:function(a,b){var d=this.Ia.xS(a,b);this._super(a,b);d&&this.Ia.refresh()},_setOption:function(a,b,d){var e=!0;"selectionMode"==a?e="none"==b||"single"==b||"multiple"==b:"drillMode"==a?e="collapsible"==b||"none"==b:"scrollPolicy"==a?e="auto"==b||"loadMoreOnScroll"==b:"groupHeaderPosition"==
a&&(e="static"==b||"sticky"==b);if(e)"selection"==a&&(d={_context:{fl:{items:g(this.Ia.eRa(b))}}}),this._super(a,b,d);else throw"Invalid value: "+b+" for key: "+a;},vo:function(){this.Ia.fS()},xk:function(){this.Ia.lqa()},Vp:function(){this.Ia.PD()},widget:function(){return this.Ia.Xj()},refresh:function(){this._super();this.Ia.refresh()},whenReady:function(){return this.Ia.whenReady()},getNodeBySubId:function(a){return this.Ia.getNodeBySubId(a)},getSubIdByNode:function(a){return this.Ia.getSubIdByNode(a)},
getContextByNode:function(a){return this.Ia.getContextByNode(a)},getDataForVisibleItem:function(a){return this.Ia.getDataForVisibleItem(a)},expand:function(a,b){this.Ia.g3(a,b,!0,!0)},collapse:function(a,b){this.Ia.pma(a,b,!0)},getExpanded:function(){return this.Ia.getExpanded()},getIndexerModel:function(){null==this.Voa&&a.qk&&(this.Voa=new a.qk(this.Ia));return this.Voa},scrollToItem:function(a){this.Ia.scrollToItem(a)}});(function(){var c=/^\[.*\]/;a.U.qb("oj-list-view","baseComponent",{properties:{currentItem:{type:"string"},
data:{},dnd:{type:"object",properties:{drag:{type:"object",properties:{items:{type:"object",properties:{dataTypes:{type:"Array\x3cstring\x3e"},drag:{},dragEnd:{},dragStart:{}}}}},drop:{type:"object",properties:{items:{type:"object",properties:{dataTypes:{type:"Array\x3cstring\x3e"},dragEnter:{},dragLeave:{},dragOver:{},drop:{}}}}},reorder:{type:"object",properties:{items:{type:"string",enumValues:["disabled","enabled"]}}}}},drillMode:{type:"string",enumValues:["collapsible","none"]},expanded:{type:"Array\x3cstring\x3e|string"},
groupHeaderPosition:{type:"string",enumValues:["sticky","static"]},item:{type:"object",properties:{focusable:{},renderer:{},selectable:{}}},scrollPolicy:{type:"string"},scrollPolicyOptions:{type:"object",properties:{fetchSize:{type:"number"},maxCount:{type:"number"},scroller:{}}},selection:{type:"Array\x3cstring\x3e",writeback:!0},selectionMode:{type:"string",enumValues:["none","single","multiple"]}},events:{animateEnd:{},animateStart:{},beforeCollapse:{},beforeCurrentItem:{},beforeExpand:{},collapse:{},
copy:{},cut:{},expand:{},paste:{},reorder:{}},methods:{collapse:{},expand:{},getContextByNode:{},getDataForVisibleItem:{},getExpanded:{},getIndexerModel:{},getNodeBySubId:{},getSubIdByNode:{},refresh:{},scrollToItem:{}},extension:{Ug:"ul",nb:"ojListView"}});a.U.register("oj-list-view",{metadata:a.U.getMetadata("oj-list-view"),parseFunction:function(a,d,e,f){return"expanded"==d?c.test(a)?JSON.parse(a):a:f(a)}})})()});