/*** Copyright 2020 Teun Duynstee Licensed under the Apache License, Version 2.0 ***/ !function(n,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():n.firstBy=t()}(this,function(){function s(n){return n}function y(n){return"string"==typeof n?n.toLowerCase():n}function p(n,t){var e,i,o,r,f,u="function"==typeof this&&!this.firstBy&&this,c=(t="object"==typeof(t=t)?t:{direction:t},"function"!=typeof(e=n)&&(i=e,e=function(n){return n[i]||""}),1===e.length&&(o=e,r=t.ignoreCase?y:s,f=t.cmp||function(n,t){return n