import{E as f}from"./lit-element-BwqzBgNx.js";import{a as l,f as n}from"./class-map-C3P0Kzir.js";var u,o;function G(){return o||(o=1,u=function(h){for(var t=[],a=h.length,r=0;r<a;r++){var s=h.charCodeAt(r);if(s>=55296&&s<=56319&&a>r+1){var i=h.charCodeAt(r+1);i>=56320&&i<=57343&&(s=(s-55296)*1024+i-56320+65536,r+=1)}if(s<128){t.push(s);continue}if(s<2048){t.push(s>>6|192),t.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){t.push(s>>12|224),t.push(s>>6&63|128),t.push(s&63|128);continue}if(s>=65536&&s<=1114111){t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}),u}/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const F=()=>new v;class v{}const c=new WeakMap,g=l(class extends n{render(e){return f}update(e,[h]){const t=h!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=h,this.ht=e.options?.host,this.rt(this.ct=e.element)),f}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const h=this.ht??globalThis;let t=c.get(h);t===void 0&&(t=new WeakMap,c.set(h,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G=="function"?c.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{F as e,g as n,G as r};
