var __extends=this&&this.__extends||function(){var t=function(n,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i))t[i]=n[i]};return t(n,i)};return function(n,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(n,i);function e(){this.constructor=n}n.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}();System.register(["./p-4d03a77e.system.js","./p-273325c7.system.js"],(function(t){"use strict";var n,i,e;return{setters:[function(t){n=t.d},function(t){i=t.L;e=t.a}],execute:function(){t("L",s);var r=function(t){__extends(n,t);function n(n){var i=t.call(this)||this;i.tags=[];i.mutationObserver=undefined;i.mutationObserverInit={childList:true,subtree:true,attributes:true,characterData:true};i.mutationCallback=function(t){var n=t.some((function(t){return i.tags.includes(t.target.nodeName)}));if(n){return i.notify(undefined)}var e=t.some((function(t){return Array.from(t.removedNodes).some((function(t){return i.tags.includes(t.nodeName)}))}));if(e){return i.notify(undefined)}var r=t.some((function(t){return t.type==="characterData"}));if(r){return i.notify(undefined)}if(i.tags.length===0&&t.length>0){return i.notify(undefined)}};i.tags=(n.tags||[]).map((function(t){return t.toUpperCase()}));i.mutationObserverInit={childList:n.childList===false?false:true,subtree:n.subtree===false?false:true,attributes:n.attributes===false?false:true,characterData:n.characterData===false?false:true};return i}n.prototype.connect=function(n){t.prototype.connect.call(this,n);if(typeof MutationObserver==="undefined"){return}this.destroyMutationObserver();this.mutationObserver=new MutationObserver(this.mutationCallback);this.mutationObserver.observe(n,this.mutationObserverInit)};n.prototype.disconnect=function(){t.prototype.disconnect.call(this);this.destroyMutationObserver()};n.prototype.destroyMutationObserver=function(){if(this.mutationObserver!==undefined){this.mutationObserver.disconnect();this.mutationObserver=undefined}};return n}(i);var u=function(t){__extends(i,t);function i(i){var e=t.call(this,(function(t){if(t.mutationObserverActive){t.mutationListener()}}))||this;e.options=i;e.debouncedNotify=n((function(){return e.notify()}),50);e.listener=new r(i);return e}i.prototype.attach=function(n){var i=this;var e,r,u;t.prototype.attach.call(this,n);if(this.options.closest){var s=n.el.closest(this.options.closest);if(s){(e=this.listener)===null||e===void 0?void 0:e.connect(s)}}else{(r=this.listener)===null||r===void 0?void 0:r.connect(n.el)}(u=this.listener)===null||u===void 0?void 0:u.add((function(){return i.debouncedNotify()}))};i.prototype.detach=function(){var n;t.prototype.detach.call(this);(n=this.listener)===null||n===void 0?void 0:n.disconnect()};return i}(e);function s(t){return function(n,i,e){var r=n.connectedCallback,s=n.disconnectedCallback;n.connectedCallback=function(){this._balMutationSubject=new u(t);this._balMutationSubject.attach(this);return r&&r.call(this)};n.disconnectedCallback=function(){this._balMutationSubject.detach();return s&&s.call(this)}}}}}}));