openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 1.43 kB
JavaScript
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{Ho as t,Jo as n,Ko as r,eu as i}from"./control-ui-connection-Bfj9beF_.js";import{Iw as a,jw as o}from"./control-ui-boot-shared-DFTSUQQ0.js";import{n as s,r as c,t as l}from"./slots-DMTDa9LS.js";function u(e){return e===`search`?`settings`:e===`dreaming`?`dreams`:_.find(t=>t===e)??null}function d(e,t=``){let n=e.pathname?r(e.pathname,t):null;if(n&&n!==`overview`)return n;let i=u(e.tab);if(i)return i;let a=e.targetBlockId??``;return e.section===`memory`||a.startsWith(`config-section-memory`)?`settings`:n}function f(e,t=``){let r=new URLSearchParams(e.search),i=r.has(`tab`),a=e.section===`memory`&&r.has(`section`);r.delete(`tab`),a&&r.delete(`section`);let o=r.toString(),s={pathname:n(d(e,t)??`overview`,t),search:o?`?${o}`:``,hash:e.hash};return i||a||s.pathname!==e.pathname?s:null}function p(e){return e.kind===`off`?null:e.pluginId}function m(e){let t=i(i(e.plugins)?.slots);return c(`memory`,t?.memory)}function h(e){let t=i(e),n=i(i(t?.properties)?.memory),r=i(n?.properties);if(!t||!n||!r)return e;let a=v.get(t);if(a!==void 0)return a;let s=Object.fromEntries(o.filter(e=>e in r).map(e=>[e,r[e]])),c={...t,properties:{memory:{...n,properties:s}}};return v.set(t,c),c}var g,_,v;function y(){return(y=e((()=>{s(),t(),a(),g=l(`memory`),_=[`overview`,`memories`,`dreams`,`settings`],v=new WeakMap})))()}export{d as a,h as i,f as n,m as o,y as r,p as s,g as t};