import{A as t}from"./p-BxEPsDRj.js";import{i as s,t as i,e}from"./p-CrMmJdZ6.js";
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const h=t=>void 0===t.strings
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */;const o=(t,s)=>{const i=t._$AN;if(void 0===i)return false;for(const t of i)t._$AO?.(s,false),o(t,s);return true},n=t=>{let s,i;do{if(void 0===(s=t._$AM))break;i=s._$AN,i.delete(t),t=s}while(0===i?.size)},r=t=>{for(let s;s=t._$AM;t=s){let i=s._$AN;if(void 0===i)s._$AN=i=new Set;else if(i.has(t))break;i.add(t),l(s)}};function c(t){void 0!==this._$AN?(n(this),this._$AM=t,r(this)):this._$AM=t}function d(t,s=false,i=0){const e=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(s)if(Array.isArray(e))for(let t=i;t<e.length;t++)o(e[t],false),n(e[t]);else null!=e&&(o(e,false),n(e));else o(this,t)}const l=t=>{t.type==i.CHILD&&(t._$AP??=d,t._$AQ??=c)};class f extends s{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),r(this),this.isConnected=t._$AU}_$AO(t,s=true){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),s&&(o(this,t),n(this))}setValue(t){if(h(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const a=()=>new u;class u{}const v=new WeakMap,p=e(class extends f{render(s){return t}update(s,[i]){const e=i!==this.G;return e&&void 0!==this.G&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=i,this.ht=s.options?.host,this.rt(this.ct=s.element)),t}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const s=this.ht??globalThis;let i=v.get(s);void 0===i&&(i=new WeakMap,v.set(s,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?v.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{a as e,p as n};
//# sourceMappingURL=p-B9-TeWdB.js.map