function o(e){var r,i;const t=(r=e.match_thumbprint)==null?void 0:r.trim();if(t)return`thumb:${t}`;const n=(i=e.match_sub)==null?void 0:i.trim();return n?`sub:${n}`:"anonymous"}function a(e,t){return t==="anonymous"?[]:e.filter(n=>o(n)===t)}function u(e,t){const n=e.capabilities??[];for(const r of n){const i=r.entity_types??[];if(i.includes("*")||i.includes(t))return!0}return!1}function c(e,t){return e.filter(n=>u(n,t))}function f(e){const t=e.capabilities??[];return t.length===0?"—":t.map(n=>{const r=n.entity_types??[],i=r.slice(0,2).join(", "),s=r.length>2?"…":"";return`${n.op}(${i}${s})`}).slice(0,6).join(" · ")}export{o as a,a as b,f,c as g};
