(()=>{function r(u){return{getInFilterFromModel:function(r,t,n){var e={},i=[];_.forEach(_.get(n,r,[]),function(r){i.push(r)}),i.length&&_.set(e,[t],{__in:i});return e},getQuery:function(r,a){return _.transform(r,function(t,r){var n,e=_.get(a,r.name),i=u.getColumnFilter(r,e),o=(i.__or?(t.__filter.__and=t.__filter.__and||[],t.__filter.__and.push(i)):i.__and&&_.get(t,"__filter.__and")?i.__and.map(function(r){return t.__filter.__and.push(r)}):_.assign(t.__filter,i),u.getColumnSort(r,e));return r.sorting&&(r.sorting.path||r.sorting.paths)&&0!==o.order&&(n={},i=r.sorting.paths||[{path:r.sorting.path,orderModifier:1}],_.forEach(i,function(r){n[r.path]=o.order*r.orderModifier}),t.__orderby.push(n)),t},{__filter:{},__orderby:[]})}}}r.$inject=["c8yFilteringSortingColumns"],angular.module("c8y.ui").factory("c8yFilteringSortingInventoryQueries",r)})();