import{AsyncDirective as j,Decorators as y,Directive as $,Directives as k,LitElement as C,noChange as F,nothing as M,StaticHtml as H,svg as W}from"./../../third_party/lit/lit.js";import*as L from"./../../core/i18n/i18n.js";import*as a from"./../../third_party/lit/lit.js";var{html:d}=a.StaticHtml;function h(s,e,t){let o=s.getLocalizedStringSetFor(L.DevToolsLocale.DevToolsLocale.instance().locale).getMessageFormatterFor(e),n=a.nothing;for(let f of o.getAst())if(f.type===1){let i=t[f.value];i&&(n=d`${n}${i}`)}else"value"in f&&(n=d`${n}${f.value}`);return n}import*as v from"./../../third_party/lit/lit.js";var m=new WeakMap;function w(s,e,t){let o=e instanceof ShadowRoot?e.host:e;if(o instanceof Element){let i=m.get(e)?.container?.attributes,l=t?.container?.attributes;if(l)for(let[r,c]of Object.entries(l))i?.[r]!==c&&(c==null?o.removeAttribute(r):typeof c=="boolean"?o.toggleAttribute(r,c):o.setAttribute(r,c.toString()));if(i)for(let r of Object.keys(i))(!l||!(r in l))&&o.removeAttribute(r);let u=m.get(e)?.container?.classes,p=t?.container?.classes;if(u)for(let r of u)p?.includes(r)||o.classList.remove(r);if(p)for(let r of p)u?.includes(r)||o.classList.add(r)}let n=m.get(e)?.container?.listeners,f=t?.container?.listeners;if(n)for(let[i,l]of Object.entries(n))f?.[i]!==l&&o.removeEventListener(i,l);if(f)for(let[i,l]of Object.entries(f))n?.[i]!==l&&o.addEventListener(i,l);return m.set(e,t),v.render(s,e,t)}import*as g from"./../../third_party/lit/lit.js";var b=new WeakMap;function A(s,...e){let t=b.get(s);return t||(s.some(o=>o.includes(`
`))?t=x(s):t=s),b.set(s,t),g.html(t,...e)}function x(s){let e=!1,t=s.map(o=>o.replace(/[<>]|\n\s*/g,n=>{if(n==="<")e=!0;else if(e&&n===">")e=!1;else if(!e)return"";return n}));return t.raw=s.raw,t}export{j as AsyncDirective,y as Decorators,$ as Directive,k as Directives,C as LitElement,H as StaticHtml,A as html,h as i18nTemplate,F as noChange,M as nothing,w as render,W as svg};
//# sourceMappingURL=lit.js.map
