timepiece/node_modules/lit-element/development/experimental-hydrate-support.js.map

1 line
6.7 KiB
Plaintext
Raw Normal View History

2024-05-14 14:54:12 +00:00
{"version":3,"file":"experimental-hydrate-support.js","sourceRoot":"","sources":["../src/experimental-hydrate-support.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAC,MAAM,EAAgB,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAarE,8DAA8D;AAC9D,UAAU,CAAC,wBAAwB,GAAG,CAAC,EACrC,UAAU,GAGX,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,MAAM,CAAC,wBAAwB,CACxD,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,EACjC,oBAAoB,CACpB,CAAC,GAAI,CAAC;IAER,8CAA8C;IAC9C,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,oBAAoB,EAAE;QACtD,GAAG;YACD,OAAO,CAAC,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAC/D,CAAC;KACF,CAAC,CAAC;IAEH,4EAA4E;IAC5E,4BAA4B;IAC5B,MAAM,wBAAwB,GAC5B,UAAU,CAAC,SAAS,CAAC,wBAAwB,CAAC;IAChD,UAAU,CAAC,SAAS,CAAC,wBAAwB,GAAG,UAC9C,IAAY,EACZ,GAAkB,EAClB,KAAoB;QAEpB,IAAI,IAAI,KAAK,iBAAiB,IAAI,KAAK,KAAK,IAAI,EAAE;YAChD,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC9B;QACD,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC;IAEF,yEAAyE;IACzE,8EAA8E;IAC9E,MAAM,iBAAiB,GAAG,UAAU,CAAC,SAAS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AC,EAAE;oBACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAC9B,6BAA6B,CAAC,MAAM,CACrC,CAAC;oBACF,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;oBAC/B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACjC;aACF;YACD,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACrD;aAAM;YACL,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACpD;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,IAAI,CACV,0EAA0E;IACxE,uEAAuE,CAC1E,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * LitElement support for hydration of content rendered using lit-ssr.\n *\n * @packageDocumentation\n *\n * @deprecated Moved to `@lit-labs/ssr-client/lit-element-hydrate-support.js`.\n */\n\nimport type {PropertyValues} from '@lit/reactive-element';\nimport {render, RenderOptions} from 'lit-html';\nimport {hydrate} from 'lit-html/experimental-hydrate.js';\nimport {HYDRATE_INTERNALS_ATTR_PREFIX} from '@lit-labs/ssr-dom-shim';\n\ninterface PatchableLitElement extends HTMLElement {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-misused-new\n new (...args: any[]): PatchableLitElement;\n enableUpdating(requestedUpdate?: boolean): void;\n createRenderRoot(): Element | ShadowRoot;\n renderRoot: HTMLElement | DocumentFragment;\n render(): unknown;\n renderOptions: RenderOptions;\n _$needsHydration: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nglobalThis.litElementHydrateSupport = ({\n LitElement,\n}: {\n LitElement: PatchableLitElement;\n}) => {\n const observedAttributes = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(LitElement),\n 'observedAttributes'\n )!.get!;\n\n // Add `defer-hydration` to observedAttributes\n Object.defineProperty(LitElement, 'observedAttributes', {\n get() {\n return [...observedAttributes.call(this), 'defer-hydration'];\n },\n });\n\n // Enable element when 'defer-hydration' attribute is r