function ng(){}m("AdfInputSearchScoreUtils",ng);r.v(ng);ng.ga=function(){this.DCa=250;this.p3a=20;this.Cga=1;this.Bga=2;this.Aga=3;this.l2={};this.l2[this.Cga]=20;this.l2[this.Bga]=40;this.l2[this.Aga]=20;this.u1={};this.u1[this.Cga]=4;this.u1[this.Bga]=4;this.u1[this.Aga]=8};m("AdfInputSearchScoreUtils.InitClass",ng.ga);ng.CSa=function(a){for(var b,d=Number.MAX_SAFE_INTEGER,e=Object.keys(a),f=0,g=e.length;f<g;f++){var h=e[f],l=a[h].value;l<d&&(d=l,b=h)}return b};
m("AdfInputSearchScoreUtils.getMinScoredSuggestionKey",ng.CSa);ng.yVa=function(a,b){return a.sort(function(a,e){return b[e.key].value-b[a.key].value})};m("AdfInputSearchScoreUtils.sortPerScore",ng.yVa);ng.$Va=function(a,b,d){a=ng.oob(a,b);b=b.U$;ng.Obb(b,a);var e=b[d];e?(ng.rhb(e,a),e.time=Date.now()):(e={},e.time=Date.now(),e.value=ng.p3a,b[d]=e)};m("AdfInputSearchScoreUtils.updateScores",ng.$Va);
ng.Obb=function(a,b){for(var d=Object.keys(a),e=0,f=d.length;e<f;e++){var g=a[d[e]],h=ng.RKa(g.time,b);g.value-=ng.u1[h]}};ng.rhb=function(a,b){var d=ng.RKa(a.time,b);0>a.value&&(a.value=0);a.value+=ng.l2[d];a.value>ng.DCa&&(a.value=ng.DCa)};ng.RKa=function(a,b){if(a>=b.current)return ng.Cga;if(a>=b.wrb)return ng.Bga;ng.Aga};
ng.oob=function(a,b){var d=b.LUa?b.LUa:Date.now(),e=sessionStorage.getItem(a);return e?JSON.parse(e):(e={},e.current=Date.now(),e.wrb=d,sessionStorage.setItem(a,JSON.stringify(e)),b.LUa=e.current,e)};