diff --git a/.nojekyll b/.nojekyll index 1a77726..2310ef1 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -8ce414a4 \ No newline at end of file +3046f539 \ No newline at end of file diff --git a/scripts/index.html b/scripts/index.html index dda343c..4034ae8 100644 --- a/scripts/index.html +++ b/scripts/index.html @@ -4615,7 +4615,7 @@ .bi-suitcase2::before { content: "\f902"; } .bi-vignette::before { content: "\f903"; } - + -
- +
+ @@ -13062,7 +13083,7 @@ }); -\n * ```\n * @nocollapse\n * @category styles\n */\n static styles?: CSSResultGroup;\n\n /**\n * The set of properties defined by this class that caused an accessor to be\n * added during `createProperty`.\n * @nocollapse\n */\n private static __reactivePropertyKeys?: Set;\n\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // note: piggy backing on this to ensure we're finalized.\n this.finalize();\n const attributes: string[] = [];\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.elementProperties.forEach((v, p) => {\n const attr = this.__attributeNameForProperty(p, v);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n attributes.push(attr);\n }\n });\n return attributes;\n }\n\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(\n name: PropertyKey,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n // if this is a state property, force the attribute to false.\n if (options.state) {\n // Cast as any since this is readonly.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (options as any).attribute = false;\n }\n // Note, since this can be called by the `@property` decorator which\n // is called before `finalize`, we ensure finalization has been kicked off.\n this.finalize();\n this.elementProperties.set(name, options);\n // Do not generate an accessor if the prototype already has one, since\n // it would be lost otherwise and that would never be the user's intention;\n // Instead, we expect users to call `requestUpdate` themselves from\n // user-defined accessors. Note that if the super has an accessor we will\n // still overwrite it\n if (!options.noAccessor && !this.prototype.hasOwnProperty(name)) {\n const key = typeof name === 'symbol' ? Symbol() : `__${name}`;\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n Object.defineProperty(this.prototype, name, descriptor);\n if (DEV_MODE) {\n // If this class doesn't have its own set, create one and initialize\n // with the values in the set from the nearest ancestor class, if any.\n if (!this.hasOwnProperty('__reactivePropertyKeys')) {\n this.__reactivePropertyKeys = new Set(\n this.__reactivePropertyKeys ?? []\n );\n }\n this.__reactivePropertyKeys!.add(name);\n }\n }\n }\n }\n\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n protected static getPropertyDescriptor(\n name: PropertyKey,\n key: string | symbol,\n options: PropertyDeclaration\n ): PropertyDescriptor | undefined {\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(): any {\n return (this as {[key: string]: unknown})[key as string];\n },\n set(this: ReactiveElement, value: unknown) {\n const oldValue = (this as {} as {[key: string]: unknown})[\n name as string\n ];\n (this as {} as {[key: string]: unknown})[key as string] = value;\n (this as unknown as ReactiveElement).requestUpdate(\n name,\n oldValue,\n options\n );\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name: PropertyKey) {\n return this.elementProperties.get(name) || defaultPropertyDeclaration;\n }\n\n /**\n * Creates property accessors for registered properties, sets up element\n * styling, and ensures any superclasses are also finalized. Returns true if\n * the element was finalized.\n * @nocollapse\n */\n protected static finalize() {\n if (this.hasOwnProperty(finalized)) {\n return false;\n }\n this[finalized] = true;\n // finalize any superclasses\n const superCtor = Object.getPrototypeOf(this) as typeof ReactiveElement;\n superCtor.finalize();\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n this.elementProperties = new Map(superCtor.elementProperties);\n // initialize Map populated in observedAttributes\n this.__attributeToPropertyMap = new Map();\n // make any properties\n // Note, only process \"own\" properties since this element will inherit\n // any properties defined on the superClass, and finalization ensures\n // the entire prototype chain is finalized.\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n // support symbols in properties (IE11 does not support this)\n const propKeys = [\n ...Object.getOwnPropertyNames(props),\n ...Object.getOwnPropertySymbols(props),\n ];\n // This for/of is ok because propKeys is an array\n for (const p of propKeys) {\n // note, use of `any` is due to TypeScript lack of support for symbol in\n // index types\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.createProperty(p, (props as any)[p]);\n }\n }\n this.elementStyles = this.finalizeStyles(this.styles);\n // DEV mode warnings\n if (DEV_MODE) {\n const warnRemovedOrRenamed = (name: string, renamed = false) => {\n if (this.prototype.hasOwnProperty(name)) {\n issueWarning(\n renamed ? 'renamed-api' : 'removed-api',\n `\\`${name}\\` is implemented on class ${this.name}. It ` +\n `has been ${renamed ? 'renamed' : 'removed'} ` +\n `in this version of LitElement.`\n );\n }\n };\n warnRemovedOrRenamed('initialize');\n warnRemovedOrRenamed('requestUpdateInternal');\n warnRemovedOrRenamed('_getUpdateComplete', true);\n }\n return true;\n }\n\n /**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n protected static finalizeStyles(\n styles?: CSSResultGroup\n ): Array {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set((styles as Array).flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n }\n } else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n * @category rendering\n */\n readonly renderRoot!: HTMLElement | ShadowRoot;\n\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n private static __attributeNameForProperty(\n name: PropertyKey,\n options: PropertyDeclaration\n ) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n\n private __instanceProperties?: PropertyValues = new Map();\n // Initialize to an unresolved Promise so we can make sure the element has\n // connected before first update.\n private __updatePromise!: Promise;\n\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n isUpdatePending = false;\n\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n hasUpdated = false;\n\n /**\n * Map with keys for any properties that have changed since the last\n * update cycle with previous values.\n *\n * @internal\n */\n _$changedProperties!: PropertyValues;\n\n /**\n * Map with keys of properties that should be reflected when updated.\n */\n private __reflectingProperties?: Map;\n\n /**\n * Name of currently reflecting property\n */\n private __reflectingProperty: PropertyKey | null = null;\n\n /**\n * Set of controllers.\n */\n private __controllers?: ReactiveController[];\n\n constructor() {\n super();\n this._initialize();\n }\n\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n *\n * @internal\n */\n _initialize() {\n this.__updatePromise = new Promise(\n (res) => (this.enableUpdating = res)\n );\n this._$changedProperties = new Map();\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n i(this)\n );\n }\n\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller: ReactiveController) {\n (this.__controllers ??= []).push(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller: ReactiveController) {\n // Note, if the indexOf is -1, the >>> will flip the sign which makes the\n // splice do nothing.\n this.__controllers?.splice(this.__controllers.indexOf(controller) >>> 0, 1);\n }\n\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n private __saveInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n (this.constructor as typeof ReactiveElement).elementProperties.forEach(\n (_v, p) => {\n if (this.hasOwnProperty(p)) {\n this.__instanceProperties!.set(p, this[p as keyof this]);\n delete this[p as keyof this];\n }\n }\n );\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n protected createRenderRoot(): Element | ShadowRoot {\n const renderRoot =\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as typeof ReactiveElement).shadowRootOptions\n );\n adoptStyles(\n renderRoot,\n (this.constructor as typeof ReactiveElement).elementStyles\n );\n return renderRoot;\n }\n\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // create renderRoot before first update.\n if (this.renderRoot === undefined) {\n (\n this as {\n renderRoot: Element | DocumentFragment;\n }\n ).renderRoot = this.createRenderRoot();\n }\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n protected enableUpdating(_requestedUpdate: boolean) {}\n\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(\n name: string,\n _old: string | null,\n value: string | null\n ) {\n this._$attributeToProperty(name, value);\n }\n\n private __propertyToAttribute(\n name: PropertyKey,\n value: unknown,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n const attr = (\n this.constructor as typeof ReactiveElement\n ).__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter =\n (options.converter as ComplexAttributeConverter)?.toAttribute !==\n undefined\n ? (options.converter as ComplexAttributeConverter)\n : defaultConverter;\n const attrValue = converter.toAttribute!(value, options.type);\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.indexOf(\n 'migration'\n ) >= 0 &&\n attrValue === undefined\n ) {\n issueWarning(\n 'undefined-attribute-value',\n `The attribute value for the ${name as string} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`\n );\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n } else {\n this.setAttribute(attr, attrValue as string);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /** @internal */\n _$attributeToProperty(name: string, value: string | null) {\n const ctor = this.constructor as typeof ReactiveElement;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter =\n typeof options.converter === 'function'\n ? {fromAttribute: options.converter}\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName as keyof this] = converter.fromAttribute!(\n value,\n options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration\n ): void {\n let shouldRequestUpdate = true;\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n options =\n options ||\n (this.constructor as typeof ReactiveElement).getPropertyOptions(name);\n const hasChanged = options.hasChanged || notEqual;\n if (hasChanged(this[name as keyof this], oldValue)) {\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n if (this.__reflectingProperties === undefined) {\n this.__reflectingProperties = new Map();\n }\n this.__reflectingProperties.set(name, options);\n }\n } else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n if (!this.isUpdatePending && shouldRequestUpdate) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n // Note, since this no longer returns a promise, in dev mode we return a\n // thenable which warns if it's called.\n return DEV_MODE\n ? (requestUpdateThenable(this.localName) as unknown as void)\n : undefined;\n }\n\n /**\n * Sets up the element to asynchronously update.\n */\n private async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n } catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n protected scheduleUpdate(): void | Promise {\n return this.performUpdate();\n }\n\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * Note: To ensure `performUpdate()` synchronously completes a pending update,\n * it should not be overridden. In LitElement 2.x it was suggested to override\n * `performUpdate()` to also customizing update scheduling. Instead, you should now\n * override `scheduleUpdate()`. For backwards compatibility with LitElement 2.x,\n * scheduling updates via `performUpdate()` continues to work, but will make\n * also calling `performUpdate()` to synchronously process updates difficult.\n *\n * @category updates\n */\n protected performUpdate(): void | Promise {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({kind: 'update'});\n // create renderRoot before first update.\n if (!this.hasUpdated) {\n // Produce warning if any class properties are shadowed by class fields\n if (DEV_MODE) {\n const shadowedProperties: string[] = [];\n (\n this.constructor as typeof ReactiveElement\n ).__reactivePropertyKeys?.forEach((p) => {\n if (this.hasOwnProperty(p) && !this.__instanceProperties?.has(p)) {\n shadowedProperties.push(p as string);\n }\n });\n if (shadowedProperties.length) {\n throw new Error(\n `The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`\n );\n }\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.__instanceProperties!.forEach((v, p) => ((this as any)[p] = v));\n this.__instanceProperties = undefined;\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n } else {\n this.__markUpdated();\n }\n } catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n protected willUpdate(_changedProperties: PropertyValues): void {}\n\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties: PropertyValues) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (\n DEV_MODE &&\n this.isUpdatePending &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.indexOf(\n 'change-in-update'\n ) >= 0\n ) {\n issueWarning(\n 'change-in-update',\n `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`\n );\n }\n }\n\n private __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete(): Promise {\n return this.getUpdateComplete();\n }\n\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n protected getUpdateComplete(): Promise {\n return this.__updatePromise;\n }\n\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n return true;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected update(_changedProperties: PropertyValues) {\n if (this.__reflectingProperties !== undefined) {\n // Use forEach so this works even if for/of loops are compiled to for\n // loops expecting arrays\n this.__reflectingProperties.forEach((v, k) =>\n this.__propertyToAttribute(k, this[k as keyof this], v)\n );\n this.__reflectingProperties = undefined;\n }\n this.__markUpdated();\n }\n\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected updated(_changedProperties: PropertyValues) {}\n\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = ['change-in-update'];\n const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n if (\n !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n ) {\n ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n }\n };\n ReactiveElement.enableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n if (this.enabledWarnings!.indexOf(warning) < 0) {\n this.enabledWarnings!.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings!.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings!.splice(i, 1);\n }\n };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('1.6.2');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// IMPORTANT: these imports must be type-only\nimport type {Directive, DirectiveResult, PartInfo} from './directive.js';\n\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n// Use window for browser builds because IE11 doesn't have globalThis.\nconst global = NODE_MODE ? globalThis : window;\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace LitUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | TemplatePrep\n | TemplateInstantiated\n | TemplateInstantiatedAndUpdated\n | TemplateUpdating\n | BeginRender\n | EndRender\n | CommitPartEntry\n | SetPartValue;\n export interface TemplatePrep {\n kind: 'template prep';\n template: Template;\n strings: TemplateStringsArray;\n clonableTemplate: HTMLTemplateElement;\n parts: TemplatePart[];\n }\n export interface BeginRender {\n kind: 'begin render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart | undefined;\n }\n export interface EndRender {\n kind: 'end render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart;\n }\n export interface TemplateInstantiated {\n kind: 'template instantiated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateInstantiatedAndUpdated {\n kind: 'template instantiated and updated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateUpdating {\n kind: 'template updating';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n parts: Array;\n values: unknown[];\n }\n export interface SetPartValue {\n kind: 'set part';\n part: Part;\n value: unknown;\n valueIndex: number;\n values: unknown[];\n templateInstance: TemplateInstance;\n }\n\n export type CommitPartEntry =\n | CommitNothingToChildEntry\n | CommitText\n | CommitNode\n | CommitAttribute\n | CommitProperty\n | CommitBooleanAttribute\n | CommitEventListener\n | CommitToElementBinding;\n\n export interface CommitNothingToChildEntry {\n kind: 'commit nothing to child';\n start: ChildNode;\n end: ChildNode | null;\n parent: Disconnectable | undefined;\n options: RenderOptions | undefined;\n }\n\n export interface CommitText {\n kind: 'commit text';\n node: Text;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitNode {\n kind: 'commit node';\n start: Node;\n parent: Disconnectable | undefined;\n value: Node;\n options: RenderOptions | undefined;\n }\n\n export interface CommitAttribute {\n kind: 'commit attribute';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitProperty {\n kind: 'commit property';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitBooleanAttribute {\n kind: 'commit boolean attribute';\n element: Element;\n name: string;\n value: boolean;\n options: RenderOptions | undefined;\n }\n\n export interface CommitEventListener {\n kind: 'commit event listener';\n element: Element;\n name: string;\n value: unknown;\n oldListener: unknown;\n options: RenderOptions | undefined;\n // True if we're removing the old event listener (e.g. because settings changed, or value is nothing)\n removeListener: boolean;\n // True if we're adding a new event listener (e.g. because first render, or settings changed)\n addListener: boolean;\n }\n\n export interface CommitToElementBinding {\n kind: 'commit to element binding';\n element: Element;\n value: unknown;\n options: RenderOptions | undefined;\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: LitUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n global.litIssuedWarnings ??= new Set();\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings!.has(warning)) {\n console.warn(warning);\n global.litIssuedWarnings!.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n}\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n global.ShadyDOM?.inUse &&\n global.ShadyDOM?.noPatch === true\n ? global.ShadyDOM!.wrap\n : (node: Node) => node;\n\nconst trustedTypes = (global as unknown as Partial).trustedTypes;\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\n\n/**\n * Used to sanitize any value before it is written into the DOM. This can be\n * used to implement a security policy of allowed and disallowed values in\n * order to prevent XSS attacks.\n *\n * One way of using this callback would be to check attributes and properties\n * against a list of high risk fields, and require that values written to such\n * fields be instances of a class which is safe by construction. Closure's Safe\n * HTML Types is one implementation of this technique (\n * https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md).\n * The TrustedTypes polyfill in API-only mode could also be used as a basis\n * for this technique (https://github.com/WICG/trusted-types).\n *\n * @param node The HTML node (usually either a #text node or an Element) that\n * is being written to. Note that this is just an exemplar node, the write\n * may take place against another instance of the same class of node.\n * @param name The name of an attribute or property (for example, 'href').\n * @param type Indicates whether the write that's about to be performed will\n * be to a property or a node.\n * @return A function that will sanitize this class of writes.\n */\nexport type SanitizerFactory = (\n node: Node,\n name: string,\n type: 'property' | 'attribute'\n) => ValueSanitizer;\n\n/**\n * A function which can sanitize values that will be written to a specific kind\n * of DOM sink.\n *\n * See SanitizerFactory.\n *\n * @param value The value to sanitize. Will be the actual value passed into\n * the lit-html template literal, so this could be of any type.\n * @return The value to write to the DOM. Usually the same as the input value,\n * unless sanitization is needed.\n */\nexport type ValueSanitizer = (value: unknown) => unknown;\n\nconst identityFunction: ValueSanitizer = (value: unknown) => value;\nconst noopSanitizer: SanitizerFactory = (\n _node: Node,\n _name: string,\n _type: 'property' | 'attribute'\n) => identityFunction;\n\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer: SanitizerFactory) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(\n `Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`\n );\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\n\nconst createSanitizer: SanitizerFactory = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${String(Math.random()).slice(9)}$`;\n\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\n\nconst d =\n NODE_MODE && global.document === undefined\n ? ({\n createTreeWalker() {\n return {};\n },\n } as unknown as Document)\n : document;\n\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\nconst isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value: unknown): value is Iterable =>\n isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value as any)?.[Symbol.iterator] === 'function';\n\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\n\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with \n * \n * ```\n *\n * This example uses column widths of 6 units on `sm` screens and 4 and 8 units\n * on `lg` screens. `col-widths-md` is equivalent to `col-widths-md=\"null\"` or\n * `col-widths-md=\"true\"`, which means auto-fit items at the `md` breakpoint.\n */\nexport class BslibLayoutColumns extends HTMLElement {\n static tagName = \"bslib-layout-columns\";\n static isShinyInput = false;\n\n /**\n * Create a new default BreakpointMap. If no column widths are specified, we\n * auto-fit at the \"sm\" and \"lg\" breakpoints.\n */\n static defaultColWidths(): BreakpointMap {\n return new Map(Object.entries({ sm: null, lg: null }));\n }\n\n /**\n * The user-specified (or default) column widths, unresolved. We don't support\n * it now, but if the number of children were to change, we can re-resolve the\n * column width spec starting from this value.\n */\n colWidths!: BreakpointMap;\n\n /**\n * The column width specification, with auto-fit breakpoint values resolved.\n */\n colWidthsSpec: BreakpointColumnSpec | undefined;\n\n /**\n * The number of column units in a row.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private _colUnits = 12;\n\n get colUnits(): number {\n return this._colUnits;\n }\n\n set colUnits(val: number) {\n this.style.setProperty(\"--bs-columns\", `${val}`);\n this._colUnits = val;\n }\n\n /**\n * Fallback item span for breakpoints not provided by the user. For example,\n * if the user gives column widths for the \"lg\" breakpoint, the fallback item\n * span covers column widths below \"lg\", i.e. \"sm\" and \"md\". This value only\n * needs to be set when auto-fit is used for larger screen sizes and no lower\n * breakpoints are set. It also only comes into play when auto-fit adjusts the\n * default number of columns.\n */\n setFallbackItemSpan(val: number): void {\n this.style.setProperty(\"--_item-column-span\", `${val}`);\n }\n\n connectedCallback(): void {\n // This component assumes Bootstrap's CSS grid, so we enforce the class here\n this.classList.add(\"grid\");\n\n // Read and parse the column widths (the user's unresolved input)\n this.colWidths = this._readColWidths();\n // TODO: allow updated attributes to flow through to new column widths spec\n\n // Connected callback is called before children are added to the DOM, so we\n // need to wait for the next tick to apply the column widths.\n setTimeout(() => {\n this._applyColWidthsSpec();\n this.removeAttribute(\"hidden-until-init\");\n });\n }\n\n /**\n * Reads and parses the column widths from the \"col-widths-{break}\" attributes.\n * @returns A map of breakpoint to column width.\n */\n private _readColWidths(): BreakpointMap {\n const attrs = readPrefixedAttributes(this, \"col-widths-\");\n\n if (!attrs.size) {\n return BslibLayoutColumns.defaultColWidths();\n }\n\n const colWidths = new Map();\n const breaks = [\"sm\", \"md\", \"lg\", \"xl\", \"xxl\"];\n\n const asColWidth = (val: string): number[] | null => {\n return [\"null\", \"true\", \"\"].includes(val as string)\n ? null\n : Array.from(val.split(\",\").map(Number));\n };\n\n // Assign known bootstrap breakpoints in order\n breaks.forEach((breakName) => {\n const attrBreak = `col-widths-${breakName}`;\n const valueRaw = attrs.get(attrBreak);\n\n if (typeof valueRaw !== \"undefined\") {\n colWidths.set(breakName, asColWidth(valueRaw));\n attrs.delete(attrBreak);\n }\n });\n // Plus any remaining breakpoints\n attrs.forEach((valueRaw, attrName) => {\n colWidths.set(attrName.replace(\"col-widths-\", \"\"), asColWidth(valueRaw));\n });\n\n return colWidths;\n }\n\n /**\n * Given user-specified column widths, resolve the auto-fit breakpoints and\n * then finalize the column width spec. If any auto-fit breakpoints are\n * requested, this function needs to know the number of children in the\n * layout, so it can determine the best-fit column widths.\n *\n * @returns The resolved column width specification.\n */\n private _resolveColWidthsSpec(): BreakpointColumnSpec {\n const colValuesNA = Array.from(this.colWidths.values()).map(isNA);\n\n const all = (x: boolean[]) => x.every((val: boolean) => val === true);\n const any = (x: boolean[]) => x.some((val: boolean) => val === true);\n\n if (!any(colValuesNA)) {\n return newBreakpointColumnSpec(this.colWidths as BreakpointMapResolved);\n }\n\n const resolved = new Map() as BreakpointMapResolved;\n\n const allAutoFit = all(colValuesNA);\n const units = allAutoFit ? null : 12;\n const nChildren = this.children.length;\n\n for (const [breakName, colWidth] of this.colWidths) {\n if (colWidth === null) {\n const preferWider = [\"sm\", \"md\"].includes(breakName);\n const bestFit = bestFitColumnWidths(nChildren, preferWider, units);\n\n if (allAutoFit) {\n this.colUnits = bestFit.units;\n if (bestFit.units !== 12) {\n // If there are more units than children, the we know the best fit\n // algorithm chose `2 * nChildren` units per row. So our fallback\n // item span is nChildren units, or two items per row.\n this.setFallbackItemSpan(bestFit.units > nChildren ? nChildren : 1);\n }\n }\n\n resolved.set(breakName, bestFit.widths);\n } else {\n resolved.set(breakName, colWidth);\n }\n }\n\n return newBreakpointColumnSpec(resolved);\n }\n\n /**\n * Applies the column width specification to the children of the custom element.\n */\n private _applyColWidthsSpec(): void {\n if (!this.colWidthsSpec) {\n this.colWidthsSpec = this._resolveColWidthsSpec();\n }\n\n if (!this.colWidthsSpec) {\n throw new Error(\"Column widths must be specified.\");\n }\n\n const children = this.children;\n writeGridClasses(this.colWidthsSpec, children, this.colUnits);\n }\n}\n\n/**\n * The best-fit algorithm chooses the number of column units per row and the\n * widths of each column. These values are equivalent to user input.\n */\ntype BestFitColumnWidths = {\n units: number;\n widths: number[];\n};\n\n/**\n * Given the number of children in the layout, choose the best-fit column widths\n * for the layout. If `preferWider` is `true`, we prefer wider columns (fewer\n * items per row, by default at the \"sm\" and \"md\" breakpoints), otherwise we\n * prefer narrower columns (more items per row on larger screens).\n *\n * If all breakpoints are auto-fit, `units` will be `null`, allowing this\n * function to choose the number of column units per row. This lets us get\n * better results for small and irregular `nItems` that aren't possible with the\n * 12-column grid. E.g. for 7 items we can use 14 units per row, with 7 column\n * units per item on small screens and 2 column units per item on large screens.\n * This choice is currently invariant to `nItems`.\n *\n * @param nItems The number of children in the layout.\n * @param preferWider Whether to prefer wider columns (for smaller breakpoints).\n * @param units The number of column units in a row.\n * @returns The best-fit column widths.\n */\nfunction bestFitColumnWidths(\n nItems: number,\n preferWider = false,\n units: number | [null] | null = null\n): BestFitColumnWidths {\n const fit = { units: units, widths: [0] } as BestFitColumnWidths;\n\n if (isNA(fit.units)) {\n // We're auto-fitting at all breakpoints, we can decide column units/row\n fit.units = nItems > 7 ? 12 : nItems > 3 ? nItems * 2 : nItems;\n\n if (nItems < 4) {\n fit.widths = [1];\n return fit;\n }\n\n if (nItems <= 7) {\n fit.widths = [preferWider ? nItems : 2];\n return fit;\n }\n }\n\n // In fixed 12-column mode, we manually pick columns widths for small nItems\n // that look better than the default auto-fit widths.\n if (fit.units === 12) {\n if (nItems <= 3) {\n fit.widths = [[12, 6, 4][nItems - 1]];\n return fit;\n }\n\n // nItems === 4, default auto-fit is fine (6 units wide, 3 units narrow)\n\n if (nItems === 5 || nItems === 7) {\n fit.widths = [preferWider ? 4 : 3];\n return fit;\n }\n\n if (nItems === 6) {\n fit.widths = [preferWider ? 4 : 2];\n return fit;\n }\n }\n\n const fctrs = preferWider ? [6, 4, 3] : [2, 3, 4];\n\n const unitsItems = fctrs.map((x) => x * nItems);\n const rows = unitsItems.map((val) => Math.ceil(val / 12));\n const unitsTotal = rows.map((val) => val * 12);\n const unitsEmpty = unitsTotal.map((val, idx) => val - unitsItems[idx]);\n\n fit.widths = [fctrs[unitsEmpty.indexOf(Math.min(...unitsEmpty))]];\n\n return fit;\n}\n\n/**\n * Given a resolved BreakpointMap (i.e. auto-fit breakpoints have been\n * determined), create a BreakpointColumnSpec.\n *\n * @param breaks The resolved BreakpointMap.\n * @returns The BreakpointColumnSpec.\n */\nfunction newBreakpointColumnSpec(\n breaks: BreakpointMapResolved\n): BreakpointColumnSpec {\n // throw if breaks isn't a breakpoint map\n if (!(breaks instanceof Map)) {\n throw new Error(\"Column widths must be specified as a Map or an object.\");\n }\n\n const spec = new Map() as BreakpointColumnSpec;\n\n for (const [breakName, bk] of breaks) {\n if (bk.some((val) => val === 0)) {\n throw new Error(\n \"Column values must be greater than 0 to indicate width, or negative to indicate a column offset.\"\n );\n }\n\n if (bk.length > 1 && bk.some((val) => isNaN(val))) {\n throw new Error(\n \"Cannot mix widths and missing values. All column widths must be specified, or choose auto widths using a single `null` value.\"\n );\n }\n\n if (bk.every((val) => isNA(val)) || bk.every((val) => val > 0)) {\n spec.set(breakName, {\n width: bk,\n before: Array(bk.length).fill(0),\n after: Array(bk.length).fill(0),\n });\n continue;\n }\n\n if (!bk.some((val) => val > 0)) {\n throw new Error(\n \"Column values must include at least one positive integer width.\"\n );\n }\n\n // At this point we have a mix of actual column widths and offsets. We need\n // to track them as a width, and before and after units for each column in\n // the spec. The actual widths are easy to find, they're the positive\n // values. But offsets could be repeated, e.g. [2, -1, -1, 2] => [2, -2, 2].\n const idxActual = bk\n .map((val, idx) => (val > 0 ? idx : -1))\n .filter((idx) => idx !== -1);\n const idxLastActual = Math.max(...idxActual);\n const lenActual = idxActual.length;\n\n const actual = idxActual.map((idx) => bk[idx]);\n const before = Array(lenActual).fill(0);\n const after = Array(lenActual).fill(0);\n\n // Accumulate the offsets to fit the same length as the actual widths. We\n // prefer allocating offsets to `before` units, except for the last actual\n // column in the spec, which receives the trailing offsets.\n let i = 0;\n let idxBefore = 0;\n while (i < bk.length) {\n if (bk[i] > 0) {\n idxBefore++;\n } else if (i > idxLastActual) {\n // accumulate trailing offsets\n after[after.length - 1] += Math.abs(bk[i]);\n } else {\n // accumulate leading offsets\n before[idxBefore] += Math.abs(bk[i]);\n }\n i++;\n }\n\n spec.set(breakName, {\n width: actual,\n before: before,\n after: after,\n });\n }\n\n return spec;\n}\n\n/**\n * Given a BreakpointColumnSpec, write the appropriate grid classes to the\n * collection of elements.\n * This next function implements a content-layout algorithm, motivated by\n * supporting empty columns.\n *\n * In particular, we need to know two things about\n * the content item:\n *\n * 1. How wide is the content item?\n * 2. What is its starting column position?\n *\n * The following example illustrates a few layout cases (. = empty column):\n *\n * ```\n * Breakpoints: { md = [-1, 4, 5, -4, 3, 9, -3, 2] }\n *\n * | . | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 5 | 5 | . |\n * | . | . | . | 3 | 3 | 3 | | | | | |\n * | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | . | . | . |\n * | 2 | 2 | . | 4 | 4 | 4 | 4 | | | | | ...\n * ```\n *\n * Because we recycle column widths to match the number of kids, we can't\n * guarantee that the pattern repeats by row. To quickly summarize:\n *\n * * Each content item has a width (`widths[idx]`) and empty space before\n * the item: `before[idx]` + `after[idx - 1]` (the space before this item\n * plus the space _after_ the previous item).\n * * We maintain a cursor that knows the 0-indexed column position. At each\n * step we:\n * * Move the cursor forward by the empty space before the item\n * * Decide if we require a starting class (`g-start-{break}-{cursor + 1}`)\n * * Add starting class and content width class (`g-start-{break}-{width}`)\n * for the item\n * * Move the cursor forward by the width of the item.\n *\n * We take into account a few edge cases:\n *\n * * We *don't need* a starting class if the item would naturally reflow to the\n * next row.\n * * We *do need* a starting class if the item would fit into the empty space\n * of the current row, but there isn't enough room for the item _after_\n * accounting for blocked empty space.\n * * If adding empty space causes a new row, but adding the content item\n * would cause _another row break_, we skip the empty row.\n *\n * @see https://getbootstrap.com/docs/5.3/layout/breakpoints/\n *\n * @param breaks The BreakpointColumnSpec.\n * @param elements The children of the custom element.\n * @param unitsRow The number of column units in a row.\n */\nfunction writeGridClasses(\n breaks: BreakpointColumnSpec,\n elements: HTMLCollectionOf,\n unitsRow = 12\n): void {\n // breaks are column breakpoints\n const nKids = elements.length;\n\n function addClassToEl(idx: number, newClass: string) {\n elements[idx].classList.add(newClass);\n }\n\n for (const [breakName, bk] of breaks) {\n if (bk.width.length > nKids) {\n const msg = `Truncating number of widths at '${breakName}' breakpoint to match number of elements.`;\n console.warn(msg, { widths: bk.width.length, elements: nKids });\n }\n\n // Find widths, before, after for each element, recycled from the spec\n const widths = recycleToLength(bk.width, nKids);\n const before = recycleToLength(bk.before, nKids);\n const after = recycleToLength(bk.after, nKids);\n\n let cursor = 0;\n const updateCursor = (incr: number, isEmpty = false) => {\n cursor = Math.abs(cursor);\n let newCursor = cursor + incr;\n if (newCursor == unitsRow) {\n // we've reached the final column, allow for a natural break\n newCursor = 0;\n }\n if (newCursor > unitsRow) {\n // this row is full, empty columns are allowed to break to the next row\n // which we signal with cursor < 0\n newCursor = isEmpty ? -1 * (newCursor % unitsRow) : incr;\n }\n // console.log(`cursor: ${cursor} -> ${newCursor} (+${incr}${isEmpty ? \" (empty)\" : \"\"})`);\n cursor = newCursor;\n };\n\n for (let idx = 0; idx < nKids; idx++) {\n let addStartClass = false;\n const unitsMoveAhead = before[idx] + (idx > 0 ? after[idx - 1] : 0);\n const unitsThisItem = Math.min(widths[idx], unitsRow);\n\n let unitsRowRemaining = unitsRow - cursor;\n\n if (unitsMoveAhead > 0) {\n updateCursor(unitsMoveAhead, true);\n if (cursor < 0) {\n cursor = Math.abs(cursor);\n // adding empty cols caused a row wrap, so we need a start class if\n // 1. we're not at the beginning of the row\n // 2. But: if the current item is wider than the remaining space after\n // accounting for empty columns, reset cursor to start of the row\n // rather than causing an empty row.\n if (widths[idx] > unitsRow - cursor) {\n cursor = 0;\n }\n unitsRowRemaining = 0;\n }\n addStartClass = unitsRowRemaining >= widths[idx] || cursor > 0;\n }\n\n if (cursor > 0 && cursor + widths[idx] > unitsRow) {\n // adding the current item would overflow the row, needs start class\n addStartClass = true;\n cursor = 0;\n }\n\n if (addStartClass) {\n addClassToEl(\n idx,\n breakName === \"xs\"\n ? `g-start-${cursor + 1}`\n : `g-start-${breakName}-${cursor + 1}`\n );\n }\n\n addClassToEl(\n idx,\n breakName === \"xs\"\n ? `g-col-${unitsThisItem}`\n : `g-col-${breakName}-${unitsThisItem}`\n );\n updateCursor(unitsThisItem, false);\n }\n }\n}\n\n/**\n * Read all attributes from an element that start with a given prefix.\n *\n * @param el The element to read attributes from.\n * @param prefix The prefix to match.\n * @returns A map of attribute name to attribute value.\n */\nfunction readPrefixedAttributes(\n el: HTMLElement,\n prefix: string\n): Map {\n const out = new Map();\n const attrNames = el\n .getAttributeNames()\n .filter((name) => name.startsWith(prefix));\n\n for (const attrName of attrNames) {\n out.set(attrName, el.getAttribute(attrName));\n }\n\n return out;\n}\n\n/**\n * Given an array and a length, return a new array of the specified length\n * containing the elements of the original array, recycled as necessary.\n *\n * @param arr The original array.\n * @param len The desired length of the new array.\n * @returns The new array.\n */\nfunction recycleToLength(arr: T[], len: number): T[] {\n const newArr = Array(len).fill(0);\n for (let i = 0; i < len; i++) {\n newArr[i] = arr[i % arr.length];\n }\n return newArr;\n}\n\n/**\n * Check if a value is \"missing\". This exists to smooth over JSON-serialization\n * of `NULL` values in R, especially in cases where we don't want to auto-unbox\n * scalar values.\n *\n * @param x The value to check.\n * @returns `true` if the value is `null` or `[null]`, `false` otherwise.\n */\nfunction isNA(x: any) {\n if (x === null) return true;\n if (Array.isArray(x) && x.length === 1 && x[0] === null) return true;\n return false;\n}\n", "import { LitElement, html, css } from \"lit\";\nimport { property } from \"lit/decorators.js\";\n\n/**\n * A block-level custom element that renders one of its children based on the\n * value of a `case` attribute/property.\n *\n * Example:\n *\n * Things are going very well\n * indeed! Things are going fine Things are going terrible! \n */\nexport class BslibSwitch extends LitElement {\n static tagName = \"bslib-switch\";\n static isShinyInput = false;\n\n static styles = css`\n :host {\n display: block;\n }\n `;\n\n @property({ type: String, reflect: true }) case = \"\";\n\n render(): ReturnType {\n if (!this.case) {\n return html``;\n }\n\n return html``;\n }\n}\n\n/**\n * Like , but `display: inline` instead of `display: block`.\n */\nexport class BslibSwitchInline extends BslibSwitch {\n static tagName = \"bslib-switch-inline\";\n static isShinyInput = false;\n\n static styles = css`\n :host {\n display: inline;\n }\n `;\n}\n", "import { BslibTooltip } from \"./tooltip\";\nimport { BslibPopover } from \"./popover\";\nimport { BslibInputDarkMode } from \"./inputDarkMode\";\nimport { makeInputBinding } from \"./_makeInputBinding\";\nimport { shinyAddCustomMessageHandlers } from \"../_shinyAddCustomMessageHandlers\";\nimport { BslibLayoutColumns } from \"./layoutColumns\";\nimport { BslibSwitch, BslibSwitchInline } from \"./switch\";\n\n[\n BslibTooltip,\n BslibPopover,\n BslibInputDarkMode,\n BslibLayoutColumns,\n BslibSwitch,\n BslibSwitchInline,\n].forEach((cls) => {\n customElements.define(cls.tagName, cls);\n if (window.Shiny) {\n if (cls.isShinyInput) makeInputBinding(cls.tagName);\n if (\"shinyCustomMessageHandlers\" in cls) {\n shinyAddCustomMessageHandlers(cls[\"shinyCustomMessageHandlers\"]);\n }\n }\n});\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAMA,IAAmB,CACvBC,IACAC,OAMmB,aAAjBA,GAAQC,QACRD,GAAQE,cAAAA,EACN,WAAWF,GAAQE,cAEd,iCACFF,KADE,EAELG,SAASC,IAAAA;AACPA,IAAAA,GAAMC,eAAeL,GAAQM,KAAKP,EAAAA;EACnC,EAAA,KAMI,EACLE,MAAM,SACNK,KAAKC,OAAAA,GACLC,WAAW,OACXN,YAAY,CAAE,GAEdO,aAAaT,GAAQM,KAUrBI,cAAAA;AACqC,kBAAA,OAAxBV,GAAQU,gBACjBC,KAAKX,GAAQM,GAAAA,IAAiBN,GAAQU,YAAYE,KAAKD,IAAAA;EAE1D,GACDR,SAASC,IAAA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ACjB,EAFW,YAEJ,eAAe;AAEtB,EAJW,YAIJ,SAASC;AAAA;AAAA;AAAA;AAAA;AAM2B;AAAA,IAA1C,EAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,KAV9B,YAUgC;AActC,MAAM,oBAAN,cAAgC,YAAY;AAAA,EASnD;AARE,EADW,kBACJ,UAAU;AACjB,EAFW,kBAEJ,eAAe;AAEtB,EAJW,kBAIJ,SAASA;AAAA;AAAA;AAAA;AAAA;;;ACjClB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,QAAQ,CAAC,QAAQ;AACjB,mBAAe,OAAO,IAAI,SAAS,GAAG;AACtC,QAAI,OAAO,OAAO;AAChB,UAAI,IAAI;AAAc,yBAAiB,IAAI,OAAO;AAClD,UAAI,gCAAgC,KAAK;AACvC,sCAA8B,IAAI,4BAA4B,CAAC;AAAA,MACjE;AAAA,IACF;AAAA,EACF,CAAC;", + "names": ["standardProperty", "options", "element", "kind", "descriptor", "finisher", "clazz", "createProperty", "key", "Symbol", "placement", "originalKey", "initializer", "this", "call", "legacyProperty", "proto", "name", "constructor", "property", "protoOrDescriptor", "slotAssignedElements", "_a", "window", "HTMLSlotElement", "prototype", "assignedElements", "slot", "opts", "assignedNodes", "filter", "node", "nodeType", "Node", "ELEMENT_NODE", "global", "window", "supportsAdoptingStyleSheets", "ShadowRoot", "ShadyCSS", "nativeShadow", "Document", "prototype", "CSSStyleSheet", "constructionToken", "Symbol", "cssTagCache", "WeakMap", "CSSResult", "constructor", "cssText", "strings", "safeToken", "this", "Error", "_strings", "styleSheet", "_styleSheet", "cacheable", "length", "get", "replaceSync", "set", "toString", "unsafeCSS", "value", "String", "css", "values", "reduce", "acc", "v", "idx", "adoptStyles", "renderRoot", "styles", "adoptedStyleSheets", "map", "s", "forEach", "style", "document", "createElement", "nonce", "setAttribute", "textContent", "appendChild", "getCompatibleStyle", "sheet", "rule", "cssRules", "global", "window", "trustedTypes", "emptyStringForBooleanAttribute", "emptyScript", "polyfillSupport", "reactiveElementPolyfillSupport", "defaultConverter", "toAttribute", "value", "type", "Boolean", "Object", "Array", "JSON", "stringify", "fromAttribute", "fromValue", "Number", "parse", "e", "notEqual", "old", "defaultPropertyDeclaration", "attribute", "String", "converter", "reflect", "hasChanged", "finalized", "ReactiveElement", "HTMLElement", "constructor", "super", "this", "__instanceProperties", "Map", "isUpdatePending", "hasUpdated", "__reflectingProperty", "_initialize", "static", "initializer", "finalize", "_a", "_initializers", "push", "observedAttributes", "attributes", "elementProperties", "forEach", "v", "p", "attr", "__attributeNameForProperty", "__attributeToPropertyMap", "set", "name", "options", "state", "noAccessor", "prototype", "hasOwnProperty", "key", "Symbol", "descriptor", "getPropertyDescriptor", "defineProperty", "get", "oldValue", "requestUpdate", "configurable", "enumerable", "superCtor", "getPrototypeOf", "props", "properties", "propKeys", "getOwnPropertyNames", "getOwnPropertySymbols", "createProperty", "elementStyles", "finalizeStyles", "styles", "isArray", "Set", "flat", "Infinity", "reverse", "s", "unshift", "getCompatibleStyle", "toLowerCase", "__updatePromise", "Promise", "res", "enableUpdating", "_$changedProperties", "__saveInstanceProperties", "i", "addController", "controller", "__controllers", "renderRoot", "isConnected", "_b", "hostConnected", "call", "removeController", "splice", "indexOf", "_v", "createRenderRoot", "shadowRoot", "attachShadow", "shadowRootOptions", "adoptStyles", "connectedCallback", "c", "_requestedUpdate", "disconnectedCallback", "hostDisconnected", "attributeChangedCallback", "_old", "_$attributeToProperty", "__propertyToAttribute", "attrValue", "undefined", "removeAttribute", "setAttribute", "ctor", "propName", "getPropertyOptions", "shouldRequestUpdate", "has", "__reflectingProperties", "__enqueueUpdate", "async", "reject", "result", "scheduleUpdate", "performUpdate", "shouldUpdate", "changedProperties", "willUpdate", "hostUpdate", "update", "__markUpdated", "_$didUpdate", "_changedProperties", "hostUpdated", "firstUpdated", "updated", "updateComplete", "getUpdateComplete", "k", "mode", "_d", "reactiveElementVersions", "global", "window", "trustedTypes", "policy", "createPolicy", "createHTML", "s", "boundAttributeSuffix", "marker", "Math", "random", "String", "slice", "markerMatch", "nodeMarker", "d", "document", "createMarker", "createComment", "isPrimitive", "value", "isArray", "Array", "isIterable", "Symbol", "iterator", "SPACE_CHAR", "textEndRegex", "commentEndRegex", "comment2EndRegex", "tagEndRegex", "RegExp", "singleQuoteAttrEndRegex", "doubleQuoteAttrEndRegex", "rawTextElement", "tag", "type", "strings", "values", "_$litType$", "html", "svg", "noChange", "for", "nothing", "templateCache", "WeakMap", "walker", "createTreeWalker", "trustFromTemplateString", "tsa", "stringFromTSA", "hasOwnProperty", "Error", "getTemplateHtml", "l", "length", "attrNames", "rawTextEndRegex", "regex", "i", "attrName", "match", "attrNameEndIndex", "lastIndex", "exec", "test", "end", "startsWith", "push", "undefined", "Template", "constructor", "options", "node", "this", "parts", "nodeIndex", "attrNameIndex", "partCount", "el", "createElement", "currentNode", "content", "svgElement", "firstChild", "remove", "append", "childNodes", "nextNode", "nodeType", "hasAttributes", "attrsToRemove", "name", "getAttributeNames", "endsWith", "realName", "statics", "getAttribute", "toLowerCase", "split", "m", "index", "ctor", "PropertyPart", "BooleanAttributePart", "EventPart", "AttributePart", "removeAttribute", "tagName", "textContent", "emptyScript", "data", "indexOf", "static", "_options", "innerHTML", "resolveDirective", "part", "parent", "attributeIndex", "currentDirective", "_a", "__directives", "__directive", "nextDirectiveConstructor", "_b", "call", "_$initialize", "_c", "_d", "_$resolve", "TemplateInstance", "template", "_$parts", "_$disconnectableChildren", "_$template", "_$parent", "parentNode", "_$isConnected", "_clone", "fragment", "creationScope", "importNode", "partIndex", "templatePart", "ChildPart", "nextSibling", "ElementPart", "_update", "_$setValue", "startNode", "endNode", "_$committedValue", "_$startNode", "_$endNode", "__isConnected", "isConnected", "directiveParent", "_$clear", "_commitText", "_commitTemplateResult", "_commitNode", "_commitIterable", "_insert", "insertBefore", "createTextNode", "result", "_$getTemplate", "h", "instance", "get", "set", "itemParts", "itemPart", "item", "start", "from", "_$notifyConnectionChanged", "n", "setConnected", "element", "fill", "valueIndex", "noCommit", "change", "v", "_commitValue", "setAttribute", "emptyStringForBooleanAttribute", "super", "newListener", "oldListener", "shouldRemoveListener", "capture", "once", "passive", "shouldAddListener", "removeEventListener", "addEventListener", "handleEvent", "event", "host", "polyfillSupport", "global", "litHtmlPolyfillSupport", "Template", "ChildPart", "_d", "litHtmlVersions", "push", "render", "value", "container", "options", "partOwnerNode", "_a", "renderBefore", "part", "endNode", "_b", "insertBefore", "createMarker", "_$setValue", "LitElement", "ReactiveElement", "constructor", "this", "renderOptions", "host", "__childPart", "createRenderRoot", "renderRoot", "super", "_a", "_b", "renderBefore", "firstChild", "update", "changedProperties", "value", "render", "hasUpdated", "isConnected", "connectedCallback", "setConnected", "disconnectedCallback", "noChange", "globalThis", "litElementHydrateSupport", "call", "polyfillSupport", "litElementPolyfillSupport", "_$changedProperties", "_c", "globalThis", "litElementVersions", "push", "s", "x", "i", "x", "x", "x", "e", "s", "x", "e", "i", "x", "x", "i", "s", "i"] +} diff --git a/site_libs/bslib-component-css-0.6.1.9001/web-components.min.js b/site_libs/bslib-component-css-0.6.1.9001/web-components.min.js new file mode 100644 index 0000000..0499bd2 --- /dev/null +++ b/site_libs/bslib-component-css-0.6.1.9001/web-components.min.js @@ -0,0 +1,325 @@ +/*! bslib 0.6.1.9001 | (c) 2012-2024 RStudio, PBC. | License: MIT + file LICENSE */ +"use strict";(()=>{var He=Object.defineProperty,Ze=Object.defineProperties,et=Object.getOwnPropertyDescriptor,tt=Object.getOwnPropertyDescriptors;var xe=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var Me=(n,t,e)=>t in n?He(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,k=(n,t)=>{for(var e in t||(t={}))it.call(t,e)&&Me(n,e,t[e]);if(xe)for(var e of xe(t))st.call(t,e)&&Me(n,e,t[e]);return n},Q=(n,t)=>Ze(n,tt(t));var y=(n,t,e,i)=>{for(var s=i>1?void 0:i?et(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&He(t,e,s),s};var oe=(n,t,e)=>new Promise((i,s)=>{var r=a=>{try{c(e.next(a))}catch(l){s(l)}},o=a=>{try{c(e.throw(a))}catch(l){s(l)}},c=a=>a.done?i(a.value):Promise.resolve(a.value).then(r,o);c((e=e.apply(n,t)).next())});var nt=(n,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?Q(k({},t),{finisher(e){e.createProperty(t.key,n)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,n)}},rt=(n,t,e)=>{t.constructor.createProperty(e,n)};function g(n){return(t,e)=>e!==void 0?rt(n,t,e):nt(n,t)}var ae,Nt=((ae=window.HTMLSlotElement)===null||ae===void 0?void 0:ae.prototype.assignedElements)!=null?(n,t)=>n.assignedElements(t):(n,t)=>n.assignedNodes(t).filter(e=>e.nodeType===Node.ELEMENT_NODE);var X=window,Y=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,le=Symbol(),Le=new WeakMap,j=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==le)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Y&&t===void 0){let i=e!==void 0&&e.length===1;i&&(t=Le.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Le.set(e,t))}return t}toString(){return this.cssText}},Oe=n=>new j(typeof n=="string"?n:n+"",void 0,le),b=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((i,s,r)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[r+1],n[0]);return new j(e,n,le)},he=(n,t)=>{Y?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let i=document.createElement("style"),s=X.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)})},Z=Y?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return Oe(e)})(n):n;var de,ee=window,Pe=ee.trustedTypes,ot=Pe?Pe.emptyScript:"",Ne=ee.reactiveElementPolyfillSupport,pe={toAttribute(n,t){switch(t){case Boolean:n=n?ot:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch(i){e=null}}return e}},ze=(n,t)=>t!==n&&(t==t||n==n),ce={attribute:!0,type:String,converter:pe,reflect:!1,hasChanged:ze},ue="finalized",E=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((e,i)=>{let s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=ce){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){let r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||ce}static finalize(){if(this.hasOwnProperty(ue))return!1;this[ue]=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let s of i)e.unshift(Z(s))}else t!==void 0&&e.push(Z(t));return e}static _$Ep(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return he(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=ce){var s;let r=this.constructor._$Ep(t,i);if(r!==void 0&&i.reflect===!0){let o=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:pe).toAttribute(e,i.type);this._$El=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var i;let s=this.constructor,r=s._$Ev.get(t);if(r!==void 0&&this._$El!==r){let o=s.getPropertyOptions(r),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:pe;this._$El=r,this[r]=c.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||ze)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}_$Ej(){return oe(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,r)=>this[r]=s),this._$Ei=void 0);let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var r;return(r=s.hostUpdate)===null||r===void 0?void 0:r.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};E[ue]=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},Ne==null||Ne({ReactiveElement:E}),((de=ee.reactiveElementVersions)!==null&&de!==void 0?de:ee.reactiveElementVersions=[]).push("1.6.2");var me,te=window,U=te.trustedTypes,Re=U?U.createPolicy("lit-html",{createHTML:n=>n}):void 0,fe="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,qe="?"+x,at=`<${qe}>`,O=document,F=()=>O.createComment(""),G=n=>n===null||typeof n!="object"&&typeof n!="function",je=Array.isArray,lt=n=>je(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",ve=`[ +\f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ue=/-->/g,Ie=/>/g,H=RegExp(`>|${ve}(?:([^\\s"'>=/]+)(${ve}*=${ve}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Be=/'/g,We=/"/g,Ke=/^(?:script|style|textarea|title)$/i,Fe=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),_=Fe(1),ii=Fe(2),P=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),De=new WeakMap,L=O.createTreeWalker(O,129,null,!1);function Ge(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Re!==void 0?Re.createHTML(t):t}var ht=(n,t)=>{let e=n.length-1,i=[],s,r=t===2?"":"",o=K;for(let c=0;c"?(o=s!=null?s:K,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?H:h[3]==='"'?We:Be):o===We||o===Be?o=H:o===Ue||o===Ie?o=K:(o=H,s=void 0);let u=o===H&&n[c+1].startsWith("/>")?" ":"";r+=o===K?a+at:p>=0?(i.push(l),a.slice(0,p)+fe+a.slice(p)+x+u):a+x+(p===-2?(i.push(void 0),c):u)}return[Ge(n,r+(n[e]||"")+(t===2?"":"")),i]},N=class{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0,c=t.length-1,a=this.parts,[l,h]=ht(t,e);if(this.el=N.createElement(l,i),L.currentNode=this.el.content,e===2){let p=this.el.content,d=p.firstChild;d.remove(),p.append(...d.childNodes)}for(;(s=L.nextNode())!==null&&a.length0){s.textContent=U?U.emptyScript:"";for(let u=0;u2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=m}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){let r=this.strings,o=!1;if(r===void 0)t=I(this,t,e,0),o=!G(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{let c=t,a,l;for(t=r[0],a=0;a{var i,s;let r=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t,o=r._$litPart$;if(o===void 0){let c=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new z(t.insertBefore(F(),c),c,void 0,e!=null?e:{})}return o._$AI(n),o};var $e,Ce;var v=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=J(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return P}};v.finalized=!0,v._$litElement$=!0,($e=globalThis.litElementHydrateSupport)===null||$e===void 0||$e.call(globalThis,{LitElement:v});var Je=globalThis.litElementPolyfillSupport;Je==null||Je({LitElement:v});((Ce=globalThis.litElementVersions)!==null&&Ce!==void 0?Ce:globalThis.litElementVersions=[]).push("3.3.2");var M=class extends v{connectedCallback(){this.maybeCarryFill(),super.connectedCallback()}render(){return _``}maybeCarryFill(){this.isFillCarrier?(this.classList.add("html-fill-container"),this.classList.add("html-fill-item")):(this.classList.remove("html-fill-container"),this.classList.remove("html-fill-item"))}get isFillCarrier(){if(!this.parentElement)return!1;let t=this.parentElement.classList.contains("html-fill-container"),e=Array.from(this.children).some(i=>i.classList.contains("html-fill-item"));return t&&e}};M.isShinyInput=!1,M.styles=b` + :host { + display: contents; + } + `;function ie(n){let t=n.querySelector(":scope > [data-bs-toggle='tooltip']");if(t)return t;let e=n.querySelector(":scope > [data-bs-toggle='popover']");if(e)return e;if(n.children.length>1)return n.children[n.children.length-1];if(n.childNodes.length>1){let i=document.createElement("span");return i.append(n.childNodes[n.childNodes.length-1]),n.appendChild(i),i}return n}function se(n){var c;let{instance:t,trigger:e,content:i,type:s}=n,{tip:r}=t;if(!(r&&r.offsetParent!==null)){t.setContent(i);return}for(let[a,l]of Object.entries(i)){let h=r.querySelector(a);if(!h&&a===".popover-header"){let p=document.createElement("div");p.classList.add("popover-header"),(c=r.querySelector(".popover-body"))==null||c.before(p),h=p}if(!h){console.warn(`Could not find ${a} in ${s} content`);continue}h!==l&&(h instanceof HTMLElement?h.replaceChildren(l):h.innerHTML=l)}t.update(),e.addEventListener(`hidden.bs.${s}`,()=>t.setContent(i),{once:!0})}function W(n,t){let e=document.createElement("div");return e.style.display=t,n instanceof DocumentFragment?e.append(n):e.innerHTML=n,e}var D=class{constructor(){this.resizeObserverEntries=[],this.resizeObserver=new ResizeObserver(t=>{let e=new Event("resize");if(window.dispatchEvent(e),!window.Shiny)return;let i=[];for(let s of t)s.target instanceof HTMLElement&&s.target.querySelector(".shiny-bound-output")&&s.target.querySelectorAll(".shiny-bound-output").forEach(r=>{if(i.includes(r))return;let{binding:o,onResize:c}=$(r).data("shinyOutputBinding");if(!o||!o.resize)return;let a=r.shinyResizeObserver;if(a&&a!==this||(a||(r.shinyResizeObserver=this),c(r),i.push(r),!r.classList.contains("shiny-plot-output")))return;let l=r.querySelector('img:not([width="100%"])');l&&l.setAttribute("width","100%")})})}observe(t){this.resizeObserver.observe(t),this.resizeObserverEntries.push(t)}unobserve(t){let e=this.resizeObserverEntries.indexOf(t);e<0||(this.resizeObserver.unobserve(t),this.resizeObserverEntries.splice(e,1))}flush(){this.resizeObserverEntries.forEach(t=>{document.body.contains(t)||this.unobserve(t)})}};var ct=window.bootstrap?window.bootstrap.Tooltip:class{},ne=class extends M{constructor(){super();this.placement="auto";this.bsOptions="{}";this.visible=!1;this.onChangeCallback=e=>{};this._onShown=this._onShown.bind(this),this._onInsert=this._onInsert.bind(this),this._onHidden=this._onHidden.bind(this)}get options(){let e=JSON.parse(this.bsOptions);return k({title:this.content,placement:this.placement,html:!0,sanitize:!1},e)}get content(){return this.children[0]}get triggerElement(){return ie(this)}get visibleTrigger(){let e=this.triggerElement;return e&&e.offsetParent!==null}connectedCallback(){super.connectedCallback();let e=this.querySelector("template");e&&(this.prepend(W(e.content,"none")),e.remove());let i=this.triggerElement;i.setAttribute("data-bs-toggle","tooltip"),i.setAttribute("tabindex","0"),this.bsTooltip=new ct(i,this.options),i.addEventListener("shown.bs.tooltip",this._onShown),i.addEventListener("hidden.bs.tooltip",this._onHidden),i.addEventListener("inserted.bs.tooltip",this._onInsert),this.visibilityObserver=this._createVisibilityObserver()}disconnectedCallback(){let e=this.triggerElement;e.removeEventListener("shown.bs.tooltip",this._onShown),e.removeEventListener("hidden.bs.tooltip",this._onHidden),e.removeEventListener("inserted.bs.tooltip",this._onInsert),this.visibilityObserver.disconnect(),this.bsTooltip.dispose(),super.disconnectedCallback()}getValue(){return this.visible}_onShown(){this.visible=!0,this.onChangeCallback(!0),this.visibilityObserver.observe(this.triggerElement)}_onHidden(){this.visible=!1,this.onChangeCallback(!0),this._restoreContent(),this.visibilityObserver.unobserve(this.triggerElement),ne.shinyResizeObserver.flush()}_onInsert(){var s;let{tip:e}=this.bsTooltip;if(!e)throw new Error("Failed to find the tooltip's DOM element. Please report this bug.");ne.shinyResizeObserver.observe(e);let i=(s=e.querySelector(".tooltip-inner"))==null?void 0:s.firstChild;i instanceof HTMLElement&&(i.style.display="contents"),this.bsTooltipEl=e}_restoreContent(){var s;let e=this.bsTooltipEl;if(!e)return;let i=(s=e.querySelector(".tooltip-inner"))==null?void 0:s.firstChild;i instanceof HTMLElement&&(i.style.display="none",this.prepend(i)),this.bsTooltipEl=void 0}receiveMessage(e,i){let s=i.method;if(s==="toggle")this._toggle(i.value);else if(s==="update")this._updateTitle(i.title);else throw new Error(`Unknown method ${s}`)}_toggle(e){(e==="toggle"||e===void 0)&&(e=this.visible?"hide":"show"),e==="hide"&&this.bsTooltip.hide(),e==="show"&&this._show()}_show(){!this.visible&&this.visibleTrigger&&this.bsTooltip.show()}_updateTitle(e){e&&(Shiny.renderDependencies(e.deps),se({instance:this.bsTooltip,trigger:this.triggerElement,content:{".tooltip-inner":e.html},type:"tooltip"}))}_createVisibilityObserver(){let e=i=>{this.visible&&i.forEach(s=>{s.isIntersecting||this.bsTooltip.hide()})};return new IntersectionObserver(e)}},C=ne;C.tagName="bslib-tooltip",C.shinyResizeObserver=new D,C.isShinyInput=!0,y([g({type:String})],C.prototype,"placement",2),y([g({type:String})],C.prototype,"bsOptions",2);var pt=window.bootstrap?window.bootstrap.Popover:class{},re=class extends M{constructor(){super();this.placement="auto";this.bsOptions="{}";this.visible=!1;this.onChangeCallback=e=>{};this._onShown=this._onShown.bind(this),this._onInsert=this._onInsert.bind(this),this._onHidden=this._onHidden.bind(this),this._handleTabKey=this._handleTabKey.bind(this),this._handleEscapeKey=this._handleEscapeKey.bind(this),this._closeButton=this._closeButton.bind(this)}get options(){let e=JSON.parse(this.bsOptions);return k({content:this.content,title:we(this.header)?this.header:"",placement:this.placement,html:!0,sanitize:!1,trigger:this.isHyperLink?"focus hover":"click"},e)}get content(){return this.contentContainer.children[0]}get header(){return this.contentContainer.children[1]}get contentContainer(){return this.children[0]}get triggerElement(){return ie(this)}get visibleTrigger(){let e=this.triggerElement;return e&&e.offsetParent!==null}get isButtonLike(){return this.options.trigger==="click"&&this.triggerElement.tagName!=="BUTTON"}get focusablePopover(){return!this.options.trigger.includes("focus")}get isHyperLink(){let e=this.triggerElement;return e.tagName==="A"&&e.hasAttribute("href")&&e.getAttribute("href")!=="#"&&e.getAttribute("href")!==""&&e.getAttribute("href")!=="javascript:void(0)"}connectedCallback(){super.connectedCallback();let e=this.querySelector("template");e&&(this.prepend(W(e.content,"none")),e.remove()),this.content&&J(this._closeButton(this.header),this.content);let i=this.triggerElement;i.setAttribute("data-bs-toggle","popover"),this.isButtonLike&&(i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.setAttribute("aria-pressed","false"),this.triggerElement.tagName!=="A"&&(i.onkeydown=s=>{(s.key==="Enter"||s.key===" ")&&this._toggle()}),i.style.cursor="pointer"),this.bsPopover=new pt(i,this.options),i.addEventListener("shown.bs.popover",this._onShown),i.addEventListener("hidden.bs.popover",this._onHidden),i.addEventListener("inserted.bs.popover",this._onInsert),this.visibilityObserver=this._createVisibilityObserver()}disconnectedCallback(){let e=this.triggerElement;e.removeEventListener("shown.bs.popover",this._onShown),e.removeEventListener("hidden.bs.popover",this._onHidden),e.removeEventListener("inserted.bs.popover",this._onInsert),this.visibilityObserver.disconnect(),this.bsPopover.dispose(),super.disconnectedCallback()}getValue(){return this.visible}_onShown(){this.visible=!0,this.onChangeCallback(!0),this.visibilityObserver.observe(this.triggerElement),this.focusablePopover&&(document.addEventListener("keydown",this._handleTabKey),document.addEventListener("keydown",this._handleEscapeKey)),this.isButtonLike&&this.triggerElement.setAttribute("aria-pressed","true")}_onHidden(){this.visible=!1,this.onChangeCallback(!0),this._restoreContent(),this.visibilityObserver.unobserve(this.triggerElement),re.shinyResizeObserver.flush(),this.focusablePopover&&(document.removeEventListener("keydown",this._handleTabKey),document.removeEventListener("keydown",this._handleEscapeKey)),this.isButtonLike&&this.triggerElement.setAttribute("aria-pressed","false")}_onInsert(){let{tip:e}=this.bsPopover;if(!e)throw new Error("Failed to find the popover's DOM element. Please report this bug.");re.shinyResizeObserver.observe(e),this.focusablePopover&&e.setAttribute("tabindex","0"),this.bsPopoverEl=e}_handleTabKey(e){if(e.key!=="Tab")return;let{tip:i}=this.bsPopover;if(!i)return;let s=()=>{e.preventDefault(),e.stopImmediatePropagation()},r=document.activeElement;r===this.triggerElement&&!e.shiftKey&&(s(),i.focus()),r===i&&e.shiftKey&&(s(),this.triggerElement.focus())}_handleEscapeKey(e){if(e.key!=="Escape")return;let{tip:i}=this.bsPopover;if(!i)return;let s=document.activeElement;(s===this.triggerElement||i.contains(s))&&(e.preventDefault(),e.stopImmediatePropagation(),this._hide(),this.triggerElement.focus())}_restoreContent(){let e=this.bsPopoverEl;if(!e)return;this.contentContainer.innerHTML="";let i=e.querySelector(".popover-body");i&&this.contentContainer.append(i==null?void 0:i.firstChild);let s=e.querySelector(".popover-header");s&&this.contentContainer.append(s==null?void 0:s.firstChild),this.bsPopoverEl=void 0}receiveMessage(e,i){let s=i.method;if(s==="toggle")this._toggle(i.value);else if(s==="update")this._updatePopover(i);else throw new Error(`Unknown method ${s}`)}_toggle(e){(e==="toggle"||e===void 0)&&(e=this.visible?"hide":"show"),e==="hide"&&this._hide(),e==="show"&&this._show()}_hide(){this.bsPopover.hide()}_show(){!this.visible&&this.visibleTrigger&&this.bsPopover.show()}_updatePopover(e){var d,u;let{content:i,header:s}=e,r=[];i&&r.push(...i.deps),s&&r.push(...s.deps),Shiny.renderDependencies(r);let{tip:o}=this.bsPopover,c=this.visible?(d=o==null?void 0:o.querySelector(".popover-header"))==null?void 0:d.children[0]:this.header,a=this.visible?(u=o==null?void 0:o.querySelector(".popover-body"))==null?void 0:u.children[0]:this.content,l=s?W(s.html,"contents"):c,h=i?W(i.html,"contents"):a;i&&J(this._closeButton(l),h);let p=we(l)?l:"";se({instance:this.bsPopover,trigger:this.triggerElement,content:{".popover-header":p,".popover-body":h},type:"popover"})}_closeButton(e){if(!this.focusablePopover)return m;let i=()=>{this._hide(),this.focusablePopover&&this.triggerElement.focus()},s=we(e)?"0.6rem":"0.25rem";return _``}_createVisibilityObserver(){let e=i=>{this.visible&&i.forEach(s=>{s.isIntersecting||this._hide()})};return new IntersectionObserver(e)}},w=re;w.tagName="bslib-popover",w.shinyResizeObserver=new D,w.isShinyInput=!0,y([g({type:String})],w.prototype,"placement",2),y([g({type:String})],w.prototype,"bsOptions",2);function we(n){return!!n&&n.childNodes.length>0}var A=class extends v{constructor(){super(...arguments);this.attribute="data-shinytheme";this.onChangeCallback=e=>{}}connectedCallback(){super.connectedCallback(),this.attribute=this.getAttribute("attribute")||this.attribute,typeof this.mode=="undefined"&&(this.mode=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),this.reflectPreference(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:e})=>{this.mode=e?"dark":"light",this.reflectPreference()}),this._observeDocumentThemeAttribute()}disconnectedCallback(){this.observer.disconnect(),super.disconnectedCallback()}_observeDocumentThemeAttribute(){this.observer=new MutationObserver(i=>{i.forEach(s=>{if(s.target!==document.documentElement||s.attributeName!==this.attribute)return;let r=document.documentElement.getAttribute(this.attribute);!r||r===this.mode||(this.mode=r)})});let e={attributes:!0,childList:!1,subtree:!1};this.observer.observe(document.documentElement,e)}getValue(){return this.mode}render(){let e=this.mode==="light"?"dark":"light",i=`Switch from ${this.mode} to ${e} mode`;return _` + + `}onClick(e){e.stopPropagation(),this.mode=this.mode==="light"?"dark":"light"}updated(e){e.has("mode")&&(this.reflectPreference(),this.onChangeCallback(!0))}reflectPreference(){document.documentElement.setAttribute(this.attribute,this.mode),window.dispatchEvent(new Event("resize"))}};A.isShinyInput=!0,A.tagName="bslib-input-dark-mode",A.shinyCustomMessageHandlers={"bslib.toggle-dark-mode":({method:e,value:i})=>{e==="toggle"&&((typeof i=="undefined"||i===null)&&(i=(document.documentElement.dataset.bsTheme||"light")==="light"?"dark":"light"),document.documentElement.dataset.bsTheme=i)}},A.styles=[b` + :host { + /* open-props.style via shinycomponent */ + --text-1: var(--text-1-light, var(--gray-8, #343a40)); + --text-2: var(--text-2-light, var(--gray-7, #495057)); + --size-xxs: var(--size-1, 0.25rem); + --ease-in-out-1: cubic-bezier(0.1, 0, 0.9, 1); + --ease-in-out-2: cubic-bezier(0.3, 0, 0.7, 1); + --ease-out-1: cubic-bezier(0, 0, 0.75, 1); + --ease-out-3: cubic-bezier(0, 0, 0.3, 1); + --ease-out-4: cubic-bezier(0, 0, 0.1, 1); + + /* shinycomponent */ + --speed-fast: 0.15s; + --speed-normal: 0.3s; + + /* Size of the icon, uses em units so it scales to font-size */ + --size: 1.3em; + + /* Because we are (most likely) bigger than one em we will need to move + the button up or down to keep it looking right inline */ + --vertical-correction: calc((var(--size) - 1em) / 2); + } + `,b` + .sun-and-moon > :is(.moon, .sun, .sun-beams) { + transform-origin: center center; + } + + .sun-and-moon > .sun { + fill: none; + stroke: var(--text-1); + stroke-width: var(--stroke-w); + } + + button:is(:hover, :focus-visible) + > :is(.sun-and-moon > :is(.moon, .sun)) { + fill: var(--text-2); + } + + .sun-and-moon > .sun-beams { + stroke: var(--text-1); + stroke-width: var(--stroke-w); + } + + button:is(:hover, :focus-visible) :is(.sun-and-moon > .sun-beams) { + background-color: var(--text-2); + } + + [data-theme="dark"] .sun-and-moon > .sun { + fill: var(--text-1); + stroke: none; + stroke-width: 0; + transform: scale(1.6); + } + + [data-theme="dark"] .sun-and-moon > .sun-beams { + opacity: 0; + } + + [data-theme="dark"] .sun-and-moon > .moon > circle { + transform: translateX(-10px); + } + + @supports (cx: 1) { + [data-theme="dark"] .sun-and-moon > .moon > circle { + transform: translateX(0); + cx: 15; + } + } + `,b` + .sun-and-moon > .sun { + transition: transform var(--speed-fast) var(--ease-in-out-2) + var(--speed-fast), + fill var(--speed-fast) var(--ease-in-out-2) var(--speed-fast), + stroke-width var(--speed-normal) var(--ease-in-out-2); + } + + .sun-and-moon > .sun-beams { + transition: transform var(--speed-fast) var(--ease-out-3), + opacity var(--speed-fast) var(--ease-out-4); + transition-delay: var(--speed-normal); + } + + .sun-and-moon .moon > circle { + transition: transform var(--speed-fast) var(--ease-in-out-2), + fill var(--speed-fast) var(--ease-in-out-2); + transition-delay: 0s; + } + + @supports (cx: 1) { + .sun-and-moon .moon > circle { + transition: cx var(--speed-normal) var(--ease-in-out-2); + } + + [data-theme="dark"] .sun-and-moon .moon > circle { + transition: cx var(--speed-fast) var(--ease-in-out-2); + transition-delay: var(--speed-fast); + } + } + + [data-theme="dark"] .sun-and-moon > .sun { + transition-delay: 0s; + transition-duration: var(--speed-normal); + transition-timing-function: var(--ease-in-out-2); + } + + [data-theme="dark"] .sun-and-moon > .sun-beams { + transform: scale(0.3); + transition: transform var(--speed-normal) var(--ease-in-out-2), + opacity var(--speed-fast) var(--ease-out-1); + transition-delay: 0s; + } + `,b` + :host { + display: inline-block; + + /* We control the stroke size manually here. We don't want it getting so + small its not visible but also not so big it looks cartoonish */ + --stroke-w: clamp(1px, 0.1em, 6px); + } + + button { + /* This is needed to let the svg use the em sizes */ + font-size: inherit; + + /* Make sure the button is fully centered */ + display: grid; + place-content: center; + + /* A little bit of padding to make it easier to press */ + padding: var(--size-xxs); + background: none; + border: none; + aspect-ratio: 1; + border-radius: 50%; + cursor: pointer; + touch-action: manipulation; + -webkit-tap-highlight-color: transparent; + outline-offset: var(--size-xxs); + + /* Move down to adjust for being larger than 1em */ + transform: translateY(var(--vertical-correction)); + margin-block-end: var(--vertical-correction); + } + + /* + button:is(:hover, :focus-visible) { + background: var(--surface-4); + } + */ + + button > svg { + height: var(--size); + width: var(--size); + stroke-linecap: round; + overflow: visible; + } + + svg line, + svg circle { + vector-effect: non-scaling-stroke; + } + `],y([g({type:String,reflect:!0})],A.prototype,"mode",2);function Qe(n,{type:t=null}={}){if(!window.Shiny)return;class e extends Shiny.InputBinding{constructor(){super()}find(s){return $(s).find(n)}getValue(s){return"getValue"in s?s.getValue():s.value}getType(s){return t}subscribe(s,r){s.onChangeCallback=r}unsubscribe(s){s.onChangeCallback=r=>{}}receiveMessage(s,r){s.receiveMessage(s,r)}}Shiny.inputBindings.register(new e,`${n}-Binding`)}function Xe(n){if(window.Shiny)for(let[t,e]of Object.entries(n))Shiny.addCustomMessageHandler(t,e)}var Te=class extends HTMLElement{constructor(){super(...arguments);this._colUnits=12}static defaultColWidths(){return new Map(Object.entries({sm:null,lg:null}))}get colUnits(){return this._colUnits}set colUnits(e){this.style.setProperty("--bs-columns",`${e}`),this._colUnits=e}setFallbackItemSpan(e){this.style.setProperty("--_item-column-span",`${e}`)}connectedCallback(){this.classList.add("grid"),this.colWidths=this._readColWidths(),setTimeout(()=>{this._applyColWidthsSpec(),this.removeAttribute("hidden-until-init")})}_readColWidths(){let e=vt(this,"col-widths-");if(!e.size)return Te.defaultColWidths();let i=new Map,s=["sm","md","lg","xl","xxl"],r=o=>["null","true",""].includes(o)?null:Array.from(o.split(",").map(Number));return s.forEach(o=>{let c=`col-widths-${o}`,a=e.get(c);typeof a!="undefined"&&(i.set(o,r(a)),e.delete(c))}),e.forEach((o,c)=>{i.set(c.replace("col-widths-",""),r(o))}),i}_resolveColWidthsSpec(){let e=Array.from(this.colWidths.values()).map(Se),i=l=>l.every(h=>h===!0);if(!(l=>l.some(h=>h===!0))(e))return Ye(this.colWidths);let r=new Map,o=i(e),c=o?null:12,a=this.children.length;for(let[l,h]of this.colWidths)if(h===null){let p=["sm","md"].includes(l),d=ut(a,p,c);o&&(this.colUnits=d.units,d.units!==12&&this.setFallbackItemSpan(d.units>a?a:1)),r.set(l,d.widths)}else r.set(l,h);return Ye(r)}_applyColWidthsSpec(){if(this.colWidthsSpec||(this.colWidthsSpec=this._resolveColWidthsSpec()),!this.colWidthsSpec)throw new Error("Column widths must be specified.");let e=this.children;mt(this.colWidthsSpec,e,this.colUnits)}},V=Te;V.tagName="bslib-layout-columns",V.isShinyInput=!1;function ut(n,t=!1,e=null){let i={units:e,widths:[0]};if(Se(i.units)){if(i.units=n>7?12:n>3?n*2:n,n<4)return i.widths=[1],i;if(n<=7)return i.widths=[t?n:2],i}if(i.units===12){if(n<=3)return i.widths=[[12,6,4][n-1]],i;if(n===5||n===7)return i.widths=[t?4:3],i;if(n===6)return i.widths=[t?4:2],i}let s=t?[6,4,3]:[2,3,4],r=s.map(l=>l*n),a=r.map(l=>Math.ceil(l/12)).map(l=>l*12).map((l,h)=>l-r[h]);return i.widths=[s[a.indexOf(Math.min(...a))]],i}function Ye(n){if(!(n instanceof Map))throw new Error("Column widths must be specified as a Map or an object.");let t=new Map;for(let[e,i]of n){if(i.some(d=>d===0))throw new Error("Column values must be greater than 0 to indicate width, or negative to indicate a column offset.");if(i.length>1&&i.some(d=>isNaN(d)))throw new Error("Cannot mix widths and missing values. All column widths must be specified, or choose auto widths using a single `null` value.");if(i.every(d=>Se(d))||i.every(d=>d>0)){t.set(e,{width:i,before:Array(i.length).fill(0),after:Array(i.length).fill(0)});continue}if(!i.some(d=>d>0))throw new Error("Column values must include at least one positive integer width.");let s=i.map((d,u)=>d>0?u:-1).filter(d=>d!==-1),r=Math.max(...s),o=s.length,c=s.map(d=>i[d]),a=Array(o).fill(0),l=Array(o).fill(0),h=0,p=0;for(;h0?p++:h>r?l[l.length-1]+=Math.abs(i[h]):a[p]+=Math.abs(i[h]),h++;t.set(e,{width:c,before:a,after:l})}return t}function mt(n,t,e=12){let i=t.length;function s(r,o){t[r].classList.add(o)}for(let[r,o]of n){if(o.width.length>i){let d=`Truncating number of widths at '${r}' breakpoint to match number of elements.`;console.warn(d,{widths:o.width.length,elements:i})}let c=Ae(o.width,i),a=Ae(o.before,i),l=Ae(o.after,i),h=0,p=(d,u=!1)=>{h=Math.abs(h);let f=h+d;f==e&&(f=0),f>e&&(f=u?-1*(f%e):d),h=f};for(let d=0;d0?l[d-1]:0),T=Math.min(c[d],e),ke=e-h;f>0&&(p(f,!0),h<0&&(h=Math.abs(h),c[d]>e-h&&(h=0),ke=0),u=ke>=c[d]||h>0),h>0&&h+c[d]>e&&(u=!0,h=0),u&&s(d,r==="xs"?`g-start-${h+1}`:`g-start-${r}-${h+1}`),s(d,r==="xs"?`g-col-${T}`:`g-col-${r}-${T}`),p(T,!1)}}}function vt(n,t){let e=new Map,i=n.getAttributeNames().filter(s=>s.startsWith(t));for(let s of i)e.set(s,n.getAttribute(s));return e}function Ae(n,t){let e=Array(t).fill(0);for(let i=0;i`:_``}};S.tagName="bslib-switch",S.isShinyInput=!1,S.styles=b` + :host { + display: block; + } + `,y([g({type:String,reflect:!0})],S.prototype,"case",2);var R=class extends S{};R.tagName="bslib-switch-inline",R.isShinyInput=!1,R.styles=b` + :host { + display: inline; + } + `;[C,w,A,V,S,R].forEach(n=>{customElements.define(n.tagName,n),window.Shiny&&(n.isShinyInput&&Qe(n.tagName),"shinyCustomMessageHandlers"in n&&Xe(n.shinyCustomMessageHandlers))});})(); +/*! Bundled license information: + +@lit/reactive-element/decorators/custom-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/property.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/state.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/base.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/event-options.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-all.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-async.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-assigned-elements.js: + (** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-assigned-nodes.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/css-tag.js: + (** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/reactive-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/lit-html.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-element/lit-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/is-server.js: + (** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) +*/ +//# sourceMappingURL=web-components.min.js.map diff --git a/site_libs/bslib-component-css-0.6.1.9001/web-components.min.js.map b/site_libs/bslib-component-css-0.6.1.9001/web-components.min.js.map new file mode 100644 index 0000000..01d8bf3 --- /dev/null +++ b/site_libs/bslib-component-css-0.6.1.9001/web-components.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../node_modules/@lit/reactive-element/src/decorators/property.ts", "../../../node_modules/@lit/reactive-element/src/decorators/query-assigned-elements.ts", "../../../node_modules/@lit/reactive-element/src/css-tag.ts", "../../../node_modules/@lit/reactive-element/src/reactive-element.ts", "../../../node_modules/lit-html/src/lit-html.ts", "../../../node_modules/lit-element/src/lit-element.ts", "../../../srcts/src/components/webcomponents/_bslibElement.ts", "../../../srcts/src/components/_utilsTooltip.ts", "../../../srcts/src/components/_shinyResizeObserver.ts", "../../../srcts/src/components/webcomponents/tooltip.ts", "../../../srcts/src/components/webcomponents/popover.ts", "../../../srcts/src/components/webcomponents/inputDarkMode.ts", "../../../srcts/src/components/webcomponents/_makeInputBinding.ts", "../../../srcts/src/components/_shinyAddCustomMessageHandlers.ts", "../../../srcts/src/components/webcomponents/layoutColumns.ts", "../../../srcts/src/components/webcomponents/switch.ts", "../../../srcts/src/components/webcomponents/index.ts"], + "sourcesContent": ["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport {PropertyDeclaration, ReactiveElement} from '../reactive-element.js';\nimport {ClassElement} from './base.js';\n\nconst standardProperty = (\n options: PropertyDeclaration,\n element: ClassElement\n) => {\n // When decorating an accessor, pass it through and add property metadata.\n // Note, the `hasOwnProperty` check in `createProperty` ensures we don't\n // stomp over the user's accessor.\n if (\n element.kind === 'method' &&\n element.descriptor &&\n !('value' in element.descriptor)\n ) {\n return {\n ...element,\n finisher(clazz: typeof ReactiveElement) {\n clazz.createProperty(element.key, options);\n },\n };\n } else {\n // createProperty() takes care of defining the property, but we still\n // must return some kind of descriptor, so return a descriptor for an\n // unused prototype field. The finisher calls createProperty().\n return {\n kind: 'field',\n key: Symbol(),\n placement: 'own',\n descriptor: {},\n // store the original key so subsequent decorators have access to it.\n originalKey: element.key,\n // When @babel/plugin-proposal-decorators implements initializers,\n // do this instead of the initializer below. See:\n // https://github.com/babel/babel/issues/9260 extras: [\n // {\n // kind: 'initializer',\n // placement: 'own',\n // initializer: descriptor.initializer,\n // }\n // ],\n initializer(this: {[key: string]: unknown}) {\n if (typeof element.initializer === 'function') {\n this[element.key as string] = element.initializer.call(this);\n }\n },\n finisher(clazz: typeof ReactiveElement) {\n clazz.createProperty(element.key, options);\n },\n };\n }\n};\n\nconst legacyProperty = (\n options: PropertyDeclaration,\n proto: Object,\n name: PropertyKey\n) => {\n (proto.constructor as typeof ReactiveElement).createProperty(name, options);\n};\n\n/**\n * A property decorator which creates a reactive property that reflects a\n * corresponding attribute value. When a decorated property is set\n * the element will update and render. A {@linkcode PropertyDeclaration} may\n * optionally be supplied to configure property features.\n *\n * This decorator should only be used for public fields. As public fields,\n * properties should be considered as primarily settable by element users,\n * either via attribute or the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the {@linkcode state} decorator.\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating public\n * properties should typically not be done for non-primitive (object or array)\n * properties. In other cases when an element needs to manage state, a private\n * property decorated via the {@linkcode state} decorator should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n *\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options?: PropertyDeclaration) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (protoOrDescriptor: Object | ClassElement, name?: PropertyKey): any =>\n name !== undefined\n ? legacyProperty(options!, protoOrDescriptor as Object, name)\n : standardProperty(options!, protoOrDescriptor as ClassElement);\n}\n", "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {decorateProperty} from './base.js';\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\n\nconst NODE_MODE = false;\nconst global = NODE_MODE ? globalThis : window;\n\n/**\n * A tiny module scoped polyfill for HTMLSlotElement.assignedElements.\n */\nconst slotAssignedElements =\n global.HTMLSlotElement?.prototype.assignedElements != null\n ? (slot: HTMLSlotElement, opts?: AssignedNodesOptions) =>\n slot.assignedElements(opts)\n : (slot: HTMLSlotElement, opts?: AssignedNodesOptions) =>\n slot\n .assignedNodes(opts)\n .filter(\n (node): node is Element => node.nodeType === Node.ELEMENT_NODE\n );\n\n/**\n * Options for the {@linkcode queryAssignedElements} decorator. Extends the\n * options that can be passed into\n * [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n */\nexport interface QueryAssignedElementsOptions\n extends QueryAssignedNodesOptions {\n /**\n * CSS selector used to filter the elements returned. For example, a selector\n * of `\".item\"` will only include elements with the `item` class.\n */\n selector?: string;\n}\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedElements({ slot: 'list' })\n * listItems!: Array;\n * @queryAssignedElements()\n * unnamedSlotEls!: Array;\n *\n * render() {\n * return html`\n * \n * \n * `;\n * }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(options?: QueryAssignedElementsOptions) {\n const {slot, selector} = options ?? {};\n return decorateProperty({\n descriptor: (_name: PropertyKey) => ({\n get(this: ReactiveElement) {\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n const slotEl =\n this.renderRoot?.querySelector(slotSelector);\n const elements =\n slotEl != null ? slotAssignedElements(slotEl, options) : [];\n if (selector) {\n return elements.filter((node) => node.matches(selector));\n }\n return elements;\n },\n enumerable: true,\n configurable: true,\n }),\n });\n}\n", "/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nconst NODE_MODE = false;\nconst global = NODE_MODE ? globalThis : window;\n\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets: boolean =\n global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n/**\n * A CSSResult or native CSSStyleSheet.\n *\n * In browsers that support constructible CSS style sheets, CSSStyleSheet\n * object can be used for styling along side CSSResult from the `css`\n * template tag.\n */\nexport type CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nexport type CSSResultArray = Array;\n\n/**\n * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.\n */\nexport type CSSResultGroup = CSSResultOrNative | CSSResultArray;\n\nconst constructionToken = Symbol();\n\nconst cssTagCache = new WeakMap();\n\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n // This property needs to remain unminified.\n ['_$cssResult$'] = true;\n readonly cssText: string;\n private _styleSheet?: CSSStyleSheet;\n private _strings: TemplateStringsArray | undefined;\n\n private constructor(\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ) {\n if (safeToken !== constructionToken) {\n throw new Error(\n 'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'\n );\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet(): CSSStyleSheet | undefined {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(\n this.cssText\n );\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n\n toString(): string {\n return this.cssText;\n }\n}\n\ntype ConstructableCSSResult = CSSResult & {\n new (\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ): CSSResult;\n};\n\nconst textFromCSSResult = (value: CSSResultGroup | number) => {\n // This property needs to remain unminified.\n if ((value as CSSResult)['_$cssResult$'] === true) {\n return (value as CSSResult).cssText;\n } else if (typeof value === 'number') {\n return value;\n } else {\n throw new Error(\n `Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`\n );\n }\n};\n\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value: unknown) =>\n new (CSSResult as ConstructableCSSResult)(\n typeof value === 'string' ? value : String(value),\n undefined,\n constructionToken\n );\n\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (\n strings: TemplateStringsArray,\n ...values: (CSSResultGroup | number)[]\n): CSSResult => {\n const cssText =\n strings.length === 1\n ? strings[0]\n : values.reduce(\n (acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1],\n strings[0]\n );\n return new (CSSResult as ConstructableCSSResult)(\n cssText,\n strings,\n constructionToken\n );\n};\n\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (\n renderRoot: ShadowRoot,\n styles: Array\n) => {\n if (supportsAdoptingStyleSheets) {\n (renderRoot as ShadowRoot).adoptedStyleSheets = styles.map((s) =>\n s instanceof CSSStyleSheet ? s : s.styleSheet!\n );\n } else {\n styles.forEach((s) => {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = (global as any)['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = (s as CSSResult).cssText;\n renderRoot.appendChild(style);\n });\n }\n};\n\nconst cssResultFromStyleSheet = (sheet: CSSStyleSheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\n\nexport const getCompatibleStyle =\n supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s: CSSResultOrNative) => s\n : (s: CSSResultOrNative) =>\n s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\n\nimport {\n getCompatibleStyle,\n adoptStyles,\n CSSResultGroup,\n CSSResultOrNative,\n} from './css-tag.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\n\nexport * from './css-tag.js';\nexport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\nconst NODE_MODE = false;\nconst global = NODE_MODE ? globalThis : window;\n\nif (NODE_MODE) {\n global.customElements ??= customElements;\n}\n\nconst DEV_MODE = true;\n\nlet requestUpdateThenable: (name: string) => {\n then: (\n onfulfilled?: (value: boolean) => void,\n _onrejected?: () => void\n ) => void;\n};\n\nlet issueWarning: (code: string, warning: string) => void;\n\nconst trustedTypes = (global as unknown as {trustedTypes?: {emptyScript: ''}})\n .trustedTypes;\n\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? (trustedTypes.emptyScript as unknown as '')\n : '';\n\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set = (global.litIssuedWarnings ??=\n new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n\n // Issue polyfill support warning.\n if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n issueWarning(\n 'polyfill-support-missing',\n `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`\n );\n }\n\n requestUpdateThenable = (name) => ({\n then: (\n onfulfilled?: (value: boolean) => void,\n _onrejected?: () => void\n ) => {\n issueWarning(\n 'request-update-promise',\n `The \\`requestUpdate\\` method should no longer return a Promise but ` +\n `does so on \\`${name}\\`. Use \\`updateComplete\\` instead.`\n );\n if (onfulfilled !== undefined) {\n onfulfilled(false);\n }\n },\n });\n}\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ReactiveUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry = Update;\n export interface Update {\n kind: 'update';\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: ReactiveUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty =

(\n prop: P,\n _obj: unknown\n): P => prop;\n\n/**\n * Converts property values to and from attribute values.\n */\nexport interface ComplexAttributeConverter {\n /**\n * Called to convert an attribute value to a property\n * value.\n */\n fromAttribute?(value: string | null, type?: TypeHint): Type;\n\n /**\n * Called to convert a property value to an attribute\n * value.\n *\n * It returns unknown instead of string, to be compatible with\n * https://github.com/WICG/trusted-types (and similar efforts).\n */\n toAttribute?(value: Type, type?: TypeHint): unknown;\n}\n\ntype AttributeConverter =\n | ComplexAttributeConverter\n | ((value: string | null, type?: TypeHint) => Type);\n\n/**\n * Defines options for a property accessor.\n */\nexport interface PropertyDeclaration {\n /**\n * When set to `true`, indicates the property is internal private state. The\n * property should not be set by users. When using TypeScript, this property\n * should be marked as `private` or `protected`, and it is also a common\n * practice to use a leading `_` in the name. The property is not added to\n * `observedAttributes`.\n */\n readonly state?: boolean;\n\n /**\n * Indicates how and whether the property becomes an observed attribute.\n * If the value is `false`, the property is not added to `observedAttributes`.\n * If true or absent, the lowercased property name is observed (e.g. `fooBar`\n * becomes `foobar`). If a string, the string value is observed (e.g\n * `attribute: 'foo-bar'`).\n */\n readonly attribute?: boolean | string;\n\n /**\n * Indicates the type of the property. This is used only as a hint for the\n * `converter` to determine how to convert the attribute\n * to/from a property.\n */\n readonly type?: TypeHint;\n\n /**\n * Indicates how to convert the attribute to/from a property. If this value\n * is a function, it is used to convert the attribute value a the property\n * value. If it's an object, it can have keys for `fromAttribute` and\n * `toAttribute`. If no `toAttribute` function is provided and\n * `reflect` is set to `true`, the property value is set directly to the\n * attribute. A default `converter` is used if none is provided; it supports\n * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,\n * when a property changes and the converter is used to update the attribute,\n * the property is never updated again as a result of the attribute changing,\n * and vice versa.\n */\n readonly converter?: AttributeConverter;\n\n /**\n * Indicates if the property should reflect to an attribute.\n * If `true`, when the property is set, the attribute is set using the\n * attribute name determined according to the rules for the `attribute`\n * property option and the value of the property converted using the rules\n * from the `converter` property option.\n */\n readonly reflect?: boolean;\n\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n\n /**\n * Indicates whether an accessor will be created for this property. By\n * default, an accessor will be generated for this property that requests an\n * update when set. If this flag is `true`, no accessor will be created, and\n * it will be the user's responsibility to call\n * `this.requestUpdate(propertyName, oldValue)` to request an update when\n * the property changes.\n */\n readonly noAccessor?: boolean;\n}\n\n/**\n * Map of properties to PropertyDeclaration options. For each property an\n * accessor is made, and the property is processed according to the\n * PropertyDeclaration options.\n */\nexport interface PropertyDeclarations {\n readonly [key: string]: PropertyDeclaration;\n}\n\ntype PropertyDeclarationMap = Map;\n\ntype AttributeMap = Map;\n\n/**\n * A Map of property keys to values.\n *\n * Takes an optional type parameter T, which when specified as a non-any,\n * non-unknown type, will make the Map more strongly-typed, associating the map\n * keys with their corresponding value type on T.\n *\n * Use `PropertyValues` when overriding ReactiveElement.update() and\n * other lifecycle methods in order to get stronger type-checking on keys\n * and values.\n */\n// This type is conditional so that if the parameter T is not specified, or\n// is `any`, the type will include `Map`. Since T is not\n// given in the uses of PropertyValues in this file, all uses here fallback to\n// meaning `Map`, but if a developer uses\n// `PropertyValues` (or any other value for T) they will get a\n// strongly-typed Map type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PropertyValues = T extends object\n ? PropertyValueMap\n : Map;\n\n/**\n * Do not use, instead prefer {@linkcode PropertyValues}.\n */\n// This type must be exported such that JavaScript generated by the Google\n// Closure Compiler can import a type reference.\nexport interface PropertyValueMap extends Map {\n get(k: K): T[K];\n set(key: K, value: T[K]): this;\n has(k: K): boolean;\n delete(k: K): boolean;\n}\n\nexport const defaultConverter: ComplexAttributeConverter = {\n toAttribute(value: unknown, type?: unknown): unknown {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n\n fromAttribute(value: string | null, type?: unknown) {\n let fromValue: unknown = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value!) as unknown;\n } catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n\nexport interface HasChanged {\n (value: unknown, old: unknown): boolean;\n}\n\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual: HasChanged = (value: unknown, old: unknown): boolean => {\n // This ensures (old==NaN, value==NaN) always returns false\n return old !== value && (old === old || value === value);\n};\n\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n/**\n * The Closure JS Compiler doesn't currently have good support for static\n * property semantics where \"this\" is dynamic (e.g.\n * https://github.com/google/closure-compiler/issues/3177 and others) so we use\n * this hack to bypass any rewriting by the compiler.\n */\nconst finalized = 'finalized';\n\n/**\n * A string representing one of the supported dev mode warning categories.\n */\nexport type WarningKind = 'change-in-update' | 'migration';\n\nexport type Initializer = (element: ReactiveElement) => void;\n\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclassers to render updates as desired.\n * @noInheritDoc\n */\nexport abstract class ReactiveElement\n // In the Node build, this `extends` clause will be substituted with\n // `(globalThis.HTMLElement ?? HTMLElement)`.\n //\n // This way, we will first prefer any global `HTMLElement` polyfill that the\n // user has assigned, and then fall back to the `HTMLElement` shim which has\n // been imported (see note at the top of this file about how this import is\n // generated by Rollup). Note that the `HTMLElement` variable has been\n // shadowed by this import, so it no longer refers to the global.\n extends HTMLElement\n implements ReactiveControllerHost\n{\n // Note: these are patched in only in DEV_MODE.\n /**\n * Read or set all the enabled warning categories for this class.\n *\n * This property is only used in development builds.\n *\n * @nocollapse\n * @category dev-mode\n */\n static enabledWarnings?: WarningKind[];\n\n /**\n * Enable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Enable for all ReactiveElement subclasses\n * ReactiveElement.enableWarning?.('migration');\n *\n * // Enable for only MyElement and subclasses\n * MyElement.enableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static enableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Disable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Disable for all ReactiveElement subclasses\n * ReactiveElement.disableWarning?.('migration');\n *\n * // Disable for only MyElement and subclasses\n * MyElement.disableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static disableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer: Initializer) {\n this.finalize();\n (this._initializers ??= []).push(initializer);\n }\n\n static _initializers?: Initializer[];\n\n /*\n * Due to closure compiler ES6 compilation bugs, @nocollapse is required on\n * all static methods and properties with initializers. Reference:\n * - https://github.com/google/closure-compiler/issues/1776\n */\n\n /**\n * Maps attribute names to properties; for example `foobar` attribute to\n * `fooBar` property. Created lazily on user subclasses when finalizing the\n * class.\n * @nocollapse\n */\n private static __attributeToPropertyMap: AttributeMap;\n\n /**\n * Marks class as having finished creating properties.\n */\n protected static [finalized] = true;\n\n /**\n * Memoized list of all element properties, including any superclass properties.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category properties\n */\n static elementProperties: PropertyDeclarationMap = new Map();\n\n /**\n * User-supplied object that maps property names to `PropertyDeclaration`\n * objects containing options for configuring reactive properties. When\n * a reactive property is set the element will update and render.\n *\n * By default properties are public fields, and as such, they should be\n * considered as primarily settable by element users, either via attribute or\n * the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the `state: true` option. Properties\n * marked as `state` do not reflect from the corresponding attribute\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating\n * public properties should typically not be done for non-primitive (object or\n * array) properties. In other cases when an element needs to manage state, a\n * private property set with the `state: true` option should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n * @nocollapse\n * @category properties\n */\n static properties: PropertyDeclarations;\n\n /**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\n static elementStyles: Array = [];\n\n /**\n * Array of styles to apply to the element. The styles should be defined\n * using the {@linkcode css} tag function, via constructible stylesheets, or\n * imported from native CSS module scripts.\n *\n * Note on Content Security Policy:\n *\n * Element styles are implemented with `