function qg(a){this.Init(a)}m("AdfSequencedSections",qg);r.v(qg);qg.ga=function(){};m("AdfSequencedSections.InitClass",qg.ga);qg.prototype.Init=function(a){qg.h.Init.call(this);var b=a.length;this.Or=Array(b);for(var d=0;d<b;d++)this.Or[d]=new xg(a[d],d)};r.a("AdfSequencedSections.prototype.Init",{Init:qg.prototype.Init});function xg(a,b){this.SZ=a;this.data=null;this.BTa=!0;this.options=null;this.index=b;this.B$=!1}m("AdfSectionalData",xg);
qg.aQ=function(a,b){var d=a.getFilter();if(d){var e=ug(d);if(e&&e instanceof Function){for(var d=[],f=0,g=b.length;f<g;f++){var h=b[f];e.call(a,h,f)&&d.push(h)}return d}v.l.severe("Couldn't locate filter function ",d," for component ",a.g())}return b};m("AdfSequencedSections.prefilter",qg.aQ);
qg.MRa=function(a,b){var d=rg(a),e=d.getDataUrl(),f={};f[$a.Pm]=a.g();f[$a.aj]=!1;f[$a.iK]=qg.hdb;f[$a.hJ]=qg.idb;var g={};g.Cpb=[a.getValueAttribute()];g.ppb=AdfRichInputSearch.pwa;g.Bua=b;f[$a.qt]=yg.Qqa(d,g);d=A.c;d.Cc(!1,!1,!0,"inputSearch: fetch row objects: id\x3d",a.g(),", url\x3d",e,", for values\x3d",b);d.nP().KZ(e,f)};m("AdfSequencedSections.fetchSpecificSuggestions",qg.MRa);
qg.hdb=function(a,b){var d=A.c.m(b[$a.Pm]);if(d){var e=qg.A6(a),e=qg.Y7(e.items,d.getValueAttribute());d.o().jha(d,new bg(e))}};qg.idb=function(a,b,d){v.l.severe("A REST call made for fetching selected row objects for inputSearch component '",d[$a.Pm],"' failed")};qg.Xqa=function(a,b,d,e){var f=b.getDataUrl(),g=b.getType()==R.ir;u.assert(d||g);f?(e=g?qg.ueb(a,b,d,e):qg.$eb(a),b=A.c,b.Cc(!1,!1,!0,"inputSearch: fetch data: id\x3d",a.g(),", url\x3d",f,", prefetch\x3d",d),b.nP().KZ(f,e)):!d&&g&&v.l.severe("dataUrl attribute isn't set")};
m("AdfSequencedSections.fetchSection",qg.Xqa);qg.ueb=function(a,b,d,e){e||(e={});e[$a.Pm]=a.g();e[$a.aj]=!d;e[$a.iK]=qg.Qbb;e[$a.hJ]=qg.Rbb;d||(e=a.o().S2(a,b,e,!0));return e};qg.$eb=function(a){var b={};b[$a.Pm]=a.g();b[$a.aj]=!1;qg.Kmb(a)&&(b[$a.iK]=qg.Xkb,b[$a.hJ]=qg.Ykb);return b};
qg.Qbb=function(a,b){var d=A.c.m(b[$a.Pm]);if(d){var e=qg.A6(a),f=qg.Y7(e.items,d.getValueAttribute()),g=d.o(),e=!e.T9;if(b[$a.aj]){var h=new bg(f);qg.sHa(d,h,e,b)&&(f=qg.aQ(d,f));f=new bg(f,h);g.Q2(d,f,e,b)}else f=new bg(f),R.K$(d,f),g.fE(d,f,e)}};qg.Xkb=function(a,b){var d=A.c.m(b[$a.Pm]);if(d){var e=qg.A6(a),e=qg.Y7(e.items,d.getValueAttribute()),e=new bg(e);R.K$(d,e);d.o().sL(d,e)}};
qg.Rbb=function(a,b,d){var e=d[$a.Pm];v.l.severe("A REST call made by inputSearch component '",e,"' failed");(e=A.c.m(e))&&(d[$a.aj]?e.o().R2(e,a,b,d):e.o().Dha(e,a,b))};qg.Ykb=function(a,b,d){v.l.severe("A REST call made by inputSearch component '",d[$a.Pm],"' failed")};qg.prototype.Cua=function(){this.Or.forEach(this.AX,this)};r.a("AdfSequencedSections.prototype.sendRequests",{Cua:qg.prototype.Cua});
qg.prototype.AX=function(a){var b=a.SZ,d=b.getParent(),e=b.getDataUrl();if(e){var f=A.c;f.Cc(!1,!1,!0,"inputSearch: fetch data: id\x3d",d.g(),", url\x3d",e);f.nP().KZ(e,zg(this,d,b,a.index))}};function zg(a,b,d,e){var f={};f[$a.Pm]=b.g();f[$a.aj]=!0;f[$a.iK]=a.D(a.FJa);f[$a.hJ]=a.D(a.gdb);f.zg=e;d.getType()==R.ir&&(f=b.o().S2(b,d,f,!1));return f}
qg.prototype.FJa=function(a,b){var d=A.c.m(b[$a.Pm]);if(d){var e=b.zg,f=this.Or[e],g=qg.A6(a);f.data=qg.Y7(g.items,d.getValueAttribute());if(f.SZ.getType()==R.ir){f.options=b;f.BTa=!g.T9;qg.sHa(d,new bg(f.data),!g.T9,b)&&(f.data=qg.aQ(d,f.data));for(var f=f.data,g=0,h=this.Or.length;g<h;g++){var l=this.Or[g].SZ;l.getFilter()&&(this.Or[g].data=qg.aQ(l,f),this.LW(g,d))}}else f.data=qg.aQ(d,f.data);this.LW(e,d)}};
qg.prototype.gdb=function(a,b,d){var e=d[$a.Pm];v.l.severe("The REST call made by inputSearch component '",e,"' failed");(e=A.c.m(e))&&(this.Or[d.zg].SZ.getType()==R.ir?e.o().R2(e,a,b,d):this.FJa([],d))};qg.prototype.LW=function(a,b){if(0===a||this.Or[a-1].B$){var d;for(d=0;d<=a&&this.Or[d].B$;d++);for(var e=this.Or.length;d<e;d++){var f=this.Or[d];u.assert(!f.B$);if(!f.data)break;var g=f.SZ;f.B$=!0;g.getParent().o().Lha(b,g,new bg(f.data),f.BTa,f.options,f.index)}}};
qg.sHa=function(a,b,d,e){e=R.kGa(e);og.update(a,e&&d,b);return e};qg.Kmb=function(a){return a.getSelectionMode()==R.k8a?!!rg(a).getFilterParameters():!1};qg.Hob=function(a,b){var d={};d.data=a;d.index=b;d.key=a[this];return d};qg.Y7=function(a,b){return a.map(qg.Hob,b)};
qg.A6=function(a){var b=null;if("string"==typeof a)try{b=JSON.parse(a)}catch(e){v.l.severe("Failed to parse the response as JSON object.",e);return}else b=a;if(b){a={};a.T9=!!b.T9;if(b instanceof Array)return a.items=b,a;if(b.items)return a.items=b.items,a;for(var d in b)if(b.hasOwnProperty(d)&&b[d]instanceof Array)return a.items=b[d],a;v.l.severe("Couldn't locate the collection property")}else v.l.severe("Failed to parse the response as JSON object.")};