@openremote/or-tree-menu 1.26.0 → 1.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["webpack://ORTreeMenu/webpack/runtime/define_property_getters","webpack://ORTreeMenu/webpack/runtime/has_own_property","webpack://ORTreeMenu/webpack/runtime/make_namespace_object","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/query-all.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/element-mixin.js","webpack://ORTreeMenu/../../../node_modules/lit-html/directive.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/css-tag.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/reactive-element.js","webpack://ORTreeMenu/../../../node_modules/lit-html/lit-html.js","webpack://ORTreeMenu/../../../node_modules/lit-element/lit-element.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/custom-element.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/property.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/base.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","webpack://ORTreeMenu/../../../node_modules/lit-html/directives/map.js","webpack://ORTreeMenu/./src/model.ts","webpack://ORTreeMenu/./src/util.ts","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/define.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/dir-mixin.js","webpack://ORTreeMenu/../../../node_modules/@open-wc/dedupe-mixin/src/dedupeMixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/polylit-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/path-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/async.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/gestures.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/disabled-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/keyboard-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/active-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/item/src/vaadin-item-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/css-property-observer.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/css-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/warnings.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/lumo-modules.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/lumo-injector.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/styles/style-props.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/styles/add-global-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/item/src/styles/vaadin-item-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-item-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/styles/vaadin-context-menu-item-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-item.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/debounce.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/slot-observer.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/keyboard-direction-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/list-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/dir-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/list-box/src/styles/vaadin-list-box-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-list-box.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-restoration-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-trap-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-focus-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-position-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/dom-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/vaadin-menu-overlay-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/browser-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-stack-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/styles/vaadin-menu-overlay-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-overlay-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/styles/vaadin-overlay-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-overlay.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/media-query-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/vaadin-contextmenu-items-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/vaadin-context-menu-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-submenu.js","webpack://ORTreeMenu/../../../node_modules/lit-html/directives/if-defined.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-development-mode-detector/vaadin-development-mode-detector.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-usage-statistics/vaadin-usage-statistics-collect.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/unique-id-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/slot-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/tooltip-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/button/src/styles/vaadin-button-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/tabindex-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-button-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-button.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/i18n-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/resize-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar.js","webpack://ORTreeMenu/../or-vaadin-components/lib/or-vaadin-menu-bar.js","webpack://ORTreeMenu/./src/or-tree-group.ts","webpack://ORTreeMenu/../../../node_modules/lit-html/directives/when.js","webpack://ORTreeMenu/./src/or-tree-node.ts","webpack://ORTreeMenu/./src/index.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nlet e;function r(r){return(n,o)=>t(n,o,{get(){return(this.renderRoot??(e??=document.createDocumentFragment())).querySelectorAll(r)}})}export{r as queryAll};\n//# sourceMappingURL=query-all.js.map\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { usageStatistics } from '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js';\nimport { idlePeriod } from './async.js';\nimport { Debouncer, enqueueDebouncer } from './debounce.js';\nimport { DirMixin } from './dir-mixin.js';\n\nif (!window.Vaadin) {\n window.Vaadin = {};\n}\n\n/**\n * Array of Vaadin custom element classes that have been finalized.\n */\nif (!window.Vaadin.registrations) {\n window.Vaadin.registrations = [];\n}\n\nif (!window.Vaadin.developmentModeCallback) {\n window.Vaadin.developmentModeCallback = {};\n}\n\nwindow.Vaadin.developmentModeCallback['vaadin-usage-statistics'] = function () {\n usageStatistics();\n};\n\nlet statsJob;\n\nconst registered = new Set();\n\n/**\n * @polymerMixin\n * @mixes DirMixin\n */\nexport const ElementMixin = (superClass) =>\n class VaadinElementMixin extends DirMixin(superClass) {\n /** @protected */\n static _ensureRegistrations() {\n const { is } = this;\n\n // Registers a class prototype for telemetry purposes.\n if (is && !registered.has(is)) {\n window.Vaadin.registrations.push(this);\n registered.add(is);\n\n const callback = window.Vaadin.developmentModeCallback;\n if (callback) {\n statsJob = Debouncer.debounce(statsJob, idlePeriod, () => {\n callback['vaadin-usage-statistics']();\n });\n enqueueDebouncer(statsJob);\n }\n }\n }\n\n constructor() {\n super();\n\n if (document.doctype === null) {\n console.warn(\n 'Vaadin components require the \"standards mode\" declaration. Please add <!DOCTYPE html> to the HTML document.',\n );\n }\n\n this.constructor._ensureRegistrations();\n }\n };\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?H:\"?\"===e[1]?I:\"@\"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||\"\"===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push(\"3.3.1\");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.1\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o){return(e,n)=>{const{slot:r,selector:s}=o??{},c=\"slot\"+(r?`[name=${r}]`:\":not([name])\");return t(e,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter((t=>t.matches(s)))}})}}export{o as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction*o(o,f){if(void 0!==o){let i=0;for(const t of o)yield f(t,i++)}}export{o as map};\n//# sourceMappingURL=map.js.map\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * The TreeNode model for constructing a node within the tree.\n */\nexport interface TreeNode {\n id: string;\n children?: TreeNode[];\n label: string;\n hidden?: boolean;\n readonly?: boolean;\n selected?: boolean; // Only acts as initial state\n expandable?: boolean;\n expanded?: boolean;\n}\n\n/**\n * List of possible options for tree menu selection.\n * The order within the enum is based on restrictiveness.\n *\n * - **LEAF** - only allows a single node to be selected, and forbids the selection of any parent node.\n * - **SINGLE** - only allows a single node to be selected, but does allow the selection of the parent node.\n * - **MULTI** - allows selecting multiple nodes using keyboard controls. (control and shift)\n */\nexport enum TreeMenuSelection {\n LEAF = \"leaf\", SINGLE = \"single\", MULTI = \"multi\"\n}\n\n/**\n * List of sorting options in the header of the tree menu.\n * By default, we include alphabetically sorting, but can be expanded by class inheritors.\n */\nexport enum TreeMenuSorting {\n A_TO_Z = \"a_to_z\", Z_TO_A = \"z_to_a\"\n}\n\n/**\n * Model for the SELECT event that {@link OrTreeMenu} can dispatch.\n * Once a node is selected, a list of all the selected nodes will be shared with the consumer elements.\n */\nexport class OrTreeSelectEvent extends CustomEvent<TreeNode[]> {\n\n public static readonly NAME = \"or-tree-select\";\n\n constructor(nodes: TreeNode[]) {\n super(OrTreeSelectEvent.NAME, {\n bubbles: true,\n composed: true,\n detail: nodes\n });\n }\n}\n\n/**\n * Payload object of the {@link OrTreeDragEvent}.\n */\nexport interface OrTreeGroupEventDetail {\n nodes: TreeNode[];\n groupNode?: TreeNode;\n newNodes: TreeNode[];\n}\n\n/**\n * Model for the DRAG event that {@link OrTreeMenu} can dispatch.\n * Once a node is dragged into (or outside) a group, we send details to consumer elements.\n */\nexport class OrTreeDragEvent extends CustomEvent<OrTreeGroupEventDetail> {\n\n public static readonly NAME = \"or-tree-drag\";\n\n constructor(nodes: TreeNode[], groupNode?: TreeNode, newNodes: TreeNode[] = []) {\n super(OrTreeDragEvent.NAME, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: {\n nodes: nodes,\n groupNode: groupNode,\n newNodes: newNodes\n } as OrTreeGroupEventDetail\n });\n }\n}\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {TreeNode} from \"./model\";\n\n/**\n * Utility function that moves an array of {@link TreeNode} into another {@link TreeNode}, by adding them to their children.\n * The function takes care of removing the nodes from the former group, and makes sure no duplicates end up in the list.\n *\n * @param nodesToMove - The array of nodes that are moved into a group.\n * @param groupNode - The group node to insert nodesToMove in.\n * @param treeNodes - Full list of nodes in the tree menu.\n */\nexport function moveNodesToGroupNode(nodesToMove: TreeNode[], groupNode?: TreeNode, treeNodes: TreeNode[] = []): TreeNode[] {\n console.debug(`Moving nodes '${nodesToMove.map(node => node.label).join(', ')}' into group '${groupNode?.label}'. Tree nodes are`, groupNode);\n\n function filterAndAdd(nodes: TreeNode[]): TreeNode[] {\n return nodes.map(node => {\n\n if (nodesToMove.some(nodeToMove => node.id === nodeToMove.id)) {\n console.debug(\"Removed the node from original position.\")\n return null; // Removes the node from its original position\n }\n\n const newNode: TreeNode = { ...node };\n\n // Recursively loop through children\n if (newNode.children) {\n newNode.children = filterAndAdd(newNode.children).filter(child => child !== null);\n }\n\n // If the currently looped node is the target group node, add the nodes to its children\n if (groupNode && node.id === groupNode?.id) {\n nodesToMove.forEach(nodeToMove => {\n newNode.children = newNode.children ? [...newNode.children, nodeToMove] : [nodeToMove];\n });\n }\n return newNode;\n\n }).filter(node => node !== null) as TreeNode[];\n }\n\n // Start the recursive function\n const newNodes = filterAndAdd(treeNodes);\n\n // If no groupNode is provided, add the nodesToMove to the top level\n if (!groupNode) {\n newNodes.push(...nodesToMove);\n }\n return newNodes;\n}\n\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nwindow.Vaadin ||= {};\nwindow.Vaadin.featureFlags ||= {};\n\nfunction dashToCamelCase(dash) {\n return dash.replace(/-[a-z]/gu, (m) => m[1].toUpperCase());\n}\n\nconst experimentalMap = {};\n\nexport function defineCustomElement(CustomElement, version = '25.1.4') {\n Object.defineProperty(CustomElement, 'version', {\n get() {\n return version;\n },\n });\n\n if (CustomElement.experimental) {\n const featureFlagKey =\n typeof CustomElement.experimental === 'string'\n ? CustomElement.experimental\n : `${dashToCamelCase(CustomElement.is.split('-').slice(1).join('-'))}Component`;\n\n if (!window.Vaadin.featureFlags[featureFlagKey] && !experimentalMap[featureFlagKey]) {\n // Add setter to define experimental component when it's set to true\n experimentalMap[featureFlagKey] = new Set();\n experimentalMap[featureFlagKey].add(CustomElement);\n\n Object.defineProperty(window.Vaadin.featureFlags, featureFlagKey, {\n get() {\n return experimentalMap[featureFlagKey].size === 0;\n },\n set(value) {\n if (!!value && experimentalMap[featureFlagKey].size > 0) {\n experimentalMap[featureFlagKey].forEach((elementClass) => {\n customElements.define(elementClass.is, elementClass);\n });\n experimentalMap[featureFlagKey].clear();\n }\n },\n });\n\n return;\n } else if (experimentalMap[featureFlagKey]) {\n // Allow to register multiple components with single flag\n experimentalMap[featureFlagKey].add(CustomElement);\n return;\n }\n }\n\n const defined = customElements.get(CustomElement.is);\n if (!defined) {\n customElements.define(CustomElement.is, CustomElement);\n } else {\n const definedVersion = defined.version;\n if (definedVersion && CustomElement.version && definedVersion === CustomElement.version) {\n // Just loading the same thing again\n console.warn(`The component ${CustomElement.is} has been loaded twice`);\n } else {\n console.error(\n `Tried to define ${CustomElement.is} version ${CustomElement.version} when version ${defined.version} is already in use. Something will probably break.`,\n );\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Array of Vaadin custom element classes that have been subscribed to the dir changes.\n */\nconst directionSubscribers = [];\n\nfunction alignDirs(element, documentDir, elementDir = element.getAttribute('dir')) {\n if (documentDir) {\n element.setAttribute('dir', documentDir);\n } else if (elementDir != null) {\n element.removeAttribute('dir');\n }\n}\n\nfunction getDocumentDir() {\n return document.documentElement.getAttribute('dir');\n}\n\nfunction directionUpdater() {\n const documentDir = getDocumentDir();\n directionSubscribers.forEach((element) => {\n alignDirs(element, documentDir);\n });\n}\n\nconst directionObserver = new MutationObserver(directionUpdater);\ndirectionObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['dir'] });\n\n/**\n * A mixin to handle `dir` attribute based on the one set on the `<html>` element.\n *\n * @polymerMixin\n */\nexport const DirMixin = (superClass) =>\n class VaadinDirMixin extends superClass {\n static get properties() {\n return {\n /**\n * @protected\n */\n dir: {\n type: String,\n value: '',\n reflectToAttribute: true,\n converter: {\n fromAttribute: (attr) => {\n return !attr ? '' : attr;\n },\n toAttribute: (prop) => {\n return prop === '' ? null : prop;\n },\n },\n },\n };\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get __isRTL() {\n return this.getAttribute('dir') === 'rtl';\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (!this.hasAttribute('dir') || this.__restoreSubscription) {\n this.__subscribe();\n alignDirs(this, getDocumentDir(), null);\n }\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name !== 'dir') {\n return;\n }\n\n const documentDir = getDocumentDir();\n\n // New value equals to the document direction and the element is not subscribed to the changes\n const newValueEqlDocDir = newValue === documentDir && directionSubscribers.indexOf(this) === -1;\n // Value was emptied and the element is not subscribed to the changes\n const newValueEmptied = !newValue && oldValue && directionSubscribers.indexOf(this) === -1;\n // New value is different and the old equals to document direction and the element is not subscribed to the changes\n const newDiffValue = newValue !== documentDir && oldValue === documentDir;\n\n if (newValueEqlDocDir || newValueEmptied) {\n this.__subscribe();\n alignDirs(this, documentDir, newValue);\n } else if (newDiffValue) {\n this.__unsubscribe();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__restoreSubscription = directionSubscribers.includes(this);\n this.__unsubscribe();\n }\n\n /** @protected */\n _valueToNodeAttribute(node, value, attribute) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the property contains an empty string then it should not create an empty attribute\n if (attribute === 'dir' && value === '' && !node.hasAttribute('dir')) {\n return;\n }\n super._valueToNodeAttribute(node, value, attribute);\n }\n\n /** @protected */\n _attributeToProperty(attribute, value, type) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the attribute is removed, then the dir property should contain an empty string instead of null\n if (attribute === 'dir' && !value) {\n this.dir = '';\n } else {\n super._attributeToProperty(attribute, value, type);\n }\n }\n\n /** @private */\n __subscribe() {\n if (!directionSubscribers.includes(this)) {\n directionSubscribers.push(this);\n }\n }\n\n /** @private */\n __unsubscribe() {\n if (directionSubscribers.includes(this)) {\n directionSubscribers.splice(directionSubscribers.indexOf(this), 1);\n }\n }\n };\n","const appliedClassMixins = new WeakMap();\n\n/** Vefify if the Mixin was previously applyed\n * @private\n * @param {function} mixin Mixin being applyed\n * @param {object} superClass Class receiving the new mixin\n * @returns {boolean}\n */\nfunction wasMixinPreviouslyApplied(mixin, superClass) {\n let klass = superClass;\n while (klass) {\n if (appliedClassMixins.get(klass) === mixin) {\n return true;\n }\n klass = Object.getPrototypeOf(klass);\n }\n return false;\n}\n\n/** Apply each mixin in the chain to make sure they are not applied more than once to the final class.\n * @export\n * @param {function} mixin Mixin to be applyed\n * @returns {object} Mixed class with mixin applied\n */\nexport function dedupeMixin(mixin) {\n return superClass => {\n if (wasMixinPreviouslyApplied(mixin, superClass)) {\n return superClass;\n }\n const mixedClass = mixin(superClass);\n appliedClassMixins.set(mixedClass, mixin);\n return mixedClass;\n };\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { notEqual } from 'lit';\nimport { get, set } from './path-utils.js';\n\nconst caseMap = {};\n\nconst CAMEL_TO_DASH = /([A-Z])/gu;\n\nfunction camelToDash(camel) {\n if (!caseMap[camel]) {\n caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase();\n }\n return caseMap[camel];\n}\n\nfunction upper(name) {\n return name[0].toUpperCase() + name.substring(1);\n}\n\nfunction parseObserver(observerString) {\n const [method, rest] = observerString.split('(');\n const observerProps = rest\n .replace(')', '')\n .split(',')\n .map((prop) => prop.trim());\n\n return {\n method,\n observerProps,\n };\n}\n\nfunction getOrCreateMap(obj, name) {\n if (!Object.prototype.hasOwnProperty.call(obj, name)) {\n // Clone any existing entries (superclasses)\n obj[name] = new Map(obj[name]);\n }\n return obj[name];\n}\n\nconst PolylitMixinImplementation = (superclass) => {\n class PolylitMixinClass extends superclass {\n // PolylitMixin, and components using it, force synchronous updates\n // in connectedCallback and for properties that are configured to\n // be sync. This causes Lit's `change-in-update` warning to be\n // logged for almost every component when Lit runs in development\n // mode. Since we intentionally force updates, disable the warning.\n static enabledWarnings = [];\n\n static createProperty(name, options) {\n if ([String, Boolean, Number, Array].includes(options)) {\n options = {\n type: options,\n };\n }\n\n if (options && options.reflectToAttribute) {\n options.reflect = true;\n }\n\n super.createProperty(name, options);\n }\n\n static getOrCreateMap(name) {\n return getOrCreateMap(this, name);\n }\n\n /**\n * @protected\n * @override\n */\n static finalize() {\n // Suppress warnings about deprecated overriding ReactiveElement methods\n // as the mixin requires those. See https://github.com/lit/lit/pull/4901\n if (window.litIssuedWarnings) {\n window.litIssuedWarnings.add('no-override-create-property');\n window.litIssuedWarnings.add('no-override-get-property-descriptor');\n }\n\n super.finalize();\n\n if (Array.isArray(this.observers)) {\n const complexObservers = this.getOrCreateMap('__complexObservers');\n\n this.observers.forEach((observer) => {\n const { method, observerProps } = parseObserver(observer);\n complexObservers.set(method, observerProps);\n });\n }\n }\n\n static addCheckedInitializer(initializer) {\n super.addInitializer((instance) => {\n // Prevent initializer from affecting superclass\n if (instance instanceof this) {\n initializer(instance);\n }\n });\n }\n\n static getPropertyDescriptor(name, key, options) {\n const defaultDescriptor = super.getPropertyDescriptor(name, key, options);\n\n let result = defaultDescriptor;\n\n // Set the key for this property\n this.getOrCreateMap('__propKeys').set(name, key);\n\n if (options.sync) {\n result = {\n get: defaultDescriptor.get,\n set(value) {\n const oldValue = this[name];\n\n if (notEqual(value, oldValue)) {\n this[key] = value;\n this.requestUpdate(name, oldValue, options);\n\n // Enforce synchronous update\n if (this.hasUpdated) {\n this.performUpdate();\n }\n }\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if (options.readOnly) {\n const setter = result.set;\n\n this.addCheckedInitializer((instance) => {\n // This is run during construction of the element\n instance[`_set${upper(name)}`] = function (value) {\n setter.call(instance, value);\n };\n });\n\n result = {\n get: result.get,\n set() {\n // Do nothing, property is read-only.\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if ('value' in options) {\n // Set the default value\n this.addCheckedInitializer((instance) => {\n const value = typeof options.value === 'function' ? options.value.call(instance) : options.value;\n\n if (options.readOnly) {\n instance[`_set${upper(name)}`](value);\n } else {\n instance[name] = value;\n }\n });\n }\n\n if (options.observer) {\n const method = options.observer;\n\n // Set this method\n this.getOrCreateMap('__observers').set(name, method);\n\n this.addCheckedInitializer((instance) => {\n if (!instance[method]) {\n console.warn(`observer method ${method} not defined`);\n }\n });\n }\n\n if (options.notify) {\n if (!this.__notifyProps) {\n this.__notifyProps = new Set();\n // eslint-disable-next-line no-prototype-builtins\n } else if (!this.hasOwnProperty('__notifyProps')) {\n // Clone any existing observers (superclasses)\n const notifyProps = this.__notifyProps;\n this.__notifyProps = new Set(notifyProps);\n }\n\n // Set this method\n this.__notifyProps.add(name);\n }\n\n if (options.computed) {\n const assignComputedMethod = `__assignComputed${name}`;\n const observer = parseObserver(options.computed);\n this.prototype[assignComputedMethod] = function (...props) {\n this[name] = this[observer.method](...props);\n };\n\n this.getOrCreateMap('__computedObservers').set(assignComputedMethod, observer.observerProps);\n }\n\n if (!options.attribute) {\n options.attribute = camelToDash(name);\n }\n\n return result;\n }\n\n static get polylitConfig() {\n return {\n asyncFirstRender: false,\n };\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n const { polylitConfig } = this.constructor;\n if (!this.hasUpdated && !polylitConfig.asyncFirstRender) {\n this.performUpdate();\n }\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n if (!this.$) {\n this.$ = {};\n }\n\n this.renderRoot.querySelectorAll('[id]').forEach((node) => {\n this.$[node.id] = node;\n });\n }\n\n /** @protected */\n ready() {}\n\n /** @protected */\n willUpdate(props) {\n if (this.constructor.__computedObservers) {\n this.__runComplexObservers(props, this.constructor.__computedObservers);\n }\n }\n\n /** @protected */\n updated(props) {\n const wasReadyInvoked = this.__isReadyInvoked;\n this.__isReadyInvoked = true;\n\n if (this.constructor.__observers) {\n this.__runObservers(props, this.constructor.__observers);\n }\n\n if (this.constructor.__complexObservers) {\n this.__runComplexObservers(props, this.constructor.__complexObservers);\n }\n\n if (this.__dynamicPropertyObservers) {\n this.__runDynamicObservers(props, this.__dynamicPropertyObservers);\n }\n\n if (this.__dynamicMethodObservers) {\n this.__runComplexObservers(props, this.__dynamicMethodObservers);\n }\n\n if (this.constructor.__notifyProps) {\n this.__runNotifyProps(props, this.constructor.__notifyProps);\n }\n\n if (!wasReadyInvoked) {\n this.ready();\n }\n }\n\n /**\n * Set several properties at once and perform synchronous update.\n * @protected\n */\n setProperties(props) {\n Object.entries(props).forEach(([name, value]) => {\n // Use private key and not setter to not trigger\n // update for properties marked as `sync: true`.\n const key = this.constructor.__propKeys.get(name);\n const oldValue = this[key];\n this[key] = value;\n this.requestUpdate(name, oldValue);\n });\n\n // Perform sync update\n if (this.hasUpdated) {\n this.performUpdate();\n }\n }\n\n /** @protected */\n _createMethodObserver(observer) {\n const dynamicObservers = getOrCreateMap(this, '__dynamicMethodObservers');\n const { method, observerProps } = parseObserver(observer);\n dynamicObservers.set(method, observerProps);\n }\n\n /** @protected */\n _createPropertyObserver(property, method) {\n const dynamicObservers = getOrCreateMap(this, '__dynamicPropertyObservers');\n dynamicObservers.set(method, property);\n }\n\n /** @private */\n __runComplexObservers(props, observers) {\n observers.forEach((observerProps, method) => {\n if (observerProps.some((prop) => props.has(prop))) {\n if (!this[method]) {\n console.warn(`observer method ${method} not defined`);\n } else {\n this[method](...observerProps.map((prop) => this[prop]));\n }\n }\n });\n }\n\n /** @private */\n __runDynamicObservers(props, observers) {\n observers.forEach((prop, method) => {\n if (props.has(prop) && this[method]) {\n this[method](this[prop], props.get(prop));\n }\n });\n }\n\n /** @private */\n __runObservers(props, observers) {\n props.forEach((v, k) => {\n const observer = observers.get(k);\n if (observer !== undefined && this[observer]) {\n this[observer](this[k], v);\n }\n });\n }\n\n /** @private */\n __runNotifyProps(props, notifyProps) {\n props.forEach((_, k) => {\n if (notifyProps.has(k)) {\n this.dispatchEvent(\n new CustomEvent(`${camelToDash(k)}-changed`, {\n detail: {\n value: this[k],\n },\n }),\n );\n }\n });\n }\n\n /** @protected */\n _get(path, object) {\n return get(path, object);\n }\n\n /** @protected */\n _set(path, value, object) {\n set(path, value, object);\n }\n }\n\n return PolylitMixinClass;\n};\n\nexport const PolylitMixin = dedupeMixin(PolylitMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2023 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Convenience method for reading a value from a path.\n *\n * @param {string} path\n * @param {object} object\n */\nexport function get(path, object) {\n return path.split('.').reduce((obj, property) => (obj ? obj[property] : undefined), object);\n}\n\n/**\n * Convenience method for setting a value to a path.\n *\n * @param {string} path\n * @param {unknown} value\n * @param {object} object\n */\nexport function set(path, value, object) {\n const pathParts = path.split('.');\n const lastPart = pathParts.pop();\n const target = pathParts.reduce((target, part) => target[part], object);\n target[lastPart] = value;\n}\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @fileoverview\n *\n * This module provides a number of strategies for enqueuing asynchronous\n * tasks. Each sub-module provides a standard `run(fn)` interface that returns a\n * handle, and a `cancel(handle)` interface for canceling async tasks before\n * they run.\n *\n * @summary Module that provides a number of strategies for enqueuing\n * asynchronous tasks.\n */\n\nlet microtaskCurrHandle = 0;\nlet microtaskLastHandle = 0;\nconst microtaskCallbacks = [];\nlet microtaskScheduled = false;\n\nfunction microtaskFlush() {\n microtaskScheduled = false;\n const len = microtaskCallbacks.length;\n for (let i = 0; i < len; i++) {\n const cb = microtaskCallbacks[i];\n if (cb) {\n try {\n cb();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n }\n }\n microtaskCallbacks.splice(0, len);\n microtaskLastHandle += len;\n}\n\n/**\n * Async interface wrapper around `setTimeout`.\n *\n * @namespace\n * @summary Async interface wrapper around `setTimeout`.\n */\nconst timeOut = {\n /**\n * Returns a sub-module with the async interface providing the provided\n * delay.\n *\n * @memberof timeOut\n * @param {number=} delay Time to wait before calling callbacks in ms\n * @return {!AsyncInterface} An async timeout interface\n */\n after(delay) {\n return {\n run(fn) {\n return window.setTimeout(fn, delay);\n },\n cancel(handle) {\n window.clearTimeout(handle);\n },\n };\n },\n /**\n * Enqueues a function called in the next task.\n *\n * @memberof timeOut\n * @param {!Function} fn Callback to run\n * @param {number=} delay Delay in milliseconds\n * @return {number} Handle used for canceling task\n */\n run(fn, delay) {\n return window.setTimeout(fn, delay);\n },\n /**\n * Cancels a previously enqueued `timeOut` callback.\n *\n * @memberof timeOut\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.clearTimeout(handle);\n },\n};\nexport { timeOut };\n\n/**\n * Async interface wrapper around `requestAnimationFrame`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestAnimationFrame`.\n */\nconst animationFrame = {\n /**\n * Enqueues a function called at `requestAnimationFrame` timing.\n *\n * @memberof animationFrame\n * @param {function(number):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestAnimationFrame(fn);\n },\n /**\n * Cancels a previously enqueued `animationFrame` callback.\n *\n * @memberof animationFrame\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelAnimationFrame(handle);\n },\n};\nexport { animationFrame };\n\n/**\n * Async interface wrapper around `requestIdleCallback`. Falls back to\n * `setTimeout` on browsers that do not support `requestIdleCallback`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestIdleCallback`.\n */\nconst idlePeriod = {\n /**\n * Enqueues a function called at `requestIdleCallback` timing.\n *\n * @memberof idlePeriod\n * @param {function(!IdleDeadline):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestIdleCallback ? window.requestIdleCallback(fn) : window.setTimeout(fn, 16);\n },\n /**\n * Cancels a previously enqueued `idlePeriod` callback.\n *\n * @memberof idlePeriod\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n if (window.cancelIdleCallback) {\n window.cancelIdleCallback(handle);\n } else {\n window.clearTimeout(handle);\n }\n },\n};\nexport { idlePeriod };\n\n/**\n * Async interface for enqueuing callbacks that run at microtask timing.\n *\n * @namespace\n * @summary Async interface for enqueuing callbacks that run at microtask\n * timing.\n */\nconst microTask = {\n /**\n * Enqueues a function called at microtask timing.\n *\n * @memberof microTask\n * @param {!Function=} callback Callback to run\n * @return {number} Handle used for canceling task\n */\n run(callback) {\n if (!microtaskScheduled) {\n microtaskScheduled = true;\n queueMicrotask(() => microtaskFlush());\n }\n microtaskCallbacks.push(callback);\n const result = microtaskCurrHandle;\n microtaskCurrHandle += 1;\n return result;\n },\n\n /**\n * Cancels a previously enqueued `microTask` callback.\n *\n * @memberof microTask\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n const idx = handle - microtaskLastHandle;\n if (idx >= 0) {\n if (!microtaskCallbacks[idx]) {\n throw new Error(`invalid async handle: ${handle}`);\n }\n microtaskCallbacks[idx] = null;\n }\n },\n};\nexport { microTask };\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/* eslint-disable @typescript-eslint/no-use-before-define */\n\n/**\n * @fileoverview\n *\n * Module for adding listeners to a node for the following normalized\n * cross-platform \"gesture\" events:\n * - `down` - mouse or touch went down\n * - `up` - mouse or touch went up\n * - `tap` - mouse click or finger tap\n * - `track` - mouse drag or touch move\n *\n * @summary Module for adding cross-platform gesture event listeners.\n */\n\nimport { microTask } from './async.js';\n\nconst passiveTouchGestures = false;\nconst wrap = (node) => node;\n\n// Detect native touch action support\nconst HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string';\nconst GESTURE_KEY = '__polymerGestures';\nconst HANDLED_OBJ = '__polymerGesturesHandled';\nconst TOUCH_ACTION = '__polymerGesturesTouchAction';\n// Radius for tap and track\nconst TAP_DISTANCE = 25;\nconst TRACK_DISTANCE = 5;\n// Number of last N track positions to keep\nconst TRACK_LENGTH = 2;\n\nconst MOUSE_EVENTS = ['mousedown', 'mousemove', 'mouseup', 'click'];\n// An array of bitmask values for mapping MouseEvent.which to MouseEvent.buttons\nconst MOUSE_WHICH_TO_BUTTONS = [0, 1, 4, 2];\nconst MOUSE_HAS_BUTTONS = (function () {\n try {\n return new MouseEvent('test', { buttons: 1 }).buttons === 1;\n } catch (_) {\n return false;\n }\n})();\n\n/**\n * @param {string} name Possible mouse event name\n * @return {boolean} true if mouse event, false if not\n */\nfunction isMouseEvent(name) {\n return MOUSE_EVENTS.indexOf(name) > -1;\n}\n\n// check for passive event listeners\nlet supportsPassive = false;\n(function () {\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line getter-return\n get() {\n supportsPassive = true;\n },\n });\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (_) {}\n})();\n\n/**\n * Generate settings for event listeners, dependant on `passiveTouchGestures`\n *\n * @param {string} eventName Event name to determine if `{passive}` option is\n * needed\n * @return {{passive: boolean} | undefined} Options to use for addEventListener\n * and removeEventListener\n */\nfunction PASSIVE_TOUCH(eventName) {\n if (isMouseEvent(eventName) || eventName === 'touchend') {\n return;\n }\n if (HAS_NATIVE_TA && supportsPassive && passiveTouchGestures) {\n return { passive: true };\n }\n}\n\n// Check for touch-only devices\nconst IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u);\n\n// Defined at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute\n/** @type {!Object<boolean>} */\nconst canBeDisabled = {\n button: true,\n command: true,\n fieldset: true,\n input: true,\n keygen: true,\n optgroup: true,\n option: true,\n select: true,\n textarea: true,\n};\n\n/**\n * @param {MouseEvent} ev event to test for left mouse button down\n * @return {boolean} has left mouse button down\n */\nfunction hasLeftMouseButton(ev) {\n const type = ev.type;\n // Exit early if the event is not a mouse event\n if (!isMouseEvent(type)) {\n return false;\n }\n // Ev.button is not reliable for mousemove (0 is overloaded as both left button and no buttons)\n // instead we use ev.buttons (bitmask of buttons) or fall back to ev.which (deprecated, 0 for no buttons, 1 for left button)\n if (type === 'mousemove') {\n // Allow undefined for testing events\n let buttons = ev.buttons === undefined ? 1 : ev.buttons;\n if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) {\n buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0;\n }\n // Buttons is a bitmask, check that the left button bit is set (1)\n return Boolean(buttons & 1);\n }\n // Allow undefined for testing events\n const button = ev.button === undefined ? 0 : ev.button;\n // Ev.button is 0 in mousedown/mouseup/click for left button activation\n return button === 0;\n}\n\nfunction isSyntheticClick(ev) {\n if (ev.type === 'click') {\n // Ev.detail is 0 for HTMLElement.click in most browsers\n if (ev.detail === 0) {\n return true;\n }\n // In the worst case, check that the x/y position of the click is within\n // the bounding box of the target of the event\n // Thanks IE 10 >:(\n const t = _findOriginalTarget(ev);\n // Make sure the target of the event is an element so we can use getBoundingClientRect,\n // if not, just assume it is a synthetic click\n if (!t.nodeType || /** @type {Element} */ (t).nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n const bcr = /** @type {Element} */ (t).getBoundingClientRect();\n // Use page x/y to account for scrolling\n const x = ev.pageX,\n y = ev.pageY;\n // Ev is a synthetic click if the position is outside the bounding box of the target\n return !(x >= bcr.left && x <= bcr.right && y >= bcr.top && y <= bcr.bottom);\n }\n return false;\n}\n\nconst POINTERSTATE = {\n mouse: {\n target: null,\n mouseIgnoreJob: null,\n },\n touch: {\n x: 0,\n y: 0,\n id: -1,\n scrollDecided: false,\n },\n};\n\nfunction firstTouchAction(ev) {\n let ta = 'auto';\n const path = getComposedPath(ev);\n for (let i = 0, n; i < path.length; i++) {\n n = path[i];\n if (n[TOUCH_ACTION]) {\n ta = n[TOUCH_ACTION];\n break;\n }\n }\n return ta;\n}\n\nfunction trackDocument(stateObj, movefn, upfn) {\n stateObj.movefn = movefn;\n stateObj.upfn = upfn;\n document.addEventListener('mousemove', movefn);\n document.addEventListener('mouseup', upfn);\n}\n\nfunction untrackDocument(stateObj) {\n document.removeEventListener('mousemove', stateObj.movefn);\n document.removeEventListener('mouseup', stateObj.upfn);\n stateObj.movefn = null;\n stateObj.upfn = null;\n}\n\n/**\n * Returns the composedPath for the given event.\n * @param {Event} event to process\n * @return {!Array<!EventTarget>} Path of the event\n */\nconst getComposedPath =\n window.ShadyDOM && window.ShadyDOM.noPatch\n ? window.ShadyDOM.composedPath\n : (event) => (event.composedPath && event.composedPath()) || [];\n\n/** @type {!Object<string, !GestureRecognizer>} */\nexport const gestures = {};\n\n/** @type {!Array<!GestureRecognizer>} */\nexport const recognizers = [];\n\n/**\n * Finds the element rendered on the screen at the provided coordinates.\n *\n * Similar to `document.elementFromPoint`, but pierces through\n * shadow roots.\n *\n * @param {number} x Horizontal pixel coordinate\n * @param {number} y Vertical pixel coordinate\n * @return {Element} Returns the deepest shadowRoot inclusive element\n * found at the screen position given.\n */\nexport function deepTargetFind(x, y) {\n let node = document.elementFromPoint(x, y);\n let next = node;\n // This code path is only taken when native ShadowDOM is used\n // if there is a shadowroot, it may have a node at x/y\n // if there is not a shadowroot, exit the loop\n while (next && next.shadowRoot && !window.ShadyDOM) {\n // If there is a node at x/y in the shadowroot, look deeper\n const oldNext = next;\n next = next.shadowRoot.elementFromPoint(x, y);\n // On Safari, elementFromPoint may return the shadowRoot host\n if (oldNext === next) {\n break;\n }\n if (next) {\n node = next;\n }\n }\n return node;\n}\n\n/**\n * A cheaper check than ev.composedPath()[0];\n *\n * @private\n * @param {Event|Touch} ev Event.\n * @return {EventTarget} Returns the event target.\n */\nfunction _findOriginalTarget(ev) {\n const path = getComposedPath(/** @type {?Event} */ (ev));\n // It shouldn't be, but sometimes path is empty (window on Safari).\n return path.length > 0 ? path[0] : ev.target;\n}\n\n/**\n * @private\n * @param {Event} ev Event.\n * @return {void}\n */\nfunction _handleNative(ev) {\n const type = ev.type;\n const node = ev.currentTarget;\n const gobj = node[GESTURE_KEY];\n if (!gobj) {\n return;\n }\n const gs = gobj[type];\n if (!gs) {\n return;\n }\n if (!ev[HANDLED_OBJ]) {\n ev[HANDLED_OBJ] = {};\n if (type.startsWith('touch')) {\n const t = ev.changedTouches[0];\n if (type === 'touchstart') {\n // Only handle the first finger\n if (ev.touches.length === 1) {\n POINTERSTATE.touch.id = t.identifier;\n }\n }\n if (POINTERSTATE.touch.id !== t.identifier) {\n return;\n }\n if (!HAS_NATIVE_TA) {\n if (type === 'touchstart' || type === 'touchmove') {\n _handleTouchAction(ev);\n }\n }\n }\n }\n const handled = ev[HANDLED_OBJ];\n // Used to ignore synthetic mouse events\n if (handled.skip) {\n return;\n }\n // Reset recognizer state\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n if (gs[r.name] && !handled[r.name]) {\n if (r.flow && r.flow.start.indexOf(ev.type) > -1 && r.reset) {\n r.reset();\n }\n }\n }\n // Enforce gesture recognizer order\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n if (gs[r.name] && !handled[r.name]) {\n handled[r.name] = true;\n r[type](ev);\n }\n }\n}\n\n/**\n * @private\n * @param {TouchEvent} ev Event.\n * @return {void}\n */\nfunction _handleTouchAction(ev) {\n const t = ev.changedTouches[0];\n const type = ev.type;\n if (type === 'touchstart') {\n POINTERSTATE.touch.x = t.clientX;\n POINTERSTATE.touch.y = t.clientY;\n POINTERSTATE.touch.scrollDecided = false;\n } else if (type === 'touchmove') {\n if (POINTERSTATE.touch.scrollDecided) {\n return;\n }\n POINTERSTATE.touch.scrollDecided = true;\n const ta = firstTouchAction(ev);\n let shouldPrevent = false;\n const dx = Math.abs(POINTERSTATE.touch.x - t.clientX);\n const dy = Math.abs(POINTERSTATE.touch.y - t.clientY);\n if (!ev.cancelable) {\n // Scrolling is happening\n } else if (ta === 'none') {\n shouldPrevent = true;\n } else if (ta === 'pan-x') {\n shouldPrevent = dy > dx;\n } else if (ta === 'pan-y') {\n shouldPrevent = dx > dy;\n }\n if (shouldPrevent) {\n ev.preventDefault();\n } else {\n prevent('track');\n }\n }\n}\n\n/**\n * Adds an event listener to a node for the given gesture type.\n *\n * @param {!EventTarget} node Node to add listener on\n * @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`\n * @param {!function(!Event):void} handler Event listener function to call\n * @return {boolean} Returns true if a gesture event listener was added.\n */\nexport function addListener(node, evType, handler) {\n if (gestures[evType]) {\n _add(node, evType, handler);\n return true;\n }\n return false;\n}\n\n/**\n * Removes an event listener from a node for the given gesture type.\n *\n * @param {!EventTarget} node Node to remove listener from\n * @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`\n * @param {!function(!Event):void} handler Event listener function previously passed to\n * `addListener`.\n * @return {boolean} Returns true if a gesture event listener was removed.\n */\nexport function removeListener(node, evType, handler) {\n if (gestures[evType]) {\n _remove(node, evType, handler);\n return true;\n }\n return false;\n}\n\n/**\n * Automate the event listeners for the native events\n *\n * @private\n * @param {!EventTarget} node Node on which to add the event.\n * @param {string} evType Event type to add.\n * @param {function(!Event)} handler Event handler function.\n * @return {void}\n */\nfunction _add(node, evType, handler) {\n const recognizer = gestures[evType];\n const deps = recognizer.deps;\n const name = recognizer.name;\n let gobj = node[GESTURE_KEY];\n if (!gobj) {\n node[GESTURE_KEY] = gobj = {};\n }\n for (let i = 0, dep, gd; i < deps.length; i++) {\n dep = deps[i];\n // Don't add mouse handlers on iOS because they cause gray selection overlays\n if (IS_TOUCH_ONLY && isMouseEvent(dep) && dep !== 'click') {\n continue;\n }\n gd = gobj[dep];\n if (!gd) {\n gobj[dep] = gd = { _count: 0 };\n }\n if (gd._count === 0) {\n node.addEventListener(dep, _handleNative, PASSIVE_TOUCH(dep));\n }\n gd[name] = (gd[name] || 0) + 1;\n gd._count = (gd._count || 0) + 1;\n }\n node.addEventListener(evType, handler);\n if (recognizer.touchAction) {\n setTouchAction(node, recognizer.touchAction);\n }\n}\n\n/**\n * Automate event listener removal for native events\n *\n * @private\n * @param {!EventTarget} node Node on which to remove the event.\n * @param {string} evType Event type to remove.\n * @param {function(!Event): void} handler Event handler function.\n * @return {void}\n */\nfunction _remove(node, evType, handler) {\n const recognizer = gestures[evType];\n const deps = recognizer.deps;\n const name = recognizer.name;\n const gobj = node[GESTURE_KEY];\n if (gobj) {\n for (let i = 0, dep, gd; i < deps.length; i++) {\n dep = deps[i];\n gd = gobj[dep];\n if (gd && gd[name]) {\n gd[name] = (gd[name] || 1) - 1;\n gd._count = (gd._count || 1) - 1;\n if (gd._count === 0) {\n node.removeEventListener(dep, _handleNative, PASSIVE_TOUCH(dep));\n }\n }\n }\n }\n node.removeEventListener(evType, handler);\n}\n\n/**\n * Registers a new gesture event recognizer for adding new custom\n * gesture event types.\n *\n * @param {!GestureRecognizer} recog Gesture recognizer descriptor\n * @return {void}\n */\nexport function register(recog) {\n recognizers.push(recog);\n recog.emits.forEach((emit) => {\n gestures[emit] = recog;\n });\n}\n\n/**\n * @private\n * @param {string} evName Event name.\n * @return {Object} Returns the gesture for the given event name.\n */\nfunction _findRecognizerByEvent(evName) {\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n for (let j = 0, n; j < r.emits.length; j++) {\n n = r.emits[j];\n if (n === evName) {\n return r;\n }\n }\n }\n return null;\n}\n\n/**\n * Sets scrolling direction on node.\n *\n * This value is checked on first move, thus it should be called prior to\n * adding event listeners.\n *\n * @param {!EventTarget} node Node to set touch action setting on\n * @param {string} value Touch action value\n * @return {void}\n */\nexport function setTouchAction(node, value) {\n if (HAS_NATIVE_TA && node instanceof HTMLElement) {\n // NOTE: add touchAction async so that events can be added in\n // custom element constructors. Otherwise we run afoul of custom\n // elements restriction against settings attributes (style) in the\n // constructor.\n microTask.run(() => {\n node.style.touchAction = value;\n });\n }\n node[TOUCH_ACTION] = value;\n}\n\n/**\n * Dispatches an event on the `target` element of `type` with the given\n * `detail`.\n * @private\n * @param {!EventTarget} target The element on which to fire an event.\n * @param {string} type The type of event to fire.\n * @param {!Object=} detail The detail object to populate on the event.\n * @return {void}\n */\nfunction _fire(target, type, detail) {\n const ev = new Event(type, { bubbles: true, cancelable: true, composed: true });\n ev.detail = detail;\n wrap(/** @type {!Node} */ (target)).dispatchEvent(ev);\n // Forward `preventDefault` in a clean way\n if (ev.defaultPrevented) {\n const preventer = detail.preventer || detail.sourceEvent;\n if (preventer && preventer.preventDefault) {\n preventer.preventDefault();\n }\n }\n}\n\n/**\n * Prevents the dispatch and default action of the given event name.\n *\n * @param {string} evName Event name.\n * @return {void}\n */\nexport function prevent(evName) {\n const recognizer = _findRecognizerByEvent(evName);\n if (recognizer.info) {\n recognizer.info.prevent = true;\n }\n}\n\nregister({\n name: 'downup',\n deps: ['mousedown', 'touchstart', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['mouseup', 'touchend'],\n },\n emits: ['down', 'up'],\n\n info: {\n movefn: null,\n upfn: null,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n untrackDocument(this.info);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (!hasLeftMouseButton(e)) {\n return;\n }\n const t = _findOriginalTarget(e);\n const self = this;\n const movefn = (e) => {\n if (!hasLeftMouseButton(e)) {\n downupFire('up', t, e);\n untrackDocument(self.info);\n }\n };\n const upfn = (e) => {\n if (hasLeftMouseButton(e)) {\n downupFire('up', t, e);\n }\n untrackDocument(self.info);\n };\n trackDocument(this.info, movefn, upfn);\n downupFire('down', t, e);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n downupFire('down', _findOriginalTarget(e), e.changedTouches[0], e);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n downupFire('up', _findOriginalTarget(e), e.changedTouches[0], e);\n },\n});\n\n/**\n * @param {string} type\n * @param {EventTarget} target\n * @param {Event|Touch} event\n * @param {Event=} preventer\n * @return {void}\n */\nfunction downupFire(type, target, event, preventer) {\n if (!target) {\n return;\n }\n _fire(target, type, {\n x: event.clientX,\n y: event.clientY,\n sourceEvent: event,\n preventer,\n prevent(e) {\n return prevent(e);\n },\n });\n}\n\nregister({\n name: 'track',\n touchAction: 'none',\n deps: ['mousedown', 'touchstart', 'touchmove', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['mouseup', 'touchend'],\n },\n emits: ['track'],\n\n info: {\n x: 0,\n y: 0,\n state: 'start',\n started: false,\n moves: [],\n /** @this {GestureInfo} */\n addMove(move) {\n if (this.moves.length > TRACK_LENGTH) {\n this.moves.shift();\n }\n this.moves.push(move);\n },\n movefn: null,\n upfn: null,\n prevent: false,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n this.info.state = 'start';\n this.info.started = false;\n this.info.moves = [];\n this.info.x = 0;\n this.info.y = 0;\n this.info.prevent = false;\n untrackDocument(this.info);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (!hasLeftMouseButton(e)) {\n return;\n }\n const t = _findOriginalTarget(e);\n const self = this;\n const movefn = (e) => {\n const x = e.clientX,\n y = e.clientY;\n if (trackHasMovedEnough(self.info, x, y)) {\n // First move is 'start', subsequent moves are 'move', mouseup is 'end'\n self.info.state = self.info.started ? (e.type === 'mouseup' ? 'end' : 'track') : 'start';\n if (self.info.state === 'start') {\n // If and only if tracking, always prevent tap\n prevent('tap');\n }\n self.info.addMove({ x, y });\n if (!hasLeftMouseButton(e)) {\n // Always fire \"end\"\n self.info.state = 'end';\n untrackDocument(self.info);\n }\n if (t) {\n trackFire(self.info, t, e);\n }\n self.info.started = true;\n }\n };\n const upfn = (e) => {\n if (self.info.started) {\n movefn(e);\n }\n\n // Remove the temporary listeners\n untrackDocument(self.info);\n };\n // Add temporary document listeners as mouse retargets\n trackDocument(this.info, movefn, upfn);\n this.info.x = e.clientX;\n this.info.y = e.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n const ct = e.changedTouches[0];\n this.info.x = ct.clientX;\n this.info.y = ct.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchmove(e) {\n const t = _findOriginalTarget(e);\n const ct = e.changedTouches[0];\n const x = ct.clientX,\n y = ct.clientY;\n if (trackHasMovedEnough(this.info, x, y)) {\n if (this.info.state === 'start') {\n // If and only if tracking, always prevent tap\n prevent('tap');\n }\n this.info.addMove({ x, y });\n trackFire(this.info, t, ct);\n this.info.state = 'track';\n this.info.started = true;\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n const t = _findOriginalTarget(e);\n const ct = e.changedTouches[0];\n // Only trackend if track was started and not aborted\n if (this.info.started) {\n // Reset started state on up\n this.info.state = 'end';\n this.info.addMove({ x: ct.clientX, y: ct.clientY });\n trackFire(this.info, t, ct);\n }\n },\n});\n\n/**\n * @param {!GestureInfo} info\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nfunction trackHasMovedEnough(info, x, y) {\n if (info.prevent) {\n return false;\n }\n if (info.started) {\n return true;\n }\n const dx = Math.abs(info.x - x);\n const dy = Math.abs(info.y - y);\n return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE;\n}\n\n/**\n * @param {!GestureInfo} info\n * @param {?EventTarget} target\n * @param {Touch} touch\n * @return {void}\n */\nfunction trackFire(info, target, touch) {\n if (!target) {\n return;\n }\n const secondlast = info.moves[info.moves.length - 2];\n const lastmove = info.moves[info.moves.length - 1];\n const dx = lastmove.x - info.x;\n const dy = lastmove.y - info.y;\n let ddx,\n ddy = 0;\n if (secondlast) {\n ddx = lastmove.x - secondlast.x;\n ddy = lastmove.y - secondlast.y;\n }\n _fire(target, 'track', {\n state: info.state,\n x: touch.clientX,\n y: touch.clientY,\n dx,\n dy,\n ddx,\n ddy,\n sourceEvent: touch,\n hover() {\n return deepTargetFind(touch.clientX, touch.clientY);\n },\n });\n}\n\nregister({\n name: 'tap',\n deps: ['mousedown', 'click', 'touchstart', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['click', 'touchend'],\n },\n emits: ['tap'],\n info: {\n x: NaN,\n y: NaN,\n prevent: false,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n this.info.x = NaN;\n this.info.y = NaN;\n this.info.prevent = false;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (hasLeftMouseButton(e)) {\n this.info.x = e.clientX;\n this.info.y = e.clientY;\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n click(e) {\n if (hasLeftMouseButton(e)) {\n trackForward(this.info, e);\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n const touch = e.changedTouches[0];\n this.info.x = touch.clientX;\n this.info.y = touch.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n trackForward(this.info, e.changedTouches[0], e);\n },\n});\n\n/**\n * @param {!GestureInfo} info\n * @param {Event | Touch} e\n * @param {Event=} preventer\n * @return {void}\n */\nfunction trackForward(info, e, preventer) {\n const dx = Math.abs(e.clientX - info.x);\n const dy = Math.abs(e.clientY - info.y);\n // Find original target from `preventer` for TouchEvents, or `e` for MouseEvents\n const t = _findOriginalTarget(preventer || e);\n if (!t || (canBeDisabled[/** @type {!HTMLElement} */ (t).localName] && t.hasAttribute('disabled'))) {\n return;\n }\n // Dx,dy can be NaN if `click` has been simulated and there was no `down` for `start`\n if (isNaN(dx) || isNaN(dy) || (dx <= TAP_DISTANCE && dy <= TAP_DISTANCE) || isSyntheticClick(e)) {\n // Prevent taps from being generated if an event has canceled them\n if (!info.prevent) {\n _fire(t, 'tap', {\n x: e.clientX,\n y: e.clientY,\n sourceEvent: e,\n preventer,\n });\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\n/**\n * A mixin to provide disabled property for field components.\n *\n * @polymerMixin\n */\nexport const DisabledMixin = dedupeMixin(\n (superclass) =>\n class DisabledMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * If true, the user cannot interact with this element.\n */\n disabled: {\n type: Boolean,\n value: false,\n observer: '_disabledChanged',\n reflectToAttribute: true,\n sync: true,\n },\n };\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _disabledChanged(disabled) {\n this._setAriaDisabled(disabled);\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _setAriaDisabled(disabled) {\n if (disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Overrides the default element `click` method in order to prevent\n * firing the `click` event when the element is disabled.\n * @protected\n * @override\n */\n click() {\n if (!this.disabled) {\n super.click();\n }\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\n/**\n * A mixin that manages keyboard handling.\n * The mixin subscribes to the keyboard events while an actual implementation\n * for the event handlers is left to the client (a component or another mixin).\n *\n * @polymerMixin\n */\nexport const KeyboardMixin = dedupeMixin(\n (superclass) =>\n class KeyboardMixinClass extends superclass {\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('keydown', (event) => {\n this._onKeyDown(event);\n });\n\n this.addEventListener('keyup', (event) => {\n this._onKeyUp(event);\n });\n }\n\n /**\n * A handler for the `keydown` event. By default, it calls\n * separate methods for handling \"Enter\" and \"Escape\" keys.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} event\n * @protected\n */\n _onKeyDown(event) {\n switch (event.key) {\n case 'Enter':\n this._onEnter(event);\n break;\n case 'Escape':\n this._onEscape(event);\n break;\n default:\n break;\n }\n }\n\n /**\n * A handler for the `keyup` event. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onKeyUp(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Enter\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEnter(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Escape\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEscape(_event) {\n // To be implemented.\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { addListener } from '@vaadin/component-base/src/gestures.js';\nimport { DisabledMixin } from './disabled-mixin.js';\nimport { KeyboardMixin } from './keyboard-mixin.js';\n\n/**\n * A mixin to toggle the `active` attribute.\n *\n * The attribute is set whenever the user activates the element by a pointer\n * or presses an activation key on the element from the keyboard.\n *\n * The attribute is removed as soon as the element is deactivated\n * by the pointer or by releasing the activation key.\n *\n * @polymerMixin\n * @mixes DisabledMixin\n * @mixes KeyboardMixin\n */\nexport const ActiveMixin = (superclass) =>\n class ActiveMixinClass extends DisabledMixin(KeyboardMixin(superclass)) {\n /**\n * An array of activation keys.\n *\n * See possible values here:\n * https://developer.mozilla.org/ru/docs/Web/API/KeyboardEvent/key/Key_Values\n *\n * @protected\n * @return {!Array<!string>}\n */\n get _activeKeys() {\n return [' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n addListener(this, 'down', (event) => {\n if (this._shouldSetActive(event)) {\n this._setActive(true);\n }\n });\n\n addListener(this, 'up', () => {\n this._setActive(false);\n });\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // When the element is disconnecting from the DOM at the moment being active,\n // the `active` attribute needs to be manually removed from the element.\n // Otherwise, it will preserve on the element until the element is activated once again.\n // The case reproduces for `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n this._setActive(false);\n }\n\n /**\n * @param {KeyboardEvent | MouseEvent} _event\n * @protected\n */\n _shouldSetActive(_event) {\n return !this.disabled;\n }\n\n /**\n * Sets the `active` attribute on the element if an activation key is pressed.\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (this._shouldSetActive(event) && this._activeKeys.includes(event.key)) {\n this._setActive(true);\n\n // Element can become hidden before the `keyup` event, e.g. on button click.\n // Use document listener to ensure `active` attribute is removed correctly.\n document.addEventListener(\n 'keyup',\n (e) => {\n if (this._activeKeys.includes(e.key)) {\n this._setActive(false);\n }\n },\n { once: true },\n );\n }\n }\n\n /**\n * Toggles the `active` attribute on the element.\n *\n * @param {boolean} active\n * @protected\n */\n _setActive(active) {\n this.toggleAttribute('active', active);\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n// We consider the keyboard to be active if the window has received a keydown\n// event since the last mousedown event.\nlet keyboardActive = false;\n\n// Listen for top-level keydown and mousedown events.\n// Use capture phase so we detect events even if they're handled.\nwindow.addEventListener(\n 'keydown',\n () => {\n keyboardActive = true;\n },\n { capture: true },\n);\n\nwindow.addEventListener(\n 'mousedown',\n () => {\n keyboardActive = false;\n },\n { capture: true },\n);\n\n/**\n * Returns the actually focused element by traversing shadow\n * trees recursively to ensure it's the leaf element.\n *\n * @return {Element}\n */\nexport function getDeepActiveElement() {\n let host = document.activeElement || document.body;\n while (host.shadowRoot && host.shadowRoot.activeElement) {\n host = host.shadowRoot.activeElement;\n }\n return host;\n}\n\n/**\n * Returns true if the window has received a keydown\n * event since the last mousedown event.\n *\n * @return {boolean}\n */\nexport function isKeyboardActive() {\n return keyboardActive;\n}\n\n/**\n * Returns true if the element is hidden directly with `display: none` or `visibility: hidden`,\n * false otherwise.\n *\n * The method doesn't traverse the element's ancestors, it only checks for the CSS properties\n * set directly to or inherited by the element.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nfunction isElementHiddenDirectly(element) {\n // Check inline style first to save a re-flow.\n const style = element.style;\n if (style.visibility === 'hidden' || style.display === 'none') {\n return true;\n }\n\n const computedStyle = window.getComputedStyle(element);\n if (computedStyle.visibility === 'hidden' || computedStyle.display === 'none') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns if element `a` has lower tab order compared to element `b`\n * (both elements are assumed to be focusable and tabbable).\n * Elements with tabindex = 0 have lower tab order compared to elements\n * with tabindex > 0.\n * If both have same tabindex, it returns false.\n *\n * @param {HTMLElement} a\n * @param {HTMLElement} b\n * @return {boolean}\n */\nfunction hasLowerTabOrder(a, b) {\n // Normalize tabIndexes\n // e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`\n const ati = Math.max(a.tabIndex, 0);\n const bti = Math.max(b.tabIndex, 0);\n return ati === 0 || bti === 0 ? bti > ati : ati > bti;\n}\n\n/**\n * Merge sort iterator, merges the two arrays into one, sorted by tabindex.\n *\n * @param {HTMLElement[]} left\n * @param {HTMLElement[]} right\n * @return {HTMLElement[]}\n */\nfunction mergeSortByTabIndex(left, right) {\n const result = [];\n while (left.length > 0 && right.length > 0) {\n if (hasLowerTabOrder(left[0], right[0])) {\n result.push(right.shift());\n } else {\n result.push(left.shift());\n }\n }\n\n return result.concat(left, right);\n}\n\n/**\n * Sorts an array of elements by tabindex. Returns a new array.\n *\n * @param {HTMLElement[]} elements\n * @return {HTMLElement[]}\n */\nfunction sortElementsByTabIndex(elements) {\n // Implement a merge sort as Array.prototype.sort does a non-stable sort\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\n const len = elements.length;\n if (len < 2) {\n return elements;\n }\n const pivot = Math.ceil(len / 2);\n const left = sortElementsByTabIndex(elements.slice(0, pivot));\n const right = sortElementsByTabIndex(elements.slice(pivot));\n\n return mergeSortByTabIndex(left, right);\n}\n\n/**\n * Returns true if the element is hidden, false otherwise.\n *\n * An element is treated as hidden when any of the following conditions are met:\n * - the element itself or one of its ancestors has `display: none`.\n * - the element has or inherits `visibility: hidden`.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementHidden(element) {\n if (element.checkVisibility) {\n return !element.checkVisibility({ visibilityProperty: true });\n }\n\n // TODO: checkVisibility is supported only from Safari 17.4, so we still need to\n // keep the custom implementation as a fallback for older versions until Vaadin 25:\n\n // `offsetParent` is `null` when the element itself\n // or one of its ancestors is hidden with `display: none`.\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n // However `offsetParent` is also null when the element is using fixed\n // positioning, so additionally check if the element takes up layout space.\n if (element.offsetParent === null && element.clientWidth === 0 && element.clientHeight === 0) {\n return true;\n }\n\n return isElementHiddenDirectly(element);\n}\n\n/**\n * Returns true if the element is focusable, otherwise false.\n *\n * The list of focusable elements is taken from http://stackoverflow.com/a/1600194/4228703.\n * However, there isn't a definite list, it's up to the browser.\n * The only standard we have is DOM Level 2 HTML https://www.w3.org/TR/DOM-Level-2-HTML/html.html,\n * according to which the only elements that have a `focus()` method are:\n * - HTMLInputElement\n * - HTMLSelectElement\n * - HTMLTextAreaElement\n * - HTMLAnchorElement\n *\n * This notably omits HTMLButtonElement and HTMLAreaElement.\n * Referring to these tests with tabbables in different browsers\n * http://allyjs.io/data-tables/focusable.html\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementFocusable(element) {\n // The element cannot be focused if its `tabindex` attribute is set to `-1`.\n if (element.matches('[tabindex=\"-1\"]')) {\n return false;\n }\n\n // Elements that cannot be focused if they have a `disabled` attribute.\n if (element.matches('input, select, textarea, button, object')) {\n return element.matches(':not([disabled])');\n }\n\n // Elements that can be focused even if they have a `disabled` attribute.\n return element.matches('a[href], area[href], iframe, [tabindex], [contentEditable]');\n}\n\n/**\n * Returns true if the element is focused, false otherwise.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementFocused(element) {\n return element.getRootNode().activeElement === element;\n}\n\n/**\n * Returns the normalized element tabindex. If not focusable, returns -1.\n * It checks for the attribute \"tabindex\" instead of the element property\n * `tabIndex` since browsers assign different values to it.\n * e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`\n *\n * @param {HTMLElement} element\n * @return {number}\n */\nfunction normalizeTabIndex(element) {\n if (!isElementFocusable(element)) {\n return -1;\n }\n\n const tabIndex = element.getAttribute('tabindex') || 0;\n return Number(tabIndex);\n}\n\n/**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n *\n * @param {Node} node The starting point for the search; added to `result` if tabbable.\n * @param {HTMLElement[]} result\n * @return {boolean}\n * @private\n */\nfunction collectFocusableNodes(node, result) {\n if (node.nodeType !== Node.ELEMENT_NODE || isElementHiddenDirectly(node)) {\n // Don't traverse children if the node is not an HTML element or not visible.\n return false;\n }\n\n const element = /** @type {HTMLElement} */ (node);\n const tabIndex = normalizeTabIndex(element);\n let needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n let children = [];\n if (element.localName === 'slot') {\n children = element.assignedNodes({ flatten: true });\n } else {\n // Use shadow root if possible, will check for distributed nodes.\n children = (element.shadowRoot || element).children;\n }\n [...children].forEach((child) => {\n // Ensure method is always invoked to collect focusable children.\n needsSort = collectFocusableNodes(child, result) || needsSort;\n });\n return needsSort;\n}\n\n/**\n * Returns a tab-ordered array of focusable elements for a root element.\n * The resulting array will include the root element if it is focusable.\n *\n * The method traverses nodes in shadow DOM trees too if any.\n *\n * @param {HTMLElement} element\n * @return {HTMLElement[]}\n */\nexport function getFocusableElements(element) {\n const focusableElements = [];\n const needsSortByTabIndex = collectFocusableNodes(element, focusableElements);\n // If there is at least one element with tabindex > 0,\n // we need to sort the final array by tabindex.\n if (needsSortByTabIndex) {\n return sortElementsByTabIndex(focusableElements);\n }\n return focusableElements;\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { isKeyboardActive } from './focus-utils.js';\n\n/**\n * A mixin to handle `focused` and `focus-ring` attributes based on focus.\n *\n * @polymerMixin\n */\nexport const FocusMixin = dedupeMixin(\n (superclass) =>\n class FocusMixinClass extends superclass {\n /**\n * @protected\n * @return {boolean}\n */\n get _keyboardActive() {\n return isKeyboardActive();\n }\n\n /** @protected */\n ready() {\n this.addEventListener('focusin', (e) => {\n if (this._shouldSetFocus(e)) {\n this._setFocused(true);\n }\n });\n\n this.addEventListener('focusout', (e) => {\n if (this._shouldRemoveFocus(e)) {\n this._setFocused(false);\n }\n });\n\n // In super.ready() other 'focusin' and 'focusout' listeners might be\n // added, so we call it after our own ones to ensure they execute first.\n // Issue to watch out: when incorrect, <vaadin-combo-box> refocuses the\n // input field on iOS after \"Done\" is pressed.\n super.ready();\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // In non-Chrome browsers, blur does not fire on the element when it is disconnected.\n // reproducible in `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n if (this.hasAttribute('focused')) {\n this._setFocused(false);\n }\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n super.focus(options);\n\n // Set focus-ring attribute on programmatic focus by default\n // unless explicitly disabled by `{ focusVisible: false }`.\n if (!(options && options.focusVisible === false)) {\n this.setAttribute('focus-ring', '');\n }\n }\n\n /**\n * Override to change how focused and focus-ring attributes are set.\n *\n * @param {boolean} focused\n * @protected\n */\n _setFocused(focused) {\n this.toggleAttribute('focused', focused);\n\n // Focus-ring is true when the element was focused from the keyboard.\n // Focus Ring [A11ycasts]: https://youtu.be/ilj2P5-5CjI\n this.toggleAttribute('focus-ring', focused && this._keyboardActive);\n }\n\n /**\n * Override to define if the field receives focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldSetFocus(_event) {\n return true;\n }\n\n /**\n * Override to define if the field loses focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(_event) {\n return true;\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\n\n/**\n * A mixin providing `focused`, `focus-ring`, `active`, `disabled` and `selected`.\n *\n * `focused`, `active` and `focus-ring` are set as only as attributes.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n */\nexport const ItemMixin = (superClass) =>\n class VaadinItemMixin extends ActiveMixin(FocusMixin(superClass)) {\n static get properties() {\n return {\n /**\n * Used for mixin detection because `instanceof` does not work with mixins.\n * e.g. in VaadinListMixin it filters items by using the\n * `element._hasVaadinItemMixin` condition.\n */\n _hasVaadinItemMixin: {\n value: true,\n },\n\n /**\n * If true, the item is in selected state.\n */\n selected: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_selectedChanged',\n sync: true,\n },\n\n /** @private */\n _value: String,\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the item is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-1/menubar-1.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /**\n * Submittable string value. The default value is the trimmed text content of the element.\n * @type {string}\n */\n get value() {\n return this._value !== undefined ? this._value : this.textContent.trim();\n }\n\n set value(value) {\n this._value = value;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n const attrValue = this.getAttribute('value');\n if (attrValue !== null) {\n this.value = attrValue;\n }\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n if (this.disabled) {\n return;\n }\n\n super.focus(options);\n }\n\n /**\n * @param {KeyboardEvent | MouseEvent} event\n * @protected\n * @override\n */\n _shouldSetActive(event) {\n return !this.disabled && !(event.type === 'keydown' && event.defaultPrevented);\n }\n\n /** @private */\n _selectedChanged(selected) {\n this.setAttribute('aria-selected', selected);\n }\n\n /**\n * Override an observer from `DisabledMixin`.\n * @protected\n * @override\n */\n _disabledChanged(disabled) {\n super._disabledChanged(disabled);\n\n if (disabled) {\n this.selected = false;\n this.blur();\n }\n }\n\n /**\n * In order to be fully accessible from the keyboard, the item should\n * manually fire the `click` event once an activation key is pressed.\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (this._activeKeys.includes(event.key) && !event.defaultPrevented) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * WARNING: For internal use only. Do not use this class in custom components.\n *\n * @private\n */\nexport class CSSPropertyObserver extends EventTarget {\n #root;\n #properties = new Set();\n #styleSheet;\n #isConnected = false;\n\n constructor(root) {\n super();\n this.#root = root;\n this.#styleSheet = new CSSStyleSheet();\n }\n\n #handleTransitionEvent(event) {\n const { propertyName } = event;\n if (this.#properties.has(propertyName)) {\n this.dispatchEvent(new CustomEvent('property-changed', { detail: { propertyName } }));\n }\n }\n\n observe(property) {\n this.connect();\n\n if (this.#properties.has(property)) {\n return;\n }\n\n this.#properties.add(property);\n\n this.#styleSheet.replaceSync(`\n :root::before, :host::before {\n content: '' !important;\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n visibility: hidden !important;\n transition: 1ms allow-discrete step-end !important;\n transition-property: ${[...this.#properties].join(', ')} !important;\n }\n `);\n }\n\n connect() {\n if (this.#isConnected) {\n return;\n }\n\n this.#root.adoptedStyleSheets.unshift(this.#styleSheet);\n\n this.#rootHost.addEventListener('transitionstart', (event) => this.#handleTransitionEvent(event));\n this.#rootHost.addEventListener('transitionend', (event) => this.#handleTransitionEvent(event));\n\n this.#isConnected = true;\n }\n\n disconnect() {\n this.#properties.clear();\n\n this.#root.adoptedStyleSheets = this.#root.adoptedStyleSheets.filter((s) => s !== this.#styleSheet);\n\n this.#rootHost.removeEventListener('transitionstart', this.#handleTransitionEvent);\n this.#rootHost.removeEventListener('transitionend', this.#handleTransitionEvent);\n\n this.#isConnected = false;\n }\n\n get #rootHost() {\n return this.#root.documentElement ?? this.#root.host;\n }\n\n /**\n * Gets or creates the CSSPropertyObserver for the given root.\n * @param {DocumentOrShadowRoot} root\n * @returns {CSSPropertyObserver}\n */\n static for(root) {\n root.__cssPropertyObserver ||= new CSSPropertyObserver(root);\n return root.__cssPropertyObserver;\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { adoptStyles } from 'lit';\n\n/**\n * Returns the effective styles that should apply to the component\n * in the correct order, to place injected stylesheet after styles\n * defined with `static styles` and before any custom theme styles\n * that the user provided using `registerStyles()` function.\n *\n * @param {HTMLElement} component\n * @return {CSSStyleSheet[]}\n */\nfunction getEffectiveStyles(component) {\n const { baseStyles, themeStyles, elementStyles, lumoInjector } = component.constructor;\n const lumoStyleSheet = component.__lumoStyleSheet;\n\n if (lumoStyleSheet && (baseStyles || themeStyles)) {\n return [...(lumoInjector.includeBaseStyles ? baseStyles : []), lumoStyleSheet, ...themeStyles];\n }\n\n return [lumoStyleSheet, ...elementStyles].filter(Boolean);\n}\n\n/**\n * Apply styles on the instance of the component in the correct order.\n *\n * @param {HTMLElement} component\n */\nexport function applyInstanceStyles(component) {\n adoptStyles(component.shadowRoot, getEffectiveStyles(component));\n}\n\n/**\n * Injects the given stylesheet into the shadow root of the component\n * through the adoptedStyleSheets API. This will override any styles\n * that were injected previously since we only expect one stylesheet\n * to be injected into each component.\n *\n * @param {HTMLElement} component\n * @param {CSSStyleSheet} styleSheet\n */\nexport function injectLumoStyleSheet(component, styleSheet) {\n // Store the new stylesheet so that it can be removed later.\n component.__lumoStyleSheet = styleSheet;\n applyInstanceStyles(component);\n}\n\n/**\n * Removes the stylesheet from the component's shadow root that was added\n * by the `injectLumoStyleSheet` function.\n *\n * @param {HTMLElement} component\n */\nexport function removeLumoStyleSheet(component) {\n component.__lumoStyleSheet = undefined;\n applyInstanceStyles(component);\n}\n","/**\n * @license\n * Copyright (c) 2000 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nconst issuedWarnings = new Set();\n\n/**\n * Issues a warning in the browser console if it has not been issued before.\n * @param {string} warning\n */\nexport function issueWarning(warning) {\n if (issuedWarnings.has(warning)) {\n return;\n }\n\n issuedWarnings.add(warning);\n console.warn(warning);\n}\n\n/**\n * Clears all issued warnings. Only intended for testing purposes.\n */\nexport function clearWarnings() {\n issuedWarnings.clear();\n}\n","/**\n * @license\n * Copyright (c) 2000 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { issueWarning } from '@vaadin/component-base/src/warnings.js';\n\n/** @type {WeakMap<CSSStyleSheet, Record<string, Map>>} */\nconst cache = new WeakMap();\n\nfunction getRuleMediaText(rule) {\n try {\n return rule.media.mediaText;\n } catch {\n issueWarning(\n '[LumoInjector] Browser denied to access property \"mediaText\" for some CSS rules, so they were skipped.',\n );\n return '';\n }\n}\n\nfunction getStyleSheetRules(styleSheet) {\n try {\n return styleSheet.cssRules;\n } catch {\n issueWarning(\n '[LumoInjector] Browser denied to access property \"cssRules\" for some CSS stylesheets, so they were skipped.',\n );\n return [];\n }\n}\n\nfunction parseStyleSheet(\n styleSheet,\n result = {\n tags: new Map(),\n modules: new Map(),\n },\n) {\n for (const rule of getStyleSheetRules(styleSheet)) {\n if (rule instanceof CSSImportRule) {\n const mediaText = getRuleMediaText(rule);\n if (mediaText.startsWith('lumo_')) {\n result.modules.set(mediaText, [...rule.styleSheet.cssRules]);\n } else {\n parseStyleSheet(rule.styleSheet, result);\n }\n\n continue;\n }\n\n if (rule instanceof CSSMediaRule) {\n const mediaText = getRuleMediaText(rule);\n if (mediaText.startsWith('lumo_')) {\n result.modules.set(mediaText, [...rule.cssRules]);\n }\n\n continue;\n }\n\n if (rule instanceof CSSStyleRule && rule.cssText.includes('-inject')) {\n for (const property of rule.style) {\n const tagName = property.match(/^--_lumo-(.*)-inject-modules$/u)?.[1];\n if (!tagName) {\n continue;\n }\n\n const value = rule.style.getPropertyValue(property);\n\n result.tags.set(\n tagName,\n value.split(',').map((module) => module.trim().replace(/'|\"/gu, '')),\n );\n }\n\n continue;\n }\n }\n\n return result;\n}\n\n/**\n * Parses the provided CSSStyleSheet objects and returns an object with\n * tag-to-modules mappings and module rules.\n *\n * Modules are defined using CSS media rules with names starting with `lumo_`:\n *\n * ```css\n * \\@media lumo_base-field {\n * #label {\n * color: gray;\n * }\n * }\n *\n * \\@media lumo_text-field {\n * #input {\n * color: yellow;\n * }\n * }\n * ```\n *\n * Also, an entire CSS import can be defined as a module:\n *\n * ```css\n * \\@import 'lumo-base-field.css' lumo_base-field;\n * ```\n *\n * Tag-to-modules mappings are defined as CSS custom properties that list\n * the module names to be applied to specific tags, e.g. `vaadin-text-field`:\n *\n * ```css\n * html {\n * --_lumo-vaadin-text-field-inject-modules:\n * lumo_base-field,\n * lumo_text-field;\n * }\n * ```\n *\n * Example output:\n *\n * ```js\n * {\n * tags: Map {\n * 'vaadin-text-field': ['lumo_base-field', 'lumo_text-field']\n * },\n * modules: Map {\n * 'lumo_base-field': [CSSStyleRule],\n * 'lumo_text-field': [CSSStyleRule]\n * }\n * }\n * ```\n *\n * @param {CSSStyleSheet[]} styleSheets - An array of CSSStyleSheet objects to parse.\n * @return {{tags: Map<string, string[]>, modules: Map<string, CSSRule[]>}}\n */\nexport function parseStyleSheets(styleSheets) {\n let tags = new Map();\n let modules = new Map();\n\n for (const styleSheet of styleSheets) {\n let result = cache.get(styleSheet);\n if (!result) {\n result = parseStyleSheet(styleSheet);\n cache.set(styleSheet, result);\n }\n\n tags = new Map([...tags, ...result.tags]);\n modules = new Map([...modules, ...result.modules]);\n }\n\n return { tags, modules };\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { CSSPropertyObserver } from './css-property-observer.js';\nimport { injectLumoStyleSheet, removeLumoStyleSheet } from './css-utils.js';\nimport { parseStyleSheets } from './lumo-modules.js';\n\nexport function getLumoInjectorPropName(lumoInjector) {\n return `--_lumo-${lumoInjector.is}-inject`;\n}\n\n/**\n * Implements auto-injection of CSS styles from document style sheets\n * into the Shadow DOM of corresponding Vaadin components.\n *\n * Styles to be injected are defined as reusable modules using the\n * following syntax, based on media queries and custom properties:\n *\n * ```css\n * \\@media lumo_base-field {\n * #label {\n * color: gray;\n * }\n * }\n *\n * \\@media lumo_text-field {\n * #input {\n * color: yellow;\n * }\n * }\n *\n * \\@media lumo_email-field {\n * #input {\n * color: green;\n * }\n * }\n *\n * html {\n * --_lumo-vaadin-text-field-inject: 1;\n * --_lumo-vaadin-text-field-inject-modules:\n * lumo_base-field,\n * lumo_text-field;\n *\n * --_lumo-vaadin-email-field-inject: 1;\n * --_lumo-vaadin-email-field-inject-modules:\n * lumo_base-field,\n * lumo_email-field;\n * }\n * ```\n *\n * The class observes the custom property `--_lumo-{tagName}-inject`,\n * which indicates whether styles are present for the given component\n * in the document style sheets. When the property is set to `1`, the\n * class recursively searches all document style sheets for CSS modules\n * listed in the `--_lumo-{tagName}-inject-modules` property that apply to\n * the given component tag name. The found rules are then injected\n * into the component's Shadow DOM using the `adoptedStyleSheets` API,\n * in the order specified in the `--_lumo-{tagName}-inject-modules` property.\n * The same module can be used in multiple components.\n *\n * The class also removes the injected styles when the property is set to `0`.\n *\n * If a root element is provided, the class will additionally search for\n * CSS modules in the root element's style sheets. This is useful for\n * embedded Flow applications that are fully isolated from the main document\n * and load styles into a component’s Shadow DOM instead of the main document.\n *\n * WARNING: For internal use only. Do not use this class in custom components.\n *\n * @private\n */\nexport class LumoInjector {\n /** @type {Document | ShadowRoot} */\n #root;\n\n /** @type {CSSPropertyObserver} */\n #cssPropertyObserver;\n\n /** @type {Map<string, CSSStyleSheet>} */\n #styleSheetsByTag = new Map();\n\n /** @type {Map<string, Set<HTMLElement>>} */\n #componentsByTag = new Map();\n\n constructor(root = document) {\n this.#root = root;\n this.handlePropertyChange = this.handlePropertyChange.bind(this);\n this.#cssPropertyObserver = CSSPropertyObserver.for(root);\n this.#cssPropertyObserver.addEventListener('property-changed', this.handlePropertyChange);\n }\n\n disconnect() {\n this.#cssPropertyObserver.removeEventListener('property-changed', this.handlePropertyChange);\n this.#styleSheetsByTag.clear();\n this.#componentsByTag.values().forEach((components) => components.forEach(removeLumoStyleSheet));\n }\n\n /**\n * Forces all monitored components to re-evaluate and update their\n * injected styles.\n *\n * This method can be used to force LumoInjector to clean up component\n * styles synchonously after the Lumo stylesheet has been removed from\n * the root element. Without this, there may be a short FOUC, when the\n * Lumo styles are already removed from the root but still present in\n * the component Shadow DOMs, since those are removed asynchronously on\n * `transitionstart` (CSSPropertyObserver).\n */\n forceUpdate() {\n for (const tagName of this.#styleSheetsByTag.keys()) {\n this.#updateStyleSheet(tagName);\n }\n }\n\n /**\n * Adds a component to the list of elements monitored for style injection.\n * If the styles have already been detected, they are injected into the\n * component's shadow DOM immediately. Otherwise, the class watches the\n * custom property `--_lumo-{tagName}-inject` to trigger injection when\n * the styles are added to the document or root element.\n *\n * @param {HTMLElement} component\n */\n componentConnected(component) {\n const { lumoInjector } = component.constructor;\n const { is: tagName } = lumoInjector;\n\n this.#componentsByTag.set(tagName, this.#componentsByTag.get(tagName) ?? new Set());\n this.#componentsByTag.get(tagName).add(component);\n\n const stylesheet = this.#styleSheetsByTag.get(tagName);\n if (stylesheet) {\n if (stylesheet.cssRules.length > 0) {\n injectLumoStyleSheet(component, stylesheet);\n }\n return;\n }\n\n this.#initStyleSheet(tagName);\n\n const propName = getLumoInjectorPropName(lumoInjector);\n this.#cssPropertyObserver.observe(propName);\n }\n\n /**\n * Removes the component from the list of elements monitored for\n * style injection and cleans up any previously injected styles.\n *\n * @param {HTMLElement} component\n */\n componentDisconnected(component) {\n const { is: tagName } = component.constructor.lumoInjector;\n this.#componentsByTag.get(tagName)?.delete(component);\n\n removeLumoStyleSheet(component);\n }\n\n handlePropertyChange(event) {\n const { propertyName } = event.detail;\n const tagName = propertyName.match(/^--_lumo-(.*)-inject$/u)?.[1];\n if (tagName) {\n this.#updateStyleSheet(tagName);\n }\n }\n\n #initStyleSheet(tagName) {\n this.#styleSheetsByTag.set(tagName, new CSSStyleSheet());\n this.#updateStyleSheet(tagName);\n }\n\n #updateStyleSheet(tagName) {\n const { tags, modules } = parseStyleSheets(this.#rootStyleSheets);\n\n const cssText = (tags.get(tagName) ?? [])\n .flatMap((moduleName) => modules.get(moduleName) ?? [])\n .map((rule) => rule.cssText)\n .join('\\n');\n\n const stylesheet = this.#styleSheetsByTag.get(tagName);\n stylesheet.replaceSync(cssText);\n\n this.#componentsByTag.get(tagName)?.forEach((component) => {\n if (cssText) {\n injectLumoStyleSheet(component, stylesheet);\n } else {\n removeLumoStyleSheet(component);\n }\n });\n }\n\n get #rootStyleSheets() {\n let styleSheets = new Set();\n\n for (const root of [this.#root, document]) {\n styleSheets = styleSheets.union(new Set(root.styleSheets));\n styleSheets = styleSheets.union(new Set(root.adoptedStyleSheets));\n }\n\n return [...styleSheets];\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getLumoInjectorPropName, LumoInjector } from './src/lumo-injector.js';\n\n/**\n * @type {Set<string>}\n */\nconst registeredProperties = new Set();\n\n/**\n * Find enclosing root for given element to gather style rules from.\n *\n * @param {HTMLElement} element\n * @return {DocumentOrShadowRoot}\n */\nexport function findRoot(element) {\n const root = element.getRootNode();\n\n if (root.host && root.host.constructor.version) {\n return findRoot(root.host);\n }\n\n return root;\n}\n\n/**\n * Mixin for internal use only. Do not use it in custom components.\n *\n * @polymerMixin\n */\nexport const LumoInjectionMixin = (superClass) =>\n class LumoInjectionMixinClass extends superClass {\n static finalize() {\n super.finalize();\n\n const propName = getLumoInjectorPropName(this.lumoInjector);\n\n // Prevent registering same property twice when a class extends\n // another class using this mixin, since `finalize()` is called\n // by LitElement for all superclasses in the prototype chain.\n if (this.is && !registeredProperties.has(propName)) {\n registeredProperties.add(propName);\n\n // Initialize custom property for this class with 0 as default\n // so that changing it to 1 would inject styles to instances\n // Use `inherits: true` so that property defined on `<html>`\n // would apply to components instances within shadow roots\n CSS.registerProperty({\n name: propName,\n syntax: '<number>',\n inherits: true,\n initialValue: '0',\n });\n }\n }\n\n static get lumoInjector() {\n return {\n is: this.is,\n includeBaseStyles: false,\n };\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n const root = findRoot(this);\n\n // Do not initialize LumoInjector if it's disabled at the root.\n // For example, Copilot does this because it uses its own styles\n // on top of the base styles, and Lumo injection would interfere.\n if (root.__lumoInjectorDisabled) {\n return;\n }\n\n if (this.isConnected) {\n root.__lumoInjector ||= new LumoInjector(root);\n this.__lumoInjector = root.__lumoInjector;\n this.__lumoInjector.componentConnected(this);\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Check if LumoInjector is defined. It might be unavailable if the component\n // is moved within the DOM during connectedCallback and becomes disconnected\n // before LumoInjector is assigned.\n if (this.__lumoInjector) {\n this.__lumoInjector.componentDisconnected(this);\n this.__lumoInjector = undefined;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n/**\n * @polymerMixin\n */\nexport const ThemePropertyMixin = (superClass) =>\n class VaadinThemePropertyMixin extends superClass {\n static get properties() {\n return {\n /**\n * Helper property with theme attribute value facilitating propagation\n * in shadow DOM.\n *\n * Enables the component implementation to propagate the `theme`\n * attribute value to the sub-components in Shadow DOM by binding\n * the sub-component's \"theme\" attribute using the Lit template:\n *\n * ```html\n * <vaadin-notification-card\n * theme=\"${ifDefined(this._theme)}\"\n * ></vaadin-notification-card>\n * ```\n *\n * @protected\n */\n _theme: {\n type: String,\n readOnly: true,\n },\n };\n }\n\n static get observedAttributes() {\n return [...super.observedAttributes, 'theme'];\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n\n if (name === 'theme') {\n this._set_theme(newValue);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css, CSSResult, LitElement, unsafeCSS } from 'lit';\nimport { applyInstanceStyles } from './src/css-utils.js';\nimport { ThemePropertyMixin } from './vaadin-theme-property-mixin.js';\n\nexport { css, unsafeCSS };\n\n/**\n * @typedef {Object} Theme\n * @property {string} themeFor\n * @property {CSSResult[]} styles\n * @property {string | string[]} [include]\n * @property {string} [moduleId]\n *\n * @typedef {CSSResult[] | CSSResult} CSSResultGroup\n */\n\n/**\n * @type {Theme[]}\n */\nconst themeRegistry = [];\n\n/**\n * @type {WeakRef<HTMLElement>[]}\n */\nconst themableInstances = new Set();\n\n/**\n * @type {string[]}\n */\nconst themableTagNames = new Set();\n\n/**\n * Check if the custom element type has themes applied.\n * @param {Function} elementClass\n * @returns {boolean}\n */\nfunction classHasThemes(elementClass) {\n return elementClass && Object.prototype.hasOwnProperty.call(elementClass, '__themes');\n}\n\n/**\n * Check if the custom element type has themes applied.\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction hasThemes(tagName) {\n return classHasThemes(customElements.get(tagName));\n}\n\n/**\n * Flattens the styles into a single array of styles.\n * @param {CSSResultGroup} styles\n * @returns {CSSResult[]}\n */\nfunction flattenStyles(styles = []) {\n return [styles].flat(Infinity).filter((style) => {\n if (style instanceof CSSResult) {\n return true;\n }\n console.warn('An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.');\n return false;\n });\n}\n\n/**\n * Returns true if the themeFor string matches the tag name\n * @param {string} themeFor\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction matchesThemeFor(themeFor, tagName) {\n return (themeFor || '').split(' ').some((themeForToken) => {\n return new RegExp(`^${themeForToken.split('*').join('.*')}$`, 'u').test(tagName);\n });\n}\n\n/**\n * Returns the CSS text content from an array of CSSResults\n * @param {CSSResult[]} styles\n * @returns {string}\n */\nfunction getCssText(styles) {\n return styles.map((style) => style.cssText).join('\\n');\n}\n\nconst STYLE_ID = 'vaadin-themable-mixin-style';\n\n/**\n * Includes the styles to the template.\n * @param {CSSResult[]} styles\n * @param {HTMLTemplateElement} template\n */\nfunction addStylesToTemplate(styles, template) {\n const styleEl = document.createElement('style');\n styleEl.id = STYLE_ID;\n styleEl.textContent = getCssText(styles);\n template.content.appendChild(styleEl);\n}\n\n/**\n * Dynamically updates the styles of the given component instance.\n * @param {HTMLElement} instance\n */\nfunction updateInstanceStyles(instance) {\n if (!instance.shadowRoot) {\n return;\n }\n\n const componentClass = instance.constructor;\n\n if (instance instanceof LitElement) {\n // LitElement\n applyInstanceStyles(instance);\n } else {\n // PolymerElement\n\n // Update style element content in the shadow root\n const style = instance.shadowRoot.getElementById(STYLE_ID);\n const template = componentClass.prototype._template;\n style.textContent = template.content.getElementById(STYLE_ID).textContent;\n }\n}\n\n/**\n * Dynamically updates the styles of the instances matching the given component type.\n * @param {Function} componentClass\n */\nfunction updateInstanceStylesOfType(componentClass) {\n // Iterate over component instances and update their styles if needed\n themableInstances.forEach((ref) => {\n const instance = ref.deref();\n if (instance instanceof componentClass) {\n updateInstanceStyles(instance);\n } else if (!instance) {\n // Clean up the weak reference to a GC'd instance\n themableInstances.delete(ref);\n }\n });\n}\n\n/**\n * Dynamically updates the styles of the given component type.\n * @param {Function} componentClass\n */\nfunction updateComponentStyles(componentClass) {\n if (componentClass.prototype instanceof LitElement) {\n // Update LitElement-based component's elementStyles\n componentClass.elementStyles = componentClass.finalizeStyles(componentClass.styles);\n } else {\n // Update Polymer-based component's template\n const template = componentClass.prototype._template;\n template.content.getElementById(STYLE_ID).textContent = getCssText(componentClass.getStylesForThis());\n }\n\n // Update the styles of inheriting types\n themableTagNames.forEach((inheritingTagName) => {\n const inheritingClass = customElements.get(inheritingTagName);\n if (inheritingClass !== componentClass && inheritingClass.prototype instanceof componentClass) {\n updateComponentStyles(inheritingClass);\n }\n });\n}\n\n/**\n * Check if the component type already has a style matching the given styles.\n *\n * @param {Function} componentClass\n * @param {CSSResultGroup} styles\n * @returns {boolean}\n */\nfunction hasMatchingStyle(componentClass, styles) {\n const themes = componentClass.__themes;\n if (!themes || !styles) {\n return false;\n }\n\n return themes.some((theme) =>\n theme.styles.some((themeStyle) => styles.some((style) => style.cssText === themeStyle.cssText)),\n );\n}\n\n/**\n * Registers CSS styles for a component type. Make sure to register the styles before\n * the first instance of a component of the type is attached to DOM.\n *\n * @param {string} themeFor The local/tag name of the component type to register the styles for\n * @param {CSSResultGroup} styles The CSS style rules to be registered for the component type\n * matching themeFor and included in the local scope of each component instance\n * @param {{moduleId?: string, include?: string | string[]}} options Additional options\n * @return {void}\n */\nexport function registerStyles(themeFor, styles, options = {}) {\n styles = flattenStyles(styles);\n\n themeRegistry.push({\n themeFor,\n styles,\n include: options.include,\n moduleId: options.moduleId,\n });\n\n if (themeFor) {\n // Update styles of the component types that match themeFor and have already been finalized\n themableTagNames.forEach((tagName) => {\n if (matchesThemeFor(themeFor, tagName) && hasThemes(tagName)) {\n const componentClass = customElements.get(tagName);\n\n if (hasMatchingStyle(componentClass, styles)) {\n // Show a warning if the component type already has some of the given styles\n console.warn(`Registering styles that already exist for ${tagName}`);\n } else if (!window.Vaadin || !window.Vaadin.suppressPostFinalizeStylesWarning) {\n // Show a warning if the component type has already been finalized\n console.warn(\n `The custom element definition for \"${tagName}\" ` +\n `was finalized before a style module was registered. ` +\n `Ideally, import component specific style modules before ` +\n `importing the corresponding custom element. ` +\n `This warning can be suppressed by setting \"window.Vaadin.suppressPostFinalizeStylesWarning = true\".`,\n );\n }\n\n // Update the styles of the component type\n updateComponentStyles(componentClass);\n // Update the styles of the component instances matching the component type\n updateInstanceStylesOfType(componentClass);\n }\n });\n }\n}\n\n/**\n * Maps the moduleName to an include priority number which is used for\n * determining the order in which styles are applied.\n * @param {string} moduleName\n * @returns {number}\n */\nfunction getIncludePriority(moduleName = '') {\n let includePriority = 0;\n if (moduleName.startsWith('lumo-') || moduleName.startsWith('material-')) {\n includePriority = 1;\n } else if (moduleName.startsWith('vaadin-')) {\n includePriority = 2;\n }\n return includePriority;\n}\n\n/**\n * Gets an array of CSSResults matching the include property of the theme.\n * @param {Theme} theme\n * @returns {CSSResult[]}\n */\nfunction getIncludedStyles(theme) {\n const includedStyles = [];\n if (theme.include) {\n [].concat(theme.include).forEach((includeModuleId) => {\n const includedTheme = themeRegistry.find((s) => s.moduleId === includeModuleId);\n if (includedTheme) {\n includedStyles.push(...getIncludedStyles(includedTheme), ...includedTheme.styles);\n } else {\n console.warn(`Included moduleId ${includeModuleId} not found in style registry`);\n }\n }, theme.styles);\n }\n return includedStyles;\n}\n\n/**\n * Returns an array of themes that should be used for styling a component matching\n * the tag name. The array is sorted by the include order.\n * @param {string} tagName\n * @returns {Theme[]}\n */\nfunction getThemes(tagName) {\n const defaultModuleName = `${tagName}-default-theme`;\n\n const themes = themeRegistry\n // Filter by matching themeFor properties\n .filter((theme) => theme.moduleId !== defaultModuleName && matchesThemeFor(theme.themeFor, tagName))\n .map((theme) => ({\n ...theme,\n // Prepend styles from included themes\n styles: [...getIncludedStyles(theme), ...theme.styles],\n // Map moduleId to includePriority\n includePriority: getIncludePriority(theme.moduleId),\n }))\n // Sort by includePriority\n .sort((themeA, themeB) => themeB.includePriority - themeA.includePriority);\n\n if (themes.length > 0) {\n return themes;\n }\n // No theme modules found, return the default module if it exists\n return themeRegistry.filter((theme) => theme.moduleId === defaultModuleName);\n}\n\n/**\n * @polymerMixin\n * @mixes ThemePropertyMixin\n */\nexport const ThemableMixin = (superClass) =>\n class VaadinThemableMixin extends ThemePropertyMixin(superClass) {\n constructor() {\n super();\n // Store a weak reference to the instance\n themableInstances.add(new WeakRef(this));\n }\n\n /**\n * Covers PolymerElement based component styling\n * @protected\n */\n static finalize() {\n super.finalize();\n\n if (this.is) {\n themableTagNames.add(this.is);\n }\n\n // Make sure not to run the logic intended for PolymerElement when LitElement is used.\n if (this.elementStyles) {\n return;\n }\n\n const template = this.prototype._template;\n if (!template || classHasThemes(this)) {\n return;\n }\n\n addStylesToTemplate(this.getStylesForThis(), template);\n }\n\n /**\n * Covers LitElement based component styling\n *\n * @protected\n */\n static finalizeStyles(styles) {\n // Preserve the styles the user supplied via the `static get styles()` getter\n // so that they will always be injected before styles added by `LumoInjector`.\n this.baseStyles = styles ? [styles].flat(Infinity) : [];\n\n // Preserve the theme styles the user supplied via the `registerStyles()` API\n // so that they will always be injected after styles added by `LumoInjector`.\n this.themeStyles = this.getStylesForThis();\n\n // Merged styles are stored in `elementStyles` and passed to `adoptStyles()`.\n return [...this.baseStyles, ...this.themeStyles];\n }\n\n /**\n * Get styles for the component type\n *\n * @private\n */\n static getStylesForThis() {\n const superClassThemes = superClass.__themes || [];\n const parent = Object.getPrototypeOf(this.prototype);\n const inheritedThemes = (parent ? parent.constructor.__themes : []) || [];\n this.__themes = [...superClassThemes, ...inheritedThemes, ...getThemes(this.is)];\n const themeStyles = this.__themes.flatMap((theme) => theme.styles);\n // Remove duplicates\n return themeStyles.filter((style, index) => index === themeStyles.lastIndexOf(style));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\nimport { addGlobalStyles } from './add-global-styles.js';\n\n// NOTE: Base color CSS custom properties are explicitly registered as `<color>`\n// here to avoid performance issues in Aura. Aura overrides these properties with\n// values that use complex, nested relative color functions, and without explicit\n// typing, Chrome 142 was found to render components that use them roughly 40% slower.\n[\n '--vaadin-text-color',\n '--vaadin-text-color-disabled',\n '--vaadin-text-color-secondary',\n '--vaadin-border-color',\n '--vaadin-border-color-secondary',\n '--vaadin-background-color',\n].forEach((propertyName) => {\n CSS.registerProperty({\n name: propertyName,\n syntax: '<color>',\n inherits: true,\n initialValue: 'transparent',\n });\n});\n\naddGlobalStyles(\n 'vaadin-base',\n css`\n @layer vaadin.base {\n html {\n /* Background color */\n --vaadin-background-color: light-dark(#fff, #222);\n\n /* Container colors */\n --vaadin-background-container: color-mix(in oklab, var(--vaadin-text-color) 5%, var(--vaadin-background-color));\n --vaadin-background-container-strong: color-mix(\n in oklab,\n var(--vaadin-text-color) 10%,\n var(--vaadin-background-color)\n );\n\n /* Border colors */\n --vaadin-border-color-secondary: color-mix(in oklab, var(--vaadin-text-color) 24%, transparent);\n --vaadin-border-color: color-mix(in oklab, var(--vaadin-text-color) 48%, transparent); /* Above 3:1 contrast */\n\n /* Text colors */\n /* Above 3:1 contrast */\n --vaadin-text-color-disabled: color-mix(in oklab, var(--vaadin-text-color) 48%, transparent);\n /* Above 4.5:1 contrast */\n --vaadin-text-color-secondary: color-mix(in oklab, var(--vaadin-text-color) 68%, transparent);\n /* Above 7:1 contrast */\n --vaadin-text-color: light-dark(#1f1f1f, white);\n\n /* Padding */\n --vaadin-padding-xs: 6px;\n --vaadin-padding-s: 8px;\n --vaadin-padding-m: 12px;\n --vaadin-padding-l: 16px;\n --vaadin-padding-xl: 24px;\n --vaadin-padding-block-container: var(--vaadin-padding-xs);\n --vaadin-padding-inline-container: var(--vaadin-padding-s);\n\n /* Gap/spacing */\n --vaadin-gap-xs: 6px;\n --vaadin-gap-s: 8px;\n --vaadin-gap-m: 12px;\n --vaadin-gap-l: 16px;\n --vaadin-gap-xl: 24px;\n\n /* Border radius */\n --vaadin-radius-s: 3px;\n --vaadin-radius-m: 6px;\n --vaadin-radius-l: 12px;\n\n /* Focus outline */\n --vaadin-focus-ring-width: 2px;\n --vaadin-focus-ring-color: var(--vaadin-text-color);\n\n /* Icons, used as mask-image */\n --_vaadin-icon-arrow-up: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m5 12 7-7 7 7\"/><path d=\"M12 19V5\"/></svg>');\n --_vaadin-icon-calendar: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 2v4\"/><path d=\"M16 2v4\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"/><path d=\"M3 10h18\"/></svg>');\n --_vaadin-icon-checkmark: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m4.5 12.75 6 6 9-13.5\" /></svg>');\n --_vaadin-icon-chevron-down: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m6 9 6 6 6-6\"/></svg>');\n --_vaadin-icon-clock: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 6v6l4 2\"/><circle cx=\"12\" cy=\"12\" r=\"10\"/></svg>');\n --_vaadin-icon-cross: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" /></svg>');\n --_vaadin-icon-drag: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M11 7c0 .82843-.6716 1.5-1.5 1.5C8.67157 8.5 8 7.82843 8 7s.67157-1.5 1.5-1.5c.8284 0 1.5.67157 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5-.82843 0-1.5-.6716-1.5-1.5s.67157-1.5 1.5-1.5c.8284 0 1.5.6716 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5-.82843 0-1.5-.6716-1.5-1.5s.67157-1.5 1.5-1.5c.8284 0 1.5.6716 1.5 1.5Zm5-10c0 .82843-.6716 1.5-1.5 1.5S13 7.82843 13 7s.6716-1.5 1.5-1.5S16 6.17157 16 7Zm0 5c0 .8284-.6716 1.5-1.5 1.5S13 12.8284 13 12s.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5S13 17.8284 13 17s.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5Z\" fill=\"currentColor\"/></svg>');\n --_vaadin-icon-eye: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z\" /><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\" /></svg>');\n --_vaadin-icon-eye-slash: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88\" /></svg>');\n --_vaadin-icon-file: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/></svg>');\n --_vaadin-icon-fullscreen: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15\" /></svg>');\n --_vaadin-icon-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"/></svg>');\n --_vaadin-icon-link: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></svg>');\n --_vaadin-icon-menu: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5\" /></svg>');\n --_vaadin-icon-minus: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"/></svg>');\n --_vaadin-icon-paper-airplane: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5\" /></svg>');\n --_vaadin-icon-pen: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\"/><path d=\"m15 5 4 4\"/></svg>');\n --_vaadin-icon-play: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z\" /></svg>');\n --_vaadin-icon-plus: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"/><path d=\"M12 5v14\"/></svg>');\n --_vaadin-icon-redo: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 7v6h-6\"/><path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7\"/></svg>');\n --_vaadin-icon-refresh: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M22 10C22 10 19.995 7.26822 18.3662 5.63824C16.7373 4.00827 14.4864 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.1031 21 19.5649 18.2543 20.6482 14.5M22 10V4M22 10H16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>');\n --_vaadin-icon-resize: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M18.5303 7.46967c.2929.29289.2929.76777 0 1.06066L8.53033 18.5304c-.29289.2929-.76777.2929-1.06066 0s-.29289-.7678 0-1.0607L17.4697 7.46967c.2929-.29289.7677-.29289 1.0606 0Zm0 4.50003c.2929.2929.2929.7678 0 1.0607l-5.5 5.5c-.2929.2928-.7677.2928-1.0606 0-.2929-.2929-.2929-.7678 0-1.0607l5.4999-5.5c.2929-.2929.7678-.2929 1.0607 0Zm0 4.5c.2929.2928.2929.7677 0 1.0606l-1 1.0001c-.2929.2928-.7677.2929-1.0606 0-.2929-.2929-.2929-.7678 0-1.0607l1-1c.2929-.2929.7677-.2929 1.0606 0Z\" fill=\"currentColor\"/></svg>');\n --_vaadin-icon-sort: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"8\" height=\"12\" viewBox=\"0 0 8 12\" fill=\"none\"><path d=\"M7.49854 6.99951C7.92795 6.99951 8.15791 7.50528 7.87549 7.82861L4.37646 11.8296C4.17728 12.0571 3.82272 12.0571 3.62354 11.8296L0.125488 7.82861C-0.157248 7.50531 0.0719873 6.99956 0.501465 6.99951H7.49854ZM3.62354 0.17041C3.82275 -0.0573875 4.17725 -0.0573848 4.37646 0.17041L7.87549 4.17041C8.15825 4.49373 7.92806 5.00049 7.49854 5.00049L0.501465 4.99951C0.0719873 4.99946 -0.157248 4.49371 0.125488 4.17041L3.62354 0.17041Z\" fill=\"black\"/></svg>');\n --_vaadin-icon-undo: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"/><path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\"/></svg>');\n --_vaadin-icon-upload: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3v12\"/><path d=\"m17 8-5-5-5 5\"/><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/></svg>');\n --_vaadin-icon-user: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/></svg>');\n --_vaadin-icon-warn: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg>');\n\n /* Cursors for interactive elements */\n --vaadin-clickable-cursor: pointer;\n --vaadin-disabled-cursor: not-allowed;\n\n /* Use units so that the values can be used in calc() */\n --safe-area-inset-top: env(safe-area-inset-top, 0px);\n --safe-area-inset-right: env(safe-area-inset-right, 0px);\n --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);\n --safe-area-inset-left: env(safe-area-inset-left, 0px);\n }\n\n @supports not (color: hsl(0 0 0)) {\n html {\n --_vaadin-safari-17-deg: 1deg;\n }\n }\n\n @media (forced-colors: active) {\n html {\n --vaadin-background-color: Canvas;\n --vaadin-border-color: CanvasText;\n --vaadin-border-color-secondary: CanvasText;\n --vaadin-text-color-disabled: CanvasText;\n --vaadin-text-color-secondary: CanvasText;\n --vaadin-text-color: CanvasText;\n --vaadin-icon-color: CanvasText;\n --vaadin-focus-ring-color: Highlight;\n }\n }\n }\n `,\n);\n","/**\n * @license\n * Copyright (c) 2025 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Add a `<style>` block with given styles to the document.\n *\n * @param {string} id the id to set on the created element, only for informational purposes\n * @param {CSSResultGroup[]} styles the styles to add\n */\nexport const addGlobalStyles = (id, ...styles) => {\n const styleTag = document.createElement('style');\n styleTag.id = id;\n styleTag.textContent = styles.map((style) => style.toString()).join('\\n');\n\n document.head.insertAdjacentElement('afterbegin', styleTag);\n};\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const itemStyles = css`\n :host {\n align-items: center;\n border-radius: var(--vaadin-item-border-radius, var(--vaadin-radius-m));\n box-sizing: border-box;\n cursor: var(--vaadin-clickable-cursor);\n display: flex;\n column-gap: var(--vaadin-item-gap, var(--vaadin-gap-s));\n height: var(--vaadin-item-height, auto);\n padding: var(--vaadin-item-padding, var(--vaadin-padding-block-container) var(--vaadin-padding-inline-container));\n -webkit-tap-highlight-color: transparent;\n }\n\n :host([focus-ring]) {\n outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);\n outline-offset: calc(var(--vaadin-focus-ring-width) / -1);\n }\n\n :host([disabled]) {\n cursor: var(--vaadin-disabled-cursor);\n opacity: 0.5;\n pointer-events: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n [part='checkmark'] {\n color: var(--vaadin-item-checkmark-color, inherit);\n display: var(--vaadin-item-checkmark-display, none);\n visibility: hidden;\n }\n\n [part='checkmark']::before {\n content: '';\n display: block;\n background: currentColor;\n height: var(--vaadin-icon-size, 1lh);\n mask: var(--_vaadin-icon-checkmark) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;\n width: var(--vaadin-icon-size, 1lh);\n }\n\n :host([selected]) [part='checkmark'] {\n visibility: visible;\n }\n\n [part='content'] {\n flex: 1;\n display: flex;\n align-items: center;\n column-gap: inherit;\n justify-content: var(--vaadin-item-text-align, start);\n }\n\n @media (forced-colors: active) {\n [part='checkmark']::before {\n background: CanvasText;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { contextMenuItemStyles } from '@vaadin/context-menu/src/styles/vaadin-context-menu-item-base-styles.js';\n\nexport const menuBarItemStyles = contextMenuItemStyles;\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\nimport { itemStyles } from '@vaadin/item/src/styles/vaadin-item-base-styles.js';\n\nconst menuItemStyles = css`\n :host([aria-haspopup='true'])::after {\n background: var(--vaadin-text-color-secondary);\n content: '';\n display: block;\n height: var(--vaadin-icon-size, 1lh);\n mask: var(--_vaadin-icon-chevron-down) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;\n rotate: -90deg;\n width: var(--vaadin-icon-size, 1lh);\n }\n\n :host([dir='rtl'])::after {\n rotate: 90deg;\n }\n\n /* TODO would be nice to only reserve the space if\n one or mote items in the list is checkable */\n :host([menu-item-checked]) [part='checkmark'] {\n visibility: visible;\n }\n`;\n\nexport const contextMenuItemStyles = [itemStyles, menuItemStyles];\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { menuBarItemStyles } from './styles/vaadin-menu-bar-item-base-styles.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-item\n * @extends HTMLElement\n * @mixes DirMixin\n * @mixes ItemMixin\n * @mixes ThemableMixin\n * @protected\n */\nclass MenuBarItem extends ItemMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-menu-bar-item';\n }\n\n static get styles() {\n return menuBarItemStyles;\n }\n\n /** @protected */\n render() {\n return html`\n <span part=\"checkmark\" aria-hidden=\"true\"></span>\n <div part=\"content\">\n <slot></slot>\n </div>\n `;\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n // Set role in `connectedCallback()` instead of `ready()`\n // because the role is removed when teleporting to button.\n this.setAttribute('role', 'menuitem');\n }\n}\n\ndefineCustomElement(MenuBarItem);\n\nexport { MenuBarItem };\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nconst debouncerQueue = new Set();\n\n/**\n * @summary Collapse multiple callbacks into one invocation after a timer.\n */\nexport class Debouncer {\n /**\n * Creates a debouncer if no debouncer is passed as a parameter\n * or it cancels an active debouncer otherwise. The following\n * example shows how a debouncer can be called multiple times within a\n * microtask and \"debounced\" such that the provided callback function is\n * called once. Add this method to a custom element:\n *\n * ```js\n * import {microTask} from '@vaadin/component-base/src/async.js';\n * import {Debouncer} from '@vaadin/component-base/src/debounce.js';\n * // ...\n *\n * _debounceWork() {\n * this._debounceJob = Debouncer.debounce(this._debounceJob,\n * microTask, () => this._doWork());\n * }\n * ```\n *\n * If the `_debounceWork` method is called multiple times within the same\n * microtask, the `_doWork` function will be called only once at the next\n * microtask checkpoint.\n *\n * Note: In testing it is often convenient to avoid asynchrony. To accomplish\n * this with a debouncer, you can use `enqueueDebouncer` and\n * `flush`. For example, extend the above example by adding\n * `enqueueDebouncer(this._debounceJob)` at the end of the\n * `_debounceWork` method. Then in a test, call `flush` to ensure\n * the debouncer has completed.\n *\n * @param {Debouncer?} debouncer Debouncer object.\n * @param {!AsyncInterface} asyncModule Object with Async interface\n * @param {function()} callback Callback to run.\n * @return {!Debouncer} Returns a debouncer object.\n */\n static debounce(debouncer, asyncModule, callback) {\n if (debouncer instanceof Debouncer) {\n // Cancel the async callback, but leave in debouncerQueue if it was\n // enqueued, to maintain 1.x flush order\n debouncer._cancelAsync();\n } else {\n debouncer = new Debouncer();\n }\n debouncer.setConfig(asyncModule, callback);\n return debouncer;\n }\n\n constructor() {\n this._asyncModule = null;\n this._callback = null;\n this._timer = null;\n }\n\n /**\n * Sets the scheduler; that is, a module with the Async interface,\n * a callback and optional arguments to be passed to the run function\n * from the async module.\n *\n * @param {!AsyncInterface} asyncModule Object with Async interface.\n * @param {function()} callback Callback to run.\n * @return {void}\n */\n setConfig(asyncModule, callback) {\n this._asyncModule = asyncModule;\n this._callback = callback;\n this._timer = this._asyncModule.run(() => {\n this._timer = null;\n debouncerQueue.delete(this);\n this._callback();\n });\n }\n\n /**\n * Cancels an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n cancel() {\n if (this.isActive()) {\n this._cancelAsync();\n // Canceling a debouncer removes its spot from the flush queue,\n // so if a debouncer is manually canceled and re-debounced, it\n // will reset its flush order (this is a very minor difference from 1.x)\n // Re-debouncing via the `debounce` API retains the 1.x FIFO flush order\n debouncerQueue.delete(this);\n }\n }\n\n /**\n * Cancels a debouncer's async callback.\n *\n * @return {void}\n */\n _cancelAsync() {\n if (this.isActive()) {\n this._asyncModule.cancel(/** @type {number} */ (this._timer));\n this._timer = null;\n }\n }\n\n /**\n * Flushes an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n flush() {\n if (this.isActive()) {\n this.cancel();\n this._callback();\n }\n }\n\n /**\n * Returns true if the debouncer is active.\n *\n * @return {boolean} True if active.\n */\n isActive() {\n return this._timer != null;\n }\n}\n\n/**\n * Adds a `Debouncer` to a list of globally flushable tasks.\n *\n * @param {!Debouncer} debouncer Debouncer to enqueue\n * @return {void}\n */\nexport function enqueueDebouncer(debouncer) {\n debouncerQueue.add(debouncer);\n}\n\n/**\n * Flushes any enqueued debouncers\n *\n * @return {boolean} Returns whether any debouncers were flushed\n */\nexport function flushDebouncers() {\n const didFlush = Boolean(debouncerQueue.size);\n // If new debouncers are added while flushing, Set.forEach will ensure\n // newly added ones are also flushed\n debouncerQueue.forEach((debouncer) => {\n try {\n debouncer.flush();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n });\n return didFlush;\n}\n\nexport const flush = () => {\n let debouncers;\n do {\n debouncers = flushDebouncers();\n } while (debouncers);\n};\n","/**\n * @license\n * Copyright (c) 2023 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A helper for observing slot changes.\n */\nexport class SlotObserver {\n constructor(slot, callback, forceInitial) {\n /** @type HTMLSlotElement */\n this.slot = slot;\n\n /** @type Function */\n this.callback = callback;\n\n /** @type boolean */\n this.forceInitial = forceInitial;\n\n /** @type {Node[]} */\n this._storedNodes = [];\n\n this._connected = false;\n this._scheduled = false;\n\n this._boundSchedule = () => {\n this._schedule();\n };\n\n this.connect();\n this._schedule();\n }\n\n /**\n * Activates an observer. This method is automatically called when\n * a `SlotObserver` is created. It should only be called to re-activate\n * an observer that has been deactivated via the `disconnect` method.\n */\n connect() {\n this.slot.addEventListener('slotchange', this._boundSchedule);\n this._connected = true;\n }\n\n /**\n * Deactivates the observer. After calling this method the observer callback\n * will not be called when changes to slotted nodes occur. The `connect` method\n * may be subsequently called to reactivate the observer.\n */\n disconnect() {\n this.slot.removeEventListener('slotchange', this._boundSchedule);\n this._connected = false;\n }\n\n /** @private */\n _schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n\n queueMicrotask(() => {\n this.flush();\n });\n }\n }\n\n /**\n * Run the observer callback synchronously.\n */\n flush() {\n if (!this._connected) {\n return;\n }\n\n this._scheduled = false;\n\n this._processNodes();\n }\n\n /** @private */\n _processNodes() {\n const currentNodes = this.slot.assignedNodes({ flatten: true });\n\n let addedNodes = [];\n const removedNodes = [];\n const movedNodes = [];\n\n if (currentNodes.length) {\n addedNodes = currentNodes.filter((node) => !this._storedNodes.includes(node));\n }\n\n if (this._storedNodes.length) {\n this._storedNodes.forEach((node, index) => {\n const idx = currentNodes.indexOf(node);\n if (idx === -1) {\n removedNodes.push(node);\n } else if (idx !== index) {\n movedNodes.push(node);\n }\n });\n }\n\n // By default, callback is not invoked if there is no child nodes in the slot.\n // Use `forceInitial` flag if needed to also invoke it for the initial state.\n if (addedNodes.length || removedNodes.length || movedNodes.length || this.forceInitial) {\n this.callback({ addedNodes, currentNodes, movedNodes, removedNodes });\n }\n\n if (this.forceInitial) {\n this.forceInitial = false;\n }\n\n this._storedNodes = currentNodes;\n }\n}\n","/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isElementFocused, isElementHidden } from './focus-utils.js';\nimport { KeyboardMixin } from './keyboard-mixin.js';\n\n/**\n * A mixin for navigating items with keyboard.\n *\n * @polymerMixin\n * @mixes KeyboardMixin\n */\nexport const KeyboardDirectionMixin = (superclass) =>\n class KeyboardDirectionMixinClass extends KeyboardMixin(superclass) {\n /**\n * @return {Element | null}\n * @protected\n */\n get focused() {\n return (this._getItems() || []).find(isElementFocused);\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _vertical() {\n return true;\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _tabNavigation() {\n return false;\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n const idx = this._getFocusableIndex();\n if (idx >= 0) {\n this._focus(idx, options);\n }\n }\n\n /**\n * Get the index of a first focusable item, if any.\n *\n * @return {Element[]}\n * @protected\n */\n _getFocusableIndex() {\n const items = this._getItems();\n return Array.isArray(items) ? this._getAvailableIndex(items, 0, null, (item) => !isElementHidden(item)) : -1;\n }\n\n /**\n * Get the list of items participating in keyboard navigation.\n * By default, it treats all the light DOM children as items.\n * Override this method to provide custom list of elements.\n *\n * @return {Element[]}\n * @protected\n */\n _getItems() {\n return Array.from(this.children);\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.metaKey || event.ctrlKey) {\n return;\n }\n\n const { key, shiftKey } = event;\n const items = this._getItems() || [];\n const currentIdx = items.indexOf(this.focused);\n\n let idx;\n let increment;\n\n const isRTL = !this._vertical && this.getAttribute('dir') === 'rtl';\n const dirIncrement = isRTL ? -1 : 1;\n\n if (this.__isPrevKeyPressed(key, shiftKey)) {\n increment = -dirIncrement;\n idx = currentIdx - dirIncrement;\n } else if (this.__isNextKeyPressed(key, shiftKey)) {\n increment = dirIncrement;\n idx = currentIdx + dirIncrement;\n } else if (key === 'Home') {\n increment = 1;\n idx = 0;\n } else if (key === 'End') {\n increment = -1;\n idx = items.length - 1;\n }\n\n idx = this._getAvailableIndex(items, idx, increment, (item) => !isElementHidden(item));\n\n if (\n this._tabNavigation &&\n key === 'Tab' &&\n ((idx > currentIdx && event.shiftKey) || (idx < currentIdx && !event.shiftKey) || idx === currentIdx)\n ) {\n // Prevent \"roving tabindex\" logic and let the normal Tab behavior if\n // - currently on the first focusable item and Shift + Tab is pressed,\n // - currently on the last focusable item and Tab is pressed,\n // - currently on the only focusable item and Tab is pressed\n return;\n }\n\n if (idx >= 0) {\n event.preventDefault();\n this._focus(idx, { focusVisible: true }, true);\n }\n }\n\n /**\n * @param {string} key\n * @param {boolean} shiftKey\n * @return {boolean}\n * @private\n */\n __isPrevKeyPressed(key, shiftKey) {\n if (this._vertical) {\n return key === 'ArrowUp';\n }\n\n return key === 'ArrowLeft' || (this._tabNavigation && key === 'Tab' && shiftKey);\n }\n\n /**\n * @param {string} key\n * @param {boolean} shiftKey\n * @return {boolean}\n * @private\n */\n __isNextKeyPressed(key, shiftKey) {\n if (this._vertical) {\n return key === 'ArrowDown';\n }\n\n return key === 'ArrowRight' || (this._tabNavigation && key === 'Tab' && !shiftKey);\n }\n\n /**\n * Focus the item at given index. Override this method to add custom logic.\n *\n * @param {number} index\n * @param {FocusOptions=} options\n * @param {boolean} navigating\n * @protected\n */\n _focus(index, options, navigating = false) {\n const items = this._getItems();\n\n this._focusItem(items[index], options, navigating);\n }\n\n /**\n * Focus the given item. Override this method to add custom logic.\n *\n * @param {Element} item\n * @param {FocusOptions=} options\n * @param {boolean} navigating\n * @protected\n */\n _focusItem(item, options) {\n if (item) {\n item.focus(options);\n }\n }\n\n /**\n * Returns index of the next item that satisfies the given condition,\n * based on the index of the current item and a numeric increment.\n *\n * @param {Element[]} items - array of items to iterate over\n * @param {number} index - index of the current item\n * @param {number} increment - numeric increment, can be either 1 or -1\n * @param {Function} condition - function used to check the item\n * @return {number}\n * @protected\n */\n _getAvailableIndex(items, index, increment, condition) {\n const totalItems = items.length;\n let idx = index;\n for (let i = 0; typeof idx === 'number' && i < totalItems; i += 1, idx += increment || 1) {\n if (idx < 0) {\n idx = totalItems - 1;\n } else if (idx >= totalItems) {\n idx = 0;\n }\n\n const item = items[idx];\n\n if (this._isItemFocusable(item) && this.__isMatchingItem(item, condition)) {\n return idx;\n }\n }\n return -1;\n }\n\n /**\n * Returns true if the item matches condition.\n *\n * @param {Element} item - item to check\n * @param {Function} condition - function used to check the item\n * @return {number}\n * @private\n */\n __isMatchingItem(item, condition) {\n return typeof condition === 'function' ? condition(item) : true;\n }\n\n /**\n * Returns whether the item is focusable. By default,\n * returns true if the item is not disabled.\n *\n * @param {Element} item\n * @return {boolean}\n * @protected\n */\n _isItemFocusable(item) {\n return !item.hasAttribute('disabled');\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { timeOut } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { getNormalizedScrollLeft, setNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js';\nimport { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';\nimport { isElementHidden } from './focus-utils.js';\nimport { KeyboardDirectionMixin } from './keyboard-direction-mixin.js';\n\n/**\n * A mixin for list elements, facilitating navigation and selection of items.\n *\n * @polymerMixin\n * @mixes KeyboardDirectionMixin\n */\nexport const ListMixin = (superClass) =>\n class ListMixinClass extends KeyboardDirectionMixin(superClass) {\n static get properties() {\n return {\n /**\n * If true, the user cannot interact with this element.\n * When the element is disabled, the selected item is\n * not updated when `selected` property is changed.\n */\n disabled: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n },\n\n /**\n * The index of the item selected in the items array.\n * Note: Not updated when used in `multiple` selection mode.\n */\n selected: {\n type: Number,\n reflectToAttribute: true,\n notify: true,\n sync: true,\n },\n\n /**\n * Define how items are disposed in the dom.\n * Possible values are: `horizontal|vertical`.\n * It also changes navigation keys from left/right to up/down.\n */\n orientation: {\n type: String,\n reflectToAttribute: true,\n value: '',\n },\n\n /**\n * A read-only list of items from which a selection can be made.\n * It is populated from the elements passed to the light DOM,\n * and updated dynamically when adding or removing items.\n * @type {!Array<!Element> | undefined}\n */\n items: {\n type: Array,\n readOnly: true,\n notify: true,\n },\n\n /**\n * The search buffer for the keyboard selection feature.\n * @private\n */\n _searchBuf: {\n type: String,\n value: '',\n },\n };\n }\n\n static get observers() {\n return ['_enhanceItems(items, orientation, selected, disabled)'];\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _isRTL() {\n return !this._vertical && this.getAttribute('dir') === 'rtl';\n }\n\n /**\n * @return {!HTMLElement}\n * @protected\n */\n get _scrollerElement() {\n // Returning scroller element of the component\n console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`);\n return this;\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _vertical() {\n return this.orientation !== 'horizontal';\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n // In initialization (e.g vaadin-select) observer might not been run yet.\n if (this._observer) {\n this._observer.flush();\n }\n\n const items = Array.isArray(this.items) ? this.items : [];\n const idx = this._getAvailableIndex(items, 0, null, (item) => item.tabIndex === 0 && !isElementHidden(item));\n if (idx >= 0) {\n this._focus(idx, options);\n } else {\n // Call `KeyboardDirectionMixin` logic to focus first non-disabled item.\n super.focus(options);\n }\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('click', (e) => this._onClick(e));\n\n const slot = this.shadowRoot.querySelector('slot:not([name])');\n this._observer = new SlotObserver(slot, () => {\n this._setItems(this._filterItems([...this.children]));\n });\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin`\n * to use the stored list of item elements.\n *\n * @return {Element[]}\n * @protected\n * @override\n */\n _getItems() {\n return this.items;\n }\n\n /** @private */\n _enhanceItems(items, orientation, selected, disabled) {\n if (!disabled) {\n if (items) {\n this.setAttribute('aria-orientation', orientation || 'vertical');\n items.forEach((item) => {\n if (orientation) {\n item.setAttribute('orientation', orientation);\n } else {\n item.removeAttribute('orientation');\n }\n });\n\n // When selected is set to -1, focus the first available item.\n this._setFocusable(selected < 0 || !selected ? 0 : selected);\n\n const itemToSelect = items[selected];\n items.forEach((item) => {\n item.selected = item === itemToSelect;\n });\n if (itemToSelect && !itemToSelect.disabled) {\n this._scrollToItem(selected);\n }\n }\n }\n }\n\n /**\n * @param {!Array<!Element>} array\n * @return {!Array<!Element>}\n * @protected\n */\n _filterItems(array) {\n return array.filter((e) => e._hasVaadinItemMixin);\n }\n\n /**\n * @param {!MouseEvent} event\n * @protected\n */\n _onClick(event) {\n if (event.metaKey || event.shiftKey || event.ctrlKey || event.defaultPrevented) {\n return;\n }\n\n const item = this._filterItems(event.composedPath())[0];\n let idx;\n if (item && !item.disabled && (idx = this.items.indexOf(item)) >= 0) {\n this.selected = idx;\n }\n }\n\n /**\n * @param {number} currentIdx\n * @param {string} key\n * @return {number}\n * @protected\n */\n _searchKey(currentIdx, key) {\n this._searchReset = Debouncer.debounce(this._searchReset, timeOut.after(500), () => {\n this._searchBuf = '';\n });\n this._searchBuf += key.toLowerCase();\n\n if (!this.items.some((item) => this.__isMatchingKey(item))) {\n this._searchBuf = key.toLowerCase();\n }\n\n const idx = this._searchBuf.length === 1 ? currentIdx + 1 : currentIdx;\n return this._getAvailableIndex(\n this.items,\n idx,\n 1,\n (item) => this.__isMatchingKey(item) && getComputedStyle(item).display !== 'none',\n );\n }\n\n /** @private */\n __isMatchingKey(item) {\n return item.textContent\n .replace(/[^\\p{L}\\p{Nd}]/gu, '')\n .toLowerCase()\n .startsWith(this._searchBuf);\n }\n\n /**\n * Override an event listener from `KeyboardMixin`\n * to search items by key.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n if (event.metaKey || event.ctrlKey) {\n return;\n }\n\n const key = event.key;\n\n const currentIdx = this.items.indexOf(this.focused);\n if (/[\\p{L}\\p{Nd}]/u.test(key) && key.length === 1) {\n const idx = this._searchKey(currentIdx, key);\n if (idx >= 0) {\n this._focus(idx);\n }\n return;\n }\n\n super._onKeyDown(event);\n }\n\n /**\n * @param {number} idx\n * @protected\n */\n _setFocusable(idx) {\n idx = this._getAvailableIndex(this.items, idx, 1);\n const item = this.items[idx];\n this.items.forEach((e) => {\n e.tabIndex = e === item ? 0 : -1;\n });\n }\n\n /**\n * @param {number} idx\n * @protected\n */\n _focus(idx, options) {\n this.items.forEach((e, index) => {\n e.focused = index === idx;\n });\n this._setFocusable(idx);\n this._scrollToItem(idx);\n super._focus(idx, options);\n }\n\n /**\n * Scroll the container to have the next item by the edge of the viewport.\n * @param {number} idx\n * @protected\n */\n _scrollToItem(idx) {\n const item = this.items[idx];\n if (!item) {\n return;\n }\n\n const props = this._vertical ? ['top', 'bottom'] : this._isRTL ? ['right', 'left'] : ['left', 'right'];\n\n const scrollerRect = this._scrollerElement.getBoundingClientRect();\n const nextItemRect = (this.items[idx + 1] || item).getBoundingClientRect();\n const prevItemRect = (this.items[idx - 1] || item).getBoundingClientRect();\n\n let scrollDistance = 0;\n if (\n (!this._isRTL && nextItemRect[props[1]] >= scrollerRect[props[1]]) ||\n (this._isRTL && nextItemRect[props[1]] <= scrollerRect[props[1]])\n ) {\n scrollDistance = nextItemRect[props[1]] - scrollerRect[props[1]];\n } else if (\n (!this._isRTL && prevItemRect[props[0]] <= scrollerRect[props[0]]) ||\n (this._isRTL && prevItemRect[props[0]] >= scrollerRect[props[0]])\n ) {\n scrollDistance = prevItemRect[props[0]] - scrollerRect[props[0]];\n }\n\n this._scroll(scrollDistance);\n }\n\n /**\n * @param {number} pixels\n * @protected\n */\n _scroll(pixels) {\n if (this._vertical) {\n this._scrollerElement.scrollTop += pixels;\n } else {\n const dir = this.getAttribute('dir') || 'ltr';\n const scrollLeft = getNormalizedScrollLeft(this._scrollerElement, dir) + pixels;\n setNormalizedScrollLeft(this._scrollerElement, dir, scrollLeft);\n }\n }\n\n /**\n * Fired when the selection is changed.\n * Not fired when used in `multiple` selection mode.\n *\n * @event selected-changed\n * @param {Object} detail\n * @param {Object} detail.value the index of the item selected in the items array.\n */\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Get the scrollLeft value of the element relative to the direction\n *\n * @param {HTMLElement} element\n * @param {string} direction current direction of the element\n * @return {number} the scrollLeft value.\n */\nexport function getNormalizedScrollLeft(element, direction) {\n const { scrollLeft } = element;\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n return element.scrollWidth - element.clientWidth + scrollLeft;\n}\n\n/**\n * Set the scrollLeft value of the element relative to the direction\n *\n * @param {HTMLElement} element\n * @param {string} direction current direction of the element\n * @param {number} scrollLeft the scrollLeft value to be set\n */\nexport function setNormalizedScrollLeft(element, direction, scrollLeft) {\n if (direction !== 'rtl') {\n element.scrollLeft = scrollLeft;\n } else {\n element.scrollLeft = element.clientWidth - element.scrollWidth + scrollLeft;\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const listBoxStyles = css`\n :host {\n --vaadin-item-checkmark-display: block;\n display: flex;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n [part='items'] {\n height: 100%;\n overflow-y: auto;\n width: 100%;\n }\n\n [part='items'] ::slotted(hr) {\n border-color: var(--vaadin-divider-color, var(--vaadin-border-color-secondary));\n border-width: 0 0 1px;\n margin: 4px 8px;\n margin-inline-start: calc(var(--vaadin-icon-size, 1lh) + var(--vaadin-item-gap, var(--vaadin-gap-s)) + 8px);\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { ListMixin } from '@vaadin/a11y-base/src/list-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { listBoxStyles } from '@vaadin/list-box/src/styles/vaadin-list-box-base-styles.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-list-box\n * @extends HTMLElement\n * @mixes DirMixin\n * @mixes ListMixin\n * @mixes ThemableMixin\n * @protected\n */\nclass MenuBarListBox extends ListMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-menu-bar-list-box';\n }\n\n static get styles() {\n return listBoxStyles;\n }\n\n static get properties() {\n return {\n // We don't need to define this property since super default is vertical,\n // but we don't want it to be modified, or be shown in the API docs.\n /** @private */\n orientation: {\n type: String,\n readOnly: true,\n },\n };\n }\n\n /**\n * @return {!HTMLElement}\n * @protected\n * @override\n */\n get _scrollerElement() {\n return this.shadowRoot.querySelector('[part=\"items\"]');\n }\n\n /** @protected */\n render() {\n return html`\n <div part=\"items\">\n <slot></slot>\n </div>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.setAttribute('role', 'menu');\n }\n}\n\ndefineCustomElement(MenuBarListBox);\n\nexport { MenuBarListBox };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getDeepActiveElement } from './focus-utils.js';\n\n/**\n * A controller for saving a focused node and restoring focus to it later.\n */\nexport class FocusRestorationController {\n /**\n * Saves the given node as a target for restoring focus to\n * when `restoreFocus()` is called. If no node is provided,\n * the currently focused node in the DOM is saved as a target.\n *\n * @param {Node | null | undefined} focusNode\n */\n saveFocus(focusNode) {\n this.focusNode = focusNode || getDeepActiveElement();\n }\n\n /**\n * Restores focus to the target node that was saved previously with `saveFocus()`.\n */\n restoreFocus(options) {\n const focusNode = this.focusNode;\n if (!focusNode) {\n return;\n }\n\n const focusOptions = {\n preventScroll: options ? options.preventScroll : false,\n focusVisible: options ? options.focusVisible : false,\n };\n\n if (getDeepActiveElement() === document.body) {\n // In Firefox and Safari, focusing the node synchronously\n // doesn't work as expected when the overlay is closing on outside click.\n // These browsers force focus to move to the body element and retain it\n // there until the next event loop iteration.\n setTimeout(() => focusNode.focus(focusOptions));\n } else {\n focusNode.focus(focusOptions);\n }\n\n this.focusNode = null;\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getFocusableElements, isElementFocused, isKeyboardActive } from './focus-utils.js';\n\nconst instances = [];\n\n/**\n * Returns the innermost active focus trap node that contains the given element,\n * or null if the element is not inside any active focus trap.\n *\n * @param {HTMLElement} element\n * @return {HTMLElement | null}\n */\nexport function getActiveTrappingNode(element) {\n // Iterate backwards since instances are ordered outer-to-inner (push/pop)\n for (let i = instances.length - 1; i >= 0; i--) {\n if (instances[i].__trapNode?.contains(element)) {\n return instances[i].__trapNode;\n }\n }\n return null;\n}\n\n/**\n * A controller for trapping focus within a DOM node.\n */\nexport class FocusTrapController {\n /**\n * @param {HTMLElement} host\n */\n constructor(host) {\n /**\n * The controller host element.\n *\n * @type {HTMLElement}\n */\n this.host = host;\n\n /**\n * A node for trapping focus in.\n *\n * @type {HTMLElement | null}\n * @private\n */\n this.__trapNode = null;\n\n this.__onKeyDown = this.__onKeyDown.bind(this);\n }\n\n /**\n * An array of tab-ordered focusable elements inside the trap node.\n *\n * @return {HTMLElement[]}\n * @private\n */\n get __focusableElements() {\n return getFocusableElements(this.__trapNode);\n }\n\n /**\n * The index of the element inside the trap node that currently has focus.\n *\n * @return {HTMLElement | undefined}\n * @private\n */\n get __focusedElementIndex() {\n const focusableElements = this.__focusableElements;\n return focusableElements.indexOf(focusableElements.filter(isElementFocused).pop());\n }\n\n hostConnected() {\n document.addEventListener('keydown', this.__onKeyDown);\n }\n\n hostDisconnected() {\n document.removeEventListener('keydown', this.__onKeyDown);\n }\n\n /**\n * Activates a focus trap for a DOM node that will prevent focus from escaping the node.\n * The trap can be deactivated with the `.releaseFocus()` method.\n *\n * If focus is initially outside the trap, the method will move focus inside,\n * on the first focusable element of the trap in the tab order.\n * The first focusable element can be the trap node itself if it is focusable\n * and comes first in the tab order.\n *\n * If there are no focusable elements, the method will throw an exception\n * and the trap will not be set.\n *\n * @param {HTMLElement} trapNode\n */\n trapFocus(trapNode) {\n this.__trapNode = trapNode;\n\n if (this.__focusableElements.length === 0) {\n this.__trapNode = null;\n throw new Error('The trap node should have at least one focusable descendant or be focusable itself.');\n }\n\n instances.push(this);\n\n if (this.__focusedElementIndex === -1) {\n this.__focusableElements[0].focus({ focusVisible: isKeyboardActive() });\n }\n }\n\n /**\n * Deactivates the focus trap set with the `.trapFocus()` method\n * so that it becomes possible to tab outside the trap node.\n */\n releaseFocus() {\n this.__trapNode = null;\n\n instances.pop();\n }\n\n /**\n * A `keydown` event handler that manages tabbing navigation when the trap is enabled.\n *\n * - Moves focus to the next focusable element of the trap on `Tab` press.\n * When no next element to focus, the method moves focus to the first focusable element.\n * - Moves focus to the prev focusable element of the trap on `Shift+Tab` press.\n * When no prev element to focus, the method moves focus to the last focusable element.\n *\n * @param {KeyboardEvent} event\n * @private\n */\n __onKeyDown(event) {\n if (!this.__trapNode) {\n return;\n }\n\n // Only handle events for the last instance\n if (this !== Array.from(instances).pop()) {\n return;\n }\n\n if (event.key === 'Tab') {\n // Skip if another handler already processed this event\n if (event.defaultPrevented) {\n return;\n }\n\n event.preventDefault();\n\n const backward = event.shiftKey;\n this.__focusNextElement(backward);\n }\n }\n\n /**\n * - Moves focus to the next focusable element if `backward === false`.\n * When no next element to focus, the method moves focus to the first focusable element.\n * - Moves focus to the prev focusable element if `backward === true`.\n * When no prev element to focus the method moves focus to the last focusable element.\n *\n * If no focusable elements, the method returns immediately.\n *\n * @param {boolean} backward\n * @private\n */\n __focusNextElement(backward = false) {\n const focusableElements = this.__focusableElements;\n const step = backward ? -1 : 1;\n const currentIndex = this.__focusedElementIndex;\n const nextIndex = (focusableElements.length + currentIndex + step) % focusableElements.length;\n const element = focusableElements[nextIndex];\n element.focus({ focusVisible: true });\n if (element.localName === 'input') {\n element.select();\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { FocusRestorationController } from '@vaadin/a11y-base/src/focus-restoration-controller.js';\nimport { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';\nimport { getDeepActiveElement, isElementHidden, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\n\n/**\n * @polymerMixin\n */\nexport const OverlayFocusMixin = (superClass) =>\n class OverlayFocusMixin extends superClass {\n static get properties() {\n return {\n /**\n * When true, opening the overlay moves focus to the first focusable child,\n * or to the overlay part with tabindex if there are no focusable children.\n * @attr {boolean} focus-trap\n */\n focusTrap: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to true to enable restoring of focus when overlay is closed.\n * @attr {boolean} restore-focus-on-close\n */\n restoreFocusOnClose: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to specify the element which should be focused on overlay close,\n * if `restoreFocusOnClose` is set to true.\n * @type {HTMLElement}\n */\n restoreFocusNode: {\n type: HTMLElement,\n },\n };\n }\n\n constructor() {\n super();\n\n this.__focusTrapController = new FocusTrapController(this);\n this.__focusRestorationController = new FocusRestorationController();\n }\n\n /**\n * Override to specify another element used as a content root,\n * e.g. slotted into the overlay, rather than overlay itself.\n * @protected\n */\n get _contentRoot() {\n return this;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(this.__focusTrapController);\n this.addController(this.__focusRestorationController);\n }\n\n /**\n * Override to specify another element used as a focus trap root,\n * e.g. the overlay's owner element, rather than overlay part.\n * @protected\n */\n get _focusTrapRoot() {\n return this.$.overlay;\n }\n\n /**\n * Release focus and restore focus after the overlay is closed.\n *\n * @protected\n */\n _resetFocus() {\n if (this.focusTrap) {\n this.__focusTrapController.releaseFocus();\n }\n\n if (this.restoreFocusOnClose && this._shouldRestoreFocus()) {\n const focusVisible = isKeyboardActive();\n const preventScroll = !focusVisible;\n this.__focusRestorationController.restoreFocus({ preventScroll, focusVisible });\n }\n }\n\n /**\n * Save the previously focused node when the overlay starts to open.\n *\n * @protected\n */\n _saveFocus() {\n if (this.restoreFocusOnClose) {\n this.__focusRestorationController.saveFocus(this.restoreFocusNode);\n }\n }\n\n /**\n * Trap focus within the overlay after opening has completed.\n *\n * @protected\n */\n _trapFocus() {\n if (this.focusTrap && !isElementHidden(this._focusTrapRoot)) {\n this.__focusTrapController.trapFocus(this._focusTrapRoot);\n }\n }\n\n /**\n * Returns true if focus is still inside the overlay or on the body element,\n * otherwise false.\n *\n * Focus shouldn't be restored if it's been moved elsewhere by another\n * component or as a result of a user interaction e.g. the user clicked\n * on a button outside the overlay while the overlay was open.\n *\n * @protected\n * @return {boolean}\n */\n _shouldRestoreFocus() {\n const activeElement = getDeepActiveElement();\n return activeElement === document.body || this._deepContains(activeElement);\n }\n\n /**\n * Returns true if the overlay contains the given node,\n * including those within shadow DOM trees.\n *\n * @param {Node} node\n * @return {boolean}\n * @protected\n */\n _deepContains(node) {\n if (this._contentRoot.contains(node)) {\n return true;\n }\n let n = node;\n const doc = node.ownerDocument;\n // Walk from node to content root or `document`\n while (n && n !== doc && n !== this._contentRoot) {\n n = n.parentNode || n.host;\n }\n return n === this._contentRoot;\n }\n };\n","/**\n * @license\n * Copyright (c) 2024 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Observe moving an element around on a page.\n *\n * Based on the idea from https://samthor.au/2021/observing-dom/ as implemented in Floating UI\n * https://github.com/floating-ui/floating-ui/blob/58ed169/packages/dom/src/autoUpdate.ts#L45\n *\n * @param {HTMLElement} element\n * @param {Function} callback\n * @return {Function}\n */\nexport function observeMove(element, callback) {\n let io = null;\n let timeout;\n\n const root = document.documentElement;\n\n function cleanup() {\n timeout && clearTimeout(timeout);\n io && io.disconnect();\n io = null;\n }\n\n function refresh(skip = false, threshold = 1) {\n cleanup();\n\n const { left, top, width, height } = element.getBoundingClientRect();\n\n if (!skip) {\n callback();\n }\n\n if (!width || !height) {\n return;\n }\n\n const insetTop = Math.floor(top);\n const insetRight = Math.floor(root.clientWidth - (left + width));\n const insetBottom = Math.floor(root.clientHeight - (top + height));\n const insetLeft = Math.floor(left);\n\n const rootMargin = `${-insetTop}px ${-insetRight}px ${-insetBottom}px ${-insetLeft}px`;\n\n const options = {\n rootMargin,\n threshold: Math.max(0, Math.min(1, threshold)) || 1,\n };\n\n let isFirstUpdate = true;\n\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeout = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n\n isFirstUpdate = false;\n }\n\n io = new IntersectionObserver(handleObserve, options);\n\n io.observe(element);\n }\n\n refresh(true);\n\n return cleanup;\n}\n\n/**\n * Toggle the state attribute on the overlay element and also its owner element. This allows targeting state attributes\n * in the light DOM in case the overlay is in the shadow DOM of its owner.\n * @param {HTMLElement} overlay The overlay element on which to toggle the attribute.\n * @param {string} name The name of the attribute to toggle.\n * @param {string|boolean} value The value of the attribute. If a string is provided, it will be set as the attribute\n * value. Otherwise, the attribute will be added or removed depending on whether `value` is truthy or falsy.\n */\nexport function setOverlayStateAttribute(overlay, name, value) {\n const elements = [overlay];\n if (overlay.owner) {\n elements.push(overlay.owner);\n }\n\n if (typeof value === 'string') {\n elements.forEach((element) => {\n element.setAttribute(name, value);\n });\n } else if (value) {\n elements.forEach((element) => {\n element.setAttribute(name, '');\n });\n } else {\n elements.forEach((element) => {\n element.removeAttribute(name);\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getAncestorRootNodes } from '@vaadin/component-base/src/dom-utils.js';\nimport { observeMove, setOverlayStateAttribute } from './vaadin-overlay-utils.js';\n\nconst PROP_NAMES_VERTICAL = {\n start: 'top',\n end: 'bottom',\n};\n\nconst PROP_NAMES_HORIZONTAL = {\n start: 'left',\n end: 'right',\n};\n\nconst targetResizeObserver = new ResizeObserver((entries) => {\n setTimeout(() => {\n entries.forEach((entry) => {\n if (entry.target.__overlay) {\n entry.target.__overlay._updatePosition();\n }\n });\n });\n});\n\n/**\n * @polymerMixin\n */\nexport const PositionMixin = (superClass) =>\n class PositionMixin extends superClass {\n static get properties() {\n return {\n /**\n * The element next to which this overlay should be aligned.\n * The position of the overlay relative to the positionTarget can be adjusted\n * with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`\n * and `noVerticalOverlap`.\n */\n positionTarget: {\n type: Object,\n value: null,\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * left or right side to the target element by default.\n * Possible values are `start` and `end`.\n * RTL is taken into account when interpreting the value.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {start|end} horizontal-align\n */\n horizontalAlign: {\n type: String,\n value: 'start',\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * top or bottom side to the target element by default.\n * Possible values are `top` and `bottom`.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {top|bottom} vertical-align\n */\n verticalAlign: {\n type: String,\n value: 'top',\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the x-axis, or be positioned right next to it.\n *\n * @attr {boolean} no-horizontal-overlap\n */\n noHorizontalOverlap: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the y-axis, or be positioned right above/below it.\n *\n * @attr {boolean} no-vertical-overlap\n */\n noVerticalOverlap: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * If the overlay content has no intrinsic height, this property can be used to set\n * the minimum vertical space (in pixels) required by the overlay. Setting a value to\n * the property effectively disables the content measurement in favor of using this\n * fixed value for determining the open direction.\n *\n * @attr {number} required-vertical-space\n */\n requiredVerticalSpace: {\n type: Number,\n value: 0,\n sync: true,\n },\n };\n }\n\n constructor() {\n super();\n\n this.__onScroll = this.__onScroll.bind(this);\n this._updatePosition = this._updatePosition.bind(this);\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (this.opened) {\n this.__addUpdatePositionEventListeners();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__removeUpdatePositionEventListeners();\n }\n\n /** @protected */\n updated(props) {\n super.updated(props);\n\n if (props.has('positionTarget')) {\n const oldTarget = props.get('positionTarget');\n\n // Invalidate the cached content size so the next `_updatePosition` call\n // measures the overlay against the new target instead of carrying over\n // a larger size from the previous one.\n this.__oldContentWidth = undefined;\n this.__oldContentHeight = undefined;\n\n // 1. When position target is removed, always reset position settings\n // 2. When position target is set, reset if overlay was opened before\n if ((!this.positionTarget && oldTarget) || (this.positionTarget && !oldTarget && !!this.__margins)) {\n this.__resetPosition();\n }\n }\n\n if (props.has('opened') || props.has('positionTarget')) {\n this.__updatePositionSettings(this.opened, this.positionTarget);\n }\n\n const positionProps = [\n 'horizontalAlign',\n 'verticalAlign',\n 'noHorizontalOverlap',\n 'noVerticalOverlap',\n 'requiredVerticalSpace',\n ];\n if (positionProps.some((prop) => props.has(prop))) {\n this._updatePosition();\n }\n }\n\n /** @private */\n __addUpdatePositionEventListeners() {\n window.visualViewport.addEventListener('resize', this._updatePosition);\n window.visualViewport.addEventListener('scroll', this.__onScroll, true);\n\n this.__positionTargetAncestorRootNodes = getAncestorRootNodes(this.positionTarget);\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.addEventListener('scroll', this.__onScroll, true);\n });\n\n if (this.positionTarget) {\n this.__observePositionTargetMove = observeMove(this.positionTarget, () => {\n this._updatePosition();\n });\n }\n }\n\n /** @private */\n __removeUpdatePositionEventListeners() {\n window.visualViewport.removeEventListener('resize', this._updatePosition);\n window.visualViewport.removeEventListener('scroll', this.__onScroll, true);\n\n if (this.__positionTargetAncestorRootNodes) {\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.removeEventListener('scroll', this.__onScroll, true);\n });\n this.__positionTargetAncestorRootNodes = null;\n }\n\n if (this.__observePositionTargetMove) {\n this.__observePositionTargetMove();\n this.__observePositionTargetMove = null;\n }\n }\n\n /** @private */\n __updatePositionSettings(opened, positionTarget) {\n this.__removeUpdatePositionEventListeners();\n\n if (positionTarget) {\n positionTarget.__overlay = null;\n targetResizeObserver.unobserve(positionTarget);\n\n if (opened) {\n this.__addUpdatePositionEventListeners();\n positionTarget.__overlay = this;\n targetResizeObserver.observe(positionTarget);\n }\n }\n\n if (opened) {\n const computedStyle = getComputedStyle(this);\n if (!this.__margins) {\n this.__margins = {};\n ['top', 'bottom', 'left', 'right'].forEach((propName) => {\n this.__margins[propName] = parseInt(computedStyle[propName], 10);\n });\n }\n\n this._updatePosition();\n // Schedule another position update (to cover virtual keyboard opening for example)\n requestAnimationFrame(() => this._updatePosition());\n }\n }\n\n /** @private */\n __onScroll(e) {\n // If the scroll event occurred inside the overlay, ignore it.\n if (e.target instanceof Node && this._deepContains(e.target)) {\n return;\n }\n\n this._updatePosition();\n }\n\n /** @private */\n __resetPosition() {\n this.__margins = null;\n\n Object.assign(this.style, {\n justifyContent: '',\n alignItems: '',\n top: '',\n bottom: '',\n left: '',\n right: '',\n });\n\n setOverlayStateAttribute(this, 'bottom-aligned', false);\n setOverlayStateAttribute(this, 'top-aligned', false);\n setOverlayStateAttribute(this, 'end-aligned', false);\n setOverlayStateAttribute(this, 'start-aligned', false);\n }\n\n _updatePosition() {\n if (!this.positionTarget || !this.opened || !this.__margins) {\n return;\n }\n\n const targetRect = this.positionTarget.getBoundingClientRect();\n\n if (targetRect.width === 0 && targetRect.height === 0 && this.opened) {\n this.opened = false;\n return;\n }\n\n // Detect the desired alignment and update the layout accordingly\n const shouldAlignStartVertically = this.__shouldAlignStartVertically(targetRect);\n this.style.justifyContent = shouldAlignStartVertically ? 'flex-start' : 'flex-end';\n\n const isRTL = this.__isRTL;\n const shouldAlignStartHorizontally = this.__shouldAlignStartHorizontally(targetRect, isRTL);\n const flexStart = (!isRTL && shouldAlignStartHorizontally) || (isRTL && !shouldAlignStartHorizontally);\n this.style.alignItems = flexStart ? 'flex-start' : 'flex-end';\n\n // Get the overlay rect after possible overlay alignment changes\n const overlayRect = this.getBoundingClientRect();\n\n // Obtain vertical positioning properties\n const verticalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n this,\n shouldAlignStartVertically,\n );\n\n // Obtain horizontal positioning properties\n const horizontalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n this,\n shouldAlignStartHorizontally,\n );\n\n // Apply the positioning properties to the overlay\n Object.assign(this.style, verticalProps, horizontalProps);\n\n setOverlayStateAttribute(this, 'bottom-aligned', !shouldAlignStartVertically);\n setOverlayStateAttribute(this, 'top-aligned', shouldAlignStartVertically);\n\n setOverlayStateAttribute(this, 'end-aligned', !flexStart);\n setOverlayStateAttribute(this, 'start-aligned', flexStart);\n }\n\n __shouldAlignStartHorizontally(targetRect, rtl) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentWidth = Math.max(this.__oldContentWidth || 0, this.$.overlay.offsetWidth);\n this.__oldContentWidth = this.$.overlay.offsetWidth;\n\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n const defaultAlignLeft = (!rtl && this.horizontalAlign === 'start') || (rtl && this.horizontalAlign === 'end');\n\n return this.__shouldAlignStart(\n targetRect,\n contentWidth,\n viewportWidth,\n this.__margins,\n defaultAlignLeft,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n );\n }\n\n __shouldAlignStartVertically(targetRect) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentHeight =\n this.requiredVerticalSpace || Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);\n this.__oldContentHeight = this.$.overlay.offsetHeight;\n\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n const defaultAlignTop = this.verticalAlign === 'top';\n\n return this.__shouldAlignStart(\n targetRect,\n contentHeight,\n viewportHeight,\n this.__margins,\n defaultAlignTop,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/max-params\n __shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) {\n const spaceForStartAlignment =\n viewportSize - targetRect[noOverlap ? propNames.end : propNames.start] - margins[propNames.end];\n const spaceForEndAlignment = targetRect[noOverlap ? propNames.start : propNames.end] - margins[propNames.start];\n\n const spaceForDefaultAlignment = defaultAlignStart ? spaceForStartAlignment : spaceForEndAlignment;\n const spaceForOtherAlignment = defaultAlignStart ? spaceForEndAlignment : spaceForStartAlignment;\n\n const shouldGoToDefaultSide =\n spaceForDefaultAlignment > spaceForOtherAlignment || spaceForDefaultAlignment > contentSize;\n\n return defaultAlignStart === shouldGoToDefaultSide;\n }\n\n /**\n * Returns an adjusted value after resizing the browser window,\n * to avoid wrong calculations when e.g. previously set `bottom`\n * CSS property value is larger than the updated viewport height.\n * See https://github.com/vaadin/web-components/issues/4604\n */\n __adjustBottomProperty(cssPropNameToSet, propNames, currentValue) {\n let adjustedProp;\n\n if (cssPropNameToSet === propNames.end) {\n // Adjust horizontally\n if (propNames.end === PROP_NAMES_VERTICAL.end) {\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n\n if (currentValue > viewportHeight && this.__oldViewportHeight) {\n const heightDiff = this.__oldViewportHeight - viewportHeight;\n adjustedProp = currentValue - heightDiff;\n }\n\n this.__oldViewportHeight = viewportHeight;\n }\n\n // Adjust vertically\n if (propNames.end === PROP_NAMES_HORIZONTAL.end) {\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n\n if (currentValue > viewportWidth && this.__oldViewportWidth) {\n const widthDiff = this.__oldViewportWidth - viewportWidth;\n adjustedProp = currentValue - widthDiff;\n }\n\n this.__oldViewportWidth = viewportWidth;\n }\n }\n\n return adjustedProp;\n }\n\n /**\n * Returns an object with CSS position properties to set,\n * e.g. { top: \"100px\" }\n */\n // eslint-disable-next-line @typescript-eslint/max-params\n __calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) {\n const cssPropNameToSet = shouldAlignStart ? propNames.start : propNames.end;\n const cssPropNameToClear = shouldAlignStart ? propNames.end : propNames.start;\n\n const currentValue = parseFloat(overlay.style[cssPropNameToSet] || getComputedStyle(overlay)[cssPropNameToSet]);\n const adjustedValue = this.__adjustBottomProperty(cssPropNameToSet, propNames, currentValue);\n\n const diff =\n overlayRect[shouldAlignStart ? propNames.start : propNames.end] -\n targetRect[noOverlap === shouldAlignStart ? propNames.end : propNames.start];\n\n const valueToSet = adjustedValue\n ? `${adjustedValue}px`\n : `${currentValue + diff * (shouldAlignStart ? -1 : 1)}px`;\n\n return {\n [cssPropNameToSet]: valueToSet,\n [cssPropNameToClear]: '',\n };\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Returns an array of ancestor root nodes for the given node.\n *\n * A root node is either a document node or a document fragment node (Shadow Root).\n * The array is collected by a bottom-up DOM traversing that starts with the given node\n * and involves both the light DOM and ancestor shadow DOM trees.\n *\n * @param {Node} node\n * @return {Node[]}\n */\nexport function getAncestorRootNodes(node) {\n const result = [];\n\n while (node) {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n result.push(node);\n break;\n }\n\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n result.push(node);\n node = node.host;\n continue;\n }\n\n if (node.assignedSlot) {\n node = node.assignedSlot;\n continue;\n }\n\n node = node.parentNode;\n }\n\n return result;\n}\n\n/**\n * Returns the list of flattened elements for the given `node`.\n * This list consists of a node's children and, for any children that are\n * `<slot>` elements, the expanded flattened list of `assignedElements`.\n *\n * @param {Node} node\n * @return {Element[]}\n */\nexport function getFlattenedElements(node) {\n const result = [];\n let elements;\n if (node.localName === 'slot') {\n elements = node.assignedElements();\n } else {\n result.push(node);\n elements = [...node.children];\n }\n elements.forEach((elem) => result.push(...getFlattenedElements(elem)));\n return result;\n}\n\n/**\n * Traverses the given node and its parents, including those that are across\n * the shadow root boundaries, until it finds a node that matches the selector.\n *\n * @param {string} selector The CSS selector to match against\n * @param {Node} node The starting node for the traversal\n * @return {Node | null} The closest matching element, or null if no match is found\n */\nexport function getClosestElement(selector, node) {\n if (!node) {\n return null;\n }\n\n return node.closest(selector) || getClosestElement(selector, node.getRootNode().host);\n}\n\n/**\n * Takes a string with values separated by space and returns a set the values\n *\n * @param {string} value\n * @return {Set<string>}\n */\nexport function deserializeAttributeValue(value) {\n if (!value) {\n return new Set();\n }\n\n return new Set(value.split(' '));\n}\n\n/**\n * Takes a set of string values and returns a string with values separated by space\n *\n * @param {Set<string>} values\n * @return {string}\n */\nexport function serializeAttributeValue(values) {\n return values ? [...values].join(' ') : '';\n}\n\n/**\n * Adds a value to an attribute containing space-delimited values.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function addValueToAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.add(value);\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Removes a value from an attribute containing space-delimited values.\n * If the value is the last one, the whole attribute is removed.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function removeValueFromAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.delete(value);\n if (values.size === 0) {\n element.removeAttribute(attr);\n return;\n }\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Returns true if the given node is an empty text node, false otherwise.\n *\n * @param {Node} node\n * @return {boolean}\n */\nexport function isEmptyTextNode(node) {\n return node.nodeType === Node.TEXT_NODE && node.textContent.trim() === '';\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { OverlayFocusMixin } from '@vaadin/overlay/src/vaadin-overlay-focus-mixin.js';\nimport { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';\n\n/**\n * @polymerMixin\n */\nexport const MenuOverlayMixin = (superClass) =>\n class MenuOverlayMixin extends OverlayFocusMixin(PositionMixin(superClass)) {\n static get properties() {\n return {\n /**\n * @protected\n */\n parentOverlay: {\n type: Object,\n readOnly: true,\n },\n\n /**\n * @protected\n */\n _theme: {\n type: String,\n readOnly: true,\n sync: true,\n },\n };\n }\n\n static get observers() {\n return ['_themeChanged(_theme)'];\n }\n\n /**\n * Override method from OverlayFocusMixin to use slotted div as content root.\n * @protected\n * @override\n */\n get _contentRoot() {\n return this._rendererRoot;\n }\n\n /**\n * Override method from OverlayMixin to use slotted div as the renderer root.\n * @protected\n * @override\n */\n get _rendererRoot() {\n if (!this.__savedRoot) {\n const root = document.createElement('div');\n root.setAttribute('slot', 'overlay');\n root.style.display = 'contents';\n this.owner.appendChild(root);\n this.__savedRoot = root;\n }\n\n return this.__savedRoot;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.restoreFocusOnClose = true;\n\n this.addEventListener('keydown', (e) => {\n if (!e.defaultPrevented && e.composedPath()[0] === this.$.overlay && [38, 40].indexOf(e.keyCode) > -1) {\n const child = this._contentRoot.firstElementChild;\n if (child && Array.isArray(child.items) && child.items.length) {\n e.preventDefault();\n if (e.keyCode === 38) {\n child.items[child.items.length - 1].focus();\n } else {\n child.focus();\n }\n }\n }\n });\n }\n\n /** @private */\n _themeChanged() {\n this.close();\n }\n\n /**\n * Returns the adjusted boundaries of the overlay.\n *\n * @returns {object}\n */\n getBoundaries() {\n // Measure actual overlay and content sizes\n const overlayRect = this.getBoundingClientRect();\n const contentRect = this.$.overlay.getBoundingClientRect();\n\n // Maximum x and y values are imposed by content size and overlay limits.\n let yMax = overlayRect.bottom - contentRect.height;\n\n // Adjust constraints to ensure bottom-aligned applies to sub-menu.\n const parent = this.parentOverlay;\n if (parent && parent.hasAttribute('bottom-aligned')) {\n const parentStyle = getComputedStyle(parent);\n yMax = yMax - parseFloat(parentStyle.bottom) - parseFloat(parentStyle.height);\n }\n\n return {\n xMax: overlayRect.right - contentRect.width,\n xMin: overlayRect.left + contentRect.width,\n yMax,\n };\n }\n\n /**\n * @protected\n * @override\n */\n _updatePosition() {\n super._updatePosition();\n\n if (this.positionTarget && this.parentOverlay && this.opened) {\n // This overlay is positioned by a parent menu item,\n // adjust the position by the overlay content paddings\n const content = this.$.content;\n const style = getComputedStyle(content);\n\n // Horizontal adjustment\n const isLeftAligned = !!this.style.left;\n if (isLeftAligned) {\n this.style.left = `${parseFloat(this.style.left) + parseFloat(style.paddingLeft)}px`;\n } else {\n this.style.right = `${parseFloat(this.style.right) + parseFloat(style.paddingRight)}px`;\n }\n\n // Vertical adjustment\n const isBottomAligned = !!this.style.bottom;\n if (isBottomAligned) {\n this.style.bottom = `${parseFloat(this.style.bottom) - parseFloat(style.paddingBottom)}px`;\n } else {\n this.style.top = `${parseFloat(this.style.top) - parseFloat(style.paddingTop)}px`;\n }\n }\n }\n\n /**\n * Override method inherited from `OverlayFocusMixin` to disable\n * focus restoration on sub-menu overlay close. Focus should\n * be only restored when the root menu closes.\n *\n * @protected\n * @override\n * @return {boolean}\n */\n _shouldRestoreFocus() {\n if (this.parentOverlay) {\n // Do not restore focus on sub-menu close.\n return false;\n }\n\n return super._shouldRestoreFocus();\n }\n\n /**\n * Override method inherited from `OverlayFocusMixin` to check if the\n * node is contained within the overlay's owner element (the menu),\n * where all content (overlay content, sub-menus, etc.) is slotted.\n *\n * @protected\n * @override\n * @param {Node} node\n * @return {boolean}\n */\n _deepContains(node) {\n return this.owner.contains(node);\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nconst testUserAgent = (regexp) => regexp.test(navigator.userAgent);\n\nconst testPlatform = (regexp) => regexp.test(navigator.platform);\n\nconst testVendor = (regexp) => regexp.test(navigator.vendor);\n\nexport const isAndroid = testUserAgent(/Android/u);\n\nexport const isChrome = testUserAgent(/Chrome/u) && testVendor(/Google Inc/u);\n\nexport const isFirefox = testUserAgent(/Firefox/u);\n\n// IPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\nexport const isIPad = testPlatform(/^iPad/u) || (testPlatform(/^Mac/u) && navigator.maxTouchPoints > 1);\n\nexport const isIPhone = testPlatform(/^iPhone/u);\n\nexport const isIOS = isIPhone || isIPad;\n\nexport const isSafari = testUserAgent(/^((?!chrome|android).)*safari/iu);\n\nexport const isTouch = (() => {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (_) {\n return false;\n }\n})();\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/** @type {Set<HTMLElement>} */\nconst attachedInstances = new Set();\n\n/**\n * Returns all attached overlays in visual stacking order.\n * @private\n */\nconst getAttachedInstances = () => [...attachedInstances].filter((el) => !el.hasAttribute('closing'));\n\n/**\n * Returns true if all the instances on top of the overlay are nested overlays.\n * @private\n */\nexport const hasOnlyNestedOverlays = (overlay) => {\n const instances = getAttachedInstances();\n const next = instances[instances.indexOf(overlay) + 1];\n if (!next) {\n return true;\n }\n\n if (!overlay._deepContains(next)) {\n return false;\n }\n\n return hasOnlyNestedOverlays(next);\n};\n\n/**\n * Returns true if the overlay is the last one in the opened overlays stack.\n * @param {HTMLElement} overlay\n * @param {function(HTMLElement): boolean} filter\n * @return {boolean}\n * @protected\n */\nexport const isLastOverlay = (overlay, filter = (_overlay) => true) => {\n const filteredOverlays = getAttachedInstances().filter(filter);\n return overlay === filteredOverlays.pop();\n};\n\n/**\n * @polymerMixin\n */\nexport const OverlayStackMixin = (superClass) =>\n class OverlayStackMixin extends superClass {\n /**\n * Returns true if this is the last one in the opened overlays stack.\n *\n * @return {boolean}\n * @protected\n */\n get _last() {\n return isLastOverlay(this);\n }\n\n /**\n * Returns true if this is overlay is attached.\n *\n * @return {boolean}\n * @protected\n */\n get _isAttached() {\n return attachedInstances.has(this);\n }\n\n /**\n * Brings the overlay as visually the frontmost one.\n */\n bringToFront() {\n // If the overlay is the last one, or if all other overlays shown above\n // are nested overlays (e.g. date-picker inside a dialog), do not call\n // `showPopover()` unnecessarily to avoid scroll position being reset.\n if (isLastOverlay(this) || hasOnlyNestedOverlays(this)) {\n return;\n }\n\n // Update stacking order of native popover-based overlays\n if (this.matches(':popover-open')) {\n this.hidePopover();\n this.showPopover();\n }\n\n // Update order of attached instances\n this._removeAttachedInstance();\n this._appendAttachedInstance();\n }\n\n /** @protected */\n _enterModalState() {\n if (document.body.style.pointerEvents !== 'none') {\n // Set body pointer-events to 'none' to disable mouse interactions with\n // other document nodes.\n this._previousDocumentPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = 'none';\n }\n\n // Disable pointer events in other attached overlays\n getAttachedInstances().forEach((el) => {\n if (el !== this) {\n el.$.overlay.style.pointerEvents = 'none';\n }\n });\n }\n\n /** @protected */\n _exitModalState() {\n if (this._previousDocumentPointerEvents !== undefined) {\n // Restore body pointer-events\n document.body.style.pointerEvents = this._previousDocumentPointerEvents;\n delete this._previousDocumentPointerEvents;\n }\n\n // Restore pointer events in the previous overlay(s)\n const instances = getAttachedInstances();\n\n let el;\n // Use instances.pop() to ensure the reverse order\n while ((el = instances.pop())) {\n if (el === this) {\n // Skip the current instance\n continue;\n }\n el.$.overlay.style.removeProperty('pointer-events');\n if (!el.modeless) {\n // Stop after the last modal\n break;\n }\n }\n }\n\n /** @protected */\n _appendAttachedInstance() {\n attachedInstances.add(this);\n }\n\n /** @protected */\n _removeAttachedInstance() {\n if (this._isAttached) {\n attachedInstances.delete(this);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isIOS } from '@vaadin/component-base/src/browser-utils.js';\nimport { OverlayFocusMixin } from './vaadin-overlay-focus-mixin.js';\nimport { OverlayStackMixin } from './vaadin-overlay-stack-mixin.js';\nimport { setOverlayStateAttribute } from './vaadin-overlay-utils.js';\n\n/**\n * @polymerMixin\n * @mixes OverlayFocusMixin\n * @mixes OverlayStackMixin\n */\nexport const OverlayMixin = (superClass) =>\n class OverlayMixin extends OverlayFocusMixin(OverlayStackMixin(superClass)) {\n static get properties() {\n return {\n /**\n * When true, the overlay is visible and attached to body.\n */\n opened: {\n type: Boolean,\n notify: true,\n observer: '_openedChanged',\n reflectToAttribute: true,\n sync: true,\n },\n\n /**\n * Owner element passed with renderer function\n * @type {HTMLElement}\n */\n owner: {\n type: Object,\n sync: true,\n },\n\n /**\n * Object with properties that is passed to `renderer` function\n */\n model: {\n type: Object,\n sync: true,\n },\n\n /**\n * Custom function for rendering the content of the overlay.\n * Receives three arguments:\n *\n * - `root` The root container DOM element. Append your content to it.\n * - `owner` The host element of the renderer function.\n * - `model` The object with the properties related with rendering.\n * @type {OverlayRenderer | null | undefined}\n */\n renderer: {\n type: Object,\n sync: true,\n },\n\n /**\n * When true the overlay won't disable the main content, showing\n * it doesn't change the functionality of the user interface.\n */\n modeless: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_modelessChanged',\n sync: true,\n },\n\n /**\n * When set to true, the overlay is hidden. This also closes the overlay\n * immediately in case there is a closing animation in progress.\n */\n hidden: {\n type: Boolean,\n reflectToAttribute: true,\n observer: '_hiddenChanged',\n sync: true,\n },\n\n /**\n * When true the overlay has backdrop on top of content when opened.\n */\n withBackdrop: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_withBackdropChanged',\n sync: true,\n },\n };\n }\n\n static get observers() {\n return ['_rendererOrDataChanged(renderer, owner, model, opened)'];\n }\n\n /**\n * Override to specify another element used as a renderer root,\n * e.g. slotted into the overlay, rather than overlay itself.\n * @protected\n */\n get _rendererRoot() {\n return this;\n }\n\n constructor() {\n super();\n\n this._boundMouseDownListener = this._mouseDownListener.bind(this);\n this._boundMouseUpListener = this._mouseUpListener.bind(this);\n this._boundOutsideClickListener = this._outsideClickListener.bind(this);\n this._boundKeydownListener = this._keydownListener.bind(this);\n\n /* c8 ignore next 3 */\n if (isIOS) {\n this._boundIosResizeListener = () => this._detectIosNavbar();\n }\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n // Set popover in firstUpdated before opened observers are called\n this.popover = 'manual';\n\n // Need to add dummy click listeners to this and the backdrop or else\n // the document click event listener (_outsideClickListener) may never\n // get invoked on iOS Safari (reproducible in <vaadin-dialog>\n // and <vaadin-context-menu>).\n this.addEventListener('click', () => {});\n if (this.$.backdrop) {\n this.$.backdrop.addEventListener('click', () => {});\n }\n\n this.addEventListener('mouseup', () => {\n // In Chrome, focus moves to body on overlay content mousedown\n // See https://github.com/vaadin/flow-components/issues/5507\n if (document.activeElement === document.body && this.$.overlay.getAttribute('tabindex') === '0') {\n this.$.overlay.focus();\n }\n });\n\n this.addEventListener('animationcancel', () => {\n this._flushAnimation('opening');\n this._flushAnimation('closing');\n });\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n /* c8 ignore next 3 */\n if (this._boundIosResizeListener) {\n this._detectIosNavbar();\n window.addEventListener('resize', this._boundIosResizeListener);\n }\n\n // Show popover again if overlay was just moved in the DOM\n if (this.opened) {\n this._attachOverlay();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n if (this.__scheduledOpen) {\n cancelAnimationFrame(this.__scheduledOpen);\n this.__scheduledOpen = null;\n }\n\n /* c8 ignore next 3 */\n if (this._boundIosResizeListener) {\n window.removeEventListener('resize', this._boundIosResizeListener);\n }\n }\n\n /**\n * Requests an update for the content of the overlay.\n * While performing the update, it invokes the renderer passed in the `renderer` property.\n *\n * It is not guaranteed that the update happens immediately (synchronously) after it is requested.\n */\n requestContentUpdate() {\n if (this.renderer) {\n this.renderer.call(this.owner, this._rendererRoot, this.owner, this.model);\n }\n }\n\n /**\n * @param {Event=} sourceEvent\n */\n close(sourceEvent) {\n // Dispatch the event on the overlay. Not using composed, as propagating the event through shadow roots could have\n // side effects when nesting overlays\n const event = new CustomEvent('vaadin-overlay-close', {\n bubbles: true,\n cancelable: true,\n detail: { overlay: this, sourceEvent },\n });\n this.dispatchEvent(event);\n // To allow listening for the event globally, also dispatch it on the document body\n document.body.dispatchEvent(event);\n if (!event.defaultPrevented) {\n this.opened = false;\n }\n }\n\n /**\n * Updates the coordinates of the overlay.\n * @param {!OverlayBoundsParam} bounds\n * @param {boolean} absolute\n */\n setBounds(bounds, absolute = true) {\n const overlay = this.$.overlay;\n const parsedBounds = { ...bounds };\n\n if (absolute && overlay.style.position !== 'absolute') {\n overlay.style.position = 'absolute';\n }\n\n Object.keys(parsedBounds).forEach((arg) => {\n // Allow setting width or height to `null`\n if (parsedBounds[arg] !== null && !isNaN(parsedBounds[arg])) {\n parsedBounds[arg] = `${parsedBounds[arg]}px`;\n }\n });\n\n Object.assign(overlay.style, parsedBounds);\n }\n\n /** @private */\n _detectIosNavbar() {\n /* c8 ignore next 15 */\n if (!this.opened) {\n return;\n }\n\n const innerHeight = window.innerHeight;\n const innerWidth = window.innerWidth;\n\n const landscape = innerWidth > innerHeight;\n\n const clientHeight = document.documentElement.clientHeight;\n\n if (landscape && clientHeight > innerHeight) {\n this.style.setProperty('--vaadin-overlay-viewport-bottom', `${clientHeight - innerHeight}px`);\n } else {\n this.style.setProperty('--vaadin-overlay-viewport-bottom', '0px');\n }\n }\n\n /**\n * Whether to add global listeners for closing on outside click.\n * By default, listeners are not added for a modeless overlay.\n *\n * @return {boolean}\n * @protected\n */\n _shouldAddGlobalListeners() {\n return !this.modeless;\n }\n\n /** @private */\n _addGlobalListeners() {\n if (this.__hasGlobalListeners) {\n return;\n }\n\n this.__hasGlobalListeners = true;\n\n document.addEventListener('mousedown', this._boundMouseDownListener);\n document.addEventListener('mouseup', this._boundMouseUpListener);\n // Firefox leaks click to document on contextmenu even if prevented\n // https://bugzilla.mozilla.org/show_bug.cgi?id=990614\n document.documentElement.addEventListener('click', this._boundOutsideClickListener, true);\n }\n\n /** @private */\n _removeGlobalListeners() {\n if (!this.__hasGlobalListeners) {\n return;\n }\n\n this.__hasGlobalListeners = false;\n\n document.removeEventListener('mousedown', this._boundMouseDownListener);\n document.removeEventListener('mouseup', this._boundMouseUpListener);\n document.documentElement.removeEventListener('click', this._boundOutsideClickListener, true);\n }\n\n /** @private */\n _rendererOrDataChanged(renderer, owner, model, opened) {\n const ownerOrModelChanged = this._oldOwner !== owner || this._oldModel !== model;\n this._oldModel = model;\n this._oldOwner = owner;\n\n const rendererChanged = this._oldRenderer !== renderer;\n const hasOldRenderer = this._oldRenderer !== undefined;\n this._oldRenderer = renderer;\n\n const openedChanged = this._oldOpened !== opened;\n this._oldOpened = opened;\n\n if (rendererChanged && hasOldRenderer) {\n this._rendererRoot.innerHTML = '';\n // Whenever a Lit-based renderer is used, it assigns a Lit part to the node it was rendered into.\n // When clearing the rendered content, this part needs to be manually disposed of.\n // Otherwise, using a Lit-based renderer on the same node will throw an exception or render nothing afterward.\n delete this._rendererRoot._$litPart$;\n }\n\n if (opened && renderer && (rendererChanged || openedChanged || ownerOrModelChanged)) {\n this.requestContentUpdate();\n }\n }\n\n /** @private */\n _modelessChanged(modeless) {\n if (this.opened) {\n // Add / remove listeners if modeless is changed while opened\n if (this._shouldAddGlobalListeners()) {\n this._addGlobalListeners();\n } else {\n this._removeGlobalListeners();\n }\n }\n\n if (!modeless) {\n if (this.opened) {\n this._enterModalState();\n }\n } else {\n this._exitModalState();\n }\n setOverlayStateAttribute(this, 'modeless', modeless);\n }\n\n /** @private */\n _withBackdropChanged(withBackdrop) {\n setOverlayStateAttribute(this, 'with-backdrop', withBackdrop);\n }\n\n /** @private */\n _openedChanged(opened, wasOpened) {\n if (opened) {\n // Prevent possible errors on setting `opened` to `true` while disconnected\n if (!this.isConnected) {\n this.opened = false;\n return;\n }\n\n this._saveFocus();\n\n this._animatedOpening();\n\n this.__scheduledOpen = requestAnimationFrame(() => {\n setTimeout(() => {\n this._trapFocus();\n\n // Dispatch the event on the overlay. Not using composed, as propagating the event through shadow roots\n // could have side effects when nesting overlays\n const event = new CustomEvent('vaadin-overlay-open', { detail: { overlay: this }, bubbles: true });\n this.dispatchEvent(event);\n // To allow listening for the event globally, also dispatch it on the document body\n document.body.dispatchEvent(event);\n });\n });\n\n document.addEventListener('keydown', this._boundKeydownListener);\n\n if (this._shouldAddGlobalListeners()) {\n this._addGlobalListeners();\n }\n } else if (wasOpened) {\n if (this.__scheduledOpen) {\n cancelAnimationFrame(this.__scheduledOpen);\n this.__scheduledOpen = null;\n }\n\n this._resetFocus();\n\n this._animatedClosing();\n\n document.removeEventListener('keydown', this._boundKeydownListener);\n\n if (this._shouldAddGlobalListeners()) {\n this._removeGlobalListeners();\n }\n }\n }\n\n /** @private */\n _hiddenChanged(hidden) {\n if (hidden && this.hasAttribute('closing')) {\n this._flushAnimation('closing');\n }\n }\n\n /**\n * @return {boolean}\n * @private\n */\n _shouldAnimate() {\n const style = getComputedStyle(this);\n const name = style.getPropertyValue('animation-name');\n const hidden = style.getPropertyValue('display') === 'none';\n return !hidden && name && name !== 'none';\n }\n\n /**\n * @param {string} type\n * @param {Function} callback\n * @private\n */\n _enqueueAnimation(type, callback) {\n const handler = `__${type}Handler`;\n const listener = (event) => {\n if (event && event.target !== this) {\n return;\n }\n callback();\n this.removeEventListener('animationend', listener);\n delete this[handler];\n };\n this[handler] = listener;\n this.addEventListener('animationend', listener);\n }\n\n /**\n * @param {string} type\n * @protected\n */\n _flushAnimation(type) {\n const handler = `__${type}Handler`;\n if (typeof this[handler] === 'function') {\n this[handler]();\n }\n }\n\n /** @private */\n _animatedOpening() {\n if (this._isAttached && this.hasAttribute('closing')) {\n this._flushAnimation('closing');\n }\n this._attachOverlay();\n this._appendAttachedInstance();\n this.bringToFront();\n if (!this.modeless) {\n this._enterModalState();\n }\n setOverlayStateAttribute(this, 'opening', true);\n\n if (this._shouldAnimate()) {\n this._enqueueAnimation('opening', () => {\n this._finishOpening();\n });\n } else {\n this._finishOpening();\n }\n }\n\n /** @private */\n _attachOverlay() {\n if (!this.matches(':popover-open')) {\n this.showPopover();\n }\n }\n\n /** @private */\n _finishOpening() {\n setOverlayStateAttribute(this, 'opening', false);\n }\n\n /** @private */\n _finishClosing() {\n this._detachOverlay();\n this._removeAttachedInstance();\n this.$.overlay.style.removeProperty('pointer-events');\n setOverlayStateAttribute(this, 'closing', false);\n this.dispatchEvent(new CustomEvent('vaadin-overlay-closed'));\n }\n\n /** @private */\n _animatedClosing() {\n if (this.hasAttribute('opening')) {\n this._flushAnimation('opening');\n }\n if (this._isAttached) {\n this._exitModalState();\n setOverlayStateAttribute(this, 'closing', true);\n this.dispatchEvent(new CustomEvent('vaadin-overlay-closing'));\n\n if (this._shouldAnimate()) {\n this._enqueueAnimation('closing', () => {\n this._finishClosing();\n });\n } else {\n this._finishClosing();\n }\n }\n }\n\n /** @private */\n _detachOverlay() {\n this.hidePopover();\n }\n\n /** @private */\n _mouseDownListener(event) {\n this._mouseDownInside = event.composedPath().indexOf(this.$.overlay) >= 0;\n }\n\n /** @private */\n _mouseUpListener(event) {\n this._mouseUpInside = event.composedPath().indexOf(this.$.overlay) >= 0;\n }\n\n /**\n * Whether to close the overlay on outside click or not.\n * Override this method to customize the closing logic.\n *\n * @param {Event} _event\n * @return {boolean}\n * @protected\n */\n _shouldCloseOnOutsideClick(_event) {\n return this._last;\n }\n\n /**\n * Outside click listener used in capture phase to close the overlay before\n * propagating the event to the listener on the element that triggered it.\n * Otherwise, calling `open()` would result in closing and re-opening.\n *\n * @private\n */\n _outsideClickListener(event) {\n if (event.composedPath().includes(this.$.overlay) || this._mouseDownInside || this._mouseUpInside) {\n this._mouseDownInside = false;\n this._mouseUpInside = false;\n return;\n }\n\n if (!this._shouldCloseOnOutsideClick(event)) {\n return;\n }\n\n const evt = new CustomEvent('vaadin-overlay-outside-click', {\n cancelable: true,\n detail: { sourceEvent: event },\n });\n this.dispatchEvent(evt);\n\n if (this.opened && !evt.defaultPrevented) {\n this.close(event);\n }\n }\n\n /**\n * Listener used to close whe overlay on Escape press, if it is the last one.\n * @private\n */\n _keydownListener(event) {\n if (!this._last || event.defaultPrevented) {\n return;\n }\n\n // Only close modeless overlay on Esc press when it contains focus\n if (!this._shouldAddGlobalListeners() && !event.composedPath().includes(this._focusTrapRoot)) {\n return;\n }\n\n if (event.key === 'Escape') {\n const evt = new CustomEvent('vaadin-overlay-escape-press', {\n cancelable: true,\n detail: { sourceEvent: event },\n });\n this.dispatchEvent(evt);\n\n if (this.opened && !evt.defaultPrevented) {\n this.close(event);\n }\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const menuOverlayStyles = css`\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n\n :host([right-aligned]),\n :host([end-aligned]) {\n align-items: flex-end;\n }\n\n :host([bottom-aligned]) {\n justify-content: flex-end;\n }\n\n [part='backdrop'] {\n background: transparent;\n }\n\n [part='content'] {\n padding: var(--vaadin-item-overlay-padding, 4px);\n }\n\n /* TODO keyboard focus becomes visible even when navigating the menu with the mouse */\n [part='overlay']:focus-visible {\n outline: none;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { menuOverlayStyles } from '@vaadin/context-menu/src/styles/vaadin-menu-overlay-base-styles.js';\nimport { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-base-styles.js';\n\nexport const menuBarOverlayStyles = [overlayStyles, menuOverlayStyles];\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const overlayStyles = css`\n :host {\n z-index: 200;\n position: fixed;\n\n /* Despite of what the names say, <vaadin-overlay> is just a container\n for position/sizing/alignment. The actual overlay is the overlay part. */\n\n /* Default position constraints. Themes can\n override this to adjust the gap between the overlay and the viewport. */\n inset: max(env(safe-area-inset-top, 0px), var(--vaadin-overlay-viewport-inset, 8px))\n max(env(safe-area-inset-right, 0px), var(--vaadin-overlay-viewport-inset, 8px))\n max(env(safe-area-inset-bottom, 0px), var(--vaadin-overlay-viewport-bottom))\n max(env(safe-area-inset-left, 0px), var(--vaadin-overlay-viewport-inset, 8px));\n\n /* Override native [popover] user agent styles */\n width: auto;\n height: auto;\n border: none;\n padding: 0;\n background-color: transparent;\n overflow: visible;\n\n /* Use flexbox alignment for the overlay part. */\n display: flex;\n flex-direction: column; /* makes dropdowns sizing easier */\n /* Align to center by default. */\n align-items: center;\n justify-content: center;\n\n /* Allow centering when max-width/max-height applies. */\n margin: auto;\n\n /* The host is not clickable, only the overlay part is. */\n pointer-events: none;\n\n /* Remove tap highlight on touch devices. */\n -webkit-tap-highlight-color: transparent;\n\n /* CSS API for host */\n --vaadin-overlay-viewport-bottom: 8px;\n }\n\n :host([hidden]),\n :host(:not([opened]):not([closing])),\n :host(:not([opened]):not([closing])) [part='overlay'] {\n display: none !important;\n }\n\n [part='overlay'] {\n color: var(--vaadin-overlay-text-color, var(--vaadin-text-color));\n background: var(--vaadin-overlay-background, var(--vaadin-background-color));\n border: var(--vaadin-overlay-border-width, 1px) solid\n var(--vaadin-overlay-border-color, var(--vaadin-border-color-secondary));\n border-radius: var(--vaadin-overlay-border-radius, var(--vaadin-radius-m));\n box-shadow: var(--vaadin-overlay-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3));\n box-sizing: border-box;\n max-width: 100%;\n overflow: auto;\n overscroll-behavior: contain;\n pointer-events: auto;\n -webkit-tap-highlight-color: initial;\n\n /* CSS reset for font styles */\n font: initial;\n letter-spacing: initial;\n text-align: initial;\n text-decoration: initial;\n text-indent: initial;\n text-transform: initial;\n user-select: text;\n white-space: initial;\n word-spacing: initial;\n\n /* Inherit font-family */\n font-family: inherit;\n }\n\n [part='backdrop'] {\n background: var(--vaadin-overlay-backdrop-background, rgba(0, 0, 0, 0.2));\n content: '';\n inset: 0;\n pointer-events: auto;\n position: fixed;\n z-index: -1;\n }\n\n [part='overlay']:focus-visible {\n outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);\n }\n\n @media (forced-colors: active) {\n [part='overlay'] {\n border: 3px solid !important;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { MenuOverlayMixin } from '@vaadin/context-menu/src/vaadin-menu-overlay-mixin.js';\nimport { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { menuBarOverlayStyles } from './styles/vaadin-menu-bar-overlay-base-styles.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-overlay\n * @extends HTMLElement\n * @mixes DirMixin\n * @mixes MenuOverlayMixin\n * @mixes OverlayMixin\n * @mixes ThemableMixin\n * @protected\n */\nexport class MenuBarOverlay extends MenuOverlayMixin(\n OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))),\n) {\n static get is() {\n return 'vaadin-menu-bar-overlay';\n }\n\n static get styles() {\n return menuBarOverlayStyles;\n }\n\n /** @protected */\n render() {\n return html`\n <div id=\"backdrop\" part=\"backdrop\" ?hidden=\"${!this.withBackdrop}\"></div>\n <div part=\"overlay\" id=\"overlay\" tabindex=\"0\">\n <div part=\"content\" id=\"content\">\n <slot></slot>\n <slot name=\"submenu\"></slot>\n </div>\n </div>\n `;\n }\n}\n\ndefineCustomElement(MenuBarOverlay);\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A controller for listening on media query changes.\n */\nexport class MediaQueryController {\n constructor(query, callback) {\n /**\n * The CSS media query to evaluate.\n *\n * @type {string}\n * @protected\n */\n this.query = query;\n\n /**\n * Function to call when media query changes.\n *\n * @type {Function}\n * @protected\n */\n this.callback = callback;\n\n this._boundQueryHandler = this._queryHandler.bind(this);\n }\n\n hostConnected() {\n this._removeListener();\n\n this._mediaQuery = window.matchMedia(this.query);\n\n this._addListener();\n\n this._queryHandler(this._mediaQuery);\n }\n\n hostDisconnected() {\n this._removeListener();\n }\n\n /** @private */\n _addListener() {\n if (this._mediaQuery) {\n this._mediaQuery.addListener(this._boundQueryHandler);\n }\n }\n\n /** @private */\n _removeListener() {\n if (this._mediaQuery) {\n this._mediaQuery.removeListener(this._boundQueryHandler);\n }\n\n this._mediaQuery = null;\n }\n\n /** @private */\n _queryHandler(mediaQuery) {\n if (typeof this.callback === 'function') {\n this.callback(mediaQuery.matches);\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isTouch } from '@vaadin/component-base/src/browser-utils.js';\n\n/**\n * @polymerMixin\n */\nexport const ItemsMixin = (superClass) =>\n class ItemsMixin extends superClass {\n static get properties() {\n return {\n /**\n * @typedef ContextMenuItem\n * @type {object}\n * @property {string} text - Text to be set as the menu item component's textContent\n * @property {string | HTMLElement} component - The component to represent the item.\n * Either a tagName or an element instance. Defaults to \"vaadin-context-menu-item\".\n * @property {boolean} disabled - If true, the item is disabled and cannot be selected\n * @property {boolean} checked - If true, the item shows a checkmark next to it\n * @property {boolean} keepOpen - If true, the menu will not be closed on item selection\n * @property {string} className - A space-delimited list of CSS class names to be set on the menu item component.\n * @property {string | string[]} theme - If set, sets the given theme(s) as an attribute to the menu item component, overriding any theme set on the context menu.\n * @property {ContextMenuItem[]} children - Array of child menu items\n */\n\n /**\n * Defines a (hierarchical) menu structure for the component.\n * If a menu item has a non-empty `children` set, a sub-menu with the child items is opened\n * next to the parent menu on mouseover, tap or a right arrow keypress.\n *\n * The items API can't be used together with a renderer!\n *\n * #### Example\n *\n * ```javascript\n * contextMenu.items = [\n * { text: 'Menu Item 1', theme: 'primary', className: 'first', children:\n * [\n * { text: 'Menu Item 1-1', checked: true, keepOpen: true },\n * { text: 'Menu Item 1-2' }\n * ]\n * },\n * { component: 'hr' },\n * { text: 'Menu Item 2', children:\n * [\n * { text: 'Menu Item 2-1' },\n * { text: 'Menu Item 2-2', disabled: true }\n * ]\n * },\n * { text: 'Menu Item 3', disabled: true, className: 'last' }\n * ];\n * ```\n *\n * @type {!Array<!ContextMenuItem> | undefined}\n */\n items: {\n type: Array,\n sync: true,\n },\n\n /** @protected */\n _positionTarget: {\n type: Object,\n sync: true,\n },\n };\n }\n\n constructor() {\n super();\n\n // Overlay's outside click listener doesn't work with modeless\n // overlays (submenus) so we need additional logic for it\n this.__itemsOutsideClickListener = (e) => {\n if (this._shouldCloseOnOutsideClick(e)) {\n this.dispatchEvent(new CustomEvent('items-outside-click'));\n }\n };\n this.addEventListener('items-outside-click', () => {\n this.items && this.close();\n });\n }\n\n /**\n * Tag name prefix used by overlay, list-box and items.\n * @protected\n * @return {string}\n */\n get _tagNamePrefix() {\n return 'vaadin-context-menu';\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n // Firefox leaks click to document on contextmenu even if prevented\n // https://bugzilla.mozilla.org/show_bug.cgi?id=990614\n document.documentElement.addEventListener('click', this.__itemsOutsideClickListener);\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n document.documentElement.removeEventListener('click', this.__itemsOutsideClickListener);\n }\n\n /**\n * Whether to close the overlay on outside click or not.\n * Override this method to customize the closing logic.\n *\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldCloseOnOutsideClick(event) {\n return !event.composedPath().some((el) => el.localName === `${this._tagNamePrefix}-overlay`);\n }\n\n /** @protected */\n __forwardFocus() {\n const overlay = this._overlayElement;\n const child = overlay._contentRoot.firstElementChild;\n // If parent item is not focused, do not focus submenu\n if (overlay.parentOverlay) {\n const parent = overlay.parentOverlay._contentRoot.querySelector('[expanded]');\n if (parent && parent.hasAttribute('focused') && child) {\n child.focus();\n } else {\n overlay.$.overlay.focus();\n }\n } else if (child) {\n child.focus();\n }\n }\n\n /** @private */\n __openSubMenu(subMenu, itemElement) {\n // Update sub-menu items and position target\n this.__updateSubMenuForItem(subMenu, itemElement);\n\n const parent = this._overlayElement;\n const subMenuOverlay = subMenu._overlayElement;\n // Store the reference parent overlay\n subMenuOverlay._setParentOverlay(parent);\n\n // Set theme attribute from parent element\n if (parent.hasAttribute('theme')) {\n subMenu.setAttribute('theme', parent.getAttribute('theme'));\n } else {\n subMenu.removeAttribute('theme');\n }\n\n const content = subMenuOverlay.$.content;\n content.style.minWidth = '';\n\n itemElement.dispatchEvent(\n new CustomEvent('opensubmenu', {\n detail: {\n children: itemElement._item.children,\n },\n }),\n );\n }\n\n /** @private */\n __updateSubMenuForItem(subMenu, itemElement) {\n subMenu.items = itemElement._item.children;\n subMenu.listenOn = itemElement;\n subMenu._positionTarget = itemElement;\n subMenu._overlayElement.requestContentUpdate();\n }\n\n /**\n * @param {!ContextMenuItem} item\n * @return {HTMLElement}\n * @private\n */\n __createComponent(item) {\n let component;\n\n if (item.component instanceof HTMLElement) {\n component = item.component;\n } else {\n component = document.createElement(item.component || `${this._tagNamePrefix}-item`);\n }\n\n // Support menu-bar / context-menu item\n if (component._hasVaadinItemMixin) {\n component.setAttribute('role', 'menuitem');\n component.tabIndex = -1;\n }\n\n if (component.localName === 'hr') {\n component.setAttribute('role', 'separator');\n } else {\n // Accept not `menuitem` elements e.g. `<button>`\n component.setAttribute('aria-haspopup', 'false');\n }\n\n this._setMenuItemTheme(component, item, this._theme);\n\n component._item = item;\n\n if (item.text) {\n component.textContent = item.text;\n }\n\n if (item.className) {\n component.setAttribute('class', item.className);\n }\n\n this.__toggleMenuComponentAttribute(component, 'menu-item-checked', item.checked);\n this.__toggleMenuComponentAttribute(component, 'disabled', item.disabled);\n\n if (item.children && item.children.length) {\n this.__updateExpanded(component, false);\n component.setAttribute('aria-haspopup', 'true');\n }\n\n return component;\n }\n\n /** @private */\n __initListBox() {\n const listBox = document.createElement(`${this._tagNamePrefix}-list-box`);\n\n if (this._theme) {\n listBox.setAttribute('theme', this._theme);\n }\n\n listBox.addEventListener('selected-changed', (event) => {\n const { value } = event.detail;\n if (typeof value === 'number') {\n const item = listBox.items[value]._item;\n // Reset selected before dispatching the event to prevent\n // checkmark icon flashing when `keepOpen` is set to true.\n listBox.selected = null;\n if (!item.children) {\n this.dispatchEvent(new CustomEvent('item-selected', { detail: { value: item } }));\n }\n }\n });\n\n return listBox;\n }\n\n /** @private */\n __initOverlay() {\n const overlay = this._overlayElement;\n\n overlay.$.backdrop.addEventListener('click', () => {\n this.close();\n });\n\n // Open a submenu on click event when a touch device is used.\n // On desktop, a submenu opens on hover.\n overlay.addEventListener(isTouch ? 'click' : 'mouseover', (event) => {\n // Ignore events from the submenus\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n this.__showSubMenu(event);\n });\n\n overlay.addEventListener('keydown', (event) => {\n // Ignore events from the submenus\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n const { key } = event;\n const isRTL = this.__isRTL;\n\n const isArrowRight = key === 'ArrowRight';\n const isArrowLeft = key === 'ArrowLeft';\n\n if ((!isRTL && isArrowRight) || (isRTL && isArrowLeft) || key === 'Enter' || key === ' ') {\n // Open a sub-menu\n this.__showSubMenu(event);\n } else if ((!isRTL && isArrowLeft) || (isRTL && isArrowRight) || key === 'Escape') {\n if (key === 'Escape') {\n event.stopPropagation();\n }\n // Close the menu\n this.close();\n this.listenOn.focus();\n } else if (key === 'Tab' && !event.defaultPrevented) {\n // Close all menus unless the Tab key was handled separately\n // which is the case e.g. in menu-bar with Tab navigation.\n this.dispatchEvent(new CustomEvent('close-all-menus'));\n }\n });\n }\n\n /** @private */\n __initSubMenu() {\n const subMenu = document.createElement(this.constructor.is);\n\n subMenu._modeless = true;\n subMenu.openOn = 'opensubmenu';\n\n // Close sub-menu when the parent menu closes.\n this.addEventListener('opened-changed', (event) => {\n if (!event.detail.value) {\n this._subMenu.close();\n }\n });\n\n // Forward event to the parent menu element.\n subMenu.addEventListener('close-all-menus', () => {\n this.dispatchEvent(new CustomEvent('close-all-menus'));\n });\n\n // Forward event to the parent menu element.\n subMenu.addEventListener('item-selected', (event) => {\n const { detail } = event;\n this.dispatchEvent(new CustomEvent('item-selected', { detail }));\n });\n\n // Listen to the forwarded event from sub-menu.\n this.addEventListener('close-all-menus', () => {\n // Call `close()` on the overlay to close synchronously,\n // as we can't have `sync: true` on `opened` property.\n this._overlayElement.close();\n });\n\n // Listen to the forwarded event from sub-menu.\n this.addEventListener('item-selected', (e) => {\n const menu = e.target;\n const selectedItem = e.detail.value;\n const index = menu.items.indexOf(selectedItem);\n // Menu can be no longer opened if parent menu items changed\n if (!!selectedItem.keepOpen && index > -1 && menu.opened) {\n menu.__selectedIndex = index;\n menu.requestContentUpdate();\n } else if (!selectedItem.keepOpen) {\n this.close();\n }\n });\n\n // Mark parent item as collapsed when closing.\n subMenu.addEventListener('opened-changed', (event) => {\n if (!event.detail.value) {\n const expandedItem = this._listBox.querySelector('[expanded]');\n if (expandedItem) {\n this.__updateExpanded(expandedItem, false);\n }\n }\n });\n\n return subMenu;\n }\n\n /** @private */\n __showSubMenu(event, item = event.composedPath().find((node) => node.localName === `${this._tagNamePrefix}-item`)) {\n // Delay enabling the mouseover listener to avoid it from triggering on parent menu open\n if (!this.__openListenerActive) {\n return;\n }\n\n // Don't open sub-menus while the menu is still opening\n if (this._overlayElement.hasAttribute('opening')) {\n requestAnimationFrame(() => {\n this.__showSubMenu(event, item);\n });\n\n return;\n }\n\n const subMenu = this._subMenu;\n const expandedItem = this._listBox.querySelector('[expanded]');\n\n if (item && item !== expandedItem) {\n const { children } = item._item;\n\n // Check if the sub-menu was focused before closing it.\n const child = subMenu._overlayElement._contentRoot.firstElementChild;\n const isSubmenuFocused = child && child.focused;\n\n // Mark previously expanded item as collapsed\n if (expandedItem) {\n this.__updateExpanded(expandedItem, false);\n }\n\n // Close sub-menu if there are no children for the new item\n if (!children || !children.length) {\n subMenu.close();\n }\n\n if (!this.opened) {\n return;\n }\n\n if (children && children.length) {\n // Open or update the submenu if the new item has children\n this.__updateExpanded(item, true);\n this.__openSubMenu(subMenu, item);\n } else if (isSubmenuFocused) {\n // If the sub-menu item was focused, focus its parent item.\n subMenu.listenOn.focus();\n } else if (!this._listBox.focused) {\n // Otherwise, focus the overlay part to handle arrow keys.\n this._overlayElement.$.overlay.focus();\n }\n }\n }\n\n /** @protected */\n __getListBox() {\n return this._overlayElement._contentRoot.querySelector(`${this._tagNamePrefix}-list-box`);\n }\n\n /**\n * @param {!HTMLElement} root\n * @param {!ContextMenu} menu\n * @protected\n */\n __itemsRenderer(root, menu) {\n this.__initMenu(root, menu);\n\n this._subMenu.closeOn = menu.closeOn;\n this._listBox.innerHTML = '';\n\n menu.items.forEach((item) => {\n const component = this.__createComponent(item);\n this._listBox.appendChild(component);\n });\n }\n\n /** @protected */\n _setMenuItemTheme(component, item, hostTheme) {\n // Use existing component theme when it is provided\n let theme = component.getAttribute('theme') || hostTheme;\n\n // Item theme takes precedence over host theme / component theme\n // even if it's empty, as long as it's not undefined or null\n if (item.theme != null) {\n theme = Array.isArray(item.theme) ? item.theme.join(' ') : item.theme;\n }\n\n this.__updateTheme(component, theme);\n }\n\n /** @private */\n __toggleMenuComponentAttribute(component, attribute, on) {\n if (on) {\n component.setAttribute(attribute, '');\n component[`__has-${attribute}`] = true;\n } else if (component[`__has-${attribute}`]) {\n component.removeAttribute(attribute);\n component[`__has-${attribute}`] = false;\n }\n }\n\n /** @private */\n __initMenu(root, _menu) {\n // NOTE: in this method, `menu` and `this` reference the same element,\n // so we can use either of those. Original implementation used `menu`.\n if (!root.firstElementChild) {\n this.__initOverlay();\n\n const listBox = this.__initListBox();\n this._listBox = listBox;\n root.appendChild(listBox);\n\n const subMenu = this.__initSubMenu();\n subMenu.slot = 'submenu';\n this._subMenu = subMenu;\n this.appendChild(subMenu);\n\n requestAnimationFrame(() => {\n this.__openListenerActive = true;\n });\n } else {\n this.__updateTheme(this._listBox, this._theme);\n }\n }\n\n /** @private */\n __updateExpanded(component, expanded) {\n component.setAttribute('aria-expanded', expanded.toString());\n component.toggleAttribute('expanded', expanded);\n }\n\n /** @private */\n __updateTheme(component, theme) {\n if (theme) {\n component.setAttribute('theme', theme);\n } else {\n component.removeAttribute('theme');\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isElementFocusable, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { isAndroid, isIOS } from '@vaadin/component-base/src/browser-utils.js';\nimport { addListener, deepTargetFind, gestures, removeListener } from '@vaadin/component-base/src/gestures.js';\nimport { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';\nimport { ItemsMixin } from './vaadin-contextmenu-items-mixin.js';\n\n/**\n * @polymerMixin\n * @mixes ItemsMixin\n */\nexport const ContextMenuMixin = (superClass) =>\n class ContextMenuMixinClass extends ItemsMixin(superClass) {\n static get properties() {\n return {\n /**\n * CSS selector that can be used to target any child element\n * of the context menu to listen for `openOn` events.\n */\n selector: {\n type: String,\n },\n\n /**\n * True if the overlay is currently displayed.\n */\n opened: {\n type: Boolean,\n reflectToAttribute: true,\n observer: '_openedChanged',\n value: false,\n notify: true,\n readOnly: true,\n },\n\n /**\n * Event name to listen for opening the context menu.\n * @attr {string} open-on\n */\n openOn: {\n type: String,\n value: 'vaadin-contextmenu',\n sync: true,\n },\n\n /**\n * The target element that's listened to for context menu opening events.\n * By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`\n * events.\n * @type {!HTMLElement}\n * @default self\n */\n listenOn: {\n type: Object,\n sync: true,\n value() {\n return this;\n },\n },\n\n /**\n * Event name to listen for closing the context menu.\n * @attr {string} close-on\n */\n closeOn: {\n type: String,\n value: 'click',\n observer: '_closeOnChanged',\n sync: true,\n },\n\n /**\n * Custom function for rendering the content of the menu overlay.\n * Receives three arguments:\n *\n * - `root` The root container DOM element. Append your content to it.\n * - `contextMenu` The reference to the `<vaadin-context-menu>` element.\n * - `context` The object with the menu context, contains:\n * - `context.target` the target of the menu opening event,\n * - `context.detail` the menu opening event detail.\n * @type {ContextMenuRenderer | undefined}\n */\n renderer: {\n type: Function,\n sync: true,\n },\n\n /**\n * When true, the menu overlay is modeless.\n * @protected\n */\n _modeless: {\n type: Boolean,\n sync: true,\n },\n\n /** @private */\n _context: {\n type: Object,\n sync: true,\n },\n\n /** @private */\n _phone: {\n type: Boolean,\n },\n\n _fullscreen: {\n type: Boolean,\n },\n\n _fullscreenMediaQuery: {\n type: String,\n value: '(max-width: 450px), (max-height: 450px)',\n },\n };\n }\n\n static get observers() {\n return [\n '_targetOrOpenOnChanged(listenOn, openOn)',\n '_rendererChanged(renderer, items)',\n '_fullscreenChanged(_fullscreen)',\n ];\n }\n\n constructor() {\n super();\n\n this._boundOpen = this.open.bind(this);\n this._boundClose = this.close.bind(this);\n this._boundPreventDefault = this._preventDefault.bind(this);\n this._boundOnGlobalContextMenu = this._onGlobalContextMenu.bind(this);\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n this.__boundOnScroll = this.__onScroll.bind(this);\n window.addEventListener('scroll', this.__boundOnScroll, true);\n\n // Restore opened state if overlay was opened when disconnecting\n if (this.__restoreOpened) {\n this._setOpened(true);\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n window.removeEventListener('scroll', this.__boundOnScroll, true);\n\n // Close overlay and memorize opened state\n this.__restoreOpened = this.opened;\n this.close();\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n this._overlayElement = this.$.overlay;\n\n this.addController(\n new MediaQueryController(this._fullscreenMediaQuery, (matches) => {\n this._fullscreen = matches;\n }),\n );\n }\n\n /**\n * Runs before overlay is fully rendered\n * @private\n */\n _onOverlayOpened(event) {\n // Ignore events from submenus\n if (event.target !== this._overlayElement) {\n return;\n }\n\n const opened = event.detail.value;\n this._setOpened(opened);\n if (opened) {\n this.__alignOverlayPosition();\n }\n }\n\n /**\n * Runs after overlay is fully rendered\n * @private\n */\n _onVaadinOverlayOpen(event) {\n // Ignore events from submenus\n if (event.target !== this._overlayElement) {\n return;\n }\n\n this.__alignOverlayPosition();\n this._overlayElement.style.visibility = '';\n this.__forwardFocus();\n }\n\n /**\n * Runs after overlay's closing animation is finished\n * @private\n */\n _onVaadinOverlayClosed() {\n this.dispatchEvent(new CustomEvent('closed'));\n }\n\n /** @private */\n _targetOrOpenOnChanged(listenOn, openOn) {\n if (this._oldListenOn && this._oldOpenOn) {\n this._unlisten(this._oldListenOn, this._oldOpenOn, this._boundOpen);\n\n this._oldListenOn.style.webkitTouchCallout = '';\n this._oldListenOn.style.webkitUserSelect = '';\n this._oldListenOn.style.userSelect = '';\n\n this._oldListenOn = null;\n this._oldOpenOn = null;\n }\n\n if (listenOn && openOn) {\n this._listen(listenOn, openOn, this._boundOpen);\n\n this._oldListenOn = listenOn;\n this._oldOpenOn = openOn;\n }\n }\n\n /** @private */\n _fullscreenChanged(fullScreen) {\n this._phone = fullScreen;\n }\n\n /** @private */\n __setListenOnUserSelect(opened) {\n const value = opened ? 'none' : '';\n // Note: these styles don't seem to work in Firefox on iOS.\n this.listenOn.style.webkitTouchCallout = value;\n this.listenOn.style.webkitUserSelect = value; // Chrome, Safari, Firefox\n this.listenOn.style.userSelect = value;\n\n // Note: because user-selection is disabled on the overlay\n // before opening the menu the text could be already selected\n // so we need to clear that selection\n if (opened) {\n document.getSelection().removeAllRanges();\n }\n }\n\n /** @private */\n _closeOnChanged(closeOn, oldCloseOn) {\n // Outside click event from overlay\n const evtOverlay = 'vaadin-overlay-outside-click';\n\n const overlay = this._overlayElement;\n\n if (oldCloseOn) {\n this._unlisten(overlay, oldCloseOn, this._boundClose);\n }\n if (closeOn) {\n this._listen(overlay, closeOn, this._boundClose);\n overlay.removeEventListener(evtOverlay, this._boundPreventDefault);\n } else {\n overlay.addEventListener(evtOverlay, this._boundPreventDefault);\n }\n }\n\n /** @private */\n _preventDefault(e) {\n e.preventDefault();\n }\n\n /** @private */\n _openedChanged(opened, oldOpened) {\n if (opened) {\n document.documentElement.addEventListener('contextmenu', this._boundOnGlobalContextMenu, true);\n } else if (oldOpened) {\n document.documentElement.removeEventListener('contextmenu', this._boundOnGlobalContextMenu, true);\n }\n\n this.__setListenOnUserSelect(opened);\n }\n\n /**\n * Requests an update for the content of the menu overlay.\n * While performing the update, it invokes the renderer passed in the `renderer` property.\n *\n * It is not guaranteed that the update happens immediately (synchronously) after it is requested.\n */\n requestContentUpdate() {\n if (!this._overlayElement) {\n return;\n }\n\n // Store state to be restored after re-rendering\n this.__preserveMenuState();\n\n // Run overlay renderer to re-create DOM elements\n this._overlayElement.requestContentUpdate();\n\n // Restore focused item, update sub-menu if needed\n this.__restoreMenuState();\n }\n\n /** @private */\n _rendererChanged(renderer, items) {\n if (items) {\n if (renderer) {\n throw new Error('The items API cannot be used together with a renderer');\n }\n\n if (this.closeOn === 'click') {\n this.closeOn = '';\n }\n }\n }\n\n /**\n * Closes the overlay.\n */\n close() {\n this._setOpened(false);\n }\n\n /** @private */\n _contextTarget(e) {\n if (this.selector) {\n const targets = this.listenOn.querySelectorAll(this.selector);\n\n return Array.prototype.filter.call(targets, (el) => {\n return e.composedPath().indexOf(el) > -1;\n })[0];\n } else if (this.listenOn && this.listenOn !== this && this.position) {\n // If listenOn has been set on a different element than the context menu root, then use listenOn as the target.\n return this.listenOn;\n }\n return e.target;\n }\n\n /**\n * Opens the overlay.\n * @param {!Event | undefined} e used as the context for the menu. Overlay coordinates are taken from this event.\n */\n open(e) {\n // Ignore events from the overlay\n if (this._overlayElement && e.composedPath().includes(this._overlayElement)) {\n return;\n }\n\n if (e && !this.opened) {\n this._context = {\n detail: e.detail,\n target: this._contextTarget(e),\n };\n\n if (this._context.target) {\n e.preventDefault();\n e.stopPropagation();\n\n // Used in alignment which is delayed until overlay is rendered\n this.__x = this._getEventCoordinate(e, 'x');\n this.__pageXOffset = window.pageXOffset;\n\n this.__y = this._getEventCoordinate(e, 'y');\n this.__pageYOffset = window.pageYOffset;\n\n // Hide overlay until it is fully rendered and positioned\n this._overlayElement.style.visibility = 'hidden';\n this._setOpened(true);\n }\n }\n }\n\n /** @private */\n __preserveMenuState() {\n const listBox = this.__getListBox();\n if (listBox) {\n this.__focusedIndex = listBox.items.indexOf(listBox.focused);\n\n if (this._subMenu && this._subMenu.opened) {\n this.__subMenuIndex = listBox.items.indexOf(this._subMenu.listenOn);\n }\n }\n }\n\n /** @private */\n __restoreMenuState() {\n const focusedIndex = this.__focusedIndex;\n const subMenuIndex = this.__subMenuIndex;\n const selectedIndex = this.__selectedIndex;\n\n const listBox = this.__getListBox();\n\n if (listBox) {\n // Initialize menu items synchronously\n listBox._observer.flush();\n\n if (subMenuIndex > -1) {\n const itemToOpen = listBox.items[subMenuIndex];\n if (itemToOpen) {\n if (Array.isArray(itemToOpen._item.children) && itemToOpen._item.children.length) {\n // Keep nested sub-menu opened and update it\n this.__updateSubMenuForItem(this._subMenu, itemToOpen);\n this._subMenu.requestContentUpdate();\n } else {\n // Item no longer has children, close sub-menu\n this._subMenu.close();\n this.__focusItem(itemToOpen);\n }\n } else {\n // Item no longer exists, focus the list-box\n listBox.focus();\n }\n }\n\n // Focus previously selected item, in case it was clicked with\n // `keepOpen` option, or the previously focused item, if any\n this.__focusItem(selectedIndex > -1 ? listBox.children[selectedIndex] : listBox.items[focusedIndex]);\n }\n\n this.__focusedIndex = undefined;\n this.__subMenuIndex = undefined;\n this.__selectedIndex = undefined;\n }\n\n /** @private */\n __focusItem(item) {\n if (item) {\n item.focus({ focusVisible: isKeyboardActive() });\n }\n }\n\n /** @private */\n __onScroll() {\n if (!this.opened || this.position) {\n return;\n }\n\n const yDiff = window.pageYOffset - this.__pageYOffset;\n const xDiff = window.pageXOffset - this.__pageXOffset;\n\n this.__adjustPosition('left', -xDiff);\n this.__adjustPosition('right', xDiff);\n\n this.__adjustPosition('top', -yDiff);\n this.__adjustPosition('bottom', yDiff);\n\n this.__pageYOffset += yDiff;\n this.__pageXOffset += xDiff;\n }\n\n /** @private */\n __adjustPosition(coord, diff) {\n const overlay = this._overlayElement;\n const style = overlay.style;\n\n style[coord] = `${(parseInt(style[coord]) || 0) + diff}px`;\n }\n\n /** @private */\n __alignOverlayPosition() {\n const overlay = this._overlayElement;\n\n if (overlay.positionTarget) {\n // The overlay is positioned relative to another node, for example, a\n // menu item in a nested submenu structure where this overlay lists\n // the items for another submenu.\n // It means that the overlay positioning is controlled by\n // vaadin-overlay-position-mixin so no manual alignment is needed.\n return;\n }\n\n const style = overlay.style;\n\n // Reset all properties before measuring\n ['top', 'right', 'bottom', 'left'].forEach((prop) => style.removeProperty(prop));\n ['right-aligned', 'end-aligned', 'bottom-aligned'].forEach((attr) => overlay.removeAttribute(attr));\n\n // Maximum x and y values are imposed by content size and overlay limits.\n const { xMax, xMin, yMax } = overlay.getBoundaries();\n // Reuse saved x and y event values, in order to this method be used async\n // in the `vaadin-overlay-change` which guarantees that overlay is ready.\n // The valus represent an anchor position on the page where the contextmenu\n // event took place.\n const x = this.__x;\n const y = this.__y;\n\n // Select one overlay corner and move to the event x/y position.\n // Then set styling attrs for flex-aligning the content appropriately.\n const wdthVport = document.documentElement.clientWidth;\n const hghtVport = document.documentElement.clientHeight;\n\n if (!this.__isRTL) {\n if (x < wdthVport / 2 || x < xMax) {\n // Menu is displayed in the right side of the anchor\n style.left = `${x}px`;\n } else {\n // Menu is displayed in the left side of the anchor\n style.right = `${Math.max(0, wdthVport - x)}px`;\n this._setEndAligned(overlay);\n }\n } else if (x > wdthVport / 2 || x > xMin) {\n // Menu is displayed in the right side of the anchor\n style.right = `${Math.max(0, wdthVport - x)}px`;\n } else {\n // Menu is displayed in the left side of the anchor\n style.left = `${x}px`;\n this._setEndAligned(overlay);\n }\n\n if (y < hghtVport / 2 || y < yMax) {\n style.top = `${y}px`;\n } else {\n style.bottom = `${Math.max(0, hghtVport - y)}px`;\n overlay.setAttribute('bottom-aligned', '');\n }\n }\n\n /** @private */\n _setEndAligned(element) {\n element.setAttribute('end-aligned', '');\n if (!this.__isRTL) {\n element.setAttribute('right-aligned', '');\n }\n }\n\n /** @private */\n _getEventCoordinate(event, coord) {\n if (event.detail instanceof Object) {\n if (event.detail[coord]) {\n // Polymer gesture events, get coordinate from detail\n return event.detail[coord];\n } else if (event.detail.sourceEvent) {\n // Unwrap detailed event\n return this._getEventCoordinate(event.detail.sourceEvent, coord);\n }\n } else {\n const prop = `client${coord.toUpperCase()}`;\n const position = event.changedTouches ? event.changedTouches[0][prop] : event[prop];\n\n if (position === 0) {\n // Native keyboard event\n const rect = event.target.getBoundingClientRect();\n return coord === 'x' ? rect.left : rect.top + rect.height;\n }\n // Native mouse or touch event\n return position;\n }\n }\n\n /** @private */\n _listen(node, evType, handler) {\n if (gestures[evType]) {\n addListener(node, evType, handler);\n } else {\n node.addEventListener(evType, handler);\n }\n }\n\n /** @private */\n _unlisten(node, evType, handler) {\n if (gestures[evType]) {\n removeListener(node, evType, handler);\n } else {\n node.removeEventListener(evType, handler);\n }\n }\n\n /** @private */\n __createMouseEvent(name, clientX, clientY) {\n return new MouseEvent(name, {\n bubbles: true,\n composed: true,\n cancelable: true,\n clientX,\n clientY,\n });\n }\n\n /** @private */\n __focusClosestFocusable(target) {\n let currentElement = target;\n while (currentElement) {\n if (currentElement instanceof HTMLElement && isElementFocusable(currentElement)) {\n currentElement.focus();\n return;\n }\n currentElement = currentElement.parentNode || currentElement.host;\n }\n }\n\n /**\n * Executes a synthetic contextmenu event on the target under the coordinates.\n * @private\n */\n __contextMenuAt(x, y) {\n // Get the deepest element under the coordinates\n const target = deepTargetFind(x, y);\n if (target) {\n // Need to run asynchronously to avoid timing issues with the Lit-based context menu\n queueMicrotask(() => {\n // Dispatch mousedown and mouseup to the target (grid cell focus depends on it)\n target.dispatchEvent(this.__createMouseEvent('mousedown', x, y));\n target.dispatchEvent(this.__createMouseEvent('mouseup', x, y));\n // Manually try to focus the closest focusable of the target\n this.__focusClosestFocusable(target);\n // Dispatch a contextmenu event to the target\n target.dispatchEvent(this.__createMouseEvent('contextmenu', x, y));\n });\n }\n }\n\n /** @private */\n _onGlobalContextMenu(e) {\n if (!e.shiftKey) {\n const isTouchDevice = isAndroid || isIOS;\n if (!isTouchDevice) {\n e.stopPropagation();\n // Prevent having the previously focused node auto-focus after closing the overlay\n this._overlayElement.__focusRestorationController.focusNode = null;\n // Dispatch another contextmenu at the same coordinates after the overlay is closed\n this._overlayElement.addEventListener(\n 'vaadin-overlay-closed',\n (closeEvent) => {\n if (closeEvent.target === this._overlayElement) {\n this.__contextMenuAt(e.clientX, e.clientY);\n }\n },\n {\n once: true,\n },\n );\n }\n\n e.preventDefault();\n this.close();\n }\n }\n\n /**\n * Fired when the context menu is closed.\n *\n * @event closed\n */\n };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-menu-bar-item.js';\nimport './vaadin-menu-bar-list-box.js';\nimport './vaadin-menu-bar-overlay.js';\nimport { css, html, LitElement } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { ContextMenuMixin } from '@vaadin/context-menu/src/vaadin-context-menu-mixin.js';\nimport { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-submenu\n * @extends HTMLElement\n * @mixes ContextMenuMixin\n * @mixes ThemePropertyMixin\n * @protected\n */\nclass MenuBarSubmenu extends ContextMenuMixin(ThemePropertyMixin(PolylitMixin(LitElement))) {\n static get is() {\n return 'vaadin-menu-bar-submenu';\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n `;\n }\n\n static get properties() {\n return {\n isRoot: {\n type: Boolean,\n reflectToAttribute: true,\n sync: true,\n },\n };\n }\n\n constructor() {\n super();\n\n this.openOn = 'opensubmenu';\n }\n\n /**\n * Tag name prefix used by overlay, list-box and items.\n * @protected\n * @return {string}\n */\n get _tagNamePrefix() {\n return 'vaadin-menu-bar';\n }\n\n /** @protected */\n render() {\n return html`\n <vaadin-menu-bar-overlay\n id=\"overlay\"\n .owner=\"${this}\"\n .opened=\"${this.opened}\"\n .model=\"${this._context}\"\n .modeless=\"${this._modeless}\"\n .renderer=\"${this.__itemsRenderer}\"\n .withBackdrop=\"${this._phone}\"\n .positionTarget=\"${this._positionTarget}\"\n ?no-horizontal-overlap=\"${!this.isRoot}\"\n ?phone=\"${this._phone}\"\n theme=\"${ifDefined(this._theme)}\"\n exportparts=\"backdrop, overlay, content\"\n @opened-changed=\"${this._onOverlayOpened}\"\n @vaadin-overlay-open=\"${this._onVaadinOverlayOpen}\"\n >\n <slot name=\"overlay\"></slot>\n <slot name=\"submenu\" slot=\"submenu\"></slot>\n </vaadin-menu-bar-overlay>\n `;\n }\n\n /**\n * Overriding the observer to not add global \"contextmenu\" listener.\n * @override\n */\n _openedChanged() {\n // Do nothing\n }\n\n /**\n * Overriding the public method to reset expanded button state.\n */\n close() {\n super.close();\n\n // Only handle 1st level submenu\n if (this.hasAttribute('is-root')) {\n this.parentElement._close();\n }\n }\n\n /**\n * Override method from `ContextMenuMixin` to prevent closing\n * sub-menu on the same click event that was used to open it.\n *\n * @param {Event} event\n * @return {boolean}\n * @protected\n * @override\n */\n _shouldCloseOnOutsideClick(event) {\n if (this.hasAttribute('is-root') && event.composedPath().includes(this.listenOn)) {\n return false;\n }\n\n return super._shouldCloseOnOutsideClick(event);\n }\n}\n\ndefineCustomElement(MenuBarSubmenu);\n\nexport { MenuBarSubmenu };\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","const DEV_MODE_CODE_REGEXP =\n /\\/\\*[\\*!]\\s+vaadin-dev-mode:start([\\s\\S]*)vaadin-dev-mode:end\\s+\\*\\*\\//i;\n\nconst FlowClients = window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients;\n\nfunction isMinified() {\n function test() {\n /** vaadin-dev-mode:start\n return false;\n vaadin-dev-mode:end **/\n return true;\n }\n return uncommentAndRun(test);\n}\n\nfunction isDevelopmentMode() {\n try {\n if (isForcedDevelopmentMode()) {\n return true;\n }\n\n if (!isLocalhost()) {\n return false;\n }\n\n if (FlowClients) {\n return !isFlowProductionMode();\n }\n\n return !isMinified();\n } catch (e) {\n // Some error in this code, assume production so no further actions will be taken\n return false;\n }\n}\n\nfunction isForcedDevelopmentMode() {\n return localStorage.getItem(\"vaadin.developmentmode.force\");\n}\n\nfunction isLocalhost() {\n return ([\"localhost\",\"127.0.0.1\"].indexOf(window.location.hostname) >= 0);\n}\n\nfunction isFlowProductionMode() {\n if (FlowClients) {\n const productionModeApps = Object.keys(FlowClients)\n .map(key => FlowClients[key])\n .filter(client => client.productionMode);\n if (productionModeApps.length > 0) {\n return true;\n }\n }\n return false;\n}\n\nfunction uncommentAndRun(callback, args) {\n if (typeof callback !== 'function') {\n return;\n }\n\n const match = DEV_MODE_CODE_REGEXP.exec(callback.toString());\n if (match) {\n try {\n // requires CSP: script-src 'unsafe-eval'\n callback = new Function(match[1]);\n } catch (e) {\n // eat the exception\n console.log('vaadin-development-mode-detector: uncommentAndRun() failed', e)\n }\n }\n\n return callback(args);\n}\n\n// A guard against polymer-modulizer removing the window.Vaadin\n// initialization above.\nwindow['Vaadin'] = window['Vaadin'] || {};\n\n/**\n * Inspects the source code of the given `callback` function for\n * specially-marked _commented_ code. If such commented code is found in the\n * callback source, uncomments and runs that code instead of the callback\n * itself. Otherwise runs the callback as is.\n *\n * The optional arguments are passed into the callback / uncommented code,\n * the result is returned.\n *\n * See the `isMinified()` function source code in this file for an example.\n *\n */\nexport const runIfDevelopmentMode = function(callback, args) {\n if (window.Vaadin.developmentMode) {\n return uncommentAndRun(callback, args);\n }\n};\n\nif (window.Vaadin.developmentMode === undefined) {\n window.Vaadin.developmentMode = isDevelopmentMode();\n}\n","/* This file is autogenerated from src/vaadin-usage-statistics.tpl.html */\n/*\n\nThis script gathers usage statistics from the application running in development mode.\n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n*/\n/*\n FIXME(polymer-modulizer): the above comments were extracted\n from HTML and may be out of place here. Review them and\n then delete this comment!\n*/\nimport { runIfDevelopmentMode } from '@vaadin/vaadin-development-mode-detector/vaadin-development-mode-detector.js';\n\nfunction maybeGatherAndSendStats() {\n /*! vaadin-dev-mode:start\n (function () {\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar getPolymerVersion = function getPolymerVersion() {\n return window.Polymer && window.Polymer.version;\n};\n\nvar StatisticsGatherer = function () {\n function StatisticsGatherer(logger) {\n classCallCheck(this, StatisticsGatherer);\n\n this.now = new Date().getTime();\n this.logger = logger;\n }\n\n createClass(StatisticsGatherer, [{\n key: 'frameworkVersionDetectors',\n value: function frameworkVersionDetectors() {\n return {\n 'Flow': function Flow() {\n if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {\n var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {\n return window.Vaadin.Flow.clients[key];\n }).filter(function (client) {\n return client.getVersionInfo;\n }).map(function (client) {\n return client.getVersionInfo().flow;\n });\n if (flowVersions.length > 0) {\n return flowVersions[0];\n }\n }\n },\n 'Vaadin Framework': function VaadinFramework() {\n if (window.vaadin && window.vaadin.clients) {\n var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {\n return client.getVersionInfo;\n }).map(function (client) {\n return client.getVersionInfo().vaadinVersion;\n });\n if (frameworkVersions.length > 0) {\n return frameworkVersions[0];\n }\n }\n },\n 'AngularJs': function AngularJs() {\n if (window.angular && window.angular.version && window.angular.version) {\n return window.angular.version.full;\n }\n },\n 'Angular': function Angular() {\n if (window.ng) {\n var tags = document.querySelectorAll(\"[ng-version]\");\n if (tags.length > 0) {\n return tags[0].getAttribute(\"ng-version\");\n }\n return \"Unknown\";\n }\n },\n 'Backbone.js': function BackboneJs() {\n if (window.Backbone) {\n return window.Backbone.VERSION;\n }\n },\n 'React': function React() {\n var reactSelector = '[data-reactroot], [data-reactid]';\n if (!!document.querySelector(reactSelector)) {\n // React does not publish the version by default\n return \"unknown\";\n }\n },\n 'Ember': function Ember() {\n if (window.Em && window.Em.VERSION) {\n return window.Em.VERSION;\n } else if (window.Ember && window.Ember.VERSION) {\n return window.Ember.VERSION;\n }\n },\n 'jQuery': function (_jQuery) {\n function jQuery() {\n return _jQuery.apply(this, arguments);\n }\n\n jQuery.toString = function () {\n return _jQuery.toString();\n };\n\n return jQuery;\n }(function () {\n if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {\n return jQuery.prototype.jquery;\n }\n }),\n 'Polymer': function Polymer() {\n var version = getPolymerVersion();\n if (version) {\n return version;\n }\n },\n 'LitElement': function LitElement() {\n var version = window.litElementVersions && window.litElementVersions[0];\n if (version) {\n return version;\n }\n },\n 'LitHtml': function LitHtml() {\n var version = window.litHtmlVersions && window.litHtmlVersions[0];\n if (version) {\n return version;\n }\n },\n 'Vue.js': function VueJs() {\n if (window.Vue) {\n return window.Vue.version;\n }\n }\n };\n }\n }, {\n key: 'getUsedVaadinElements',\n value: function getUsedVaadinElements(elements) {\n var version = getPolymerVersion();\n var elementClasses = void 0;\n // NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.\n // Check all locations calling the method getEntries() in\n // https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106\n // Currently it is only used by BootstrapHandler.\n if (version && version.indexOf('2') === 0) {\n // Polymer 2: components classes are stored in window.Vaadin\n elementClasses = Object.keys(window.Vaadin).map(function (c) {\n return window.Vaadin[c];\n }).filter(function (c) {\n return c.is;\n });\n } else {\n // Polymer 3: components classes are stored in window.Vaadin.registrations\n elementClasses = window.Vaadin.registrations || [];\n }\n elementClasses.forEach(function (klass) {\n var version = klass.version ? klass.version : \"0.0.0\";\n elements[klass.is] = { version: version };\n });\n }\n }, {\n key: 'getUsedVaadinThemes',\n value: function getUsedVaadinThemes(themes) {\n ['Lumo', 'Material'].forEach(function (themeName) {\n var theme;\n var version = getPolymerVersion();\n if (version && version.indexOf('2') === 0) {\n // Polymer 2: themes are stored in window.Vaadin\n theme = window.Vaadin[themeName];\n } else {\n // Polymer 3: themes are stored in custom element registry\n theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');\n }\n if (theme && theme.version) {\n themes[themeName] = { version: theme.version };\n }\n });\n }\n }, {\n key: 'getFrameworks',\n value: function getFrameworks(frameworks) {\n var detectors = this.frameworkVersionDetectors();\n Object.keys(detectors).forEach(function (framework) {\n var detector = detectors[framework];\n try {\n var version = detector();\n if (version) {\n frameworks[framework] = { version: version };\n }\n } catch (e) {}\n });\n }\n }, {\n key: 'gather',\n value: function gather(storage) {\n var storedStats = storage.read();\n var gatheredStats = {};\n var types = [\"elements\", \"frameworks\", \"themes\"];\n\n types.forEach(function (type) {\n gatheredStats[type] = {};\n if (!storedStats[type]) {\n storedStats[type] = {};\n }\n });\n\n var previousStats = JSON.stringify(storedStats);\n\n this.getUsedVaadinElements(gatheredStats.elements);\n this.getFrameworks(gatheredStats.frameworks);\n this.getUsedVaadinThemes(gatheredStats.themes);\n\n var now = this.now;\n types.forEach(function (type) {\n var keys = Object.keys(gatheredStats[type]);\n keys.forEach(function (key) {\n if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {\n storedStats[type][key] = { firstUsed: now };\n }\n // Discards any previously logged version number\n storedStats[type][key].version = gatheredStats[type][key].version;\n storedStats[type][key].lastUsed = now;\n });\n });\n\n var newStats = JSON.stringify(storedStats);\n storage.write(newStats);\n if (newStats != previousStats && Object.keys(storedStats).length > 0) {\n this.logger.debug(\"New stats: \" + newStats);\n }\n }\n }]);\n return StatisticsGatherer;\n}();\n\nvar StatisticsStorage = function () {\n function StatisticsStorage(key) {\n classCallCheck(this, StatisticsStorage);\n\n this.key = key;\n }\n\n createClass(StatisticsStorage, [{\n key: 'read',\n value: function read() {\n var localStorageStatsString = localStorage.getItem(this.key);\n try {\n return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');\n } catch (e) {\n return {};\n }\n }\n }, {\n key: 'write',\n value: function write(data) {\n localStorage.setItem(this.key, data);\n }\n }, {\n key: 'clear',\n value: function clear() {\n localStorage.removeItem(this.key);\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n var storedStats = this.read();\n var empty = true;\n Object.keys(storedStats).forEach(function (key) {\n if (Object.keys(storedStats[key]).length > 0) {\n empty = false;\n }\n });\n\n return empty;\n }\n }]);\n return StatisticsStorage;\n}();\n\nvar StatisticsSender = function () {\n function StatisticsSender(url, logger) {\n classCallCheck(this, StatisticsSender);\n\n this.url = url;\n this.logger = logger;\n }\n\n createClass(StatisticsSender, [{\n key: 'send',\n value: function send(data, errorHandler) {\n var logger = this.logger;\n\n if (navigator.onLine === false) {\n logger.debug(\"Offline, can't send\");\n errorHandler();\n return;\n }\n logger.debug(\"Sending data to \" + this.url);\n\n var req = new XMLHttpRequest();\n req.withCredentials = true;\n req.addEventListener(\"load\", function () {\n // Stats sent, nothing more to do\n logger.debug(\"Response: \" + req.responseText);\n });\n req.addEventListener(\"error\", function () {\n logger.debug(\"Send failed\");\n errorHandler();\n });\n req.addEventListener(\"abort\", function () {\n logger.debug(\"Send aborted\");\n errorHandler();\n });\n req.open(\"POST\", this.url);\n req.setRequestHeader(\"Content-Type\", \"application/json\");\n req.send(data);\n }\n }]);\n return StatisticsSender;\n}();\n\nvar StatisticsLogger = function () {\n function StatisticsLogger(id) {\n classCallCheck(this, StatisticsLogger);\n\n this.id = id;\n }\n\n createClass(StatisticsLogger, [{\n key: '_isDebug',\n value: function _isDebug() {\n return localStorage.getItem(\"vaadin.\" + this.id + \".debug\");\n }\n }, {\n key: 'debug',\n value: function debug(msg) {\n if (this._isDebug()) {\n console.info(this.id + \": \" + msg);\n }\n }\n }]);\n return StatisticsLogger;\n}();\n\nvar UsageStatistics = function () {\n function UsageStatistics() {\n classCallCheck(this, UsageStatistics);\n\n this.now = new Date();\n this.timeNow = this.now.getTime();\n this.gatherDelay = 10; // Delay between loading this file and gathering stats\n this.initialDelay = 24 * 60 * 60;\n\n this.logger = new StatisticsLogger(\"statistics\");\n this.storage = new StatisticsStorage(\"vaadin.statistics.basket\");\n this.gatherer = new StatisticsGatherer(this.logger);\n this.sender = new StatisticsSender(\"https://tools.vaadin.com/usage-stats/submit\", this.logger);\n }\n\n createClass(UsageStatistics, [{\n key: 'maybeGatherAndSend',\n value: function maybeGatherAndSend() {\n var _this = this;\n\n if (localStorage.getItem(UsageStatistics.optOutKey)) {\n return;\n }\n this.gatherer.gather(this.storage);\n setTimeout(function () {\n _this.maybeSend();\n }, this.gatherDelay * 1000);\n }\n }, {\n key: 'lottery',\n value: function lottery() {\n return true;\n }\n }, {\n key: 'currentMonth',\n value: function currentMonth() {\n return this.now.getYear() * 12 + this.now.getMonth();\n }\n }, {\n key: 'maybeSend',\n value: function maybeSend() {\n var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));\n var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));\n\n if (!firstUse) {\n // Use a grace period to avoid interfering with tests, incognito mode etc\n firstUse = this.timeNow;\n localStorage.setItem(UsageStatistics.firstUseKey, firstUse);\n }\n\n if (this.timeNow < firstUse + this.initialDelay * 1000) {\n this.logger.debug(\"No statistics will be sent until the initial delay of \" + this.initialDelay + \"s has passed\");\n return;\n }\n if (this.currentMonth() <= monthProcessed) {\n this.logger.debug(\"This month has already been processed\");\n return;\n }\n localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());\n // Use random sampling\n if (this.lottery()) {\n this.logger.debug(\"Congratulations, we have a winner!\");\n } else {\n this.logger.debug(\"Sorry, no stats from you this time\");\n return;\n }\n\n this.send();\n }\n }, {\n key: 'send',\n value: function send() {\n // Ensure we have the latest data\n this.gatherer.gather(this.storage);\n\n // Read, send and clean up\n var data = this.storage.read();\n data[\"firstUse\"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));\n data[\"usageStatisticsVersion\"] = UsageStatistics.version;\n var info = 'This request contains usage statistics gathered from the application running in development mode. \\n\\nStatistics gathering is automatically disabled and excluded from production builds.\\n\\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\\n\\n\\n\\n';\n var self = this;\n this.sender.send(info + JSON.stringify(data), function () {\n // Revert the 'month processed' flag\n localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);\n });\n }\n }], [{\n key: 'version',\n get: function get$1() {\n return '2.1.2';\n }\n }, {\n key: 'firstUseKey',\n get: function get$1() {\n return 'vaadin.statistics.firstuse';\n }\n }, {\n key: 'monthProcessedKey',\n get: function get$1() {\n return 'vaadin.statistics.monthProcessed';\n }\n }, {\n key: 'optOutKey',\n get: function get$1() {\n return 'vaadin.statistics.optout';\n }\n }]);\n return UsageStatistics;\n}();\n\ntry {\n window.Vaadin = window.Vaadin || {};\n window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();\n window.Vaadin.usageStatsChecker.maybeGatherAndSend();\n} catch (e) {\n // Intentionally ignored as this is not a problem in the app being developed\n}\n\n}());\n\n vaadin-dev-mode:end **/\n}\n\nexport const usageStatistics = function() {\n if (typeof runIfDevelopmentMode === 'function') {\n return runIfDevelopmentMode(maybeGatherAndSendStats);\n }\n};\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nlet uniqueId = 0;\n\n/**\n * Resets the unique id counter.\n *\n * @return {void}\n */\nexport function resetUniqueId() {\n uniqueId = 0;\n}\n\n/**\n * Returns a unique integer id.\n *\n * @return {number}\n */\nexport function generateUniqueId() {\n // eslint-disable-next-line no-plusplus\n return uniqueId++;\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isEmptyTextNode } from './dom-utils.js';\nimport { SlotObserver } from './slot-observer.js';\nimport { generateUniqueId } from './unique-id-utils.js';\n\n/**\n * A controller for providing content to slot element and observing changes.\n */\nexport class SlotController extends EventTarget {\n /**\n * Ensure that every instance has unique ID.\n *\n * @param {HTMLElement} host\n * @param {string} prefix\n * @return {string}\n * @protected\n */\n static generateId(host, prefix = 'default') {\n return `${prefix}-${host.localName}-${generateUniqueId()}`;\n }\n\n constructor(host, slotName, tagName, config = {}) {\n super();\n\n const { initializer, multiple, observe, useUniqueId, uniqueIdPrefix } = config;\n\n this.host = host;\n this.slotName = slotName;\n this.tagName = tagName;\n this.observe = typeof observe === 'boolean' ? observe : true;\n this.multiple = typeof multiple === 'boolean' ? multiple : false;\n this.slotInitializer = initializer;\n\n if (multiple) {\n this.nodes = [];\n }\n\n // Only generate the default ID if requested by the controller.\n if (useUniqueId) {\n this.defaultId = this.constructor.generateId(host, uniqueIdPrefix || slotName);\n }\n }\n\n hostConnected() {\n if (!this.initialized) {\n if (this.multiple) {\n this.initMultiple();\n } else {\n this.initSingle();\n }\n\n if (this.observe) {\n this.observeSlot();\n }\n\n this.initialized = true;\n }\n }\n\n /** @protected */\n initSingle() {\n let node = this.getSlotChild();\n\n if (!node) {\n node = this.attachDefaultNode();\n this.initNode(node);\n } else {\n this.node = node;\n this.initAddedNode(node);\n }\n }\n\n /** @protected */\n initMultiple() {\n const children = this.getSlotChildren();\n\n if (children.length === 0) {\n const defaultNode = this.attachDefaultNode();\n if (defaultNode) {\n this.nodes = [defaultNode];\n this.initNode(defaultNode);\n }\n } else {\n this.nodes = children;\n children.forEach((node) => {\n this.initAddedNode(node);\n });\n }\n }\n\n /**\n * Create and attach default node using the provided tag name, if any.\n * @return {Node | undefined}\n * @protected\n */\n attachDefaultNode() {\n const { host, slotName, tagName } = this;\n\n // Check if the node was created previously and if so, reuse it.\n let node = this.defaultNode;\n\n // Tag name is optional, sometimes we don't init default content.\n if (!node && tagName) {\n node = document.createElement(tagName);\n if (node instanceof Element) {\n if (slotName !== '') {\n node.setAttribute('slot', slotName);\n }\n this.defaultNode = node;\n }\n }\n\n if (node) {\n this.node = node;\n host.appendChild(node);\n }\n\n return node;\n }\n\n /**\n * Return the list of nodes matching the slot managed by the controller.\n * @return {Node}\n */\n getSlotChildren() {\n const { slotName } = this;\n return Array.from(this.host.childNodes).filter((node) => {\n // Ignore nodes with data-slot-ignore attribute\n if (node.nodeType === Node.ELEMENT_NODE && node.hasAttribute('data-slot-ignore')) {\n return false;\n }\n // Either an element (any slot) or a text node (only un-named slot).\n return (\n (node.nodeType === Node.ELEMENT_NODE && node.slot === slotName) ||\n (node.nodeType === Node.TEXT_NODE && node.textContent.trim() && slotName === '')\n );\n });\n }\n\n /**\n * Return a reference to the node managed by the controller.\n * @return {Node}\n */\n getSlotChild() {\n return this.getSlotChildren()[0];\n }\n\n /**\n * Run `slotInitializer` for the node managed by the controller.\n *\n * @param {Node} node\n * @protected\n */\n initNode(node) {\n const { slotInitializer } = this;\n // Don't try to bind `this` to initializer (normally it's arrow function).\n // Instead, pass the host as a first argument to access component's state.\n if (slotInitializer) {\n slotInitializer(node, this.host);\n }\n }\n\n /**\n * Override to initialize the newly added custom node.\n *\n * @param {Node} _node\n * @protected\n */\n initCustomNode(_node) {}\n\n /**\n * Override to teardown slotted node when it's removed.\n *\n * @param {Node} _node\n * @protected\n */\n teardownNode(_node) {}\n\n /**\n * Run both `initCustomNode` and `initNode` for a custom slotted node.\n *\n * @param {Node} node\n * @protected\n */\n initAddedNode(node) {\n if (node !== this.defaultNode) {\n this.initCustomNode(node);\n this.initNode(node);\n }\n }\n\n /**\n * Setup the observer to manage slot content changes.\n * @protected\n */\n observeSlot() {\n const { slotName } = this;\n const selector = slotName === '' ? 'slot:not([name])' : `slot[name=${slotName}]`;\n const slot = this.host.shadowRoot.querySelector(selector);\n\n this.__slotObserver = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n const current = this.multiple ? this.nodes : [this.node];\n\n // Calling `slot.assignedNodes()` includes whitespace text nodes in case of default slot:\n // unlike comment nodes, they are not filtered out. So we need to manually ignore them.\n // Also ignore nodes with data-slot-ignore attribute.\n const newNodes = addedNodes.filter(\n (node) =>\n !isEmptyTextNode(node) &&\n !current.includes(node) &&\n !(node.nodeType === Node.ELEMENT_NODE && node.hasAttribute('data-slot-ignore')),\n );\n\n if (removedNodes.length) {\n this.nodes = current.filter((node) => !removedNodes.includes(node));\n\n removedNodes.forEach((node) => {\n this.teardownNode(node);\n });\n }\n\n if (newNodes && newNodes.length > 0) {\n if (this.multiple) {\n // Remove default node if exists\n if (this.defaultNode) {\n this.defaultNode.remove();\n }\n this.nodes = [...current, ...newNodes].filter((node) => node !== this.defaultNode);\n newNodes.forEach((node) => {\n this.initAddedNode(node);\n });\n } else {\n // Remove previous node if exists\n if (this.node) {\n this.node.remove();\n }\n this.node = newNodes[0];\n this.initAddedNode(this.node);\n }\n }\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from './slot-controller.js';\n\n/**\n * A controller that manages the slotted tooltip element.\n */\nexport class TooltipController extends SlotController {\n constructor(host) {\n // Do not provide slot factory to create tooltip lazily.\n super(host, 'tooltip');\n\n this.setTarget(host);\n this.__onContentChange = this.__onContentChange.bind(this);\n }\n\n /**\n * Override to initialize the newly added custom tooltip.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n initCustomNode(tooltipNode) {\n tooltipNode.target = this.target;\n\n if (this.ariaTarget !== undefined) {\n tooltipNode.ariaTarget = this.ariaTarget;\n }\n\n if (this.context !== undefined) {\n tooltipNode.context = this.context;\n }\n\n if (this.manual !== undefined) {\n tooltipNode.manual = this.manual;\n }\n\n if (this.opened !== undefined) {\n tooltipNode.opened = this.opened;\n }\n\n if (this.position !== undefined) {\n tooltipNode._position = this.position;\n }\n\n if (this.shouldShow !== undefined) {\n tooltipNode.shouldShow = this.shouldShow;\n }\n\n if (!this.manual) {\n this.host.setAttribute('has-tooltip', '');\n }\n this.__notifyChange(tooltipNode);\n tooltipNode.addEventListener('content-changed', this.__onContentChange);\n }\n\n /**\n * Override to notify the host when the tooltip is removed.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n teardownNode(tooltipNode) {\n if (!this.manual) {\n this.host.removeAttribute('has-tooltip');\n }\n tooltipNode.removeEventListener('content-changed', this.__onContentChange);\n this.__notifyChange(null);\n }\n\n /**\n * Set an HTML element for linking with the tooltip overlay\n * via `aria-describedby` attribute used by screen readers.\n * @param {HTMLElement} ariaTarget\n */\n setAriaTarget(ariaTarget) {\n this.ariaTarget = ariaTarget;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.ariaTarget = ariaTarget;\n }\n }\n\n /**\n * Set a context object to be used by generator.\n * @param {object} context\n */\n setContext(context) {\n this.context = context;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.context = context;\n }\n }\n\n /**\n * Toggle manual state on the slotted tooltip.\n * @param {boolean} manual\n */\n setManual(manual) {\n this.manual = manual;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.manual = manual;\n }\n }\n\n /**\n * Toggle opened state on the slotted tooltip.\n * @param {boolean} opened\n */\n setOpened(opened) {\n this.opened = opened;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.opened = opened;\n }\n }\n\n /**\n * Set default position for the slotted tooltip.\n * This can be overridden by setting the position\n * using corresponding property or attribute.\n * @param {string} position\n */\n setPosition(position) {\n this.position = position;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode._position = position;\n }\n }\n\n /**\n * Set function used to detect whether to show\n * the tooltip based on a condition.\n * @param {Function} shouldShow\n */\n setShouldShow(shouldShow) {\n this.shouldShow = shouldShow;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.shouldShow = shouldShow;\n }\n }\n\n /**\n * Set an HTML element to attach the tooltip to.\n * @param {HTMLElement} target\n */\n setTarget(target) {\n this.target = target;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.target = target;\n }\n }\n\n /** @private */\n __onContentChange(event) {\n this.__notifyChange(event.target);\n }\n\n /** @private */\n __notifyChange(node) {\n this.dispatchEvent(new CustomEvent('tooltip-changed', { detail: { node } }));\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n gap: var(--vaadin-button-gap, 0 var(--vaadin-gap-s));\n white-space: nowrap;\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n user-select: none;\n cursor: var(--vaadin-clickable-cursor);\n box-sizing: border-box;\n flex-shrink: 0;\n height: var(--vaadin-button-height, fit-content);\n margin: var(--vaadin-button-margin, 0);\n padding: var(--vaadin-button-padding, var(--vaadin-padding-block-container) var(--vaadin-padding-inline-container));\n font-family: var(--vaadin-button-font-family, inherit);\n font-size: var(--vaadin-button-font-size, inherit);\n line-height: var(--vaadin-button-line-height, inherit);\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--vaadin-button-text-color, var(--vaadin-text-color));\n background: var(--vaadin-button-background, var(--vaadin-background-container));\n background-origin: border-box;\n border: var(--vaadin-button-border-width, 1px) solid\n var(--vaadin-button-border-color, var(--vaadin-border-color-secondary));\n border-radius: var(--vaadin-button-border-radius, var(--vaadin-radius-m));\n touch-action: manipulation;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n .vaadin-button-container,\n [part='prefix'],\n [part='suffix'] {\n display: contents;\n }\n\n [part='label'] {\n display: inline-flex;\n }\n\n :host(:is([focus-ring], :focus-visible)) {\n outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);\n outline-offset: 1px;\n }\n\n :host([theme~='primary']) {\n --vaadin-button-background: var(--vaadin-text-color);\n --vaadin-button-text-color: var(--vaadin-background-color);\n --vaadin-button-border-color: transparent;\n }\n\n :host([theme~='tertiary']) {\n background: transparent;\n border-color: transparent;\n }\n\n :host([disabled]) {\n pointer-events: var(--_vaadin-button-disabled-pointer-events, none);\n cursor: var(--vaadin-disabled-cursor);\n opacity: 0.5;\n }\n\n :host([disabled][theme~='primary']) {\n --vaadin-button-text-color: var(--vaadin-background-container-strong);\n --vaadin-button-background: var(--vaadin-text-color-disabled);\n }\n\n @media (forced-colors: active) {\n :host {\n --vaadin-button-border-width: 1px;\n --vaadin-button-background: ButtonFace;\n --vaadin-button-text-color: ButtonText;\n }\n\n :host([theme~='primary']) {\n forced-color-adjust: none;\n --vaadin-button-background: CanvasText;\n --vaadin-button-text-color: Canvas;\n --vaadin-icon-color: Canvas;\n }\n\n ::slotted(*) {\n forced-color-adjust: auto;\n }\n\n :host([disabled]) {\n --vaadin-button-background: transparent !important;\n --vaadin-button-border-color: GrayText !important;\n --vaadin-button-text-color: GrayText !important;\n opacity: 1;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { DisabledMixin } from './disabled-mixin.js';\n\n/**\n * A mixin to toggle the `tabindex` attribute.\n *\n * The attribute is set to -1 whenever the user disables the element\n * and restored with the last known value once the element is enabled.\n *\n * @polymerMixin\n * @mixes DisabledMixin\n */\nexport const TabindexMixin = (superclass) =>\n class TabindexMixinClass extends DisabledMixin(superclass) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @protected\n */\n tabindex: {\n type: Number,\n reflectToAttribute: true,\n observer: '_tabindexChanged',\n sync: true,\n },\n\n /**\n * Stores the last known tabindex since the element has been disabled.\n *\n * @protected\n */\n _lastTabIndex: {\n type: Number,\n },\n };\n }\n\n /**\n * When the element gets disabled, the observer saves the last known tabindex\n * and makes the element not focusable by setting tabindex to -1.\n * As soon as the element gets enabled, the observer restores the last known tabindex\n * so that the element can be focusable again.\n *\n * @protected\n * @override\n */\n _disabledChanged(disabled, oldDisabled) {\n super._disabledChanged(disabled, oldDisabled);\n\n if (this.__shouldAllowFocusWhenDisabled()) {\n return;\n }\n\n if (disabled) {\n if (this.tabindex !== undefined) {\n this._lastTabIndex = this.tabindex;\n }\n this.setAttribute('tabindex', '-1');\n } else if (oldDisabled) {\n if (this._lastTabIndex !== undefined) {\n this.setAttribute('tabindex', this._lastTabIndex);\n } else {\n this.tabindex = undefined;\n }\n }\n }\n\n /**\n * When the user has changed tabindex while the element is disabled,\n * the observer reverts tabindex to -1 and rather saves the new tabindex value to apply it later.\n * The new value will be applied as soon as the element becomes enabled.\n *\n * @protected\n */\n _tabindexChanged(tabindex) {\n if (this.__shouldAllowFocusWhenDisabled()) {\n return;\n }\n\n if (this.disabled && tabindex !== -1) {\n this._lastTabIndex = tabindex;\n this.setAttribute('tabindex', '-1');\n }\n }\n\n /**\n * Overrides the native `focus` method in order to prevent\n * focusing the element when it is disabled. Note, setting\n * `tabindex` to -1 does not prevent the element from being\n * programmatically focusable.\n *\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n if (!this.disabled || this.__shouldAllowFocusWhenDisabled()) {\n super.focus(options);\n }\n }\n\n /**\n * Returns whether the component should be focusable when disabled.\n * Returns false by default.\n *\n * @private\n * @return {boolean}\n */\n __shouldAllowFocusWhenDisabled() {\n return false;\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\nconst INTERACTION_EVENTS = ['mousedown', 'mouseup', 'click', 'dblclick', 'keypress', 'keydown', 'keyup'];\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n constructor() {\n super();\n\n this.__onInteractionEvent = this.__onInteractionEvent.bind(this);\n\n INTERACTION_EVENTS.forEach((eventType) => {\n this.addEventListener(eventType, this.__onInteractionEvent, true);\n });\n\n // Set tabindex to 0 by default\n this.tabindex = 0;\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n\n if (this.__shouldAllowFocusWhenDisabled()) {\n this.style.setProperty('--_vaadin-button-disabled-pointer-events', 'auto');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n\n /** @private */\n __onInteractionEvent(event) {\n if (this.__shouldSuppressInteractionEvent(event)) {\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Returns whether to suppress interaction events like `click`, `keydown`, etc.\n * By default suppresses all interaction events when the button is disabled.\n *\n * @private\n */\n __shouldSuppressInteractionEvent(_event) {\n return this.disabled;\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles } from './styles/vaadin-button-base-styles.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description\n * ---------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard\n * `disabled` | Set when the button is disabled\n * `focus-ring` | Set when the button is focused using the keyboard\n * `focused` | Set when the button is focused\n * `has-tooltip` | Set when the button has a slotted tooltip\n *\n * The following custom CSS properties are available for styling:\n *\n * Custom CSS property |\n * :----------------------------------|\n * | `--vaadin-button-background` |\n * | `--vaadin-button-border-color` |\n * | `--vaadin-button-border-radius` |\n * | `--vaadin-button-border-width` |\n * | `--vaadin-button-font-size` |\n * | `--vaadin-button-font-weight` |\n * | `--vaadin-button-gap` |\n * | `--vaadin-button-height` |\n * | `--vaadin-button-line-height` |\n * | `--vaadin-button-margin` |\n * | `--vaadin-button-padding` |\n * | `--vaadin-button-text-color` |\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement vaadin-button\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get styles() {\n return buttonStyles;\n }\n\n static get properties() {\n return {\n /**\n * When disabled, the button is rendered as \"dimmed\" and prevents all\n * user interactions (mouse and keyboard).\n *\n * Since disabled buttons are not focusable and cannot react to hover\n * events by default, it can cause accessibility issues by making them\n * entirely invisible to assistive technologies, and prevents the use\n * of Tooltips to explain why the action is not available. This can be\n * addressed by enabling the feature flag `accessibleDisabledButtons`,\n * which makes disabled buttons focusable and hoverable, while still\n * preventing them from being triggered:\n *\n * ```js\n * // Set before any button is attached to the DOM.\n * window.Vaadin.featureFlags.accessibleDisabledButtons = true\n * ```\n */\n disabled: {\n type: Boolean,\n value: false,\n observer: '_disabledChanged',\n reflectToAttribute: true,\n sync: true,\n },\n };\n }\n\n /** @protected */\n render() {\n return html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n\n <slot name=\"tooltip\"></slot>\n </div>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n\n /** @override */\n __shouldAllowFocusWhenDisabled() {\n return window.Vaadin.featureFlags.accessibleDisabledButtons;\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const menuBarButtonStyles = css`\n :host {\n flex-shrink: 0;\n }\n\n :host([focus-ring]) {\n z-index: 1;\n }\n\n :host([slot='overflow']) {\n margin-inline-end: 0;\n }\n\n .vaadin-button-container {\n gap: inherit;\n }\n\n :host(:not([slot='overflow'])[aria-haspopup]) [part='suffix'] {\n display: flex;\n align-items: center;\n gap: inherit;\n }\n\n :host(:not([slot='overflow'])[aria-haspopup]) [part='suffix']::after {\n background: currentColor;\n content: '';\n height: var(--vaadin-icon-size, 1lh);\n mask: var(--_vaadin-icon-chevron-down) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;\n width: var(--vaadin-icon-size, 1lh);\n }\n\n ::slotted(vaadin-menu-bar-item) {\n padding: 0;\n gap: 0;\n }\n\n ::slotted(vaadin-menu-bar-item)::after {\n display: none;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { Button } from '@vaadin/button/src/vaadin-button.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { menuBarButtonStyles } from './styles/vaadin-menu-bar-button-base-styles.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-button\n * @extends Button\n * @private\n */\nclass MenuBarButton extends Button {\n static get is() {\n return 'vaadin-menu-bar-button';\n }\n\n static get styles() {\n return [super.styles, menuBarButtonStyles];\n }\n\n /**\n * Override method inherited from `ButtonMixin` to set a flag based on whether the key\n * is Enter and Space. Unlike mouse click, these keys should also focus the first item.\n * This flag is used in menu bar to identify the action that triggered the click.\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n this.__triggeredWithActiveKeys = this._activeKeys.includes(event.key);\n super._onKeyDown(event);\n this.__triggeredWithActiveKeys = null;\n }\n\n /**\n * Override to preserve the `active` attribute while the button's\n * sub-menu is expanded, so that the pressed visual state remains.\n *\n * @param {boolean} active\n * @protected\n * @override\n */\n _setActive(active) {\n if (!active && this.hasAttribute('expanded')) {\n return;\n }\n super._setActive(active);\n }\n\n /**\n * Override method inherited from `ButtonMixin` to allow keyboard navigation with\n * arrow keys in the menu bar when the button is focusable in the disabled state.\n *\n * @override\n */\n __shouldSuppressInteractionEvent(event) {\n if (event.type === 'keydown' && ['ArrowLeft', 'ArrowRight'].includes(event.key)) {\n return false;\n }\n\n return super.__shouldSuppressInteractionEvent(event);\n }\n}\n\ndefineCustomElement(MenuBarButton);\n\nexport { MenuBarButton };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const menuBarStyles = css`\n :host {\n display: block;\n min-width: 0;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n [part='container'] {\n display: flex;\n flex-wrap: nowrap;\n position: relative;\n width: 100%;\n --_gap: var(--vaadin-menu-bar-gap, 0px);\n --_bw: var(--vaadin-button-border-width, 1px);\n gap: var(--_gap);\n --_rad-button: var(--vaadin-button-border-radius, var(--vaadin-radius-m));\n }\n\n :host(:not([has-single-button])) ::slotted(vaadin-menu-bar-button:not(:first-of-type)) {\n margin-inline-start: min(var(--_bw) * -1 + var(--_gap) * 1000, 0px);\n }\n\n ::slotted(vaadin-menu-bar-button) {\n border-radius: 0;\n }\n\n ::slotted([first-visible]),\n :host([has-single-button]) ::slotted([slot='overflow']),\n ::slotted(vaadin-menu-bar-button[theme~='tertiary']) {\n border-start-start-radius: var(--_rad-button);\n border-end-start-radius: var(--_rad-button);\n }\n\n ::slotted(:is([last-visible], [slot='overflow'])),\n ::slotted(vaadin-menu-bar-button[theme~='tertiary']) {\n border-start-end-radius: var(--_rad-button);\n border-end-end-radius: var(--_rad-button);\n }\n\n :host([theme~='end-aligned']) ::slotted(vaadin-menu-bar-button[first-visible]),\n :host([theme~='end-aligned'][has-single-button]) ::slotted(vaadin-menu-bar-button) {\n margin-inline-start: auto;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2025 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nfunction deepMerge(target, ...sources) {\n const isArray = (item) => Array.isArray(item);\n const isObject = (item) => item && typeof item === 'object' && !isArray(item);\n const merge = (target, source) => {\n if (isObject(source) && isObject(target)) {\n Object.keys(source).forEach((key) => {\n const sourceValue = source[key];\n if (isObject(sourceValue)) {\n if (!target[key]) {\n target[key] = {};\n }\n merge(target[key], sourceValue);\n } else if (isArray(sourceValue)) {\n target[key] = [...sourceValue];\n } else if (sourceValue !== undefined && sourceValue !== null) {\n target[key] = sourceValue;\n }\n });\n }\n };\n\n sources.forEach((source) => {\n merge(target, source);\n });\n\n return target;\n}\n\n/**\n * A mixin that allows to set partial I18N properties.\n *\n * @polymerMixin\n */\nexport const I18nMixin = (defaultI18n, superClass) =>\n class I18nMixinClass extends superClass {\n static get properties() {\n return {\n // Even though the property is overridden by a custom getter/setter, it needs to be declared here to initialize\n // __effectiveI18n properly if the i18n property is set before upgrading the element.\n i18n: {\n type: Object,\n },\n\n /** @private */\n __effectiveI18n: {\n type: Object,\n sync: true,\n },\n };\n }\n\n constructor() {\n super();\n\n this.i18n = deepMerge({}, defaultI18n);\n }\n\n /**\n * The object used to localize this component. To change the default\n * localization, replace this with an object that provides all properties, or\n * just the individual properties you want to change.\n *\n * Should be overridden by subclasses to provide a custom JSDoc with the\n * default I18N properties.\n *\n * @type {Object}\n */\n get i18n() {\n return this.__customI18n;\n }\n\n set i18n(value) {\n if (value === this.__customI18n) {\n return;\n }\n this.__customI18n = value;\n this.__effectiveI18n = deepMerge({}, defaultI18n, this.__customI18n);\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\nconst observer = new ResizeObserver((entries) => {\n setTimeout(() => {\n entries.forEach((entry) => {\n if (!entry.target.isConnected) {\n return;\n }\n\n // Notify child resizables, if any\n if (entry.target.resizables) {\n entry.target.resizables.forEach((resizable) => {\n resizable._onResize(entry.contentRect);\n });\n } else {\n entry.target._onResize(entry.contentRect);\n }\n });\n });\n});\n\n/**\n * A mixin that uses a ResizeObserver to listen to host size changes.\n *\n * @polymerMixin\n */\nexport const ResizeMixin = dedupeMixin(\n (superclass) =>\n class ResizeMixinClass extends superclass {\n /**\n * When true, the parent element resize will be also observed.\n * Override this getter and return `true` to enable this.\n *\n * @protected\n */\n get _observeParent() {\n return false;\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n observer.observe(this);\n\n if (this._observeParent) {\n const parent = this.parentNode instanceof ShadowRoot ? this.parentNode.host : this.parentNode;\n\n if (!parent.resizables) {\n parent.resizables = new Set();\n observer.observe(parent);\n }\n\n parent.resizables.add(this);\n this.__parent = parent;\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n observer.unobserve(this);\n\n const parent = this.__parent;\n if (this._observeParent && parent) {\n const resizables = parent.resizables;\n\n if (resizables) {\n resizables.delete(this);\n\n if (resizables.size === 0) {\n observer.unobserve(parent);\n }\n }\n\n this.__parent = null;\n }\n }\n\n /**\n * A handler invoked on host resize. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @protected\n */\n _onResize(_contentRect) {\n // To be implemented.\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, noChange, nothing, render } from 'lit';\nimport { Directive, directive } from 'lit/directive.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { isElementFocused, isElementHidden, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { KeyboardDirectionMixin } from '@vaadin/a11y-base/src/keyboard-direction-mixin.js';\nimport { microTask } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';\nimport { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * Custom Lit directive for rendering item components\n * inspired by the `flowComponentDirective` logic.\n */\nclass ItemComponentDirective extends Directive {\n update(part, [{ component, text }]) {\n const { parentNode, startNode } = part;\n\n const newNode = component || (text ? document.createTextNode(text) : null);\n const oldNode = this.getOldNode(part);\n\n if (oldNode === newNode) {\n return noChange;\n } else if (oldNode && newNode) {\n parentNode.replaceChild(newNode, oldNode);\n } else if (oldNode) {\n parentNode.removeChild(oldNode);\n } else if (newNode) {\n startNode.after(newNode);\n }\n\n return noChange;\n }\n\n getOldNode(part) {\n const { startNode, endNode } = part;\n if (startNode.nextSibling === endNode) {\n return null;\n }\n return startNode.nextSibling;\n }\n}\n\nconst componentDirective = directive(ItemComponentDirective);\n\nconst DEFAULT_I18N = {\n moreOptions: 'More options',\n};\n\n/**\n * @polymerMixin\n * @mixes DisabledMixin\n * @mixes FocusMixin\n * @mixes I18nMixin\n * @mixes KeyboardDirectionMixin\n * @mixes ResizeMixin\n */\nexport const MenuBarMixin = (superClass) =>\n class MenuBarMixinClass extends I18nMixin(\n DEFAULT_I18N,\n KeyboardDirectionMixin(ResizeMixin(FocusMixin(DisabledMixin(superClass)))),\n ) {\n static get properties() {\n return {\n /**\n * @typedef MenuBarItem\n * @type {object}\n * @property {string} text - Text to be set as the menu button component's textContent.\n * @property {string} tooltip - Text to be set as the menu button's tooltip.\n * Requires a `<vaadin-tooltip slot=\"tooltip\">` element to be added inside the `<vaadin-menu-bar>`.\n * @property {string | HTMLElement} component - The component to represent the button content.\n * Either a tagName or an element instance. Defaults to \"vaadin-menu-bar-item\".\n * @property {boolean} disabled - If true, the button is disabled and cannot be activated.\n * @property {string | string[]} theme - Theme(s) to be set as the theme attribute of the button, overriding any theme set on the menu bar.\n * @property {SubMenuItem[]} children - Array of submenu items.\n */\n\n /**\n * @typedef SubMenuItem\n * @type {object}\n * @property {string} text - Text to be set as the menu item component's textContent.\n * @property {string | HTMLElement} component - The component to represent the item.\n * Either a tagName or an element instance. Defaults to \"vaadin-menu-bar-item\".\n * @property {boolean} disabled - If true, the item is disabled and cannot be selected.\n * @property {boolean} checked - If true, the item shows a checkmark next to it.\n * @property {SubMenuItem[]} children - Array of child submenu items.\n */\n\n /**\n * Defines a hierarchical structure, where root level items represent menu bar buttons,\n * and `children` property configures a submenu with items to be opened below\n * the button on click, Enter, Space, Up and Down arrow keys.\n *\n * #### Example\n *\n * ```js\n * menubar.items = [\n * {\n * text: 'File',\n * className: 'file',\n * children: [\n * {text: 'Open', className: 'file open'}\n * {text: 'Auto Save', checked: true},\n * ]\n * },\n * {component: 'hr'},\n * {\n * text: 'Edit',\n * children: [\n * {text: 'Undo', disabled: true},\n * {text: 'Redo'}\n * ]\n * },\n * {text: 'Help'}\n * ];\n * ```\n *\n * #### Disabled buttons\n *\n * When disabled, menu bar buttons (root-level items) are rendered\n * as \"dimmed\" and prevent all user interactions (mouse and keyboard).\n *\n * Since disabled buttons are not focusable and cannot react to hover\n * events by default, it can cause accessibility issues by making them\n * entirely invisible to assistive technologies, and prevents the use\n * of Tooltips to explain why the action is not available. This can be\n * addressed by enabling the feature flag `accessibleDisabledButtons`,\n * which makes disabled buttons focusable and hoverable, while still\n * preventing them from being triggered:\n *\n * ```js\n * // Set before any menu bar is attached to the DOM.\n * window.Vaadin.featureFlags.accessibleDisabledButtons = true;\n * ```\n *\n * @type {!Array<!MenuBarItem>}\n */\n items: {\n type: Array,\n sync: true,\n value: () => [],\n },\n\n /**\n * If true, the submenu will open on hover (mouseover) instead of click.\n * @attr {boolean} open-on-hover\n */\n openOnHover: {\n type: Boolean,\n },\n\n /**\n * If true, the buttons will be collapsed into the overflow menu\n * starting from the \"start\" end of the bar instead of the \"end\".\n * @attr {boolean} reverse-collapse\n */\n reverseCollapse: {\n type: Boolean,\n sync: true,\n },\n\n /**\n * If true, the top-level menu items is traversable by tab\n * instead of arrow keys (i.e. disabling roving tabindex)\n * @attr {boolean} tab-navigation\n */\n tabNavigation: {\n type: Boolean,\n sync: true,\n },\n };\n }\n\n /**\n * The object used to localize this component. To change the default\n * localization, replace this with an object that provides all properties, or\n * just the individual properties you want to change.\n *\n * The object has the following JSON structure and default values:\n * ```js\n * {\n * moreOptions: 'More options'\n * }\n * ```\n * @type {!MenuBarI18n}\n */\n get i18n() {\n return super.i18n;\n }\n\n set i18n(value) {\n super.i18n = value;\n }\n\n constructor() {\n super();\n this.__boundOnContextMenuKeydown = this.__onContextMenuKeydown.bind(this);\n this.__boundOnTooltipMouseLeave = this.__onTooltipOverlayMouseLeave.bind(this);\n }\n\n /**\n * Override getter from `KeyboardDirectionMixin`\n * to use expanded button for arrow navigation\n * when the sub-menu is opened and has focus.\n *\n * @return {Element | null}\n * @protected\n * @override\n */\n get focused() {\n return (this._getItems() || []).find(isElementFocused) || this._expandedButton;\n }\n\n /**\n * Override getter from `KeyboardDirectionMixin`.\n *\n * @return {boolean}\n * @protected\n * @override\n */\n get _vertical() {\n return false;\n }\n\n /**\n * Override getter from `KeyboardDirectionMixin`.\n *\n * @return {boolean}\n * @protected\n * @override\n */\n get _tabNavigation() {\n return this.tabNavigation;\n }\n\n /**\n * Override getter from `ResizeMixin` to observe parent.\n *\n * @protected\n * @override\n */\n get _observeParent() {\n return true;\n }\n\n /**\n * @return {!Array<!HTMLElement>}\n * @protected\n */\n get _buttons() {\n return Array.from(this.querySelectorAll('vaadin-menu-bar-button'));\n }\n\n /** @private */\n get _hasOverflow() {\n return this._overflow && !this._overflow.hasAttribute('hidden');\n }\n\n /** @private */\n set _hasOverflow(hasOverflow) {\n if (this._overflow) {\n this._overflow.toggleAttribute('hidden', !hasOverflow);\n }\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.setAttribute('role', 'menubar');\n\n this._subMenuController = new SlotController(this, 'submenu', 'vaadin-menu-bar-submenu', {\n initializer: (menu) => {\n menu.setAttribute('is-root', '');\n\n menu.addEventListener('item-selected', this.__onItemSelected.bind(this));\n menu.addEventListener('close-all-menus', this.__onEscapeClose.bind(this));\n\n const overlay = menu._overlayElement;\n overlay._contentRoot.addEventListener('keydown', this.__boundOnContextMenuKeydown);\n\n this._subMenu = menu;\n },\n });\n\n this._overflowController = new SlotController(this, 'overflow', 'vaadin-menu-bar-button', {\n initializer: (btn) => {\n btn.setAttribute('hidden', '');\n\n const dots = document.createElement('div');\n dots.setAttribute('aria-hidden', 'true');\n dots.innerHTML = '&centerdot;'.repeat(3);\n btn.appendChild(dots);\n\n btn.setAttribute('aria-haspopup', 'true');\n btn.setAttribute('aria-expanded', 'false');\n btn.setAttribute('role', this.tabNavigation ? 'button' : 'menuitem');\n\n this._overflow = btn;\n },\n });\n\n this.addController(this._subMenuController);\n this.addController(this._overflowController);\n\n this.addEventListener('mousedown', () => this._hideTooltip(true));\n this.addEventListener('mouseleave', () => this._hideTooltip());\n\n this._container = this.shadowRoot.querySelector('[part=\"container\"]');\n }\n\n /** @protected */\n updated(props) {\n super.updated(props);\n\n if (props.has('items') || props.has('_theme') || props.has('disabled')) {\n this.__renderButtons(this.items);\n }\n\n if (props.has('items') || props.has('_theme') || props.has('reverseCollapse')) {\n this.__scheduleOverflow();\n }\n\n if (props.has('items')) {\n this.__updateSubMenu();\n }\n\n if (props.has('_theme')) {\n this._themeChanged(this._theme);\n }\n\n if (props.has('disabled')) {\n this._overflow.toggleAttribute('disabled', this.disabled);\n }\n\n if (props.has('tabNavigation')) {\n this._tabNavigationChanged(this.tabNavigation);\n }\n\n if (props.has('__effectiveI18n')) {\n this.__i18nChanged(this.__effectiveI18n);\n }\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin`\n * to use the list of menu-bar buttons as items.\n *\n * @return {Element[]}\n * @protected\n * @override\n */\n _getItems() {\n return this._buttons;\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this._hideTooltip(true);\n }\n\n /**\n * Implement callback from `ResizeMixin` to update buttons\n * and detect whether to show or hide the overflow button.\n *\n * @protected\n * @override\n */\n _onResize() {\n this.__scheduleOverflow();\n }\n\n /** @private */\n _themeChanged(theme) {\n if (theme) {\n this._overflow.setAttribute('theme', theme);\n this._subMenu.setAttribute('theme', theme);\n } else {\n this._overflow.removeAttribute('theme');\n this._subMenu.removeAttribute('theme');\n }\n }\n\n /** @private */\n _tabNavigationChanged(tabNavigation) {\n const target = this.querySelector('[tabindex=\"0\"]');\n this._buttons.forEach((btn) => {\n if (target) {\n this._setTabindex(btn, btn === target);\n } else {\n this._setTabindex(btn, false);\n }\n btn.setAttribute('role', tabNavigation ? 'button' : 'menuitem');\n });\n\n this.setAttribute('role', tabNavigation ? 'group' : 'menubar');\n }\n\n /** @private */\n __updateSubMenu() {\n const subMenu = this._subMenu;\n if (subMenu && subMenu.opened) {\n const button = subMenu._positionTarget;\n\n // Close sub-menu if the corresponding button is no longer in the DOM,\n // or if the item on it has been changed to no longer have children.\n if (!button.isConnected || !Array.isArray(button.item.children) || button.item.children.length === 0) {\n subMenu.close();\n }\n }\n }\n\n /** @private */\n __i18nChanged(effectiveI18n) {\n if (effectiveI18n && effectiveI18n.moreOptions !== undefined) {\n if (effectiveI18n.moreOptions) {\n this._overflow.setAttribute('aria-label', effectiveI18n.moreOptions);\n } else {\n this._overflow.removeAttribute('aria-label');\n }\n }\n }\n\n /** @private */\n __getOverflowCount(overflow) {\n // We can't use optional chaining due to webpack 4\n return (overflow.item && overflow.item.children && overflow.item.children.length) || 0;\n }\n\n /** @private */\n __restoreButtons(buttons) {\n buttons.forEach((button) => {\n button.style.visibility = '';\n button.style.position = '';\n button.style.width = '';\n\n // Teleport item component back from \"overflow\" sub-menu\n const item = button.item && button.item.component;\n if (item instanceof HTMLElement && item.getAttribute('role') === 'menuitem') {\n this.__restoreItem(button, item);\n }\n });\n this.__updateOverflow([]);\n }\n\n /** @private */\n __restoreItem(button, item) {\n button.appendChild(item);\n item.removeAttribute('role');\n item.removeAttribute('aria-expanded');\n item.removeAttribute('aria-haspopup');\n item.removeAttribute('tabindex');\n }\n\n /** @private */\n __updateOverflow(items) {\n this._overflow.item = { children: items };\n this._hasOverflow = items.length > 0;\n }\n\n /** @private */\n __setOverflowItems(buttons, overflow) {\n const container = this._container;\n\n // Prevent the container from shrinking while buttons are being hidden.\n // The host has min-width: 0 so it can shrink inside flex/grid layouts.\n // Without this lock, hiding a button reduces the host width, which\n // shrinks the container (width: 100%), shifting all button positions\n // and causing a cascading collapse where every button appears to overflow.\n container.style.minWidth = `${container.offsetWidth}px`;\n\n if (container.offsetWidth < container.scrollWidth) {\n this._hasOverflow = true;\n\n const isRTL = this.__isRTL;\n const containerLeft = container.offsetLeft;\n\n const remaining = [...buttons];\n while (remaining.length) {\n const lastButton = remaining[remaining.length - 1];\n const btnLeft = lastButton.offsetLeft - containerLeft;\n\n // If this button isn't overflowing, then the rest aren't either\n if (\n (!isRTL && btnLeft + lastButton.offsetWidth < container.offsetWidth - overflow.offsetWidth) ||\n (isRTL && btnLeft >= overflow.offsetWidth)\n ) {\n break;\n }\n\n const btn = this.reverseCollapse ? remaining.shift() : remaining.pop();\n\n // Save width for buttons with component\n btn.style.width = getComputedStyle(btn).width;\n btn.style.visibility = 'hidden';\n btn.style.position = 'absolute';\n }\n\n const items = buttons.filter((b) => !remaining.includes(b)).map((b) => b.item);\n this.__updateOverflow(items);\n }\n\n container.style.minWidth = '';\n }\n\n /** @private */\n __scheduleOverflow() {\n this._overflowDebouncer = Debouncer.debounce(this._overflowDebouncer, microTask, () => {\n this.__detectOverflow();\n });\n }\n\n /** @private */\n __detectOverflow() {\n const overflow = this._overflow;\n const buttons = this._buttons.filter((btn) => btn !== overflow);\n const oldOverflowCount = this.__getOverflowCount(overflow);\n\n // Reset all buttons in the menu bar and the overflow button\n this.__restoreButtons(buttons);\n\n // Hide any overflowing buttons and put them in the 'overflow' button\n this.__setOverflowItems(buttons, overflow);\n\n const newOverflowCount = this.__getOverflowCount(overflow);\n if (oldOverflowCount !== newOverflowCount && this._subMenu.opened) {\n this._subMenu.close();\n }\n\n const isSingleButton = newOverflowCount === buttons.length || (newOverflowCount === 0 && buttons.length === 1);\n this.toggleAttribute('has-single-button', isSingleButton);\n\n // Collect visible buttons to detect if tabindex should be updated\n const visibleButtons = buttons.filter((btn) => btn.style.visibility !== 'hidden');\n\n if (!visibleButtons.length) {\n // If all buttons except overflow are hidden, set tabindex on it\n this._overflow.setAttribute('tabindex', '0');\n } else if (!visibleButtons.some((btn) => btn.getAttribute('tabindex') === '0')) {\n // Ensure there is at least one button with tabindex set to 0\n // so that menu-bar is not skipped when navigating with Tab\n this._setTabindex(visibleButtons[visibleButtons.length - 1], true);\n }\n\n // Apply first/last visible attributes to the visible buttons\n visibleButtons.forEach((btn, index, visibleButtons) => {\n btn.toggleAttribute('first-visible', index === 0);\n btn.toggleAttribute('last-visible', !this._hasOverflow && index === visibleButtons.length - 1);\n });\n }\n\n /** @private */\n __getButtonTheme(item, hostTheme) {\n let theme = hostTheme;\n\n // Item theme takes precedence over host theme even if it's empty, as long as it's not undefined or null\n const itemTheme = item && item.theme;\n if (itemTheme != null) {\n theme = Array.isArray(itemTheme) ? itemTheme.join(' ') : itemTheme;\n }\n\n return theme;\n }\n\n /** @private */\n __getComponent(item) {\n const itemComponent = item.component;\n let component;\n\n const isElement = itemComponent instanceof HTMLElement;\n // Use existing item component, if any\n if (isElement && itemComponent.localName === 'vaadin-menu-bar-item') {\n component = itemComponent;\n } else {\n component = document.createElement('vaadin-menu-bar-item');\n component.appendChild(isElement ? itemComponent : document.createElement(itemComponent));\n }\n if (item.text) {\n const node = component.firstChild || component;\n node.textContent = item.text;\n }\n return component;\n }\n\n /** @private */\n __renderButtons(items = []) {\n render(\n html`\n ${items.map((item) => {\n const itemCopy = { ...item };\n const hasChildren = Boolean(item && item.children);\n\n if (itemCopy.component) {\n const component = this.__getComponent(itemCopy);\n itemCopy.component = component;\n component.item = itemCopy;\n }\n\n return html`\n <vaadin-menu-bar-button\n .item=\"${itemCopy}\"\n .disabled=\"${this.disabled || item.disabled}\"\n role=\"${this.tabNavigation ? 'button' : 'menuitem'}\"\n aria-haspopup=\"${ifDefined(hasChildren ? 'true' : nothing)}\"\n aria-expanded=\"${ifDefined(hasChildren ? 'false' : nothing)}\"\n class=\"${ifDefined(item.className || nothing)}\"\n theme=\"${ifDefined(this.__getButtonTheme(item, this._theme) || nothing)}\"\n @click=\"${this.__onRootButtonClick}\"\n >${componentDirective(itemCopy)}</vaadin-menu-bar-button\n >\n `;\n })}\n `,\n this,\n { renderBefore: this._overflow },\n );\n }\n\n /** @private */\n __onRootButtonClick(event) {\n const button = event.target;\n // Propagate click event from button to the item component if it was outside\n // it e.g. by calling `click()` on the button (used by the Flow counterpart).\n if (button.item && button.item.component && !event.composedPath().includes(button.item.component)) {\n event.stopPropagation();\n button.item.component.click();\n }\n }\n\n /**\n * @param {HTMLElement} button\n * @protected\n */\n _showTooltip(button, isHover) {\n // Check if there is a slotted vaadin-tooltip element.\n const tooltip = this._tooltipController.node;\n if (tooltip && tooltip.isConnected) {\n // If the tooltip element doesn't have a generator assigned, use a default one\n // that reads the `tooltip` property of an item.\n if (tooltip.generator === undefined) {\n tooltip.generator = ({ item }) => item && item.tooltip;\n }\n\n if (!tooltip._mouseLeaveListenerAdded) {\n tooltip._overlayElement.addEventListener('mouseleave', this.__boundOnTooltipMouseLeave);\n tooltip._mouseLeaveListenerAdded = true;\n }\n\n if (!this._subMenu.opened) {\n this._tooltipController.setTarget(button);\n this._tooltipController.setContext({ item: button.item });\n\n // Trigger opening using the corresponding delay.\n tooltip._stateController.open({\n hover: isHover,\n focus: !isHover,\n });\n }\n }\n }\n\n /** @protected */\n _hideTooltip(immediate) {\n const tooltip = this._tooltipController && this._tooltipController.node;\n if (tooltip) {\n this._tooltipController.setContext({ item: null });\n tooltip._stateController.close(immediate);\n }\n }\n\n /** @private */\n __onTooltipOverlayMouseLeave(event) {\n if (event.relatedTarget !== this._tooltipController.target) {\n this._hideTooltip();\n }\n }\n\n /** @protected */\n _setExpanded(button, expanded) {\n button.toggleAttribute('expanded', expanded);\n button.toggleAttribute('active', expanded);\n button.setAttribute('aria-expanded', expanded ? 'true' : 'false');\n }\n\n /** @protected */\n _setTabindex(button, focused) {\n if (this.tabNavigation && this._isItemFocusable(button)) {\n button.setAttribute('tabindex', '0');\n } else {\n button.setAttribute('tabindex', focused ? '0' : '-1');\n }\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin`\n * to close the submenu for the previously focused button\n * and open another one for the newly focused button.\n *\n * @param {Element} item\n * @param {FocusOptions=} options\n * @param {boolean} navigating\n * @protected\n * @override\n */\n _focusItem(item, options, navigating) {\n const wasExpanded = navigating && this.focused === this._expandedButton;\n if (wasExpanded) {\n this._close();\n }\n\n super._focusItem(item, options, navigating);\n\n this._buttons.forEach((btn) => {\n this._setTabindex(btn, btn === item);\n });\n\n if (wasExpanded && item.item && item.item.children) {\n this.__openSubMenu(item, true, { keepFocus: true });\n } else if (item === this._overflow) {\n this._hideTooltip();\n } else {\n this._showTooltip(item);\n }\n }\n\n /** @private */\n _getButtonFromEvent(e) {\n return Array.from(e.composedPath()).find((el) => el.localName === 'vaadin-menu-bar-button');\n }\n\n /**\n * Override method inherited from `FocusMixin`\n *\n * @override\n * @protected\n */\n _shouldSetFocus(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return false;\n }\n return super._shouldSetFocus(event);\n }\n\n /**\n * Override method inherited from `FocusMixin`\n *\n * @override\n * @protected\n */\n _shouldRemoveFocus(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return false;\n }\n return super._shouldRemoveFocus(event);\n }\n\n /**\n * Override method inherited from `FocusMixin`\n *\n * @param {boolean} focused\n * @override\n * @protected\n */\n _setFocused(focused) {\n if (focused) {\n const target = this.__getFocusTarget();\n if (target) {\n this._buttons.forEach((btn) => {\n this._setTabindex(btn, btn === target);\n if (btn === target && btn !== this._overflow && isKeyboardActive()) {\n this._showTooltip(btn);\n }\n });\n }\n } else {\n this._hideTooltip();\n }\n }\n\n /** @private */\n __getFocusTarget() {\n // First, check if focus is moving to a visible button\n let target = this._buttons.find((btn) => isElementFocused(btn));\n\n if (!target) {\n const selector = this.tabNavigation ? '[focused]' : '[tabindex=\"0\"]';\n // Next, check if there is a button that could be focused but is hidden\n target = this.querySelector(`vaadin-menu-bar-button${selector}`);\n\n if (isElementHidden(target)) {\n target = this._buttons[this._getFocusableIndex()];\n }\n }\n\n return target;\n }\n\n /**\n * @param {!KeyboardEvent} event\n * @private\n */\n _onArrowDown(event) {\n // Prevent page scroll.\n event.preventDefault();\n\n const button = this._getButtonFromEvent(event);\n if (button === this._expandedButton) {\n // Menu opened previously, focus first item\n this._focusFirstItem();\n } else {\n this.__openSubMenu(button, true);\n }\n }\n\n /**\n * @param {!KeyboardEvent} event\n * @private\n */\n _onArrowUp(event) {\n // Prevent page scroll.\n event.preventDefault();\n\n const button = this._getButtonFromEvent(event);\n if (button === this._expandedButton) {\n // Menu opened previously, focus last item\n this._focusLastItem();\n } else {\n this.__openSubMenu(button, true, { focusLast: true });\n }\n }\n\n /**\n * Override an event listener from `KeyboardMixin`:\n * - to close the sub-menu for expanded button,\n * - to close a tooltip for collapsed button.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onEscape(event) {\n if (event.composedPath().includes(this._expandedButton)) {\n this._close(true);\n }\n\n this._hideTooltip(true);\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n this._handleKeyDown(event);\n }\n\n /** @private */\n _handleKeyDown(event) {\n switch (event.key) {\n case 'ArrowDown':\n this._onArrowDown(event);\n break;\n case 'ArrowUp':\n this._onArrowUp(event);\n break;\n default:\n super._onKeyDown(event);\n break;\n }\n }\n\n /**\n * @param {!MouseEvent} event\n * @protected\n */\n _onMouseOver(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n const button = this._getButtonFromEvent(event);\n if (!button) {\n // Hide tooltip on mouseover to disabled button\n this._hideTooltip();\n } else if (button !== this._expandedButton) {\n // Switch sub-menu when moving cursor over another button\n // with children, regardless of whether openOnHover is set.\n // If the button has no children, keep the sub-menu opened.\n if (button.item.children && (this.openOnHover || this._subMenu.opened)) {\n this.__openSubMenu(button, false);\n }\n\n if (button === this._overflow || (this.openOnHover && button.item.children)) {\n this._hideTooltip();\n } else {\n this._showTooltip(button, true);\n }\n }\n }\n\n /** @private */\n __onContextMenuKeydown(e) {\n const item = Array.from(e.composedPath()).find((el) => el._item);\n if (item) {\n const list = item.parentNode;\n if (e.keyCode === 38 && item === list.items[0]) {\n this._close(true);\n }\n // ArrowLeft, or ArrowRight on non-parent submenu item,\n if (e.keyCode === 37 || (e.keyCode === 39 && !item._item.children)) {\n // Prevent ArrowLeft from being handled in context-menu\n e.stopImmediatePropagation();\n this._handleKeyDown(e);\n }\n\n if (e.key === 'Tab' && this.tabNavigation) {\n this._handleKeyDown(e);\n }\n }\n }\n\n /** @private */\n __fireItemSelected(value) {\n this.dispatchEvent(new CustomEvent('item-selected', { detail: { value } }));\n }\n\n /** @private */\n __onButtonClick(e) {\n const button = this._getButtonFromEvent(e);\n if (button) {\n this.__openSubMenu(button, button.__triggeredWithActiveKeys);\n }\n }\n\n /** @private */\n __openSubMenu(button, keydown, options = {}) {\n if (button.disabled) {\n return;\n }\n\n const subMenu = this._subMenu;\n const item = button.item;\n\n if (subMenu.opened) {\n this._close();\n if (subMenu.listenOn === button) {\n return;\n }\n }\n\n const items = item && item.children;\n if (!items || items.length === 0) {\n this.__fireItemSelected(item);\n return;\n }\n\n subMenu.items = items;\n subMenu.listenOn = button;\n subMenu._positionTarget = button;\n const overlay = subMenu._overlayElement;\n overlay.noVerticalOverlap = true;\n\n this._hideTooltip(true);\n\n this._expandedButton = button;\n this._setExpanded(button, true);\n\n this.style.pointerEvents = 'auto';\n\n button.dispatchEvent(\n new CustomEvent('opensubmenu', {\n detail: {\n children: items,\n },\n }),\n );\n\n overlay.addEventListener(\n 'vaadin-overlay-open',\n () => {\n if (options.focusLast) {\n this._focusLastItem();\n }\n\n if (options.keepFocus) {\n const focusOptions = { focusVisible: isKeyboardActive() };\n this._focusItem(this._expandedButton, focusOptions, false);\n }\n\n // Do not focus item when open not from keyboard\n if (!keydown) {\n overlay.$.overlay.focus();\n }\n },\n { once: true },\n );\n }\n\n /** @private */\n _focusFirstItem() {\n const list = this._subMenu._overlayElement._contentRoot.firstElementChild;\n list.focus();\n }\n\n /** @private */\n _focusLastItem() {\n const list = this._subMenu._overlayElement._contentRoot.firstElementChild;\n const item = list.items[list.items.length - 1];\n if (item) {\n item.focus();\n }\n }\n\n /** @private */\n __onItemSelected(e) {\n e.stopPropagation();\n this.__fireItemSelected(e.detail.value);\n }\n\n /** @private */\n __onEscapeClose() {\n this.__deactivateButton(true);\n }\n\n /** @private */\n __deactivateButton(restoreFocus) {\n const button = this._expandedButton;\n if (button && button.hasAttribute('expanded')) {\n this._setExpanded(button, false);\n if (restoreFocus) {\n const focusOptions = { focusVisible: isKeyboardActive() };\n this._focusItem(button, focusOptions, false);\n }\n this._expandedButton = null;\n }\n }\n\n /**\n * @param {boolean} restoreFocus\n * @protected\n */\n _close(restoreFocus = false) {\n this.style.pointerEvents = '';\n this.__deactivateButton(restoreFocus);\n if (this._subMenu.opened) {\n this._subMenu.close();\n }\n }\n\n /**\n * Closes the current submenu.\n */\n close() {\n this._close();\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin` to allow\n * focusing disabled buttons that are configured so.\n *\n * @param {Element} button\n * @protected\n * @override\n */\n _isItemFocusable(button) {\n if (button.disabled && button.__shouldAllowFocusWhenDisabled) {\n return button.__shouldAllowFocusWhenDisabled();\n }\n\n return super._isItemFocusable(button);\n }\n };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-menu-bar-submenu.js';\nimport './vaadin-menu-bar-button.js';\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { menuBarStyles } from './styles/vaadin-menu-bar-base-styles.js';\nimport { MenuBarMixin } from './vaadin-menu-bar-mixin.js';\n\n/**\n * `<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\n * the user quick access to a consistent set of commands. Each button can toggle a submenu with\n * support for additional levels of nested menus.\n *\n * To create the menu bar, first add the component to the page:\n *\n * ```html\n * <vaadin-menu-bar></vaadin-menu-bar>\n * ```\n *\n * And then use [`items`](#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n *\n * ```js\n * document.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are exposed for styling:\n *\n * Part name | Description\n * ------------------|----------------\n * `container` | The container wrapping menu bar buttons.\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description\n * --------------------|----------------------------------\n * `disabled` | Set when the menu bar is disabled\n * `has-single-button` | Set when there is only one button visible\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * ### Internal components\n *\n * In addition to `<vaadin-menu-bar>` itself, the following internal\n * components are themable:\n *\n * - `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](#/elements/vaadin-button).\n * - `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).\n * - `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](#/elements/vaadin-list-box).\n * - `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](#/elements/vaadin-context-menu).\n *\n * The `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\n * on top of the built-in `<vaadin-item>` state attributes:\n *\n * Attribute | Description\n * ---------- |-------------\n * `expanded` | Expanded parent item.\n *\n * @fires {CustomEvent<boolean>} item-selected - Fired when a submenu item or menu bar button without children is clicked.\n *\n * @customElement vaadin-menu-bar\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes MenuBarMixin\n * @mixes ThemableMixin\n */\nclass MenuBar extends MenuBarMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-menu-bar';\n }\n\n static get styles() {\n return menuBarStyles;\n }\n\n /** @protected */\n render() {\n return html`\n <div part=\"container\" @click=\"${this.__onButtonClick}\" @mouseover=\"${this._onMouseOver}\">\n <slot></slot>\n <slot name=\"overflow\"></slot>\n </div>\n\n <slot name=\"submenu\"></slot>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setManual(true);\n this.addController(this._tooltipController);\n }\n\n /**\n * Fired when either a submenu item or menu bar button without nested children is clicked.\n *\n * @event item-selected\n * @param {Object} detail\n * @param {Object} detail.value the selected menu bar item\n */\n}\n\ndefineCustomElement(MenuBar);\n\nexport { MenuBar };\n","var __decorate=this&&this.__decorate||function(e,r,t,a){var n,o=arguments.length,i=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,t):a;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,a);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(o<3?n(i):o>3?n(r,t,i):n(r,t))||i);return o>3&&i&&Object.defineProperty(r,t,i),i};import{MenuBar as e}from\"@vaadin/menu-bar\";import{render as r}from\"lit\";import{customElement as t}from\"lit/decorators.js\";export function createMenuBarItem(e){let t=document.createElement(\"vaadin-menu-bar-item\");return r(e,t),t}let OrVaadinMenuBar=class extends e{};OrVaadinMenuBar=__decorate([t(\"or-vaadin-menu-bar\")],OrVaadinMenuBar);export{OrVaadinMenuBar};","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {css, html, LitElement, PropertyValues, TemplateResult} from \"lit\";\nimport {customElement, property, query, queryAssignedElements} from \"lit/decorators.js\";\nimport { when } from \"lit/directives/when.js\";\nimport {OrTreeNode} from \"./or-tree-node\";\n\nconst getStyles = () => css`\n * {\n box-sizing: border-box;\n }\n \n :host {\n position: relative;\n }\n\n ol {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n \n ::slotted(*[slot=\"parent\"]) {\n cursor: pointer;\n }\n \n #chevron {\n position: absolute;\n height: 44px;\n display: flex;\n align-items: center;\n aspect-ratio: 1/1.25;\n padding-left: 4px;\n font-size: 18px;\n color: #cccccc;\n z-index: 10;\n }\n \n #chevron:hover {\n color: unset;\n }\n\n :host(:not([readonly])) > #chevron {\n cursor: pointer;\n }\n`;\n\n/**\n * @slot - Default slot for child nodes within the group\n * @slot parent - Slot for inserting a parent node\n * @csspart chevron - The chevron icon element for expanding/collapsing the group.\n */\n@customElement(\"or-tree-group\")\nexport class OrTreeGroup extends LitElement {\n\n /**\n * Determines the visibility of child nodes.\n * Setting this to `false` hides them, and acts as a 'collapsed' state.\n */\n @property({type: Boolean, reflect: true})\n public expanded = false;\n\n /**\n * Only allows child nodes to be selected, making the expander (parent node) readonly.\n * If this is set to false, only the chevron icon can be used to collapse/expand the list.\n */\n @property({type: Boolean})\n public readonly leaf = false;\n\n /**\n * Makes the group readonly\n */\n @property({type: Boolean})\n public readonly readonly = false;\n\n @queryAssignedElements({slot: undefined})\n protected _childNodes?: Array<HTMLLIElement>;\n\n @queryAssignedElements({slot: \"parent\"})\n protected _parentNodes?: Array<OrTreeNode>;\n\n /** A click event listener on the component, used for selecting, expanding, and collapsing the group */\n protected _slotClickListener = (e: MouseEvent) => this.leaf ? this._onExpandToggle(e) : null;\n\n /** A click event listener on the chevron, used for expanding/collapsing the group */\n protected _chevronClickListener = (e: MouseEvent) => this._onExpandToggle(e);\n\n static get styles() {\n return [getStyles()];\n }\n\n /** Selects the group (parent) node. */\n public select() {\n const groupNode = this.getGroupNode();\n if(!this.leaf && groupNode) {\n groupNode.selected = true;\n }\n }\n\n /** Selects the group node itself, and all children nodes within that group. */\n public selectAll() {\n this.select();\n this.getChildNodes().forEach(node => node.selected = true);\n }\n\n /** Deselects the group (parent) node. */\n public deselect() {\n const groupNode = this.getGroupNode();\n if(groupNode) {\n groupNode.selected = false;\n }\n }\n\n /** Deselects the group node itself, and all children nodes within that group. */\n public deselectAll() {\n this.deselect();\n this.getChildNodes().forEach(node => node.selected = false);\n }\n\n /** Returns the group (parent) node ({@link OrTreeNode}) using a query selector. */\n public getGroupNode(): OrTreeNode | undefined {\n return this._parentNodes?.[0];\n }\n\n /** Returns a list of all children nodes ({@link OrTreeNode}) within the group, using a query selector. */\n public getChildNodes(): OrTreeNode[] {\n return Array.from(this._childNodes || [])\n .map(n => n.querySelector('or-tree-node') as OrTreeNode | null)\n .filter(n => n != null) as OrTreeNode[];\n }\n\n firstUpdated(changedProps: PropertyValues) {\n this._parentNodes?.forEach(elem => {\n elem.addEventListener(\"click\", this._slotClickListener);\n });\n return super.firstUpdated(changedProps);\n }\n\n disconnectedCallback() {\n this._parentNodes?.forEach(elem => {\n elem.removeEventListener(\"click\", this._slotClickListener);\n });\n super.disconnectedCallback();\n }\n\n render(): TemplateResult {\n return html`\n ${when(!this.readonly, () => this._getIconTemplate(this.expanded))}\n <slot name=\"parent\"></slot>\n <ol ?hidden=${!this.expanded}>\n <slot @slotchange=${this._onSlotChange}></slot>\n </ol>\n `;\n }\n\n /**\n * Returns an HTML template that represents the icon for this group.\n * @param expanded State of the group\n */\n protected _getIconTemplate(expanded = false): TemplateResult {\n return html`\n <or-icon id=\"chevron\" part=\"chevron\" icon=\"${expanded ? \"chevron-down\" : \"chevron-right\"}\"\n @click=\"${this._chevronClickListener}\"\n ></or-icon>\n `;\n }\n\n /**\n * Function that expands/collapses the group, changing the visibility of the child nodes.\n */\n protected _onExpandToggle(_ev: MouseEvent) {\n this.expanded = !this.expanded;\n }\n\n /**\n * Event listener for 'slotchange' of the default slot.\n * Normally triggers when <or-tree-node> elements are added or removed.\n */\n protected _onSlotChange(_ev: Event) {\n this._applyIndentToChildren();\n }\n\n /**\n * Function that applies CSS to TreeNode based on the group indentation.\n * It loops through all parent elements, and detects the amount of or-tree-group elements it is in.\n * The more nested in the tree, the more left handed padding is applied.\n * @param children Node elements to apply padding to.\n */\n protected _applyIndentToChildren(children = this.getChildNodes()) {\n const countGroups = (elem: HTMLElement | null) => {\n let count = 0;\n while(elem) {\n if(elem.tagName.toLowerCase() === \"or-tree-group\") {\n count++;\n }\n elem = elem.parentElement;\n }\n return count;\n };\n children.forEach(child => {\n let groupAmount = countGroups(child);\n if(child.slot === \"parent\") {\n groupAmount--; // Parent slot is the group itself, so remove 1\n }\n // Apply indent as padding to the node\n child.style.setProperty(\"--or-tree-node-indent\", `${24 + (groupAmount * 12)}px`);\n });\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction n(n,r,t){return n?r(n):t?.(n)}export{n as when};\n//# sourceMappingURL=when.js.map\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {css, html, LitElement, TemplateResult} from \"lit\";\nimport {customElement, property} from \"lit/decorators.js\";\n\nconst styles = css`\n * {\n box-sizing: border-box;\n }\n :host {\n width: 100%;\n height: var(--or-tree-node-height, 44px);\n padding: 6px 12px 6px var(--or-tree-node-indent, 24px);\n background: var(--or-tree-node-background, transparent);\n border-left: 4px solid transparent;\n display: flex;\n align-items: center;\n gap: var(--or-tree-node-gap, 8px);\n overflow: hidden;\n user-select: none;\n --or-icon-width: 20px;\n }\n\n :host(:not([readonly])) {\n cursor: pointer;\n }\n \n :host([readonly]) {\n cursor: not-allowed;\n }\n\n :host(:not([readonly]):hover) {\n background: var(--or-tree-node-backgrond--hovered, #f8f9fa);\n }\n \n :host([selected]) {\n background: var(--or-tree-node-background--selected, #f1f3f5);\n border-left: 4px solid var(--or-tree-node-color--selected, var(--or-app-color4, #4d9d2a));\n }\n\n ::slotted(*:not([slot])) {\n flex: 1;\n }\n`;\n\n/**\n * @slot prefix - Appends elements to the left hand side of the node, commonly used for icons.\n * @slot - Default slot for the main content, commonly used for text.\n * @slot suffix - Appends elements to the right hand side of the node.\n *\n * @cssprop --or-tree-node-height - Controls the height of the node\n * @cssprop --or-tree-node-indent - Controls the left padding of the node\n *\n * @cssprop --or-tree-node-background - Sets the default background\n * @cssprop --or-tree-node-background--hovered - Sets the background while hovering\n * @cssprop --or-tree-node-background--selected - Sets the background when selected\n *\n * @cssprop --or-tree-node-color--selected - Sets the primary color of the node when selected\n */\n@customElement(\"or-tree-node\")\nexport class OrTreeNode extends LitElement {\n\n /**\n * HTML attribute that only applies CSS, showing this node cannot be interacted with.\n */\n @property({type: Boolean, reflect: true})\n public readonly = false;\n\n /**\n * HTML attribute that only applies CSS, marking the node as 'selected'.\n */\n @property({type: Boolean, reflect: true})\n public selected = false;\n\n static get styles() {\n return [styles];\n }\n\n protected render(): TemplateResult {\n return html`\n <slot name=\"prefix\"></slot>\n <slot></slot>\n <slot name=\"suffix\"></slot>\n `;\n }\n}\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {css, html, LitElement, PropertyValues, TemplateResult} from \"lit\";\nimport {customElement, property, queryAll} from \"lit/decorators.js\";\nimport {map} from \"lit/directives/map.js\";\nimport {when} from \"lit/directives/when.js\";\nimport {Util} from \"@openremote/core\";\nimport {OrTreeNode} from \"./or-tree-node\";\nimport {OrTreeGroup} from \"./or-tree-group\";\nimport {moveNodesToGroupNode} from \"./util\";\nimport {OrTreeDragEvent, OrTreeSelectEvent, TreeMenuSelection, TreeMenuSorting, TreeNode} from \"./model\";\nimport {createMenuBarItem, MenuBarItem, SubMenuItem} from \"@openremote/or-vaadin-components/or-vaadin-menu-bar\";\nimport \"@openremote/or-translate\";\n\nimport \"./or-tree-group\";\nimport \"./or-tree-node\";\n\nexport * from \"./or-tree-group\";\nexport * from \"./or-tree-node\";\nexport * from \"./model\";\n\nconst styles = css`\n * {\n box-sizing: border-box;\n }\n \n #tree-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n #tree-list {\n flex: 1;\n overflow: hidden auto;\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n or-tree-node > or-tree-node > * {\n pointer-events: none;\n }\n \n or-tree-node {\n transition: background-color 80ms;\n }\n \n or-tree-node[drophover] {\n background: #e9ecef;\n }\n \n #tree-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0px 5px 0px 15px;\n min-height: 48px;\n background: var(--or-app-color4, #4d9d2a);\n color: var(--or-app-color7, white);\n --or-icon-fill: var(--or-app-color7, white);\n }\n \n #tree-header-title {\n margin: 0;\n font-weight: 500;\n font-size: 16px;\n }\n \n #tree-header-actions {\n display: flex;\n align-items: center;\n }\n`;\n\n/**\n * A component for displaying a hierarchical, tree-like structure of elements.\n * Common use cases are visualizing parent-child relationships, or for grouping elements together.\n *\n * @event {OrTreeSelectEvent} or-tree-select - Triggers upon selecting a node, and dispatches a list of the nodes selected.\n * @event {OrTreeDragEvent} or-tree-drag - Triggers upon dragging a node to a new group, and dispatches a list of dragged nodes, the group node, and the updated list of all nodes.\n */\n@customElement(\"or-tree-menu\")\nexport class OrTreeMenu extends LitElement {\n\n /**\n * List of node items in the menu.\n * Uses the TreeNode format for rendering the OrTreeNode elements.\n */\n @property({type: Array})\n public nodes: TreeNode[] = [];\n\n /**\n * Changes the allowed selection method within the tree.\n * Common options are `LEAF`, `SINGLE` and `MULTI`.\n */\n @property({type: String})\n public selection: TreeMenuSelection = TreeMenuSelection.LEAF;\n\n /**\n * Disables and enables dragging of nodes into groups.\n */\n @property({type: Boolean})\n public draggable = false;\n\n /**\n * Removes the header from the tree menu.\n */\n @property({type: Boolean, attribute: \"no-header\"})\n public noHeader = false;\n\n /**\n * Adjusts the title in the menu header.\n */\n @property({type: String, attribute: \"menu-title\"})\n public menuTitle = \"Tree Menu\";\n\n /**\n * List of options available to sort the object with\n */\n @property({type: Array, attribute: \"sort-options\"})\n public sortOptions?: TreeMenuSorting[];\n\n /**\n * Represents the selected sorting option\n */\n @property({type: String, attribute: \"sort-by\", reflect: true})\n public sortBy: TreeMenuSorting = TreeMenuSorting.A_TO_Z;\n\n /**\n * Automatically prioritizes the groups, and positions these on top.\n */\n @property({type: Boolean, attribute: \"group-first\"})\n public groupFirst = false;\n\n @queryAll(\"or-tree-node\")\n protected _uiNodes?: NodeListOf<OrTreeNode>;\n\n @queryAll(\"or-tree-group\")\n protected _uiGroups?: NodeListOf<OrTreeGroup>;\n\n // A Map<TreeNode, unique generated ID> to easily identify which TreeNode has been used to render a TreeNodeComponent.\n protected _treeNodeCache: Map<TreeNode, string> = new Map<TreeNode, string>();\n\n // Caches the last selected component for use in multi select.\n protected _lastSelectedNode?: OrTreeNode;\n\n static get styles() {\n return [styles];\n }\n\n protected willUpdate(changedProps: PropertyValues) {\n if((changedProps.has(\"nodes\") || changedProps.has(\"sortBy\") || changedProps.has(\"groupFirst\")) && this.nodes) {\n this.nodes = this._sortNodes(this.nodes, this.sortBy, this.groupFirst);\n }\n // If the selection method has been changed, for example from LEAF to SINGLE, we deselect everything\n if(changedProps.has(\"selection\") && changedProps.get(\"selection\") && this.selection) {\n this.deselectAllNodes();\n }\n return super.willUpdate(changedProps);\n }\n\n render(): TemplateResult {\n return html`\n <div id=\"tree-container\">\n ${when(!this.noHeader, () => this._getHeaderTemplate())}\n ${this._getTreeTemplate(this.nodes)}\n ${this._getErrorTemplate()}\n </div>\n `;\n }\n\n /* ------------------------------------------------------------- */\n //region Public functions for or-tree-menu\n /* ------------------------------------------------------------- */\n\n /**\n * Function that moves an array of {@link TreeNode} into another {@link TreeNode}, by adding them to their children.\n * The function takes care of removing the nodes from the former group, and makes sure no duplicates end up in the list.\n *\n * @param nodesToMove - The array of nodes that are moved into a group.\n * @param groupNode - The group node to insert nodesToMove in.\n */\n public moveNodesToGroup(nodesToMove: TreeNode[], groupNode?: TreeNode) {\n this.nodes = moveNodesToGroupNode(nodesToMove, groupNode, this.nodes);\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n //region HTML Templates functions\n /* ------------------------------------------------------------- */\n\n /**\n * Returns a HTML template that displays the tree menu.\n * @param nodes - List of nodes to be rendered\n */\n protected _getTreeTemplate(nodes: TreeNode[]): TemplateResult {\n this._treeNodeCache = new Map(); // clear cache on every new render of the tree\n return html`\n <ol id=\"tree-list\" @dragover=${this._onDragOverList} @drop=${this._onDragDropList}>\n ${map(nodes, node => this._getNodeTemplate(node))}\n </ol>\n `;\n }\n\n /**\n * Returns an HTML template for displaying a single node within a tree menu. This can both be a group or a solo node.\n * @param node - Node to be rendered\n * @param parent - Optional parent (group node) if the node is placed inside a group\n */\n protected _getNodeTemplate(node: TreeNode, parent?: TreeNode): TemplateResult {\n const isGroup = node.children;\n if (isGroup) {\n return this._getGroupNodeTemplate(node, parent);\n } else {\n return this._getSingleNodeTemplate(node, parent);\n }\n }\n\n /**\n * Returns an HTML template for displaying a single node\n * @param node - Node to be rendered\n * @param parent - Optional parent (group node) if the node is placed inside a group\n */\n protected _getSingleNodeTemplate(node: TreeNode, parent?: TreeNode): TemplateResult {\n const randomId = this._setTreeNodeId(node);\n return html`\n <li draggable=${this.draggable}\n @dragstart=${(ev: DragEvent) => this._onDragStart(ev, node)}\n @dragover=${(ev: DragEvent) => this._onDragOverSingleNode(ev, node, parent)}\n @dragleave=${(ev: DragEvent) => this._onDragLeaveSingleNode(ev, node, parent)}\n @drop=${(ev: DragEvent) => this._onDragDropSingleNode(ev, node, parent)}>\n <or-tree-node id=${randomId} ?selected=${node.selected} ?readonly=${node.readonly} @click=\"${this._onTreeNodeClick}\">\n ${this._getSingleNodeSlotTemplate(node)}\n </or-tree-node>\n </li>\n `;\n }\n\n /**\n * Returns an HTML template for the slot element inside <or-tree-node>.\n * It allows customization such as a prefix icon, adjusting the label, etc.\n * @param node - Node to be rendered\n */\n protected _getSingleNodeSlotTemplate(node: TreeNode): TemplateResult {\n return html`\n <or-icon slot=\"prefix\" icon=\"flag\"></or-icon>\n <span>${node.label}</span>\n <span slot=\"suffix\"></span>\n `;\n }\n\n /**\n * Returns a HTML template for rendering a group node (aka a node with children)\n * @param node - Node to be rendered\n * @param _parent - Optional parent (group node) if the node is placed inside a group\n */\n protected _getGroupNodeTemplate(node: TreeNode, _parent?: TreeNode): TemplateResult {\n const leaf = this.selection === TreeMenuSelection.LEAF;\n const randomId = this._setTreeNodeId(node);\n return html`\n <li>\n <or-tree-group ?leaf=${leaf} ?expanded=${node.expanded}>\n <or-tree-node slot=\"parent\" id=${randomId} ?readonly=${leaf}\n @click=${this._onTreeGroupClick}\n @dragover=${(ev: DragEvent) => this._onDragOverGroup(ev, node)}\n @dragleave=${(ev: DragEvent) => this._onDragLeaveGroup(ev, node)}\n @drop=${(ev: DragEvent) => this._onDragDropGroup(ev, node)}>\n ${this._getGroupNodeSlotTemplate(node)}\n </or-tree-node>\n ${map(node.children, n => this._getNodeTemplate(n, node))}\n </or-tree-group>\n </li>\n `;\n }\n\n /**\n * Returns an HTML template for the parent slot element inside <or-tree-group>.\n * It allows customization such as a prefix icon, adjusting the label, etc.\n * @param node - Node to be rendered\n */\n protected _getGroupNodeSlotTemplate(node: TreeNode): TemplateResult {\n return html`\n <or-icon slot=\"prefix\" icon=\"folder\"></or-icon>\n <span>${node.label}</span>\n <span slot=\"suffix\"></span>\n `;\n }\n\n /**\n * Returns a HTML template for the header\n */\n protected _getHeaderTemplate(): TemplateResult {\n return html`\n <div id=\"tree-header\">\n <h3 id=\"tree-header-title\">\n <or-translate value=${this.menuTitle}></or-translate>\n </h3>\n <div id=\"tree-header-actions\">\n ${this._getSortActionTemplate(this.sortBy, this.sortOptions)}\n </div>\n </div>\n `;\n }\n\n /**\n * Returns a HTML template for the sorting options menu.\n * @param value - The selected sorting option\n * @param options - The available sorting options\n */\n protected _getSortActionTemplate(value?: string, options?: TreeMenuSorting[]): TemplateResult {\n const menuItems: MenuBarItem[] = [{\n component: createMenuBarItem(html`<or-icon icon=\"sort-variant\"></or-icon>`),\n children: (options ?? []).map(o => ({\n checked: value && o === value,\n component: createMenuBarItem(html`<or-translate value=${o}></or-translate>`),\n value: o\n })) as SubMenuItem[]\n }]\n return html`\n <or-vaadin-menu-bar theme=\"icon\" .items=${menuItems}\n @item-selected=${(ev: CustomEvent) => this._onSortClick(ev.detail.value.value)}\n ></or-vaadin-menu-bar>\n `;\n }\n\n /**\n * Returns a HTML template for displaying errors\n */\n protected _getErrorTemplate(): TemplateResult {\n return html``;\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n //region Event callback functions\n /* ------------------------------------------------------------- */\n\n /**\n * HTML callback event for selecting a sort option in the dropdown menu,.\n * @param value - The new selected sort option\n */\n protected _onSortClick(value: string) {\n this.sortBy = value as TreeMenuSorting;\n }\n\n /**\n * HTML callback event for clicking on a group node. (aka a node with children)\n * Based on the configured TreeMenuSelection, it single- or multi selects the nodes.\n */\n protected _onTreeGroupClick(ev: PointerEvent) {\n const elem = ev.currentTarget as OrTreeNode;\n const group = elem.parentElement as OrTreeGroup;\n const select = (treeGroup: OrTreeGroup, nodeElem: OrTreeNode) => {\n treeGroup.select();\n this._lastSelectedNode = nodeElem;\n this._notifyNodesSelect()\n }\n\n switch (this.selection) {\n case TreeMenuSelection.LEAF: {\n return; // Group node cannot be selected when in leaf\n }\n case TreeMenuSelection.MULTI: {\n\n // Shift selects all nodes between the previous selected, and this one.\n if(ev.shiftKey && this._lastSelectedNode) {\n const nodes = Array.from(this._uiNodes || []);\n const parentNode = group.getGroupNode();\n if(parentNode) {\n const indexOfClickedNode = nodes.indexOf(parentNode);\n const indexOfPreviousNode = nodes.indexOf(this._lastSelectedNode);\n this._selectNodesBetween(nodes, indexOfClickedNode, indexOfPreviousNode);\n return;\n }\n\n // Ctrl multi selects without deselecting the previous one.\n } else if(ev.ctrlKey) {\n select(group, elem);\n return;\n }\n // Otherwise, select node like normal\n this.deselectAllNodes();\n select(group, elem);\n return;\n }\n\n case TreeMenuSelection.SINGLE: {\n this.deselectAllNodes();\n select(group, elem);\n return;\n }\n }\n }\n\n /** HTML callback event for when a child node of the tree gets clicked on. */\n protected _onTreeNodeClick(ev: PointerEvent) {\n const node = ev.currentTarget as OrTreeNode;\n if (node) {\n switch (this.selection) {\n case TreeMenuSelection.MULTI: {\n\n // Shift selects all nodes between the previous selected, and this one.\n if(ev.shiftKey && this._lastSelectedNode) {\n const nodes = Array.from(this._uiNodes || []);\n const prevIndex = nodes.indexOf(this._lastSelectedNode);\n const clickedIndex = nodes.indexOf(node);\n if (prevIndex > -1 && clickedIndex > -1) {\n this._selectNodesBetween(nodes, prevIndex, clickedIndex);\n return;\n }\n\n // Ctrl multi selects without deselecting the previous one.\n } else if(ev.ctrlKey) {\n this._selectNode(node);\n return;\n }\n // Otherwise select the node like normal\n this.deselectAllNodes();\n this._selectNode(node);\n return;\n }\n\n default: {\n this.deselectAllNodes();\n this._selectNode(node);\n return;\n }\n }\n }\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n //region Drag-and-drop callback functions\n /* ------------------------------------------------------------- */\n\n /** HTML callback event for 'dragstart' (the moment when a drag gesture is started) */\n protected _onDragStart(ev: DragEvent, node: TreeNode) {\n if(ev.target) {\n ev.dataTransfer?.setData(\"treeNode\", JSON.stringify(node));\n } else {\n ev.preventDefault();\n }\n }\n\n /** HTML callback event for 'dragover' on the list element */\n protected _onDragOverList(ev: DragEvent) {\n if(this.draggable) ev.preventDefault();\n }\n\n /** HTML callback event for 'dragover', so while a node is dragged over a single node */\n protected _onDragOverSingleNode(ev: DragEvent, node: TreeNode, parent?: TreeNode) {\n if(this.draggable) {\n ev.preventDefault(); // allows dropping the node on this node\n if(parent) {\n const elem = this._getUiNodeFromTree(parent);\n elem?.setAttribute(\"drophover\", \"true\");\n }\n }\n }\n\n /** HTML callback event for 'dragover', so while a node is dragged over a group node */\n protected _onDragOverGroup(ev: DragEvent, groupNode: TreeNode) {\n if(this.draggable) {\n ev.preventDefault(); // allows dropping the node on the group\n (ev.currentTarget as HTMLElement).setAttribute(\"drophover\", \"true\");\n }\n }\n\n /** HTML callback event for 'dragover', so while a node is dragged over a single node */\n protected _onDragLeaveSingleNode(ev: DragEvent, node: TreeNode, parent?: TreeNode) {\n if(parent && this.draggable) {\n ev.preventDefault(); // allows dropping the node on this node\n const elem = this._getUiNodeFromTree(parent);\n elem?.removeAttribute(\"drophover\");\n }\n }\n\n /** HTML callback event for 'dragleave', so after a node has been dragged over a group node */\n protected _onDragLeaveGroup(ev: DragEvent, groupNode: TreeNode) {\n if(this.draggable) (ev.currentTarget as HTMLElement).removeAttribute(\"drophover\");\n }\n\n /** HTML callback event for when a node is dropped on the list level. */\n protected _onDragDropList(ev: DragEvent) {\n this._onDragDropGroup(ev);\n }\n\n /** HTML callback event for when a node is dropped onto a single node, after dragging it over. */\n protected _onDragDropSingleNode(ev: DragEvent, groupNode?: TreeNode, parent?: TreeNode) {\n this._onDragDropGroup(ev, parent);\n }\n\n /** HTML callback event for when a node is dropped onto a group node, after dragging it over. */\n protected _onDragDropGroup(ev: DragEvent, groupNode?: TreeNode) {\n if(this.draggable) {\n ev.preventDefault(); // allows dropping the node on this node\n ev.stopPropagation();\n\n // Remove \"hover background\" from the group node in the UI\n if(groupNode) this._getUiNodeFromTree(groupNode)?.removeAttribute(\"drophover\");\n\n let nodesToMove: TreeNode[] = [];\n\n // Get the dragged element from the event payload data\n const data = ev.dataTransfer?.getData(\"treeNode\");\n if(data) {\n const node = JSON.parse(data) as TreeNode;\n if(node) nodesToMove.push(node);\n }\n // If selection is multi, also add all selected ones\n if(this.selection === TreeMenuSelection.MULTI) {\n let selected = this._findSelectedTreeNodes();\n\n // Filter out groups\n selected = selected.filter(n => !n.children);\n\n if(selected.length > 0) {\n this.deselectAllNodes();\n nodesToMove.push(...selected.filter(node => !nodesToMove.find(n => JSON.stringify(n) === JSON.stringify(node))));\n }\n }\n\n // Filter out \"nodes to move\" that are already in that group\n if(groupNode?.children) {\n nodesToMove = nodesToMove.filter(node =>\n !groupNode.children?.find(child => child.id === node.id)\n )\n }\n\n // Finally, move the nodes\n if(nodesToMove.length > 0) {\n this._dispatchCancellableDragEvent(nodesToMove, groupNode, this.nodes).then(() => {\n this.nodes = moveNodesToGroupNode(nodesToMove, groupNode, this.nodes);\n }).catch(ignored => {});\n }\n }\n }\n\n /**\n * Dispatches a cancellable tree drag event.\n */\n protected _dispatchCancellableDragEvent(nodes: TreeNode[], groupNode?: TreeNode, allNodes: TreeNode[] = []): Promise<void> {\n return new Promise((resolve, reject) => {\n const success = this.dispatchEvent(new OrTreeDragEvent(nodes, groupNode, allNodes));\n success ? resolve() : reject();\n });\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n\n /**\n * Selects the node using the HTML attribute 'selected' of OrTreeNode\n * @param node - Node to be selected\n * @param notify - Boolean whether to notify the HTML parents of an or-tree-select.\n */\n protected _selectNode(node?: OrTreeNode, notify = true) {\n if(node) {\n if(notify) {\n const selected = [...this._findSelectedTreeNodes()];\n const treeNode = this._getTreeNodeFromTree(node);\n if(treeNode) selected.push(treeNode);\n const success = this._dispatchSelectEvent(selected); // Dispatch a \"select\" event, and return when cancelled by a consumer\n if(!success) return;\n }\n node.selected = true;\n this._lastSelectedNode = node;\n }\n }\n\n /**\n * Multi-selects the nodes between two indexes in a list of OrTreeNode.\n * @param nodes - List of nodes in the tree menu\n * @param index1 - Start index of the nodes to select\n * @param index2 - End index of the nodes to select\n * @param notify - Boolean whether to notify the HTML parents of an or-tree-select.\n */\n protected _selectNodesBetween(nodes: OrTreeNode[], index1: number, index2: number, notify = true) {\n const selectedNodes: OrTreeNode[] = [];\n if(index1 < index2) {\n for(let x = index1; x <= index2; x++) {\n selectedNodes.push(nodes[x]);\n }\n } else if(index1 > index2) {\n for(let x = index2; x <= index1; x++) {\n selectedNodes.push(nodes[x]);\n }\n }\n // Dispatch a \"select\" event with the new nodes. If cancelled, we will not select the nodes.\n if(notify) {\n const nodes = selectedNodes.map(n => this._getTreeNodeFromTree(n)).filter(n => n) as TreeNode[];\n const success = this._notifyNodesSelect(nodes);\n if(!success) return;\n }\n // Select the nodes\n selectedNodes.forEach((node) => this._selectNode(node));\n }\n\n /**\n * Function that notifies parent HTMLElements that a tree node got selected.\n * It dispatches the OrTreeSelectEvent, which includes a list of the selected nodes.\n * @returns a 'success' boolean whether the event was cancelled or not\n */\n protected async _notifyNodesSelect(selectedNodes?: TreeNode[]) {\n await this.getUpdateComplete(); // await render to include the latest changes.\n if(!selectedNodes) {\n selectedNodes = this._findSelectedTreeNodes();\n }\n return this._dispatchSelectEvent(selectedNodes);\n }\n\n /**\n * Utility function to detect the selected tree nodes.\n * @param uiNodes - List of <or-tree-node> UI elements\n * @param cache - Optionally, supply the cache for retrieving a {@link TreeNode} object from a <or-tree-node> element.\n */\n protected _findSelectedTreeNodes(uiNodes = Array.from(this._uiNodes || []), cache = this._treeNodeCache): TreeNode[] {\n\n // Get the list of selected TreeNodeComponent elements in the UI.\n const selectedUiNodes = uiNodes.filter(n => n.selected);\n\n // Get the list of cached generated IDs (for tracking which TreeNode belongs to which TreeNodeComponent)\n const treeNodeEntries = Array.from(cache.entries());\n\n // Find the generated IDs in the list of TreeNodeComponents, and compare the element ID\n return selectedUiNodes.map(component => treeNodeEntries\n .find(v => v[1] === component.id))\n .map(x => x?.[0])\n .filter(n => n !== undefined) as TreeNode[];\n }\n\n /**\n * Utility function that gets a {@link TreeNode} based on an {@link OrTreeNode} HTML element in the menu.\n * @param uiNode - The tree node HTML element\n * @param cache - Optional cache to get the TreeNode from\n */\n protected _getTreeNodeFromTree(uiNode: OrTreeNode, cache = this._treeNodeCache): TreeNode | undefined {\n const treeNodeEntries = Array.from(cache.entries()); // Get the list of cached generated IDs (for tracking which TreeNode belongs to which TreeNodeComponent)\n return treeNodeEntries.find(entry => entry[1] === uiNode.id)?.[0];\n }\n\n /**\n * Utility function that gets an {@link OrTreeNode} HTML element based on the {@link TreeNode} input object.\n * @param treeNode - The tree node object\n * @param cache - Optional cache to get the HTML element from\n */\n protected _getUiNodeFromTree(treeNode: TreeNode, cache = this._treeNodeCache): OrTreeNode | undefined {\n const treeNodeEntries = Array.from(cache.entries()); // Get the list of cached generated IDs (for tracking which TreeNode belongs to which TreeNodeComponent)\n const treeNodeJSON = JSON.stringify(treeNode);\n\n const elementId = treeNodeEntries.find(entry => JSON.stringify(entry[0]) === treeNodeJSON)?.[1];\n return elementId ? this.shadowRoot!.getElementById(elementId) as OrTreeNode : undefined;\n }\n\n /**\n * Utility function for sending a \"select\" event, so consumers of this component are aware a new node has been selected.\n * @param selectedNodes - List of selected nodes to include in the event payload.\n * @returns a 'success' boolean whether the event was cancelled or not.\n */\n protected _dispatchSelectEvent(selectedNodes?: TreeNode[]): boolean {\n return this.dispatchEvent(new OrTreeSelectEvent(selectedNodes || []));\n }\n\n /**\n * Public function that deselects all tree nodes.\n */\n public deselectAllNodes() {\n (this._uiGroups || []).forEach(uiGroup => uiGroup.deselect());\n (this._uiNodes || []).forEach(uiNode => uiNode.selected = false);\n }\n\n /**\n * Utility function that sorts the list of {@link nodes} based on the given {@link sortBy} method.\n * @param nodes - List of nodes to be sorted\n * @param sortBy - Sorting option\n * @param groupFirst - Whether to prioritize group nodes, and place them on the top of the list.\n */\n protected _sortNodes(nodes: TreeNode[], sortBy?: TreeMenuSorting, groupFirst = false): TreeNode[] {\n console.debug(`Sorting nodes in the tree menu using '${sortBy}'`);\n\n const grouped = nodes.filter(node => node.children !== undefined);\n\n // TODO: Apply recursive sorting if nested deeper inside the tree\n grouped.forEach(g => g.children?.sort(this._getSortFunction(sortBy)));\n\n // Optionally, prioritize group nodes, and place all groups on top of the menu\n if(groupFirst) {\n const ungrouped = nodes.filter(node => node.children === undefined);\n grouped.sort(this._getSortFunction(sortBy));\n ungrouped.sort(this._getSortFunction(sortBy));\n return [...grouped, ...ungrouped];\n }\n\n return nodes.sort(this._getSortFunction(sortBy));\n }\n\n /**\n * Function that caches a random ID into a key-value storage, linking the TreeNode with a generated ID.\n * This generated ID can be used somewhere else, for example in an HTMLElement ID as a unique identifier.\n * @param node - The TreeNode object to cache\n * @param randomId - Optionally you can supply an ID to use for caching\n */\n protected _setTreeNodeId(node: TreeNode, randomId = Util.generateUniqueUUID()): string {\n if(this._treeNodeCache.get(node)) {\n return this._treeNodeCache.get(node)!;\n }\n this._treeNodeCache.set(node, randomId);\n return randomId;\n }\n\n /**\n * Function for retrieving the sorting for TreeNodes based on a sortBy parameter.\n * The sortBy parameter represents a key in the TreeNode object like 'label'.\n * @param sortBy - Sorting option to use, such as \"a_to_z\"\n */\n protected _getSortFunction(sortBy?: TreeMenuSorting): (a: TreeNode, b: TreeNode) => number {\n switch (sortBy) {\n case TreeMenuSorting.Z_TO_A:\n return (a, b) => b.label.localeCompare(a.label);\n default:\n return Util.sortByString(node => node.label);\n }\n }\n\n /**\n * Programmatically finds a group by its ID and sets it to be expanded.\n * This is called by the parent component after a new node is added to a tree group.\n * @param {string} groupId The ID of the group to expand.\n */\n public expandGroup(groupId: string) {\n // Wait for any pending Lit updates to complete to ensure the node list is stable.\n this.updateComplete.then(() => {\n const groupNode = this.nodes.find(node => node.id === groupId && node.children);\n\n if (groupNode) {\n groupNode.expanded = true;\n // re-render with the change.\n this.requestUpdate();\n }\n });\n }\n}\n"],"names":["e","Object","Symbol","globalThis","Document","CSSStyleSheet","WeakMap","Error","document","n","t","Boolean","Array","JSON","i","Number","String","HTMLElement","Map","litPropertyMetadata","Set","Promise","Math","RegExp","a","d","o","r","arguments","customElements","Reflect","console","CustomEvent","window","MutationObserver","queueMicrotask","setTimeout","MouseEvent","navigator","s","Event","isNaN","Node","NaN","EventTarget","CSSImportRule","CSSMediaRule","CSSStyleRule","CSS","WeakRef","getComputedStyle","ResizeObserver","clearTimeout","IntersectionObserver","parseInt","requestAnimationFrame","parseFloat","cancelAnimationFrame","Function","localStorage","Element","ShadowRoot"],"mappings":"8gBA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EAAI,G,+BAOrD,IADN,GAAS,CAAC,KAAML,QAAS,UAAW,aAAa,G,mCAIxC,IADT,GAAS,gB,iCAIA,IADT,GAAS,iB,kCAvDD,GAAU,IADtB,GAAc,gB,CACF,G"}
1
+ {"version":3,"file":"index.js","sources":["webpack://ORTreeMenu/webpack/runtime/define_property_getters","webpack://ORTreeMenu/webpack/runtime/has_own_property","webpack://ORTreeMenu/webpack/runtime/make_namespace_object","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/query-all.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/element-mixin.js","webpack://ORTreeMenu/../../../node_modules/lit-html/directive.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/css-tag.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/reactive-element.js","webpack://ORTreeMenu/../../../node_modules/lit-html/lit-html.js","webpack://ORTreeMenu/../../../node_modules/lit-element/lit-element.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/custom-element.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/property.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/base.js","webpack://ORTreeMenu/../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","webpack://ORTreeMenu/../../../node_modules/lit-html/directives/map.js","webpack://ORTreeMenu/./src/model.ts","webpack://ORTreeMenu/./src/util.ts","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/define.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/dir-mixin.js","webpack://ORTreeMenu/../../../node_modules/@open-wc/dedupe-mixin/src/dedupeMixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/polylit-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/path-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/async.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/gestures.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/disabled-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/keyboard-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/active-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/item/src/vaadin-item-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/css-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/css-property-observer.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/css-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/warnings.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/lumo-modules.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/src/lumo-injector.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/styles/style-props.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/item/src/styles/vaadin-item-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-item-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/styles/vaadin-context-menu-item-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-item.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/debounce.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/slot-observer.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/keyboard-direction-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/list-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/dir-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/list-box/src/styles/vaadin-list-box-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-list-box.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-restoration-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/focus-trap-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-focus-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-position-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/dom-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/vaadin-menu-overlay-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/browser-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-stack-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/vaadin-overlay-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/styles/vaadin-menu-overlay-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-overlay-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/overlay/src/styles/vaadin-overlay-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-overlay.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/media-query-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/unique-id-utils.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/slot-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/vaadin-context-menu-tooltip-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/vaadin-contextmenu-items-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/context-menu/src/vaadin-context-menu-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-submenu.js","webpack://ORTreeMenu/../../../node_modules/lit-html/directives/if-defined.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-development-mode-detector/vaadin-development-mode-detector.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/vaadin-usage-statistics/vaadin-usage-statistics-collect.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/tooltip-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/button/src/styles/vaadin-button-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/a11y-base/src/tabindex-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-button-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-button.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/styles/vaadin-menu-bar-base-styles.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/i18n-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/component-base/src/resize-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-tooltip-controller.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar-mixin.js","webpack://ORTreeMenu/../../../node_modules/@vaadin/menu-bar/src/vaadin-menu-bar.js","webpack://ORTreeMenu/../or-vaadin-components/lib/or-vaadin-menu-bar.js","webpack://ORTreeMenu/./src/or-tree-group.ts","webpack://ORTreeMenu/../../../node_modules/lit-html/directives/when.js","webpack://ORTreeMenu/./src/or-tree-node.ts","webpack://ORTreeMenu/./src/index.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nlet e;function r(r){return(n,o)=>t(n,o,{get(){return(this.renderRoot??(e??=document.createDocumentFragment())).querySelectorAll(r)}})}export{r as queryAll};\n//# sourceMappingURL=query-all.js.map\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { usageStatistics } from '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js';\nimport { idlePeriod } from './async.js';\nimport { Debouncer, enqueueDebouncer } from './debounce.js';\nimport { DirMixin } from './dir-mixin.js';\n\nif (!window.Vaadin) {\n window.Vaadin = {};\n}\n\n/**\n * Array of Vaadin custom element classes that have been finalized.\n */\nif (!window.Vaadin.registrations) {\n window.Vaadin.registrations = [];\n}\n\nif (!window.Vaadin.developmentModeCallback) {\n window.Vaadin.developmentModeCallback = {};\n}\n\nwindow.Vaadin.developmentModeCallback['vaadin-usage-statistics'] = function () {\n usageStatistics();\n};\n\nlet statsJob;\n\nconst registered = new Set();\n\nexport const ElementMixin = (superClass) =>\n class VaadinElementMixin extends DirMixin(superClass) {\n /** @protected */\n static _ensureRegistrations() {\n const { is } = this;\n\n // Registers a class prototype for telemetry purposes.\n if (is && !registered.has(is)) {\n window.Vaadin.registrations.push(this);\n registered.add(is);\n\n const callback = window.Vaadin.developmentModeCallback;\n if (callback) {\n statsJob = Debouncer.debounce(statsJob, idlePeriod, () => {\n callback['vaadin-usage-statistics']();\n });\n enqueueDebouncer(statsJob);\n }\n }\n }\n\n constructor() {\n super();\n\n if (document.doctype === null) {\n console.warn(\n 'Vaadin components require the \"standards mode\" declaration. Please add <!DOCTYPE html> to the HTML document.',\n );\n }\n\n this.constructor._ensureRegistrations();\n }\n };\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?H:\"?\"===e[1]?I:\"@\"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||\"\"===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push(\"3.3.1\");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.1\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o){return(e,n)=>{const{slot:r,selector:s}=o??{},c=\"slot\"+(r?`[name=${r}]`:\":not([name])\");return t(e,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter((t=>t.matches(s)))}})}}export{o as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction*o(o,f){if(void 0!==o){let i=0;for(const t of o)yield f(t,i++)}}export{o as map};\n//# sourceMappingURL=map.js.map\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * The TreeNode model for constructing a node within the tree.\n */\nexport interface TreeNode {\n id: string;\n children?: TreeNode[];\n label: string;\n hidden?: boolean;\n readonly?: boolean;\n selected?: boolean; // Only acts as initial state\n expandable?: boolean;\n expanded?: boolean;\n}\n\n/**\n * List of possible options for tree menu selection.\n * The order within the enum is based on restrictiveness.\n *\n * - **LEAF** - only allows a single node to be selected, and forbids the selection of any parent node.\n * - **SINGLE** - only allows a single node to be selected, but does allow the selection of the parent node.\n * - **MULTI** - allows selecting multiple nodes using keyboard controls. (control and shift)\n */\nexport enum TreeMenuSelection {\n LEAF = \"leaf\", SINGLE = \"single\", MULTI = \"multi\"\n}\n\n/**\n * List of sorting options in the header of the tree menu.\n * By default, we include alphabetically sorting, but can be expanded by class inheritors.\n */\nexport enum TreeMenuSorting {\n A_TO_Z = \"a_to_z\", Z_TO_A = \"z_to_a\"\n}\n\n/**\n * Model for the SELECT event that {@link OrTreeMenu} can dispatch.\n * Once a node is selected, a list of all the selected nodes will be shared with the consumer elements.\n */\nexport class OrTreeSelectEvent extends CustomEvent<TreeNode[]> {\n\n public static readonly NAME = \"or-tree-select\";\n\n constructor(nodes: TreeNode[]) {\n super(OrTreeSelectEvent.NAME, {\n bubbles: true,\n composed: true,\n detail: nodes\n });\n }\n}\n\n/**\n * Payload object of the {@link OrTreeDragEvent}.\n */\nexport interface OrTreeGroupEventDetail {\n nodes: TreeNode[];\n groupNode?: TreeNode;\n newNodes: TreeNode[];\n}\n\n/**\n * Model for the DRAG event that {@link OrTreeMenu} can dispatch.\n * Once a node is dragged into (or outside) a group, we send details to consumer elements.\n */\nexport class OrTreeDragEvent extends CustomEvent<OrTreeGroupEventDetail> {\n\n public static readonly NAME = \"or-tree-drag\";\n\n constructor(nodes: TreeNode[], groupNode?: TreeNode, newNodes: TreeNode[] = []) {\n super(OrTreeDragEvent.NAME, {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: {\n nodes: nodes,\n groupNode: groupNode,\n newNodes: newNodes\n } as OrTreeGroupEventDetail\n });\n }\n}\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {TreeNode} from \"./model\";\n\n/**\n * Utility function that moves an array of {@link TreeNode} into another {@link TreeNode}, by adding them to their children.\n * The function takes care of removing the nodes from the former group, and makes sure no duplicates end up in the list.\n *\n * @param nodesToMove - The array of nodes that are moved into a group.\n * @param groupNode - The group node to insert nodesToMove in.\n * @param treeNodes - Full list of nodes in the tree menu.\n */\nexport function moveNodesToGroupNode(nodesToMove: TreeNode[], groupNode?: TreeNode, treeNodes: TreeNode[] = []): TreeNode[] {\n console.debug(`Moving nodes '${nodesToMove.map(node => node.label).join(', ')}' into group '${groupNode?.label}'. Tree nodes are`, groupNode);\n\n function filterAndAdd(nodes: TreeNode[]): TreeNode[] {\n return nodes.map(node => {\n\n if (nodesToMove.some(nodeToMove => node.id === nodeToMove.id)) {\n console.debug(\"Removed the node from original position.\")\n return null; // Removes the node from its original position\n }\n\n const newNode: TreeNode = { ...node };\n\n // Recursively loop through children\n if (newNode.children) {\n newNode.children = filterAndAdd(newNode.children).filter(child => child !== null);\n }\n\n // If the currently looped node is the target group node, add the nodes to its children\n if (groupNode && node.id === groupNode?.id) {\n nodesToMove.forEach(nodeToMove => {\n newNode.children = newNode.children ? [...newNode.children, nodeToMove] : [nodeToMove];\n });\n }\n return newNode;\n\n }).filter(node => node !== null) as TreeNode[];\n }\n\n // Start the recursive function\n const newNodes = filterAndAdd(treeNodes);\n\n // If no groupNode is provided, add the nodesToMove to the top level\n if (!groupNode) {\n newNodes.push(...nodesToMove);\n }\n return newNodes;\n}\n\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nwindow.Vaadin ||= {};\nwindow.Vaadin.featureFlags ||= {};\n\nfunction dashToCamelCase(dash) {\n return dash.replace(/-[a-z]/gu, (m) => m[1].toUpperCase());\n}\n\nconst experimentalMap = {};\n\nexport function defineCustomElement(CustomElement, version = '25.2.1') {\n Object.defineProperty(CustomElement, 'version', {\n get() {\n return version;\n },\n });\n\n if (CustomElement.experimental) {\n const featureFlagKey =\n typeof CustomElement.experimental === 'string'\n ? CustomElement.experimental\n : `${dashToCamelCase(CustomElement.is.split('-').slice(1).join('-'))}Component`;\n\n if (!window.Vaadin.featureFlags[featureFlagKey] && !experimentalMap[featureFlagKey]) {\n // Add setter to define experimental component when it's set to true\n experimentalMap[featureFlagKey] = new Set();\n experimentalMap[featureFlagKey].add(CustomElement);\n\n Object.defineProperty(window.Vaadin.featureFlags, featureFlagKey, {\n get() {\n return experimentalMap[featureFlagKey].size === 0;\n },\n set(value) {\n if (!!value && experimentalMap[featureFlagKey].size > 0) {\n experimentalMap[featureFlagKey].forEach((elementClass) => {\n customElements.define(elementClass.is, elementClass);\n });\n experimentalMap[featureFlagKey].clear();\n }\n },\n });\n\n return;\n } else if (experimentalMap[featureFlagKey]) {\n // Allow to register multiple components with single flag\n experimentalMap[featureFlagKey].add(CustomElement);\n return;\n }\n }\n\n const defined = customElements.get(CustomElement.is);\n if (!defined) {\n customElements.define(CustomElement.is, CustomElement);\n } else {\n const definedVersion = defined.version;\n if (definedVersion && CustomElement.version && definedVersion === CustomElement.version) {\n // Just loading the same thing again\n console.warn(`The component ${CustomElement.is} has been loaded twice`);\n } else {\n console.error(\n `Tried to define ${CustomElement.is} version ${CustomElement.version} when version ${defined.version} is already in use. Something will probably break.`,\n );\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Array of Vaadin custom element classes that have been subscribed to the dir changes.\n */\nconst directionSubscribers = [];\n\nfunction alignDirs(element, documentDir, elementDir = element.getAttribute('dir')) {\n if (documentDir) {\n element.setAttribute('dir', documentDir);\n } else if (elementDir != null) {\n element.removeAttribute('dir');\n }\n}\n\nfunction getDocumentDir() {\n return document.documentElement.getAttribute('dir');\n}\n\nfunction directionUpdater() {\n const documentDir = getDocumentDir();\n directionSubscribers.forEach((element) => {\n alignDirs(element, documentDir);\n });\n}\n\nconst directionObserver = new MutationObserver(directionUpdater);\ndirectionObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['dir'] });\n\n/**\n * A mixin to handle `dir` attribute based on the one set on the `<html>` element.\n */\nexport const DirMixin = (superClass) =>\n class VaadinDirMixin extends superClass {\n static get properties() {\n return {\n /**\n * @protected\n */\n dir: {\n type: String,\n value: '',\n reflectToAttribute: true,\n converter: {\n fromAttribute: (attr) => {\n return !attr ? '' : attr;\n },\n toAttribute: (prop) => {\n return prop === '' ? null : prop;\n },\n },\n },\n };\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get __isRTL() {\n return this.getAttribute('dir') === 'rtl';\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (!this.hasAttribute('dir') || this.__restoreSubscription) {\n this.__subscribe();\n alignDirs(this, getDocumentDir(), null);\n }\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name !== 'dir') {\n return;\n }\n\n const documentDir = getDocumentDir();\n\n // New value equals to the document direction and the element is not subscribed to the changes\n const newValueEqlDocDir = newValue === documentDir && directionSubscribers.indexOf(this) === -1;\n // Value was emptied and the element is not subscribed to the changes\n const newValueEmptied = !newValue && oldValue && directionSubscribers.indexOf(this) === -1;\n // New value is different and the old equals to document direction and the element is not subscribed to the changes\n const newDiffValue = newValue !== documentDir && oldValue === documentDir;\n\n if (newValueEqlDocDir || newValueEmptied) {\n this.__subscribe();\n alignDirs(this, documentDir, newValue);\n } else if (newDiffValue) {\n this.__unsubscribe();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__restoreSubscription = directionSubscribers.includes(this);\n this.__unsubscribe();\n }\n\n /** @protected */\n _valueToNodeAttribute(node, value, attribute) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the property contains an empty string then it should not create an empty attribute\n if (attribute === 'dir' && value === '' && !node.hasAttribute('dir')) {\n return;\n }\n super._valueToNodeAttribute(node, value, attribute);\n }\n\n /** @protected */\n _attributeToProperty(attribute, value, type) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the attribute is removed, then the dir property should contain an empty string instead of null\n if (attribute === 'dir' && !value) {\n this.dir = '';\n } else {\n super._attributeToProperty(attribute, value, type);\n }\n }\n\n /** @private */\n __subscribe() {\n if (!directionSubscribers.includes(this)) {\n directionSubscribers.push(this);\n }\n }\n\n /** @private */\n __unsubscribe() {\n if (directionSubscribers.includes(this)) {\n directionSubscribers.splice(directionSubscribers.indexOf(this), 1);\n }\n }\n };\n","const appliedClassMixins = new WeakMap();\n\n/** Vefify if the Mixin was previously applyed\n * @private\n * @param {function} mixin Mixin being applyed\n * @param {object} superClass Class receiving the new mixin\n * @returns {boolean}\n */\nfunction wasMixinPreviouslyApplied(mixin, superClass) {\n let klass = superClass;\n while (klass) {\n if (appliedClassMixins.get(klass) === mixin) {\n return true;\n }\n klass = Object.getPrototypeOf(klass);\n }\n return false;\n}\n\n/** Apply each mixin in the chain to make sure they are not applied more than once to the final class.\n * @export\n * @param {function} mixin Mixin to be applyed\n * @returns {object} Mixed class with mixin applied\n */\nexport function dedupeMixin(mixin) {\n return superClass => {\n if (wasMixinPreviouslyApplied(mixin, superClass)) {\n return superClass;\n }\n const mixedClass = mixin(superClass);\n appliedClassMixins.set(mixedClass, mixin);\n return mixedClass;\n };\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { notEqual } from 'lit';\nimport { get, set } from './path-utils.js';\n\nconst caseMap = {};\n\nconst CAMEL_TO_DASH = /([A-Z])/gu;\n\nfunction camelToDash(camel) {\n if (!caseMap[camel]) {\n caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase();\n }\n return caseMap[camel];\n}\n\nfunction upper(name) {\n return name[0].toUpperCase() + name.substring(1);\n}\n\nfunction parseObserver(observerString) {\n const [method, rest] = observerString.split('(');\n const observerProps = rest\n .replace(')', '')\n .split(',')\n .map((prop) => prop.trim());\n\n return {\n method,\n observerProps,\n };\n}\n\nfunction getOrCreateMap(obj, name) {\n if (!Object.prototype.hasOwnProperty.call(obj, name)) {\n // Clone any existing entries (superclasses)\n obj[name] = new Map(obj[name]);\n }\n return obj[name];\n}\n\nconst PolylitMixinImplementation = (superclass) => {\n class PolylitMixinClass extends superclass {\n // PolylitMixin, and components using it, force synchronous updates\n // in connectedCallback and for properties that are configured to\n // be sync. This causes Lit's `change-in-update` warning to be\n // logged for almost every component when Lit runs in development\n // mode. Since we intentionally force updates, disable the warning.\n static enabledWarnings = [];\n\n static createProperty(name, options) {\n if ([String, Boolean, Number, Array].includes(options)) {\n options = {\n type: options,\n };\n }\n\n if (options?.reflectToAttribute) {\n options.reflect = true;\n }\n\n super.createProperty(name, options);\n }\n\n static getOrCreateMap(name) {\n return getOrCreateMap(this, name);\n }\n\n /**\n * @protected\n * @override\n */\n static finalize() {\n // Suppress warnings about deprecated overriding ReactiveElement methods\n // as the mixin requires those. See https://github.com/lit/lit/pull/4901\n if (window.litIssuedWarnings) {\n window.litIssuedWarnings.add('no-override-create-property');\n window.litIssuedWarnings.add('no-override-get-property-descriptor');\n }\n\n super.finalize();\n\n if (Array.isArray(this.observers)) {\n const complexObservers = this.getOrCreateMap('__complexObservers');\n\n this.observers.forEach((observer) => {\n const { method, observerProps } = parseObserver(observer);\n complexObservers.set(method, observerProps);\n });\n }\n }\n\n static addCheckedInitializer(initializer) {\n super.addInitializer((instance) => {\n // Prevent initializer from affecting superclass\n if (instance instanceof this) {\n initializer(instance);\n }\n });\n }\n\n static getPropertyDescriptor(name, key, options) {\n const defaultDescriptor = super.getPropertyDescriptor(name, key, options);\n\n let result = defaultDescriptor;\n\n // Set the key for this property\n this.getOrCreateMap('__propKeys').set(name, key);\n\n if (options.sync) {\n result = {\n get: defaultDescriptor.get,\n set(value) {\n const oldValue = this[name];\n\n if (notEqual(value, oldValue)) {\n this[key] = value;\n this.requestUpdate(name, oldValue, options);\n\n // Enforce synchronous update\n if (this.hasUpdated) {\n this.performUpdate();\n }\n }\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if (options.readOnly) {\n const setter = result.set;\n\n this.addCheckedInitializer((instance) => {\n // This is run during construction of the element\n instance[`_set${upper(name)}`] = function (value) {\n setter.call(instance, value);\n };\n });\n\n result = {\n get: result.get,\n set() {\n // Do nothing, property is read-only.\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if ('value' in options) {\n // Set the default value\n this.addCheckedInitializer((instance) => {\n const value = typeof options.value === 'function' ? options.value.call(instance) : options.value;\n\n if (options.readOnly) {\n instance[`_set${upper(name)}`](value);\n } else {\n instance[name] = value;\n }\n });\n }\n\n if (options.observer) {\n const method = options.observer;\n\n // Set this method\n this.getOrCreateMap('__observers').set(name, method);\n\n this.addCheckedInitializer((instance) => {\n if (!instance[method]) {\n console.warn(`observer method ${method} not defined`);\n }\n });\n }\n\n if (options.notify) {\n if (!this.__notifyProps) {\n this.__notifyProps = new Set();\n // eslint-disable-next-line no-prototype-builtins\n } else if (!this.hasOwnProperty('__notifyProps')) {\n // Clone any existing observers (superclasses)\n const notifyProps = this.__notifyProps;\n this.__notifyProps = new Set(notifyProps);\n }\n\n // Set this method\n this.__notifyProps.add(name);\n }\n\n if (options.computed) {\n const assignComputedMethod = `__assignComputed${name}`;\n const observer = parseObserver(options.computed);\n this.prototype[assignComputedMethod] = function (...props) {\n this[name] = this[observer.method](...props);\n };\n\n this.getOrCreateMap('__computedObservers').set(assignComputedMethod, observer.observerProps);\n }\n\n if (!options.attribute) {\n options.attribute = camelToDash(name);\n }\n\n return result;\n }\n\n static get polylitConfig() {\n return {\n asyncFirstRender: false,\n };\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n const { polylitConfig } = this.constructor;\n if (!this.hasUpdated && !polylitConfig.asyncFirstRender) {\n this.performUpdate();\n }\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n if (!this.$) {\n this.$ = {};\n }\n\n this.renderRoot.querySelectorAll('[id]').forEach((node) => {\n this.$[node.id] = node;\n });\n }\n\n /** @protected */\n ready() {}\n\n /** @protected */\n willUpdate(props) {\n if (this.constructor.__computedObservers) {\n this.__runComplexObservers(props, this.constructor.__computedObservers);\n }\n }\n\n /** @protected */\n updated(props) {\n const wasReadyInvoked = this.__isReadyInvoked;\n this.__isReadyInvoked = true;\n\n if (this.constructor.__observers) {\n this.__runObservers(props, this.constructor.__observers);\n }\n\n if (this.constructor.__complexObservers) {\n this.__runComplexObservers(props, this.constructor.__complexObservers);\n }\n\n if (this.__dynamicPropertyObservers) {\n this.__runDynamicObservers(props, this.__dynamicPropertyObservers);\n }\n\n if (this.__dynamicMethodObservers) {\n this.__runComplexObservers(props, this.__dynamicMethodObservers);\n }\n\n if (this.constructor.__notifyProps) {\n this.__runNotifyProps(props, this.constructor.__notifyProps);\n }\n\n if (!wasReadyInvoked) {\n this.ready();\n }\n }\n\n /**\n * Set several properties at once and perform synchronous update.\n * @protected\n */\n setProperties(props) {\n Object.entries(props).forEach(([name, value]) => {\n // Use private key and not setter to not trigger\n // update for properties marked as `sync: true`.\n const key = this.constructor.__propKeys.get(name);\n const oldValue = this[key];\n this[key] = value;\n this.requestUpdate(name, oldValue);\n });\n\n // Perform sync update\n if (this.hasUpdated) {\n this.performUpdate();\n }\n }\n\n /** @protected */\n _createMethodObserver(observer) {\n const dynamicObservers = getOrCreateMap(this, '__dynamicMethodObservers');\n const { method, observerProps } = parseObserver(observer);\n dynamicObservers.set(method, observerProps);\n }\n\n /** @protected */\n _createPropertyObserver(property, method) {\n const dynamicObservers = getOrCreateMap(this, '__dynamicPropertyObservers');\n dynamicObservers.set(method, property);\n }\n\n /** @private */\n __runComplexObservers(props, observers) {\n observers.forEach((observerProps, method) => {\n if (observerProps.some((prop) => props.has(prop))) {\n if (!this[method]) {\n console.warn(`observer method ${method} not defined`);\n } else {\n this[method](...observerProps.map((prop) => this[prop]));\n }\n }\n });\n }\n\n /** @private */\n __runDynamicObservers(props, observers) {\n observers.forEach((prop, method) => {\n if (props.has(prop) && this[method]) {\n this[method](this[prop], props.get(prop));\n }\n });\n }\n\n /** @private */\n __runObservers(props, observers) {\n props.forEach((v, k) => {\n const observer = observers.get(k);\n if (observer !== undefined && this[observer]) {\n this[observer](this[k], v);\n }\n });\n }\n\n /** @private */\n __runNotifyProps(props, notifyProps) {\n props.forEach((_, k) => {\n if (notifyProps.has(k)) {\n this.dispatchEvent(\n new CustomEvent(`${camelToDash(k)}-changed`, {\n detail: {\n value: this[k],\n },\n }),\n );\n }\n });\n }\n\n /** @protected */\n _get(path, object) {\n return get(path, object);\n }\n\n /** @protected */\n _set(path, value, object) {\n set(path, value, object);\n }\n }\n\n return PolylitMixinClass;\n};\n\nexport const PolylitMixin = dedupeMixin(PolylitMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2023 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Convenience method for reading a value from a path.\n *\n * @param {string} path\n * @param {object} object\n */\nexport function get(path, object) {\n return path.split('.').reduce((obj, property) => (obj ? obj[property] : undefined), object);\n}\n\n/**\n * Convenience method for setting a value to a path.\n *\n * @param {string} path\n * @param {unknown} value\n * @param {object} object\n */\nexport function set(path, value, object) {\n const pathParts = path.split('.');\n const lastPart = pathParts.pop();\n const target = pathParts.reduce((target, part) => target[part], object);\n target[lastPart] = value;\n}\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @fileoverview\n *\n * This module provides a number of strategies for enqueuing asynchronous\n * tasks. Each sub-module provides a standard `run(fn)` interface that returns a\n * handle, and a `cancel(handle)` interface for canceling async tasks before\n * they run.\n *\n * @summary Module that provides a number of strategies for enqueuing\n * asynchronous tasks.\n */\n\nlet microtaskCurrHandle = 0;\nlet microtaskLastHandle = 0;\nconst microtaskCallbacks = [];\nlet microtaskScheduled = false;\n\nfunction microtaskFlush() {\n microtaskScheduled = false;\n const len = microtaskCallbacks.length;\n for (let i = 0; i < len; i++) {\n const cb = microtaskCallbacks[i];\n if (cb) {\n try {\n cb();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n }\n }\n microtaskCallbacks.splice(0, len);\n microtaskLastHandle += len;\n}\n\n/**\n * Async interface wrapper around `setTimeout`.\n *\n * @namespace\n * @summary Async interface wrapper around `setTimeout`.\n */\nconst timeOut = {\n /**\n * Returns a sub-module with the async interface providing the provided\n * delay.\n *\n * @memberof timeOut\n * @param {number=} delay Time to wait before calling callbacks in ms\n * @return {!AsyncInterface} An async timeout interface\n */\n after(delay) {\n return {\n run(fn) {\n return window.setTimeout(fn, delay);\n },\n cancel(handle) {\n window.clearTimeout(handle);\n },\n };\n },\n /**\n * Enqueues a function called in the next task.\n *\n * @memberof timeOut\n * @param {!Function} fn Callback to run\n * @param {number=} delay Delay in milliseconds\n * @return {number} Handle used for canceling task\n */\n run(fn, delay) {\n return window.setTimeout(fn, delay);\n },\n /**\n * Cancels a previously enqueued `timeOut` callback.\n *\n * @memberof timeOut\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.clearTimeout(handle);\n },\n};\nexport { timeOut };\n\n/**\n * Async interface wrapper around `requestAnimationFrame`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestAnimationFrame`.\n */\nconst animationFrame = {\n /**\n * Enqueues a function called at `requestAnimationFrame` timing.\n *\n * @memberof animationFrame\n * @param {function(number):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestAnimationFrame(fn);\n },\n /**\n * Cancels a previously enqueued `animationFrame` callback.\n *\n * @memberof animationFrame\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelAnimationFrame(handle);\n },\n};\nexport { animationFrame };\n\n/**\n * Async interface wrapper around `requestIdleCallback`. Falls back to\n * `setTimeout` on browsers that do not support `requestIdleCallback`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestIdleCallback`.\n */\nconst idlePeriod = {\n /**\n * Enqueues a function called at `requestIdleCallback` timing.\n *\n * @memberof idlePeriod\n * @param {function(!IdleDeadline):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestIdleCallback ? window.requestIdleCallback(fn) : window.setTimeout(fn, 16);\n },\n /**\n * Cancels a previously enqueued `idlePeriod` callback.\n *\n * @memberof idlePeriod\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n if (window.cancelIdleCallback) {\n window.cancelIdleCallback(handle);\n } else {\n window.clearTimeout(handle);\n }\n },\n};\nexport { idlePeriod };\n\n/**\n * Async interface for enqueuing callbacks that run at microtask timing.\n *\n * @namespace\n * @summary Async interface for enqueuing callbacks that run at microtask\n * timing.\n */\nconst microTask = {\n /**\n * Enqueues a function called at microtask timing.\n *\n * @memberof microTask\n * @param {!Function=} callback Callback to run\n * @return {number} Handle used for canceling task\n */\n run(callback) {\n if (!microtaskScheduled) {\n microtaskScheduled = true;\n queueMicrotask(() => microtaskFlush());\n }\n microtaskCallbacks.push(callback);\n const result = microtaskCurrHandle;\n microtaskCurrHandle += 1;\n return result;\n },\n\n /**\n * Cancels a previously enqueued `microTask` callback.\n *\n * @memberof microTask\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n const idx = handle - microtaskLastHandle;\n if (idx >= 0) {\n if (!microtaskCallbacks[idx]) {\n throw new Error(`invalid async handle: ${handle}`);\n }\n microtaskCallbacks[idx] = null;\n }\n },\n};\nexport { microTask };\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/* eslint-disable @typescript-eslint/no-use-before-define */\n\n/**\n * @fileoverview\n *\n * Module for adding listeners to a node for the following normalized\n * cross-platform \"gesture\" events:\n * - `down` - mouse or touch went down\n * - `up` - mouse or touch went up\n * - `tap` - mouse click or finger tap\n * - `track` - mouse drag or touch move\n *\n * @summary Module for adding cross-platform gesture event listeners.\n */\n\nimport { microTask } from './async.js';\n\nconst passiveTouchGestures = false;\nconst wrap = (node) => node;\n\n// Detect native touch action support\nconst HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string';\nconst GESTURE_KEY = '__polymerGestures';\nconst HANDLED_OBJ = '__polymerGesturesHandled';\nconst TOUCH_ACTION = '__polymerGesturesTouchAction';\n// Radius for tap and track\nconst TAP_DISTANCE = 25;\nconst TRACK_DISTANCE = 5;\n// Number of last N track positions to keep\nconst TRACK_LENGTH = 2;\n\nconst MOUSE_EVENTS = ['mousedown', 'mousemove', 'mouseup', 'click'];\n// An array of bitmask values for mapping MouseEvent.which to MouseEvent.buttons\nconst MOUSE_WHICH_TO_BUTTONS = [0, 1, 4, 2];\nconst MOUSE_HAS_BUTTONS = (function () {\n try {\n return new MouseEvent('test', { buttons: 1 }).buttons === 1;\n } catch (_) {\n return false;\n }\n})();\n\n/**\n * @param {string} name Possible mouse event name\n * @return {boolean} true if mouse event, false if not\n */\nfunction isMouseEvent(name) {\n return MOUSE_EVENTS.indexOf(name) > -1;\n}\n\n// check for passive event listeners\nlet supportsPassive = false;\n(function () {\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line getter-return\n get() {\n supportsPassive = true;\n },\n });\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (_) {}\n})();\n\n/**\n * Generate settings for event listeners, dependant on `passiveTouchGestures`\n *\n * @param {string} eventName Event name to determine if `{passive}` option is\n * needed\n * @return {{passive: boolean} | undefined} Options to use for addEventListener\n * and removeEventListener\n */\nfunction PASSIVE_TOUCH(eventName) {\n if (isMouseEvent(eventName) || eventName === 'touchend') {\n return;\n }\n if (HAS_NATIVE_TA && supportsPassive && passiveTouchGestures) {\n return { passive: true };\n }\n}\n\n// Check for touch-only devices\nconst IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u);\n\n// Defined at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute\n/** @type {!Object<boolean>} */\nconst canBeDisabled = {\n button: true,\n command: true,\n fieldset: true,\n input: true,\n keygen: true,\n optgroup: true,\n option: true,\n select: true,\n textarea: true,\n};\n\n/**\n * @param {MouseEvent} ev event to test for left mouse button down\n * @return {boolean} has left mouse button down\n */\nfunction hasLeftMouseButton(ev) {\n const type = ev.type;\n // Exit early if the event is not a mouse event\n if (!isMouseEvent(type)) {\n return false;\n }\n // Ev.button is not reliable for mousemove (0 is overloaded as both left button and no buttons)\n // instead we use ev.buttons (bitmask of buttons) or fall back to ev.which (deprecated, 0 for no buttons, 1 for left button)\n if (type === 'mousemove') {\n // Allow undefined for testing events\n let buttons = ev.buttons ?? 1;\n if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) {\n buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0;\n }\n // Buttons is a bitmask, check that the left button bit is set (1)\n return Boolean(buttons & 1);\n }\n // Allow undefined for testing events\n const button = ev.button ?? 0;\n // Ev.button is 0 in mousedown/mouseup/click for left button activation\n return button === 0;\n}\n\nfunction isSyntheticClick(ev) {\n if (ev.type === 'click') {\n // Ev.detail is 0 for HTMLElement.click in most browsers\n if (ev.detail === 0) {\n return true;\n }\n // In the worst case, check that the x/y position of the click is within\n // the bounding box of the target of the event\n // Thanks IE 10 >:(\n const t = _findOriginalTarget(ev);\n // Make sure the target of the event is an element so we can use getBoundingClientRect,\n // if not, just assume it is a synthetic click\n if (!t.nodeType || /** @type {Element} */ (t).nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n const bcr = /** @type {Element} */ (t).getBoundingClientRect();\n // Use page x/y to account for scrolling\n const x = ev.pageX,\n y = ev.pageY;\n // Ev is a synthetic click if the position is outside the bounding box of the target\n return !(x >= bcr.left && x <= bcr.right && y >= bcr.top && y <= bcr.bottom);\n }\n return false;\n}\n\nconst POINTERSTATE = {\n mouse: {\n target: null,\n mouseIgnoreJob: null,\n },\n touch: {\n x: 0,\n y: 0,\n id: -1,\n scrollDecided: false,\n },\n};\n\nfunction firstTouchAction(ev) {\n let ta = 'auto';\n const path = getComposedPath(ev);\n for (let i = 0, n; i < path.length; i++) {\n n = path[i];\n if (n[TOUCH_ACTION]) {\n ta = n[TOUCH_ACTION];\n break;\n }\n }\n return ta;\n}\n\nfunction trackDocument(stateObj, movefn, upfn) {\n stateObj.movefn = movefn;\n stateObj.upfn = upfn;\n document.addEventListener('mousemove', movefn);\n document.addEventListener('mouseup', upfn);\n}\n\nfunction untrackDocument(stateObj) {\n document.removeEventListener('mousemove', stateObj.movefn);\n document.removeEventListener('mouseup', stateObj.upfn);\n stateObj.movefn = null;\n stateObj.upfn = null;\n}\n\n/**\n * Returns the composedPath for the given event.\n * @param {Event} event to process\n * @return {!Array<!EventTarget>} Path of the event\n */\nconst getComposedPath =\n window.ShadyDOM && window.ShadyDOM.noPatch\n ? window.ShadyDOM.composedPath\n : (event) => (event.composedPath && event.composedPath()) || [];\n\n/** @type {!Object<string, !GestureRecognizer>} */\nexport const gestures = {};\n\n/** @type {!Array<!GestureRecognizer>} */\nexport const recognizers = [];\n\n/**\n * Finds the element rendered on the screen at the provided coordinates.\n *\n * Similar to `document.elementFromPoint`, but pierces through\n * shadow roots.\n *\n * @param {number} x Horizontal pixel coordinate\n * @param {number} y Vertical pixel coordinate\n * @return {Element} Returns the deepest shadowRoot inclusive element\n * found at the screen position given.\n */\nexport function deepTargetFind(x, y) {\n let node = document.elementFromPoint(x, y);\n let next = node;\n // This code path is only taken when native ShadowDOM is used\n // if there is a shadowroot, it may have a node at x/y\n // if there is not a shadowroot, exit the loop\n while (next?.shadowRoot && !window.ShadyDOM) {\n // If there is a node at x/y in the shadowroot, look deeper\n const oldNext = next;\n next = next.shadowRoot.elementFromPoint(x, y);\n // On Safari, elementFromPoint may return the shadowRoot host\n if (oldNext === next) {\n break;\n }\n if (next) {\n node = next;\n }\n }\n return node;\n}\n\n/**\n * A cheaper check than ev.composedPath()[0];\n *\n * @private\n * @param {Event|Touch} ev Event.\n * @return {EventTarget} Returns the event target.\n */\nfunction _findOriginalTarget(ev) {\n const path = getComposedPath(/** @type {?Event} */ (ev));\n // It shouldn't be, but sometimes path is empty (window on Safari).\n return path.length > 0 ? path[0] : ev.target;\n}\n\n/**\n * @private\n * @param {Event} ev Event.\n * @return {void}\n */\nfunction _handleNative(ev) {\n const type = ev.type;\n const node = ev.currentTarget;\n const gobj = node[GESTURE_KEY];\n if (!gobj) {\n return;\n }\n const gs = gobj[type];\n if (!gs) {\n return;\n }\n if (!ev[HANDLED_OBJ]) {\n ev[HANDLED_OBJ] = {};\n if (type.startsWith('touch')) {\n const t = ev.changedTouches[0];\n if (type === 'touchstart') {\n // Only handle the first finger\n if (ev.touches.length === 1) {\n POINTERSTATE.touch.id = t.identifier;\n }\n }\n if (POINTERSTATE.touch.id !== t.identifier) {\n return;\n }\n if (!HAS_NATIVE_TA) {\n if (type === 'touchstart' || type === 'touchmove') {\n _handleTouchAction(ev);\n }\n }\n }\n }\n const handled = ev[HANDLED_OBJ];\n // Used to ignore synthetic mouse events\n if (handled.skip) {\n return;\n }\n // Reset recognizer state\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n if (gs[r.name] && !handled[r.name]) {\n if (r.flow && r.flow.start.indexOf(ev.type) > -1 && r.reset) {\n r.reset();\n }\n }\n }\n // Enforce gesture recognizer order\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n if (gs[r.name] && !handled[r.name]) {\n handled[r.name] = true;\n r[type](ev);\n }\n }\n}\n\n/**\n * @private\n * @param {TouchEvent} ev Event.\n * @return {void}\n */\nfunction _handleTouchAction(ev) {\n const t = ev.changedTouches[0];\n const type = ev.type;\n if (type === 'touchstart') {\n POINTERSTATE.touch.x = t.clientX;\n POINTERSTATE.touch.y = t.clientY;\n POINTERSTATE.touch.scrollDecided = false;\n } else if (type === 'touchmove') {\n if (POINTERSTATE.touch.scrollDecided) {\n return;\n }\n POINTERSTATE.touch.scrollDecided = true;\n const ta = firstTouchAction(ev);\n let shouldPrevent = false;\n const dx = Math.abs(POINTERSTATE.touch.x - t.clientX);\n const dy = Math.abs(POINTERSTATE.touch.y - t.clientY);\n if (!ev.cancelable) {\n // Scrolling is happening\n } else if (ta === 'none') {\n shouldPrevent = true;\n } else if (ta === 'pan-x') {\n shouldPrevent = dy > dx;\n } else if (ta === 'pan-y') {\n shouldPrevent = dx > dy;\n }\n if (shouldPrevent) {\n ev.preventDefault();\n } else {\n prevent('track');\n }\n }\n}\n\n/**\n * Adds an event listener to a node for the given gesture type.\n *\n * @param {!EventTarget} node Node to add listener on\n * @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`\n * @param {!function(!Event):void} handler Event listener function to call\n * @return {boolean} Returns true if a gesture event listener was added.\n */\nexport function addListener(node, evType, handler) {\n if (gestures[evType]) {\n _add(node, evType, handler);\n return true;\n }\n return false;\n}\n\n/**\n * Removes an event listener from a node for the given gesture type.\n *\n * @param {!EventTarget} node Node to remove listener from\n * @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`\n * @param {!function(!Event):void} handler Event listener function previously passed to\n * `addListener`.\n * @return {boolean} Returns true if a gesture event listener was removed.\n */\nexport function removeListener(node, evType, handler) {\n if (gestures[evType]) {\n _remove(node, evType, handler);\n return true;\n }\n return false;\n}\n\n/**\n * Automate the event listeners for the native events\n *\n * @private\n * @param {!EventTarget} node Node on which to add the event.\n * @param {string} evType Event type to add.\n * @param {function(!Event)} handler Event handler function.\n * @return {void}\n */\nfunction _add(node, evType, handler) {\n const recognizer = gestures[evType];\n const deps = recognizer.deps;\n const name = recognizer.name;\n let gobj = node[GESTURE_KEY];\n if (!gobj) {\n node[GESTURE_KEY] = gobj = {};\n }\n for (let i = 0, dep, gd; i < deps.length; i++) {\n dep = deps[i];\n // Don't add mouse handlers on iOS because they cause gray selection overlays\n if (IS_TOUCH_ONLY && isMouseEvent(dep) && dep !== 'click') {\n continue;\n }\n gd = gobj[dep];\n if (!gd) {\n gobj[dep] = gd = { _count: 0 };\n }\n if (gd._count === 0) {\n node.addEventListener(dep, _handleNative, PASSIVE_TOUCH(dep));\n }\n gd[name] = (gd[name] || 0) + 1;\n gd._count = (gd._count || 0) + 1;\n }\n node.addEventListener(evType, handler);\n if (recognizer.touchAction) {\n setTouchAction(node, recognizer.touchAction);\n }\n}\n\n/**\n * Automate event listener removal for native events\n *\n * @private\n * @param {!EventTarget} node Node on which to remove the event.\n * @param {string} evType Event type to remove.\n * @param {function(!Event): void} handler Event handler function.\n * @return {void}\n */\nfunction _remove(node, evType, handler) {\n const recognizer = gestures[evType];\n const deps = recognizer.deps;\n const name = recognizer.name;\n const gobj = node[GESTURE_KEY];\n if (gobj) {\n for (let i = 0, dep, gd; i < deps.length; i++) {\n dep = deps[i];\n gd = gobj[dep];\n if (gd?.[name]) {\n gd[name] = (gd[name] || 1) - 1;\n gd._count = (gd._count || 1) - 1;\n if (gd._count === 0) {\n node.removeEventListener(dep, _handleNative, PASSIVE_TOUCH(dep));\n }\n }\n }\n }\n node.removeEventListener(evType, handler);\n}\n\n/**\n * Registers a new gesture event recognizer for adding new custom\n * gesture event types.\n *\n * @param {!GestureRecognizer} recog Gesture recognizer descriptor\n * @return {void}\n */\nexport function register(recog) {\n recognizers.push(recog);\n recog.emits.forEach((emit) => {\n gestures[emit] = recog;\n });\n}\n\n/**\n * @private\n * @param {string} evName Event name.\n * @return {Object} Returns the gesture for the given event name.\n */\nfunction _findRecognizerByEvent(evName) {\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n for (let j = 0, n; j < r.emits.length; j++) {\n n = r.emits[j];\n if (n === evName) {\n return r;\n }\n }\n }\n return null;\n}\n\n/**\n * Sets scrolling direction on node.\n *\n * This value is checked on first move, thus it should be called prior to\n * adding event listeners.\n *\n * @param {!EventTarget} node Node to set touch action setting on\n * @param {string} value Touch action value\n * @return {void}\n */\nexport function setTouchAction(node, value) {\n if (HAS_NATIVE_TA && node instanceof HTMLElement) {\n // NOTE: add touchAction async so that events can be added in\n // custom element constructors. Otherwise we run afoul of custom\n // elements restriction against settings attributes (style) in the\n // constructor.\n microTask.run(() => {\n node.style.touchAction = value;\n });\n }\n node[TOUCH_ACTION] = value;\n}\n\n/**\n * Dispatches an event on the `target` element of `type` with the given\n * `detail`.\n * @private\n * @param {!EventTarget} target The element on which to fire an event.\n * @param {string} type The type of event to fire.\n * @param {!Object=} detail The detail object to populate on the event.\n * @return {void}\n */\nfunction _fire(target, type, detail) {\n const ev = new Event(type, { bubbles: true, cancelable: true, composed: true });\n ev.detail = detail;\n wrap(/** @type {!Node} */ (target)).dispatchEvent(ev);\n // Forward `preventDefault` in a clean way\n if (ev.defaultPrevented) {\n const preventer = detail.preventer || detail.sourceEvent;\n if (preventer?.preventDefault) {\n preventer.preventDefault();\n }\n }\n}\n\n/**\n * Prevents the dispatch and default action of the given event name.\n *\n * @param {string} evName Event name.\n * @return {void}\n */\nexport function prevent(evName) {\n const recognizer = _findRecognizerByEvent(evName);\n if (recognizer.info) {\n recognizer.info.prevent = true;\n }\n}\n\nregister({\n name: 'downup',\n deps: ['mousedown', 'touchstart', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['mouseup', 'touchend'],\n },\n emits: ['down', 'up'],\n\n info: {\n movefn: null,\n upfn: null,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n untrackDocument(this.info);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (!hasLeftMouseButton(e)) {\n return;\n }\n const t = _findOriginalTarget(e);\n const self = this;\n const movefn = (e) => {\n if (!hasLeftMouseButton(e)) {\n downupFire('up', t, e);\n untrackDocument(self.info);\n }\n };\n const upfn = (e) => {\n if (hasLeftMouseButton(e)) {\n downupFire('up', t, e);\n }\n untrackDocument(self.info);\n };\n trackDocument(this.info, movefn, upfn);\n downupFire('down', t, e);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n downupFire('down', _findOriginalTarget(e), e.changedTouches[0], e);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n downupFire('up', _findOriginalTarget(e), e.changedTouches[0], e);\n },\n});\n\n/**\n * @param {string} type\n * @param {EventTarget} target\n * @param {Event|Touch} event\n * @param {Event=} preventer\n * @return {void}\n */\nfunction downupFire(type, target, event, preventer) {\n if (!target) {\n return;\n }\n _fire(target, type, {\n x: event.clientX,\n y: event.clientY,\n sourceEvent: event,\n preventer,\n prevent(e) {\n return prevent(e);\n },\n });\n}\n\nregister({\n name: 'track',\n touchAction: 'none',\n deps: ['mousedown', 'touchstart', 'touchmove', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['mouseup', 'touchend'],\n },\n emits: ['track'],\n\n info: {\n x: 0,\n y: 0,\n state: 'start',\n started: false,\n moves: [],\n /** @this {GestureInfo} */\n addMove(move) {\n if (this.moves.length > TRACK_LENGTH) {\n this.moves.shift();\n }\n this.moves.push(move);\n },\n movefn: null,\n upfn: null,\n prevent: false,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n this.info.state = 'start';\n this.info.started = false;\n this.info.moves = [];\n this.info.x = 0;\n this.info.y = 0;\n this.info.prevent = false;\n untrackDocument(this.info);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (!hasLeftMouseButton(e)) {\n return;\n }\n const t = _findOriginalTarget(e);\n const self = this;\n const movefn = (e) => {\n const x = e.clientX,\n y = e.clientY;\n if (trackHasMovedEnough(self.info, x, y)) {\n // First move is 'start', subsequent moves are 'move', mouseup is 'end'\n self.info.state = self.info.started ? (e.type === 'mouseup' ? 'end' : 'track') : 'start';\n if (self.info.state === 'start') {\n // If and only if tracking, always prevent tap\n prevent('tap');\n }\n self.info.addMove({ x, y });\n if (!hasLeftMouseButton(e)) {\n // Always fire \"end\"\n self.info.state = 'end';\n untrackDocument(self.info);\n }\n if (t) {\n trackFire(self.info, t, e);\n }\n self.info.started = true;\n }\n };\n const upfn = (e) => {\n if (self.info.started) {\n movefn(e);\n }\n\n // Remove the temporary listeners\n untrackDocument(self.info);\n };\n // Add temporary document listeners as mouse retargets\n trackDocument(this.info, movefn, upfn);\n this.info.x = e.clientX;\n this.info.y = e.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n const ct = e.changedTouches[0];\n this.info.x = ct.clientX;\n this.info.y = ct.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchmove(e) {\n const t = _findOriginalTarget(e);\n const ct = e.changedTouches[0];\n const x = ct.clientX,\n y = ct.clientY;\n if (trackHasMovedEnough(this.info, x, y)) {\n if (this.info.state === 'start') {\n // If and only if tracking, always prevent tap\n prevent('tap');\n }\n this.info.addMove({ x, y });\n trackFire(this.info, t, ct);\n this.info.state = 'track';\n this.info.started = true;\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n const t = _findOriginalTarget(e);\n const ct = e.changedTouches[0];\n // Only trackend if track was started and not aborted\n if (this.info.started) {\n // Reset started state on up\n this.info.state = 'end';\n this.info.addMove({ x: ct.clientX, y: ct.clientY });\n trackFire(this.info, t, ct);\n }\n },\n});\n\n/**\n * @param {!GestureInfo} info\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nfunction trackHasMovedEnough(info, x, y) {\n if (info.prevent) {\n return false;\n }\n if (info.started) {\n return true;\n }\n const dx = Math.abs(info.x - x);\n const dy = Math.abs(info.y - y);\n return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE;\n}\n\n/**\n * @param {!GestureInfo} info\n * @param {?EventTarget} target\n * @param {Touch} touch\n * @return {void}\n */\nfunction trackFire(info, target, touch) {\n if (!target) {\n return;\n }\n const secondlast = info.moves[info.moves.length - 2];\n const lastmove = info.moves[info.moves.length - 1];\n const dx = lastmove.x - info.x;\n const dy = lastmove.y - info.y;\n let ddx,\n ddy = 0;\n if (secondlast) {\n ddx = lastmove.x - secondlast.x;\n ddy = lastmove.y - secondlast.y;\n }\n _fire(target, 'track', {\n state: info.state,\n x: touch.clientX,\n y: touch.clientY,\n dx,\n dy,\n ddx,\n ddy,\n sourceEvent: touch,\n hover() {\n return deepTargetFind(touch.clientX, touch.clientY);\n },\n });\n}\n\nregister({\n name: 'tap',\n deps: ['mousedown', 'click', 'touchstart', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['click', 'touchend'],\n },\n emits: ['tap'],\n info: {\n x: NaN,\n y: NaN,\n prevent: false,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n this.info.x = NaN;\n this.info.y = NaN;\n this.info.prevent = false;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (hasLeftMouseButton(e)) {\n this.info.x = e.clientX;\n this.info.y = e.clientY;\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n click(e) {\n if (hasLeftMouseButton(e)) {\n trackForward(this.info, e);\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n const touch = e.changedTouches[0];\n this.info.x = touch.clientX;\n this.info.y = touch.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n trackForward(this.info, e.changedTouches[0], e);\n },\n});\n\n/**\n * @param {!GestureInfo} info\n * @param {Event | Touch} e\n * @param {Event=} preventer\n * @return {void}\n */\nfunction trackForward(info, e, preventer) {\n const dx = Math.abs(e.clientX - info.x);\n const dy = Math.abs(e.clientY - info.y);\n // Find original target from `preventer` for TouchEvents, or `e` for MouseEvents\n const t = _findOriginalTarget(preventer || e);\n if (!t || (canBeDisabled[/** @type {!HTMLElement} */ (t).localName] && t.hasAttribute('disabled'))) {\n return;\n }\n // Dx,dy can be NaN if `click` has been simulated and there was no `down` for `start`\n if (isNaN(dx) || isNaN(dy) || (dx <= TAP_DISTANCE && dy <= TAP_DISTANCE) || isSyntheticClick(e)) {\n // Prevent taps from being generated if an event has canceled them\n if (!info.prevent) {\n _fire(t, 'tap', {\n x: e.clientX,\n y: e.clientY,\n sourceEvent: e,\n preventer,\n });\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\n/**\n * A mixin to provide disabled property for field components.\n */\nconst DisabledMixinImplementation = (superclass) => {\n return class DisabledMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * If true, the user cannot interact with this element.\n */\n disabled: {\n type: Boolean,\n value: false,\n observer: '_disabledChanged',\n reflectToAttribute: true,\n sync: true,\n },\n };\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _disabledChanged(disabled) {\n this._setAriaDisabled(disabled);\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _setAriaDisabled(disabled) {\n if (disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Overrides the default element `click` method in order to prevent\n * firing the `click` event when the element is disabled.\n * @protected\n * @override\n */\n click() {\n if (!this.disabled) {\n super.click();\n }\n }\n };\n};\n\nexport const DisabledMixin = dedupeMixin(DisabledMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\n/**\n * A mixin that manages keyboard handling.\n * The mixin subscribes to the keyboard events while an actual implementation\n * for the event handlers is left to the client (a component or another mixin).\n */\nconst KeyboardMixinImplementation = (superclass) => {\n return class KeyboardMixinClass extends superclass {\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('keydown', (event) => {\n this._onKeyDown(event);\n });\n\n this.addEventListener('keyup', (event) => {\n this._onKeyUp(event);\n });\n }\n\n /**\n * A handler for the `keydown` event. By default, it calls\n * separate methods for handling \"Enter\" and \"Escape\" keys.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} event\n * @protected\n */\n _onKeyDown(event) {\n switch (event.key) {\n case 'Enter':\n this._onEnter(event);\n break;\n case 'Escape':\n this._onEscape(event);\n break;\n default:\n break;\n }\n }\n\n /**\n * A handler for the `keyup` event. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onKeyUp(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Enter\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEnter(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Escape\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEscape(_event) {\n // To be implemented.\n }\n };\n};\n\nexport const KeyboardMixin = dedupeMixin(KeyboardMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { addListener } from '@vaadin/component-base/src/gestures.js';\nimport { DisabledMixin } from './disabled-mixin.js';\nimport { KeyboardMixin } from './keyboard-mixin.js';\n\n/**\n * A mixin to toggle the `active` attribute.\n *\n * The attribute is set whenever the user activates the element by a pointer\n * or presses an activation key on the element from the keyboard.\n *\n * The attribute is removed as soon as the element is deactivated\n * by the pointer or by releasing the activation key.\n */\nexport const ActiveMixin = (superclass) =>\n class ActiveMixinClass extends DisabledMixin(KeyboardMixin(superclass)) {\n /**\n * An array of activation keys.\n *\n * See possible values here:\n * https://developer.mozilla.org/ru/docs/Web/API/KeyboardEvent/key/Key_Values\n *\n * @protected\n * @return {!Array<!string>}\n */\n get _activeKeys() {\n return [' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n addListener(this, 'down', (event) => {\n if (this._shouldSetActive(event)) {\n this._setActive(true);\n }\n });\n\n addListener(this, 'up', () => {\n this._setActive(false);\n });\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // When the element is disconnecting from the DOM at the moment being active,\n // the `active` attribute needs to be manually removed from the element.\n // Otherwise, it will preserve on the element until the element is activated once again.\n // The case reproduces for `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n this._setActive(false);\n }\n\n /**\n * @param {KeyboardEvent | MouseEvent} _event\n * @protected\n */\n _shouldSetActive(_event) {\n return !this.disabled;\n }\n\n /**\n * Sets the `active` attribute on the element if an activation key is pressed.\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (this._shouldSetActive(event) && this._activeKeys.includes(event.key)) {\n this._setActive(true);\n\n // Element can become hidden before the `keyup` event, e.g. on button click.\n // Use document listener to ensure `active` attribute is removed correctly.\n document.addEventListener(\n 'keyup',\n (e) => {\n if (this._activeKeys.includes(e.key)) {\n this._setActive(false);\n }\n },\n { once: true },\n );\n }\n }\n\n /**\n * Toggles the `active` attribute on the element.\n *\n * @param {boolean} active\n * @protected\n */\n _setActive(active) {\n this.toggleAttribute('active', active);\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n// We consider the keyboard to be active if the window has received a keydown\n// event since the last mousedown event.\nlet keyboardActive = false;\n\n// Listen for top-level keydown and mousedown events.\n// Use capture phase so we detect events even if they're handled.\nwindow.addEventListener(\n 'keydown',\n () => {\n keyboardActive = true;\n },\n { capture: true },\n);\n\nwindow.addEventListener(\n 'mousedown',\n () => {\n keyboardActive = false;\n },\n { capture: true },\n);\n\n/**\n * Returns the actually focused element by traversing shadow\n * trees recursively to ensure it's the leaf element.\n *\n * @return {Element}\n */\nexport function getDeepActiveElement() {\n let host = document.activeElement || document.body;\n while (host.shadowRoot && host.shadowRoot.activeElement) {\n host = host.shadowRoot.activeElement;\n }\n return host;\n}\n\n/**\n * Returns true if the window has received a keydown\n * event since the last mousedown event.\n *\n * @return {boolean}\n */\nexport function isKeyboardActive() {\n return keyboardActive;\n}\n\n/**\n * Returns true if the element is hidden directly with `display: none` or `visibility: hidden`,\n * false otherwise.\n *\n * The method doesn't traverse the element's ancestors, it only checks for the CSS properties\n * set directly to or inherited by the element.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nfunction isElementHiddenDirectly(element) {\n // Check inline style first to save a re-flow.\n const style = element.style;\n if (style.visibility === 'hidden' || style.display === 'none') {\n return true;\n }\n\n const computedStyle = window.getComputedStyle(element);\n if (computedStyle.visibility === 'hidden' || computedStyle.display === 'none') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns if element `a` has lower tab order compared to element `b`\n * (both elements are assumed to be focusable and tabbable).\n * Elements with tabindex = 0 have lower tab order compared to elements\n * with tabindex > 0.\n * If both have same tabindex, it returns false.\n *\n * @param {HTMLElement} a\n * @param {HTMLElement} b\n * @return {boolean}\n */\nfunction hasLowerTabOrder(a, b) {\n // Normalize tabIndexes\n // e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`\n const ati = Math.max(a.tabIndex, 0);\n const bti = Math.max(b.tabIndex, 0);\n return ati === 0 || bti === 0 ? bti > ati : ati > bti;\n}\n\n/**\n * Merge sort iterator, merges the two arrays into one, sorted by tabindex.\n *\n * @param {HTMLElement[]} left\n * @param {HTMLElement[]} right\n * @return {HTMLElement[]}\n */\nfunction mergeSortByTabIndex(left, right) {\n const result = [];\n while (left.length > 0 && right.length > 0) {\n if (hasLowerTabOrder(left[0], right[0])) {\n result.push(right.shift());\n } else {\n result.push(left.shift());\n }\n }\n\n return result.concat(left, right);\n}\n\n/**\n * Sorts an array of elements by tabindex. Returns a new array.\n *\n * @param {HTMLElement[]} elements\n * @return {HTMLElement[]}\n */\nfunction sortElementsByTabIndex(elements) {\n // Implement a merge sort as Array.prototype.sort does a non-stable sort\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\n const len = elements.length;\n if (len < 2) {\n return elements;\n }\n const pivot = Math.ceil(len / 2);\n const left = sortElementsByTabIndex(elements.slice(0, pivot));\n const right = sortElementsByTabIndex(elements.slice(pivot));\n\n return mergeSortByTabIndex(left, right);\n}\n\n/**\n * Returns true if the element is hidden, false otherwise.\n *\n * An element is treated as hidden when any of the following conditions are met:\n * - the element itself or one of its ancestors has `display: none`.\n * - the element has or inherits `visibility: hidden`.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementHidden(element) {\n if (element.checkVisibility) {\n return !element.checkVisibility({ visibilityProperty: true });\n }\n\n // TODO: checkVisibility is supported only from Safari 17.4, so we still need to\n // keep the custom implementation as a fallback for older versions until Vaadin 25:\n\n // `offsetParent` is `null` when the element itself\n // or one of its ancestors is hidden with `display: none`.\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n // However `offsetParent` is also null when the element is using fixed\n // positioning, so additionally check if the element takes up layout space.\n if (element.offsetParent === null && element.clientWidth === 0 && element.clientHeight === 0) {\n return true;\n }\n\n return isElementHiddenDirectly(element);\n}\n\n/**\n * Returns true if the element is focusable, otherwise false.\n *\n * The list of focusable elements is taken from http://stackoverflow.com/a/1600194/4228703.\n * However, there isn't a definite list, it's up to the browser.\n * The only standard we have is DOM Level 2 HTML https://www.w3.org/TR/DOM-Level-2-HTML/html.html,\n * according to which the only elements that have a `focus()` method are:\n * - HTMLInputElement\n * - HTMLSelectElement\n * - HTMLTextAreaElement\n * - HTMLAnchorElement\n *\n * This notably omits HTMLButtonElement and HTMLAreaElement.\n * Referring to these tests with tabbables in different browsers\n * http://allyjs.io/data-tables/focusable.html\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementFocusable(element) {\n // The element cannot be focused if its `tabindex` attribute is set to `-1`.\n if (element.matches('[tabindex=\"-1\"]')) {\n return false;\n }\n\n // Elements that cannot be focused if they have a `disabled` attribute.\n if (element.matches('input, select, textarea, button, object')) {\n return element.matches(':not([disabled])');\n }\n\n // Elements that can be focused even if they have a `disabled` attribute.\n return element.matches('a[href], area[href], iframe, [tabindex], [contentEditable]');\n}\n\n/**\n * Returns true if the element is focused, false otherwise.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementFocused(element) {\n return element.getRootNode().activeElement === element;\n}\n\n/**\n * Returns the normalized element tabindex. If not focusable, returns -1.\n * It checks for the attribute \"tabindex\" instead of the element property\n * `tabIndex` since browsers assign different values to it.\n * e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`\n *\n * @param {HTMLElement} element\n * @return {number}\n */\nfunction normalizeTabIndex(element) {\n if (!isElementFocusable(element)) {\n return -1;\n }\n\n const tabIndex = element.getAttribute('tabindex') || 0;\n return Number(tabIndex);\n}\n\n/**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n *\n * @param {Node} node The starting point for the search; added to `result` if tabbable.\n * @param {HTMLElement[]} result\n * @return {boolean}\n * @private\n */\nfunction collectFocusableNodes(node, result) {\n if (node.nodeType !== Node.ELEMENT_NODE || isElementHiddenDirectly(node)) {\n // Don't traverse children if the node is not an HTML element or not visible.\n return false;\n }\n\n const element = /** @type {HTMLElement} */ (node);\n const tabIndex = normalizeTabIndex(element);\n let needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n let children = [];\n if (element.localName === 'slot') {\n children = element.assignedNodes({ flatten: true });\n } else {\n // Use shadow root if possible, will check for distributed nodes.\n children = (element.shadowRoot || element).children;\n }\n [...children].forEach((child) => {\n // Ensure method is always invoked to collect focusable children.\n needsSort = collectFocusableNodes(child, result) || needsSort;\n });\n return needsSort;\n}\n\n/**\n * Returns a tab-ordered array of focusable elements for a root element.\n * The resulting array will include the root element if it is focusable.\n *\n * The method traverses nodes in shadow DOM trees too if any.\n *\n * @param {HTMLElement} element\n * @return {HTMLElement[]}\n */\nexport function getFocusableElements(element) {\n const focusableElements = [];\n const needsSortByTabIndex = collectFocusableNodes(element, focusableElements);\n // If there is at least one element with tabindex > 0,\n // we need to sort the final array by tabindex.\n if (needsSortByTabIndex) {\n return sortElementsByTabIndex(focusableElements);\n }\n return focusableElements;\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { isKeyboardActive } from './focus-utils.js';\n\n/**\n * A mixin to handle `focused` and `focus-ring` attributes based on focus.\n */\nconst FocusMixinImplementation = (superclass) => {\n return class FocusMixinClass extends superclass {\n /**\n * @protected\n * @return {boolean}\n */\n get _keyboardActive() {\n return isKeyboardActive();\n }\n\n /** @protected */\n ready() {\n this.addEventListener('focusin', (e) => {\n if (this._shouldSetFocus(e)) {\n this._setFocused(true);\n }\n });\n\n this.addEventListener('focusout', (e) => {\n if (this._shouldRemoveFocus(e)) {\n this._setFocused(false);\n }\n });\n\n // In super.ready() other 'focusin' and 'focusout' listeners might be\n // added, so we call it after our own ones to ensure they execute first.\n // Issue to watch out: when incorrect, <vaadin-combo-box> refocuses the\n // input field on iOS after \"Done\" is pressed.\n super.ready();\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // In non-Chrome browsers, blur does not fire on the element when it is disconnected.\n // reproducible in `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n if (this.hasAttribute('focused')) {\n this._setFocused(false);\n }\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n super.focus(options);\n\n // Set focus-ring attribute on programmatic focus by default\n // unless explicitly disabled by `{ focusVisible: false }`.\n if (options?.focusVisible !== false) {\n this.setAttribute('focus-ring', '');\n }\n }\n\n /**\n * Override to change how focused and focus-ring attributes are set.\n *\n * @param {boolean} focused\n * @protected\n */\n _setFocused(focused) {\n this.toggleAttribute('focused', focused);\n\n // Focus-ring is true when the element was focused from the keyboard.\n // Focus Ring [A11ycasts]: https://youtu.be/ilj2P5-5CjI\n this.toggleAttribute('focus-ring', focused && this._keyboardActive);\n }\n\n /**\n * Override to define if the field receives focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldSetFocus(_event) {\n return true;\n }\n\n /**\n * Override to define if the field loses focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(_event) {\n return true;\n }\n };\n};\n\nexport const FocusMixin = dedupeMixin(FocusMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\n\n/**\n * A mixin providing `focused`, `focus-ring`, `active`, `disabled` and `selected`.\n *\n * `focused`, `active` and `focus-ring` are set as only as attributes.\n */\nexport const ItemMixin = (superClass) =>\n class VaadinItemMixin extends ActiveMixin(FocusMixin(superClass)) {\n static get properties() {\n return {\n /**\n * Used for mixin detection because `instanceof` does not work with mixins.\n * e.g. in VaadinListMixin it filters items by using the\n * `element._hasVaadinItemMixin` condition.\n */\n _hasVaadinItemMixin: {\n value: true,\n },\n\n /**\n * If true, the item is in selected state.\n */\n selected: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_selectedChanged',\n sync: true,\n },\n\n /** @private */\n _value: String,\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the item is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-1/menubar-1.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /**\n * Submittable string value. The default value is the trimmed text content of the element.\n * @type {string}\n */\n get value() {\n return this._value ?? this.textContent.trim();\n }\n\n set value(value) {\n this._value = value;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n const attrValue = this.getAttribute('value');\n if (attrValue !== null) {\n this.value = attrValue;\n }\n\n if (this.__shouldAllowFocusWhenDisabled()) {\n this.style.setProperty('--_vaadin-item-disabled-pointer-events', 'auto');\n }\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n if (this.disabled && !this.__shouldAllowFocusWhenDisabled()) {\n return;\n }\n\n super.focus(options);\n }\n\n /**\n * @param {KeyboardEvent | MouseEvent} event\n * @protected\n * @override\n */\n _shouldSetActive(event) {\n return !this.disabled && !(event.type === 'keydown' && event.defaultPrevented);\n }\n\n /** @private */\n _selectedChanged(selected) {\n this.setAttribute('aria-selected', selected);\n }\n\n /**\n * Override an observer from `DisabledMixin`.\n * @protected\n * @override\n */\n _disabledChanged(disabled) {\n super._disabledChanged(disabled);\n\n if (disabled) {\n this.selected = false;\n if (!this.__shouldAllowFocusWhenDisabled()) {\n this.blur();\n }\n }\n }\n\n /**\n * In order to be fully accessible from the keyboard, the item should\n * manually fire the `click` event once an activation key is pressed.\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (this._activeKeys.includes(event.key) && !event.defaultPrevented) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n\n /**\n * Returns whether the component should be focusable when disabled.\n * Returns false by default.\n *\n * @private\n * @return {boolean}\n */\n __shouldAllowFocusWhenDisabled() {\n return false;\n }\n };\n","/**\n * @license\n * Copyright (c) 2025 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Registers a CSS custom property, tolerating the case where the property has\n * already been registered. This can happen when a module is evaluated more than\n * once (e.g. duplicate bundle chunks or two copies of the library on the page),\n * in which case `CSS.registerProperty` throws `InvalidModificationError`. That\n * error is caught and logged as a warning rather than allowed to break loading.\n *\n * @param {PropertyDefinition} definition\n */\nexport function registerCSSProperty(definition) {\n try {\n CSS.registerProperty(definition);\n } catch (e) {\n if (e instanceof DOMException && e.name === 'InvalidModificationError') {\n console.warn(`The CSS property ${definition.name} has already been registered.`);\n } else {\n throw e;\n }\n }\n}\n\n/**\n * Add a `<style>` block with given styles to the document.\n *\n * @param {string} id the id to set on the created element, only for informational purposes\n * @param {CSSResultGroup[]} styles the styles to add\n */\nexport const addGlobalStyles = (id, ...styles) => {\n const styleTag = document.createElement('style');\n styleTag.id = id;\n styleTag.textContent = styles.map((style) => style.toString()).join('\\n');\n\n document.head.insertAdjacentElement('afterbegin', styleTag);\n};\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * WARNING: For internal use only. Do not use this class in custom components.\n *\n * @private\n */\nexport class CSSPropertyObserver extends EventTarget {\n #root;\n #properties = new Set();\n #styleSheet;\n #isConnected = false;\n\n constructor(root) {\n super();\n this.#root = root;\n this.#styleSheet = new CSSStyleSheet();\n }\n\n #handleTransitionEvent(event) {\n const { propertyName } = event;\n if (this.#properties.has(propertyName)) {\n this.dispatchEvent(new CustomEvent('property-changed', { detail: { propertyName } }));\n }\n }\n\n observe(property) {\n this.connect();\n\n if (this.#properties.has(property)) {\n return;\n }\n\n this.#properties.add(property);\n\n this.#styleSheet.replaceSync(`\n :root::before, :host::before {\n content: '' !important;\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n visibility: hidden !important;\n transition: 1ms allow-discrete step-end !important;\n transition-property: ${[...this.#properties].join(', ')} !important;\n }\n `);\n }\n\n connect() {\n if (this.#isConnected) {\n return;\n }\n\n this.#root.adoptedStyleSheets.unshift(this.#styleSheet);\n\n this.#rootHost.addEventListener('transitionstart', (event) => this.#handleTransitionEvent(event));\n this.#rootHost.addEventListener('transitionend', (event) => this.#handleTransitionEvent(event));\n\n this.#isConnected = true;\n }\n\n disconnect() {\n this.#properties.clear();\n\n this.#root.adoptedStyleSheets = this.#root.adoptedStyleSheets.filter((s) => s !== this.#styleSheet);\n\n this.#rootHost.removeEventListener('transitionstart', this.#handleTransitionEvent);\n this.#rootHost.removeEventListener('transitionend', this.#handleTransitionEvent);\n\n this.#isConnected = false;\n }\n\n get #rootHost() {\n return this.#root.documentElement ?? this.#root.host;\n }\n\n /**\n * Gets or creates the CSSPropertyObserver for the given root.\n * @param {DocumentOrShadowRoot} root\n * @returns {CSSPropertyObserver}\n */\n static for(root) {\n root.__cssPropertyObserver ||= new CSSPropertyObserver(root);\n return root.__cssPropertyObserver;\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { adoptStyles } from 'lit';\n\n/**\n * Returns the effective styles that should apply to the component\n * in the correct order, to place injected stylesheet after styles\n * defined with `static styles` and before any custom theme styles\n * that the user provided using `registerStyles()` function.\n *\n * @param {HTMLElement} component\n * @return {CSSStyleSheet[]}\n */\nfunction getEffectiveStyles(component) {\n const { baseStyles, themeStyles, elementStyles, lumoInjector } = component.constructor;\n const lumoStyleSheet = component.__lumoStyleSheet;\n\n if (lumoStyleSheet) {\n const base = lumoInjector.includeBaseStyles ? (baseStyles ?? elementStyles) : [];\n return [...base, lumoStyleSheet, ...(themeStyles ?? [])];\n }\n\n return elementStyles;\n}\n\n/**\n * Apply styles on the instance of the component in the correct order.\n *\n * @param {HTMLElement} component\n */\nexport function applyInstanceStyles(component) {\n adoptStyles(component.shadowRoot, getEffectiveStyles(component));\n}\n\n/**\n * Injects the given stylesheet into the shadow root of the component\n * through the adoptedStyleSheets API. This will override any styles\n * that were injected previously since we only expect one stylesheet\n * to be injected into each component.\n *\n * @param {HTMLElement} component\n * @param {CSSStyleSheet} styleSheet\n */\nexport function injectLumoStyleSheet(component, styleSheet) {\n // Store the new stylesheet so that it can be removed later.\n component.__lumoStyleSheet = styleSheet;\n applyInstanceStyles(component);\n}\n\n/**\n * Removes the stylesheet from the component's shadow root that was added\n * by the `injectLumoStyleSheet` function.\n *\n * @param {HTMLElement} component\n */\nexport function removeLumoStyleSheet(component) {\n component.__lumoStyleSheet = undefined;\n applyInstanceStyles(component);\n}\n","/**\n * @license\n * Copyright (c) 2000 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nconst issuedWarnings = new Set();\n\n/**\n * Issues a warning in the browser console if it has not been issued before.\n * @param {string} warning\n */\nexport function issueWarning(warning) {\n if (issuedWarnings.has(warning)) {\n return;\n }\n\n issuedWarnings.add(warning);\n console.warn(warning);\n}\n\n/**\n * Clears all issued warnings. Only intended for testing purposes.\n */\nexport function clearWarnings() {\n issuedWarnings.clear();\n}\n","/**\n * @license\n * Copyright (c) 2000 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { issueWarning } from '@vaadin/component-base/src/warnings.js';\n\n/** @type {WeakMap<CSSStyleSheet, Record<string, Map>>} */\nconst cache = new WeakMap();\n\nfunction getRuleMediaText(rule) {\n try {\n return rule.media.mediaText;\n } catch {\n issueWarning(\n '[LumoInjector] Browser denied to access property \"mediaText\" for some CSS rules, so they were skipped.',\n );\n return '';\n }\n}\n\nfunction getStyleSheetRules(styleSheet) {\n try {\n return styleSheet.cssRules;\n } catch {\n issueWarning(\n '[LumoInjector] Browser denied to access property \"cssRules\" for some CSS stylesheets, so they were skipped.',\n );\n return [];\n }\n}\n\nfunction parseStyleSheet(\n styleSheet,\n result = {\n tags: new Map(),\n modules: new Map(),\n },\n) {\n for (const rule of getStyleSheetRules(styleSheet)) {\n if (rule instanceof CSSImportRule) {\n const mediaText = getRuleMediaText(rule);\n if (mediaText.startsWith('lumo_')) {\n result.modules.set(mediaText, [...rule.styleSheet.cssRules]);\n } else {\n parseStyleSheet(rule.styleSheet, result);\n }\n\n continue;\n }\n\n if (rule instanceof CSSMediaRule) {\n const mediaText = getRuleMediaText(rule);\n if (mediaText.startsWith('lumo_')) {\n result.modules.set(mediaText, [...rule.cssRules]);\n }\n\n continue;\n }\n\n if (rule instanceof CSSStyleRule && rule.cssText.includes('-inject')) {\n for (const property of rule.style) {\n const tagName = property.match(/^--_lumo-(.*)-inject-modules$/u)?.[1];\n if (!tagName) {\n continue;\n }\n\n const value = rule.style.getPropertyValue(property);\n\n result.tags.set(\n tagName,\n value.split(',').map((module) => module.trim().replace(/'|\"/gu, '')),\n );\n }\n\n continue;\n }\n }\n\n return result;\n}\n\n/**\n * Parses the provided CSSStyleSheet objects and returns an object with\n * tag-to-modules mappings and module rules.\n *\n * Modules are defined using CSS media rules with names starting with `lumo_`:\n *\n * ```css\n * \\@media lumo_base-field {\n * #label {\n * color: gray;\n * }\n * }\n *\n * \\@media lumo_text-field {\n * #input {\n * color: yellow;\n * }\n * }\n * ```\n *\n * Also, an entire CSS import can be defined as a module:\n *\n * ```css\n * \\@import 'lumo-base-field.css' lumo_base-field;\n * ```\n *\n * Tag-to-modules mappings are defined as CSS custom properties that list\n * the module names to be applied to specific tags, e.g. `vaadin-text-field`:\n *\n * ```css\n * html {\n * --_lumo-vaadin-text-field-inject-modules:\n * lumo_base-field,\n * lumo_text-field;\n * }\n * ```\n *\n * Example output:\n *\n * ```js\n * {\n * tags: Map {\n * 'vaadin-text-field': ['lumo_base-field', 'lumo_text-field']\n * },\n * modules: Map {\n * 'lumo_base-field': [CSSStyleRule],\n * 'lumo_text-field': [CSSStyleRule]\n * }\n * }\n * ```\n *\n * @param {CSSStyleSheet[]} styleSheets - An array of CSSStyleSheet objects to parse.\n * @return {{tags: Map<string, string[]>, modules: Map<string, CSSRule[]>}}\n */\nexport function parseStyleSheets(styleSheets) {\n let tags = new Map();\n let modules = new Map();\n\n for (const styleSheet of styleSheets) {\n let result = cache.get(styleSheet);\n if (!result) {\n result = parseStyleSheet(styleSheet);\n cache.set(styleSheet, result);\n }\n\n tags = new Map([...tags, ...result.tags]);\n modules = new Map([...modules, ...result.modules]);\n }\n\n return { tags, modules };\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { CSSPropertyObserver } from './css-property-observer.js';\nimport { injectLumoStyleSheet, removeLumoStyleSheet } from './css-utils.js';\nimport { parseStyleSheets } from './lumo-modules.js';\n\nexport function getLumoInjectorPropName(lumoInjector) {\n return `--_lumo-${lumoInjector.is}-inject`;\n}\n\n/**\n * Implements auto-injection of CSS styles from document style sheets\n * into the Shadow DOM of corresponding Vaadin components.\n *\n * Styles to be injected are defined as reusable modules using the\n * following syntax, based on media queries and custom properties:\n *\n * ```css\n * \\@media lumo_base-field {\n * #label {\n * color: gray;\n * }\n * }\n *\n * \\@media lumo_text-field {\n * #input {\n * color: yellow;\n * }\n * }\n *\n * \\@media lumo_email-field {\n * #input {\n * color: green;\n * }\n * }\n *\n * html {\n * --_lumo-vaadin-text-field-inject: 1;\n * --_lumo-vaadin-text-field-inject-modules:\n * lumo_base-field,\n * lumo_text-field;\n *\n * --_lumo-vaadin-email-field-inject: 1;\n * --_lumo-vaadin-email-field-inject-modules:\n * lumo_base-field,\n * lumo_email-field;\n * }\n * ```\n *\n * The class observes the custom property `--_lumo-{tagName}-inject`,\n * which indicates whether styles are present for the given component\n * in the document style sheets. When the property is set to `1`, the\n * class recursively searches all document style sheets for CSS modules\n * listed in the `--_lumo-{tagName}-inject-modules` property that apply to\n * the given component tag name. The found rules are then injected\n * into the component's Shadow DOM using the `adoptedStyleSheets` API,\n * in the order specified in the `--_lumo-{tagName}-inject-modules` property.\n * The same module can be used in multiple components.\n *\n * The class also removes the injected styles when the property is set to `0`.\n *\n * If a root element is provided, the class will additionally search for\n * CSS modules in the root element's style sheets. This is useful for\n * embedded Flow applications that are fully isolated from the main document\n * and load styles into a component’s Shadow DOM instead of the main document.\n *\n * WARNING: For internal use only. Do not use this class in custom components.\n *\n * @private\n */\nexport class LumoInjector {\n /** @type {Document | ShadowRoot} */\n #root;\n\n /** @type {CSSPropertyObserver} */\n #cssPropertyObserver;\n\n /** @type {Map<string, CSSStyleSheet>} */\n #styleSheetsByTag = new Map();\n\n /** @type {Map<string, Set<HTMLElement>>} */\n #componentsByTag = new Map();\n\n constructor(root = document) {\n this.#root = root;\n this.handlePropertyChange = this.handlePropertyChange.bind(this);\n this.#cssPropertyObserver = CSSPropertyObserver.for(root);\n this.#cssPropertyObserver.addEventListener('property-changed', this.handlePropertyChange);\n }\n\n disconnect() {\n this.#cssPropertyObserver.removeEventListener('property-changed', this.handlePropertyChange);\n this.#styleSheetsByTag.clear();\n this.#componentsByTag.values().forEach((components) => components.forEach(removeLumoStyleSheet));\n }\n\n /**\n * Forces all monitored components to re-evaluate and update their\n * injected styles.\n *\n * This method can be used to force LumoInjector to clean up component\n * styles synchonously after the Lumo stylesheet has been removed from\n * the root element. Without this, there may be a short FOUC, when the\n * Lumo styles are already removed from the root but still present in\n * the component Shadow DOMs, since those are removed asynchronously on\n * `transitionstart` (CSSPropertyObserver).\n */\n forceUpdate() {\n for (const tagName of this.#styleSheetsByTag.keys()) {\n this.#updateStyleSheet(tagName);\n }\n }\n\n /**\n * Adds a component to the list of elements monitored for style injection.\n * If the styles have already been detected, they are injected into the\n * component's shadow DOM immediately. Otherwise, the class watches the\n * custom property `--_lumo-{tagName}-inject` to trigger injection when\n * the styles are added to the document or root element.\n *\n * @param {HTMLElement} component\n */\n componentConnected(component) {\n const { lumoInjector } = component.constructor;\n const { is: tagName } = lumoInjector;\n\n this.#componentsByTag.set(tagName, this.#componentsByTag.get(tagName) ?? new Set());\n this.#componentsByTag.get(tagName).add(component);\n\n const stylesheet = this.#styleSheetsByTag.get(tagName);\n if (stylesheet) {\n if (stylesheet.cssRules.length > 0) {\n injectLumoStyleSheet(component, stylesheet);\n }\n return;\n }\n\n this.#initStyleSheet(tagName);\n\n const propName = getLumoInjectorPropName(lumoInjector);\n this.#cssPropertyObserver.observe(propName);\n }\n\n /**\n * Removes the component from the list of elements monitored for\n * style injection and cleans up any previously injected styles.\n *\n * @param {HTMLElement} component\n */\n componentDisconnected(component) {\n const { is: tagName } = component.constructor.lumoInjector;\n this.#componentsByTag.get(tagName)?.delete(component);\n\n removeLumoStyleSheet(component);\n }\n\n handlePropertyChange(event) {\n const { propertyName } = event.detail;\n const tagName = propertyName.match(/^--_lumo-(.*)-inject$/u)?.[1];\n if (tagName) {\n this.#updateStyleSheet(tagName);\n }\n }\n\n #initStyleSheet(tagName) {\n this.#styleSheetsByTag.set(tagName, new CSSStyleSheet());\n this.#updateStyleSheet(tagName);\n }\n\n #updateStyleSheet(tagName) {\n const { tags, modules } = parseStyleSheets(this.#rootStyleSheets);\n\n const cssText = (tags.get(tagName) ?? [])\n .flatMap((moduleName) => modules.get(moduleName) ?? [])\n .map((rule) => rule.cssText)\n .join('\\n');\n\n const stylesheet = this.#styleSheetsByTag.get(tagName);\n stylesheet.replaceSync(cssText);\n\n this.#componentsByTag.get(tagName)?.forEach((component) => {\n if (cssText) {\n injectLumoStyleSheet(component, stylesheet);\n } else {\n removeLumoStyleSheet(component);\n }\n });\n }\n\n get #rootStyleSheets() {\n let styleSheets = new Set();\n\n for (const root of [this.#root, document]) {\n styleSheets = styleSheets.union(new Set(root.styleSheets));\n styleSheets = styleSheets.union(new Set(root.adoptedStyleSheets));\n }\n\n return [...styleSheets];\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { registerCSSProperty } from '@vaadin/component-base/src/css-utils.js';\nimport { getLumoInjectorPropName, LumoInjector } from './src/lumo-injector.js';\n\n/**\n * @type {Set<string>}\n */\nconst registeredProperties = new Set();\n\n/**\n * Find enclosing root for given element to gather style rules from.\n *\n * @param {HTMLElement} element\n * @return {DocumentOrShadowRoot}\n */\nexport function findRoot(element) {\n const root = element.getRootNode();\n\n if (root.host && root.host.constructor.version) {\n return findRoot(root.host);\n }\n\n return root;\n}\n\n/**\n * Mixin for internal use only. Do not use it in custom components.\n */\nexport const LumoInjectionMixin = (superClass) =>\n class LumoInjectionMixinClass extends superClass {\n static finalize() {\n super.finalize();\n\n const propName = getLumoInjectorPropName(this.lumoInjector);\n\n // Prevent registering same property twice when a class extends\n // another class using this mixin, since `finalize()` is called\n // by LitElement for all superclasses in the prototype chain.\n if (this.is && !registeredProperties.has(propName)) {\n registeredProperties.add(propName);\n\n // Initialize custom property for this class with 0 as default\n // so that changing it to 1 would inject styles to instances\n // Use `inherits: true` so that property defined on `<html>`\n // would apply to components instances within shadow roots\n registerCSSProperty({\n name: propName,\n syntax: '<number>',\n inherits: true,\n initialValue: '0',\n });\n }\n }\n\n static get lumoInjector() {\n return {\n is: this.is,\n includeBaseStyles: false,\n };\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n const root = findRoot(this);\n\n // Do not initialize LumoInjector if it's disabled at the root.\n // For example, Copilot does this because it uses its own styles\n // on top of the base styles, and Lumo injection would interfere.\n if (root.__lumoInjectorDisabled) {\n return;\n }\n\n if (this.isConnected) {\n root.__lumoInjector ||= new LumoInjector(root);\n this.__lumoInjector = root.__lumoInjector;\n this.__lumoInjector.componentConnected(this);\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Check if LumoInjector is defined. It might be unavailable if the component\n // is moved within the DOM during connectedCallback and becomes disconnected\n // before LumoInjector is assigned.\n if (this.__lumoInjector) {\n this.__lumoInjector.componentDisconnected(this);\n this.__lumoInjector = undefined;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nexport const ThemePropertyMixin = (superClass) =>\n class VaadinThemePropertyMixin extends superClass {\n static get properties() {\n return {\n /**\n * Helper property with theme attribute value facilitating propagation\n * in shadow DOM.\n *\n * Enables the component implementation to propagate the `theme`\n * attribute value to the sub-components in Shadow DOM by binding\n * the sub-component's \"theme\" attribute using the Lit template:\n *\n * ```html\n * <vaadin-notification-card\n * theme=\"${ifDefined(this._theme)}\"\n * ></vaadin-notification-card>\n * ```\n *\n * @protected\n */\n _theme: {\n type: String,\n readOnly: true,\n },\n };\n }\n\n static get observedAttributes() {\n return [...super.observedAttributes, 'theme'];\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n\n if (name === 'theme') {\n this._set_theme(newValue);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css, CSSResult, LitElement, unsafeCSS } from 'lit';\nimport { applyInstanceStyles } from './src/css-utils.js';\nimport { ThemePropertyMixin } from './vaadin-theme-property-mixin.js';\n\nexport { css, unsafeCSS };\n\n/**\n * @typedef {Object} Theme\n * @property {string} themeFor\n * @property {CSSResult[]} styles\n * @property {string | string[]} [include]\n * @property {string} [moduleId]\n *\n * @typedef {CSSResult[] | CSSResult} CSSResultGroup\n */\n\n/**\n * @type {Theme[]}\n */\nconst themeRegistry = [];\n\n/**\n * @type {WeakRef<HTMLElement>[]}\n */\nconst themableInstances = new Set();\n\n/**\n * @type {string[]}\n */\nconst themableTagNames = new Set();\n\n/**\n * Check if the custom element type has themes applied.\n * @param {Function} elementClass\n * @returns {boolean}\n */\nfunction classHasThemes(elementClass) {\n return elementClass && Object.prototype.hasOwnProperty.call(elementClass, '__themes');\n}\n\n/**\n * Check if the custom element type has themes applied.\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction hasThemes(tagName) {\n return classHasThemes(customElements.get(tagName));\n}\n\n/**\n * Flattens the styles into a single array of styles.\n * @param {CSSResultGroup} styles\n * @returns {CSSResult[]}\n */\nfunction flattenStyles(styles = []) {\n return [styles].flat(Infinity).filter((style) => {\n if (style instanceof CSSResult) {\n return true;\n }\n console.warn('An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.');\n return false;\n });\n}\n\n/**\n * Returns true if the themeFor string matches the tag name\n * @param {string} themeFor\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction matchesThemeFor(themeFor, tagName) {\n return (themeFor || '').split(' ').some((themeForToken) => {\n return new RegExp(`^${themeForToken.split('*').join('.*')}$`, 'u').test(tagName);\n });\n}\n\n/**\n * Returns the CSS text content from an array of CSSResults\n * @param {CSSResult[]} styles\n * @returns {string}\n */\nfunction getCssText(styles) {\n return styles.map((style) => style.cssText).join('\\n');\n}\n\nconst STYLE_ID = 'vaadin-themable-mixin-style';\n\n/**\n * Includes the styles to the template.\n * @param {CSSResult[]} styles\n * @param {HTMLTemplateElement} template\n */\nfunction addStylesToTemplate(styles, template) {\n const styleEl = document.createElement('style');\n styleEl.id = STYLE_ID;\n styleEl.textContent = getCssText(styles);\n template.content.appendChild(styleEl);\n}\n\n/**\n * Dynamically updates the styles of the given component instance.\n * @param {HTMLElement} instance\n */\nfunction updateInstanceStyles(instance) {\n if (!instance.shadowRoot) {\n return;\n }\n\n const componentClass = instance.constructor;\n\n if (instance instanceof LitElement) {\n // LitElement\n applyInstanceStyles(instance);\n } else {\n // PolymerElement\n\n // Update style element content in the shadow root\n const style = instance.shadowRoot.getElementById(STYLE_ID);\n const template = componentClass.prototype._template;\n style.textContent = template.content.getElementById(STYLE_ID).textContent;\n }\n}\n\n/**\n * Dynamically updates the styles of the instances matching the given component type.\n * @param {Function} componentClass\n */\nfunction updateInstanceStylesOfType(componentClass) {\n // Iterate over component instances and update their styles if needed\n themableInstances.forEach((ref) => {\n const instance = ref.deref();\n if (instance instanceof componentClass) {\n updateInstanceStyles(instance);\n } else if (!instance) {\n // Clean up the weak reference to a GC'd instance\n themableInstances.delete(ref);\n }\n });\n}\n\n/**\n * Dynamically updates the styles of the given component type.\n * @param {Function} componentClass\n */\nfunction updateComponentStyles(componentClass) {\n if (componentClass.prototype instanceof LitElement) {\n // Update LitElement-based component's elementStyles\n componentClass.elementStyles = componentClass.finalizeStyles(componentClass.styles);\n } else {\n // Update Polymer-based component's template\n const template = componentClass.prototype._template;\n template.content.getElementById(STYLE_ID).textContent = getCssText(componentClass.getStylesForThis());\n }\n\n // Update the styles of inheriting types\n themableTagNames.forEach((inheritingTagName) => {\n const inheritingClass = customElements.get(inheritingTagName);\n if (inheritingClass !== componentClass && inheritingClass.prototype instanceof componentClass) {\n updateComponentStyles(inheritingClass);\n }\n });\n}\n\n/**\n * Check if the component type already has a style matching the given styles.\n *\n * @param {Function} componentClass\n * @param {CSSResultGroup} styles\n * @returns {boolean}\n */\nfunction hasMatchingStyle(componentClass, styles) {\n const themes = componentClass.__themes;\n if (!themes || !styles) {\n return false;\n }\n\n return themes.some((theme) =>\n theme.styles.some((themeStyle) => styles.some((style) => style.cssText === themeStyle.cssText)),\n );\n}\n\n/**\n * Registers CSS styles for a component type. Make sure to register the styles before\n * the first instance of a component of the type is attached to DOM.\n *\n * @param {string} themeFor The local/tag name of the component type to register the styles for\n * @param {CSSResultGroup} styles The CSS style rules to be registered for the component type\n * matching themeFor and included in the local scope of each component instance\n * @param {{moduleId?: string, include?: string | string[]}} options Additional options\n * @return {void}\n */\nexport function registerStyles(themeFor, styles, options = {}) {\n styles = flattenStyles(styles);\n\n themeRegistry.push({\n themeFor,\n styles,\n include: options.include,\n moduleId: options.moduleId,\n });\n\n if (themeFor) {\n // Update styles of the component types that match themeFor and have already been finalized\n themableTagNames.forEach((tagName) => {\n if (matchesThemeFor(themeFor, tagName) && hasThemes(tagName)) {\n const componentClass = customElements.get(tagName);\n\n if (hasMatchingStyle(componentClass, styles)) {\n // Show a warning if the component type already has some of the given styles\n console.warn(`Registering styles that already exist for ${tagName}`);\n } else if (!window.Vaadin || !window.Vaadin.suppressPostFinalizeStylesWarning) {\n // Show a warning if the component type has already been finalized\n console.warn(\n `The custom element definition for \"${tagName}\" ` +\n `was finalized before a style module was registered. ` +\n `Ideally, import component specific style modules before ` +\n `importing the corresponding custom element. ` +\n `This warning can be suppressed by setting \"window.Vaadin.suppressPostFinalizeStylesWarning = true\".`,\n );\n }\n\n // Update the styles of the component type\n updateComponentStyles(componentClass);\n // Update the styles of the component instances matching the component type\n updateInstanceStylesOfType(componentClass);\n }\n });\n }\n}\n\n/**\n * Maps the moduleName to an include priority number which is used for\n * determining the order in which styles are applied.\n * @param {string} moduleName\n * @returns {number}\n */\nfunction getIncludePriority(moduleName = '') {\n let includePriority = 0;\n if (moduleName.startsWith('lumo-') || moduleName.startsWith('material-')) {\n includePriority = 1;\n } else if (moduleName.startsWith('vaadin-')) {\n includePriority = 2;\n }\n return includePriority;\n}\n\n/**\n * Gets an array of CSSResults matching the include property of the theme.\n * @param {Theme} theme\n * @returns {CSSResult[]}\n */\nfunction getIncludedStyles(theme) {\n const includedStyles = [];\n if (theme.include) {\n [].concat(theme.include).forEach((includeModuleId) => {\n const includedTheme = themeRegistry.find((s) => s.moduleId === includeModuleId);\n if (includedTheme) {\n includedStyles.push(...getIncludedStyles(includedTheme), ...includedTheme.styles);\n } else {\n console.warn(`Included moduleId ${includeModuleId} not found in style registry`);\n }\n }, theme.styles);\n }\n return includedStyles;\n}\n\n/**\n * Returns an array of themes that should be used for styling a component matching\n * the tag name. The array is sorted by the include order.\n * @param {string} tagName\n * @returns {Theme[]}\n */\nfunction getThemes(tagName) {\n const defaultModuleName = `${tagName}-default-theme`;\n\n const themes = themeRegistry\n // Filter by matching themeFor properties\n .filter((theme) => theme.moduleId !== defaultModuleName && matchesThemeFor(theme.themeFor, tagName))\n .map((theme) => ({\n ...theme,\n // Prepend styles from included themes\n styles: [...getIncludedStyles(theme), ...theme.styles],\n // Map moduleId to includePriority\n includePriority: getIncludePriority(theme.moduleId),\n }))\n // Sort by includePriority\n .sort((themeA, themeB) => themeB.includePriority - themeA.includePriority);\n\n if (themes.length > 0) {\n return themes;\n }\n // No theme modules found, return the default module if it exists\n return themeRegistry.filter((theme) => theme.moduleId === defaultModuleName);\n}\n\nexport const ThemableMixin = (superClass) =>\n class VaadinThemableMixin extends ThemePropertyMixin(superClass) {\n constructor() {\n super();\n // Store a weak reference to the instance\n themableInstances.add(new WeakRef(this));\n }\n\n /**\n * Covers PolymerElement based component styling\n * @protected\n */\n static finalize() {\n super.finalize();\n\n if (this.is) {\n themableTagNames.add(this.is);\n }\n\n // Make sure not to run the logic intended for PolymerElement when LitElement is used.\n if (this.elementStyles) {\n return;\n }\n\n const template = this.prototype._template;\n if (!template || classHasThemes(this)) {\n return;\n }\n\n addStylesToTemplate(this.getStylesForThis(), template);\n }\n\n /**\n * Covers LitElement based component styling\n *\n * @protected\n */\n static finalizeStyles(styles) {\n // Preserve the styles the user supplied via the `static get styles()` getter\n // so that they will always be injected before styles added by `LumoInjector`.\n this.baseStyles = styles ? [styles].flat(Infinity) : [];\n\n // Preserve the theme styles the user supplied via the `registerStyles()` API\n // so that they will always be injected after styles added by `LumoInjector`.\n this.themeStyles = this.getStylesForThis();\n\n // Merged styles are stored in `elementStyles` and passed to `adoptStyles()`.\n return [...this.baseStyles, ...this.themeStyles];\n }\n\n /**\n * Get styles for the component type\n *\n * @private\n */\n static getStylesForThis() {\n const superClassThemes = superClass.__themes || [];\n const parent = Object.getPrototypeOf(this.prototype);\n const inheritedThemes = (parent ? parent.constructor.__themes : []) || [];\n this.__themes = [...superClassThemes, ...inheritedThemes, ...getThemes(this.is)];\n const themeStyles = this.__themes.flatMap((theme) => theme.styles);\n // Remove duplicates\n return themeStyles.filter((style, index) => index === themeStyles.lastIndexOf(style));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\nimport { addGlobalStyles, registerCSSProperty } from '../css-utils.js';\n\n// NOTE: Base color CSS custom properties are explicitly registered as `<color>`\n// here to avoid performance issues in Aura. Aura overrides these properties with\n// values that use complex, nested relative color functions, and without explicit\n// typing, Chrome 142 was found to render components that use them roughly 40% slower.\n[\n '--vaadin-text-color',\n '--vaadin-text-color-disabled',\n '--vaadin-text-color-secondary',\n '--vaadin-border-color',\n '--vaadin-border-color-secondary',\n '--vaadin-background-color',\n].forEach((propertyName) => {\n registerCSSProperty({\n name: propertyName,\n syntax: '<color>',\n inherits: true,\n initialValue: 'transparent',\n });\n});\n\naddGlobalStyles(\n 'vaadin-base',\n css`\n @layer vaadin.base {\n html {\n /* Background color */\n --vaadin-background-color: light-dark(#fff, #222);\n\n /* Container colors */\n --vaadin-background-container: color-mix(in oklab, var(--vaadin-text-color) 5%, var(--vaadin-background-color));\n --vaadin-background-container-strong: color-mix(\n in oklab,\n var(--vaadin-text-color) 10%,\n var(--vaadin-background-color)\n );\n\n /* Border colors */\n --vaadin-border-color-secondary: color-mix(in oklab, var(--vaadin-text-color) 24%, transparent);\n --vaadin-border-color: color-mix(in oklab, var(--vaadin-text-color) 48%, transparent); /* Above 3:1 contrast */\n\n /* Text colors */\n /* Above 3:1 contrast */\n --vaadin-text-color-disabled: color-mix(in oklab, var(--vaadin-text-color) 48%, transparent);\n /* Above 4.5:1 contrast */\n --vaadin-text-color-secondary: color-mix(in oklab, var(--vaadin-text-color) 68%, transparent);\n /* Above 7:1 contrast */\n --vaadin-text-color: light-dark(#1f1f1f, white);\n\n /* Padding */\n --vaadin-padding-xs: 6px;\n --vaadin-padding-s: 8px;\n --vaadin-padding-m: 12px;\n --vaadin-padding-l: 16px;\n --vaadin-padding-xl: 24px;\n --vaadin-padding-block-container: var(--vaadin-padding-xs);\n --vaadin-padding-inline-container: var(--vaadin-padding-s);\n\n /* Gap/spacing */\n --vaadin-gap-xs: 6px;\n --vaadin-gap-s: 8px;\n --vaadin-gap-m: 12px;\n --vaadin-gap-l: 16px;\n --vaadin-gap-xl: 24px;\n\n /* Border radius */\n --vaadin-radius-s: 3px;\n --vaadin-radius-m: 6px;\n --vaadin-radius-l: 12px;\n\n /* Focus outline */\n --vaadin-focus-ring-width: 2px;\n --vaadin-focus-ring-color: var(--vaadin-text-color);\n\n /* Icons, used as mask-image */\n --_vaadin-icon-arrow-up: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m5 12 7-7 7 7\"/><path d=\"M12 19V5\"/></svg>');\n --_vaadin-icon-calendar: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 2v4\"/><path d=\"M16 2v4\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"/><path d=\"M3 10h18\"/></svg>');\n --_vaadin-icon-checkmark: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m4.5 12.75 6 6 9-13.5\" /></svg>');\n --_vaadin-icon-chevron-down: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m6 9 6 6 6-6\"/></svg>');\n --_vaadin-icon-chevron-right: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m9 18 6-6-6-6\"/></svg>');\n --_vaadin-icon-clock: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 6v6l4 2\"/><circle cx=\"12\" cy=\"12\" r=\"10\"/></svg>');\n --_vaadin-icon-cross: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" /></svg>');\n --_vaadin-icon-drag: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M11 7c0 .82843-.6716 1.5-1.5 1.5C8.67157 8.5 8 7.82843 8 7s.67157-1.5 1.5-1.5c.8284 0 1.5.67157 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5-.82843 0-1.5-.6716-1.5-1.5s.67157-1.5 1.5-1.5c.8284 0 1.5.6716 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5-.82843 0-1.5-.6716-1.5-1.5s.67157-1.5 1.5-1.5c.8284 0 1.5.6716 1.5 1.5Zm5-10c0 .82843-.6716 1.5-1.5 1.5S13 7.82843 13 7s.6716-1.5 1.5-1.5S16 6.17157 16 7Zm0 5c0 .8284-.6716 1.5-1.5 1.5S13 12.8284 13 12s.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5S13 17.8284 13 17s.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5Z\" fill=\"currentColor\"/></svg>');\n --_vaadin-icon-ellipsis: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"1\"/><circle cx=\"19\" cy=\"12\" r=\"1\"/><circle cx=\"5\" cy=\"12\" r=\"1\"/></svg>');\n --_vaadin-icon-eye: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z\" /><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\" /></svg>');\n --_vaadin-icon-eye-slash: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88\" /></svg>');\n --_vaadin-icon-file: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/></svg>');\n --_vaadin-icon-fullscreen: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15\" /></svg>');\n --_vaadin-icon-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"/></svg>');\n --_vaadin-icon-link: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></svg>');\n --_vaadin-icon-menu: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5\" /></svg>');\n --_vaadin-icon-minus: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"/></svg>');\n --_vaadin-icon-paper-airplane: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5\" /></svg>');\n --_vaadin-icon-pen: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\"/><path d=\"m15 5 4 4\"/></svg>');\n --_vaadin-icon-play: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z\" /></svg>');\n --_vaadin-icon-plus: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"/><path d=\"M12 5v14\"/></svg>');\n --_vaadin-icon-redo: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 7v6h-6\"/><path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7\"/></svg>');\n --_vaadin-icon-refresh: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M22 10C22 10 19.995 7.26822 18.3662 5.63824C16.7373 4.00827 14.4864 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.1031 21 19.5649 18.2543 20.6482 14.5M22 10V4M22 10H16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>');\n --_vaadin-icon-resize: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M18.5303 7.46967c.2929.29289.2929.76777 0 1.06066L8.53033 18.5304c-.29289.2929-.76777.2929-1.06066 0s-.29289-.7678 0-1.0607L17.4697 7.46967c.2929-.29289.7677-.29289 1.0606 0Zm0 4.50003c.2929.2929.2929.7678 0 1.0607l-5.5 5.5c-.2929.2928-.7677.2928-1.0606 0-.2929-.2929-.2929-.7678 0-1.0607l5.4999-5.5c.2929-.2929.7678-.2929 1.0607 0Zm0 4.5c.2929.2928.2929.7677 0 1.0606l-1 1.0001c-.2929.2928-.7677.2929-1.0606 0-.2929-.2929-.2929-.7678 0-1.0607l1-1c.2929-.2929.7677-.2929 1.0606 0Z\" fill=\"currentColor\"/></svg>');\n --_vaadin-icon-slash: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\"><rect x=\"13.7812\" y=\"4.22583\" width=\"1.5\" height=\"16\" rx=\"0.75\" transform=\"rotate(20 13.7812 4.22583)\" fill=\"currentColor\"/></svg>');\n --_vaadin-icon-sort: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"8\" height=\"12\" viewBox=\"0 0 8 12\" fill=\"none\"><path d=\"M7.49854 6.99951C7.92795 6.99951 8.15791 7.50528 7.87549 7.82861L4.37646 11.8296C4.17728 12.0571 3.82272 12.0571 3.62354 11.8296L0.125488 7.82861C-0.157248 7.50531 0.0719873 6.99956 0.501465 6.99951H7.49854ZM3.62354 0.17041C3.82275 -0.0573875 4.17725 -0.0573848 4.37646 0.17041L7.87549 4.17041C8.15825 4.49373 7.92806 5.00049 7.49854 5.00049L0.501465 4.99951C0.0719873 4.99946 -0.157248 4.49371 0.125488 4.17041L3.62354 0.17041Z\" fill=\"black\"/></svg>');\n --_vaadin-icon-undo: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"/><path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\"/></svg>');\n --_vaadin-icon-upload: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3v12\"/><path d=\"m17 8-5-5-5 5\"/><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/></svg>');\n --_vaadin-icon-user: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/></svg>');\n --_vaadin-icon-warn: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg>');\n\n /* Cursors for interactive elements */\n --vaadin-clickable-cursor: pointer;\n --vaadin-disabled-cursor: not-allowed;\n\n /* Use units so that the values can be used in calc() */\n --safe-area-inset-top: env(safe-area-inset-top, 0px);\n --safe-area-inset-right: env(safe-area-inset-right, 0px);\n --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);\n --safe-area-inset-left: env(safe-area-inset-left, 0px);\n --safe-area-inset-inline-start: var(--safe-area-inset-left);\n --safe-area-inset-inline-end: var(--safe-area-inset-right);\n\n &:dir(rtl) {\n --safe-area-inset-inline-start: var(--safe-area-inset-right);\n --safe-area-inset-inline-end: var(--safe-area-inset-left);\n }\n }\n\n @supports not (color: hsl(0 0 0)) {\n html {\n --_vaadin-safari-17-deg: 1deg;\n }\n }\n\n @media (forced-colors: active) {\n html {\n --vaadin-background-color: Canvas;\n --vaadin-border-color: CanvasText;\n --vaadin-border-color-secondary: CanvasText;\n --vaadin-text-color-disabled: CanvasText;\n --vaadin-text-color-secondary: CanvasText;\n --vaadin-text-color: CanvasText;\n --vaadin-icon-color: CanvasText;\n --vaadin-focus-ring-color: Highlight;\n }\n }\n }\n `,\n);\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const itemStyles = css`\n :host {\n align-items: center;\n border-radius: var(--vaadin-item-border-radius, var(--vaadin-radius-m));\n box-sizing: border-box;\n cursor: var(--vaadin-clickable-cursor);\n display: flex;\n column-gap: var(--vaadin-item-gap, var(--vaadin-gap-s));\n height: var(--vaadin-item-height, auto);\n padding: var(--vaadin-item-padding, var(--vaadin-padding-block-container) var(--vaadin-padding-inline-container));\n -webkit-tap-highlight-color: transparent;\n }\n\n :host([focus-ring]) {\n outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);\n outline-offset: calc(var(--vaadin-focus-ring-width) / -1);\n }\n\n :host([disabled]) {\n cursor: var(--vaadin-disabled-cursor);\n opacity: 0.5;\n pointer-events: var(--_vaadin-item-disabled-pointer-events, none);\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n [part='checkmark'] {\n color: var(--vaadin-item-checkmark-color, inherit);\n display: var(--vaadin-item-checkmark-display, none);\n visibility: hidden;\n }\n\n [part='checkmark']::before {\n content: '';\n display: block;\n background: currentColor;\n height: var(--vaadin-icon-size, 1lh);\n mask: var(--_vaadin-icon-checkmark) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;\n width: var(--vaadin-icon-size, 1lh);\n }\n\n :host([selected]) [part='checkmark'] {\n visibility: visible;\n }\n\n [part='content'] {\n flex: 1;\n display: flex;\n align-items: center;\n column-gap: inherit;\n justify-content: var(--vaadin-item-text-align, start);\n }\n\n @media (forced-colors: active) {\n [part='checkmark']::before {\n background: CanvasText;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { contextMenuItemStyles } from '@vaadin/context-menu/src/styles/vaadin-context-menu-item-base-styles.js';\n\nexport const menuBarItemStyles = contextMenuItemStyles;\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\nimport { itemStyles } from '@vaadin/item/src/styles/vaadin-item-base-styles.js';\n\nconst menuItemStyles = css`\n :host([aria-haspopup='true'])::after {\n background: var(--vaadin-text-color-secondary);\n content: '';\n display: block;\n height: var(--vaadin-icon-size, 1lh);\n mask: var(--_vaadin-icon-chevron-down) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;\n rotate: -90deg;\n width: var(--vaadin-icon-size, 1lh);\n }\n\n :host([dir='rtl'])::after {\n rotate: 90deg;\n }\n\n /* TODO would be nice to only reserve the space if\n one or mote items in the list is checkable */\n :host([menu-item-checked]) [part='checkmark'] {\n visibility: visible;\n }\n`;\n\nexport const contextMenuItemStyles = [itemStyles, menuItemStyles];\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { menuBarItemStyles } from './styles/vaadin-menu-bar-item-base-styles.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-item\n * @extends HTMLElement\n * @protected\n */\nclass MenuBarItem extends ItemMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-menu-bar-item';\n }\n\n static get styles() {\n return menuBarItemStyles;\n }\n\n /** @protected */\n render() {\n return html`\n <span part=\"checkmark\" aria-hidden=\"true\"></span>\n <div part=\"content\">\n <slot></slot>\n </div>\n `;\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n // Set role in `connectedCallback()` instead of `ready()`\n // because the role is removed when teleporting to button.\n this.setAttribute('role', 'menuitem');\n }\n\n /** @override */\n __shouldAllowFocusWhenDisabled() {\n return window.Vaadin.featureFlags.accessibleDisabledMenuItems;\n }\n}\n\ndefineCustomElement(MenuBarItem);\n\nexport { MenuBarItem };\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nconst debouncerQueue = new Set();\n\n/**\n * @summary Collapse multiple callbacks into one invocation after a timer.\n */\nexport class Debouncer {\n /**\n * Creates a debouncer if no debouncer is passed as a parameter\n * or it cancels an active debouncer otherwise. The following\n * example shows how a debouncer can be called multiple times within a\n * microtask and \"debounced\" such that the provided callback function is\n * called once. Add this method to a custom element:\n *\n * ```js\n * import {microTask} from '@vaadin/component-base/src/async.js';\n * import {Debouncer} from '@vaadin/component-base/src/debounce.js';\n * // ...\n *\n * _debounceWork() {\n * this._debounceJob = Debouncer.debounce(this._debounceJob,\n * microTask, () => this._doWork());\n * }\n * ```\n *\n * If the `_debounceWork` method is called multiple times within the same\n * microtask, the `_doWork` function will be called only once at the next\n * microtask checkpoint.\n *\n * Note: In testing it is often convenient to avoid asynchrony. To accomplish\n * this with a debouncer, you can use `enqueueDebouncer` and\n * `flush`. For example, extend the above example by adding\n * `enqueueDebouncer(this._debounceJob)` at the end of the\n * `_debounceWork` method. Then in a test, call `flush` to ensure\n * the debouncer has completed.\n *\n * @param {Debouncer?} debouncer Debouncer object.\n * @param {!AsyncInterface} asyncModule Object with Async interface\n * @param {function()} callback Callback to run.\n * @return {!Debouncer} Returns a debouncer object.\n */\n static debounce(debouncer, asyncModule, callback) {\n if (debouncer instanceof Debouncer) {\n // Cancel the async callback, but leave in debouncerQueue if it was\n // enqueued, to maintain 1.x flush order\n debouncer._cancelAsync();\n } else {\n debouncer = new Debouncer();\n }\n debouncer.setConfig(asyncModule, callback);\n return debouncer;\n }\n\n constructor() {\n this._asyncModule = null;\n this._callback = null;\n this._timer = null;\n }\n\n /**\n * Sets the scheduler; that is, a module with the Async interface,\n * a callback and optional arguments to be passed to the run function\n * from the async module.\n *\n * @param {!AsyncInterface} asyncModule Object with Async interface.\n * @param {function()} callback Callback to run.\n * @return {void}\n */\n setConfig(asyncModule, callback) {\n this._asyncModule = asyncModule;\n this._callback = callback;\n this._timer = this._asyncModule.run(() => {\n this._timer = null;\n debouncerQueue.delete(this);\n this._callback();\n });\n }\n\n /**\n * Cancels an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n cancel() {\n if (this.isActive()) {\n this._cancelAsync();\n // Canceling a debouncer removes its spot from the flush queue,\n // so if a debouncer is manually canceled and re-debounced, it\n // will reset its flush order (this is a very minor difference from 1.x)\n // Re-debouncing via the `debounce` API retains the 1.x FIFO flush order\n debouncerQueue.delete(this);\n }\n }\n\n /**\n * Cancels a debouncer's async callback.\n *\n * @return {void}\n */\n _cancelAsync() {\n if (this.isActive()) {\n this._asyncModule.cancel(/** @type {number} */ (this._timer));\n this._timer = null;\n }\n }\n\n /**\n * Flushes an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n flush() {\n if (this.isActive()) {\n this.cancel();\n this._callback();\n }\n }\n\n /**\n * Returns true if the debouncer is active.\n *\n * @return {boolean} True if active.\n */\n isActive() {\n return this._timer != null;\n }\n}\n\n/**\n * Adds a `Debouncer` to a list of globally flushable tasks.\n *\n * @param {!Debouncer} debouncer Debouncer to enqueue\n * @return {void}\n */\nexport function enqueueDebouncer(debouncer) {\n debouncerQueue.add(debouncer);\n}\n\n/**\n * Flushes any enqueued debouncers\n *\n * @return {boolean} Returns whether any debouncers were flushed\n */\nexport function flushDebouncers() {\n const didFlush = Boolean(debouncerQueue.size);\n // If new debouncers are added while flushing, Set.forEach will ensure\n // newly added ones are also flushed\n debouncerQueue.forEach((debouncer) => {\n try {\n debouncer.flush();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n });\n return didFlush;\n}\n\nexport const flush = () => {\n let debouncers;\n do {\n debouncers = flushDebouncers();\n } while (debouncers);\n};\n","/**\n * @license\n * Copyright (c) 2023 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A helper for observing slot or shadow-root changes.\n *\n * When `target` is an `HTMLSlotElement`, the observer listens for `slotchange`\n * on the slot itself and diffs `target.assignedNodes({ flatten: true })`.\n *\n * When `target` is a `ShadowRoot`, the observer listens for `slotchange` events\n * bubbling to it and diffs the **union** of `assignedNodes({ flatten: true })`\n * across every descendant `<slot>`. Cross-slot reassignment of the same node\n * does not change the union and therefore fires no callback.\n */\nexport class SlotObserver {\n constructor(target, callback, forceInitial) {\n /** @type {HTMLSlotElement | DocumentFragment} */\n this.target = target;\n\n /** @type {Function} */\n this.callback = callback;\n\n /** @type {boolean} */\n this.forceInitial = forceInitial;\n\n /** @type {Node[]} */\n this._storedNodes = [];\n\n /** @type {boolean} */\n this._isSlot = target instanceof HTMLSlotElement;\n\n this._connected = false;\n this._scheduled = false;\n\n this._boundSchedule = () => {\n this._schedule();\n };\n\n this.connect();\n this._schedule();\n }\n\n /**\n * Activates an observer. This method is automatically called when\n * a `SlotObserver` is created. It should only be called to re-activate\n * an observer that has been deactivated via the `disconnect` method.\n */\n connect() {\n this.target.addEventListener('slotchange', this._boundSchedule);\n this._connected = true;\n }\n\n /**\n * Deactivates the observer. After calling this method the observer callback\n * will not be called when changes to slotted nodes occur. The `connect` method\n * may be subsequently called to reactivate the observer.\n */\n disconnect() {\n this.target.removeEventListener('slotchange', this._boundSchedule);\n this._connected = false;\n }\n\n /** @private */\n _schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n\n queueMicrotask(() => {\n this.flush();\n });\n }\n }\n\n /**\n * Run the observer callback synchronously.\n */\n flush() {\n if (!this._connected) {\n return;\n }\n\n this._scheduled = false;\n\n this._processNodes();\n }\n\n /** @private */\n _collectNodes() {\n const slots = this._isSlot ? [this.target] : [...this.target.querySelectorAll('slot')];\n return [...new Set(slots.flatMap((slot) => slot.assignedNodes({ flatten: true })))];\n }\n\n /** @private */\n _groupNodesBySlot(nodes) {\n const map = new Map();\n nodes.forEach((node) => {\n const slot = node.assignedSlot;\n map.set(slot, map.get(slot) ?? []);\n map.get(slot).push(node);\n });\n return map;\n }\n\n /**\n * Collect moved nodes reordered within its current slot,\n * but not those that are assigned to different slot.\n *\n * @private\n */\n _collectMovedNodes(currentNodes) {\n const currentPerSlot = this._groupNodesBySlot(currentNodes);\n const storedPerSlot = this._groupNodesBySlot(this._storedNodes);\n const movedNodes = [];\n\n currentPerSlot.forEach((nodes, slot) => {\n const stored = storedPerSlot.get(slot) || [];\n // Skip slots whose membership changed: nodes entered or left the slot.\n if (new Set(stored).difference(new Set(nodes)).size > 0) {\n return;\n }\n stored.forEach((node, storedIndex) => {\n if (nodes.indexOf(node) !== storedIndex) {\n movedNodes.push(node);\n }\n });\n });\n\n return movedNodes;\n }\n\n /** @private */\n _processNodes() {\n const currentNodes = this._collectNodes();\n\n const addedNodes = currentNodes.filter((node) => !this._storedNodes.includes(node));\n const removedNodes = this._storedNodes.filter((node) => !currentNodes.includes(node));\n const movedNodes = this._collectMovedNodes(currentNodes);\n\n // By default, callback is not invoked if there is no child nodes in the slot.\n // Use `forceInitial` flag if needed to also invoke it for the initial state.\n if (addedNodes.length || removedNodes.length || movedNodes.length || this.forceInitial) {\n this.callback({ addedNodes, currentNodes, movedNodes, removedNodes });\n }\n\n if (this.forceInitial) {\n this.forceInitial = false;\n }\n\n this._storedNodes = currentNodes;\n }\n}\n","/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isElementFocused, isElementHidden } from './focus-utils.js';\nimport { KeyboardMixin } from './keyboard-mixin.js';\n\n/**\n * A mixin for navigating items with keyboard.\n */\nexport const KeyboardDirectionMixin = (superclass) =>\n class KeyboardDirectionMixinClass extends KeyboardMixin(superclass) {\n /**\n * @return {Element | null}\n * @protected\n */\n get focused() {\n return (this._getItems() || []).find(isElementFocused);\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _vertical() {\n return true;\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _tabNavigation() {\n return false;\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n const idx = this._getFocusableIndex();\n if (idx >= 0) {\n this._focus(idx, options);\n }\n }\n\n /**\n * Get the index of a first focusable item, if any.\n *\n * @return {Element[]}\n * @protected\n */\n _getFocusableIndex() {\n const items = this._getItems();\n return Array.isArray(items) ? this._getAvailableIndex(items, 0, null, (item) => !isElementHidden(item)) : -1;\n }\n\n /**\n * Get the list of items participating in keyboard navigation.\n * By default, it treats all the light DOM children as items.\n * Override this method to provide custom list of elements.\n *\n * @return {Element[]}\n * @protected\n */\n _getItems() {\n return Array.from(this.children);\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.metaKey || event.ctrlKey) {\n return;\n }\n\n const { key, shiftKey } = event;\n const items = this._getItems() || [];\n const currentIdx = items.indexOf(this.focused);\n\n let idx;\n let increment;\n\n const isRTL = !this._vertical && this.getAttribute('dir') === 'rtl';\n const dirIncrement = isRTL ? -1 : 1;\n\n if (this.__isPrevKeyPressed(key, shiftKey)) {\n increment = -dirIncrement;\n idx = currentIdx - dirIncrement;\n } else if (this.__isNextKeyPressed(key, shiftKey)) {\n increment = dirIncrement;\n idx = currentIdx + dirIncrement;\n } else if (key === 'Home') {\n increment = 1;\n idx = 0;\n } else if (key === 'End') {\n increment = -1;\n idx = items.length - 1;\n }\n\n idx = this._getAvailableIndex(items, idx, increment, (item) => !isElementHidden(item));\n\n if (\n this._tabNavigation &&\n key === 'Tab' &&\n ((idx > currentIdx && event.shiftKey) || (idx < currentIdx && !event.shiftKey) || idx === currentIdx)\n ) {\n // Prevent \"roving tabindex\" logic and let the normal Tab behavior if\n // - currently on the first focusable item and Shift + Tab is pressed,\n // - currently on the last focusable item and Tab is pressed,\n // - currently on the only focusable item and Tab is pressed\n return;\n }\n\n if (idx >= 0) {\n event.preventDefault();\n this._focus(idx, { focusVisible: true, preventScroll: true }, true);\n }\n }\n\n /**\n * @param {string} key\n * @param {boolean} shiftKey\n * @return {boolean}\n * @private\n */\n __isPrevKeyPressed(key, shiftKey) {\n if (this._vertical) {\n return key === 'ArrowUp';\n }\n\n return key === 'ArrowLeft' || (this._tabNavigation && key === 'Tab' && shiftKey);\n }\n\n /**\n * @param {string} key\n * @param {boolean} shiftKey\n * @return {boolean}\n * @private\n */\n __isNextKeyPressed(key, shiftKey) {\n if (this._vertical) {\n return key === 'ArrowDown';\n }\n\n return key === 'ArrowRight' || (this._tabNavigation && key === 'Tab' && !shiftKey);\n }\n\n /**\n * Focus the item at given index. Override this method to add custom logic.\n *\n * @param {number} index\n * @param {FocusOptions=} options\n * @param {boolean} navigating\n * @protected\n */\n _focus(index, options, navigating = false) {\n const items = this._getItems();\n\n this._focusItem(items[index], options, navigating);\n }\n\n /**\n * Focus the given item. Override this method to add custom logic.\n *\n * @param {Element} item\n * @param {FocusOptions=} options\n * @param {boolean} navigating\n * @protected\n */\n _focusItem(item, options) {\n if (item) {\n item.focus(options);\n }\n }\n\n /**\n * Returns index of the next item that satisfies the given condition,\n * based on the index of the current item and a numeric increment.\n *\n * @param {Element[]} items - array of items to iterate over\n * @param {number} index - index of the current item\n * @param {number} increment - numeric increment, can be either 1 or -1\n * @param {Function} condition - function used to check the item\n * @return {number}\n * @protected\n */\n _getAvailableIndex(items, index, increment, condition) {\n const totalItems = items.length;\n let idx = index;\n for (let i = 0; typeof idx === 'number' && i < totalItems; i += 1, idx += increment || 1) {\n if (idx < 0) {\n idx = totalItems - 1;\n } else if (idx >= totalItems) {\n idx = 0;\n }\n\n const item = items[idx];\n\n if (this._isItemFocusable(item) && this.__isMatchingItem(item, condition)) {\n return idx;\n }\n }\n return -1;\n }\n\n /**\n * Returns true if the item matches condition.\n *\n * @param {Element} item - item to check\n * @param {Function} condition - function used to check the item\n * @return {number}\n * @private\n */\n __isMatchingItem(item, condition) {\n return typeof condition === 'function' ? condition(item) : true;\n }\n\n /**\n * Returns whether the item is focusable. By default,\n * returns true if the item is not disabled.\n *\n * @param {Element} item\n * @return {boolean}\n * @protected\n */\n _isItemFocusable(item) {\n return !item.hasAttribute('disabled');\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { timeOut } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { getNormalizedScrollLeft, setNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js';\nimport { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';\nimport { isElementHidden } from './focus-utils.js';\nimport { KeyboardDirectionMixin } from './keyboard-direction-mixin.js';\n\n/**\n * A mixin for list elements, facilitating navigation and selection of items.\n */\nexport const ListMixin = (superClass) =>\n class ListMixinClass extends KeyboardDirectionMixin(superClass) {\n static get properties() {\n return {\n /**\n * If true, the user cannot interact with this element.\n * When the element is disabled, the selected item is\n * not updated when `selected` property is changed.\n */\n disabled: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n },\n\n /**\n * The index of the item selected in the items array.\n * Note: Not updated when used in `multiple` selection mode.\n */\n selected: {\n type: Number,\n reflectToAttribute: true,\n notify: true,\n sync: true,\n },\n\n /**\n * Define how items are disposed in the dom.\n * Possible values are: `horizontal|vertical`.\n * It also changes navigation keys from left/right to up/down.\n */\n orientation: {\n type: String,\n reflectToAttribute: true,\n value: '',\n },\n\n /**\n * A read-only list of items from which a selection can be made.\n * It is populated from the elements passed to the light DOM,\n * and updated dynamically when adding or removing items.\n * @type {!Array<!Element> | undefined}\n */\n items: {\n type: Array,\n readOnly: true,\n notify: true,\n },\n\n /**\n * The search buffer for the keyboard selection feature.\n * @private\n */\n _searchBuf: {\n type: String,\n value: '',\n },\n };\n }\n\n static get observers() {\n return ['_enhanceItems(items, orientation, selected, disabled)'];\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _isRTL() {\n return !this._vertical && this.getAttribute('dir') === 'rtl';\n }\n\n /**\n * @return {!HTMLElement}\n * @protected\n */\n get _scrollerElement() {\n // Returning scroller element of the component\n console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`);\n return this;\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get _vertical() {\n return this.orientation !== 'horizontal';\n }\n\n /**\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n // In initialization (e.g vaadin-select) observer might not been run yet.\n if (this._observer) {\n this._observer.flush();\n }\n\n const items = Array.isArray(this.items) ? this.items : [];\n const idx = this._getAvailableIndex(items, 0, null, (item) => item.tabIndex === 0 && !isElementHidden(item));\n if (idx >= 0) {\n this._focus(idx, options);\n } else {\n // Call `KeyboardDirectionMixin` logic to focus first non-disabled item.\n super.focus(options);\n }\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('click', (e) => this._onClick(e));\n\n const slot = this.shadowRoot.querySelector('slot:not([name])');\n this._observer = new SlotObserver(slot, () => {\n this._setItems(this._filterItems([...this.children]));\n });\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin`\n * to use the stored list of item elements.\n *\n * @return {Element[]}\n * @protected\n * @override\n */\n _getItems() {\n return this.items;\n }\n\n /** @private */\n _enhanceItems(items, orientation, selected, disabled) {\n if (!disabled) {\n if (items) {\n this.setAttribute('aria-orientation', orientation || 'vertical');\n items.forEach((item) => {\n if (orientation) {\n item.setAttribute('orientation', orientation);\n } else {\n item.removeAttribute('orientation');\n }\n });\n\n // When selected is set to -1, focus the first available item.\n this._setFocusable(selected < 0 || !selected ? 0 : selected);\n\n const itemToSelect = items[selected];\n items.forEach((item) => {\n item.selected = item === itemToSelect;\n });\n if (itemToSelect && !itemToSelect.disabled) {\n this._scrollToItem(selected);\n }\n }\n }\n }\n\n /**\n * @param {!Array<!Element>} array\n * @return {!Array<!Element>}\n * @protected\n */\n _filterItems(array) {\n return array.filter((e) => e._hasVaadinItemMixin);\n }\n\n /**\n * @param {!MouseEvent} event\n * @protected\n */\n _onClick(event) {\n if (event.metaKey || event.shiftKey || event.ctrlKey || event.defaultPrevented) {\n return;\n }\n\n const item = this._filterItems(event.composedPath())[0];\n let idx;\n if (item && !item.disabled && (idx = this.items.indexOf(item)) >= 0) {\n this.selected = idx;\n }\n }\n\n /**\n * @param {number} currentIdx\n * @param {string} key\n * @return {number}\n * @protected\n */\n _searchKey(currentIdx, key) {\n this._searchReset = Debouncer.debounce(this._searchReset, timeOut.after(500), () => {\n this._searchBuf = '';\n });\n this._searchBuf += key.toLowerCase();\n\n if (!this.items.some((item) => this.__isMatchingKey(item))) {\n this._searchBuf = key.toLowerCase();\n }\n\n const idx = this._searchBuf.length === 1 ? currentIdx + 1 : currentIdx;\n return this._getAvailableIndex(\n this.items,\n idx,\n 1,\n (item) => this.__isMatchingKey(item) && getComputedStyle(item).display !== 'none',\n );\n }\n\n /** @private */\n __isMatchingKey(item) {\n return item.textContent\n .replace(/[^\\p{L}\\p{Nd}]/gu, '')\n .toLowerCase()\n .startsWith(this._searchBuf);\n }\n\n /**\n * Override an event listener from `KeyboardMixin`\n * to search items by key.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n if (event.metaKey || event.ctrlKey) {\n return;\n }\n\n const key = event.key;\n\n const currentIdx = this.items.indexOf(this.focused);\n if (/[\\p{L}\\p{Nd}]/u.test(key) && key.length === 1) {\n const idx = this._searchKey(currentIdx, key);\n if (idx >= 0) {\n this._focus(idx);\n }\n return;\n }\n\n super._onKeyDown(event);\n }\n\n /**\n * @param {number} idx\n * @protected\n */\n _setFocusable(idx) {\n idx = this._getAvailableIndex(this.items, idx, 1);\n const item = this.items[idx];\n this.items.forEach((e) => {\n e.tabIndex = e === item ? 0 : -1;\n });\n }\n\n /**\n * @param {number} idx\n * @protected\n */\n _focus(idx, options) {\n this.items.forEach((e, index) => {\n e.focused = index === idx;\n });\n this._setFocusable(idx);\n this._scrollToItem(idx);\n super._focus(idx, options ?? { preventScroll: true });\n }\n\n /**\n * Scroll the container to have the item visible.\n * @param {number} idx\n * @protected\n */\n _scrollToItem(idx) {\n const item = this._getItems()[idx];\n if (item) {\n item.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }\n }\n\n /**\n * @param {number} pixels\n * @protected\n */\n _scroll(pixels) {\n if (this._vertical) {\n this._scrollerElement.scrollTop += pixels;\n } else {\n const dir = this.getAttribute('dir') || 'ltr';\n const scrollLeft = getNormalizedScrollLeft(this._scrollerElement, dir) + pixels;\n setNormalizedScrollLeft(this._scrollerElement, dir, scrollLeft);\n }\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin` to allow\n * focusing disabled items that are configured so.\n *\n * @param {Element} item\n * @protected\n * @override\n */\n _isItemFocusable(item) {\n if (item.disabled && item.__shouldAllowFocusWhenDisabled) {\n return item.__shouldAllowFocusWhenDisabled();\n }\n\n return super._isItemFocusable(item);\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Get the scrollLeft value of the element relative to the direction\n *\n * @param {HTMLElement} element\n * @param {string} direction current direction of the element\n * @return {number} the scrollLeft value.\n */\nexport function getNormalizedScrollLeft(element, direction) {\n const { scrollLeft } = element;\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n return element.scrollWidth - element.clientWidth + scrollLeft;\n}\n\n/**\n * Set the scrollLeft value of the element relative to the direction\n *\n * @param {HTMLElement} element\n * @param {string} direction current direction of the element\n * @param {number} scrollLeft the scrollLeft value to be set\n */\nexport function setNormalizedScrollLeft(element, direction, scrollLeft) {\n if (direction !== 'rtl') {\n element.scrollLeft = scrollLeft;\n } else {\n element.scrollLeft = element.clientWidth - element.scrollWidth + scrollLeft;\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const listBoxStyles = css`\n :host {\n --vaadin-item-checkmark-display: block;\n display: flex;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n [part='items'] {\n height: 100%;\n overflow-y: auto;\n width: 100%;\n }\n\n [part='items'] ::slotted(hr) {\n border-color: var(--vaadin-divider-color, var(--vaadin-border-color-secondary));\n border-width: 0 0 1px;\n margin: 4px 8px;\n margin-inline-start: calc(var(--vaadin-icon-size, 1lh) + var(--vaadin-item-gap, var(--vaadin-gap-s)) + 8px);\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { ListMixin } from '@vaadin/a11y-base/src/list-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { listBoxStyles } from '@vaadin/list-box/src/styles/vaadin-list-box-base-styles.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-list-box\n * @extends HTMLElement\n * @protected\n */\nclass MenuBarListBox extends ListMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-menu-bar-list-box';\n }\n\n static get styles() {\n return listBoxStyles;\n }\n\n static get properties() {\n return {\n // We don't need to define this property since super default is vertical,\n // but we don't want it to be modified, or be shown in the API docs.\n /** @private */\n orientation: {\n type: String,\n readOnly: true,\n },\n };\n }\n\n /**\n * @return {!HTMLElement}\n * @protected\n * @override\n */\n get _scrollerElement() {\n return this.shadowRoot.querySelector('[part=\"items\"]');\n }\n\n /** @protected */\n render() {\n return html`\n <div part=\"items\">\n <slot></slot>\n </div>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.setAttribute('role', 'menu');\n }\n}\n\ndefineCustomElement(MenuBarListBox);\n\nexport { MenuBarListBox };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getDeepActiveElement } from './focus-utils.js';\n\n/**\n * A controller for saving a focused node and restoring focus to it later.\n */\nexport class FocusRestorationController {\n /**\n * Saves the given node as a target for restoring focus to\n * when `restoreFocus()` is called. If no node is provided,\n * the currently focused node in the DOM is saved as a target.\n *\n * @param {Node | null | undefined} focusNode\n */\n saveFocus(focusNode) {\n this.focusNode = focusNode || getDeepActiveElement();\n }\n\n /**\n * Restores focus to the target node that was saved previously with `saveFocus()`.\n */\n restoreFocus(options) {\n const focusNode = this.focusNode;\n if (!focusNode) {\n return;\n }\n\n const focusOptions = {\n preventScroll: options ? options.preventScroll : false,\n focusVisible: options ? options.focusVisible : false,\n };\n\n if (getDeepActiveElement() === document.body) {\n // In Firefox and Safari, focusing the node synchronously\n // doesn't work as expected when the overlay is closing on outside click.\n // These browsers force focus to move to the body element and retain it\n // there until the next event loop iteration.\n setTimeout(() => focusNode.focus(focusOptions));\n } else {\n focusNode.focus(focusOptions);\n }\n\n this.focusNode = null;\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getFocusableElements, isElementFocused, isKeyboardActive } from './focus-utils.js';\n\nconst instances = [];\n\n/**\n * Returns the innermost active focus trap node that contains the given element,\n * or null if the element is not inside any active focus trap.\n *\n * @param {HTMLElement} element\n * @return {HTMLElement | null}\n */\nexport function getActiveTrappingNode(element) {\n // Iterate backwards since instances are ordered outer-to-inner (push/pop)\n for (let i = instances.length - 1; i >= 0; i--) {\n if (instances[i].__trapNode?.contains(element)) {\n return instances[i].__trapNode;\n }\n }\n return null;\n}\n\n/**\n * A controller for trapping focus within a DOM node.\n */\nexport class FocusTrapController {\n /**\n * @param {HTMLElement} host\n */\n constructor(host) {\n /**\n * The controller host element.\n *\n * @type {HTMLElement}\n */\n this.host = host;\n\n /**\n * A node for trapping focus in.\n *\n * @type {HTMLElement | null}\n * @private\n */\n this.__trapNode = null;\n\n this.__onKeyDown = this.__onKeyDown.bind(this);\n }\n\n /**\n * An array of tab-ordered focusable elements inside the trap node.\n *\n * @return {HTMLElement[]}\n * @private\n */\n get __focusableElements() {\n return getFocusableElements(this.__trapNode);\n }\n\n /**\n * The index of the element inside the trap node that currently has focus.\n *\n * @return {HTMLElement | undefined}\n * @private\n */\n get __focusedElementIndex() {\n const focusableElements = this.__focusableElements;\n return focusableElements.indexOf(focusableElements.filter(isElementFocused).pop());\n }\n\n hostConnected() {\n document.addEventListener('keydown', this.__onKeyDown);\n }\n\n hostDisconnected() {\n document.removeEventListener('keydown', this.__onKeyDown);\n }\n\n /**\n * Activates a focus trap for a DOM node that will prevent focus from escaping the node.\n * The trap can be deactivated with the `.releaseFocus()` method.\n *\n * If focus is initially outside the trap, the method will move focus inside,\n * on the first focusable element of the trap in the tab order.\n * The first focusable element can be the trap node itself if it is focusable\n * and comes first in the tab order.\n *\n * If there are no focusable elements, the method will throw an exception\n * and the trap will not be set.\n *\n * @param {HTMLElement} trapNode\n */\n trapFocus(trapNode) {\n this.__trapNode = trapNode;\n\n if (this.__focusableElements.length === 0) {\n this.__trapNode = null;\n throw new Error('The trap node should have at least one focusable descendant or be focusable itself.');\n }\n\n instances.push(this);\n\n if (this.__focusedElementIndex === -1) {\n this.__focusableElements[0].focus({ focusVisible: isKeyboardActive() });\n }\n }\n\n /**\n * Deactivates the focus trap set with the `.trapFocus()` method\n * so that it becomes possible to tab outside the trap node.\n */\n releaseFocus() {\n this.__trapNode = null;\n\n instances.pop();\n }\n\n /**\n * A `keydown` event handler that manages tabbing navigation when the trap is enabled.\n *\n * - Moves focus to the next focusable element of the trap on `Tab` press.\n * When no next element to focus, the method moves focus to the first focusable element.\n * - Moves focus to the prev focusable element of the trap on `Shift+Tab` press.\n * When no prev element to focus, the method moves focus to the last focusable element.\n *\n * @param {KeyboardEvent} event\n * @private\n */\n __onKeyDown(event) {\n if (!this.__trapNode) {\n return;\n }\n\n // Only handle events for the last instance\n if (this !== Array.from(instances).pop()) {\n return;\n }\n\n if (event.key === 'Tab') {\n // Skip if another handler already processed this event\n if (event.defaultPrevented) {\n return;\n }\n\n event.preventDefault();\n\n const backward = event.shiftKey;\n this.__focusNextElement(backward);\n }\n }\n\n /**\n * - Moves focus to the next focusable element if `backward === false`.\n * When no next element to focus, the method moves focus to the first focusable element.\n * - Moves focus to the prev focusable element if `backward === true`.\n * When no prev element to focus the method moves focus to the last focusable element.\n *\n * If no focusable elements, the method returns immediately.\n *\n * @param {boolean} backward\n * @private\n */\n __focusNextElement(backward = false) {\n const focusableElements = this.__focusableElements;\n const step = backward ? -1 : 1;\n const currentIndex = this.__focusedElementIndex;\n const nextIndex = (focusableElements.length + currentIndex + step) % focusableElements.length;\n const element = focusableElements[nextIndex];\n element.focus({ focusVisible: true });\n if (element.localName === 'input') {\n element.select();\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { FocusRestorationController } from '@vaadin/a11y-base/src/focus-restoration-controller.js';\nimport { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';\nimport { getDeepActiveElement, isElementHidden, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\n\nexport const OverlayFocusMixin = (superClass) =>\n class OverlayFocusMixin extends superClass {\n static get properties() {\n return {\n /**\n * When true, opening the overlay moves focus to the first focusable child,\n * or to the overlay part with tabindex if there are no focusable children.\n * @attr {boolean} focus-trap\n */\n focusTrap: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to true to enable restoring of focus when overlay is closed.\n * @attr {boolean} restore-focus-on-close\n */\n restoreFocusOnClose: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to specify the element which should be focused on overlay close,\n * if `restoreFocusOnClose` is set to true.\n * @type {HTMLElement}\n */\n restoreFocusNode: {\n type: HTMLElement,\n },\n };\n }\n\n constructor() {\n super();\n\n this.__focusTrapController = new FocusTrapController(this);\n this.__focusRestorationController = new FocusRestorationController();\n }\n\n /**\n * Override to specify another element used as a content root,\n * e.g. slotted into the overlay, rather than overlay itself.\n * @protected\n */\n get _contentRoot() {\n return this;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(this.__focusTrapController);\n this.addController(this.__focusRestorationController);\n }\n\n /**\n * Override to specify another element used as a focus trap root,\n * e.g. the overlay's owner element, rather than overlay part.\n * @protected\n */\n get _focusTrapRoot() {\n return this.$.overlay;\n }\n\n /**\n * Release focus and restore focus after the overlay is closed.\n *\n * @protected\n */\n _resetFocus() {\n if (this.focusTrap) {\n this.__focusTrapController.releaseFocus();\n }\n\n if (this.restoreFocusOnClose && this._shouldRestoreFocus()) {\n const focusVisible = isKeyboardActive();\n const preventScroll = !focusVisible;\n this.__focusRestorationController.restoreFocus({ preventScroll, focusVisible });\n }\n }\n\n /**\n * Save the previously focused node when the overlay starts to open.\n *\n * @protected\n */\n _saveFocus() {\n if (this.restoreFocusOnClose) {\n this.__focusRestorationController.saveFocus(this.restoreFocusNode);\n }\n }\n\n /**\n * Trap focus within the overlay after opening has completed.\n *\n * @protected\n */\n _trapFocus() {\n if (this.focusTrap && !isElementHidden(this._focusTrapRoot)) {\n this.__focusTrapController.trapFocus(this._focusTrapRoot);\n }\n }\n\n /**\n * Returns true if focus is still inside the overlay or on the body element,\n * otherwise false.\n *\n * Focus shouldn't be restored if it's been moved elsewhere by another\n * component or as a result of a user interaction e.g. the user clicked\n * on a button outside the overlay while the overlay was open.\n *\n * @protected\n * @return {boolean}\n */\n _shouldRestoreFocus() {\n const activeElement = getDeepActiveElement();\n return activeElement === document.body || this._deepContains(activeElement);\n }\n\n /**\n * Returns true if the overlay contains the given node,\n * including those within shadow DOM trees.\n *\n * @param {Node} node\n * @return {boolean}\n * @protected\n */\n _deepContains(node) {\n if (this._contentRoot.contains(node)) {\n return true;\n }\n let n = node;\n const doc = node.ownerDocument;\n // Walk from node to content root or `document`\n while (n && n !== doc && n !== this._contentRoot) {\n n = n.parentNode || n.host;\n }\n return n === this._contentRoot;\n }\n };\n","/**\n * @license\n * Copyright (c) 2024 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Observe moving an element around on a page.\n *\n * Based on the idea from https://samthor.au/2021/observing-dom/ as implemented in Floating UI\n * https://github.com/floating-ui/floating-ui/blob/58ed169/packages/dom/src/autoUpdate.ts#L45\n *\n * @param {HTMLElement} element\n * @param {Function} callback\n * @return {Function}\n */\nexport function observeMove(element, callback) {\n let io = null;\n let timeout;\n\n const root = document.documentElement;\n\n function cleanup() {\n timeout && clearTimeout(timeout);\n io?.disconnect();\n io = null;\n }\n\n function refresh(skip = false, threshold = 1) {\n cleanup();\n\n const { left, top, width, height } = element.getBoundingClientRect();\n\n if (!skip) {\n callback();\n }\n\n if (!width || !height) {\n return;\n }\n\n const insetTop = Math.floor(top);\n const insetRight = Math.floor(root.clientWidth - (left + width));\n const insetBottom = Math.floor(root.clientHeight - (top + height));\n const insetLeft = Math.floor(left);\n\n const rootMargin = `${-insetTop}px ${-insetRight}px ${-insetBottom}px ${-insetLeft}px`;\n\n const options = {\n rootMargin,\n threshold: Math.max(0, Math.min(1, threshold)) || 1,\n };\n\n let isFirstUpdate = true;\n\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeout = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n\n isFirstUpdate = false;\n }\n\n io = new IntersectionObserver(handleObserve, options);\n\n io.observe(element);\n }\n\n refresh(true);\n\n return cleanup;\n}\n\n/**\n * Toggle the state attribute on the overlay element and also its owner element. This allows targeting state attributes\n * in the light DOM in case the overlay is in the shadow DOM of its owner.\n * @param {HTMLElement} overlay The overlay element on which to toggle the attribute.\n * @param {string} name The name of the attribute to toggle.\n * @param {string|boolean} value The value of the attribute. If a string is provided, it will be set as the attribute\n * value. Otherwise, the attribute will be added or removed depending on whether `value` is truthy or falsy.\n */\nexport function setOverlayStateAttribute(overlay, name, value) {\n const elements = [overlay];\n if (overlay.owner) {\n elements.push(overlay.owner);\n }\n\n if (typeof value === 'string') {\n elements.forEach((element) => {\n element.setAttribute(name, value);\n });\n } else if (value) {\n elements.forEach((element) => {\n element.setAttribute(name, '');\n });\n } else {\n elements.forEach((element) => {\n element.removeAttribute(name);\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getAncestorRootNodes } from '@vaadin/component-base/src/dom-utils.js';\nimport { observeMove, setOverlayStateAttribute } from './vaadin-overlay-utils.js';\n\nconst PROP_NAMES_VERTICAL = {\n start: 'top',\n end: 'bottom',\n};\n\nconst PROP_NAMES_HORIZONTAL = {\n start: 'left',\n end: 'right',\n};\n\nconst targetResizeObserver = new ResizeObserver((entries) => {\n setTimeout(() => {\n entries.forEach((entry) => {\n if (entry.target.__overlay) {\n entry.target.__overlay._updatePosition();\n }\n });\n });\n});\n\nexport const PositionMixin = (superClass) =>\n class PositionMixin extends superClass {\n static get properties() {\n return {\n /**\n * The element next to which this overlay should be aligned.\n * The position of the overlay relative to the positionTarget can be adjusted\n * with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`\n * and `noVerticalOverlap`.\n */\n positionTarget: {\n type: Object,\n value: null,\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * left or right side to the target element by default.\n * Possible values are `start` and `end`.\n * RTL is taken into account when interpreting the value.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {start|end} horizontal-align\n */\n horizontalAlign: {\n type: String,\n value: 'start',\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * top or bottom side to the target element by default.\n * Possible values are `top` and `bottom`.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {top|bottom} vertical-align\n */\n verticalAlign: {\n type: String,\n value: 'top',\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the x-axis, or be positioned right next to it.\n *\n * @attr {boolean} no-horizontal-overlap\n */\n noHorizontalOverlap: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the y-axis, or be positioned right above/below it.\n *\n * @attr {boolean} no-vertical-overlap\n */\n noVerticalOverlap: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * If the overlay content has no intrinsic height, this property can be used to set\n * the minimum vertical space (in pixels) required by the overlay. Setting a value to\n * the property effectively disables the content measurement in favor of using this\n * fixed value for determining the open direction.\n *\n * @attr {number} required-vertical-space\n */\n requiredVerticalSpace: {\n type: Number,\n value: 0,\n sync: true,\n },\n };\n }\n\n constructor() {\n super();\n\n this.__onScroll = this.__onScroll.bind(this);\n this._updatePosition = this._updatePosition.bind(this);\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (this.opened) {\n this.__addUpdatePositionEventListeners();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__removeUpdatePositionEventListeners();\n }\n\n /** @protected */\n updated(props) {\n super.updated(props);\n\n if (props.has('positionTarget')) {\n const oldTarget = props.get('positionTarget');\n\n // Invalidate the cached content size so the next `_updatePosition` call\n // measures the overlay against the new target instead of carrying over\n // a larger size from the previous one.\n this.__oldContentWidth = undefined;\n this.__oldContentHeight = undefined;\n\n // 1. When position target is removed, always reset position settings\n // 2. When position target is set, reset if overlay was opened before\n if ((!this.positionTarget && oldTarget) || (this.positionTarget && !oldTarget && !!this.__margins)) {\n this.__resetPosition();\n }\n }\n\n if (props.has('opened') || props.has('positionTarget')) {\n this.__updatePositionSettings(this.opened, this.positionTarget);\n }\n\n const positionProps = [\n 'horizontalAlign',\n 'verticalAlign',\n 'noHorizontalOverlap',\n 'noVerticalOverlap',\n 'requiredVerticalSpace',\n ];\n if (positionProps.some((prop) => props.has(prop))) {\n this._updatePosition();\n }\n }\n\n /** @private */\n __addUpdatePositionEventListeners() {\n window.visualViewport.addEventListener('resize', this._updatePosition);\n window.visualViewport.addEventListener('scroll', this.__onScroll, true);\n\n this.__positionTargetAncestorRootNodes = getAncestorRootNodes(this.positionTarget);\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.addEventListener('scroll', this.__onScroll, true);\n });\n\n if (this.positionTarget) {\n this.__observePositionTargetMove = observeMove(this.positionTarget, () => {\n this._updatePosition();\n });\n }\n }\n\n /** @private */\n __removeUpdatePositionEventListeners() {\n window.visualViewport.removeEventListener('resize', this._updatePosition);\n window.visualViewport.removeEventListener('scroll', this.__onScroll, true);\n\n if (this.__positionTargetAncestorRootNodes) {\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.removeEventListener('scroll', this.__onScroll, true);\n });\n this.__positionTargetAncestorRootNodes = null;\n }\n\n if (this.__observePositionTargetMove) {\n this.__observePositionTargetMove();\n this.__observePositionTargetMove = null;\n }\n }\n\n /** @private */\n __updatePositionSettings(opened, positionTarget) {\n this.__removeUpdatePositionEventListeners();\n\n if (positionTarget) {\n positionTarget.__overlay = null;\n targetResizeObserver.unobserve(positionTarget);\n\n if (opened) {\n this.__addUpdatePositionEventListeners();\n positionTarget.__overlay = this;\n targetResizeObserver.observe(positionTarget);\n }\n }\n\n if (opened) {\n const computedStyle = getComputedStyle(this);\n if (!this.__margins) {\n this.__margins = {};\n ['top', 'bottom', 'left', 'right'].forEach((propName) => {\n this.__margins[propName] = parseInt(computedStyle[propName], 10);\n });\n }\n\n this._updatePosition();\n // Schedule another position update (to cover virtual keyboard opening for example)\n requestAnimationFrame(() => this._updatePosition());\n }\n }\n\n /** @private */\n __onScroll(e) {\n // If the scroll event occurred inside the overlay, ignore it.\n if (e.target instanceof Node && this._deepContains(e.target)) {\n return;\n }\n\n this._updatePosition();\n }\n\n /** @private */\n __resetPosition() {\n this.__margins = null;\n\n Object.assign(this.style, {\n justifyContent: '',\n alignItems: '',\n top: '',\n bottom: '',\n left: '',\n right: '',\n });\n\n setOverlayStateAttribute(this, 'bottom-aligned', false);\n setOverlayStateAttribute(this, 'top-aligned', false);\n setOverlayStateAttribute(this, 'end-aligned', false);\n setOverlayStateAttribute(this, 'start-aligned', false);\n }\n\n _updatePosition() {\n if (!this.positionTarget || !this.opened || !this.__margins) {\n return;\n }\n\n const targetRect = this.positionTarget.getBoundingClientRect();\n\n if (targetRect.width === 0 && targetRect.height === 0 && this.opened) {\n this.opened = false;\n return;\n }\n\n // Detect the desired alignment and update the layout accordingly\n const shouldAlignStartVertically = this.__shouldAlignStartVertically(targetRect);\n this.style.justifyContent = shouldAlignStartVertically ? 'flex-start' : 'flex-end';\n\n const isRTL = this.__isRTL;\n const shouldAlignStartHorizontally = this.__shouldAlignStartHorizontally(targetRect, isRTL);\n const flexStart = (!isRTL && shouldAlignStartHorizontally) || (isRTL && !shouldAlignStartHorizontally);\n this.style.alignItems = flexStart ? 'flex-start' : 'flex-end';\n\n // Get the overlay rect after possible overlay alignment changes\n const overlayRect = this.getBoundingClientRect();\n\n // Obtain vertical positioning properties\n const verticalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n this,\n shouldAlignStartVertically,\n );\n\n // Obtain horizontal positioning properties\n const horizontalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n this,\n shouldAlignStartHorizontally,\n );\n\n // Apply the positioning properties to the overlay\n Object.assign(this.style, verticalProps, horizontalProps);\n\n setOverlayStateAttribute(this, 'bottom-aligned', !shouldAlignStartVertically);\n setOverlayStateAttribute(this, 'top-aligned', shouldAlignStartVertically);\n\n setOverlayStateAttribute(this, 'end-aligned', !flexStart);\n setOverlayStateAttribute(this, 'start-aligned', flexStart);\n }\n\n __shouldAlignStartHorizontally(targetRect, rtl) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentWidth = Math.max(this.__oldContentWidth || 0, this.$.overlay.offsetWidth);\n this.__oldContentWidth = this.$.overlay.offsetWidth;\n\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n const defaultAlignLeft = (!rtl && this.horizontalAlign === 'start') || (rtl && this.horizontalAlign === 'end');\n\n return this.__shouldAlignStart(\n targetRect,\n contentWidth,\n viewportWidth,\n this.__margins,\n defaultAlignLeft,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n );\n }\n\n __shouldAlignStartVertically(targetRect) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentHeight =\n this.requiredVerticalSpace || Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);\n this.__oldContentHeight = this.$.overlay.offsetHeight;\n\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n const defaultAlignTop = this.verticalAlign === 'top';\n\n return this.__shouldAlignStart(\n targetRect,\n contentHeight,\n viewportHeight,\n this.__margins,\n defaultAlignTop,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/max-params\n __shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) {\n const spaceForStartAlignment =\n viewportSize - targetRect[noOverlap ? propNames.end : propNames.start] - margins[propNames.end];\n const spaceForEndAlignment = targetRect[noOverlap ? propNames.start : propNames.end] - margins[propNames.start];\n\n const spaceForDefaultAlignment = defaultAlignStart ? spaceForStartAlignment : spaceForEndAlignment;\n const spaceForOtherAlignment = defaultAlignStart ? spaceForEndAlignment : spaceForStartAlignment;\n\n const shouldGoToDefaultSide =\n spaceForDefaultAlignment > spaceForOtherAlignment || spaceForDefaultAlignment > contentSize;\n\n return defaultAlignStart === shouldGoToDefaultSide;\n }\n\n /**\n * Returns an adjusted value after resizing the browser window,\n * to avoid wrong calculations when e.g. previously set `bottom`\n * CSS property value is larger than the updated viewport height.\n * See https://github.com/vaadin/web-components/issues/4604\n */\n __adjustBottomProperty(cssPropNameToSet, propNames, currentValue) {\n let adjustedProp;\n\n if (cssPropNameToSet === propNames.end) {\n // Adjust horizontally\n if (propNames.end === PROP_NAMES_VERTICAL.end) {\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n\n if (currentValue > viewportHeight && this.__oldViewportHeight) {\n const heightDiff = this.__oldViewportHeight - viewportHeight;\n adjustedProp = currentValue - heightDiff;\n }\n\n this.__oldViewportHeight = viewportHeight;\n }\n\n // Adjust vertically\n if (propNames.end === PROP_NAMES_HORIZONTAL.end) {\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n\n if (currentValue > viewportWidth && this.__oldViewportWidth) {\n const widthDiff = this.__oldViewportWidth - viewportWidth;\n adjustedProp = currentValue - widthDiff;\n }\n\n this.__oldViewportWidth = viewportWidth;\n }\n }\n\n return adjustedProp;\n }\n\n /**\n * Returns an object with CSS position properties to set,\n * e.g. { top: \"100px\" }\n */\n // eslint-disable-next-line @typescript-eslint/max-params\n __calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) {\n const cssPropNameToSet = shouldAlignStart ? propNames.start : propNames.end;\n const cssPropNameToClear = shouldAlignStart ? propNames.end : propNames.start;\n\n const currentValue = parseFloat(overlay.style[cssPropNameToSet] || getComputedStyle(overlay)[cssPropNameToSet]);\n const adjustedValue = this.__adjustBottomProperty(cssPropNameToSet, propNames, currentValue);\n\n const diff =\n overlayRect[shouldAlignStart ? propNames.start : propNames.end] -\n targetRect[noOverlap === shouldAlignStart ? propNames.end : propNames.start];\n\n const valueToSet = adjustedValue\n ? `${adjustedValue}px`\n : `${currentValue + diff * (shouldAlignStart ? -1 : 1)}px`;\n\n return {\n [cssPropNameToSet]: valueToSet,\n [cssPropNameToClear]: '',\n };\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Returns an array of ancestor root nodes for the given node.\n *\n * A root node is either a document node or a document fragment node (Shadow Root).\n * The array is collected by a bottom-up DOM traversing that starts with the given node\n * and involves both the light DOM and ancestor shadow DOM trees.\n *\n * @param {Node} node\n * @return {Node[]}\n */\nexport function getAncestorRootNodes(node) {\n const result = [];\n\n while (node) {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n result.push(node);\n break;\n }\n\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n result.push(node);\n node = node.host;\n continue;\n }\n\n if (node.assignedSlot) {\n node = node.assignedSlot;\n continue;\n }\n\n node = node.parentNode;\n }\n\n return result;\n}\n\n/**\n * Returns the list of flattened elements for the given `node`.\n * This list consists of a node's children and, for any children that are\n * `<slot>` elements, the expanded flattened list of `assignedElements`.\n *\n * @param {Node} node\n * @return {Element[]}\n */\nexport function getFlattenedElements(node) {\n const result = [];\n let elements;\n if (node.localName === 'slot') {\n elements = node.assignedElements();\n } else {\n result.push(node);\n elements = [...node.children];\n }\n elements.forEach((elem) => result.push(...getFlattenedElements(elem)));\n return result;\n}\n\n/**\n * Traverses the given node and its parents, including those that are across\n * the shadow root boundaries, until it finds a node that matches the selector.\n *\n * @param {string} selector The CSS selector to match against\n * @param {Node} node The starting node for the traversal\n * @return {Node | null} The closest matching element, or null if no match is found\n */\nexport function getClosestElement(selector, node) {\n if (!node) {\n return null;\n }\n\n return node.closest?.(selector) || getClosestElement(selector, node.getRootNode().host);\n}\n\n/**\n * Takes a string with values separated by space and returns a set the values\n *\n * @param {string} value\n * @return {Set<string>}\n */\nexport function deserializeAttributeValue(value) {\n if (!value) {\n return new Set();\n }\n\n return new Set(value.split(' '));\n}\n\n/**\n * Takes a set of string values and returns a string with values separated by space\n *\n * @param {Set<string>} values\n * @return {string}\n */\nexport function serializeAttributeValue(values) {\n return values ? [...values].join(' ') : '';\n}\n\n/**\n * Adds a value to an attribute containing space-delimited values.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function addValueToAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.add(value);\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Removes a value from an attribute containing space-delimited values.\n * If the value is the last one, the whole attribute is removed.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function removeValueFromAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.delete(value);\n if (values.size === 0) {\n element.removeAttribute(attr);\n return;\n }\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Returns true if the given node is an empty text node, false otherwise.\n *\n * @param {Node} node\n * @return {boolean}\n */\nexport function isEmptyTextNode(node) {\n return node.nodeType === Node.TEXT_NODE && node.textContent.trim() === '';\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { OverlayFocusMixin } from '@vaadin/overlay/src/vaadin-overlay-focus-mixin.js';\nimport { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';\n\nexport const MenuOverlayMixin = (superClass) =>\n class MenuOverlayMixin extends OverlayFocusMixin(PositionMixin(superClass)) {\n static get properties() {\n return {\n /**\n * @protected\n */\n parentOverlay: {\n type: Object,\n readOnly: true,\n },\n\n /**\n * @protected\n */\n _theme: {\n type: String,\n readOnly: true,\n sync: true,\n },\n };\n }\n\n static get observers() {\n return ['_themeChanged(_theme)'];\n }\n\n /**\n * Override method from OverlayFocusMixin to use slotted div as content root.\n * @protected\n * @override\n */\n get _contentRoot() {\n return this._rendererRoot;\n }\n\n /**\n * Override method from OverlayMixin to use slotted div as the renderer root.\n * @protected\n * @override\n */\n get _rendererRoot() {\n if (!this.__savedRoot) {\n const root = document.createElement('div');\n root.setAttribute('slot', 'overlay');\n root.style.display = 'contents';\n this.owner.appendChild(root);\n this.__savedRoot = root;\n }\n\n return this.__savedRoot;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.restoreFocusOnClose = true;\n\n this.addEventListener('keydown', (e) => {\n if (!e.defaultPrevented && e.composedPath()[0] === this.$.overlay && [38, 40].indexOf(e.keyCode) > -1) {\n const child = this._contentRoot.firstElementChild;\n if (child && Array.isArray(child.items) && child.items.length) {\n e.preventDefault();\n if (e.keyCode === 38) {\n child.items[child.items.length - 1].focus();\n } else {\n child.focus();\n }\n }\n }\n });\n }\n\n /** @private */\n _themeChanged() {\n this.close();\n }\n\n /**\n * Returns the adjusted boundaries of the overlay.\n *\n * @returns {object}\n */\n getBoundaries() {\n // Measure actual overlay and content sizes\n const overlayRect = this.getBoundingClientRect();\n const contentRect = this.$.overlay.getBoundingClientRect();\n\n // Maximum x and y values are imposed by content size and overlay limits.\n let yMax = overlayRect.bottom - contentRect.height;\n\n // Adjust constraints to ensure bottom-aligned applies to sub-menu.\n const parent = this.parentOverlay;\n if (parent?.hasAttribute('bottom-aligned')) {\n const parentStyle = getComputedStyle(parent);\n yMax = yMax - parseFloat(parentStyle.bottom) - parseFloat(parentStyle.height);\n }\n\n return {\n xMax: overlayRect.right - contentRect.width,\n xMin: overlayRect.left + contentRect.width,\n yMax,\n };\n }\n\n /**\n * @protected\n * @override\n */\n _updatePosition() {\n super._updatePosition();\n\n if (this.positionTarget && this.parentOverlay && this.opened) {\n // This overlay is positioned by a parent menu item,\n // adjust the position by the overlay content paddings\n const content = this.$.content;\n const style = getComputedStyle(content);\n\n // Horizontal adjustment\n const isLeftAligned = !!this.style.left;\n if (isLeftAligned) {\n this.style.left = `${parseFloat(this.style.left) + parseFloat(style.paddingLeft)}px`;\n } else {\n this.style.right = `${parseFloat(this.style.right) + parseFloat(style.paddingRight)}px`;\n }\n\n // Vertical adjustment\n const isBottomAligned = !!this.style.bottom;\n if (isBottomAligned) {\n this.style.bottom = `${parseFloat(this.style.bottom) - parseFloat(style.paddingBottom)}px`;\n } else {\n this.style.top = `${parseFloat(this.style.top) - parseFloat(style.paddingTop)}px`;\n }\n }\n }\n\n /**\n * Override method inherited from `OverlayFocusMixin` to disable\n * focus restoration on sub-menu overlay close. Focus should\n * be only restored when the root menu closes.\n *\n * @protected\n * @override\n * @return {boolean}\n */\n _shouldRestoreFocus() {\n if (this.parentOverlay) {\n // Do not restore focus on sub-menu close.\n return false;\n }\n\n return super._shouldRestoreFocus();\n }\n\n /**\n * Override method inherited from `OverlayFocusMixin` to check if the\n * node is contained within the overlay's owner element (the menu),\n * where all content (overlay content, sub-menus, etc.) is slotted.\n *\n * @protected\n * @override\n * @param {Node} node\n * @return {boolean}\n */\n _deepContains(node) {\n return this.owner.contains(node);\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nconst testUserAgent = (regexp) => regexp.test(navigator.userAgent);\n\nconst testPlatform = (regexp) => regexp.test(navigator.platform);\n\nconst testVendor = (regexp) => regexp.test(navigator.vendor);\n\nexport const isAndroid = testUserAgent(/Android/u);\n\nexport const isChrome = testUserAgent(/Chrome/u) && testVendor(/Google Inc/u);\n\nexport const isFirefox = testUserAgent(/Firefox/u);\n\n// IPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\nexport const isIPad = testPlatform(/^iPad/u) || (testPlatform(/^Mac/u) && navigator.maxTouchPoints > 1);\n\nexport const isIPhone = testPlatform(/^iPhone/u);\n\nexport const isIOS = isIPhone || isIPad;\n\nexport const isSafari = testUserAgent(/^((?!chrome|android).)*safari/iu);\n\nexport const isTouch = (() => {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (_) {\n return false;\n }\n})();\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/** @type {Set<HTMLElement>} */\nconst attachedInstances = new Set();\n\n/**\n * Returns all attached overlays in visual stacking order.\n * @private\n */\nconst getAttachedInstances = () => [...attachedInstances].filter((el) => !el.hasAttribute('closing'));\n\n/**\n * Returns true if all the instances on top of the overlay are nested overlays.\n * @private\n */\nexport const hasOnlyNestedOverlays = (overlay) => {\n const instances = getAttachedInstances();\n const next = instances[instances.indexOf(overlay) + 1];\n if (!next) {\n return true;\n }\n\n if (!overlay._deepContains(next)) {\n return false;\n }\n\n return hasOnlyNestedOverlays(next);\n};\n\n/**\n * Returns true if the overlay is the last one in the opened overlays stack.\n * @param {HTMLElement} overlay\n * @param {function(HTMLElement): boolean} filter\n * @return {boolean}\n * @protected\n */\nexport const isLastOverlay = (overlay, filter = (_overlay) => true) => {\n const filteredOverlays = getAttachedInstances().filter(filter);\n return overlay === filteredOverlays.pop();\n};\n\nexport const OverlayStackMixin = (superClass) =>\n class OverlayStackMixin extends superClass {\n /**\n * Returns true if this is the last one in the opened overlays stack.\n *\n * @return {boolean}\n * @protected\n */\n get _last() {\n return isLastOverlay(this);\n }\n\n /**\n * Returns true if this is overlay is attached.\n *\n * @return {boolean}\n * @protected\n */\n get _isAttached() {\n return attachedInstances.has(this);\n }\n\n /**\n * Brings the overlay as visually the frontmost one.\n */\n bringToFront() {\n // If the overlay is the last one, or if all other overlays shown above\n // are nested overlays (e.g. date-picker inside a dialog), do not call\n // `showPopover()` unnecessarily to avoid scroll position being reset.\n if (isLastOverlay(this) || hasOnlyNestedOverlays(this)) {\n return;\n }\n\n // Update stacking order of native popover-based overlays\n if (this.matches(':popover-open')) {\n this.hidePopover();\n this.showPopover();\n }\n\n // Update order of attached instances\n this._removeAttachedInstance();\n this._appendAttachedInstance();\n }\n\n /** @protected */\n _enterModalState() {\n if (document.body.style.pointerEvents !== 'none') {\n // Set body pointer-events to 'none' to disable mouse interactions with\n // other document nodes.\n this._previousDocumentPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = 'none';\n }\n\n // Disable pointer events in other attached overlays\n getAttachedInstances().forEach((el) => {\n if (el !== this) {\n el.$.overlay.style.pointerEvents = 'none';\n }\n });\n }\n\n /** @protected */\n _exitModalState() {\n if (this._previousDocumentPointerEvents !== undefined) {\n // Restore body pointer-events\n document.body.style.pointerEvents = this._previousDocumentPointerEvents;\n delete this._previousDocumentPointerEvents;\n }\n\n // Restore pointer events in the previous overlay(s)\n const instances = getAttachedInstances();\n\n let el;\n // Use instances.pop() to ensure the reverse order\n while ((el = instances.pop())) {\n if (el === this) {\n // Skip the current instance\n continue;\n }\n el.$.overlay.style.removeProperty('pointer-events');\n if (!el.modeless) {\n // Stop after the last modal\n break;\n }\n }\n }\n\n /** @protected */\n _appendAttachedInstance() {\n attachedInstances.add(this);\n }\n\n /** @protected */\n _removeAttachedInstance() {\n if (this._isAttached) {\n attachedInstances.delete(this);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isIOS } from '@vaadin/component-base/src/browser-utils.js';\nimport { OverlayFocusMixin } from './vaadin-overlay-focus-mixin.js';\nimport { OverlayStackMixin } from './vaadin-overlay-stack-mixin.js';\nimport { setOverlayStateAttribute } from './vaadin-overlay-utils.js';\n\nexport const OverlayMixin = (superClass) =>\n class OverlayMixin extends OverlayFocusMixin(OverlayStackMixin(superClass)) {\n static get properties() {\n return {\n /**\n * When true, the overlay is visible and attached to body.\n */\n opened: {\n type: Boolean,\n notify: true,\n observer: '_openedChanged',\n reflectToAttribute: true,\n sync: true,\n },\n\n /**\n * Owner element passed with renderer function\n * @type {HTMLElement}\n */\n owner: {\n type: Object,\n sync: true,\n },\n\n /**\n * Object with properties that is passed to `renderer` function\n */\n model: {\n type: Object,\n sync: true,\n },\n\n /**\n * Custom function for rendering the content of the overlay.\n * Receives three arguments:\n *\n * - `root` The root container DOM element. Append your content to it.\n * - `owner` The host element of the renderer function.\n * - `model` The object with the properties related with rendering.\n * @type {OverlayRenderer | null | undefined}\n */\n renderer: {\n type: Object,\n sync: true,\n },\n\n /**\n * When true the overlay won't disable the main content, showing\n * it doesn't change the functionality of the user interface.\n */\n modeless: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_modelessChanged',\n sync: true,\n },\n\n /**\n * When set to true, the overlay is hidden. This also closes the overlay\n * immediately in case there is a closing animation in progress.\n */\n hidden: {\n type: Boolean,\n reflectToAttribute: true,\n observer: '_hiddenChanged',\n sync: true,\n },\n\n /**\n * When true the overlay has backdrop on top of content when opened.\n */\n withBackdrop: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_withBackdropChanged',\n sync: true,\n },\n };\n }\n\n static get observers() {\n return ['_rendererOrDataChanged(renderer, owner, model, opened)'];\n }\n\n /**\n * Override to specify another element used as a renderer root,\n * e.g. slotted into the overlay, rather than overlay itself.\n * @protected\n */\n get _rendererRoot() {\n return this;\n }\n\n constructor() {\n super();\n\n this._boundMouseDownListener = this._mouseDownListener.bind(this);\n this._boundMouseUpListener = this._mouseUpListener.bind(this);\n this._boundOutsideClickListener = this._outsideClickListener.bind(this);\n this._boundKeydownListener = this._keydownListener.bind(this);\n\n /* c8 ignore next 3 */\n if (isIOS) {\n this._boundIosResizeListener = () => this._detectIosNavbar();\n }\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n // Set popover in firstUpdated before opened observers are called\n this.popover = 'manual';\n\n // Need to add dummy click listeners to this and the backdrop or else\n // the document click event listener (_outsideClickListener) may never\n // get invoked on iOS Safari (reproducible in <vaadin-dialog>\n // and <vaadin-context-menu>).\n this.addEventListener('click', () => {});\n if (this.$.backdrop) {\n this.$.backdrop.addEventListener('click', () => {});\n }\n\n this.addEventListener('mouseup', () => {\n // In Chrome, focus moves to body on overlay content mousedown\n // See https://github.com/vaadin/flow-components/issues/5507\n if (document.activeElement === document.body && this.$.overlay.getAttribute('tabindex') === '0') {\n this.$.overlay.focus();\n }\n });\n\n this.addEventListener('animationcancel', () => {\n this._flushAnimation('opening');\n this._flushAnimation('closing');\n });\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n /* c8 ignore next 3 */\n if (this._boundIosResizeListener) {\n this._detectIosNavbar();\n window.addEventListener('resize', this._boundIosResizeListener);\n }\n\n // Show popover again if overlay was just moved in the DOM\n if (this.opened) {\n this._attachOverlay();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n if (this.__scheduledOpen) {\n cancelAnimationFrame(this.__scheduledOpen);\n this.__scheduledOpen = null;\n }\n\n /* c8 ignore next 3 */\n if (this._boundIosResizeListener) {\n window.removeEventListener('resize', this._boundIosResizeListener);\n }\n }\n\n /**\n * Requests an update for the content of the overlay.\n * While performing the update, it invokes the renderer passed in the `renderer` property.\n *\n * It is not guaranteed that the update happens immediately (synchronously) after it is requested.\n */\n requestContentUpdate() {\n if (this.renderer) {\n this.renderer.call(this.owner, this._rendererRoot, this.owner, this.model);\n }\n }\n\n /**\n * @param {Event=} sourceEvent\n */\n close(sourceEvent) {\n // Dispatch the event on the overlay. Not using composed, as propagating the event through shadow roots could have\n // side effects when nesting overlays\n const event = new CustomEvent('vaadin-overlay-close', {\n bubbles: true,\n cancelable: true,\n detail: { overlay: this, sourceEvent },\n });\n this.dispatchEvent(event);\n // To allow listening for the event globally, also dispatch it on the document body\n document.body.dispatchEvent(event);\n if (!event.defaultPrevented) {\n this.opened = false;\n }\n }\n\n /**\n * Updates the coordinates of the overlay.\n * @param {!OverlayBoundsParam} bounds\n * @param {boolean} absolute\n */\n setBounds(bounds, absolute = true) {\n const overlay = this.$.overlay;\n const parsedBounds = { ...bounds };\n\n if (absolute && overlay.style.position !== 'absolute') {\n overlay.style.position = 'absolute';\n }\n\n Object.keys(parsedBounds).forEach((arg) => {\n // Allow setting width or height to `null`\n if (parsedBounds[arg] !== null && !isNaN(parsedBounds[arg])) {\n parsedBounds[arg] = `${parsedBounds[arg]}px`;\n }\n });\n\n Object.assign(overlay.style, parsedBounds);\n }\n\n /** @private */\n _detectIosNavbar() {\n /* c8 ignore next 15 */\n if (!this.opened) {\n return;\n }\n\n const innerHeight = window.innerHeight;\n const innerWidth = window.innerWidth;\n\n const landscape = innerWidth > innerHeight;\n\n const clientHeight = document.documentElement.clientHeight;\n\n if (landscape && clientHeight > innerHeight) {\n this.style.setProperty('--vaadin-overlay-viewport-bottom', `${clientHeight - innerHeight}px`);\n } else {\n this.style.setProperty('--vaadin-overlay-viewport-bottom', '0px');\n }\n }\n\n /**\n * Whether to add global listeners for closing on outside click.\n * By default, listeners are not added for a modeless overlay.\n *\n * @return {boolean}\n * @protected\n */\n _shouldAddGlobalListeners() {\n return !this.modeless;\n }\n\n /** @private */\n _addGlobalListeners() {\n if (this.__hasGlobalListeners) {\n return;\n }\n\n this.__hasGlobalListeners = true;\n\n document.addEventListener('mousedown', this._boundMouseDownListener);\n document.addEventListener('mouseup', this._boundMouseUpListener);\n // Firefox leaks click to document on contextmenu even if prevented\n // https://bugzilla.mozilla.org/show_bug.cgi?id=990614\n document.documentElement.addEventListener('click', this._boundOutsideClickListener, true);\n }\n\n /** @private */\n _removeGlobalListeners() {\n if (!this.__hasGlobalListeners) {\n return;\n }\n\n this.__hasGlobalListeners = false;\n\n document.removeEventListener('mousedown', this._boundMouseDownListener);\n document.removeEventListener('mouseup', this._boundMouseUpListener);\n document.documentElement.removeEventListener('click', this._boundOutsideClickListener, true);\n }\n\n /** @private */\n _rendererOrDataChanged(renderer, owner, model, opened) {\n const ownerOrModelChanged = this._oldOwner !== owner || this._oldModel !== model;\n this._oldModel = model;\n this._oldOwner = owner;\n\n const rendererChanged = this._oldRenderer !== renderer;\n const hasOldRenderer = this._oldRenderer !== undefined;\n this._oldRenderer = renderer;\n\n const openedChanged = this._oldOpened !== opened;\n this._oldOpened = opened;\n\n if (rendererChanged && hasOldRenderer) {\n this._rendererRoot.innerHTML = '';\n // Whenever a Lit-based renderer is used, it assigns a Lit part to the node it was rendered into.\n // When clearing the rendered content, this part needs to be manually disposed of.\n // Otherwise, using a Lit-based renderer on the same node will throw an exception or render nothing afterward.\n delete this._rendererRoot._$litPart$;\n }\n\n if (opened && renderer && (rendererChanged || openedChanged || ownerOrModelChanged)) {\n this.requestContentUpdate();\n }\n }\n\n /** @private */\n _modelessChanged(modeless) {\n if (this.opened) {\n // Add / remove listeners if modeless is changed while opened\n if (this._shouldAddGlobalListeners()) {\n this._addGlobalListeners();\n } else {\n this._removeGlobalListeners();\n }\n }\n\n if (!modeless) {\n if (this.opened) {\n this._enterModalState();\n }\n } else {\n this._exitModalState();\n }\n setOverlayStateAttribute(this, 'modeless', modeless);\n }\n\n /** @private */\n _withBackdropChanged(withBackdrop) {\n setOverlayStateAttribute(this, 'with-backdrop', withBackdrop);\n }\n\n /** @private */\n _openedChanged(opened, wasOpened) {\n if (opened) {\n // Prevent possible errors on setting `opened` to `true` while disconnected\n if (!this.isConnected) {\n this.opened = false;\n return;\n }\n\n this._saveFocus();\n\n this._animatedOpening();\n\n this.__scheduledOpen = requestAnimationFrame(() => {\n setTimeout(() => {\n this._trapFocus();\n\n // Dispatch the event on the overlay. Not using composed, as propagating the event through shadow roots\n // could have side effects when nesting overlays\n const event = new CustomEvent('vaadin-overlay-open', { detail: { overlay: this }, bubbles: true });\n this.dispatchEvent(event);\n // To allow listening for the event globally, also dispatch it on the document body\n document.body.dispatchEvent(event);\n });\n });\n\n document.addEventListener('keydown', this._boundKeydownListener);\n\n if (this._shouldAddGlobalListeners()) {\n this._addGlobalListeners();\n }\n } else if (wasOpened) {\n if (this.__scheduledOpen) {\n cancelAnimationFrame(this.__scheduledOpen);\n this.__scheduledOpen = null;\n }\n\n this._resetFocus();\n\n this._animatedClosing();\n\n document.removeEventListener('keydown', this._boundKeydownListener);\n\n if (this._shouldAddGlobalListeners()) {\n this._removeGlobalListeners();\n }\n }\n }\n\n /** @private */\n _hiddenChanged(hidden) {\n if (hidden && this.hasAttribute('closing')) {\n this._flushAnimation('closing');\n }\n }\n\n /**\n * @return {boolean}\n * @private\n */\n _shouldAnimate() {\n const style = getComputedStyle(this);\n const name = style.getPropertyValue('animation-name');\n const hidden = style.getPropertyValue('display') === 'none';\n return !hidden && name && name !== 'none';\n }\n\n /**\n * @param {string} type\n * @param {Function} callback\n * @private\n */\n _enqueueAnimation(type, callback) {\n const handler = `__${type}Handler`;\n const listener = (event) => {\n if (event && event.target !== this) {\n return;\n }\n callback();\n this.removeEventListener('animationend', listener);\n delete this[handler];\n };\n this[handler] = listener;\n this.addEventListener('animationend', listener);\n }\n\n /**\n * @param {string} type\n * @protected\n */\n _flushAnimation(type) {\n const handler = `__${type}Handler`;\n if (typeof this[handler] === 'function') {\n this[handler]();\n }\n }\n\n /** @private */\n _animatedOpening() {\n if (this._isAttached && this.hasAttribute('closing')) {\n this._flushAnimation('closing');\n }\n this._attachOverlay();\n this._appendAttachedInstance();\n this.bringToFront();\n if (!this.modeless) {\n this._enterModalState();\n }\n setOverlayStateAttribute(this, 'opening', true);\n\n if (this._shouldAnimate()) {\n this._enqueueAnimation('opening', () => {\n this._finishOpening();\n });\n } else {\n this._finishOpening();\n }\n }\n\n /** @private */\n _attachOverlay() {\n if (!this.matches(':popover-open')) {\n this.showPopover();\n }\n }\n\n /** @private */\n _finishOpening() {\n setOverlayStateAttribute(this, 'opening', false);\n }\n\n /** @private */\n _finishClosing() {\n this._detachOverlay();\n this._removeAttachedInstance();\n this.$.overlay.style.removeProperty('pointer-events');\n setOverlayStateAttribute(this, 'closing', false);\n this.dispatchEvent(new CustomEvent('vaadin-overlay-closed'));\n }\n\n /** @private */\n _animatedClosing() {\n if (this.hasAttribute('opening')) {\n this._flushAnimation('opening');\n }\n if (this._isAttached) {\n this._exitModalState();\n setOverlayStateAttribute(this, 'closing', true);\n this.dispatchEvent(new CustomEvent('vaadin-overlay-closing'));\n\n if (this._shouldAnimate()) {\n this._enqueueAnimation('closing', () => {\n this._finishClosing();\n });\n } else {\n this._finishClosing();\n }\n }\n }\n\n /** @private */\n _detachOverlay() {\n this.hidePopover();\n }\n\n /** @private */\n _mouseDownListener(event) {\n this._mouseDownInside = event.composedPath().indexOf(this.$.overlay) >= 0;\n }\n\n /** @private */\n _mouseUpListener(event) {\n this._mouseUpInside = event.composedPath().indexOf(this.$.overlay) >= 0;\n }\n\n /**\n * Whether to close the overlay on outside click or not.\n * Override this method to customize the closing logic.\n *\n * @param {Event} _event\n * @return {boolean}\n * @protected\n */\n _shouldCloseOnOutsideClick(_event) {\n return this._last;\n }\n\n /**\n * Outside click listener used in capture phase to close the overlay before\n * propagating the event to the listener on the element that triggered it.\n * Otherwise, calling `open()` would result in closing and re-opening.\n *\n * @private\n */\n _outsideClickListener(event) {\n if (event.composedPath().includes(this.$.overlay) || this._mouseDownInside || this._mouseUpInside) {\n this._mouseDownInside = false;\n this._mouseUpInside = false;\n return;\n }\n\n if (!this._shouldCloseOnOutsideClick(event)) {\n return;\n }\n\n const evt = new CustomEvent('vaadin-overlay-outside-click', {\n cancelable: true,\n detail: { sourceEvent: event },\n });\n this.dispatchEvent(evt);\n\n if (this.opened && !evt.defaultPrevented) {\n this.close(event);\n }\n }\n\n /**\n * Listener used to close whe overlay on Escape press, if it is the last one.\n * @private\n */\n _keydownListener(event) {\n if (!this._last || event.defaultPrevented) {\n return;\n }\n\n // Only close modeless overlay on Esc press when it contains focus\n if (!this._shouldAddGlobalListeners() && !event.composedPath().includes(this._focusTrapRoot)) {\n return;\n }\n\n if (event.key === 'Escape') {\n const evt = new CustomEvent('vaadin-overlay-escape-press', {\n cancelable: true,\n detail: { sourceEvent: event },\n });\n this.dispatchEvent(evt);\n\n if (this.opened && !evt.defaultPrevented) {\n this.close(event);\n }\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const menuOverlayStyles = css`\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n\n :host([right-aligned]),\n :host([end-aligned]) {\n align-items: flex-end;\n }\n\n :host([bottom-aligned]) {\n justify-content: flex-end;\n }\n\n [part='backdrop'] {\n background: transparent;\n }\n\n [part='content'] {\n padding: var(--vaadin-item-overlay-padding, 4px);\n }\n\n /* TODO keyboard focus becomes visible even when navigating the menu with the mouse */\n [part='overlay']:focus-visible {\n outline: none;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { menuOverlayStyles } from '@vaadin/context-menu/src/styles/vaadin-menu-overlay-base-styles.js';\nimport { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-base-styles.js';\n\nexport const menuBarOverlayStyles = [overlayStyles, menuOverlayStyles];\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const overlayStyles = css`\n :host {\n z-index: 200;\n position: fixed;\n\n /* Despite of what the names say, <vaadin-overlay> is just a container\n for position/sizing/alignment. The actual overlay is the overlay part. */\n\n /* Default position constraints. Themes can\n override this to adjust the gap between the overlay and the viewport. */\n inset: max(env(safe-area-inset-top, 0px), var(--vaadin-overlay-viewport-inset, 8px))\n max(env(safe-area-inset-right, 0px), var(--vaadin-overlay-viewport-inset, 8px))\n max(env(safe-area-inset-bottom, 0px), var(--vaadin-overlay-viewport-bottom))\n max(env(safe-area-inset-left, 0px), var(--vaadin-overlay-viewport-inset, 8px));\n\n /* Override native [popover] user agent styles */\n width: auto;\n height: auto;\n border: none;\n padding: 0;\n background-color: transparent;\n overflow: visible;\n\n /* Use flexbox alignment for the overlay part. */\n display: flex;\n flex-direction: column; /* makes dropdowns sizing easier */\n /* Align to center by default. */\n align-items: center;\n justify-content: center;\n\n /* Allow centering when max-width/max-height applies. */\n margin: auto;\n\n /* The host is not clickable, only the overlay part is. */\n pointer-events: none;\n\n /* Remove tap highlight on touch devices. */\n -webkit-tap-highlight-color: transparent;\n\n /* CSS API for host */\n --vaadin-overlay-viewport-bottom: 8px;\n }\n\n :host([hidden]),\n :host(:not([opened]):not([closing])),\n :host(:not([opened]):not([closing])) [part='overlay'] {\n display: none !important;\n }\n\n [part='overlay'] {\n color: var(--vaadin-overlay-text-color, var(--vaadin-text-color));\n background: var(--vaadin-overlay-background, var(--vaadin-background-color));\n border: var(--vaadin-overlay-border-width, 1px) solid\n var(--vaadin-overlay-border-color, var(--vaadin-border-color-secondary));\n border-radius: var(--vaadin-overlay-border-radius, var(--vaadin-radius-m));\n box-shadow: var(--vaadin-overlay-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3));\n box-sizing: border-box;\n max-width: 100%;\n overflow: auto;\n overscroll-behavior: contain;\n pointer-events: auto;\n -webkit-tap-highlight-color: initial;\n\n /* CSS reset for font styles */\n font: initial;\n letter-spacing: initial;\n text-align: initial;\n text-decoration: initial;\n text-indent: initial;\n text-transform: initial;\n user-select: text;\n white-space: initial;\n word-spacing: initial;\n\n /* Inherit font-family */\n font-family: inherit;\n }\n\n [part='backdrop'] {\n background: var(--vaadin-overlay-backdrop-background, rgba(0, 0, 0, 0.2));\n content: '';\n inset: 0;\n pointer-events: auto;\n position: fixed;\n z-index: -1;\n }\n\n [part='overlay']:focus-visible {\n outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);\n }\n\n @media (forced-colors: active) {\n [part='overlay'] {\n border: 3px solid !important;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { MenuOverlayMixin } from '@vaadin/context-menu/src/vaadin-menu-overlay-mixin.js';\nimport { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { menuBarOverlayStyles } from './styles/vaadin-menu-bar-overlay-base-styles.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-overlay\n * @extends HTMLElement\n * @protected\n */\nexport class MenuBarOverlay extends MenuOverlayMixin(\n OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))),\n) {\n static get is() {\n return 'vaadin-menu-bar-overlay';\n }\n\n static get styles() {\n return menuBarOverlayStyles;\n }\n\n static get lumoInjector() {\n return { ...super.lumoInjector, includeBaseStyles: true };\n }\n\n /** @protected */\n render() {\n return html`\n <div id=\"backdrop\" part=\"backdrop\" ?hidden=\"${!this.withBackdrop}\"></div>\n <div part=\"overlay\" id=\"overlay\" tabindex=\"0\">\n <div part=\"content\" id=\"content\">\n <slot></slot>\n <slot name=\"submenu\"></slot>\n </div>\n </div>\n `;\n }\n}\n\ndefineCustomElement(MenuBarOverlay);\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A controller for listening on media query changes.\n */\nexport class MediaQueryController {\n constructor(query, callback) {\n /**\n * The CSS media query to evaluate.\n *\n * @type {string}\n * @protected\n */\n this.query = query;\n\n /**\n * Function to call when media query changes.\n *\n * @type {Function}\n * @protected\n */\n this.callback = callback;\n\n this._boundQueryHandler = this._queryHandler.bind(this);\n }\n\n hostConnected() {\n this._removeListener();\n\n this._mediaQuery = window.matchMedia(this.query);\n\n this._addListener();\n\n this._queryHandler(this._mediaQuery);\n }\n\n hostDisconnected() {\n this._removeListener();\n }\n\n /** @private */\n _addListener() {\n if (this._mediaQuery) {\n this._mediaQuery.addListener(this._boundQueryHandler);\n }\n }\n\n /** @private */\n _removeListener() {\n if (this._mediaQuery) {\n this._mediaQuery.removeListener(this._boundQueryHandler);\n }\n\n this._mediaQuery = null;\n }\n\n /** @private */\n _queryHandler(mediaQuery) {\n if (typeof this.callback === 'function') {\n this.callback(mediaQuery.matches);\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nlet uniqueId = 0;\n\n/**\n * Resets the unique id counter.\n *\n * @return {void}\n */\nexport function resetUniqueId() {\n uniqueId = 0;\n}\n\n/**\n * Returns a unique integer id.\n *\n * @return {number}\n */\nexport function generateUniqueId() {\n // eslint-disable-next-line no-plusplus\n return uniqueId++;\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isEmptyTextNode } from './dom-utils.js';\nimport { SlotObserver } from './slot-observer.js';\nimport { generateUniqueId } from './unique-id-utils.js';\n\n/**\n * A controller for providing content to slot element and observing changes.\n */\nexport class SlotController extends EventTarget {\n /**\n * Ensure that every instance has unique ID.\n *\n * @param {HTMLElement} host\n * @param {string} prefix\n * @return {string}\n * @protected\n */\n static generateId(host, prefix = 'default') {\n return `${prefix}-${host.localName}-${generateUniqueId()}`;\n }\n\n constructor(host, slotName, tagName, config = {}) {\n super();\n\n const { initializer, multiple, observe, useUniqueId, uniqueIdPrefix } = config;\n\n this.host = host;\n this.slotName = slotName;\n this.tagName = tagName;\n this.observe = typeof observe === 'boolean' ? observe : true;\n this.multiple = typeof multiple === 'boolean' ? multiple : false;\n this.slotInitializer = initializer;\n\n if (multiple) {\n this.nodes = [];\n }\n\n // Only generate the default ID if requested by the controller.\n if (useUniqueId) {\n this.defaultId = this.constructor.generateId(host, uniqueIdPrefix || slotName);\n }\n }\n\n hostConnected() {\n if (!this.initialized) {\n if (this.multiple) {\n this.initMultiple();\n } else {\n this.initSingle();\n }\n\n if (this.observe) {\n this.observeSlot();\n }\n\n this.initialized = true;\n }\n }\n\n /** @protected */\n initSingle() {\n let node = this.getSlotChild();\n\n if (!node) {\n node = this.attachDefaultNode();\n this.initNode(node);\n } else {\n this.node = node;\n this.initAddedNode(node);\n }\n }\n\n /** @protected */\n initMultiple() {\n const children = this.getSlotChildren();\n\n if (children.length === 0) {\n const defaultNode = this.attachDefaultNode();\n if (defaultNode) {\n this.nodes = [defaultNode];\n this.initNode(defaultNode);\n }\n } else {\n this.nodes = children;\n children.forEach((node) => {\n this.initAddedNode(node);\n });\n }\n }\n\n /**\n * Create and attach default node using the provided tag name, if any.\n * @return {Node | undefined}\n * @protected\n */\n attachDefaultNode() {\n const { host, slotName, tagName } = this;\n\n // Check if the node was created previously and if so, reuse it.\n let node = this.defaultNode;\n\n // Tag name is optional, sometimes we don't init default content.\n if (!node && tagName) {\n node = document.createElement(tagName);\n if (node instanceof Element) {\n if (slotName !== '') {\n node.setAttribute('slot', slotName);\n }\n this.defaultNode = node;\n }\n }\n\n if (node) {\n this.node = node;\n host.appendChild(node);\n }\n\n return node;\n }\n\n /**\n * Return the list of nodes matching the slot managed by the controller.\n * @return {Node}\n */\n getSlotChildren() {\n const { slotName } = this;\n return Array.from(this.host.childNodes).filter((node) => {\n // Ignore nodes with data-slot-ignore attribute\n if (node.nodeType === Node.ELEMENT_NODE && node.hasAttribute('data-slot-ignore')) {\n return false;\n }\n // Either an element (any slot) or a text node (only un-named slot).\n return (\n (node.nodeType === Node.ELEMENT_NODE && node.slot === slotName) ||\n (node.nodeType === Node.TEXT_NODE && node.textContent.trim() && slotName === '')\n );\n });\n }\n\n /**\n * Return a reference to the node managed by the controller.\n * @return {Node}\n */\n getSlotChild() {\n return this.getSlotChildren()[0];\n }\n\n /**\n * Run `slotInitializer` for the node managed by the controller.\n *\n * @param {Node} node\n * @protected\n */\n initNode(node) {\n const { slotInitializer } = this;\n // Don't try to bind `this` to initializer (normally it's arrow function).\n // Instead, pass the host as a first argument to access component's state.\n if (slotInitializer) {\n slotInitializer(node, this.host);\n }\n }\n\n /**\n * Override to initialize the newly added custom node.\n *\n * @param {Node} _node\n * @protected\n */\n initCustomNode(_node) {}\n\n /**\n * Override to teardown slotted node when it's removed.\n *\n * @param {Node} _node\n * @protected\n */\n teardownNode(_node) {}\n\n /**\n * Run both `initCustomNode` and `initNode` for a custom slotted node.\n *\n * @param {Node} node\n * @protected\n */\n initAddedNode(node) {\n if (node !== this.defaultNode) {\n this.initCustomNode(node);\n this.initNode(node);\n }\n }\n\n /**\n * Setup the observer to manage slot content changes.\n * @protected\n */\n observeSlot() {\n const { slotName } = this;\n const selector = slotName === '' ? 'slot:not([name])' : `slot[name=${slotName}]`;\n const slot = this.host.shadowRoot.querySelector(selector);\n\n this.__slotObserver = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n const current = this.multiple ? this.nodes : [this.node];\n\n // Calling `slot.assignedNodes()` includes whitespace text nodes in case of default slot:\n // unlike comment nodes, they are not filtered out. So we need to manually ignore them.\n // Also ignore nodes with data-slot-ignore attribute.\n const newNodes = addedNodes.filter(\n (node) =>\n !isEmptyTextNode(node) &&\n !current.includes(node) &&\n !(node.nodeType === Node.ELEMENT_NODE && node.hasAttribute('data-slot-ignore')),\n );\n\n if (removedNodes.length) {\n this.nodes = current.filter((node) => !removedNodes.includes(node));\n\n removedNodes.forEach((node) => {\n this.teardownNode(node);\n });\n }\n\n if (newNodes?.length > 0) {\n if (this.multiple) {\n // Remove default node if exists\n if (this.defaultNode) {\n this.defaultNode.remove();\n }\n this.nodes = [...current, ...newNodes].filter((node) => node !== this.defaultNode);\n newNodes.forEach((node) => {\n this.initAddedNode(node);\n });\n } else {\n // Remove previous node if exists\n if (this.node) {\n this.node.remove();\n }\n this.node = newNodes[0];\n this.initAddedNode(this.node);\n }\n }\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * Controller for the tooltip slotted into `<vaadin-context-menu>`. Configures\n * the tooltip in manual mode and drives its target, context, and position\n * based on the currently hovered or focused item.\n */\nexport class ContextMenuTooltipController extends SlotController {\n constructor(host) {\n super(host, 'tooltip');\n }\n\n /** @override */\n initCustomNode(tooltipNode) {\n tooltipNode.manual = true;\n tooltipNode.generator ||= ({ item }) => item?.tooltip;\n }\n\n /** @protected */\n _getItem(target) {\n return target._item;\n }\n\n /** @protected */\n _getDefaultPosition(target) {\n const item = this._getItem(target);\n return item.children?.length > 0 && !item.disabled ? 'start' : 'end';\n }\n\n /**\n * @param {HTMLElement | null} target\n */\n setTarget(target) {\n const tooltipNode = this.node;\n if (!tooltipNode) {\n return;\n }\n\n const item = target ? this._getItem(target) : null;\n if (item?.tooltip) {\n tooltipNode.target = target;\n tooltipNode.context = { item };\n tooltipNode._position = item.tooltipPosition || this._getDefaultPosition(target);\n } else {\n tooltipNode.target = null;\n tooltipNode.context = { item: null };\n this.close(true);\n }\n }\n\n /**\n * @param {{ trigger: 'hover' | 'focus' }} options\n */\n open({ trigger }) {\n const tooltipNode = this.node;\n if (tooltipNode?.isConnected && tooltipNode.target) {\n tooltipNode._stateController.open({\n hover: trigger === 'hover',\n focus: trigger === 'focus',\n });\n }\n }\n\n bringToFront() {\n const tooltipNode = this.node;\n tooltipNode?._overlayElement?.bringToFront();\n }\n\n /**\n * @param {boolean} immediate\n */\n close(immediate) {\n const tooltipNode = this.node;\n tooltipNode?._stateController.close(immediate);\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { isTouch } from '@vaadin/component-base/src/browser-utils.js';\n\nexport const ItemsMixin = (superClass) =>\n class ItemsMixin extends superClass {\n static get properties() {\n return {\n /**\n * @typedef ContextMenuItem\n * @type {object}\n * @property {string} text - Text to be set as the menu item component's textContent\n * @property {string} tooltip - Text to be set as the menu item's tooltip.\n * Requires a `<vaadin-tooltip slot=\"tooltip\">` element to be added inside the `<vaadin-context-menu>`.\n * @property {string} tooltipPosition - Position of the item's tooltip relative to the\n * item (e.g. `end`, `top`, `bottom-start`). Items with a sub-menu default to `start`\n * to avoid overlap with the opening sub-menu; all other items, including disabled\n * ones (whose sub-menus cannot be opened), default to `end`. If the slotted\n * `<vaadin-tooltip>` has its `position` property set, that value is used instead.\n * @property {string | HTMLElement} component - The component to represent the item.\n * Either a tagName or an element instance. Defaults to \"vaadin-context-menu-item\".\n * @property {boolean} disabled - If true, the item is disabled and cannot be selected\n * @property {boolean} checked - If true, the item shows a checkmark next to it\n * @property {boolean} keepOpen - If true, the menu will not be closed on item selection\n * @property {string} className - A space-delimited list of CSS class names to be set on the menu item component.\n * @property {string | string[]} theme - If set, sets the given theme(s) as an attribute to the menu item component, overriding any theme set on the context menu.\n * @property {ContextMenuItem[]} children - Array of child menu items\n */\n\n /**\n * Defines a (hierarchical) menu structure for the component.\n * If a menu item has a non-empty `children` set, a sub-menu with the child items is opened\n * next to the parent menu on mouseover, tap or a right arrow keypress.\n *\n * The items API can't be used together with a renderer!\n *\n * #### Example\n *\n * ```javascript\n * contextMenu.items = [\n * { text: 'Menu Item 1', theme: 'primary', className: 'first', children:\n * [\n * { text: 'Menu Item 1-1', checked: true, keepOpen: true },\n * { text: 'Menu Item 1-2' }\n * ]\n * },\n * { component: 'hr' },\n * { text: 'Menu Item 2', children:\n * [\n * { text: 'Menu Item 2-1' },\n * { text: 'Menu Item 2-2', disabled: true }\n * ]\n * },\n * { text: 'Menu Item 3', disabled: true, className: 'last' }\n * ];\n * ```\n *\n * #### Item tooltips\n *\n * Menu items can have tooltips that are shown on hover and keyboard\n * focus. To enable them, add a slotted `<vaadin-tooltip>` element\n * and set the `tooltip` property on each item that should have one:\n *\n * ```html\n * <vaadin-context-menu>\n * <vaadin-tooltip slot=\"tooltip\"></vaadin-tooltip>\n * </vaadin-context-menu>\n * ```\n *\n * @type {!Array<!ContextMenuItem> | undefined}\n */\n items: {\n type: Array,\n sync: true,\n },\n\n /** @protected */\n _positionTarget: {\n type: Object,\n sync: true,\n },\n };\n }\n\n constructor() {\n super();\n\n // Overlay's outside click listener doesn't work with modeless\n // overlays (submenus) so we need additional logic for it\n this.__itemsOutsideClickListener = (e) => {\n if (this._shouldCloseOnOutsideClick(e)) {\n this.dispatchEvent(new CustomEvent('items-outside-click'));\n }\n };\n this.addEventListener('items-outside-click', () => {\n this.items && this.close();\n });\n }\n\n /**\n * Tag name prefix used by overlay, list-box and items.\n * @protected\n * @return {string}\n */\n get _tagNamePrefix() {\n return 'vaadin-context-menu';\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n // Firefox leaks click to document on contextmenu even if prevented\n // https://bugzilla.mozilla.org/show_bug.cgi?id=990614\n document.documentElement.addEventListener('click', this.__itemsOutsideClickListener);\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n document.documentElement.removeEventListener('click', this.__itemsOutsideClickListener);\n this._tooltipController.setTarget(null);\n }\n\n /**\n * Whether to close the overlay on outside click or not.\n * Override this method to customize the closing logic.\n *\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldCloseOnOutsideClick(event) {\n return !event.composedPath().some((el) => el.localName === `${this._tagNamePrefix}-overlay`);\n }\n\n /** @protected */\n __forwardFocus() {\n const overlay = this._overlayElement;\n const child = overlay._contentRoot.firstElementChild;\n // If parent item is not focused, do not focus submenu\n if (overlay.parentOverlay) {\n const parent = overlay.parentOverlay._contentRoot.querySelector('[expanded]');\n if (parent?.hasAttribute('focused') && child) {\n child.focus();\n } else {\n overlay.$.overlay.focus();\n }\n } else if (child) {\n child.focus();\n }\n }\n\n /** @private */\n __openSubMenu(subMenu, itemElement) {\n // Update sub-menu items and position target\n this.__updateSubMenuForItem(subMenu, itemElement);\n\n const parent = this._overlayElement;\n const subMenuOverlay = subMenu._overlayElement;\n // Store the reference parent overlay\n subMenuOverlay._setParentOverlay(parent);\n\n // Set theme attribute from parent element\n if (parent.hasAttribute('theme')) {\n subMenu.setAttribute('theme', parent.getAttribute('theme'));\n } else {\n subMenu.removeAttribute('theme');\n }\n\n const content = subMenuOverlay.$.content;\n content.style.minWidth = '';\n\n itemElement.dispatchEvent(\n new CustomEvent('opensubmenu', {\n detail: {\n children: itemElement._item.children,\n },\n }),\n );\n }\n\n /** @private */\n __updateSubMenuForItem(subMenu, itemElement) {\n subMenu.items = itemElement._item.children;\n subMenu.listenOn = itemElement;\n subMenu._positionTarget = itemElement;\n subMenu._overlayElement.requestContentUpdate();\n }\n\n /**\n * @param {!ContextMenuItem} item\n * @return {HTMLElement}\n * @private\n */\n __createComponent(item) {\n let component;\n\n if (item.component instanceof HTMLElement) {\n component = item.component;\n } else {\n component = document.createElement(item.component || `${this._tagNamePrefix}-item`);\n }\n\n // Support menu-bar / context-menu item\n if (component._hasVaadinItemMixin) {\n component.setAttribute('role', 'menuitem');\n component.tabIndex = -1;\n }\n\n if (component.localName === 'hr') {\n component.setAttribute('role', 'separator');\n } else {\n // Accept not `menuitem` elements e.g. `<button>`\n component.setAttribute('aria-haspopup', 'false');\n }\n\n this._setMenuItemTheme(component, item, this._theme);\n\n component._item = item;\n\n if (item.text) {\n component.textContent = item.text;\n }\n\n if (item.className) {\n component.setAttribute('class', item.className);\n }\n\n this.__toggleMenuComponentAttribute(component, 'menu-item-checked', item.checked);\n this.__toggleMenuComponentAttribute(component, 'disabled', item.disabled);\n\n if (item.children && item.children.length) {\n this.__updateExpanded(component, false);\n component.setAttribute('aria-haspopup', 'true');\n }\n\n return component;\n }\n\n /** @private */\n __initListBox() {\n const listBox = document.createElement(`${this._tagNamePrefix}-list-box`);\n\n if (this._theme) {\n listBox.setAttribute('theme', this._theme);\n }\n\n listBox.addEventListener('mouseover', (event) => {\n const itemElement = event.target.closest(`${this._tagNamePrefix}-item`);\n this._tooltipController.setTarget(itemElement);\n this._tooltipController.open({ trigger: 'hover' });\n });\n\n listBox.addEventListener('mouseleave', () => {\n this._tooltipController.close(true);\n });\n\n listBox.addEventListener('focusin', (event) => {\n if (!isKeyboardActive()) {\n return;\n }\n\n const itemElement = event.target.closest(`${this._tagNamePrefix}-item`);\n this._tooltipController.setTarget(itemElement);\n this._tooltipController.open({ trigger: 'focus' });\n });\n\n listBox.addEventListener('selected-changed', (event) => {\n const { value } = event.detail;\n if (typeof value === 'number') {\n const item = listBox.items[value]._item;\n // Reset selected before dispatching the event to prevent\n // checkmark icon flashing when `keepOpen` is set to true.\n listBox.selected = null;\n if (!item.children) {\n this.dispatchEvent(new CustomEvent('item-selected', { detail: { value: item } }));\n }\n }\n });\n\n return listBox;\n }\n\n /** @private */\n __initOverlay() {\n const overlay = this._overlayElement;\n\n overlay.$.backdrop.addEventListener('click', () => {\n this.close();\n });\n\n // Open a submenu on click event when a touch device is used.\n // On desktop, a submenu opens on hover.\n overlay.addEventListener(isTouch ? 'click' : 'mouseover', (event) => {\n // Ignore events from the submenus\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n this.__showSubMenu(event);\n });\n\n overlay.addEventListener('keydown', (event) => {\n // Ignore events from the submenus\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n const { key } = event;\n const isRTL = this.__isRTL;\n\n const isArrowRight = key === 'ArrowRight';\n const isArrowLeft = key === 'ArrowLeft';\n\n if ((!isRTL && isArrowRight) || (isRTL && isArrowLeft) || key === 'Enter' || key === ' ') {\n // Open a sub-menu\n this.__showSubMenu(event);\n } else if ((!isRTL && isArrowLeft) || (isRTL && isArrowRight) || key === 'Escape') {\n if (key === 'Escape') {\n event.stopPropagation();\n }\n // Close the menu\n this.close();\n this.listenOn.focus();\n } else if (key === 'Tab' && !event.defaultPrevented) {\n // Close all menus unless the Tab key was handled separately\n // which is the case e.g. in menu-bar with Tab navigation.\n this.dispatchEvent(new CustomEvent('close-all-menus'));\n }\n });\n }\n\n /** @private */\n __initSubMenu() {\n const subMenu = document.createElement(this.constructor.is);\n\n // The slotted `<vaadin-tooltip>` lives on the outer `<vaadin-context-menu>`\n // host. Its tooltip controller instance is shared across sub-menus to\n // reuse the same tooltip element for items at every nesting level.\n subMenu._tooltipController = this._tooltipController;\n subMenu.__parentMenu = this;\n\n subMenu._modeless = true;\n subMenu.openOn = 'opensubmenu';\n\n // Close sub-menu when the parent menu closes.\n this.addEventListener('opened-changed', (event) => {\n if (!event.detail.value) {\n this._subMenu.close();\n }\n });\n\n // Forward event to the parent menu element.\n subMenu.addEventListener('close-all-menus', () => {\n this.dispatchEvent(new CustomEvent('close-all-menus'));\n });\n\n // Forward event to the parent menu element.\n subMenu.addEventListener('item-selected', (event) => {\n const { detail } = event;\n this.dispatchEvent(new CustomEvent('item-selected', { detail }));\n });\n\n // Listen to the forwarded event from sub-menu.\n this.addEventListener('close-all-menus', () => {\n this.close();\n });\n\n // Listen to the forwarded event from sub-menu.\n this.addEventListener('item-selected', (e) => {\n const menu = e.target;\n const selectedItem = e.detail.value;\n const index = menu.items.indexOf(selectedItem);\n // Menu can be no longer opened if parent menu items changed\n if (!!selectedItem.keepOpen && index > -1 && menu.opened) {\n menu.__selectedIndex = index;\n menu.requestContentUpdate();\n } else if (!selectedItem.keepOpen) {\n this.close();\n }\n });\n\n // Mark parent item as collapsed when closing.\n subMenu.addEventListener('opened-changed', (event) => {\n const opened = event.detail.value;\n if (opened) {\n this._tooltipController.bringToFront();\n } else {\n const expandedItem = this._listBox.querySelector('[expanded]');\n if (expandedItem) {\n this.__updateExpanded(expandedItem, false);\n }\n }\n });\n\n return subMenu;\n }\n\n /** @private */\n __showSubMenu(event, item = event.composedPath().find((node) => node.localName === `${this._tagNamePrefix}-item`)) {\n // Delay enabling the mouseover listener to avoid it from triggering on parent menu open\n if (!this.__openListenerActive) {\n return;\n }\n\n // Don't open sub-menus while the menu is still opening\n if (this._overlayElement.hasAttribute('opening')) {\n requestAnimationFrame(() => {\n this.__showSubMenu(event, item);\n });\n\n return;\n }\n\n const subMenu = this._subMenu;\n const expandedItem = this._listBox.querySelector('[expanded]');\n\n if (item && item !== expandedItem && !item.disabled) {\n const { children } = item._item;\n\n // Check if the sub-menu was focused before closing it.\n const child = subMenu._overlayElement._contentRoot.firstElementChild;\n const isSubmenuFocused = child?.focused;\n\n // Mark previously expanded item as collapsed\n if (expandedItem) {\n this.__updateExpanded(expandedItem, false);\n }\n\n // Close sub-menu if there are no children for the new item\n if (!children || !children.length) {\n subMenu.close();\n }\n\n if (!this.opened) {\n return;\n }\n\n if (children?.length) {\n // Open or update the submenu if the new item has children\n this.__updateExpanded(item, true);\n this.__openSubMenu(subMenu, item);\n } else if (isSubmenuFocused) {\n // If the sub-menu item was focused, focus its parent item.\n subMenu.listenOn.focus();\n } else if (!this._listBox.focused) {\n // Otherwise, focus the overlay part to handle arrow keys.\n this._overlayElement.$.overlay.focus();\n }\n }\n\n // Only reachable with `accessibleDisabledMenuItems` enabled (disabled\n // items otherwise have `pointer-events: none` and never receive mouseover).\n if (item?.disabled) {\n subMenu.close();\n }\n }\n\n /** @protected */\n __getListBox() {\n return this._overlayElement._contentRoot.querySelector(`${this._tagNamePrefix}-list-box`);\n }\n\n /**\n * @param {!HTMLElement} root\n * @param {!ContextMenu} menu\n * @protected\n */\n __itemsRenderer(root, menu) {\n this.__initMenu(root, menu);\n\n this._subMenu.closeOn = menu.closeOn;\n this._listBox.innerHTML = '';\n\n menu.items.forEach((item) => {\n const component = this.__createComponent(item);\n this._listBox.appendChild(component);\n });\n }\n\n /** @protected */\n _setMenuItemTheme(component, item, hostTheme) {\n // Use existing component theme when it is provided\n let theme = component.getAttribute('theme') || hostTheme;\n\n // Item theme takes precedence over host theme / component theme\n // even if it's empty, as long as it's not undefined or null\n if (item.theme != null) {\n theme = Array.isArray(item.theme) ? item.theme.join(' ') : item.theme;\n }\n\n this.__updateTheme(component, theme);\n }\n\n /** @private */\n __toggleMenuComponentAttribute(component, attribute, on) {\n if (on) {\n component.setAttribute(attribute, '');\n component[`__has-${attribute}`] = true;\n } else if (component[`__has-${attribute}`]) {\n component.removeAttribute(attribute);\n component[`__has-${attribute}`] = false;\n }\n }\n\n /** @private */\n __initMenu(root, _menu) {\n // NOTE: in this method, `menu` and `this` reference the same element,\n // so we can use either of those. Original implementation used `menu`.\n if (!root.firstElementChild) {\n this.__initOverlay();\n\n const listBox = this.__initListBox();\n this._listBox = listBox;\n root.appendChild(listBox);\n\n const subMenu = this.__initSubMenu();\n subMenu.slot = 'submenu';\n this._subMenu = subMenu;\n this.appendChild(subMenu);\n\n requestAnimationFrame(() => {\n this.__openListenerActive = true;\n });\n } else {\n this.__updateTheme(this._listBox, this._theme);\n }\n }\n\n /** @private */\n __updateExpanded(component, expanded) {\n component.setAttribute('aria-expanded', expanded.toString());\n component.toggleAttribute('expanded', expanded);\n }\n\n /** @private */\n __updateTheme(component, theme) {\n if (theme) {\n component.setAttribute('theme', theme);\n } else {\n component.removeAttribute('theme');\n }\n }\n\n close() {\n if (!this.__parentMenu) {\n this._tooltipController.close(true);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isElementFocusable, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { isAndroid, isIOS } from '@vaadin/component-base/src/browser-utils.js';\nimport { addListener, deepTargetFind, gestures, removeListener } from '@vaadin/component-base/src/gestures.js';\nimport { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';\nimport { ContextMenuTooltipController } from './vaadin-context-menu-tooltip-controller.js';\nimport { ItemsMixin } from './vaadin-contextmenu-items-mixin.js';\n\nexport const ContextMenuMixin = (superClass) =>\n class ContextMenuMixinClass extends ItemsMixin(superClass) {\n static get properties() {\n return {\n /**\n * CSS selector that can be used to target any child element\n * of the context menu to listen for `openOn` events.\n */\n selector: {\n type: String,\n },\n\n /**\n * True if the overlay is currently displayed.\n */\n opened: {\n type: Boolean,\n reflectToAttribute: true,\n observer: '_openedChanged',\n value: false,\n notify: true,\n readOnly: true,\n sync: true,\n },\n\n /**\n * Event name to listen for opening the context menu.\n * @attr {string} open-on\n */\n openOn: {\n type: String,\n value: 'vaadin-contextmenu',\n sync: true,\n },\n\n /**\n * The target element that's listened to for context menu opening events.\n * By default the vaadin-context-menu listens to the target's `vaadin-contextmenu`\n * events.\n * @type {!HTMLElement}\n * @default self\n */\n listenOn: {\n type: Object,\n sync: true,\n value() {\n return this;\n },\n },\n\n /**\n * Event name to listen for closing the context menu.\n * @attr {string} close-on\n */\n closeOn: {\n type: String,\n value: 'click',\n observer: '_closeOnChanged',\n sync: true,\n },\n\n /**\n * Custom function for rendering the content of the menu overlay.\n * Receives three arguments:\n *\n * - `root` The root container DOM element. Append your content to it.\n * - `contextMenu` The reference to the `<vaadin-context-menu>` element.\n * - `context` The object with the menu context, contains:\n * - `context.target` the target of the menu opening event,\n * - `context.detail` the menu opening event detail.\n * @type {ContextMenuRenderer | undefined}\n */\n renderer: {\n type: Function,\n sync: true,\n },\n\n /**\n * When true, the menu overlay is modeless.\n * @protected\n */\n _modeless: {\n type: Boolean,\n sync: true,\n },\n\n /** @private */\n _context: {\n type: Object,\n sync: true,\n },\n\n /** @private */\n _phone: {\n type: Boolean,\n },\n\n _fullscreen: {\n type: Boolean,\n },\n\n _fullscreenMediaQuery: {\n type: String,\n value: '(max-width: 450px), (max-height: 450px)',\n },\n };\n }\n\n static get observers() {\n return [\n '_targetOrOpenOnChanged(listenOn, openOn)',\n '_rendererChanged(renderer, items)',\n '_fullscreenChanged(_fullscreen)',\n ];\n }\n\n constructor() {\n super();\n\n this._boundOpen = this.open.bind(this);\n this._boundClose = this.close.bind(this);\n this._boundPreventDefault = this._preventDefault.bind(this);\n this.__onGlobalContextMenu = this.__onGlobalContextMenu.bind(this);\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n this.__boundOnScroll = this.__onScroll.bind(this);\n window.addEventListener('scroll', this.__boundOnScroll, true);\n document.documentElement.addEventListener('contextmenu', this.__onGlobalContextMenu, true);\n\n // Restore opened state if overlay was opened when disconnecting\n if (this.__restoreOpened) {\n this._setOpened(true);\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n window.removeEventListener('scroll', this.__boundOnScroll, true);\n document.documentElement.removeEventListener('contextmenu', this.__onGlobalContextMenu, true);\n\n // Memorize opened state and defer close so that DOM moves (disconnect\n // followed by reconnect within the same task) do not close the overlay.\n this.__restoreOpened = this.opened;\n setTimeout(() => {\n if (!this.isConnected) {\n this.close();\n }\n });\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n this._overlayElement = this.$.overlay;\n\n this.addController(\n new MediaQueryController(this._fullscreenMediaQuery, (matches) => {\n this._fullscreen = matches;\n }),\n );\n\n // Sub-menus inherit the tooltip controller from their parent menu\n // (assigned before `firstUpdated` runs) to reuse the same slotted\n // `<vaadin-tooltip>` across nesting levels. Only create a new one\n // when none was inherited, i.e. on the outer host.\n if (!this._tooltipController) {\n this._tooltipController = new ContextMenuTooltipController(this);\n this.addController(this._tooltipController);\n }\n }\n\n /**\n * Runs before overlay is fully rendered\n * @private\n */\n _onOverlayOpened(event) {\n // Ignore events from submenus\n if (event.target !== this._overlayElement) {\n return;\n }\n\n const opened = event.detail.value;\n this._setOpened(opened);\n if (opened) {\n this.__alignOverlayPosition();\n }\n }\n\n /**\n * Runs after overlay is fully rendered\n * @private\n */\n _onVaadinOverlayOpen(event) {\n // Ignore events from submenus\n if (event.target !== this._overlayElement) {\n return;\n }\n\n this.__alignOverlayPosition();\n this._overlayElement.style.visibility = '';\n this.__forwardFocus();\n }\n\n /**\n * Runs after overlay's closing animation is finished\n * @private\n */\n _onVaadinOverlayClosed() {\n this.dispatchEvent(new CustomEvent('closed'));\n }\n\n /** @private */\n _targetOrOpenOnChanged(listenOn, openOn) {\n if (this._oldListenOn && this._oldOpenOn) {\n this._unlisten(this._oldListenOn, this._oldOpenOn, this._boundOpen);\n\n this._oldListenOn.style.webkitTouchCallout = '';\n this._oldListenOn.style.webkitUserSelect = '';\n this._oldListenOn.style.userSelect = '';\n\n this._oldListenOn = null;\n this._oldOpenOn = null;\n }\n\n if (listenOn && openOn) {\n this._listen(listenOn, openOn, this._boundOpen);\n\n this._oldListenOn = listenOn;\n this._oldOpenOn = openOn;\n }\n }\n\n /** @private */\n _fullscreenChanged(fullScreen) {\n this._phone = fullScreen;\n }\n\n /** @private */\n __setListenOnUserSelect(opened) {\n const value = opened ? 'none' : '';\n // Note: these styles don't seem to work in Firefox on iOS.\n this.listenOn.style.webkitTouchCallout = value;\n this.listenOn.style.webkitUserSelect = value; // Chrome, Safari, Firefox\n this.listenOn.style.userSelect = value;\n\n // Note: because user-selection is disabled on the overlay\n // before opening the menu the text could be already selected\n // so we need to clear that selection\n if (opened) {\n document.getSelection().removeAllRanges();\n }\n }\n\n /** @private */\n _closeOnChanged(closeOn, oldCloseOn) {\n // Outside click event from overlay\n const evtOverlay = 'vaadin-overlay-outside-click';\n\n const overlay = this._overlayElement;\n\n if (oldCloseOn) {\n this._unlisten(overlay, oldCloseOn, this._boundClose);\n }\n if (closeOn) {\n this._listen(overlay, closeOn, this._boundClose);\n overlay.removeEventListener(evtOverlay, this._boundPreventDefault);\n } else {\n overlay.addEventListener(evtOverlay, this._boundPreventDefault);\n }\n }\n\n /** @private */\n _preventDefault(e) {\n e.preventDefault();\n }\n\n /** @private */\n _openedChanged(opened) {\n this.__setListenOnUserSelect(opened);\n }\n\n /**\n * Requests an update for the content of the menu overlay.\n * While performing the update, it invokes the renderer passed in the `renderer` property.\n *\n * It is not guaranteed that the update happens immediately (synchronously) after it is requested.\n */\n requestContentUpdate() {\n if (!this._overlayElement) {\n return;\n }\n\n // Store state to be restored after re-rendering\n this.__preserveMenuState();\n\n // Run overlay renderer to re-create DOM elements\n this._overlayElement.requestContentUpdate();\n\n // Restore focused item, update sub-menu if needed\n this.__restoreMenuState();\n }\n\n /** @private */\n _rendererChanged(renderer, items) {\n if (items) {\n if (renderer) {\n throw new Error('The items API cannot be used together with a renderer');\n }\n\n if (this.closeOn === 'click') {\n this.closeOn = '';\n }\n }\n }\n\n /**\n * Closes the overlay.\n */\n close() {\n super.close();\n\n this._setOpened(false);\n }\n\n /**\n * Returns the composed path of the event. By default, it uses the path stored\n * at dispatch time (needed for Flow connector that opens menu asynchronously).\n * @private\n */\n __getComposedPath(e) {\n return e.__composedPath ?? e.detail?.sourceEvent?.__composedPath ?? e.composedPath();\n }\n\n /** @private */\n _contextTarget(e) {\n if (this.selector) {\n const targets = this.listenOn.querySelectorAll(this.selector);\n\n return Array.prototype.filter.call(targets, (el) => {\n return this.__getComposedPath(e).indexOf(el) > -1;\n })[0];\n } else if (this.listenOn && this.listenOn !== this && this.position) {\n // If listenOn has been set on a different element than the context menu root, then use listenOn as the target.\n return this.listenOn;\n }\n return e.target;\n }\n\n /**\n * Opens the overlay.\n * @param {!Event | undefined} e used as the context for the menu. Overlay coordinates are taken from this event.\n */\n open(e) {\n // Ignore events from the overlay\n if (this._overlayElement && this.__getComposedPath(e).includes(this._overlayElement)) {\n return;\n }\n\n if (e && !this.opened) {\n this._context = {\n detail: e.detail,\n target: this._contextTarget(e),\n };\n\n if (this._context.target) {\n e.preventDefault();\n e.stopPropagation();\n\n // Used in alignment which is delayed until overlay is rendered\n this.__x = this._getEventCoordinate(e, 'x');\n this.__pageXOffset = window.pageXOffset;\n\n this.__y = this._getEventCoordinate(e, 'y');\n this.__pageYOffset = window.pageYOffset;\n\n // Hide overlay until it is fully rendered and positioned\n this._overlayElement.style.visibility = 'hidden';\n this._setOpened(true);\n }\n }\n }\n\n /** @private */\n __preserveMenuState() {\n const listBox = this.__getListBox();\n if (listBox) {\n this.__focusedIndex = listBox.items.indexOf(listBox.focused);\n\n if (this._subMenu && this._subMenu.opened) {\n this.__subMenuIndex = listBox.items.indexOf(this._subMenu.listenOn);\n }\n }\n }\n\n /** @private */\n __restoreMenuState() {\n const focusedIndex = this.__focusedIndex;\n const subMenuIndex = this.__subMenuIndex;\n const selectedIndex = this.__selectedIndex;\n\n const listBox = this.__getListBox();\n\n if (listBox) {\n // Initialize menu items synchronously\n listBox._observer.flush();\n\n if (subMenuIndex > -1) {\n const itemToOpen = listBox.items[subMenuIndex];\n if (itemToOpen) {\n if (Array.isArray(itemToOpen._item.children) && itemToOpen._item.children.length) {\n // Keep nested sub-menu opened and update it\n this.__updateSubMenuForItem(this._subMenu, itemToOpen);\n this._subMenu.requestContentUpdate();\n } else {\n // Item no longer has children, close sub-menu\n this._subMenu.close();\n this.__focusItem(itemToOpen);\n }\n } else {\n // Item no longer exists, focus the list-box\n listBox.focus();\n }\n }\n\n // Focus previously selected item, in case it was clicked with\n // `keepOpen` option, or the previously focused item, if any\n this.__focusItem(selectedIndex > -1 ? listBox.children[selectedIndex] : listBox.items[focusedIndex]);\n }\n\n this.__focusedIndex = undefined;\n this.__subMenuIndex = undefined;\n this.__selectedIndex = undefined;\n }\n\n /** @private */\n __focusItem(item) {\n if (item) {\n item.focus({ focusVisible: isKeyboardActive() });\n }\n }\n\n /** @private */\n __onScroll() {\n if (!this.opened || this.position) {\n return;\n }\n\n const yDiff = window.pageYOffset - this.__pageYOffset;\n const xDiff = window.pageXOffset - this.__pageXOffset;\n\n this.__adjustPosition('left', -xDiff);\n this.__adjustPosition('right', xDiff);\n\n this.__adjustPosition('top', -yDiff);\n this.__adjustPosition('bottom', yDiff);\n\n this.__pageYOffset += yDiff;\n this.__pageXOffset += xDiff;\n }\n\n /** @private */\n __adjustPosition(coord, diff) {\n const overlay = this._overlayElement;\n const style = overlay.style;\n\n style[coord] = `${(parseInt(style[coord]) || 0) + diff}px`;\n }\n\n /** @private */\n __alignOverlayPosition() {\n const overlay = this._overlayElement;\n\n if (overlay.positionTarget) {\n // The overlay is positioned relative to another node, for example, a\n // menu item in a nested submenu structure where this overlay lists\n // the items for another submenu.\n // It means that the overlay positioning is controlled by\n // vaadin-overlay-position-mixin so no manual alignment is needed.\n return;\n }\n\n const style = overlay.style;\n\n // Reset all properties before measuring\n ['top', 'right', 'bottom', 'left'].forEach((prop) => style.removeProperty(prop));\n ['right-aligned', 'end-aligned', 'bottom-aligned'].forEach((attr) => overlay.removeAttribute(attr));\n\n // Maximum x and y values are imposed by content size and overlay limits.\n const { xMax, xMin, yMax } = overlay.getBoundaries();\n // Reuse saved x and y event values, in order to this method be used async\n // in the `vaadin-overlay-change` which guarantees that overlay is ready.\n // The valus represent an anchor position on the page where the contextmenu\n // event took place.\n const x = this.__x;\n const y = this.__y;\n\n // Select one overlay corner and move to the event x/y position.\n // Then set styling attrs for flex-aligning the content appropriately.\n const wdthVport = document.documentElement.clientWidth;\n const hghtVport = document.documentElement.clientHeight;\n\n if (!this.__isRTL) {\n if (x < wdthVport / 2 || x < xMax) {\n // Menu is displayed in the right side of the anchor\n style.left = `${x}px`;\n } else {\n // Menu is displayed in the left side of the anchor\n style.right = `${Math.max(0, wdthVport - x)}px`;\n this._setEndAligned(overlay);\n }\n } else if (x > wdthVport / 2 || x > xMin) {\n // Menu is displayed in the right side of the anchor\n style.right = `${Math.max(0, wdthVport - x)}px`;\n } else {\n // Menu is displayed in the left side of the anchor\n style.left = `${x}px`;\n this._setEndAligned(overlay);\n }\n\n if (y < hghtVport / 2 || y < yMax) {\n style.top = `${y}px`;\n } else {\n style.bottom = `${Math.max(0, hghtVport - y)}px`;\n overlay.setAttribute('bottom-aligned', '');\n }\n }\n\n /** @private */\n _setEndAligned(element) {\n element.setAttribute('end-aligned', '');\n if (!this.__isRTL) {\n element.setAttribute('right-aligned', '');\n }\n }\n\n /** @private */\n _getEventCoordinate(event, coord) {\n if (event.detail instanceof Object) {\n if (event.detail[coord]) {\n // Polymer gesture events, get coordinate from detail\n return event.detail[coord];\n } else if (event.detail.sourceEvent) {\n // Unwrap detailed event\n return this._getEventCoordinate(event.detail.sourceEvent, coord);\n }\n } else {\n const prop = `client${coord.toUpperCase()}`;\n const position = event.changedTouches ? event.changedTouches[0][prop] : event[prop];\n\n if (position === 0) {\n // Native keyboard event\n const target = this.__getComposedPath(event)[0] || event.target;\n const rect = target.getBoundingClientRect();\n return coord === 'x' ? rect.left : rect.top + rect.height;\n }\n // Native mouse or touch event\n return position;\n }\n }\n\n /** @private */\n _listen(node, evType, handler) {\n if (gestures[evType]) {\n addListener(node, evType, handler);\n } else {\n node.addEventListener(evType, handler);\n }\n }\n\n /** @private */\n _unlisten(node, evType, handler) {\n if (gestures[evType]) {\n removeListener(node, evType, handler);\n } else {\n node.removeEventListener(evType, handler);\n }\n }\n\n /** @private */\n __createMouseEvent(name, clientX, clientY) {\n return new MouseEvent(name, {\n bubbles: true,\n composed: true,\n cancelable: true,\n clientX,\n clientY,\n });\n }\n\n /** @private */\n __focusClosestFocusable(target) {\n let currentElement = target;\n while (currentElement) {\n if (currentElement instanceof HTMLElement && isElementFocusable(currentElement)) {\n currentElement.focus();\n return;\n }\n currentElement = currentElement.parentNode || currentElement.host;\n }\n }\n\n /**\n * Executes a synthetic contextmenu event on the target under the coordinates.\n * @private\n */\n __contextMenuAt(x, y) {\n // Get the deepest element under the coordinates\n const target = deepTargetFind(x, y);\n if (target) {\n // Need to run asynchronously to avoid timing issues with the Lit-based context menu\n queueMicrotask(() => {\n // Dispatch mousedown and mouseup to the target (grid cell focus depends on it)\n target.dispatchEvent(this.__createMouseEvent('mousedown', x, y));\n target.dispatchEvent(this.__createMouseEvent('mouseup', x, y));\n // Manually try to focus the closest focusable of the target\n this.__focusClosestFocusable(target);\n // Dispatch a contextmenu event to the target\n target.dispatchEvent(this.__createMouseEvent('contextmenu', x, y));\n });\n }\n }\n\n /** @private */\n __onGlobalContextMenu(e) {\n if (!this.opened) {\n return;\n }\n if (!e.shiftKey) {\n const isTouchDevice = isAndroid || isIOS;\n if (!isTouchDevice) {\n e.stopPropagation();\n // Prevent having the previously focused node auto-focus after closing the overlay\n this._overlayElement.__focusRestorationController.focusNode = null;\n // Dispatch another contextmenu at the same coordinates after the overlay is closed\n this._overlayElement.addEventListener(\n 'vaadin-overlay-closed',\n (closeEvent) => {\n if (closeEvent.target === this._overlayElement) {\n this.__contextMenuAt(e.clientX, e.clientY);\n }\n },\n {\n once: true,\n },\n );\n }\n\n e.preventDefault();\n this.close();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-menu-bar-item.js';\nimport './vaadin-menu-bar-list-box.js';\nimport './vaadin-menu-bar-overlay.js';\nimport { css, html, LitElement } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { ContextMenuMixin } from '@vaadin/context-menu/src/vaadin-context-menu-mixin.js';\nimport { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-submenu\n * @extends HTMLElement\n * @protected\n */\nclass MenuBarSubmenu extends ContextMenuMixin(ThemePropertyMixin(PolylitMixin(LitElement))) {\n static get is() {\n return 'vaadin-menu-bar-submenu';\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n `;\n }\n\n static get properties() {\n return {\n isRoot: {\n type: Boolean,\n reflectToAttribute: true,\n sync: true,\n },\n };\n }\n\n constructor() {\n super();\n\n this.openOn = 'opensubmenu';\n }\n\n /** @protected */\n firstUpdated(props) {\n // Tooltip lives on the parent `<vaadin-menu-bar>`. Reuse its controller\n // so the same tooltip element serves items at every nesting level.\n // Assigned before `super.firstUpdated()` so `ContextMenuMixin` skips\n // creating its own controller (we don't render a tooltip slot).\n this._tooltipController = this.parentElement._tooltipController;\n\n super.firstUpdated(props);\n }\n\n /**\n * Tag name prefix used by overlay, list-box and items.\n * @protected\n * @return {string}\n */\n get _tagNamePrefix() {\n return 'vaadin-menu-bar';\n }\n\n /** @protected */\n render() {\n return html`\n <vaadin-menu-bar-overlay\n id=\"overlay\"\n .owner=\"${this}\"\n .opened=\"${this.opened}\"\n .model=\"${this._context}\"\n .modeless=\"${this._modeless}\"\n .renderer=\"${this.__itemsRenderer}\"\n .withBackdrop=\"${this._phone}\"\n .positionTarget=\"${this._positionTarget}\"\n ?no-horizontal-overlap=\"${!this.isRoot}\"\n ?phone=\"${this._phone}\"\n theme=\"${ifDefined(this._theme)}\"\n exportparts=\"backdrop, overlay, content\"\n @opened-changed=\"${this._onOverlayOpened}\"\n @vaadin-overlay-open=\"${this._onVaadinOverlayOpen}\"\n >\n <slot name=\"overlay\"></slot>\n <slot name=\"submenu\" slot=\"submenu\"></slot>\n </vaadin-menu-bar-overlay>\n `;\n }\n\n /**\n * Overriding the observer to not toggle user-select on the host.\n * @override\n */\n _openedChanged() {\n // Do nothing\n }\n\n /**\n * Overriding the handler to not react to global \"contextmenu\" events.\n * @override\n */\n __onGlobalContextMenu() {\n // Do nothing\n }\n\n /**\n * Overriding the public method to reset expanded button state.\n */\n close() {\n super.close();\n\n // Only handle 1st level submenu\n if (this.hasAttribute('is-root')) {\n this.parentElement._close();\n }\n }\n\n /**\n * Override method from `ContextMenuMixin` to prevent closing\n * sub-menu on the same click event that was used to open it.\n *\n * @param {Event} event\n * @return {boolean}\n * @protected\n * @override\n */\n _shouldCloseOnOutsideClick(event) {\n if (this.hasAttribute('is-root') && event.composedPath().includes(this.listenOn)) {\n return false;\n }\n\n return super._shouldCloseOnOutsideClick(event);\n }\n}\n\ndefineCustomElement(MenuBarSubmenu);\n\nexport { MenuBarSubmenu };\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","const DEV_MODE_CODE_REGEXP =\n /\\/\\*[\\*!]\\s+vaadin-dev-mode:start([\\s\\S]*)vaadin-dev-mode:end\\s+\\*\\*\\//i;\n\nconst FlowClients = window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients;\n\nfunction isMinified() {\n function test() {\n /** vaadin-dev-mode:start\n return false;\n vaadin-dev-mode:end **/\n return true;\n }\n return uncommentAndRun(test);\n}\n\nfunction isDevelopmentMode() {\n try {\n if (isForcedDevelopmentMode()) {\n return true;\n }\n\n if (!isLocalhost()) {\n return false;\n }\n\n if (FlowClients) {\n return !isFlowProductionMode();\n }\n\n return !isMinified();\n } catch (e) {\n // Some error in this code, assume production so no further actions will be taken\n return false;\n }\n}\n\nfunction isForcedDevelopmentMode() {\n return localStorage.getItem(\"vaadin.developmentmode.force\");\n}\n\nfunction isLocalhost() {\n return ([\"localhost\",\"127.0.0.1\"].indexOf(window.location.hostname) >= 0);\n}\n\nfunction isFlowProductionMode() {\n if (FlowClients) {\n const productionModeApps = Object.keys(FlowClients)\n .map(key => FlowClients[key])\n .filter(client => client.productionMode);\n if (productionModeApps.length > 0) {\n return true;\n }\n }\n return false;\n}\n\nfunction uncommentAndRun(callback, args) {\n if (typeof callback !== 'function') {\n return;\n }\n\n const match = DEV_MODE_CODE_REGEXP.exec(callback.toString());\n if (match) {\n try {\n // requires CSP: script-src 'unsafe-eval'\n callback = new Function(match[1]);\n } catch (e) {\n // eat the exception\n console.log('vaadin-development-mode-detector: uncommentAndRun() failed', e)\n }\n }\n\n return callback(args);\n}\n\n// A guard against polymer-modulizer removing the window.Vaadin\n// initialization above.\nwindow['Vaadin'] = window['Vaadin'] || {};\n\n/**\n * Inspects the source code of the given `callback` function for\n * specially-marked _commented_ code. If such commented code is found in the\n * callback source, uncomments and runs that code instead of the callback\n * itself. Otherwise runs the callback as is.\n *\n * The optional arguments are passed into the callback / uncommented code,\n * the result is returned.\n *\n * See the `isMinified()` function source code in this file for an example.\n *\n */\nexport const runIfDevelopmentMode = function(callback, args) {\n if (window.Vaadin.developmentMode) {\n return uncommentAndRun(callback, args);\n }\n};\n\nif (window.Vaadin.developmentMode === undefined) {\n window.Vaadin.developmentMode = isDevelopmentMode();\n}\n","/* This file is autogenerated from src/vaadin-usage-statistics.tpl.html */\n/*\n\nThis script gathers usage statistics from the application running in development mode.\n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n*/\n/*\n FIXME(polymer-modulizer): the above comments were extracted\n from HTML and may be out of place here. Review them and\n then delete this comment!\n*/\nimport { runIfDevelopmentMode } from '@vaadin/vaadin-development-mode-detector/vaadin-development-mode-detector.js';\n\nfunction maybeGatherAndSendStats() {\n /*! vaadin-dev-mode:start\n (function () {\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar getPolymerVersion = function getPolymerVersion() {\n return window.Polymer && window.Polymer.version;\n};\n\nvar StatisticsGatherer = function () {\n function StatisticsGatherer(logger) {\n classCallCheck(this, StatisticsGatherer);\n\n this.now = new Date().getTime();\n this.logger = logger;\n }\n\n createClass(StatisticsGatherer, [{\n key: 'frameworkVersionDetectors',\n value: function frameworkVersionDetectors() {\n return {\n 'Flow': function Flow() {\n if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {\n var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {\n return window.Vaadin.Flow.clients[key];\n }).filter(function (client) {\n return client.getVersionInfo;\n }).map(function (client) {\n return client.getVersionInfo().flow;\n });\n if (flowVersions.length > 0) {\n return flowVersions[0];\n }\n }\n },\n 'Vaadin Framework': function VaadinFramework() {\n if (window.vaadin && window.vaadin.clients) {\n var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {\n return client.getVersionInfo;\n }).map(function (client) {\n return client.getVersionInfo().vaadinVersion;\n });\n if (frameworkVersions.length > 0) {\n return frameworkVersions[0];\n }\n }\n },\n 'AngularJs': function AngularJs() {\n if (window.angular && window.angular.version && window.angular.version) {\n return window.angular.version.full;\n }\n },\n 'Angular': function Angular() {\n if (window.ng) {\n var tags = document.querySelectorAll(\"[ng-version]\");\n if (tags.length > 0) {\n return tags[0].getAttribute(\"ng-version\");\n }\n return \"Unknown\";\n }\n },\n 'Backbone.js': function BackboneJs() {\n if (window.Backbone) {\n return window.Backbone.VERSION;\n }\n },\n 'React': function React() {\n var reactSelector = '[data-reactroot], [data-reactid]';\n if (!!document.querySelector(reactSelector)) {\n // React does not publish the version by default\n return \"unknown\";\n }\n },\n 'Ember': function Ember() {\n if (window.Em && window.Em.VERSION) {\n return window.Em.VERSION;\n } else if (window.Ember && window.Ember.VERSION) {\n return window.Ember.VERSION;\n }\n },\n 'jQuery': function (_jQuery) {\n function jQuery() {\n return _jQuery.apply(this, arguments);\n }\n\n jQuery.toString = function () {\n return _jQuery.toString();\n };\n\n return jQuery;\n }(function () {\n if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {\n return jQuery.prototype.jquery;\n }\n }),\n 'Polymer': function Polymer() {\n var version = getPolymerVersion();\n if (version) {\n return version;\n }\n },\n 'LitElement': function LitElement() {\n var version = window.litElementVersions && window.litElementVersions[0];\n if (version) {\n return version;\n }\n },\n 'LitHtml': function LitHtml() {\n var version = window.litHtmlVersions && window.litHtmlVersions[0];\n if (version) {\n return version;\n }\n },\n 'Vue.js': function VueJs() {\n if (window.Vue) {\n return window.Vue.version;\n }\n }\n };\n }\n }, {\n key: 'getUsedVaadinElements',\n value: function getUsedVaadinElements(elements) {\n var version = getPolymerVersion();\n var elementClasses = void 0;\n // NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.\n // Check all locations calling the method getEntries() in\n // https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106\n // Currently it is only used by BootstrapHandler.\n if (version && version.indexOf('2') === 0) {\n // Polymer 2: components classes are stored in window.Vaadin\n elementClasses = Object.keys(window.Vaadin).map(function (c) {\n return window.Vaadin[c];\n }).filter(function (c) {\n return c.is;\n });\n } else {\n // Polymer 3: components classes are stored in window.Vaadin.registrations\n elementClasses = window.Vaadin.registrations || [];\n }\n elementClasses.forEach(function (klass) {\n var version = klass.version ? klass.version : \"0.0.0\";\n elements[klass.is] = { version: version };\n });\n }\n }, {\n key: 'getUsedVaadinThemes',\n value: function getUsedVaadinThemes(themes) {\n ['Lumo', 'Material'].forEach(function (themeName) {\n var theme;\n var version = getPolymerVersion();\n if (version && version.indexOf('2') === 0) {\n // Polymer 2: themes are stored in window.Vaadin\n theme = window.Vaadin[themeName];\n } else {\n // Polymer 3: themes are stored in custom element registry\n theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');\n }\n if (theme && theme.version) {\n themes[themeName] = { version: theme.version };\n }\n });\n }\n }, {\n key: 'getFrameworks',\n value: function getFrameworks(frameworks) {\n var detectors = this.frameworkVersionDetectors();\n Object.keys(detectors).forEach(function (framework) {\n var detector = detectors[framework];\n try {\n var version = detector();\n if (version) {\n frameworks[framework] = { version: version };\n }\n } catch (e) {}\n });\n }\n }, {\n key: 'gather',\n value: function gather(storage) {\n var storedStats = storage.read();\n var gatheredStats = {};\n var types = [\"elements\", \"frameworks\", \"themes\"];\n\n types.forEach(function (type) {\n gatheredStats[type] = {};\n if (!storedStats[type]) {\n storedStats[type] = {};\n }\n });\n\n var previousStats = JSON.stringify(storedStats);\n\n this.getUsedVaadinElements(gatheredStats.elements);\n this.getFrameworks(gatheredStats.frameworks);\n this.getUsedVaadinThemes(gatheredStats.themes);\n\n var now = this.now;\n types.forEach(function (type) {\n var keys = Object.keys(gatheredStats[type]);\n keys.forEach(function (key) {\n if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {\n storedStats[type][key] = { firstUsed: now };\n }\n // Discards any previously logged version number\n storedStats[type][key].version = gatheredStats[type][key].version;\n storedStats[type][key].lastUsed = now;\n });\n });\n\n var newStats = JSON.stringify(storedStats);\n storage.write(newStats);\n if (newStats != previousStats && Object.keys(storedStats).length > 0) {\n this.logger.debug(\"New stats: \" + newStats);\n }\n }\n }]);\n return StatisticsGatherer;\n}();\n\nvar StatisticsStorage = function () {\n function StatisticsStorage(key) {\n classCallCheck(this, StatisticsStorage);\n\n this.key = key;\n }\n\n createClass(StatisticsStorage, [{\n key: 'read',\n value: function read() {\n var localStorageStatsString = localStorage.getItem(this.key);\n try {\n return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');\n } catch (e) {\n return {};\n }\n }\n }, {\n key: 'write',\n value: function write(data) {\n localStorage.setItem(this.key, data);\n }\n }, {\n key: 'clear',\n value: function clear() {\n localStorage.removeItem(this.key);\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n var storedStats = this.read();\n var empty = true;\n Object.keys(storedStats).forEach(function (key) {\n if (Object.keys(storedStats[key]).length > 0) {\n empty = false;\n }\n });\n\n return empty;\n }\n }]);\n return StatisticsStorage;\n}();\n\nvar StatisticsSender = function () {\n function StatisticsSender(url, logger) {\n classCallCheck(this, StatisticsSender);\n\n this.url = url;\n this.logger = logger;\n }\n\n createClass(StatisticsSender, [{\n key: 'send',\n value: function send(data, errorHandler) {\n var logger = this.logger;\n\n if (navigator.onLine === false) {\n logger.debug(\"Offline, can't send\");\n errorHandler();\n return;\n }\n logger.debug(\"Sending data to \" + this.url);\n\n var req = new XMLHttpRequest();\n req.withCredentials = true;\n req.addEventListener(\"load\", function () {\n // Stats sent, nothing more to do\n logger.debug(\"Response: \" + req.responseText);\n });\n req.addEventListener(\"error\", function () {\n logger.debug(\"Send failed\");\n errorHandler();\n });\n req.addEventListener(\"abort\", function () {\n logger.debug(\"Send aborted\");\n errorHandler();\n });\n req.open(\"POST\", this.url);\n req.setRequestHeader(\"Content-Type\", \"application/json\");\n req.send(data);\n }\n }]);\n return StatisticsSender;\n}();\n\nvar StatisticsLogger = function () {\n function StatisticsLogger(id) {\n classCallCheck(this, StatisticsLogger);\n\n this.id = id;\n }\n\n createClass(StatisticsLogger, [{\n key: '_isDebug',\n value: function _isDebug() {\n return localStorage.getItem(\"vaadin.\" + this.id + \".debug\");\n }\n }, {\n key: 'debug',\n value: function debug(msg) {\n if (this._isDebug()) {\n console.info(this.id + \": \" + msg);\n }\n }\n }]);\n return StatisticsLogger;\n}();\n\nvar UsageStatistics = function () {\n function UsageStatistics() {\n classCallCheck(this, UsageStatistics);\n\n this.now = new Date();\n this.timeNow = this.now.getTime();\n this.gatherDelay = 10; // Delay between loading this file and gathering stats\n this.initialDelay = 24 * 60 * 60;\n\n this.logger = new StatisticsLogger(\"statistics\");\n this.storage = new StatisticsStorage(\"vaadin.statistics.basket\");\n this.gatherer = new StatisticsGatherer(this.logger);\n this.sender = new StatisticsSender(\"https://tools.vaadin.com/usage-stats/submit\", this.logger);\n }\n\n createClass(UsageStatistics, [{\n key: 'maybeGatherAndSend',\n value: function maybeGatherAndSend() {\n var _this = this;\n\n if (localStorage.getItem(UsageStatistics.optOutKey)) {\n return;\n }\n this.gatherer.gather(this.storage);\n setTimeout(function () {\n _this.maybeSend();\n }, this.gatherDelay * 1000);\n }\n }, {\n key: 'lottery',\n value: function lottery() {\n return true;\n }\n }, {\n key: 'currentMonth',\n value: function currentMonth() {\n return this.now.getYear() * 12 + this.now.getMonth();\n }\n }, {\n key: 'maybeSend',\n value: function maybeSend() {\n var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));\n var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));\n\n if (!firstUse) {\n // Use a grace period to avoid interfering with tests, incognito mode etc\n firstUse = this.timeNow;\n localStorage.setItem(UsageStatistics.firstUseKey, firstUse);\n }\n\n if (this.timeNow < firstUse + this.initialDelay * 1000) {\n this.logger.debug(\"No statistics will be sent until the initial delay of \" + this.initialDelay + \"s has passed\");\n return;\n }\n if (this.currentMonth() <= monthProcessed) {\n this.logger.debug(\"This month has already been processed\");\n return;\n }\n localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());\n // Use random sampling\n if (this.lottery()) {\n this.logger.debug(\"Congratulations, we have a winner!\");\n } else {\n this.logger.debug(\"Sorry, no stats from you this time\");\n return;\n }\n\n this.send();\n }\n }, {\n key: 'send',\n value: function send() {\n // Ensure we have the latest data\n this.gatherer.gather(this.storage);\n\n // Read, send and clean up\n var data = this.storage.read();\n data[\"firstUse\"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));\n data[\"usageStatisticsVersion\"] = UsageStatistics.version;\n var info = 'This request contains usage statistics gathered from the application running in development mode. \\n\\nStatistics gathering is automatically disabled and excluded from production builds.\\n\\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\\n\\n\\n\\n';\n var self = this;\n this.sender.send(info + JSON.stringify(data), function () {\n // Revert the 'month processed' flag\n localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);\n });\n }\n }], [{\n key: 'version',\n get: function get$1() {\n return '2.1.2';\n }\n }, {\n key: 'firstUseKey',\n get: function get$1() {\n return 'vaadin.statistics.firstuse';\n }\n }, {\n key: 'monthProcessedKey',\n get: function get$1() {\n return 'vaadin.statistics.monthProcessed';\n }\n }, {\n key: 'optOutKey',\n get: function get$1() {\n return 'vaadin.statistics.optout';\n }\n }]);\n return UsageStatistics;\n}();\n\ntry {\n window.Vaadin = window.Vaadin || {};\n window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();\n window.Vaadin.usageStatsChecker.maybeGatherAndSend();\n} catch (e) {\n // Intentionally ignored as this is not a problem in the app being developed\n}\n\n}());\n\n vaadin-dev-mode:end **/\n}\n\nexport const usageStatistics = function() {\n if (typeof runIfDevelopmentMode === 'function') {\n return runIfDevelopmentMode(maybeGatherAndSendStats);\n }\n};\n","/**\n * @license\n * Copyright (c) 2022 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from './slot-controller.js';\n\n/**\n * A controller that manages the slotted tooltip element.\n */\nexport class TooltipController extends SlotController {\n constructor(host) {\n // Do not provide slot factory to create tooltip lazily.\n super(host, 'tooltip');\n\n this.setTarget(host);\n this.__onContentChange = this.__onContentChange.bind(this);\n }\n\n /**\n * Override to initialize the newly added custom tooltip.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n initCustomNode(tooltipNode) {\n tooltipNode.target = this.target;\n\n if (this.ariaTarget !== undefined) {\n tooltipNode.ariaTarget = this.ariaTarget;\n }\n\n if (this.context !== undefined) {\n tooltipNode.context = this.context;\n }\n\n if (this.manual !== undefined) {\n tooltipNode.manual = this.manual;\n }\n\n if (this.position !== undefined) {\n tooltipNode._position = this.position;\n }\n\n if (this.shouldShow !== undefined) {\n tooltipNode.shouldShow = this.shouldShow;\n }\n\n if (!this.manual) {\n this.host.setAttribute('has-tooltip', '');\n }\n this.__notifyChange(tooltipNode);\n tooltipNode.addEventListener('content-changed', this.__onContentChange);\n }\n\n /**\n * Override to notify the host when the tooltip is removed.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n teardownNode(tooltipNode) {\n if (!this.manual) {\n this.host.removeAttribute('has-tooltip');\n }\n tooltipNode.removeEventListener('content-changed', this.__onContentChange);\n this.__notifyChange(null);\n }\n\n /**\n * Set an HTML element for linking with the tooltip overlay\n * via `aria-describedby` attribute used by screen readers.\n * @param {HTMLElement} ariaTarget\n */\n setAriaTarget(ariaTarget) {\n this.ariaTarget = ariaTarget;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.ariaTarget = ariaTarget;\n }\n }\n\n /**\n * Set a context object to be used by generator.\n * @param {object} context\n */\n setContext(context) {\n this.context = context;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.context = context;\n }\n }\n\n /**\n * Toggle manual state on the slotted tooltip.\n * @param {boolean} manual\n */\n setManual(manual) {\n this.manual = manual;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.manual = manual;\n }\n }\n\n /**\n * Set default position for the slotted tooltip.\n * This can be overridden by setting the position\n * using corresponding property or attribute.\n * @param {string} position\n */\n setPosition(position) {\n this.position = position;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode._position = position;\n }\n }\n\n /**\n * Set function used to detect whether to show\n * the tooltip based on a condition.\n * @param {Function} shouldShow\n */\n setShouldShow(shouldShow) {\n this.shouldShow = shouldShow;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.shouldShow = shouldShow;\n }\n }\n\n /**\n * Set an HTML element to attach the tooltip to.\n * @param {HTMLElement} target\n */\n setTarget(target) {\n this.target = target;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.target = target;\n }\n }\n\n /**\n * Schedule opening the slotted tooltip. Respects the tooltip's\n * configured `hoverDelay` / `focusDelay` and the shared warm-up state.\n * No-op when no tooltip is slotted.\n *\n * @param {{ hover?: boolean, focus?: boolean, immediate?: boolean }} [options]\n */\n open(options) {\n const tooltipNode = this.node;\n if (tooltipNode?.isConnected) {\n tooltipNode._stateController.open(options);\n }\n }\n\n /**\n * Schedule closing the slotted tooltip. Respects the tooltip's\n * configured `hideDelay` unless `immediate` is true.\n * No-op when no tooltip is slotted.\n *\n * @param {boolean} [immediate]\n */\n close(immediate) {\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode._stateController.close(immediate);\n }\n }\n\n /** @private */\n __onContentChange(event) {\n this.__notifyChange(event.target);\n }\n\n /** @private */\n __notifyChange(node) {\n this.dispatchEvent(new CustomEvent('tooltip-changed', { detail: { node } }));\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/component-base/src/styles/style-props.js';\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n gap: var(--vaadin-button-gap, 0 var(--vaadin-gap-s));\n white-space: var(--vaadin-button-label-wrap, normal);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n user-select: none;\n cursor: var(--vaadin-clickable-cursor);\n box-sizing: border-box;\n flex-shrink: 0;\n height: var(--vaadin-button-height, fit-content);\n margin: var(--vaadin-button-margin, 0);\n padding: var(--vaadin-button-padding, var(--vaadin-padding-block-container) var(--vaadin-padding-inline-container));\n font-family: var(--vaadin-button-font-family, inherit);\n font-size: var(--vaadin-button-font-size, inherit);\n line-height: var(--vaadin-button-line-height, inherit);\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--vaadin-button-text-color, var(--vaadin-text-color));\n background: var(--vaadin-button-background, var(--vaadin-background-container));\n background-origin: border-box;\n border: var(--vaadin-button-border-width, 1px) solid\n var(--vaadin-button-border-color, var(--vaadin-border-color-secondary));\n border-radius: var(--vaadin-button-border-radius, var(--vaadin-radius-m));\n touch-action: manipulation;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n .vaadin-button-container,\n [part='prefix'],\n [part='suffix'] {\n display: contents;\n }\n\n [part='label'] {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n :host(:is([focus-ring], :focus-visible)) {\n outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);\n outline-offset: 1px;\n }\n\n :host([theme~='primary']) {\n --vaadin-button-background: var(--vaadin-text-color);\n --vaadin-button-text-color: var(--vaadin-background-color);\n --vaadin-button-border-color: transparent;\n }\n\n :host([theme~='tertiary']) {\n background: transparent;\n border-color: transparent;\n }\n\n :host([disabled]) {\n pointer-events: var(--_vaadin-button-disabled-pointer-events, none);\n cursor: var(--vaadin-disabled-cursor);\n opacity: 0.5;\n }\n\n :host([disabled][theme~='primary']) {\n --vaadin-button-text-color: var(--vaadin-background-container-strong);\n --vaadin-button-background: var(--vaadin-text-color-disabled);\n }\n\n @media (forced-colors: active) {\n :host {\n --vaadin-button-border-width: 1px;\n --vaadin-button-background: ButtonFace;\n --vaadin-button-text-color: ButtonText;\n }\n\n :host([theme~='primary']) {\n forced-color-adjust: none;\n --vaadin-button-background: CanvasText;\n --vaadin-button-text-color: Canvas;\n --vaadin-icon-color: Canvas;\n }\n\n ::slotted(*) {\n forced-color-adjust: auto;\n }\n\n :host([disabled]) {\n --vaadin-button-background: transparent !important;\n --vaadin-button-border-color: GrayText !important;\n --vaadin-button-text-color: GrayText !important;\n opacity: 1;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { DisabledMixin } from './disabled-mixin.js';\n\n/**\n * A mixin to toggle the `tabindex` attribute.\n *\n * The attribute is set to -1 whenever the user disables the element\n * and restored with the last known value once the element is enabled.\n */\nexport const TabindexMixin = (superclass) =>\n class TabindexMixinClass extends DisabledMixin(superclass) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @protected\n */\n tabindex: {\n type: Number,\n reflectToAttribute: true,\n observer: '_tabindexChanged',\n sync: true,\n },\n\n /**\n * Stores the last known tabindex since the element has been disabled.\n *\n * @protected\n */\n _lastTabIndex: {\n type: Number,\n },\n };\n }\n\n /**\n * When the element gets disabled, the observer saves the last known tabindex\n * and makes the element not focusable by setting tabindex to -1.\n * As soon as the element gets enabled, the observer restores the last known tabindex\n * so that the element can be focusable again.\n *\n * @protected\n * @override\n */\n _disabledChanged(disabled, oldDisabled) {\n super._disabledChanged(disabled, oldDisabled);\n\n if (this.__shouldAllowFocusWhenDisabled()) {\n return;\n }\n\n if (disabled) {\n if (this.tabindex !== undefined) {\n this._lastTabIndex = this.tabindex;\n }\n this.setAttribute('tabindex', '-1');\n } else if (oldDisabled) {\n if (this._lastTabIndex !== undefined) {\n this.setAttribute('tabindex', this._lastTabIndex);\n } else {\n this.tabindex = undefined;\n }\n }\n }\n\n /**\n * When the user has changed tabindex while the element is disabled,\n * the observer reverts tabindex to -1 and rather saves the new tabindex value to apply it later.\n * The new value will be applied as soon as the element becomes enabled.\n *\n * @protected\n */\n _tabindexChanged(tabindex) {\n if (this.__shouldAllowFocusWhenDisabled()) {\n return;\n }\n\n if (this.disabled && tabindex !== -1) {\n this._lastTabIndex = tabindex;\n this.setAttribute('tabindex', '-1');\n }\n }\n\n /**\n * Overrides the native `focus` method in order to prevent\n * focusing the element when it is disabled. Note, setting\n * `tabindex` to -1 does not prevent the element from being\n * programmatically focusable.\n *\n * @param {FocusOptions=} options\n * @protected\n * @override\n */\n focus(options) {\n if (!this.disabled || this.__shouldAllowFocusWhenDisabled()) {\n super.focus(options);\n }\n }\n\n /**\n * Returns whether the component should be focusable when disabled.\n * Returns false by default.\n *\n * @private\n * @return {boolean}\n */\n __shouldAllowFocusWhenDisabled() {\n return false;\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\nconst INTERACTION_EVENTS = ['mousedown', 'mouseup', 'click', 'dblclick', 'keypress', 'keydown', 'keyup'];\n\n/**\n * A mixin providing common button functionality.\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n constructor() {\n super();\n\n this.__onInteractionEvent = this.__onInteractionEvent.bind(this);\n\n INTERACTION_EVENTS.forEach((eventType) => {\n this.addEventListener(eventType, this.__onInteractionEvent, true);\n });\n\n // Set tabindex to 0 by default\n this.tabindex = 0;\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n\n if (this.__shouldAllowFocusWhenDisabled()) {\n this.style.setProperty('--_vaadin-button-disabled-pointer-events', 'auto');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n\n /** @private */\n __onInteractionEvent(event) {\n if (this.__shouldSuppressInteractionEvent(event)) {\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Returns whether to suppress interaction events like `click`, `keydown`, etc.\n * By default suppresses all interaction events when the button is disabled.\n *\n * @private\n */\n __shouldSuppressInteractionEvent(_event) {\n return this.disabled;\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles } from './styles/vaadin-button-base-styles.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description\n * ---------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard\n * `disabled` | Set when the button is disabled\n * `focus-ring` | Set when the button is focused using the keyboard\n * `focused` | Set when the button is focused\n * `has-tooltip` | Set when the button has a slotted tooltip\n *\n * The following custom CSS properties are available for styling:\n *\n * Custom CSS property |\n * :----------------------------------|\n * | `--vaadin-button-background` |\n * | `--vaadin-button-border-color` |\n * | `--vaadin-button-border-radius` |\n * | `--vaadin-button-border-width` |\n * | `--vaadin-button-font-size` |\n * | `--vaadin-button-font-weight` |\n * | `--vaadin-button-gap` |\n * | `--vaadin-button-height` |\n * | `--vaadin-button-label-wrap` |\n * | `--vaadin-button-line-height` |\n * | `--vaadin-button-margin` |\n * | `--vaadin-button-padding` |\n * | `--vaadin-button-text-color` |\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement vaadin-button\n * @extends HTMLElement\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get styles() {\n return buttonStyles;\n }\n\n static get properties() {\n return {\n /**\n * When disabled, the button is rendered as \"dimmed\".\n *\n * By default, disabled buttons are not focusable and don't react to hover.\n * As a result, they are hidden from assistive technologies, and it's not\n * possible to show a tooltip to explain why they are disabled. This can\n * be addressed by enabling the feature flag `accessibleDisabledButtons`,\n * which makes disabled buttons focusable and hoverable, while still\n * preventing them from being activated:\n *\n * ```js\n * // Set before any button is attached to the DOM.\n * window.Vaadin.featureFlags.accessibleDisabledButtons = true\n * ```\n */\n disabled: {\n type: Boolean,\n value: false,\n observer: '_disabledChanged',\n reflectToAttribute: true,\n sync: true,\n },\n };\n }\n\n /** @protected */\n render() {\n return html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n\n <slot name=\"tooltip\"></slot>\n </div>\n `;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n\n /** @override */\n __shouldAllowFocusWhenDisabled() {\n return window.Vaadin.featureFlags.accessibleDisabledButtons;\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const menuBarButtonStyles = css`\n :host {\n flex-shrink: 0;\n }\n\n :host([focus-ring]) {\n z-index: 1;\n }\n\n :host([slot='overflow']) {\n margin-inline-end: 0;\n }\n\n .vaadin-button-container {\n gap: inherit;\n }\n\n :host(:not([slot='overflow'])[aria-haspopup]) [part='suffix'] {\n display: flex;\n align-items: center;\n gap: inherit;\n }\n\n :host(:not([slot='overflow'])[aria-haspopup]) [part='suffix']::after {\n background: currentColor;\n content: '';\n height: var(--vaadin-icon-size, 1lh);\n mask: var(--_vaadin-icon-chevron-down) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;\n width: var(--vaadin-icon-size, 1lh);\n }\n\n ::slotted(vaadin-menu-bar-item) {\n padding: 0;\n gap: 0;\n }\n\n ::slotted(vaadin-menu-bar-item)::after {\n display: none;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { Button } from '@vaadin/button/src/vaadin-button.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { menuBarButtonStyles } from './styles/vaadin-menu-bar-button-base-styles.js';\n\n/**\n * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.\n *\n * @customElement vaadin-menu-bar-button\n * @extends Button\n * @private\n */\nclass MenuBarButton extends Button {\n static get is() {\n return 'vaadin-menu-bar-button';\n }\n\n static get styles() {\n return [super.styles, menuBarButtonStyles];\n }\n\n /**\n * Override method inherited from `ButtonMixin` to set a flag based on whether the key\n * is Enter and Space. Unlike mouse click, these keys should also focus the first item.\n * This flag is used in menu bar to identify the action that triggered the click.\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n this.__triggeredWithActiveKeys = this._activeKeys.includes(event.key);\n super._onKeyDown(event);\n this.__triggeredWithActiveKeys = null;\n }\n\n /**\n * Override to preserve the `active` attribute while the button's\n * sub-menu is expanded, so that the pressed visual state remains.\n *\n * @param {boolean} active\n * @protected\n * @override\n */\n _setActive(active) {\n if (!active && this.hasAttribute('expanded')) {\n return;\n }\n super._setActive(active);\n }\n\n /**\n * Override method inherited from `ButtonMixin` to allow keyboard navigation with\n * arrow keys in the menu bar when the button is focusable in the disabled state.\n *\n * @override\n */\n __shouldSuppressInteractionEvent(event) {\n if (event.type === 'keydown' && ['ArrowLeft', 'ArrowRight'].includes(event.key)) {\n return false;\n }\n\n return super.__shouldSuppressInteractionEvent(event);\n }\n}\n\ndefineCustomElement(MenuBarButton);\n\nexport { MenuBarButton };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const menuBarStyles = css`\n :host {\n display: block;\n min-width: 0;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n [part='container'] {\n display: flex;\n flex-wrap: nowrap;\n position: relative;\n width: 100%;\n --_gap: var(--vaadin-menu-bar-gap, 0px);\n --_bw: var(--vaadin-button-border-width, 1px);\n gap: var(--_gap);\n --_rad-button: var(--vaadin-button-border-radius, var(--vaadin-radius-m));\n }\n\n :host(:not([has-single-button])) ::slotted(vaadin-menu-bar-button:not(:first-of-type)) {\n margin-inline-start: min(var(--_bw) * -1 + var(--_gap) * 1000, 0px);\n }\n\n ::slotted(vaadin-menu-bar-button) {\n border-radius: 0;\n }\n\n ::slotted([first-visible]),\n :host([has-single-button]) ::slotted([slot='overflow']),\n ::slotted(vaadin-menu-bar-button[theme~='tertiary']) {\n border-start-start-radius: var(--_rad-button);\n border-end-start-radius: var(--_rad-button);\n }\n\n ::slotted(:is([last-visible], [slot='overflow'])),\n ::slotted(vaadin-menu-bar-button[theme~='tertiary']) {\n border-start-end-radius: var(--_rad-button);\n border-end-end-radius: var(--_rad-button);\n }\n\n :host([theme~='end-aligned']) ::slotted(vaadin-menu-bar-button[first-visible]),\n :host([theme~='end-aligned'][has-single-button]) ::slotted(vaadin-menu-bar-button) {\n margin-inline-start: auto;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2025 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nfunction deepMerge(target, ...sources) {\n const isArray = (item) => Array.isArray(item);\n const isObject = (item) => item && typeof item === 'object' && !isArray(item);\n const merge = (target, source) => {\n if (isObject(source) && isObject(target)) {\n Object.keys(source).forEach((key) => {\n const sourceValue = source[key];\n if (isObject(sourceValue)) {\n if (!target[key]) {\n target[key] = {};\n }\n merge(target[key], sourceValue);\n } else if (isArray(sourceValue)) {\n target[key] = [...sourceValue];\n } else if (sourceValue !== undefined && sourceValue !== null) {\n target[key] = sourceValue;\n }\n });\n }\n };\n\n sources.forEach((source) => {\n merge(target, source);\n });\n\n return target;\n}\n\n/**\n * A mixin that allows to set partial I18N properties.\n *\n * Subclasses provide their default values by overriding the\n * `defaultI18n` static getter:\n *\n * ```js\n * static get defaultI18n() {\n * return { foo: 'Foo', bar: 'Bar' };\n * }\n * ```\n */\nexport const I18nMixin = (superClass) =>\n class I18nMixinClass extends superClass {\n static get properties() {\n return {\n // Even though the property is overridden by a custom getter/setter, it needs to be declared here to initialize\n // __effectiveI18n properly if the i18n property is set before upgrading the element.\n i18n: {\n type: Object,\n },\n\n /** @private */\n __effectiveI18n: {\n type: Object,\n sync: true,\n },\n };\n }\n\n /**\n * Default I18N values. Must be overridden by subclasses with actual defaults.\n *\n * @protected\n * @return {Object}\n */\n static get defaultI18n() {\n return {};\n }\n\n constructor() {\n super();\n\n this.i18n = deepMerge({}, this.constructor.defaultI18n);\n }\n\n /**\n * The object used to localize this component. To change the default\n * localization, replace this with an object that provides all properties, or\n * just the individual properties you want to change.\n *\n * Should be overridden by subclasses to provide a custom JSDoc with the\n * default I18N properties.\n *\n * @type {Object}\n */\n get i18n() {\n return this.__customI18n;\n }\n\n set i18n(value) {\n if (value === this.__customI18n) {\n return;\n }\n this.__customI18n = value;\n this.__effectiveI18n = deepMerge({}, this.constructor.defaultI18n, this.__customI18n);\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\n\nconst observer = new ResizeObserver((entries) => {\n setTimeout(() => {\n entries.forEach((entry) => {\n if (!entry.target.isConnected) {\n return;\n }\n\n // Notify child resizables, if any\n if (entry.target.resizables) {\n entry.target.resizables.forEach((resizable) => {\n resizable._onResize(entry.contentRect);\n });\n } else {\n entry.target._onResize(entry.contentRect);\n }\n });\n });\n});\n\n/**\n * A mixin that uses a ResizeObserver to listen to host size changes.\n */\nconst ResizeMixinImplementation = (superclass) =>\n class ResizeMixinClass extends superclass {\n /**\n * When true, the parent element resize will be also observed.\n * Override this getter and return `true` to enable this.\n *\n * @protected\n */\n get _observeParent() {\n return false;\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n observer.observe(this);\n\n if (this._observeParent) {\n const parent = this.parentNode instanceof ShadowRoot ? this.parentNode.host : this.parentNode;\n\n if (!parent.resizables) {\n parent.resizables = new Set();\n observer.observe(parent);\n }\n\n parent.resizables.add(this);\n this.__parent = parent;\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n observer.unobserve(this);\n\n const parent = this.__parent;\n if (this._observeParent && parent) {\n const resizables = parent.resizables;\n\n if (resizables) {\n resizables.delete(this);\n\n if (resizables.size === 0) {\n observer.unobserve(parent);\n }\n }\n\n this.__parent = null;\n }\n }\n\n /**\n * A handler invoked on host resize. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @protected\n */\n _onResize(_contentRect) {\n // To be implemented.\n }\n };\n\nexport const ResizeMixin = dedupeMixin(ResizeMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ContextMenuTooltipController } from '@vaadin/context-menu/src/vaadin-context-menu-tooltip-controller.js';\n\n/**\n * Controller for the tooltip slotted into `<vaadin-menu-bar>`. Extends\n * `ContextMenuTooltipController` to also support menu-bar buttons as\n * targets, in addition to sub-menu items.\n */\nexport class MenuBarTooltipController extends ContextMenuTooltipController {\n /** @override */\n _getItem(target) {\n if (target.localName === 'vaadin-menu-bar-button') {\n return target.item;\n }\n\n return super._getItem(target);\n }\n\n /** @override */\n _getDefaultPosition(target) {\n if (target.localName === 'vaadin-menu-bar-button') {\n return 'bottom';\n }\n\n return super._getDefaultPosition(target);\n }\n}\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, noChange, nothing, render } from 'lit';\nimport { Directive, directive } from 'lit/directive.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { isElementFocused, isElementHidden, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { KeyboardDirectionMixin } from '@vaadin/a11y-base/src/keyboard-direction-mixin.js';\nimport { microTask } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';\nimport { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\nimport { MenuBarTooltipController } from './vaadin-menu-bar-tooltip-controller.js';\n\n/**\n * Custom Lit directive for rendering item components\n * inspired by the `flowComponentDirective` logic.\n */\nclass ItemComponentDirective extends Directive {\n update(part, [{ component, text }]) {\n const { parentNode, startNode } = part;\n\n const newNode = component || (text ? document.createTextNode(text) : null);\n const oldNode = this.getOldNode(part);\n\n if (oldNode === newNode) {\n return noChange;\n } else if (oldNode && newNode) {\n parentNode.replaceChild(newNode, oldNode);\n } else if (oldNode) {\n parentNode.removeChild(oldNode);\n } else if (newNode) {\n startNode.after(newNode);\n }\n\n return noChange;\n }\n\n getOldNode(part) {\n const { startNode, endNode } = part;\n if (startNode.nextSibling === endNode) {\n return null;\n }\n return startNode.nextSibling;\n }\n}\n\nconst componentDirective = directive(ItemComponentDirective);\n\nconst DEFAULT_I18N = {\n moreOptions: 'More options',\n};\n\nexport const MenuBarMixin = (superClass) =>\n class MenuBarMixinClass extends I18nMixin(\n KeyboardDirectionMixin(ResizeMixin(FocusMixin(DisabledMixin(superClass)))),\n ) {\n static get properties() {\n return {\n /**\n * @typedef MenuBarItem\n * @type {object}\n * @property {string} text - Text to be set as the menu button component's textContent.\n * @property {string} tooltip - Text to be set as the menu button's tooltip.\n * Requires a `<vaadin-tooltip slot=\"tooltip\">` element to be added inside the `<vaadin-menu-bar>`.\n * @property {string} tooltipPosition - Position of the button's tooltip relative to\n * the button (e.g. `bottom`, `top-start`). Defaults to `bottom`. If the slotted\n * `<vaadin-tooltip>` has its `position` property set, that value is used instead.\n * @property {string | HTMLElement} component - The component to represent the button content.\n * Either a tagName or an element instance. Defaults to \"vaadin-menu-bar-item\".\n * @property {boolean} disabled - If true, the button is disabled and cannot be activated.\n * @property {string | string[]} theme - Theme(s) to be set as the theme attribute of the button, overriding any theme set on the menu bar.\n * @property {SubMenuItem[]} children - Array of submenu items.\n */\n\n /**\n * @typedef SubMenuItem\n * @type {object}\n * @property {string} text - Text to be set as the menu item component's textContent.\n * @property {string} tooltip - Text to be set as the menu item's tooltip.\n * Requires a `<vaadin-tooltip slot=\"tooltip\">` element to be added inside the `<vaadin-menu-bar>`.\n * @property {string} tooltipPosition - Position of the item's tooltip relative to the\n * item (e.g. `end`, `top`, `bottom-start`). Items with a sub-menu default to `start`\n * to avoid overlap with the opening sub-menu; all other items, including disabled\n * ones (whose sub-menus cannot be opened), default to `end`. If the slotted\n * `<vaadin-tooltip>` has its `position` property set, that value is used instead.\n * @property {string | HTMLElement} component - The component to represent the item.\n * Either a tagName or an element instance. Defaults to \"vaadin-menu-bar-item\".\n * @property {boolean} disabled - If true, the item is disabled and cannot be selected.\n * @property {boolean} checked - If true, the item shows a checkmark next to it.\n * @property {SubMenuItem[]} children - Array of child submenu items.\n */\n\n /**\n * Defines a hierarchical structure, where root level items represent menu bar buttons,\n * and `children` property configures a submenu with items to be opened below\n * the button on click, Enter, Space, Up and Down arrow keys.\n *\n * #### Example\n *\n * ```js\n * menubar.items = [\n * {\n * text: 'File',\n * className: 'file',\n * children: [\n * {text: 'Open', className: 'file open'}\n * {text: 'Auto Save', checked: true},\n * ]\n * },\n * {component: 'hr'},\n * {\n * text: 'Edit',\n * children: [\n * {text: 'Undo', disabled: true},\n * {text: 'Redo'}\n * ]\n * },\n * {text: 'Help'}\n * ];\n * ```\n *\n * #### Disabled items\n *\n * When disabled, menu bar items are rendered as \"dimmed\".\n *\n * By default, disabled items are not focusable and don't react to hover.\n * As a result, they are hidden from assistive technologies, and it's not\n * possible to show a tooltip to explain why they are disabled. This can be\n * addressed by enabling several feature flags, which makes disabled items\n * focusable and hoverable, while still preventing them from being activated:\n *\n * ```js\n * // Allow focus and hover interactions with disabled menu bar root items (buttons)\n * window.Vaadin.featureFlags.accessibleDisabledButtons = true;\n *\n * // Allow focus and hover interactions with disabled menu bar sub-menu items\n * window.Vaadin.featureFlags.accessibleDisabledMenuItems = true;\n * ```\n *\n * Both flags must be set before any menu bar is attached to the DOM.\n *\n * #### Item tooltips\n *\n * Buttons and sub-menu items can have tooltips that are shown on\n * hover and keyboard focus. To enable them, add a slotted\n * `<vaadin-tooltip>` element and set the `tooltip` property on\n * each item that should have one:\n *\n * ```html\n * <vaadin-menu-bar>\n * <vaadin-tooltip slot=\"tooltip\"></vaadin-tooltip>\n * </vaadin-menu-bar>\n * ```\n *\n * @type {!Array<!MenuBarItem>}\n */\n items: {\n type: Array,\n sync: true,\n value: () => [],\n },\n\n /**\n * If true, the submenu will open on hover (mouseover) instead of click.\n * @attr {boolean} open-on-hover\n */\n openOnHover: {\n type: Boolean,\n },\n\n /**\n * If true, the buttons will be collapsed into the overflow menu\n * starting from the \"start\" end of the bar instead of the \"end\".\n * @attr {boolean} reverse-collapse\n */\n reverseCollapse: {\n type: Boolean,\n sync: true,\n },\n\n /**\n * If true, the top-level menu items is traversable by tab\n * instead of arrow keys (i.e. disabling roving tabindex)\n * @attr {boolean} tab-navigation\n */\n tabNavigation: {\n type: Boolean,\n sync: true,\n },\n };\n }\n\n static get defaultI18n() {\n return DEFAULT_I18N;\n }\n\n /**\n * The object used to localize this component. To change the default\n * localization, replace this with an object that provides all properties, or\n * just the individual properties you want to change.\n *\n * The object has the following JSON structure and default values:\n * ```js\n * {\n * moreOptions: 'More options'\n * }\n * ```\n * @type {!MenuBarI18n}\n */\n get i18n() {\n return super.i18n;\n }\n\n set i18n(value) {\n super.i18n = value;\n }\n\n constructor() {\n super();\n this.__boundOnContextMenuKeydown = this.__onContextMenuKeydown.bind(this);\n }\n\n /**\n * Override getter from `KeyboardDirectionMixin`\n * to use expanded button for arrow navigation\n * when the sub-menu is opened and has focus.\n *\n * @return {Element | null}\n * @protected\n * @override\n */\n get focused() {\n return (this._getItems() || []).find(isElementFocused) || this._expandedButton;\n }\n\n /**\n * Override getter from `KeyboardDirectionMixin`.\n *\n * @return {boolean}\n * @protected\n * @override\n */\n get _vertical() {\n return false;\n }\n\n /**\n * Override getter from `KeyboardDirectionMixin`.\n *\n * @return {boolean}\n * @protected\n * @override\n */\n get _tabNavigation() {\n return this.tabNavigation;\n }\n\n /**\n * Override getter from `ResizeMixin` to observe parent.\n *\n * @protected\n * @override\n */\n get _observeParent() {\n return true;\n }\n\n /**\n * @return {!Array<!HTMLElement>}\n * @protected\n */\n get _buttons() {\n return Array.from(this.querySelectorAll('vaadin-menu-bar-button'));\n }\n\n /** @private */\n get _hasOverflow() {\n return this._overflow && !this._overflow.hasAttribute('hidden');\n }\n\n /** @private */\n set _hasOverflow(hasOverflow) {\n if (this._overflow) {\n this._overflow.toggleAttribute('hidden', !hasOverflow);\n }\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.setAttribute('role', 'menubar');\n\n this._subMenuController = new SlotController(this, 'submenu', 'vaadin-menu-bar-submenu', {\n initializer: (menu) => {\n menu.setAttribute('is-root', '');\n\n menu.addEventListener('item-selected', this.__onItemSelected.bind(this));\n menu.addEventListener('close-all-menus', this.__onEscapeClose.bind(this));\n\n const overlay = menu._overlayElement;\n overlay._contentRoot.addEventListener('keydown', this.__boundOnContextMenuKeydown);\n\n this._subMenu = menu;\n },\n });\n\n this._overflowController = new SlotController(this, 'overflow', 'vaadin-menu-bar-button', {\n initializer: (btn) => {\n btn.setAttribute('hidden', '');\n\n const dots = document.createElement('div');\n dots.setAttribute('aria-hidden', 'true');\n dots.innerHTML = '&centerdot;'.repeat(3);\n btn.appendChild(dots);\n\n btn.setAttribute('aria-haspopup', 'true');\n btn.setAttribute('aria-expanded', 'false');\n btn.setAttribute('role', this.tabNavigation ? 'button' : 'menuitem');\n\n this._overflow = btn;\n },\n });\n\n this._tooltipController = new MenuBarTooltipController(this);\n\n this.addEventListener('mousedown', () => this._tooltipController.close(true));\n this.addEventListener('mouseleave', () => this._tooltipController.close());\n\n this.addController(this._tooltipController);\n this.addController(this._subMenuController);\n this.addController(this._overflowController);\n\n this._container = this.shadowRoot.querySelector('[part=\"container\"]');\n }\n\n /** @protected */\n updated(props) {\n super.updated(props);\n\n if (props.has('items') || props.has('_theme') || props.has('disabled')) {\n this.__renderButtons(this.items);\n }\n\n if (props.has('items') || props.has('_theme') || props.has('reverseCollapse')) {\n this.__scheduleOverflow();\n }\n\n if (props.has('items')) {\n this.__updateSubMenu();\n }\n\n if (props.has('_theme')) {\n this._themeChanged(this._theme);\n }\n\n if (props.has('disabled')) {\n this._overflow.toggleAttribute('disabled', this.disabled);\n }\n\n if (props.has('tabNavigation')) {\n this._tabNavigationChanged(this.tabNavigation);\n }\n\n if (props.has('__effectiveI18n')) {\n this.__i18nChanged(this.__effectiveI18n);\n }\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin`\n * to use the list of menu-bar buttons as items.\n *\n * @return {Element[]}\n * @protected\n * @override\n */\n _getItems() {\n return this._buttons;\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this._tooltipController.setTarget(null);\n }\n\n /**\n * Implement callback from `ResizeMixin` to update buttons\n * and detect whether to show or hide the overflow button.\n *\n * @protected\n * @override\n */\n _onResize() {\n this.__scheduleOverflow();\n }\n\n /** @private */\n _themeChanged(theme) {\n if (theme) {\n this._overflow.setAttribute('theme', theme);\n this._subMenu.setAttribute('theme', theme);\n } else {\n this._overflow.removeAttribute('theme');\n this._subMenu.removeAttribute('theme');\n }\n }\n\n /** @private */\n _tabNavigationChanged(tabNavigation) {\n const target = this.querySelector('[tabindex=\"0\"]');\n this._buttons.forEach((btn) => {\n if (target) {\n this._setTabindex(btn, btn === target);\n } else {\n this._setTabindex(btn, false);\n }\n btn.setAttribute('role', tabNavigation ? 'button' : 'menuitem');\n });\n\n this.setAttribute('role', tabNavigation ? 'group' : 'menubar');\n }\n\n /** @private */\n __updateSubMenu() {\n const subMenu = this._subMenu;\n if (subMenu?.opened) {\n const button = subMenu._positionTarget;\n\n // Close sub-menu if the corresponding button is no longer in the DOM,\n // or if the item on it has been changed to no longer have children.\n if (!button.isConnected || !Array.isArray(button.item.children) || button.item.children.length === 0) {\n subMenu.close();\n }\n }\n }\n\n /** @private */\n __i18nChanged(effectiveI18n) {\n if (effectiveI18n?.moreOptions !== undefined) {\n if (effectiveI18n.moreOptions) {\n this._overflow.setAttribute('aria-label', effectiveI18n.moreOptions);\n } else {\n this._overflow.removeAttribute('aria-label');\n }\n }\n }\n\n /** @private */\n __getOverflowCount(overflow) {\n // We can't use optional chaining due to webpack 4\n return (overflow.item && overflow.item.children && overflow.item.children.length) || 0;\n }\n\n /** @private */\n __restoreButtons(buttons) {\n buttons.forEach((button) => {\n button.style.visibility = '';\n button.style.position = '';\n button.style.width = '';\n\n // Teleport item component back from \"overflow\" sub-menu\n const item = button.item && button.item.component;\n if (item instanceof HTMLElement && item.getAttribute('role') === 'menuitem') {\n this.__restoreItem(button, item);\n }\n });\n this.__updateOverflow([]);\n }\n\n /** @private */\n __restoreItem(button, item) {\n button.appendChild(item);\n item.removeAttribute('role');\n item.removeAttribute('aria-expanded');\n item.removeAttribute('aria-haspopup');\n item.removeAttribute('tabindex');\n }\n\n /** @private */\n __updateOverflow(items) {\n this._overflow.item = { children: items };\n this._hasOverflow = items.length > 0;\n }\n\n /** @private */\n __setOverflowItems(buttons, overflow) {\n const container = this._container;\n\n // Prevent the container from shrinking while buttons are being hidden.\n // The host has min-width: 0 so it can shrink inside flex/grid layouts.\n // Without this lock, hiding a button reduces the host width, which\n // shrinks the container (width: 100%), shifting all button positions\n // and causing a cascading collapse where every button appears to overflow.\n container.style.minWidth = `${container.offsetWidth}px`;\n\n if (container.offsetWidth < container.scrollWidth) {\n this._hasOverflow = true;\n\n const isRTL = this.__isRTL;\n const containerLeft = container.offsetLeft;\n\n const remaining = [...buttons];\n while (remaining.length) {\n const lastButton = remaining[remaining.length - 1];\n const btnLeft = lastButton.offsetLeft - containerLeft;\n\n // If this button isn't overflowing, then the rest aren't either\n if (\n (!isRTL && btnLeft + lastButton.offsetWidth < container.offsetWidth - overflow.offsetWidth) ||\n (isRTL && btnLeft >= overflow.offsetWidth)\n ) {\n break;\n }\n\n const btn = this.reverseCollapse ? remaining.shift() : remaining.pop();\n\n // Save width for buttons with component\n btn.style.width = getComputedStyle(btn).width;\n btn.style.visibility = 'hidden';\n btn.style.position = 'absolute';\n }\n\n const items = buttons.filter((b) => !remaining.includes(b)).map((b) => b.item);\n this.__updateOverflow(items);\n }\n\n container.style.minWidth = '';\n }\n\n /** @private */\n __scheduleOverflow() {\n this._overflowDebouncer = Debouncer.debounce(this._overflowDebouncer, microTask, () => {\n this.__detectOverflow();\n });\n }\n\n /** @private */\n __detectOverflow() {\n const overflow = this._overflow;\n const buttons = this._buttons.filter((btn) => btn !== overflow);\n const oldOverflowCount = this.__getOverflowCount(overflow);\n\n // Reset all buttons in the menu bar and the overflow button\n this.__restoreButtons(buttons);\n\n // Hide any overflowing buttons and put them in the 'overflow' button\n this.__setOverflowItems(buttons, overflow);\n\n const newOverflowCount = this.__getOverflowCount(overflow);\n if (oldOverflowCount !== newOverflowCount && this._subMenu.opened) {\n this._subMenu.close();\n }\n\n const isSingleButton = newOverflowCount === buttons.length || (newOverflowCount === 0 && buttons.length === 1);\n this.toggleAttribute('has-single-button', isSingleButton);\n\n // Collect visible buttons to detect if tabindex should be updated\n const visibleButtons = buttons.filter((btn) => btn.style.visibility !== 'hidden');\n\n if (!visibleButtons.length) {\n // If all buttons except overflow are hidden, set tabindex on it\n this._overflow.setAttribute('tabindex', '0');\n } else if (!visibleButtons.some((btn) => btn.getAttribute('tabindex') === '0')) {\n // Ensure there is at least one button with tabindex set to 0\n // so that menu-bar is not skipped when navigating with Tab\n this._setTabindex(visibleButtons[visibleButtons.length - 1], true);\n }\n\n // Apply first/last visible attributes to the visible buttons\n visibleButtons.forEach((btn, index, visibleButtons) => {\n btn.toggleAttribute('first-visible', index === 0);\n btn.toggleAttribute('last-visible', !this._hasOverflow && index === visibleButtons.length - 1);\n });\n }\n\n /** @private */\n __getButtonTheme(item, hostTheme) {\n let theme = hostTheme;\n\n // Item theme takes precedence over host theme even if it's empty, as long as it's not undefined or null\n const itemTheme = item?.theme;\n if (itemTheme != null) {\n theme = Array.isArray(itemTheme) ? itemTheme.join(' ') : itemTheme;\n }\n\n return theme;\n }\n\n /** @private */\n __getComponent(item) {\n const itemComponent = item.component;\n let component;\n\n const isElement = itemComponent instanceof HTMLElement;\n // Use existing item component, if any\n if (isElement && itemComponent.localName === 'vaadin-menu-bar-item') {\n component = itemComponent;\n } else {\n component = document.createElement('vaadin-menu-bar-item');\n component.appendChild(isElement ? itemComponent : document.createElement(itemComponent));\n }\n if (item.text) {\n const node = component.firstChild || component;\n node.textContent = item.text;\n }\n return component;\n }\n\n /** @private */\n __renderButtons(items = []) {\n render(\n html`\n ${items.map((item) => {\n const itemCopy = { ...item };\n const hasChildren = Boolean(item?.children);\n\n if (itemCopy.component) {\n const component = this.__getComponent(itemCopy);\n itemCopy.component = component;\n component.item = itemCopy;\n }\n\n return html`\n <vaadin-menu-bar-button\n .item=\"${itemCopy}\"\n .disabled=\"${this.disabled || item.disabled}\"\n role=\"${this.tabNavigation ? 'button' : 'menuitem'}\"\n aria-haspopup=\"${ifDefined(hasChildren ? 'true' : nothing)}\"\n aria-expanded=\"${ifDefined(hasChildren ? 'false' : nothing)}\"\n class=\"${ifDefined(item.className || nothing)}\"\n theme=\"${ifDefined(this.__getButtonTheme(item, this._theme) || nothing)}\"\n @click=\"${this.__onRootButtonClick}\"\n >${componentDirective(itemCopy)}</vaadin-menu-bar-button\n >\n `;\n })}\n `,\n this,\n { renderBefore: this._overflow },\n );\n }\n\n /** @private */\n __onRootButtonClick(event) {\n const button = event.target;\n // Propagate click event from button to the item component if it was outside\n // it e.g. by calling `click()` on the button (used by the Flow counterpart).\n if (button.item && button.item.component && !event.composedPath().includes(button.item.component)) {\n event.stopPropagation();\n button.item.component.click();\n }\n }\n\n /** @protected */\n _setExpanded(button, expanded) {\n button.toggleAttribute('expanded', expanded);\n button.toggleAttribute('active', expanded);\n button.setAttribute('aria-expanded', expanded ? 'true' : 'false');\n }\n\n /** @protected */\n _setTabindex(button, focused) {\n if (this.tabNavigation && this._isItemFocusable(button)) {\n button.setAttribute('tabindex', '0');\n } else {\n button.setAttribute('tabindex', focused ? '0' : '-1');\n }\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin`\n * to close the submenu for the previously focused button\n * and open another one for the newly focused button.\n *\n * @param {Element} item\n * @param {FocusOptions=} options\n * @param {boolean} navigating\n * @protected\n * @override\n */\n _focusItem(button, options, navigating) {\n const wasExpanded = navigating && this.focused === this._expandedButton;\n if (wasExpanded) {\n this._close();\n }\n\n super._focusItem(button, options, navigating);\n\n this._buttons.forEach((btn) => {\n this._setTabindex(btn, btn === button);\n });\n\n this._tooltipController.setTarget(button);\n\n if (wasExpanded && button.item && button.item.children) {\n this.__openSubMenu(button, true, { keepFocus: true });\n } else if (!this._subMenu.opened) {\n this._tooltipController.open({ trigger: 'focus' });\n }\n }\n\n /** @private */\n _getButtonFromEvent(e) {\n return Array.from(e.composedPath()).find((el) => el.localName === 'vaadin-menu-bar-button');\n }\n\n /**\n * Override method inherited from `FocusMixin`\n *\n * @override\n * @protected\n */\n _shouldSetFocus(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return false;\n }\n return super._shouldSetFocus(event);\n }\n\n /**\n * Override method inherited from `FocusMixin`\n *\n * @override\n * @protected\n */\n _shouldRemoveFocus(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return false;\n }\n return super._shouldRemoveFocus(event);\n }\n\n /**\n * Override method inherited from `FocusMixin`\n *\n * @param {boolean} focused\n * @override\n * @protected\n */\n _setFocused(focused) {\n const target = focused ? this.__getFocusTarget() : null;\n if (target) {\n this._tooltipController.setTarget(target);\n\n this._buttons.forEach((btn) => {\n this._setTabindex(btn, btn === target);\n });\n\n if (!this._subMenu.opened && isKeyboardActive()) {\n this._tooltipController.open({ trigger: 'focus' });\n }\n } else {\n this._tooltipController.close(true);\n }\n }\n\n /** @private */\n __getFocusTarget() {\n // First, check if focus is moving to a visible button\n let target = this._buttons.find((btn) => isElementFocused(btn));\n\n if (!target) {\n const selector = this.tabNavigation ? '[focused]' : '[tabindex=\"0\"]';\n // Next, check if there is a button that could be focused but is hidden\n target = this.querySelector(`vaadin-menu-bar-button${selector}`);\n\n if (isElementHidden(target)) {\n target = this._buttons[this._getFocusableIndex()];\n }\n }\n\n return target;\n }\n\n /**\n * @param {!KeyboardEvent} event\n * @private\n */\n _onArrowDown(event) {\n // Prevent page scroll.\n event.preventDefault();\n\n const button = this._getButtonFromEvent(event);\n if (button === this._expandedButton) {\n // Menu opened previously, focus first item\n this._focusFirstItem();\n } else {\n this.__openSubMenu(button, true);\n }\n }\n\n /**\n * @param {!KeyboardEvent} event\n * @private\n */\n _onArrowUp(event) {\n // Prevent page scroll.\n event.preventDefault();\n\n const button = this._getButtonFromEvent(event);\n if (button === this._expandedButton) {\n // Menu opened previously, focus last item\n this._focusLastItem();\n } else {\n this.__openSubMenu(button, true, { focusLast: true });\n }\n }\n\n /**\n * Override an event listener from `KeyboardMixin`:\n * - to close the sub-menu for expanded button,\n * - to close a tooltip for collapsed button.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onEscape(event) {\n if (event.composedPath().includes(this._expandedButton)) {\n this._close(true);\n }\n\n this._tooltipController.close(true);\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n this._handleKeyDown(event);\n }\n\n /** @private */\n _handleKeyDown(event) {\n switch (event.key) {\n case 'ArrowDown':\n this._onArrowDown(event);\n break;\n case 'ArrowUp':\n this._onArrowUp(event);\n break;\n default:\n super._onKeyDown(event);\n break;\n }\n }\n\n /**\n * @param {!MouseEvent} event\n * @protected\n */\n _onMouseOver(event) {\n // Ignore events from the submenu\n if (event.composedPath().includes(this._subMenu)) {\n return;\n }\n\n const button = this._getButtonFromEvent(event);\n this._tooltipController.setTarget(button);\n\n if (button && button !== this._expandedButton) {\n // Switch sub-menu when moving cursor over another button\n // with children, regardless of whether openOnHover is set.\n // If the button has no children, keep the sub-menu opened.\n if (button.item.children && (this.openOnHover || this._subMenu.opened)) {\n this.__openSubMenu(button, false);\n }\n }\n\n if (!this._subMenu.opened) {\n this._tooltipController.open({ trigger: 'hover' });\n }\n }\n\n /** @private */\n __onContextMenuKeydown(e) {\n const item = Array.from(e.composedPath()).find((el) => el._item);\n if (item) {\n const list = item.parentNode;\n if (e.keyCode === 38 && item === list.items[0]) {\n this._close(true);\n }\n // ArrowLeft, or ArrowRight on non-parent submenu item,\n if (e.keyCode === 37 || (e.keyCode === 39 && !item._item.children)) {\n // Prevent ArrowLeft from being handled in context-menu\n e.stopImmediatePropagation();\n this._handleKeyDown(e);\n }\n\n if (e.key === 'Tab' && this.tabNavigation) {\n this._handleKeyDown(e);\n }\n }\n }\n\n /** @private */\n __fireItemSelected(value) {\n this.dispatchEvent(new CustomEvent('item-selected', { detail: { value } }));\n }\n\n /** @private */\n __onButtonClick(e) {\n const button = this._getButtonFromEvent(e);\n if (button) {\n this.__openSubMenu(button, button.__triggeredWithActiveKeys);\n }\n }\n\n /** @private */\n __openSubMenu(button, keydown, options = {}) {\n if (button.disabled) {\n return;\n }\n\n const subMenu = this._subMenu;\n const item = button.item;\n\n if (subMenu.opened) {\n this._close();\n if (subMenu.listenOn === button) {\n return;\n }\n }\n\n const items = item?.children;\n if (!items || items.length === 0) {\n this.__fireItemSelected(item);\n return;\n }\n\n subMenu.items = items;\n subMenu.listenOn = button;\n subMenu._positionTarget = button;\n const overlay = subMenu._overlayElement;\n overlay.noVerticalOverlap = true;\n\n this._tooltipController.close(true);\n\n this._expandedButton = button;\n this._setExpanded(button, true);\n\n this.style.pointerEvents = 'auto';\n\n button.dispatchEvent(\n new CustomEvent('opensubmenu', {\n detail: {\n children: items,\n },\n }),\n );\n\n overlay.addEventListener(\n 'vaadin-overlay-open',\n () => {\n if (options.focusLast) {\n this._focusLastItem();\n }\n\n if (options.keepFocus) {\n const focusOptions = { focusVisible: isKeyboardActive() };\n this._focusItem(this._expandedButton, focusOptions, false);\n }\n\n // Do not focus item when open not from keyboard\n if (!keydown) {\n overlay.$.overlay.focus();\n }\n },\n { once: true },\n );\n }\n\n /** @private */\n _focusFirstItem() {\n const list = this._subMenu._overlayElement._contentRoot.firstElementChild;\n list.focus();\n }\n\n /** @private */\n _focusLastItem() {\n const list = this._subMenu._overlayElement._contentRoot.firstElementChild;\n const item = list.items[list.items.length - 1];\n if (item) {\n item.focus();\n }\n }\n\n /** @private */\n __onItemSelected(e) {\n e.stopPropagation();\n this.__fireItemSelected(e.detail.value);\n }\n\n /** @private */\n __onEscapeClose() {\n this.__deactivateButton(true);\n }\n\n /** @private */\n __deactivateButton(restoreFocus) {\n const button = this._expandedButton;\n if (button?.hasAttribute('expanded')) {\n this._setExpanded(button, false);\n if (restoreFocus) {\n const focusOptions = { focusVisible: isKeyboardActive() };\n this._focusItem(button, focusOptions, false);\n } else {\n this._tooltipController.close(true);\n }\n this._expandedButton = null;\n }\n }\n\n /**\n * @param {boolean} restoreFocus\n * @protected\n */\n _close(restoreFocus = false) {\n this.style.pointerEvents = '';\n this.__deactivateButton(restoreFocus);\n if (this._subMenu.opened) {\n this._subMenu.close();\n }\n }\n\n /**\n * Closes the current submenu.\n */\n close() {\n this._close();\n }\n\n /**\n * Override method inherited from `KeyboardDirectionMixin` to allow\n * focusing disabled buttons that are configured so.\n *\n * @param {Element} button\n * @protected\n * @override\n */\n _isItemFocusable(button) {\n if (button.disabled && button.__shouldAllowFocusWhenDisabled) {\n return button.__shouldAllowFocusWhenDisabled();\n }\n\n return super._isItemFocusable(button);\n }\n };\n","/**\n * @license\n * Copyright (c) 2019 - 2026 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-menu-bar-submenu.js';\nimport './vaadin-menu-bar-button.js';\nimport { html, LitElement } from 'lit';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { menuBarStyles } from './styles/vaadin-menu-bar-base-styles.js';\nimport { MenuBarMixin } from './vaadin-menu-bar-mixin.js';\n\n/**\n * `<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\n * the user quick access to a consistent set of commands. Each button can toggle a submenu with\n * support for additional levels of nested menus.\n *\n * To create the menu bar, first add the component to the page:\n *\n * ```html\n * <vaadin-menu-bar></vaadin-menu-bar>\n * ```\n *\n * And then use [`items`](#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n *\n * ```js\n * document.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are exposed for styling:\n *\n * Part name | Description\n * ------------------|----------------\n * `container` | The container wrapping menu bar buttons.\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description\n * --------------------|----------------------------------\n * `disabled` | Set when the menu bar is disabled\n * `has-single-button` | Set when there is only one button visible\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * ### Internal components\n *\n * In addition to `<vaadin-menu-bar>` itself, the following internal\n * components are themable:\n *\n * - `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](#/elements/vaadin-button).\n * - `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).\n * - `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](#/elements/vaadin-list-box).\n * - `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](#/elements/vaadin-context-menu).\n *\n * The `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\n * on top of the built-in `<vaadin-item>` state attributes:\n *\n * Attribute | Description\n * ---------- |-------------\n * `expanded` | Expanded parent item.\n *\n * @fires {CustomEvent<boolean>} item-selected - Fired when a submenu item or menu bar button without children is clicked.\n *\n * @customElement vaadin-menu-bar\n * @extends HTMLElement\n */\nclass MenuBar extends MenuBarMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {\n static get is() {\n return 'vaadin-menu-bar';\n }\n\n static get styles() {\n return menuBarStyles;\n }\n\n /** @protected */\n render() {\n return html`\n <div part=\"container\" @click=\"${this.__onButtonClick}\" @mouseover=\"${this._onMouseOver}\">\n <slot></slot>\n <slot name=\"overflow\"></slot>\n </div>\n\n <slot name=\"submenu\"></slot>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n}\n\ndefineCustomElement(MenuBar);\n\nexport { MenuBar };\n","var __decorate=this&&this.__decorate||function(e,r,t,a){var n,o=arguments.length,i=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,t):a;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,a);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(o<3?n(i):o>3?n(r,t,i):n(r,t))||i);return o>3&&i&&Object.defineProperty(r,t,i),i};import{MenuBar as e}from\"@vaadin/menu-bar\";import{render as r}from\"lit\";import{customElement as t}from\"lit/decorators.js\";export function createMenuBarItem(e){let t=document.createElement(\"vaadin-menu-bar-item\");return r(e,t),t}let OrVaadinMenuBar=class extends e{};OrVaadinMenuBar=__decorate([t(\"or-vaadin-menu-bar\")],OrVaadinMenuBar);export{OrVaadinMenuBar};","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {css, html, LitElement, PropertyValues, TemplateResult} from \"lit\";\nimport {customElement, property, query, queryAssignedElements} from \"lit/decorators.js\";\nimport { when } from \"lit/directives/when.js\";\nimport {OrTreeNode} from \"./or-tree-node\";\n\nconst getStyles = () => css`\n * {\n box-sizing: border-box;\n }\n \n :host {\n position: relative;\n }\n\n ol {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n \n ::slotted(*[slot=\"parent\"]) {\n cursor: pointer;\n }\n \n #chevron {\n position: absolute;\n height: 44px;\n display: flex;\n align-items: center;\n aspect-ratio: 1/1.25;\n padding-left: 4px;\n font-size: 18px;\n color: #cccccc;\n z-index: 10;\n }\n \n #chevron:hover {\n color: unset;\n }\n\n :host(:not([readonly])) > #chevron {\n cursor: pointer;\n }\n`;\n\n/**\n * @slot - Default slot for child nodes within the group\n * @slot parent - Slot for inserting a parent node\n * @csspart chevron - The chevron icon element for expanding/collapsing the group.\n */\n@customElement(\"or-tree-group\")\nexport class OrTreeGroup extends LitElement {\n\n /**\n * Determines the visibility of child nodes.\n * Setting this to `false` hides them, and acts as a 'collapsed' state.\n */\n @property({type: Boolean, reflect: true})\n public expanded = false;\n\n /**\n * Only allows child nodes to be selected, making the expander (parent node) readonly.\n * If this is set to false, only the chevron icon can be used to collapse/expand the list.\n */\n @property({type: Boolean})\n public readonly leaf = false;\n\n /**\n * Makes the group readonly\n */\n @property({type: Boolean})\n public readonly readonly = false;\n\n @queryAssignedElements({slot: undefined})\n protected _childNodes?: Array<HTMLLIElement>;\n\n @queryAssignedElements({slot: \"parent\"})\n protected _parentNodes?: Array<OrTreeNode>;\n\n /** A click event listener on the component, used for selecting, expanding, and collapsing the group */\n protected _slotClickListener = (e: MouseEvent) => this.leaf ? this._onExpandToggle(e) : null;\n\n /** A click event listener on the chevron, used for expanding/collapsing the group */\n protected _chevronClickListener = (e: MouseEvent) => this._onExpandToggle(e);\n\n static get styles() {\n return [getStyles()];\n }\n\n /** Selects the group (parent) node. */\n public select() {\n const groupNode = this.getGroupNode();\n if(!this.leaf && groupNode) {\n groupNode.selected = true;\n }\n }\n\n /** Selects the group node itself, and all children nodes within that group. */\n public selectAll() {\n this.select();\n this.getChildNodes().forEach(node => node.selected = true);\n }\n\n /** Deselects the group (parent) node. */\n public deselect() {\n const groupNode = this.getGroupNode();\n if(groupNode) {\n groupNode.selected = false;\n }\n }\n\n /** Deselects the group node itself, and all children nodes within that group. */\n public deselectAll() {\n this.deselect();\n this.getChildNodes().forEach(node => node.selected = false);\n }\n\n /** Returns the group (parent) node ({@link OrTreeNode}) using a query selector. */\n public getGroupNode(): OrTreeNode | undefined {\n return this._parentNodes?.[0];\n }\n\n /** Returns a list of all children nodes ({@link OrTreeNode}) within the group, using a query selector. */\n public getChildNodes(): OrTreeNode[] {\n return Array.from(this._childNodes || [])\n .map(n => n.querySelector('or-tree-node') as OrTreeNode | null)\n .filter(n => n != null) as OrTreeNode[];\n }\n\n firstUpdated(changedProps: PropertyValues) {\n this._parentNodes?.forEach(elem => {\n elem.addEventListener(\"click\", this._slotClickListener);\n });\n return super.firstUpdated(changedProps);\n }\n\n disconnectedCallback() {\n this._parentNodes?.forEach(elem => {\n elem.removeEventListener(\"click\", this._slotClickListener);\n });\n super.disconnectedCallback();\n }\n\n render(): TemplateResult {\n return html`\n ${when(!this.readonly, () => this._getIconTemplate(this.expanded))}\n <slot name=\"parent\"></slot>\n <ol ?hidden=${!this.expanded}>\n <slot @slotchange=${this._onSlotChange}></slot>\n </ol>\n `;\n }\n\n /**\n * Returns an HTML template that represents the icon for this group.\n * @param expanded State of the group\n */\n protected _getIconTemplate(expanded = false): TemplateResult {\n return html`\n <or-icon id=\"chevron\" part=\"chevron\" icon=\"${expanded ? \"chevron-down\" : \"chevron-right\"}\"\n @click=\"${this._chevronClickListener}\"\n ></or-icon>\n `;\n }\n\n /**\n * Function that expands/collapses the group, changing the visibility of the child nodes.\n */\n protected _onExpandToggle(_ev: MouseEvent) {\n this.expanded = !this.expanded;\n }\n\n /**\n * Event listener for 'slotchange' of the default slot.\n * Normally triggers when <or-tree-node> elements are added or removed.\n */\n protected _onSlotChange(_ev: Event) {\n this._applyIndentToChildren();\n }\n\n /**\n * Function that applies CSS to TreeNode based on the group indentation.\n * It loops through all parent elements, and detects the amount of or-tree-group elements it is in.\n * The more nested in the tree, the more left handed padding is applied.\n * @param children Node elements to apply padding to.\n */\n protected _applyIndentToChildren(children = this.getChildNodes()) {\n const countGroups = (elem: HTMLElement | null) => {\n let count = 0;\n while(elem) {\n if(elem.tagName.toLowerCase() === \"or-tree-group\") {\n count++;\n }\n elem = elem.parentElement;\n }\n return count;\n };\n children.forEach(child => {\n let groupAmount = countGroups(child);\n if(child.slot === \"parent\") {\n groupAmount--; // Parent slot is the group itself, so remove 1\n }\n // Apply indent as padding to the node\n child.style.setProperty(\"--or-tree-node-indent\", `${24 + (groupAmount * 12)}px`);\n });\n }\n}\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nfunction n(n,r,t){return n?r(n):t?.(n)}export{n as when};\n//# sourceMappingURL=when.js.map\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {css, html, LitElement, TemplateResult} from \"lit\";\nimport {customElement, property} from \"lit/decorators.js\";\n\nconst styles = css`\n * {\n box-sizing: border-box;\n }\n :host {\n width: 100%;\n height: var(--or-tree-node-height, 44px);\n padding: 6px 12px 6px var(--or-tree-node-indent, 24px);\n background: var(--or-tree-node-background, transparent);\n border-left: 4px solid transparent;\n display: flex;\n align-items: center;\n gap: var(--or-tree-node-gap, 8px);\n overflow: hidden;\n user-select: none;\n --or-icon-width: 20px;\n }\n\n :host(:not([readonly])) {\n cursor: pointer;\n }\n \n :host([readonly]) {\n cursor: not-allowed;\n }\n\n :host(:not([readonly]):hover) {\n background: var(--or-tree-node-backgrond--hovered, #f8f9fa);\n }\n \n :host([selected]) {\n background: var(--or-tree-node-background--selected, #f1f3f5);\n border-left: 4px solid var(--or-tree-node-color--selected, var(--or-app-color4, #4d9d2a));\n }\n\n ::slotted(*:not([slot])) {\n flex: 1;\n }\n`;\n\n/**\n * @slot prefix - Appends elements to the left hand side of the node, commonly used for icons.\n * @slot - Default slot for the main content, commonly used for text.\n * @slot suffix - Appends elements to the right hand side of the node.\n *\n * @cssprop --or-tree-node-height - Controls the height of the node\n * @cssprop --or-tree-node-indent - Controls the left padding of the node\n *\n * @cssprop --or-tree-node-background - Sets the default background\n * @cssprop --or-tree-node-background--hovered - Sets the background while hovering\n * @cssprop --or-tree-node-background--selected - Sets the background when selected\n *\n * @cssprop --or-tree-node-color--selected - Sets the primary color of the node when selected\n */\n@customElement(\"or-tree-node\")\nexport class OrTreeNode extends LitElement {\n\n /**\n * HTML attribute that only applies CSS, showing this node cannot be interacted with.\n */\n @property({type: Boolean, reflect: true})\n public readonly = false;\n\n /**\n * HTML attribute that only applies CSS, marking the node as 'selected'.\n */\n @property({type: Boolean, reflect: true})\n public selected = false;\n\n static get styles() {\n return [styles];\n }\n\n protected render(): TemplateResult {\n return html`\n <slot name=\"prefix\"></slot>\n <slot></slot>\n <slot name=\"suffix\"></slot>\n `;\n }\n}\n","/*\n * Copyright 2025, OpenRemote Inc.\n *\n * See the CONTRIBUTORS.txt file in the distribution for a\n * full listing of individual contributors.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {css, html, LitElement, PropertyValues, TemplateResult} from \"lit\";\nimport {customElement, property, queryAll} from \"lit/decorators.js\";\nimport {map} from \"lit/directives/map.js\";\nimport {when} from \"lit/directives/when.js\";\nimport {Util} from \"@openremote/core\";\nimport {OrTreeNode} from \"./or-tree-node\";\nimport {OrTreeGroup} from \"./or-tree-group\";\nimport {moveNodesToGroupNode} from \"./util\";\nimport {OrTreeDragEvent, OrTreeSelectEvent, TreeMenuSelection, TreeMenuSorting, TreeNode} from \"./model\";\nimport {createMenuBarItem, MenuBarItem, SubMenuItem} from \"@openremote/or-vaadin-components/or-vaadin-menu-bar\";\nimport \"@openremote/or-translate\";\n\nimport \"./or-tree-group\";\nimport \"./or-tree-node\";\n\nexport * from \"./or-tree-group\";\nexport * from \"./or-tree-node\";\nexport * from \"./model\";\n\nconst styles = css`\n * {\n box-sizing: border-box;\n }\n \n #tree-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n #tree-list {\n flex: 1;\n overflow: hidden auto;\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n or-tree-node > or-tree-node > * {\n pointer-events: none;\n }\n \n or-tree-node {\n transition: background-color 80ms;\n }\n \n or-tree-node[drophover] {\n background: #e9ecef;\n }\n \n #tree-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0px 5px 0px 15px;\n min-height: 48px;\n background: var(--or-app-color4, #4d9d2a);\n color: var(--or-app-color7, white);\n --or-icon-fill: var(--or-app-color7, white);\n }\n \n #tree-header-title {\n margin: 0;\n font-weight: 500;\n font-size: 16px;\n }\n \n #tree-header-actions {\n display: flex;\n align-items: center;\n }\n`;\n\n/**\n * A component for displaying a hierarchical, tree-like structure of elements.\n * Common use cases are visualizing parent-child relationships, or for grouping elements together.\n *\n * @event {OrTreeSelectEvent} or-tree-select - Triggers upon selecting a node, and dispatches a list of the nodes selected.\n * @event {OrTreeDragEvent} or-tree-drag - Triggers upon dragging a node to a new group, and dispatches a list of dragged nodes, the group node, and the updated list of all nodes.\n */\n@customElement(\"or-tree-menu\")\nexport class OrTreeMenu extends LitElement {\n\n /**\n * List of node items in the menu.\n * Uses the TreeNode format for rendering the OrTreeNode elements.\n */\n @property({type: Array})\n public nodes: TreeNode[] = [];\n\n /**\n * Changes the allowed selection method within the tree.\n * Common options are `LEAF`, `SINGLE` and `MULTI`.\n */\n @property({type: String})\n public selection: TreeMenuSelection = TreeMenuSelection.LEAF;\n\n /**\n * Disables and enables dragging of nodes into groups.\n */\n @property({type: Boolean})\n public draggable = false;\n\n /**\n * Removes the header from the tree menu.\n */\n @property({type: Boolean, attribute: \"no-header\"})\n public noHeader = false;\n\n /**\n * Adjusts the title in the menu header.\n */\n @property({type: String, attribute: \"menu-title\"})\n public menuTitle = \"Tree Menu\";\n\n /**\n * List of options available to sort the object with\n */\n @property({type: Array, attribute: \"sort-options\"})\n public sortOptions?: TreeMenuSorting[];\n\n /**\n * Represents the selected sorting option\n */\n @property({type: String, attribute: \"sort-by\", reflect: true})\n public sortBy: TreeMenuSorting = TreeMenuSorting.A_TO_Z;\n\n /**\n * Automatically prioritizes the groups, and positions these on top.\n */\n @property({type: Boolean, attribute: \"group-first\"})\n public groupFirst = false;\n\n @queryAll(\"or-tree-node\")\n protected _uiNodes?: NodeListOf<OrTreeNode>;\n\n @queryAll(\"or-tree-group\")\n protected _uiGroups?: NodeListOf<OrTreeGroup>;\n\n // A Map<TreeNode, unique generated ID> to easily identify which TreeNode has been used to render a TreeNodeComponent.\n protected _treeNodeCache: Map<TreeNode, string> = new Map<TreeNode, string>();\n\n // Caches the last selected component for use in multi select.\n protected _lastSelectedNode?: OrTreeNode;\n\n static get styles() {\n return [styles];\n }\n\n protected willUpdate(changedProps: PropertyValues) {\n if((changedProps.has(\"nodes\") || changedProps.has(\"sortBy\") || changedProps.has(\"groupFirst\")) && this.nodes) {\n this.nodes = this._sortNodes(this.nodes, this.sortBy, this.groupFirst);\n }\n // If the selection method has been changed, for example from LEAF to SINGLE, we deselect everything\n if(changedProps.has(\"selection\") && changedProps.get(\"selection\") && this.selection) {\n this.deselectAllNodes();\n }\n return super.willUpdate(changedProps);\n }\n\n render(): TemplateResult {\n return html`\n <div id=\"tree-container\">\n ${when(!this.noHeader, () => this._getHeaderTemplate())}\n ${this._getTreeTemplate(this.nodes)}\n ${this._getErrorTemplate()}\n </div>\n `;\n }\n\n /* ------------------------------------------------------------- */\n //region Public functions for or-tree-menu\n /* ------------------------------------------------------------- */\n\n /**\n * Function that moves an array of {@link TreeNode} into another {@link TreeNode}, by adding them to their children.\n * The function takes care of removing the nodes from the former group, and makes sure no duplicates end up in the list.\n *\n * @param nodesToMove - The array of nodes that are moved into a group.\n * @param groupNode - The group node to insert nodesToMove in.\n */\n public moveNodesToGroup(nodesToMove: TreeNode[], groupNode?: TreeNode) {\n this.nodes = moveNodesToGroupNode(nodesToMove, groupNode, this.nodes);\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n //region HTML Templates functions\n /* ------------------------------------------------------------- */\n\n /**\n * Returns a HTML template that displays the tree menu.\n * @param nodes - List of nodes to be rendered\n */\n protected _getTreeTemplate(nodes: TreeNode[]): TemplateResult {\n this._treeNodeCache = new Map(); // clear cache on every new render of the tree\n return html`\n <ol id=\"tree-list\" @dragover=${this._onDragOverList} @drop=${this._onDragDropList}>\n ${map(nodes, node => this._getNodeTemplate(node))}\n </ol>\n `;\n }\n\n /**\n * Returns an HTML template for displaying a single node within a tree menu. This can both be a group or a solo node.\n * @param node - Node to be rendered\n * @param parent - Optional parent (group node) if the node is placed inside a group\n */\n protected _getNodeTemplate(node: TreeNode, parent?: TreeNode): TemplateResult {\n const isGroup = node.children;\n if (isGroup) {\n return this._getGroupNodeTemplate(node, parent);\n } else {\n return this._getSingleNodeTemplate(node, parent);\n }\n }\n\n /**\n * Returns an HTML template for displaying a single node\n * @param node - Node to be rendered\n * @param parent - Optional parent (group node) if the node is placed inside a group\n */\n protected _getSingleNodeTemplate(node: TreeNode, parent?: TreeNode): TemplateResult {\n const randomId = this._setTreeNodeId(node);\n return html`\n <li draggable=${this.draggable}\n @dragstart=${(ev: DragEvent) => this._onDragStart(ev, node)}\n @dragover=${(ev: DragEvent) => this._onDragOverSingleNode(ev, node, parent)}\n @dragleave=${(ev: DragEvent) => this._onDragLeaveSingleNode(ev, node, parent)}\n @drop=${(ev: DragEvent) => this._onDragDropSingleNode(ev, node, parent)}>\n <or-tree-node id=${randomId} ?selected=${node.selected} ?readonly=${node.readonly} @click=\"${this._onTreeNodeClick}\">\n ${this._getSingleNodeSlotTemplate(node)}\n </or-tree-node>\n </li>\n `;\n }\n\n /**\n * Returns an HTML template for the slot element inside <or-tree-node>.\n * It allows customization such as a prefix icon, adjusting the label, etc.\n * @param node - Node to be rendered\n */\n protected _getSingleNodeSlotTemplate(node: TreeNode): TemplateResult {\n return html`\n <or-icon slot=\"prefix\" icon=\"flag\"></or-icon>\n <span>${node.label}</span>\n <span slot=\"suffix\"></span>\n `;\n }\n\n /**\n * Returns a HTML template for rendering a group node (aka a node with children)\n * @param node - Node to be rendered\n * @param _parent - Optional parent (group node) if the node is placed inside a group\n */\n protected _getGroupNodeTemplate(node: TreeNode, _parent?: TreeNode): TemplateResult {\n const leaf = this.selection === TreeMenuSelection.LEAF;\n const randomId = this._setTreeNodeId(node);\n return html`\n <li>\n <or-tree-group ?leaf=${leaf} ?expanded=${node.expanded}>\n <or-tree-node slot=\"parent\" id=${randomId} ?readonly=${leaf}\n @click=${this._onTreeGroupClick}\n @dragover=${(ev: DragEvent) => this._onDragOverGroup(ev, node)}\n @dragleave=${(ev: DragEvent) => this._onDragLeaveGroup(ev, node)}\n @drop=${(ev: DragEvent) => this._onDragDropGroup(ev, node)}>\n ${this._getGroupNodeSlotTemplate(node)}\n </or-tree-node>\n ${map(node.children, n => this._getNodeTemplate(n, node))}\n </or-tree-group>\n </li>\n `;\n }\n\n /**\n * Returns an HTML template for the parent slot element inside <or-tree-group>.\n * It allows customization such as a prefix icon, adjusting the label, etc.\n * @param node - Node to be rendered\n */\n protected _getGroupNodeSlotTemplate(node: TreeNode): TemplateResult {\n return html`\n <or-icon slot=\"prefix\" icon=\"folder\"></or-icon>\n <span>${node.label}</span>\n <span slot=\"suffix\"></span>\n `;\n }\n\n /**\n * Returns a HTML template for the header\n */\n protected _getHeaderTemplate(): TemplateResult {\n return html`\n <div id=\"tree-header\">\n <h3 id=\"tree-header-title\">\n <or-translate value=${this.menuTitle}></or-translate>\n </h3>\n <div id=\"tree-header-actions\">\n ${this._getSortActionTemplate(this.sortBy, this.sortOptions)}\n </div>\n </div>\n `;\n }\n\n /**\n * Returns a HTML template for the sorting options menu.\n * @param value - The selected sorting option\n * @param options - The available sorting options\n */\n protected _getSortActionTemplate(value?: string, options?: TreeMenuSorting[]): TemplateResult {\n const menuItems: MenuBarItem[] = [{\n component: createMenuBarItem(html`<or-icon icon=\"sort-variant\"></or-icon>`),\n children: (options ?? []).map(o => ({\n checked: value && o === value,\n component: createMenuBarItem(html`<or-translate value=${o}></or-translate>`),\n value: o\n })) as SubMenuItem[]\n }]\n return html`\n <or-vaadin-menu-bar theme=\"icon\" .items=${menuItems}\n @item-selected=${(ev: CustomEvent) => this._onSortClick(ev.detail.value.value)}\n ></or-vaadin-menu-bar>\n `;\n }\n\n /**\n * Returns a HTML template for displaying errors\n */\n protected _getErrorTemplate(): TemplateResult {\n return html``;\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n //region Event callback functions\n /* ------------------------------------------------------------- */\n\n /**\n * HTML callback event for selecting a sort option in the dropdown menu,.\n * @param value - The new selected sort option\n */\n protected _onSortClick(value: string) {\n this.sortBy = value as TreeMenuSorting;\n }\n\n /**\n * HTML callback event for clicking on a group node. (aka a node with children)\n * Based on the configured TreeMenuSelection, it single- or multi selects the nodes.\n */\n protected _onTreeGroupClick(ev: PointerEvent) {\n const elem = ev.currentTarget as OrTreeNode;\n const group = elem.parentElement as OrTreeGroup;\n const select = (treeGroup: OrTreeGroup, nodeElem: OrTreeNode) => {\n treeGroup.select();\n this._lastSelectedNode = nodeElem;\n this._notifyNodesSelect()\n }\n\n switch (this.selection) {\n case TreeMenuSelection.LEAF: {\n return; // Group node cannot be selected when in leaf\n }\n case TreeMenuSelection.MULTI: {\n\n // Shift selects all nodes between the previous selected, and this one.\n if(ev.shiftKey && this._lastSelectedNode) {\n const nodes = Array.from(this._uiNodes || []);\n const parentNode = group.getGroupNode();\n if(parentNode) {\n const indexOfClickedNode = nodes.indexOf(parentNode);\n const indexOfPreviousNode = nodes.indexOf(this._lastSelectedNode);\n this._selectNodesBetween(nodes, indexOfClickedNode, indexOfPreviousNode);\n return;\n }\n\n // Ctrl multi selects without deselecting the previous one.\n } else if(ev.ctrlKey) {\n select(group, elem);\n return;\n }\n // Otherwise, select node like normal\n this.deselectAllNodes();\n select(group, elem);\n return;\n }\n\n case TreeMenuSelection.SINGLE: {\n this.deselectAllNodes();\n select(group, elem);\n return;\n }\n }\n }\n\n /** HTML callback event for when a child node of the tree gets clicked on. */\n protected _onTreeNodeClick(ev: PointerEvent) {\n const node = ev.currentTarget as OrTreeNode;\n if (node) {\n switch (this.selection) {\n case TreeMenuSelection.MULTI: {\n\n // Shift selects all nodes between the previous selected, and this one.\n if(ev.shiftKey && this._lastSelectedNode) {\n const nodes = Array.from(this._uiNodes || []);\n const prevIndex = nodes.indexOf(this._lastSelectedNode);\n const clickedIndex = nodes.indexOf(node);\n if (prevIndex > -1 && clickedIndex > -1) {\n this._selectNodesBetween(nodes, prevIndex, clickedIndex);\n return;\n }\n\n // Ctrl multi selects without deselecting the previous one.\n } else if(ev.ctrlKey) {\n this._selectNode(node);\n return;\n }\n // Otherwise select the node like normal\n this.deselectAllNodes();\n this._selectNode(node);\n return;\n }\n\n default: {\n this.deselectAllNodes();\n this._selectNode(node);\n return;\n }\n }\n }\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n //region Drag-and-drop callback functions\n /* ------------------------------------------------------------- */\n\n /** HTML callback event for 'dragstart' (the moment when a drag gesture is started) */\n protected _onDragStart(ev: DragEvent, node: TreeNode) {\n if(ev.target) {\n ev.dataTransfer?.setData(\"treeNode\", JSON.stringify(node));\n } else {\n ev.preventDefault();\n }\n }\n\n /** HTML callback event for 'dragover' on the list element */\n protected _onDragOverList(ev: DragEvent) {\n if(this.draggable) ev.preventDefault();\n }\n\n /** HTML callback event for 'dragover', so while a node is dragged over a single node */\n protected _onDragOverSingleNode(ev: DragEvent, node: TreeNode, parent?: TreeNode) {\n if(this.draggable) {\n ev.preventDefault(); // allows dropping the node on this node\n if(parent) {\n const elem = this._getUiNodeFromTree(parent);\n elem?.setAttribute(\"drophover\", \"true\");\n }\n }\n }\n\n /** HTML callback event for 'dragover', so while a node is dragged over a group node */\n protected _onDragOverGroup(ev: DragEvent, groupNode: TreeNode) {\n if(this.draggable) {\n ev.preventDefault(); // allows dropping the node on the group\n (ev.currentTarget as HTMLElement).setAttribute(\"drophover\", \"true\");\n }\n }\n\n /** HTML callback event for 'dragover', so while a node is dragged over a single node */\n protected _onDragLeaveSingleNode(ev: DragEvent, node: TreeNode, parent?: TreeNode) {\n if(parent && this.draggable) {\n ev.preventDefault(); // allows dropping the node on this node\n const elem = this._getUiNodeFromTree(parent);\n elem?.removeAttribute(\"drophover\");\n }\n }\n\n /** HTML callback event for 'dragleave', so after a node has been dragged over a group node */\n protected _onDragLeaveGroup(ev: DragEvent, groupNode: TreeNode) {\n if(this.draggable) (ev.currentTarget as HTMLElement).removeAttribute(\"drophover\");\n }\n\n /** HTML callback event for when a node is dropped on the list level. */\n protected _onDragDropList(ev: DragEvent) {\n this._onDragDropGroup(ev);\n }\n\n /** HTML callback event for when a node is dropped onto a single node, after dragging it over. */\n protected _onDragDropSingleNode(ev: DragEvent, groupNode?: TreeNode, parent?: TreeNode) {\n this._onDragDropGroup(ev, parent);\n }\n\n /** HTML callback event for when a node is dropped onto a group node, after dragging it over. */\n protected _onDragDropGroup(ev: DragEvent, groupNode?: TreeNode) {\n if(this.draggable) {\n ev.preventDefault(); // allows dropping the node on this node\n ev.stopPropagation();\n\n // Remove \"hover background\" from the group node in the UI\n if(groupNode) this._getUiNodeFromTree(groupNode)?.removeAttribute(\"drophover\");\n\n let nodesToMove: TreeNode[] = [];\n\n // Get the dragged element from the event payload data\n const data = ev.dataTransfer?.getData(\"treeNode\");\n if(data) {\n const node = JSON.parse(data) as TreeNode;\n if(node) nodesToMove.push(node);\n }\n // If selection is multi, also add all selected ones\n if(this.selection === TreeMenuSelection.MULTI) {\n let selected = this._findSelectedTreeNodes();\n\n // Filter out groups\n selected = selected.filter(n => !n.children);\n\n if(selected.length > 0) {\n this.deselectAllNodes();\n nodesToMove.push(...selected.filter(node => !nodesToMove.find(n => JSON.stringify(n) === JSON.stringify(node))));\n }\n }\n\n // Filter out \"nodes to move\" that are already in that group\n if(groupNode?.children) {\n nodesToMove = nodesToMove.filter(node =>\n !groupNode.children?.find(child => child.id === node.id)\n )\n }\n\n // Finally, move the nodes\n if(nodesToMove.length > 0) {\n this._dispatchCancellableDragEvent(nodesToMove, groupNode, this.nodes).then(() => {\n this.nodes = moveNodesToGroupNode(nodesToMove, groupNode, this.nodes);\n }).catch(ignored => {});\n }\n }\n }\n\n /**\n * Dispatches a cancellable tree drag event.\n */\n protected _dispatchCancellableDragEvent(nodes: TreeNode[], groupNode?: TreeNode, allNodes: TreeNode[] = []): Promise<void> {\n return new Promise((resolve, reject) => {\n const success = this.dispatchEvent(new OrTreeDragEvent(nodes, groupNode, allNodes));\n success ? resolve() : reject();\n });\n }\n\n //endregion\n\n /* ------------------------------------------------------------- */\n\n /**\n * Selects the node using the HTML attribute 'selected' of OrTreeNode\n * @param node - Node to be selected\n * @param notify - Boolean whether to notify the HTML parents of an or-tree-select.\n */\n protected _selectNode(node?: OrTreeNode, notify = true) {\n if(node) {\n if(notify) {\n const selected = [...this._findSelectedTreeNodes()];\n const treeNode = this._getTreeNodeFromTree(node);\n if(treeNode) selected.push(treeNode);\n const success = this._dispatchSelectEvent(selected); // Dispatch a \"select\" event, and return when cancelled by a consumer\n if(!success) return;\n }\n node.selected = true;\n this._lastSelectedNode = node;\n }\n }\n\n /**\n * Multi-selects the nodes between two indexes in a list of OrTreeNode.\n * @param nodes - List of nodes in the tree menu\n * @param index1 - Start index of the nodes to select\n * @param index2 - End index of the nodes to select\n * @param notify - Boolean whether to notify the HTML parents of an or-tree-select.\n */\n protected _selectNodesBetween(nodes: OrTreeNode[], index1: number, index2: number, notify = true) {\n const selectedNodes: OrTreeNode[] = [];\n if(index1 < index2) {\n for(let x = index1; x <= index2; x++) {\n selectedNodes.push(nodes[x]);\n }\n } else if(index1 > index2) {\n for(let x = index2; x <= index1; x++) {\n selectedNodes.push(nodes[x]);\n }\n }\n // Dispatch a \"select\" event with the new nodes. If cancelled, we will not select the nodes.\n if(notify) {\n const nodes = selectedNodes.map(n => this._getTreeNodeFromTree(n)).filter(n => n) as TreeNode[];\n const success = this._notifyNodesSelect(nodes);\n if(!success) return;\n }\n // Select the nodes\n selectedNodes.forEach((node) => this._selectNode(node));\n }\n\n /**\n * Function that notifies parent HTMLElements that a tree node got selected.\n * It dispatches the OrTreeSelectEvent, which includes a list of the selected nodes.\n * @returns a 'success' boolean whether the event was cancelled or not\n */\n protected async _notifyNodesSelect(selectedNodes?: TreeNode[]) {\n await this.getUpdateComplete(); // await render to include the latest changes.\n if(!selectedNodes) {\n selectedNodes = this._findSelectedTreeNodes();\n }\n return this._dispatchSelectEvent(selectedNodes);\n }\n\n /**\n * Utility function to detect the selected tree nodes.\n * @param uiNodes - List of <or-tree-node> UI elements\n * @param cache - Optionally, supply the cache for retrieving a {@link TreeNode} object from a <or-tree-node> element.\n */\n protected _findSelectedTreeNodes(uiNodes = Array.from(this._uiNodes || []), cache = this._treeNodeCache): TreeNode[] {\n\n // Get the list of selected TreeNodeComponent elements in the UI.\n const selectedUiNodes = uiNodes.filter(n => n.selected);\n\n // Get the list of cached generated IDs (for tracking which TreeNode belongs to which TreeNodeComponent)\n const treeNodeEntries = Array.from(cache.entries());\n\n // Find the generated IDs in the list of TreeNodeComponents, and compare the element ID\n return selectedUiNodes.map(component => treeNodeEntries\n .find(v => v[1] === component.id))\n .map(x => x?.[0])\n .filter(n => n !== undefined) as TreeNode[];\n }\n\n /**\n * Utility function that gets a {@link TreeNode} based on an {@link OrTreeNode} HTML element in the menu.\n * @param uiNode - The tree node HTML element\n * @param cache - Optional cache to get the TreeNode from\n */\n protected _getTreeNodeFromTree(uiNode: OrTreeNode, cache = this._treeNodeCache): TreeNode | undefined {\n const treeNodeEntries = Array.from(cache.entries()); // Get the list of cached generated IDs (for tracking which TreeNode belongs to which TreeNodeComponent)\n return treeNodeEntries.find(entry => entry[1] === uiNode.id)?.[0];\n }\n\n /**\n * Utility function that gets an {@link OrTreeNode} HTML element based on the {@link TreeNode} input object.\n * @param treeNode - The tree node object\n * @param cache - Optional cache to get the HTML element from\n */\n protected _getUiNodeFromTree(treeNode: TreeNode, cache = this._treeNodeCache): OrTreeNode | undefined {\n const treeNodeEntries = Array.from(cache.entries()); // Get the list of cached generated IDs (for tracking which TreeNode belongs to which TreeNodeComponent)\n const treeNodeJSON = JSON.stringify(treeNode);\n\n const elementId = treeNodeEntries.find(entry => JSON.stringify(entry[0]) === treeNodeJSON)?.[1];\n return elementId ? this.shadowRoot!.getElementById(elementId) as OrTreeNode : undefined;\n }\n\n /**\n * Utility function for sending a \"select\" event, so consumers of this component are aware a new node has been selected.\n * @param selectedNodes - List of selected nodes to include in the event payload.\n * @returns a 'success' boolean whether the event was cancelled or not.\n */\n protected _dispatchSelectEvent(selectedNodes?: TreeNode[]): boolean {\n return this.dispatchEvent(new OrTreeSelectEvent(selectedNodes || []));\n }\n\n /**\n * Public function that deselects all tree nodes.\n */\n public deselectAllNodes() {\n (this._uiGroups || []).forEach(uiGroup => uiGroup.deselect());\n (this._uiNodes || []).forEach(uiNode => uiNode.selected = false);\n }\n\n /**\n * Utility function that sorts the list of {@link nodes} based on the given {@link sortBy} method.\n * @param nodes - List of nodes to be sorted\n * @param sortBy - Sorting option\n * @param groupFirst - Whether to prioritize group nodes, and place them on the top of the list.\n */\n protected _sortNodes(nodes: TreeNode[], sortBy?: TreeMenuSorting, groupFirst = false): TreeNode[] {\n console.debug(`Sorting nodes in the tree menu using '${sortBy}'`);\n\n const grouped = nodes.filter(node => node.children !== undefined);\n\n // TODO: Apply recursive sorting if nested deeper inside the tree\n grouped.forEach(g => g.children?.sort(this._getSortFunction(sortBy)));\n\n // Optionally, prioritize group nodes, and place all groups on top of the menu\n if(groupFirst) {\n const ungrouped = nodes.filter(node => node.children === undefined);\n grouped.sort(this._getSortFunction(sortBy));\n ungrouped.sort(this._getSortFunction(sortBy));\n return [...grouped, ...ungrouped];\n }\n\n return nodes.sort(this._getSortFunction(sortBy));\n }\n\n /**\n * Function that caches a random ID into a key-value storage, linking the TreeNode with a generated ID.\n * This generated ID can be used somewhere else, for example in an HTMLElement ID as a unique identifier.\n * @param node - The TreeNode object to cache\n * @param randomId - Optionally you can supply an ID to use for caching\n */\n protected _setTreeNodeId(node: TreeNode, randomId = Util.generateUniqueUUID()): string {\n if(this._treeNodeCache.get(node)) {\n return this._treeNodeCache.get(node)!;\n }\n this._treeNodeCache.set(node, randomId);\n return randomId;\n }\n\n /**\n * Function for retrieving the sorting for TreeNodes based on a sortBy parameter.\n * The sortBy parameter represents a key in the TreeNode object like 'label'.\n * @param sortBy - Sorting option to use, such as \"a_to_z\"\n */\n protected _getSortFunction(sortBy?: TreeMenuSorting): (a: TreeNode, b: TreeNode) => number {\n switch (sortBy) {\n case TreeMenuSorting.Z_TO_A:\n return (a, b) => b.label.localeCompare(a.label);\n default:\n return Util.sortByString(node => node.label);\n }\n }\n\n /**\n * Programmatically finds a group by its ID and sets it to be expanded.\n * This is called by the parent component after a new node is added to a tree group.\n * @param {string} groupId The ID of the group to expand.\n */\n public expandGroup(groupId: string) {\n // Wait for any pending Lit updates to complete to ensure the node list is stable.\n this.updateComplete.then(() => {\n const groupNode = this.nodes.find(node => node.id === groupId && node.children);\n\n if (groupNode) {\n groupNode.expanded = true;\n // re-render with the change.\n this.requestUpdate();\n }\n });\n }\n}\n"],"names":["e","Object","Symbol","globalThis","Document","CSSStyleSheet","WeakMap","Error","document","n","t","Boolean","Array","JSON","i","Number","String","HTMLElement","Map","litPropertyMetadata","Set","Promise","Math","RegExp","a","d","o","r","arguments","customElements","Reflect","console","CustomEvent","window","MutationObserver","queueMicrotask","setTimeout","MouseEvent","navigator","s","Event","isNaN","Node","NaN","CSS","DOMException","EventTarget","CSSImportRule","CSSMediaRule","CSSStyleRule","WeakRef","HTMLSlotElement","getComputedStyle","ResizeObserver","clearTimeout","IntersectionObserver","parseInt","requestAnimationFrame","parseFloat","cancelAnimationFrame","Element","Function","localStorage","ShadowRoot"],"mappings":"8gBAAA,EAAoB,CAAC,CAAG,CAACA,EAAS,KACjC,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