import{s as e}from"./home-dir-C44RaPME-B5iLWwCq.mjs";import{i as t}from"./ids-BPsM98Uu-CJBJAeVC.mjs";import{t as n}from"./runtime-channel-state-CohMybAh-BBzhl07Q.mjs";const r=`webchat`;function i(){let e=n();return e?.channels&&e.channels.length>0?e.channels:[]}function a(t){let n=e(t);return n?i().find(t=>{let r=e(t.plugin.id??``)??``;return r&&r===n?!0:(t.plugin.meta?.aliases??[]).some(t=>e(t)===n)})?.plugin.id??null:null}function o(n){let i=e(n);return i?i===`webchat`?r:t(i)||(a(i)??i):void 0}export{o as n,r as t};