text: export function dedupListOfLists(t){let r=[],e=[];for(let n=0;n<t.length;n++){let i=t[n].filter(t=>null!=t).join("");r.includes(i)?e.push(n):r.push(i)}return e}export function searchInObject(t,r){if("object"==typeof t){"string"==typeof r&&(r=r.toLowerCase());for(let e=0;e<t.length;e++)for(let n in t[e]){if(t[e][n]===r)return t[e];if("string"==typeof t[e][n]&&t[e][n].toLowerCase()===r)return t[e]}throw"Couldn't find "+r+" in "+t}throw t+" is not an object."}export function arrayFind(t,r){let e=!1;if(!Array.isArray(t))throw t+" is not an array.";if(void 0===r)throw"Missing parameter.";switch(r){case"min":if(e=Math.min.apply(Math,t),!isNaN(e))return e;for(let r=0;r<t.length;r++)isNaN(t[r])||(isNaN(e)?e=t[r]:t[r]<e&&(e=t[r]));break;case"max":if(e=Math.max.apply(Math,t),!isNaN(e))return e;for(let r=0;r<t.length;r++)isNaN(t[r])||(isNaN(e)?e=t[r]:t[r]>e&&(e=t[r]));break;default:e=occurrences(t.join(""),r)}return e}export function occurrences(t,r,e){if(t+="",(r+="").length<=0)return t.length+1;let n=0,i=0,o=e?1:r.length;for(;(i=t.indexOf(r,i))>=0;)++n,i+=o;return n}export function countOccurences(t){if(Array.isArray(t)){let r={};for(let e=0;e<t.length;++e)r[t[e]]||(r[t[e]]=0),++r[t[e]];return r}throw t+" is not an array."}