lit-html
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -44,3 +44,3 @@ /** | ||
* TemplateInstance(T3) _$dC=[A4,A6,N10,N12] | ||
* ._parts[] | ||
* ._$parts[] | ||
* AttributePart(A4) _$dC=[D5] | ||
@@ -73,3 +73,3 @@ * ._directives[] | ||
* TemplateInstance(T18) _$dC=[A19,A21,N25] | ||
* ._parts[] | ||
* ._$parts[] | ||
* AttributePart(A19) _$dC=[D20] | ||
@@ -76,0 +76,0 @@ * ._directives[] |
@@ -44,3 +44,3 @@ /** | ||
* TemplateInstance(T3) _$dC=[A4,A6,N10,N12] | ||
* ._parts[] | ||
* ._$parts[] | ||
* AttributePart(A4) _$dC=[D5] | ||
@@ -73,3 +73,3 @@ * ._directives[] | ||
* TemplateInstance(T18) _$dC=[A19,A21,N25] | ||
* ._parts[] | ||
* ._$parts[] | ||
* AttributePart(A19) _$dC=[D20] | ||
@@ -76,0 +76,0 @@ * ._directives[] |
@@ -8,2 +8,7 @@ /** | ||
import { directive, Directive, PartType, } from '../directive.js'; | ||
const important = 'important'; | ||
// The leading space is important | ||
const importantFlag = ' !' + important; | ||
// How many characters to remove from a value, as a negative number | ||
const flagTrim = 0 - importantFlag.length; | ||
class StyleMapDirective extends Directive { | ||
@@ -71,4 +76,5 @@ constructor(partInfo) { | ||
this._previousStyleProperties.add(name); | ||
if (name.includes('-')) { | ||
style.setProperty(name, value); | ||
const isImportant = value.endsWith(importantFlag); | ||
if (name.includes('-') || isImportant) { | ||
style.setProperty(name, isImportant ? value.slice(0, flagTrim) : value, isImportant ? important : ''); | ||
} | ||
@@ -75,0 +81,0 @@ else { |
@@ -48,2 +48,5 @@ /** | ||
* @param userOptions | ||
* | ||
* @deprecated This has been moved to `@lit-labs/ssr-client` and will be removed | ||
* in a future release. | ||
*/ | ||
@@ -50,0 +53,0 @@ export declare const hydrate: (rootValue: unknown, container: Element | DocumentFragment, options?: Partial<RenderOptions>) => void; |
@@ -53,4 +53,9 @@ /** | ||
* @param userOptions | ||
* | ||
* @deprecated This has been moved to `@lit-labs/ssr-client` and will be removed | ||
* in a future release. | ||
*/ | ||
export const hydrate = (rootValue, container, options = {}) => { | ||
console.warn('Importing `hydrate()` from `lit-html/experimental-hydrate.js` is deprecated.' + | ||
'Import from `@lit-labs/ssr-client` instead.'); | ||
// TODO(kschaaf): Do we need a helper for _$litPart$ ("part for node")? | ||
@@ -130,3 +135,3 @@ // This property needs to remain unminified. | ||
part = new ChildPart(marker, null, state.instance, options); | ||
state.instance._parts.push(part); | ||
state.instance._$parts.push(part); | ||
value = state.result.values[state.instancePartIndex++]; | ||
@@ -296,3 +301,3 @@ state.templatePartIndex++; | ||
state.instancePartIndex += templatePart.strings.length - 1; | ||
instance._parts.push(instancePart); | ||
instance._$parts.push(instancePart); | ||
} | ||
@@ -303,3 +308,3 @@ else { | ||
resolveDirective(instancePart, state.result.values[state.instancePartIndex++]); | ||
instance._parts.push(instancePart); | ||
instance._$parts.push(instancePart); | ||
} | ||
@@ -306,0 +311,0 @@ state.templatePartIndex++; |
@@ -319,2 +319,3 @@ /** | ||
declare class Template { | ||
parts: Array<TemplatePart>; | ||
constructor({ strings, ['_$litType$']: type }: TemplateResult, options?: RenderOptions); | ||
@@ -330,2 +331,3 @@ /** @nocollapse */ | ||
declare function resolveDirective(part: ChildPart | AttributePart | ElementPart, value: unknown, parent?: DirectiveParent, attributeIndex?: number): unknown; | ||
export type { TemplateInstance }; | ||
/** | ||
@@ -336,2 +338,4 @@ * An updateable instance of a Template. Holds references to the Parts used to | ||
declare class TemplateInstance implements Disconnectable { | ||
_$template: Template; | ||
_$parts: Array<Part | undefined>; | ||
constructor(template: Template, parent: ChildPart); | ||
@@ -347,2 +351,4 @@ get parentNode(): Node; | ||
readonly name: string; | ||
readonly ctor: typeof AttributePart; | ||
readonly strings: ReadonlyArray<string>; | ||
}; | ||
@@ -349,0 +355,0 @@ declare type NodeTemplatePart = { |
@@ -8,3 +8,3 @@ /** | ||
import { AttributePart, Part, Disconnectable } from './lit-html.js'; | ||
export type { Template } from './lit-html.js'; | ||
import type { PropertyPart, ChildPart, BooleanAttributePart, EventPart, ElementPart, TemplateInstance } from './lit-html.js'; | ||
/** | ||
@@ -47,9 +47,12 @@ * END USERS SHOULD NOT RELY ON THIS OBJECT. | ||
connectedDisconnectable: (props?: object) => Disconnectable; | ||
resolveDirective: (part: import("./lit-html.js").ChildPart | AttributePart | import("./lit-html.js").ElementPart, value: unknown, parent?: import("./lit-html.js").DirectiveParent, attributeIndex?: number | undefined) => unknown; | ||
resolveDirective: (part: ChildPart | AttributePart | ElementPart, value: unknown, parent?: import("./lit-html.js").DirectiveParent, attributeIndex?: number | undefined) => unknown; | ||
AttributePart: typeof AttributePart; | ||
PropertyPart: typeof import("./lit-html.js").PropertyPart; | ||
BooleanAttributePart: typeof import("./lit-html.js").BooleanAttributePart; | ||
EventPart: typeof import("./lit-html.js").EventPart; | ||
ElementPart: typeof import("./lit-html.js").ElementPart; | ||
PropertyPart: typeof PropertyPart; | ||
BooleanAttributePart: typeof BooleanAttributePart; | ||
EventPart: typeof EventPart; | ||
ElementPart: typeof ElementPart; | ||
TemplateInstance: typeof TemplateInstance; | ||
isIterable: (value: unknown) => value is Iterable<unknown>; | ||
ChildPart: typeof ChildPart; | ||
}; | ||
//# sourceMappingURL=private-ssr-support.d.ts.map |
@@ -54,3 +54,6 @@ /** | ||
ElementPart: p._ElementPart, | ||
TemplateInstance: p._TemplateInstance, | ||
isIterable: p._isIterable, | ||
ChildPart: p._ChildPart, | ||
}; | ||
//# sourceMappingURL=private-ssr-support.js.map |
@@ -6,3 +6,3 @@ import{directive as r,PartType as e}from"../directive.js";import{AsyncReplaceDirective as s}from"./async-replace.js";import{clearPart as t,insertPart as o,setChildPartValue as i}from"../directive-helpers.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const c=r(class extends s{constructor(r){if(super(r),r.type!==e.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(r,e){return this._$Ctt=r,super.update(r,e)}commitValue(r,e){0===e&&t(this._$Ctt);const s=o(this._$Ctt);i(s,r)}});export{c as asyncAppend}; | ||
*/const c=r(class extends s{constructor(r){if(super(r),r.type!==e.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(r,e){return this._$CJ=r,super.update(r,e)}commitValue(r,e){0===e&&t(this._$CJ);const s=o(this._$CJ);i(s,r)}});export{c as asyncAppend}; | ||
//# sourceMappingURL=async-append.js.map |
@@ -6,3 +6,3 @@ import{noChange as t}from"../lit-html.js";import{AsyncDirective as i}from"../async-directive.js";import{PseudoWeakRef as s,Pauser as r,forAwaitOf as e}from"./private-async-helpers.js";import{directive as n}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/class o extends i{constructor(){super(...arguments),this._$CK=new s(this),this._$CX=new r}render(i,s){return t}update(i,[s,r]){if(this.isConnected||this.disconnected(),s===this._$CJ)return;this._$CJ=s;let n=0;const{_$CK:o,_$CX:h}=this;return e(s,(async t=>{for(;h.get();)await h.get();const i=o.deref();if(void 0!==i){if(i._$CJ!==s)return!1;void 0!==r&&(t=r(t,n)),i.commitValue(t,n),n++}return!0})),t}commitValue(t,i){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const h=n(o);export{o as AsyncReplaceDirective,h as asyncReplace}; | ||
*/class o extends i{constructor(){super(...arguments),this._$Cq=new s(this),this._$CK=new r}render(i,s){return t}update(i,[s,r]){if(this.isConnected||this.disconnected(),s===this._$CX)return;this._$CX=s;let n=0;const{_$Cq:o,_$CK:h}=this;return e(s,(async t=>{for(;h.get();)await h.get();const i=o.deref();if(void 0!==i){if(i._$CX!==s)return!1;void 0!==r&&(t=r(t,n)),i.commitValue(t,n),n++}return!0})),t}commitValue(t,i){this.setValue(t)}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}const h=n(o);export{o as AsyncReplaceDirective,h as asyncReplace}; | ||
//# sourceMappingURL=async-replace.js.map |
@@ -6,3 +6,3 @@ import{render as t,nothing as i}from"../lit-html.js";import{directive as s,Directive as e}from"../directive.js";import{isTemplateResult as o,getCommittedValue as r,setCommittedValue as h,insertPart as n,clearPart as c}from"../directive-helpers.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const d=s(class extends e{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(s,[e]){if(o(this.it)&&(!o(e)||this.it.strings!==e.strings)){const e=r(s).pop();let o=this.et.get(this.it.strings);if(void 0===o){const s=document.createDocumentFragment();o=t(i,s),o.setConnected(!1),this.et.set(this.it.strings,o)}h(o,[e]),n(o,void 0,e)}if(o(e)){if(!o(this.it)||this.it.strings!==e.strings){const t=this.et.get(e.strings);if(void 0!==t){const i=r(t).pop();c(s),n(s,void 0,i),h(s,[i])}}this.it=e}else this.it=void 0;return this.render(e)}});export{d as cache}; | ||
*/const d=s(class extends e{constructor(t){super(t),this.tt=new WeakMap}render(t){return[t]}update(s,[e]){if(o(this.et)&&(!o(e)||this.et.strings!==e.strings)){const e=r(s).pop();let o=this.tt.get(this.et.strings);if(void 0===o){const s=document.createDocumentFragment();o=t(i,s),o.setConnected(!1),this.tt.set(this.et.strings,o)}h(o,[e]),n(o,void 0,e)}if(o(e)){if(!o(this.et)||this.et.strings!==e.strings){const t=this.tt.get(e.strings);if(void 0!==t){const i=r(t).pop();c(s),n(s,void 0,i),h(s,[i])}}this.et=e}else this.et=void 0;return this.render(e)}});export{d as cache}; | ||
//# sourceMappingURL=cache.js.map |
@@ -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.nt){this.nt=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.nt.add(t);return this.render(s)}const e=i.element.classList;this.nt.forEach((t=>{t in s||(e.remove(t),this.nt.delete(t))}));for(const t in s){const i=!!s[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.nt.add(t)):(e.remove(t),this.nt.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.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(s)}const e=i.element.classList;this.it.forEach((t=>{t in s||(e.remove(t),this.it.delete(t))}));for(const t in s){const i=!!s[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)))}return t}});export{o as classMap}; | ||
//# sourceMappingURL=class-map.js.map |
@@ -7,3 +7,3 @@ import{noChange as r}from"../lit-html.js";import{directive as t,Directive as s}from"../directive.js"; | ||
*/ | ||
const e={},i=t(class extends s{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(t,[s,e]){if(Array.isArray(s)){if(Array.isArray(this.ot)&&this.ot.length===s.length&&s.every(((r,t)=>r===this.ot[t])))return r}else if(this.ot===s)return r;return this.ot=Array.isArray(s)?Array.from(s):s,this.render(s,e)}});export{i as guard}; | ||
const e={},i=t(class extends s{constructor(){super(...arguments),this.st=e}render(r,t){return t()}update(t,[s,e]){if(Array.isArray(s)){if(Array.isArray(this.st)&&this.st.length===s.length&&s.every(((r,t)=>r===this.st[t])))return r}else if(this.st===s)return r;return this.st=Array.isArray(s)?Array.from(s):s,this.render(s,e)}});export{i as guard}; | ||
//# sourceMappingURL=guard.js.map |
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
const t=async(t,s)=>{for await(const i of t)if(!1===await s(i))return};class s{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class i{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){var t;null!==(t=this.Z)&&void 0!==t||(this.Z=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Z=this.q=void 0}}export{i as Pauser,s as PseudoWeakRef,t as forAwaitOf}; | ||
const t=async(t,s)=>{for await(const i of t)if(!1===await s(i))return};class s{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class i{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.Z=t)))}resume(){var t;null===(t=this.Z)||void 0===t||t.call(this),this.Y=this.Z=void 0}}export{i as Pauser,s as PseudoWeakRef,t as forAwaitOf}; | ||
//# sourceMappingURL=private-async-helpers.js.map |
@@ -6,3 +6,3 @@ import{nothing as i}from"../lit-html.js";import{AsyncDirective as t}from"../async-directive.js";import{directive as s}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.Y;return o&&void 0!==this.Y&&this.rt(void 0),(o||this.lt!==this.ct)&&(this.Y=s,this.dt=null===(e=t.options)||void 0===e?void 0:e.host,this.rt(this.ct=t.element)),i}rt(i){var t;if("function"==typeof this.Y){const s=null!==(t=this.dt)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.Y)&&this.Y.call(this.dt,void 0),e.set(this.Y,i),void 0!==i&&this.Y.call(this.dt,i)}else this.Y.value=i}get lt(){var i,t,s;return"function"==typeof this.Y?null===(t=h.get(null!==(i=this.dt)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.Y):null===(s=this.Y)||void 0===s?void 0:s.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{e as createRef,n as ref}; | ||
*/const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.G;return o&&void 0!==this.G&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=s,this.ct=null===(e=t.options)||void 0===e?void 0:e.host,this.ot(this.lt=t.element)),i}ot(i){var t;if("function"==typeof this.G){const s=null!==(t=this.ct)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.G)&&this.G.call(this.ct,void 0),e.set(this.G,i),void 0!==i&&this.G.call(this.ct,i)}else this.G.value=i}get rt(){var i,t,s;return"function"==typeof this.G?null===(t=h.get(null!==(i=this.ct)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.G):null===(s=this.G)||void 0===s?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});export{e as createRef,n as ref}; | ||
//# sourceMappingURL=ref.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")}ht(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.ht(e,s,t).values}update(s,[t,r,c]){var d;const a=l(s),{values:p,keys:v}=this.ht(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}; | ||
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.ht=v,p;const h=null!==(d=this.ht)&&void 0!==d?d:this.ht=[],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.ht=v,f(s,m),e}});export{c as repeat}; | ||
//# sourceMappingURL=repeat.js.map |
@@ -6,3 +6,3 @@ import{noChange as t}from"../lit-html.js";import{directive as e,Directive as r,PartType as s}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const i=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.vt){this.vt=new Set;for(const t in r)this.vt.add(t);return this.render(r)}this.vt.forEach((t=>{null==r[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in r){const e=r[t];null!=e&&(this.vt.add(t),t.includes("-")?s.setProperty(t,e):s[t]=e)}return t}});export{i as styleMap}; | ||
*/const i="important",n=" !"+i,o=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ut){this.ut=new Set;for(const t in r)this.ut.add(t);return this.render(r)}this.ut.forEach((t=>{null==r[t]&&(this.ut.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in r){const e=r[t];if(null!=e){this.ut.add(t);const r=e.endsWith(n);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?i:""):s[t]=e}}return t}});export{o as styleMap}; | ||
//# sourceMappingURL=style-map.js.map |
@@ -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.ft===r?t:(this.ft=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._t=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._t;this.it=r;const s=[r];return s.raw=s,this._t={_$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.et=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.et=r;if(r===i)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.et)return this.ft;this.et=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{isPrimitive as s}from"../directive-helpers.js";import{AsyncDirective as i}from"../async-directive.js";import{PseudoWeakRef as r,Pauser as e}from"./private-async-helpers.js";import{directive as o}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const n=t=>!s(t)&&"function"==typeof t.then,h=1073741823;class c extends i{constructor(){super(...arguments),this._$Cwt=h,this._$Cyt=[],this._$CK=new r(this),this._$CX=new e}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._$CK,c=this._$CX;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=h,e=0,Promise.resolve(s).then((async t=>{for(;c.get();)await c.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._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const m=o(c);export{c as UntilDirective,m as until}; | ||
*/const n=t=>!s(t)&&"function"==typeof t.then,h=1073741823;class c extends i{constructor(){super(...arguments),this._$C_t=h,this._$Cwt=[],this._$Cq=new r(this),this._$CK=new e}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._$Cq,c=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<i.length&&!(t>this._$C_t);t++){const s=i[t];if(!n(s))return this._$C_t=t,s;t<e&&s===r[t]||(this._$C_t=h,e=0,Promise.resolve(s).then((async t=>{for(;c.get();)await c.get();const i=o.deref();if(void 0!==i){const r=i._$Cwt.indexOf(s);r>-1&&r<i._$C_t&&(i._$C_t=r,i.setValue(t))}})))}return t}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}const m=o(c);export{c as UntilDirective,m as until}; | ||
//# sourceMappingURL=until.js.map |
@@ -48,2 +48,5 @@ /** | ||
* @param userOptions | ||
* | ||
* @deprecated This has been moved to `@lit-labs/ssr-client` and will be removed | ||
* in a future release. | ||
*/ | ||
@@ -50,0 +53,0 @@ export declare const hydrate: (rootValue: unknown, container: Element | DocumentFragment, options?: Partial<RenderOptions>) => void; |
@@ -6,3 +6,3 @@ import{noChange as e,_$LH as t}from"./lit-html.js";import{PartType as r}from"./directive.js";import{isPrimitive as n,isTemplateResult as o,isSingleExpression as a}from"./directive-helpers.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const{D:i,R:l,V:s,I:c,B:d}=t,f=(e,t,r={})=>{if(void 0!==t._$litPart$)throw Error("container already contains a live render");let n,o,a;const i=[],l=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT,null,!1);let s;for(;null!==(s=l.nextNode());){const t=s.data;if(t.startsWith("lit-part")){if(0===i.length&&void 0!==n)throw Error(`There must be only one root part per container. Found a part marker (${s}) when we already have a root part marker (${o})`);a=p(e,s,i,r),null!=n||(n=a),null!=o||(o=s)}else if(t.startsWith("lit-node"))m(s,i,r);else if(t.startsWith("/lit-part")){if(1===i.length&&a!==n)throw Error("internal error");a=u(s,a,i)}}if(void 0===n){const e=t instanceof ShadowRoot?"{container.host.localName}'s shadow root":t instanceof DocumentFragment?"DocumentFragment":t.localName;console.error(`There should be exactly one root part in a render container, but we didn't find any in ${e}.`)}t._$litPart$=n},p=(t,r,a,d)=>{let f,p;if(0===a.length)p=new c(r,null,void 0,d),f=t;else{const e=a[a.length-1];if("template-instance"===e.type)p=new c(r,null,e.instance,d),e.instance.u.push(p),f=e.result.values[e.instancePartIndex++],e.templatePartIndex++;else if("iterable"===e.type){p=new c(r,null,e.part,d);const t=e.iterator.next();if(t.done)throw f=void 0,e.done=!0,Error("Unhandled shorter than expected iterable");f=t.value,e.part._$AH.push(p)}else p=new c(r,null,e.part,d)}if(f=s(p,f),f===e)a.push({part:p,type:"leaf"});else if(n(f))a.push({part:p,type:"leaf"}),p._$AH=f;else if(o(f)){const e="lit-part "+h(f);if(r.data!==e)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{const e=c.prototype._$AC(f),t=new i(e,p);a.push({type:"template-instance",instance:t,part:p,templatePartIndex:0,instancePartIndex:0,result:f}),p._$AH=t}}else l(f)?(a.push({part:p,type:"iterable",value:f,iterator:f[Symbol.iterator](),done:!1}),p._$AH=[]):(a.push({part:p,type:"leaf"}),p._$AH=null==f?"":f);return p},u=(e,t,r)=>{if(void 0===t)throw Error("unbalanced part marker");t._$AB=e;const n=r.pop();if("iterable"===n.type&&!n.iterator.next().done)throw Error("unexpected longer than expected iterable");if(r.length>0)return r[r.length-1].part},m=(e,t,n)=>{const o=/lit-node (\d+)/.exec(e.data),i=parseInt(o[1]),l=e.nextElementSibling;if(null===l)throw Error("could not find node for attribute parts");l.removeAttribute("defer-hydration");const c=t[t.length-1];if("template-instance"!==c.type)throw Error("internal error");{const e=c.instance;for(;;){const t=e._$AD.parts[c.templatePartIndex];if(void 0===t||t.type!==r.ATTRIBUTE&&t.type!==r.ELEMENT||t.index!==i)break;if(t.type===r.ATTRIBUTE){const o=new t.ctor(l,t.name,t.strings,c.instance,n),i=a(o)?c.result.values[c.instancePartIndex]:c.result.values,s=!(o.type===r.EVENT||o.type===r.PROPERTY);o._$AI(i,o,c.instancePartIndex,s),c.instancePartIndex+=t.strings.length-1,e.u.push(o)}else{const t=new d(l,c.instance,n);s(t,c.result.values[c.instancePartIndex++]),e.u.push(t)}c.templatePartIndex++}}},h=e=>{const t=new Uint32Array(2).fill(5381);for(const r of e.strings)for(let e=0;e<r.length;e++)t[e%2]=33*t[e%2]^r.charCodeAt(e);const r=String.fromCharCode(...new Uint8Array(t.buffer));return btoa(r)};export{h as digestForTemplateResult,f as hydrate}; | ||
*/const{L:i,D:l,R:s,I:c,F:d}=t,f=(e,t,r={})=>{if(console.warn("Importing `hydrate()` from `lit-html/experimental-hydrate.js` is deprecated.Import from `@lit-labs/ssr-client` instead."),void 0!==t._$litPart$)throw Error("container already contains a live render");let n,o,a;const i=[],l=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT,null,!1);let s;for(;null!==(s=l.nextNode());){const t=s.data;if(t.startsWith("lit-part")){if(0===i.length&&void 0!==n)throw Error(`There must be only one root part per container. Found a part marker (${s}) when we already have a root part marker (${o})`);a=p(e,s,i,r),null!=n||(n=a),null!=o||(o=s)}else if(t.startsWith("lit-node"))h(s,i,r);else if(t.startsWith("/lit-part")){if(1===i.length&&a!==n)throw Error("internal error");a=m(s,a,i)}}if(void 0===n){const e=t instanceof ShadowRoot?"{container.host.localName}'s shadow root":t instanceof DocumentFragment?"DocumentFragment":t.localName;console.error(`There should be exactly one root part in a render container, but we didn't find any in ${e}.`)}t._$litPart$=n},p=(t,r,a,d)=>{let f,p;if(0===a.length)p=new c(r,null,void 0,d),f=t;else{const e=a[a.length-1];if("template-instance"===e.type)p=new c(r,null,e.instance,d),e.instance._$AV.push(p),f=e.result.values[e.instancePartIndex++],e.templatePartIndex++;else if("iterable"===e.type){p=new c(r,null,e.part,d);const t=e.iterator.next();if(t.done)throw f=void 0,e.done=!0,Error("Unhandled shorter than expected iterable");f=t.value,e.part._$AH.push(p)}else p=new c(r,null,e.part,d)}if(f=s(p,f),f===e)a.push({part:p,type:"leaf"});else if(n(f))a.push({part:p,type:"leaf"}),p._$AH=f;else if(o(f)){const e="lit-part "+u(f);if(r.data!==e)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{const e=c.prototype._$AC(f),t=new i(e,p);a.push({type:"template-instance",instance:t,part:p,templatePartIndex:0,instancePartIndex:0,result:f}),p._$AH=t}}else l(f)?(a.push({part:p,type:"iterable",value:f,iterator:f[Symbol.iterator](),done:!1}),p._$AH=[]):(a.push({part:p,type:"leaf"}),p._$AH=null==f?"":f);return p},m=(e,t,r)=>{if(void 0===t)throw Error("unbalanced part marker");t._$AB=e;const n=r.pop();if("iterable"===n.type&&!n.iterator.next().done)throw Error("unexpected longer than expected iterable");if(r.length>0)return r[r.length-1].part},h=(e,t,n)=>{const o=/lit-node (\d+)/.exec(e.data),i=parseInt(o[1]),l=e.nextElementSibling;if(null===l)throw Error("could not find node for attribute parts");l.removeAttribute("defer-hydration");const c=t[t.length-1];if("template-instance"!==c.type)throw Error("internal error");{const e=c.instance;for(;;){const t=e._$AD.parts[c.templatePartIndex];if(void 0===t||t.type!==r.ATTRIBUTE&&t.type!==r.ELEMENT||t.index!==i)break;if(t.type===r.ATTRIBUTE){const o=new t.ctor(l,t.name,t.strings,c.instance,n),i=a(o)?c.result.values[c.instancePartIndex]:c.result.values,s=!(o.type===r.EVENT||o.type===r.PROPERTY);o._$AI(i,o,c.instancePartIndex,s),c.instancePartIndex+=t.strings.length-1,e._$AV.push(o)}else{const t=new d(l,c.instance,n);s(t,c.result.values[c.instancePartIndex++]),e._$AV.push(t)}c.templatePartIndex++}}},u=e=>{const t=new Uint32Array(2).fill(5381);for(const r of e.strings)for(let e=0;e<r.length;e++)t[e%2]=33*t[e%2]^r.charCodeAt(e);const r=String.fromCharCode(...new Uint8Array(t.buffer));return btoa(r)};export{u as digestForTemplateResult,f as hydrate}; | ||
//# sourceMappingURL=experimental-hydrate.js.map |
@@ -319,2 +319,3 @@ /** | ||
declare class Template { | ||
parts: Array<TemplatePart>; | ||
constructor({ strings, ['_$litType$']: type }: TemplateResult, options?: RenderOptions); | ||
@@ -330,2 +331,3 @@ /** @nocollapse */ | ||
declare function resolveDirective(part: ChildPart | AttributePart | ElementPart, value: unknown, parent?: DirectiveParent, attributeIndex?: number): unknown; | ||
export type { TemplateInstance }; | ||
/** | ||
@@ -336,2 +338,4 @@ * An updateable instance of a Template. Holds references to the Parts used to | ||
declare class TemplateInstance implements Disconnectable { | ||
_$template: Template; | ||
_$parts: Array<Part | undefined>; | ||
constructor(template: Template, parent: ChildPart); | ||
@@ -347,2 +351,4 @@ get parentNode(): Node; | ||
readonly name: string; | ||
readonly ctor: typeof AttributePart; | ||
readonly strings: ReadonlyArray<string>; | ||
}; | ||
@@ -349,0 +355,0 @@ declare type NodeTemplatePart = { |
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
var t;const i=window,s=i.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",n=`lit$${(Math.random()+"").slice(9)}$`,l="?"+n,h=`<${l}>`,r=document,d=()=>r.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?"<svg>":"",u=f;for(let i=0;i<s;i++){const s=t[i];let e,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?"!--"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(r=RegExp("</"+c[2],"g")),u=p):void 0!==c[3]&&(u=p):u===p?">"===c[0]?(u=null!=r?r:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,r=void 0);const w=u===p&&t[i+1].startsWith("/>")?" ":"";d+=u===f?s+h:v>=0?(l.push(e),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(l.push(void 0),i):w)}const c=d+(t[s]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==e?e.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[u++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?k:"?"===i[1]?I:"@"===i[1]?L:R})}else v.push({type:6,index:r})}for(const i of t)h.removeAttribute(i)}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)h.append(t[s],d()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],d())}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else{let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1}r++}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){var o,n,l,h;if(i===T)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const d=u(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==d&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===d?r=void 0:(r=new d(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=N(t,r._$AS(t,i.values),r,e)),i}class S{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,d=e[0];for(;void 0!==d;){if(l===d.index){let i;2===d.type?i=new M(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new z(n,this,t)),this.u.push(i),d=e[++h]}l!==(null==d?void 0:d.index)&&(n=C.nextNode(),l++)}return o}p(t){let i=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cm=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._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),u(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):v(t)?this.k(t):this.g(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}g(t){this._$AH!==A&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=V.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.p(s);else{const t=new S(o,this),i=t.v(this.options);t.p(s),this.T(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new V(t)),i}k(t){c(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 M(this.S(d()),this.S(d()),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._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class R{constructor(t,i,s,e,o){this.type=1,this._$AH=A,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=A}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=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=N(this,e[s+l],i,l),h===T&&(h=this._$AH[l]),n||(n=!u(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class k extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const H=s?s.emptyScript:"";class I extends R{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class L extends R{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=N(this,t,i,0))&&void 0!==s?s:A)===T)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||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 z{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){N(this,t)}}const Z={P:o,A:n,M:l,C:1,L:P,D:S,R:v,V:N,I:M,H:R,N:I,U:L,F:k,B:z},j=i.litHtmlPolyfillSupport;null==j||j(V,M),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push("2.7.0");const B=(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 M(i.insertBefore(d(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{Z as _$LH,x as html,T as noChange,A as nothing,B as render,b as svg}; | ||
var t;const i=window,s=i.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",n=`lit$${(Math.random()+"").slice(9)}$`,l="?"+n,h=`<${l}>`,r=document,d=()=>r.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?"<svg>":"",u=f;for(let i=0;i<s;i++){const s=t[i];let e,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?"!--"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(r=RegExp("</"+c[2],"g")),u=p):void 0!==c[3]&&(u=p):u===p?">"===c[0]?(u=null!=r?r:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,r=void 0);const w=u===p&&t[i+1].startsWith("/>")?" ":"";d+=u===f?s+h:v>=0?(l.push(e),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(l.push(void 0),i):w)}const c=d+(t[s]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==e?e.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[u++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?k:"?"===i[1]?I:"@"===i[1]?L:R})}else v.push({type:6,index:r})}for(const i of t)h.removeAttribute(i)}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)h.append(t[s],d()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],d())}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else{let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1}r++}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){var o,n,l,h;if(i===T)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const d=u(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==d&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===d?r=void 0:(r=new d(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=N(t,r._$AS(t,i.values),r,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,d=e[0];for(;void 0!==d;){if(l===d.index){let i;2===d.type?i=new M(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new z(n,this,t)),this._$AV.push(i),d=e[++h]}l!==(null==d?void 0:d.index)&&(n=C.nextNode(),l++)}return o}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),u(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):v(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==A&&u(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=V.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else{const t=new S(o,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new V(t)),i}T(t){c(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 M(this.k(d()),this.k(d()),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class R{constructor(t,i,s,e,o){this.type=1,this._$AH=A,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=A}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=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=N(this,e[s+l],i,l),h===T&&(h=this._$AH[l]),n||(n=!u(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class k extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const H=s?s.emptyScript:"";class I extends R{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class L extends R{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=N(this,t,i,0))&&void 0!==s?s:A)===T)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||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 z{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){N(this,t)}}const Z={O:o,P:n,A:l,C:1,M:P,L:S,D:v,R:N,I:M,V:R,H:I,N:L,U:k,F:z},j=i.litHtmlPolyfillSupport;null==j||j(V,M),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push("2.7.1");const B=(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 M(i.insertBefore(d(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{Z as _$LH,x as html,T as noChange,A as nothing,B as render,b as svg}; | ||
//# sourceMappingURL=lit-html.js.map |
@@ -9,2 +9,7 @@ import { noChange } from '../lit-html.js'; | ||
*/ | ||
const important = 'important'; | ||
// The leading space is important | ||
const importantFlag = ' !' + important; | ||
// How many characters to remove from a value, as a negative number | ||
const flagTrim = 0 - importantFlag.length; | ||
class StyleMapDirective extends Directive { | ||
@@ -72,4 +77,5 @@ constructor(partInfo) { | ||
this._previousStyleProperties.add(name); | ||
if (name.includes('-')) { | ||
style.setProperty(name, value); | ||
const isImportant = value.endsWith(importantFlag); | ||
if (name.includes('-') || isImportant) { | ||
style.setProperty(name, isImportant ? value.slice(0, flagTrim) : value, isImportant ? important : ''); | ||
} | ||
@@ -76,0 +82,0 @@ else { |
@@ -47,4 +47,9 @@ import { Buffer } from 'buffer'; | ||
* @param userOptions | ||
* | ||
* @deprecated This has been moved to `@lit-labs/ssr-client` and will be removed | ||
* in a future release. | ||
*/ | ||
const hydrate = (rootValue, container, options = {}) => { | ||
console.warn('Importing `hydrate()` from `lit-html/experimental-hydrate.js` is deprecated.' + | ||
'Import from `@lit-labs/ssr-client` instead.'); | ||
// TODO(kschaaf): Do we need a helper for _$litPart$ ("part for node")? | ||
@@ -124,3 +129,3 @@ // This property needs to remain unminified. | ||
part = new ChildPart(marker, null, state.instance, options); | ||
state.instance._parts.push(part); | ||
state.instance._$parts.push(part); | ||
value = state.result.values[state.instancePartIndex++]; | ||
@@ -290,3 +295,3 @@ state.templatePartIndex++; | ||
state.instancePartIndex += templatePart.strings.length - 1; | ||
instance._parts.push(instancePart); | ||
instance._$parts.push(instancePart); | ||
} | ||
@@ -297,3 +302,3 @@ else { | ||
resolveDirective(instancePart, state.result.values[state.instancePartIndex++]); | ||
instance._parts.push(instancePart); | ||
instance._$parts.push(instancePart); | ||
} | ||
@@ -300,0 +305,0 @@ state.templatePartIndex++; |
@@ -458,3 +458,2 @@ /** | ||
{ strings, ['_$litType$']: type }, options) { | ||
/** @internal */ | ||
this.parts = []; | ||
@@ -657,5 +656,4 @@ let node; | ||
constructor(template, parent) { | ||
this._$parts = []; | ||
/** @internal */ | ||
this._parts = []; | ||
/** @internal */ | ||
this._$disconnectableChildren = undefined; | ||
@@ -696,3 +694,3 @@ this._$template = template; | ||
} | ||
this._parts.push(part); | ||
this._$parts.push(part); | ||
templatePart = parts[++partIndex]; | ||
@@ -709,3 +707,3 @@ } | ||
let i = 0; | ||
for (const part of this._parts) { | ||
for (const part of this._$parts) { | ||
if (part !== undefined) { | ||
@@ -961,3 +959,3 @@ debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({ | ||
instance: this._$committedValue, | ||
parts: this._$committedValue._parts, | ||
parts: this._$committedValue._$parts, | ||
options: this.options, | ||
@@ -975,3 +973,3 @@ values, | ||
instance, | ||
parts: instance._parts, | ||
parts: instance._$parts, | ||
options: this.options, | ||
@@ -986,3 +984,3 @@ fragment, | ||
instance, | ||
parts: instance._parts, | ||
parts: instance._$parts, | ||
options: this.options, | ||
@@ -1366,7 +1364,6 @@ fragment, | ||
_getTemplateHtml: getTemplateHtml, | ||
// Used in hydrate | ||
// Used in tests and private-ssr-support | ||
_TemplateInstance: TemplateInstance, | ||
_isIterable: isIterable, | ||
_resolveDirective: resolveDirective, | ||
// Used in tests and private-ssr-support | ||
_ChildPart: ChildPart, | ||
@@ -1385,3 +1382,3 @@ _AttributePart: AttributePart, | ||
// This line will be used in regexes to search for lit-html usage. | ||
((_d = global.litHtmlVersions) !== null && _d !== void 0 ? _d : (global.litHtmlVersions = [])).push('2.7.0'); | ||
((_d = global.litHtmlVersions) !== null && _d !== void 0 ? _d : (global.litHtmlVersions = [])).push('2.7.1'); | ||
if (global.litHtmlVersions.length > 1) { | ||
@@ -1388,0 +1385,0 @@ issueWarning('multiple-versions', `Multiple versions of Lit loaded. ` + |
@@ -55,2 +55,5 @@ import { _$LH as _$LH$1, noChange } from './lit-html.js'; | ||
ElementPart: _$LH$1._ElementPart, | ||
TemplateInstance: _$LH$1._TemplateInstance, | ||
isIterable: _$LH$1._isIterable, | ||
ChildPart: _$LH$1._ChildPart, | ||
}; | ||
@@ -57,0 +60,0 @@ |
@@ -6,3 +6,3 @@ import{directive as r,PartType as e}from"../directive.js";import{AsyncReplaceDirective as s}from"./async-replace.js";import{clearPart as t,insertPart as o,setChildPartValue as i}from"../directive-helpers.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const c=r(class extends s{constructor(r){if(super(r),r.type!==e.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(r,e){return this._$Ctt=r,super.update(r,e)}commitValue(r,e){0===e&&t(this._$Ctt);const s=o(this._$Ctt);i(s,r)}});export{c as asyncAppend}; | ||
*/const c=r(class extends s{constructor(r){if(super(r),r.type!==e.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(r,e){return this._$CJ=r,super.update(r,e)}commitValue(r,e){0===e&&t(this._$CJ);const s=o(this._$CJ);i(s,r)}});export{c as asyncAppend}; | ||
//# sourceMappingURL=async-append.js.map |
@@ -6,3 +6,3 @@ import{noChange as t}from"../lit-html.js";import{AsyncDirective as i}from"../async-directive.js";import{PseudoWeakRef as s,Pauser as r,forAwaitOf as e}from"./private-async-helpers.js";import{directive as n}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/class o extends i{constructor(){super(...arguments),this._$CK=new s(this),this._$CX=new r}render(i,s){return t}update(i,[s,r]){if(this.isConnected||this.disconnected(),s===this._$CJ)return;this._$CJ=s;let n=0;const{_$CK:o,_$CX:h}=this;return e(s,(async t=>{for(;h.get();)await h.get();const i=o.deref();if(void 0!==i){if(i._$CJ!==s)return!1;void 0!==r&&(t=r(t,n)),i.commitValue(t,n),n++}return!0})),t}commitValue(t,i){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const h=n(o);export{o as AsyncReplaceDirective,h as asyncReplace}; | ||
*/class o extends i{constructor(){super(...arguments),this._$Cq=new s(this),this._$CK=new r}render(i,s){return t}update(i,[s,r]){if(this.isConnected||this.disconnected(),s===this._$CX)return;this._$CX=s;let n=0;const{_$Cq:o,_$CK:h}=this;return e(s,(async t=>{for(;h.get();)await h.get();const i=o.deref();if(void 0!==i){if(i._$CX!==s)return!1;void 0!==r&&(t=r(t,n)),i.commitValue(t,n),n++}return!0})),t}commitValue(t,i){this.setValue(t)}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}const h=n(o);export{o as AsyncReplaceDirective,h as asyncReplace}; | ||
//# sourceMappingURL=async-replace.js.map |
@@ -6,3 +6,3 @@ import{render as t,nothing as i}from"../lit-html.js";import{directive as s,Directive as e}from"../directive.js";import{isTemplateResult as o,getCommittedValue as r,setCommittedValue as h,insertPart as n,clearPart as c}from"../directive-helpers.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const d=s(class extends e{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(s,[e]){if(o(this.it)&&(!o(e)||this.it.strings!==e.strings)){const e=r(s).pop();let o=this.et.get(this.it.strings);if(void 0===o){const s=document.createDocumentFragment();o=t(i,s),o.setConnected(!1),this.et.set(this.it.strings,o)}h(o,[e]),n(o,void 0,e)}if(o(e)){if(!o(this.it)||this.it.strings!==e.strings){const t=this.et.get(e.strings);if(void 0!==t){const i=r(t).pop();c(s),n(s,void 0,i),h(s,[i])}}this.it=e}else this.it=void 0;return this.render(e)}});export{d as cache}; | ||
*/const d=s(class extends e{constructor(t){super(t),this.tt=new WeakMap}render(t){return[t]}update(s,[e]){if(o(this.et)&&(!o(e)||this.et.strings!==e.strings)){const e=r(s).pop();let o=this.tt.get(this.et.strings);if(void 0===o){const s=document.createDocumentFragment();o=t(i,s),o.setConnected(!1),this.tt.set(this.et.strings,o)}h(o,[e]),n(o,void 0,e)}if(o(e)){if(!o(this.et)||this.et.strings!==e.strings){const t=this.tt.get(e.strings);if(void 0!==t){const i=r(t).pop();c(s),n(s,void 0,i),h(s,[i])}}this.et=e}else this.et=void 0;return this.render(e)}});export{d as cache}; | ||
//# sourceMappingURL=cache.js.map |
@@ -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.nt){this.nt=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.nt.add(t);return this.render(s)}const e=i.element.classList;this.nt.forEach((t=>{t in s||(e.remove(t),this.nt.delete(t))}));for(const t in s){const i=!!s[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.nt.add(t)):(e.remove(t),this.nt.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.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(s)}const e=i.element.classList;this.it.forEach((t=>{t in s||(e.remove(t),this.it.delete(t))}));for(const t in s){const i=!!s[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)))}return t}});export{o as classMap}; | ||
//# sourceMappingURL=class-map.js.map |
@@ -7,3 +7,3 @@ import{noChange as r}from"../lit-html.js";import{directive as t,Directive as s}from"../directive.js"; | ||
*/ | ||
const e={},i=t(class extends s{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(t,[s,e]){if(Array.isArray(s)){if(Array.isArray(this.ot)&&this.ot.length===s.length&&s.every(((r,t)=>r===this.ot[t])))return r}else if(this.ot===s)return r;return this.ot=Array.isArray(s)?Array.from(s):s,this.render(s,e)}});export{i as guard}; | ||
const e={},i=t(class extends s{constructor(){super(...arguments),this.st=e}render(r,t){return t()}update(t,[s,e]){if(Array.isArray(s)){if(Array.isArray(this.st)&&this.st.length===s.length&&s.every(((r,t)=>r===this.st[t])))return r}else if(this.st===s)return r;return this.st=Array.isArray(s)?Array.from(s):s,this.render(s,e)}});export{i as guard}; | ||
//# sourceMappingURL=guard.js.map |
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
const t=async(t,s)=>{for await(const i of t)if(!1===await s(i))return};class s{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class i{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){var t;null!==(t=this.Z)&&void 0!==t||(this.Z=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Z=this.q=void 0}}export{i as Pauser,s as PseudoWeakRef,t as forAwaitOf}; | ||
const t=async(t,s)=>{for await(const i of t)if(!1===await s(i))return};class s{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class i{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.Z=t)))}resume(){var t;null===(t=this.Z)||void 0===t||t.call(this),this.Y=this.Z=void 0}}export{i as Pauser,s as PseudoWeakRef,t as forAwaitOf}; | ||
//# sourceMappingURL=private-async-helpers.js.map |
@@ -6,3 +6,3 @@ import{nothing as i}from"../lit-html.js";import{AsyncDirective as t}from"../async-directive.js";import{directive as s}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.Y;return o&&void 0!==this.Y&&this.rt(void 0),(o||this.lt!==this.ct)&&(this.Y=s,this.dt=null===(e=t.options)||void 0===e?void 0:e.host,this.rt(this.ct=t.element)),i}rt(i){var t;if("function"==typeof this.Y){const s=null!==(t=this.dt)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.Y)&&this.Y.call(this.dt,void 0),e.set(this.Y,i),void 0!==i&&this.Y.call(this.dt,i)}else this.Y.value=i}get lt(){var i,t,s;return"function"==typeof this.Y?null===(t=h.get(null!==(i=this.dt)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.Y):null===(s=this.Y)||void 0===s?void 0:s.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{e as createRef,n as ref}; | ||
*/const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.G;return o&&void 0!==this.G&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=s,this.ct=null===(e=t.options)||void 0===e?void 0:e.host,this.ot(this.lt=t.element)),i}ot(i){var t;if("function"==typeof this.G){const s=null!==(t=this.ct)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.G)&&this.G.call(this.ct,void 0),e.set(this.G,i),void 0!==i&&this.G.call(this.ct,i)}else this.G.value=i}get rt(){var i,t,s;return"function"==typeof this.G?null===(t=h.get(null!==(i=this.ct)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.G):null===(s=this.G)||void 0===s?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});export{e as createRef,n as ref}; | ||
//# sourceMappingURL=ref.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")}ht(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.ht(e,s,t).values}update(s,[t,r,c]){var d;const a=l(s),{values:p,keys:v}=this.ht(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}; | ||
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.ht=v,p;const h=null!==(d=this.ht)&&void 0!==d?d:this.ht=[],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.ht=v,f(s,m),e}});export{c as repeat}; | ||
//# sourceMappingURL=repeat.js.map |
@@ -6,3 +6,3 @@ import{noChange as t}from"../lit-html.js";import{directive as e,Directive as r,PartType as s}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const i=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.vt){this.vt=new Set;for(const t in r)this.vt.add(t);return this.render(r)}this.vt.forEach((t=>{null==r[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in r){const e=r[t];null!=e&&(this.vt.add(t),t.includes("-")?s.setProperty(t,e):s[t]=e)}return t}});export{i as styleMap}; | ||
*/const i="important",n=" !"+i,o=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ut){this.ut=new Set;for(const t in r)this.ut.add(t);return this.render(r)}this.ut.forEach((t=>{null==r[t]&&(this.ut.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in r){const e=r[t];if(null!=e){this.ut.add(t);const r=e.endsWith(n);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?i:""):s[t]=e}}return t}});export{o as styleMap}; | ||
//# sourceMappingURL=style-map.js.map |
@@ -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.ft===r?t:(this.ft=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._t=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._t;this.it=r;const s=[r];return s.raw=s,this._t={_$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.et=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.et=r;if(r===i)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.et)return this.ft;this.et=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{isPrimitive as s}from"../directive-helpers.js";import{AsyncDirective as i}from"../async-directive.js";import{PseudoWeakRef as r,Pauser as e}from"./private-async-helpers.js";import{directive as o}from"../directive.js"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const n=t=>!s(t)&&"function"==typeof t.then,h=1073741823;class c extends i{constructor(){super(...arguments),this._$Cwt=h,this._$Cyt=[],this._$CK=new r(this),this._$CX=new e}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._$CK,c=this._$CX;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=h,e=0,Promise.resolve(s).then((async t=>{for(;c.get();)await c.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._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const m=o(c);export{c as UntilDirective,m as until}; | ||
*/const n=t=>!s(t)&&"function"==typeof t.then,h=1073741823;class c extends i{constructor(){super(...arguments),this._$C_t=h,this._$Cwt=[],this._$Cq=new r(this),this._$CK=new e}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._$Cq,c=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<i.length&&!(t>this._$C_t);t++){const s=i[t];if(!n(s))return this._$C_t=t,s;t<e&&s===r[t]||(this._$C_t=h,e=0,Promise.resolve(s).then((async t=>{for(;c.get();)await c.get();const i=o.deref();if(void 0!==i){const r=i._$Cwt.indexOf(s);r>-1&&r<i._$C_t&&(i._$C_t=r,i.setValue(t))}})))}return t}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}const m=o(c);export{c as UntilDirective,m as until}; | ||
//# sourceMappingURL=until.js.map |
@@ -1,2 +0,2 @@ | ||
import{Buffer as e}from"buffer";import{noChange as t,_$LH as r}from"./lit-html.js";import{PartType as n}from"./directive.js";import{isPrimitive as o,isTemplateResult as a,isSingleExpression as i}from"./directive-helpers.js";const{D:l,R:s,V:c,I:d,B:f}=r,p=(e,t,r={})=>{if(void 0!==t._$litPart$)throw Error("container already contains a live render");let n,o,a;const i=[],l=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT,null,!1);let s;for(;null!==(s=l.nextNode());){const t=s.data;if(t.startsWith("lit-part")){if(0===i.length&&void 0!==n)throw Error(`There must be only one root part per container. Found a part marker (${s}) when we already have a root part marker (${o})`);a=m(e,s,i,r),null!=n||(n=a),null!=o||(o=s)}else if(t.startsWith("lit-node"))h(s,i,r);else if(t.startsWith("/lit-part")){if(1===i.length&&a!==n)throw Error("internal error");a=u(s,a,i)}}if(void 0===n){const e=t instanceof ShadowRoot?"{container.host.localName}'s shadow root":t instanceof DocumentFragment?"DocumentFragment":t.localName;console.error(`There should be exactly one root part in a render container, but we didn't find any in ${e}.`)}t._$litPart$=n},m=(e,r,n,i)=>{let f,p;if(0===n.length)p=new d(r,null,void 0,i),f=e;else{const e=n[n.length-1];if("template-instance"===e.type)p=new d(r,null,e.instance,i),e.instance.u.push(p),f=e.result.values[e.instancePartIndex++],e.templatePartIndex++;else if("iterable"===e.type){p=new d(r,null,e.part,i);const t=e.iterator.next();if(t.done)throw f=void 0,e.done=!0,Error("Unhandled shorter than expected iterable");f=t.value,e.part._$AH.push(p)}else p=new d(r,null,e.part,i)}if(f=c(p,f),f===t)n.push({part:p,type:"leaf"});else if(o(f))n.push({part:p,type:"leaf"}),p._$AH=f;else if(a(f)){const e="lit-part "+w(f);if(r.data!==e)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{const e=d.prototype._$AC(f),t=new l(e,p);n.push({type:"template-instance",instance:t,part:p,templatePartIndex:0,instancePartIndex:0,result:f}),p._$AH=t}}else s(f)?(n.push({part:p,type:"iterable",value:f,iterator:f[Symbol.iterator](),done:!1}),p._$AH=[]):(n.push({part:p,type:"leaf"}),p._$AH=null==f?"":f);return p},u=(e,t,r)=>{if(void 0===t)throw Error("unbalanced part marker");t._$AB=e;const n=r.pop();if("iterable"===n.type&&!n.iterator.next().done)throw Error("unexpected longer than expected iterable");if(r.length>0)return r[r.length-1].part},h=(e,t,r)=>{const o=/lit-node (\d+)/.exec(e.data),a=parseInt(o[1]),l=e.nextElementSibling;if(null===l)throw Error("could not find node for attribute parts");l.removeAttribute("defer-hydration");const s=t[t.length-1];if("template-instance"!==s.type)throw Error("internal error");{const e=s.instance;for(;;){const t=e._$AD.parts[s.templatePartIndex];if(void 0===t||t.type!==n.ATTRIBUTE&&t.type!==n.ELEMENT||t.index!==a)break;if(t.type===n.ATTRIBUTE){const o=new t.ctor(l,t.name,t.strings,s.instance,r),a=i(o)?s.result.values[s.instancePartIndex]:s.result.values,c=!(o.type===n.EVENT||o.type===n.PROPERTY);o._$AI(a,o,s.instancePartIndex,c),s.instancePartIndex+=t.strings.length-1,e.u.push(o)}else{const t=new f(l,s.instance,r);c(t,s.result.values[s.instancePartIndex++]),e.u.push(t)}s.templatePartIndex++}}},w=t=>{const r=new Uint32Array(2).fill(5381);for(const e of t.strings)for(let t=0;t<e.length;t++)r[t%2]=33*r[t%2]^e.charCodeAt(t);const n=String.fromCharCode(...new Uint8Array(r.buffer));return e.from(n,"binary").toString("base64")};export{w as digestForTemplateResult,p as hydrate}; | ||
import{Buffer as e}from"buffer";import{noChange as t,_$LH as r}from"./lit-html.js";import{PartType as n}from"./directive.js";import{isPrimitive as o,isTemplateResult as a,isSingleExpression as i}from"./directive-helpers.js";const{L:l,D:s,R:c,I:d,F:f}=r,p=(e,t,r={})=>{if(console.warn("Importing `hydrate()` from `lit-html/experimental-hydrate.js` is deprecated.Import from `@lit-labs/ssr-client` instead."),void 0!==t._$litPart$)throw Error("container already contains a live render");let n,o,a;const i=[],l=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT,null,!1);let s;for(;null!==(s=l.nextNode());){const t=s.data;if(t.startsWith("lit-part")){if(0===i.length&&void 0!==n)throw Error(`There must be only one root part per container. Found a part marker (${s}) when we already have a root part marker (${o})`);a=m(e,s,i,r),null!=n||(n=a),null!=o||(o=s)}else if(t.startsWith("lit-node"))u(s,i,r);else if(t.startsWith("/lit-part")){if(1===i.length&&a!==n)throw Error("internal error");a=h(s,a,i)}}if(void 0===n){const e=t instanceof ShadowRoot?"{container.host.localName}'s shadow root":t instanceof DocumentFragment?"DocumentFragment":t.localName;console.error(`There should be exactly one root part in a render container, but we didn't find any in ${e}.`)}t._$litPart$=n},m=(e,r,n,i)=>{let f,p;if(0===n.length)p=new d(r,null,void 0,i),f=e;else{const e=n[n.length-1];if("template-instance"===e.type)p=new d(r,null,e.instance,i),e.instance._$AV.push(p),f=e.result.values[e.instancePartIndex++],e.templatePartIndex++;else if("iterable"===e.type){p=new d(r,null,e.part,i);const t=e.iterator.next();if(t.done)throw f=void 0,e.done=!0,Error("Unhandled shorter than expected iterable");f=t.value,e.part._$AH.push(p)}else p=new d(r,null,e.part,i)}if(f=c(p,f),f===t)n.push({part:p,type:"leaf"});else if(o(f))n.push({part:p,type:"leaf"}),p._$AH=f;else if(a(f)){const e="lit-part "+w(f);if(r.data!==e)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{const e=d.prototype._$AC(f),t=new l(e,p);n.push({type:"template-instance",instance:t,part:p,templatePartIndex:0,instancePartIndex:0,result:f}),p._$AH=t}}else s(f)?(n.push({part:p,type:"iterable",value:f,iterator:f[Symbol.iterator](),done:!1}),p._$AH=[]):(n.push({part:p,type:"leaf"}),p._$AH=null==f?"":f);return p},h=(e,t,r)=>{if(void 0===t)throw Error("unbalanced part marker");t._$AB=e;const n=r.pop();if("iterable"===n.type&&!n.iterator.next().done)throw Error("unexpected longer than expected iterable");if(r.length>0)return r[r.length-1].part},u=(e,t,r)=>{const o=/lit-node (\d+)/.exec(e.data),a=parseInt(o[1]),l=e.nextElementSibling;if(null===l)throw Error("could not find node for attribute parts");l.removeAttribute("defer-hydration");const s=t[t.length-1];if("template-instance"!==s.type)throw Error("internal error");{const e=s.instance;for(;;){const t=e._$AD.parts[s.templatePartIndex];if(void 0===t||t.type!==n.ATTRIBUTE&&t.type!==n.ELEMENT||t.index!==a)break;if(t.type===n.ATTRIBUTE){const o=new t.ctor(l,t.name,t.strings,s.instance,r),a=i(o)?s.result.values[s.instancePartIndex]:s.result.values,c=!(o.type===n.EVENT||o.type===n.PROPERTY);o._$AI(a,o,s.instancePartIndex,c),s.instancePartIndex+=t.strings.length-1,e._$AV.push(o)}else{const t=new f(l,s.instance,r);c(t,s.result.values[s.instancePartIndex++]),e._$AV.push(t)}s.templatePartIndex++}}},w=t=>{const r=new Uint32Array(2).fill(5381);for(const e of t.strings)for(let t=0;t<e.length;t++)r[t%2]=33*r[t%2]^e.charCodeAt(t);const n=String.fromCharCode(...new Uint8Array(r.buffer));return e.from(n,"binary").toString("base64")};export{w as digestForTemplateResult,p as hydrate}; | ||
//# sourceMappingURL=experimental-hydrate.js.map |
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
var t;const i=globalThis,s=i.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",n=`lit$${(Math.random()+"").slice(9)}$`,l="?"+n,h=`<${l}>`,r=void 0===i.document?{createTreeWalker:()=>({})}:document,d=()=>r.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),T=x(1),b=x(2),w=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?"<svg>":"",u=f;for(let i=0;i<s;i++){const s=t[i];let e,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?"!--"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(r=RegExp("</"+c[2],"g")),u=p):void 0!==c[3]&&(u=p):u===p?">"===c[0]?(u=null!=r?r:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,r=void 0);const x=u===p&&t[i+1].startsWith("/>")?" ":"";d+=u===f?s+h:v>=0?(l.push(e),s.slice(0,v)+o+s.slice(v)+n+x):s+n+(-2===v?(l.push(void 0),i):x)}const c=d+(t[s]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==e?e.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[u++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?R:"?"===i[1]?I:"@"===i[1]?L:k})}else v.push({type:6,index:r})}for(const i of t)h.removeAttribute(i)}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)h.append(t[s],d()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],d())}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else{let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1}r++}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){var o,n,l,h;if(i===w)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const d=u(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==d&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===d?r=void 0:(r=new d(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=N(t,r._$AS(t,i.values),r,e)),i}class S{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,d=e[0];for(;void 0!==d;){if(l===d.index){let i;2===d.type?i=new M(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new z(n,this,t)),this.u.push(i),d=e[++h]}l!==(null==d?void 0:d.index)&&(n=C.nextNode(),l++)}return o}p(t){let i=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cm=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._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),u(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==w&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):v(t)?this.k(t):this.g(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}g(t){this._$AH!==A&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=V.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.p(s);else{const t=new S(o,this),i=t.v(this.options);t.p(s),this.T(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new V(t)),i}k(t){c(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 M(this.S(d()),this.S(d()),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._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class k{constructor(t,i,s,e,o){this.type=1,this._$AH=A,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=A}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=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=N(this,e[s+l],i,l),h===w&&(h=this._$AH[l]),n||(n=!u(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const H=s?s.emptyScript:"";class I extends k{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class L extends k{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=N(this,t,i,0))&&void 0!==s?s:A)===w)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||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 z{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){N(this,t)}}const W={P:o,A:n,M:l,C:1,L:P,D:S,R:v,V:N,I:M,H:k,N:I,U:L,F:R,B:z},Z=i.litHtmlPolyfillSupport;null==Z||Z(V,M),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push("2.7.0");const j=(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 M(i.insertBefore(d(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{W as _$LH,T as html,w as noChange,A as nothing,j as render,b as svg}; | ||
var t;const i=globalThis,s=i.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",n=`lit$${(Math.random()+"").slice(9)}$`,l="?"+n,h=`<${l}>`,r=void 0===i.document?{createTreeWalker:()=>({})}:document,d=()=>r.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),T=x(1),b=x(2),w=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?"<svg>":"",u=f;for(let i=0;i<s;i++){const s=t[i];let e,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?"!--"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(r=RegExp("</"+c[2],"g")),u=p):void 0!==c[3]&&(u=p):u===p?">"===c[0]?(u=null!=r?r:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,r=void 0);const x=u===p&&t[i+1].startsWith("/>")?" ":"";d+=u===f?s+h:v>=0?(l.push(e),s.slice(0,v)+o+s.slice(v)+n+x):s+n+(-2===v?(l.push(void 0),i):x)}const c=d+(t[s]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==e?e.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[u++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?R:"?"===i[1]?I:"@"===i[1]?L:k})}else v.push({type:6,index:r})}for(const i of t)h.removeAttribute(i)}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)h.append(t[s],d()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],d())}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else{let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1}r++}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){var o,n,l,h;if(i===w)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const d=u(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==d&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===d?r=void 0:(r=new d(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=N(t,r._$AS(t,i.values),r,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,d=e[0];for(;void 0!==d;){if(l===d.index){let i;2===d.type?i=new M(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new z(n,this,t)),this._$AV.push(i),d=e[++h]}l!==(null==d?void 0:d.index)&&(n=C.nextNode(),l++)}return o}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),u(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):v(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==A&&u(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=V.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else{const t=new S(o,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new V(t)),i}T(t){c(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 M(this.k(d()),this.k(d()),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class k{constructor(t,i,s,e,o){this.type=1,this._$AH=A,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=A}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=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=N(this,e[s+l],i,l),h===w&&(h=this._$AH[l]),n||(n=!u(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const H=s?s.emptyScript:"";class I extends k{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class L extends k{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=N(this,t,i,0))&&void 0!==s?s:A)===w)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||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 z{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){N(this,t)}}const W={O:o,P:n,A:l,C:1,M:P,L:S,D:v,R:N,I:M,V:k,H:I,N:L,U:R,F:z},Z=i.litHtmlPolyfillSupport;null==Z||Z(V,M),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push("2.7.1");const j=(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 M(i.insertBefore(d(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{W as _$LH,T as html,w as noChange,A as nothing,j as render,b as svg}; | ||
//# sourceMappingURL=lit-html.js.map |
@@ -1,2 +0,2 @@ | ||
import{_$LH as t,noChange as e}from"./lit-html.js"; | ||
import{_$LH as e,noChange as t}from"./lit-html.js"; | ||
/** | ||
@@ -6,3 +6,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const r={boundAttributeSuffix:t.P,marker:t.A,markerMatch:t.M,HTML_RESULT:t.C,getTemplateHtml:t.L,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.j=t=>a=t,t._$AI(r,t,i),a},connectedDisconnectable:t=>({...t,_$AU:!0}),resolveDirective:t.V,AttributePart:t.H,PropertyPart:t.F,BooleanAttributePart:t.N,EventPart:t.U,ElementPart:t.B};export{r as _$LH}; | ||
*/const r={boundAttributeSuffix:e.O,marker:e.P,markerMatch:e.A,HTML_RESULT:e.C,getTemplateHtml:e.M,overrideDirectiveResolve:(e,t)=>class extends e{_$AS(e,r){return t(this,r)}},setDirectiveClass(e,t){e._$litDirective$=t},getAttributePartCommittedValue:(e,r,a)=>{let i=t;return e.j=e=>i=e,e._$AI(r,e,a),i},connectedDisconnectable:e=>({...e,_$AU:!0}),resolveDirective:e.R,AttributePart:e.V,PropertyPart:e.U,BooleanAttributePart:e.H,EventPart:e.N,ElementPart:e.F,TemplateInstance:e.L,isIterable:e.D,ChildPart:e.I};export{r as _$LH}; | ||
//# sourceMappingURL=private-ssr-support.js.map |
{ | ||
"name": "lit-html", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "HTML templates literals in JavaScript", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -8,3 +8,3 @@ /** | ||
import { AttributePart, Part, Disconnectable } from './lit-html.js'; | ||
export type { Template } from './lit-html.js'; | ||
import type { PropertyPart, ChildPart, BooleanAttributePart, EventPart, ElementPart, TemplateInstance } from './lit-html.js'; | ||
/** | ||
@@ -47,9 +47,12 @@ * END USERS SHOULD NOT RELY ON THIS OBJECT. | ||
connectedDisconnectable: (props?: object) => Disconnectable; | ||
resolveDirective: (part: import("./lit-html.js").ChildPart | AttributePart | import("./lit-html.js").ElementPart, value: unknown, parent?: import("./lit-html.js").DirectiveParent, attributeIndex?: number | undefined) => unknown; | ||
resolveDirective: (part: ChildPart | AttributePart | ElementPart, value: unknown, parent?: import("./lit-html.js").DirectiveParent, attributeIndex?: number | undefined) => unknown; | ||
AttributePart: typeof AttributePart; | ||
PropertyPart: typeof import("./lit-html.js").PropertyPart; | ||
BooleanAttributePart: typeof import("./lit-html.js").BooleanAttributePart; | ||
EventPart: typeof import("./lit-html.js").EventPart; | ||
ElementPart: typeof import("./lit-html.js").ElementPart; | ||
PropertyPart: typeof PropertyPart; | ||
BooleanAttributePart: typeof BooleanAttributePart; | ||
EventPart: typeof EventPart; | ||
ElementPart: typeof ElementPart; | ||
TemplateInstance: typeof TemplateInstance; | ||
isIterable: (value: unknown) => value is Iterable<unknown>; | ||
ChildPart: typeof ChildPart; | ||
}; | ||
//# sourceMappingURL=private-ssr-support.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import{_$LH as t,noChange as e}from"./lit-html.js"; | ||
import{_$LH as e,noChange as t}from"./lit-html.js"; | ||
/** | ||
@@ -6,3 +6,3 @@ * @license | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const r={boundAttributeSuffix:t.P,marker:t.A,markerMatch:t.M,HTML_RESULT:t.C,getTemplateHtml:t.L,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.j=t=>a=t,t._$AI(r,t,i),a},connectedDisconnectable:t=>({...t,_$AU:!0}),resolveDirective:t.V,AttributePart:t.H,PropertyPart:t.F,BooleanAttributePart:t.N,EventPart:t.U,ElementPart:t.B};export{r as _$LH}; | ||
*/const r={boundAttributeSuffix:e.O,marker:e.P,markerMatch:e.A,HTML_RESULT:e.C,getTemplateHtml:e.M,overrideDirectiveResolve:(e,t)=>class extends e{_$AS(e,r){return t(this,r)}},setDirectiveClass(e,t){e._$litDirective$=t},getAttributePartCommittedValue:(e,r,a)=>{let i=t;return e.j=e=>i=e,e._$AI(r,e,a),i},connectedDisconnectable:e=>({...e,_$AU:!0}),resolveDirective:e.R,AttributePart:e.V,PropertyPart:e.U,BooleanAttributePart:e.H,EventPart:e.N,ElementPart:e.F,TemplateInstance:e.L,isIterable:e.D,ChildPart:e.I};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
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 too big to display
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
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
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
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
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1796249
12962