function n(n,t){let u=null;const l=function(...l){const e=this;null!==u&&clearTimeout(u),u=setTimeout((()=>{u=null,n.apply(e,l)}),t)};return l.cancel=function(){null!==u&&(clearTimeout(u),u=null)},l}function t(n,t){return n.reduce(((n,u)=>{const l=t(u);return n[l]||(n[l]=[]),n[l].push(u),n}),{})}function u(n,t){return n.length>t?n.slice(0,t)+"...":n}export{n as d,t as g,u as t}