"use strict";(self.webpackChunk_kb_labs_qa_entry=self.webpackChunk_kb_labs_qa_entry||[]).push([["50"],{572(e,s,r){var t=r(5259),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,u=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,s,r){var t,i={},a=null,h=null;for(t in void 0!==r&&(a=""+r),void 0!==s.key&&(a=""+s.key),void 0!==s.ref&&(h=s.ref),s)n.call(s,t)&&!l.hasOwnProperty(t)&&(i[t]=s[t]);if(e&&e.defaultProps)for(t in s=e.defaultProps)void 0===i[t]&&(i[t]=s[t]);return{$$typeof:o,type:e,key:a,ref:h,props:i,_owner:u.current}}s.Fragment=i,s.jsx=a,s.jsxs=a},8048(e,s,r){e.exports=r(572)},4332(e,s,r){r.r(s),r.d(s,{EventBusProvider:()=>l,StudioEventBus:()=>i,eventBus:()=>n,useEventBusContext:()=>a});var t=r(5259),o=r(8048),i=class{subscriptions=new Map;history=[];devToolsObserver;subscribe(e,s,r,t){let o={event:e,handler:s,pluginId:r,pageId:t};return this.subscriptions.has(e)||this.subscriptions.set(e,new Set),this.subscriptions.get(e).add(o),()=>{this.subscriptions.get(e)?.delete(o)}}publish(e,s,r,t){let o={sourcePluginId:r,sourcePageId:t,timestamp:Date.now()},i={event:e,payload:s,meta:o};this.history.push(i),this.history.length>100&&this.history.shift(),this.devToolsObserver?.(i);let n=this.subscriptions.get(e);if(n)for(let r of n)try{r.handler(s,o)}catch(s){console.error(`[StudioEventBus] Handler error for "${e}" in ${r.pluginId}:${r.pageId}:`,s)}}unsubscribeAll(e,s){for(let[,r]of this.subscriptions)for(let t of r)t.pluginId===e&&t.pageId===s&&r.delete(t)}getHistory(){return this.history}setDevToolsObserver(e){this.devToolsObserver=e}clearDevToolsObserver(){this.devToolsObserver=void 0}reset(){this.subscriptions.clear(),this.history=[]}},n=new i,u=(0,t.createContext)(n);function l({children:e,bus:s}){return(0,o.jsx)(u.Provider,{value:s??n,children:e})}function a(){return(0,t.useContext)(u)}}}]);
//# sourceMappingURL=50.js.map