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