import{a as r}from"./p-e97fde0a.js";var n=function(){var n;return{promise:new Promise((function(o){n=o})),resolve:n}},e=function(o,e,t){void 0===t&&(t=!0);var i="Function"===o.constructor.name?o.prototype:o,s=i.componentWillLoad;i.componentWillLoad=function(){var o=this,i=r(this),u=n(),a=new CustomEvent("openWormhole",{bubbles:!0,composed:!0,detail:{consumer:this,fields:e,updater:function(n,e){(n in i?i:o)[n]=e},onOpen:u}});i.dispatchEvent(a);var c=function(){if(s)return s.call(o)};return t?u.promise.then((function(){return c()})):c()}};export{e as o};