Socket
Socket
Sign inDemoInstall

lit-html

Package Overview
Dependencies
1
Maintainers
11
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.3 to 2.2.0

2

development/directives/template-content.d.ts

@@ -11,3 +11,3 @@ /**

constructor(partInfo: PartInfo);
render(template: HTMLTemplateElement): typeof noChange | DocumentFragment;
render(template: HTMLTemplateElement): DocumentFragment | typeof noChange;
}

@@ -14,0 +14,0 @@ /**

@@ -9,2 +9,137 @@ /**

/**
* Contains types that are part of the unstable debug API.
*
* Everything in this API is not stable and may change or be removed in the future,
* even on patch releases.
*/
export declare namespace LitUnstable {
/**
* When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,
* we will emit 'lit-debug' events to window, with live details about the update and render
* lifecycle. These can be useful for writing debug tooling and visualizations.
*
* Please be aware that running with window.emitLitDebugLogEvents has performance overhead,
* making certain operations that are normally very cheap (like a no-op render) much slower,
* because we must copy data and dispatch events.
*/
namespace DebugLog {
type Entry = TemplatePrep | TemplateInstantiated | TemplateInstantiatedAndUpdated | TemplateUpdating | BeginRender | EndRender | CommitPartEntry | SetPartValue;
interface TemplatePrep {
kind: 'template prep';
template: Template;
strings: TemplateStringsArray;
clonableTemplate: HTMLTemplateElement;
parts: TemplatePart[];
}
interface BeginRender {
kind: 'begin render';
id: number;
value: unknown;
container: HTMLElement | DocumentFragment;
options: RenderOptions | undefined;
part: ChildPart | undefined;
}
interface EndRender {
kind: 'end render';
id: number;
value: unknown;
container: HTMLElement | DocumentFragment;
options: RenderOptions | undefined;
part: ChildPart;
}
interface TemplateInstantiated {
kind: 'template instantiated';
template: Template | CompiledTemplate;
instance: TemplateInstance;
options: RenderOptions | undefined;
fragment: Node;
parts: Array<Part | undefined>;
values: unknown[];
}
interface TemplateInstantiatedAndUpdated {
kind: 'template instantiated and updated';
template: Template | CompiledTemplate;
instance: TemplateInstance;
options: RenderOptions | undefined;
fragment: Node;
parts: Array<Part | undefined>;
values: unknown[];
}
interface TemplateUpdating {
kind: 'template updating';
template: Template | CompiledTemplate;
instance: TemplateInstance;
options: RenderOptions | undefined;
parts: Array<Part | undefined>;
values: unknown[];
}
interface SetPartValue {
kind: 'set part';
part: Part;
value: unknown;
valueIndex: number;
values: unknown[];
templateInstance: TemplateInstance;
}
type CommitPartEntry = CommitNothingToChildEntry | CommitText | CommitNode | CommitAttribute | CommitProperty | CommitBooleanAttribute | CommitEventListener | CommitToElementBinding;
interface CommitNothingToChildEntry {
kind: 'commit nothing to child';
start: ChildNode;
end: ChildNode | null;
parent: Disconnectable | undefined;
options: RenderOptions | undefined;
}
interface CommitText {
kind: 'commit text';
node: Text;
value: unknown;
options: RenderOptions | undefined;
}
interface CommitNode {
kind: 'commit node';
start: Node;
parent: Disconnectable | undefined;
value: Node;
options: RenderOptions | undefined;
}
interface CommitAttribute {
kind: 'commit attribute';
element: Element;
name: string;
value: unknown;
options: RenderOptions | undefined;
}
interface CommitProperty {
kind: 'commit property';
element: Element;
name: string;
value: unknown;
options: RenderOptions | undefined;
}
interface CommitBooleanAttribute {
kind: 'commit boolean attribute';
element: Element;
name: string;
value: boolean;
options: RenderOptions | undefined;
}
interface CommitEventListener {
kind: 'commit event listener';
element: Element;
name: string;
value: unknown;
oldListener: unknown;
options: RenderOptions | undefined;
removeListener: boolean;
addListener: boolean;
}
interface CommitToElementBinding {
kind: 'commit to element binding';
element: Element;
value: unknown;
options: RenderOptions | undefined;
}
}
}
/**
* Used to sanitize any value before it is written into the DOM. This can be

@@ -47,2 +182,6 @@ * used to implement a security policy of allowed and disallowed values in

declare type ResultType = typeof HTML_RESULT | typeof SVG_RESULT;
declare const ATTRIBUTE_PART = 1;
declare const CHILD_PART = 2;
declare const ELEMENT_PART = 6;
declare const COMMENT_PART = 7;
/**

@@ -205,2 +344,25 @@ * The return type of the template tag functions.

}
declare type AttributeTemplatePart = {
readonly type: typeof ATTRIBUTE_PART;
readonly index: number;
readonly name: string;
};
declare type NodeTemplatePart = {
readonly type: typeof CHILD_PART;
readonly index: number;
};
declare type ElementTemplatePart = {
readonly type: typeof ELEMENT_PART;
readonly index: number;
};
declare type CommentTemplatePart = {
readonly type: typeof COMMENT_PART;
readonly index: number;
};
/**
* A TemplatePart represents a dynamic part in a template, before the template
* is instantiated. When a template is instantiated Parts are created from
* TemplateParts.
*/
declare type TemplatePart = NodeTemplatePart | AttributeTemplatePart | ElementTemplatePart | CommentTemplatePart;
export declare type Part = ChildPart | AttributePart | PropertyPart | BooleanAttributePart | ElementPart | EventPart;

@@ -207,0 +369,0 @@ export type { ChildPart };

@@ -11,2 +11,22 @@ /**

/**
* Useful for visualizing and logging insights into what the Lit template system is doing.
*
* Compiled out of prod mode builds.
*/
const debugLogEvent = DEV_MODE
? (event) => {
const shouldEmit = window
.emitLitDebugLogEvents;
if (shouldEmit) {
window.dispatchEvent(new CustomEvent('lit-debug', {
detail: event,
}));
}
}
: undefined;
// Used for connecting beginRender and endRender events when there are nested
// renders when errors are thrown preventing an endRender event from being
// called.
let debugLogRenderId = 0;
/**
* `true` if we're building for google3 with temporary back-compat helpers.

@@ -268,2 +288,3 @@ * This export is not present in prod builds.

var _a, _b, _c;
const renderId = DEV_MODE ? debugLogRenderId++ : 0;
const partOwnerNode = (_a = options === null || options === void 0 ? void 0 : options.renderBefore) !== null && _a !== void 0 ? _a : container;

@@ -273,2 +294,10 @@ // This property needs to remain unminified.

let part = partOwnerNode['_$litPart$'];
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'begin render',
id: renderId,
value,
container,
options,
part,
});
if (part === undefined) {

@@ -293,2 +322,10 @@ const endNode = (_b = options === null || options === void 0 ? void 0 : options.renderBefore) !== null && _b !== void 0 ? _b : null;

part._$setValue(value);
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'end render',
id: renderId,
value,
container,
options,
part,
});
return part;

@@ -624,2 +661,9 @@ };

}
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'template prep',
template: this,
clonableTemplate: this.el,
parts: this.parts,
strings,
});
}

@@ -730,2 +774,10 @@ // Overridden via `litHtmlPolyfillSupport` to provide platform support.

if (part !== undefined) {
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'set part',
part,
value: values[i],
valueIndex: i,
values,
templateInstance: this,
});
if (part.strings !== undefined) {

@@ -831,2 +883,9 @@ part._$setValue(values, part, i);

if (this._$committedValue !== nothing) {
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit nothing to child',
start: this._$startNode,
end: this._$endNode,
parent: this._$parent,
options: this.options,
});
this._$clear();

@@ -888,2 +947,9 @@ }

}
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit node',
start: this._$startNode,
parent: this._$parent,
value: value.cloneNode(true),
options: this.options,
});
this._$committedValue = this._insert(value);

@@ -905,2 +971,8 @@ }

}
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit text',
node,
value,
options: this.options,
});
node.data = value;

@@ -915,3 +987,3 @@ }

// handled with care, while <span> does not. So first we need to put a
// text node into the document, then we can sanitize its contentx.
// text node into the document, then we can sanitize its content.
if (this._textSanitizer === undefined) {

@@ -921,2 +993,8 @@ this._textSanitizer = createSanitizer(textNode, 'data', 'property');

value = this._textSanitizer(value);
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit text',
node: textNode,
value,
options: this.options,
});
textNode.data = value;

@@ -926,2 +1004,8 @@ }

this._commitNode(d.createTextNode(value));
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit text',
node: wrap(this._$startNode).nextSibling,
value,
options: this.options,
});
}

@@ -945,2 +1029,10 @@ }

if (((_a = this._$committedValue) === null || _a === void 0 ? void 0 : _a._$template) === template) {
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'template updating',
template,
instance: this._$committedValue,
parts: this._$committedValue._parts,
options: this.options,
values,
});
this._$committedValue._update(values);

@@ -951,3 +1043,21 @@ }

const fragment = instance._clone(this.options);
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'template instantiated',
template,
instance,
parts: instance._parts,
options: this.options,
fragment,
values,
});
instance._update(values);
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'template instantiated and updated',
template,
instance,
parts: instance._parts,
options: this.options,
fragment,
values,
});
this._commitNode(fragment);

@@ -1150,2 +1260,9 @@ this._$committedValue = instance;

}
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit attribute',
element: this.element,
name: this.name,
value,
options: this.options,
});
wrap(this.element).setAttribute(this.name, (value !== null && value !== void 0 ? value : ''));

@@ -1168,2 +1285,9 @@ }

}
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit property',
element: this.element,
name: this.name,
value,
options: this.options,
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -1187,2 +1311,9 @@ this.element[this.name] = value === nothing ? undefined : value;

_commitValue(value) {
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit boolean attribute',
element: this.element,
name: this.name,
value: !!(value && value !== nothing),
options: this.options,
});
if (value && value !== nothing) {

@@ -1230,2 +1361,12 @@ wrap(this.element).setAttribute(this.name, emptyStringForBooleanAttribute);

(oldListener === nothing || shouldRemoveListener);
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit event listener',
element: this.element,
name: this.name,
value: newListener,
options: this.options,
removeListener: shouldRemoveListener,
addListener: shouldAddListener,
oldListener,
});
if (shouldRemoveListener) {

@@ -1266,2 +1407,8 @@ this.element.removeEventListener(this.name, this, oldListener);

_$setValue(value) {
debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({
kind: 'commit to element binding',
element: this.element,
value,
options: this.options,
});
resolveDirective(this, value);

@@ -1314,3 +1461,3 @@ }

// This line will be used in regexes to search for lit-html usage.
((_d = globalThis.litHtmlVersions) !== null && _d !== void 0 ? _d : (globalThis.litHtmlVersions = [])).push('2.1.3');
((_d = globalThis.litHtmlVersions) !== null && _d !== void 0 ? _d : (globalThis.litHtmlVersions = [])).push('2.2.0');
if (DEV_MODE && globalThis.litHtmlVersions.length > 1) {

@@ -1317,0 +1464,0 @@ issueWarning('multiple-versions', `Multiple versions of Lit loaded. ` +

@@ -6,3 +6,3 @@ import{noChange as t}from"../lit-html.js";import{directive as i,Directive as s,PartType as r}from"../directive.js";

* SPDX-License-Identifier: BSD-3-Clause
*/const o=i(class extends s{constructor(t){var i;if(super(t),t.type!==r.ATTRIBUTE||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(i,[s]){var r,o;if(void 0===this.st){this.st=new Set,void 0!==i.strings&&(this.et=new Set(i.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!(null===(r=this.et)||void 0===r?void 0:r.has(t))&&this.st.add(t);return this.render(s)}const e=i.element.classList;this.st.forEach((t=>{t in s||(e.remove(t),this.st.delete(t))}));for(const t in s){const i=!!s[t];i===this.st.has(t)||(null===(o=this.et)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.st.add(t)):(e.remove(t),this.st.delete(t)))}return t}});export{o as classMap};
*/const o=i(class extends s{constructor(t){var i;if(super(t),t.type!==r.ATTRIBUTE||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(i,[s]){var r,o;if(void 0===this.et){this.et=new Set,void 0!==i.strings&&(this.st=new Set(i.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!(null===(r=this.st)||void 0===r?void 0:r.has(t))&&this.et.add(t);return this.render(s)}const e=i.element.classList;this.et.forEach((t=>{t in s||(e.remove(t),this.et.delete(t))}));for(const t in s){const i=!!s[t];i===this.et.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.et.add(t)):(e.remove(t),this.et.delete(t)))}return t}});export{o as classMap};
//# sourceMappingURL=class-map.js.map

@@ -7,3 +7,3 @@ import{noChange as e}from"../lit-html.js";import{directive as s,Directive as t,PartType as r}from"../directive.js";import{getCommittedValue as l,setChildPartValue as o,insertPart as i,removePart as n,setCommittedValue as f}from"../directive-helpers.js";

*/
const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=s(class extends t{constructor(e){if(super(e),e.type!==r.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return{values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){var d;const a=l(s),{values:p,keys:v}=this.dt(t,r,c);if(!Array.isArray(a))return this.at=v,p;const h=null!==(d=this.at)&&void 0!==d?d:this.at=[],m=[];let y,x,j=0,k=a.length-1,w=0,A=p.length-1;for(;j<=k&&w<=A;)if(null===a[j])j++;else if(null===a[k])k--;else if(h[j]===v[w])m[w]=o(a[j],p[w]),j++,w++;else if(h[k]===v[A])m[A]=o(a[k],p[A]),k--,A--;else if(h[j]===v[A])m[A]=o(a[j],p[A]),i(s,m[A+1],a[j]),j++,A--;else if(h[k]===v[w])m[w]=o(a[k],p[w]),i(s,a[j],a[k]),k--,w++;else if(void 0===y&&(y=u(v,w,A),x=u(h,j,k)),y.has(h[j]))if(y.has(h[k])){const e=x.get(v[w]),t=void 0!==e?a[e]:null;if(null===t){const e=i(s,a[j]);o(e,p[w]),m[w]=e}else m[w]=o(t,p[w]),i(s,a[j],t),a[e]=null;w++}else n(a[k]),k--;else n(a[j]),j++;for(;w<=A;){const e=i(s,m[A+1]);o(e,p[w]),m[w++]=e}for(;j<=k;){const e=a[j++];null!==e&&n(e)}return this.at=v,f(s,m),e}});export{c as repeat};
const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=s(class extends t{constructor(e){if(super(e),e.type!==r.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return{values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){var d;const a=l(s),{values:p,keys:v}=this.dt(t,r,c);if(!Array.isArray(a))return this.ut=v,p;const h=null!==(d=this.ut)&&void 0!==d?d:this.ut=[],m=[];let y,x,j=0,k=a.length-1,w=0,A=p.length-1;for(;j<=k&&w<=A;)if(null===a[j])j++;else if(null===a[k])k--;else if(h[j]===v[w])m[w]=o(a[j],p[w]),j++,w++;else if(h[k]===v[A])m[A]=o(a[k],p[A]),k--,A--;else if(h[j]===v[A])m[A]=o(a[j],p[A]),i(s,m[A+1],a[j]),j++,A--;else if(h[k]===v[w])m[w]=o(a[k],p[w]),i(s,a[j],a[k]),k--,w++;else if(void 0===y&&(y=u(v,w,A),x=u(h,j,k)),y.has(h[j]))if(y.has(h[k])){const e=x.get(v[w]),t=void 0!==e?a[e]:null;if(null===t){const e=i(s,a[j]);o(e,p[w]),m[w]=e}else m[w]=o(t,p[w]),i(s,a[j],t),a[e]=null;w++}else n(a[k]),k--;else n(a[j]),j++;for(;w<=A;){const e=i(s,m[A+1]);o(e,p[w]),m[w++]=e}for(;j<=k;){const e=a[j++];null!==e&&n(e)}return this.ut=v,f(s,m),e}});export{c as repeat};
//# sourceMappingURL=repeat.js.map

@@ -11,3 +11,3 @@ /**

constructor(partInfo: PartInfo);
render(template: HTMLTemplateElement): typeof noChange | DocumentFragment;
render(template: HTMLTemplateElement): DocumentFragment | typeof noChange;
}

@@ -14,0 +14,0 @@ /**

@@ -6,3 +6,3 @@ import{noChange as t}from"../lit-html.js";import{directive as r,Directive as e,PartType as n}from"../directive.js";

* SPDX-License-Identifier: BSD-3-Clause
*/const o=r(class extends e{constructor(t){if(super(t),t.type!==n.CHILD)throw Error("templateContent can only be used in child bindings")}render(r){return this.ut===r?t:(this.ut=r,document.importNode(r.content,!0))}});export{o as templateContent};
*/const o=r(class extends e{constructor(t){if(super(t),t.type!==n.CHILD)throw Error("templateContent can only be used in child bindings")}render(r){return this.vt===r?t:(this.vt=r,document.importNode(r.content,!0))}});export{o as templateContent};
//# sourceMappingURL=template-content.js.map

@@ -6,3 +6,3 @@ import{nothing as t,noChange as i}from"../lit-html.js";import{Directive as r,PartType as s,directive as n}from"../directive.js";

* SPDX-License-Identifier: BSD-3-Clause
*/class e extends r{constructor(i){if(super(i),this.it=t,i.type!==s.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===t||null==r)return this.vt=void 0,this.it=r;if(r===i)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this.vt;this.it=r;const s=[r];return s.raw=s,this.vt={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName="unsafeHTML",e.resultType=1;const o=n(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};
*/class e extends r{constructor(i){if(super(i),this.it=t,i.type!==s.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===t||null==r)return this.ft=void 0,this.it=r;if(r===i)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this.ft;this.it=r;const s=[r];return s.raw=s,this.ft={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName="unsafeHTML",e.resultType=1;const o=n(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};
//# sourceMappingURL=unsafe-html.js.map

@@ -6,3 +6,3 @@ import{noChange as t}from"../lit-html.js";import{directive as s}from"../directive.js";import{isPrimitive as i}from"../directive-helpers.js";import{AsyncDirective as r}from"../async-directive.js";import{PseudoWeakRef as e,Pauser as o}from"./private-async-helpers.js";

* SPDX-License-Identifier: BSD-3-Clause
*/const n=t=>!i(t)&&"function"==typeof t.then;class h extends r{constructor(){super(...arguments),this._$Cft=1073741823,this._$Cwt=[],this._$CG=new e(this),this._$CK=new o}render(...s){var i;return null!==(i=s.find((t=>!n(t))))&&void 0!==i?i:t}update(s,i){const r=this._$Cwt;let e=r.length;this._$Cwt=i;const o=this._$CG,h=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<i.length&&!(t>this._$Cft);t++){const s=i[t];if(!n(s))return this._$Cft=t,s;t<e&&s===r[t]||(this._$Cft=1073741823,e=0,Promise.resolve(s).then((async t=>{for(;h.get();)await h.get();const i=o.deref();if(void 0!==i){const r=i._$Cwt.indexOf(s);r>-1&&r<i._$Cft&&(i._$Cft=r,i.setValue(t))}})))}return t}disconnected(){this._$CG.disconnect(),this._$CK.pause()}reconnected(){this._$CG.reconnect(this),this._$CK.resume()}}const c=s(h);export{h as UntilDirective,c as until};
*/const n=t=>!i(t)&&"function"==typeof t.then;class h extends r{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CG=new e(this),this._$CK=new o}render(...s){var i;return null!==(i=s.find((t=>!n(t))))&&void 0!==i?i:t}update(s,i){const r=this._$Cyt;let e=r.length;this._$Cyt=i;const o=this._$CG,h=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<i.length&&!(t>this._$Cwt);t++){const s=i[t];if(!n(s))return this._$Cwt=t,s;t<e&&s===r[t]||(this._$Cwt=1073741823,e=0,Promise.resolve(s).then((async t=>{for(;h.get();)await h.get();const i=o.deref();if(void 0!==i){const r=i._$Cyt.indexOf(s);r>-1&&r<i._$Cwt&&(i._$Cwt=r,i.setValue(t))}})))}return t}disconnected(){this._$CG.disconnect(),this._$CK.pause()}reconnected(){this._$CG.reconnect(this),this._$CK.resume()}}const c=s(h);export{h as UntilDirective,c as until};
//# sourceMappingURL=until.js.map

@@ -9,2 +9,137 @@ /**

/**
* Contains types that are part of the unstable debug API.
*
* Everything in this API is not stable and may change or be removed in the future,
* even on patch releases.
*/
export declare namespace LitUnstable {
/**
* When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,
* we will emit 'lit-debug' events to window, with live details about the update and render
* lifecycle. These can be useful for writing debug tooling and visualizations.
*
* Please be aware that running with window.emitLitDebugLogEvents has performance overhead,
* making certain operations that are normally very cheap (like a no-op render) much slower,
* because we must copy data and dispatch events.
*/
namespace DebugLog {
type Entry = TemplatePrep | TemplateInstantiated | TemplateInstantiatedAndUpdated | TemplateUpdating | BeginRender | EndRender | CommitPartEntry | SetPartValue;
interface TemplatePrep {
kind: 'template prep';
template: Template;
strings: TemplateStringsArray;
clonableTemplate: HTMLTemplateElement;
parts: TemplatePart[];
}
interface BeginRender {
kind: 'begin render';
id: number;
value: unknown;
container: HTMLElement | DocumentFragment;
options: RenderOptions | undefined;
part: ChildPart | undefined;
}
interface EndRender {
kind: 'end render';
id: number;
value: unknown;
container: HTMLElement | DocumentFragment;
options: RenderOptions | undefined;
part: ChildPart;
}
interface TemplateInstantiated {
kind: 'template instantiated';
template: Template | CompiledTemplate;
instance: TemplateInstance;
options: RenderOptions | undefined;
fragment: Node;
parts: Array<Part | undefined>;
values: unknown[];
}
interface TemplateInstantiatedAndUpdated {
kind: 'template instantiated and updated';
template: Template | CompiledTemplate;
instance: TemplateInstance;
options: RenderOptions | undefined;
fragment: Node;
parts: Array<Part | undefined>;
values: unknown[];
}
interface TemplateUpdating {
kind: 'template updating';
template: Template | CompiledTemplate;
instance: TemplateInstance;
options: RenderOptions | undefined;
parts: Array<Part | undefined>;
values: unknown[];
}
interface SetPartValue {
kind: 'set part';
part: Part;
value: unknown;
valueIndex: number;
values: unknown[];
templateInstance: TemplateInstance;
}
type CommitPartEntry = CommitNothingToChildEntry | CommitText | CommitNode | CommitAttribute | CommitProperty | CommitBooleanAttribute | CommitEventListener | CommitToElementBinding;
interface CommitNothingToChildEntry {
kind: 'commit nothing to child';
start: ChildNode;
end: ChildNode | null;
parent: Disconnectable | undefined;
options: RenderOptions | undefined;
}
interface CommitText {
kind: 'commit text';
node: Text;
value: unknown;
options: RenderOptions | undefined;
}
interface CommitNode {
kind: 'commit node';
start: Node;
parent: Disconnectable | undefined;
value: Node;
options: RenderOptions | undefined;
}
interface CommitAttribute {
kind: 'commit attribute';
element: Element;
name: string;
value: unknown;
options: RenderOptions | undefined;
}
interface CommitProperty {
kind: 'commit property';
element: Element;
name: string;
value: unknown;
options: RenderOptions | undefined;
}
interface CommitBooleanAttribute {
kind: 'commit boolean attribute';
element: Element;
name: string;
value: boolean;
options: RenderOptions | undefined;
}
interface CommitEventListener {
kind: 'commit event listener';
element: Element;
name: string;
value: unknown;
oldListener: unknown;
options: RenderOptions | undefined;
removeListener: boolean;
addListener: boolean;
}
interface CommitToElementBinding {
kind: 'commit to element binding';
element: Element;
value: unknown;
options: RenderOptions | undefined;
}
}
}
/**
* Used to sanitize any value before it is written into the DOM. This can be

@@ -47,2 +182,6 @@ * used to implement a security policy of allowed and disallowed values in

declare type ResultType = typeof HTML_RESULT | typeof SVG_RESULT;
declare const ATTRIBUTE_PART = 1;
declare const CHILD_PART = 2;
declare const ELEMENT_PART = 6;
declare const COMMENT_PART = 7;
/**

@@ -205,2 +344,25 @@ * The return type of the template tag functions.

}
declare type AttributeTemplatePart = {
readonly type: typeof ATTRIBUTE_PART;
readonly index: number;
readonly name: string;
};
declare type NodeTemplatePart = {
readonly type: typeof CHILD_PART;
readonly index: number;
};
declare type ElementTemplatePart = {
readonly type: typeof ELEMENT_PART;
readonly index: number;
};
declare type CommentTemplatePart = {
readonly type: typeof COMMENT_PART;
readonly index: number;
};
/**
* A TemplatePart represents a dynamic part in a template, before the template
* is instantiated. When a template is instantiated Parts are created from
* TemplateParts.
*/
declare type TemplatePart = NodeTemplatePart | AttributeTemplatePart | ElementTemplatePart | CommentTemplatePart;
export declare type Part = ChildPart | AttributePart | PropertyPart | BooleanAttributePart | ElementPart | EventPart;

@@ -207,0 +369,0 @@ export type { ChildPart };

@@ -6,3 +6,3 @@ /**

*/
var t;const i=globalThis.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+"").slice(9)}$`,o="?"+e,n=`<${o}>`,l=document,h=(t="")=>l.createComment(t),r=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,u=t=>{var i;return d(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,a=/>/g,f=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,_=/'/g,m=/"/g,g=/^(?:script|style|textarea|title)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),T=new WeakMap,x=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),C=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?"<svg>":"",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?"!--"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(g.test(u[2])&&(h=RegExp("</"+u[2],"g")),d=f):void 0!==u[3]&&(d=f):d===f?">"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'"'===u[3]?m:_):d===m||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith("/>")?" ":"";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+"$lit$"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C(t,s);if(this.el=E.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+"$lit$").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?H:"@"===i[1]?I:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(g.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:"";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||""===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):u(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==w&&r(this._$AH)?this._$AA.nextSibling.data=t:this.S(l.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new V(o,this),i=t.p(this.options);t.m(s),this.S(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new E(t)),i}A(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.M(h()),this.M(h()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,i,0),n=!r(t)||t!==this._$AH&&t!==b,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P(this,e[s+l],i,l),h===b&&(h=this._$AH[l]),n||(n=!r(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h}n&&!e&&this.k(t)}k(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends S{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===w?void 0:t}}const k=i?i.emptyScript:"";class H extends S{constructor(){super(...arguments),this.type=4}k(t){t&&t!==w?this.element.setAttribute(this.name,k):this.element.removeAttribute(this.name)}}class I extends S{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=P(this,t,i,0))&&void 0!==s?s:w)===b)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const R={P:"$lit$",V:e,L:o,I:1,N:C,R:V,D:u,j:P,H:N,O:S,F:H,B:I,W:M,Z:L},z=window.litHtmlPolyfillSupport;null==z||z(E,N),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push("2.1.3");export{R as _$LH,$ as html,b as noChange,w as nothing,x as render,y as svg};
var t;const i=globalThis.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+"").slice(9)}$`,o="?"+e,n=`<${o}>`,l=document,h=(t="")=>l.createComment(t),r=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,u=t=>{var i;return d(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,a=/>/g,f=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,_=/'/g,m=/"/g,g=/^(?:script|style|textarea|title)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),T=new WeakMap,x=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),C=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?"<svg>":"",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?"!--"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(g.test(u[2])&&(h=RegExp("</"+u[2],"g")),d=f):void 0!==u[3]&&(d=f):d===f?">"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'"'===u[3]?m:_):d===m||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith("/>")?" ":"";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+"$lit$"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C(t,s);if(this.el=E.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+"$lit$").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?H:"@"===i[1]?I:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(g.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:"";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||""===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):u(t)?this.S(t):this.$(t)}A(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==w&&r(this._$AH)?this._$AA.nextSibling.data=t:this.k(l.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new V(o,this),i=t.p(this.options);t.m(s),this.k(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new E(t)),i}S(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.A(h()),this.A(h()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,i,0),n=!r(t)||t!==this._$AH&&t!==b,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P(this,e[s+l],i,l),h===b&&(h=this._$AH[l]),n||(n=!r(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h}n&&!e&&this.C(t)}C(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends S{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===w?void 0:t}}const k=i?i.emptyScript:"";class H extends S{constructor(){super(...arguments),this.type=4}C(t){t&&t!==w?this.element.setAttribute(this.name,k):this.element.removeAttribute(this.name)}}class I extends S{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=P(this,t,i,0))&&void 0!==s?s:w)===b)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const R={P:"$lit$",L:e,V:o,I:1,N:C,R:V,D:u,j:P,H:N,O:S,F:H,B:I,W:M,Z:L},z=window.litHtmlPolyfillSupport;null==z||z(E,N),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push("2.2.0");export{R as _$LH,$ as html,b as noChange,w as nothing,x as render,y as svg};
//# sourceMappingURL=lit-html.js.map
{
"name": "lit-html",
"version": "2.1.3",
"version": "2.2.0",
"description": "HTML templates literals in JavaScript",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -6,3 +6,3 @@ import{_$LH as t,noChange as e}from"./lit-html.js";

* SPDX-License-Identifier: BSD-3-Clause
*/const r={boundAttributeSuffix:t.P,marker:t.V,markerMatch:t.L,HTML_RESULT:t.I,getTemplateHtml:t.N,overrideDirectiveResolve:(t,e)=>class extends t{_$AS(t,r){return e(this,r)}},setDirectiveClass(t,e){t._$litDirective$=e},getAttributePartCommittedValue:(t,r,i)=>{let a=e;return t.k=t=>a=t,t._$AI(r,t,i),a},connectedDisconnectable:t=>({...t,_$AU:!0}),resolveDirective:t.j,AttributePart:t.O,PropertyPart:t.W,BooleanAttributePart:t.F,EventPart:t.B,ElementPart:t.Z};export{r as _$LH};
*/const r={boundAttributeSuffix:t.P,marker:t.L,markerMatch:t.V,HTML_RESULT:t.I,getTemplateHtml:t.N,overrideDirectiveResolve:(t,e)=>class extends t{_$AS(t,r){return e(this,r)}},setDirectiveClass(t,e){t._$litDirective$=e},getAttributePartCommittedValue:(t,r,i)=>{let a=e;return t.C=t=>a=t,t._$AI(r,t,i),a},connectedDisconnectable:t=>({...t,_$AU:!0}),resolveDirective:t.j,AttributePart:t.O,PropertyPart:t.W,BooleanAttributePart:t.F,EventPart:t.B,ElementPart:t.Z};export{r as _$LH};
//# sourceMappingURL=private-ssr-support.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc