@openremote/or-map 1.34.0 → 1.35.0-snapshot.20261109083019

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.
@@ -1183,7 +1183,7 @@ ${l.shaderPreludeCode.vertexSource}`,define:l.shaderDefine},defaultProjectionDat
1183
1183
  </div>`:""}
1184
1184
  <or-icon icon="or:marker"></or-icon>
1185
1185
  <or-icon class="marker-icon" icon="${t||""}"></or-icon>
1186
- `,eR([eA({type:Number,reflect:!0,attribute:!0})],eO.prototype,"lat",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"lng",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"radius",void 0),eR([eA({reflect:!0})],eO.prototype,"displayValue",void 0),eR([eA({reflect:!0})],eO.prototype,"direction",void 0),eR([eA({type:Boolean})],eO.prototype,"visible",void 0),eR([eA({type:String})],eO.prototype,"icon",void 0),eR([eA({type:String})],eO.prototype,"color",void 0),eR([eA({type:String})],eO.prototype,"activeColor",void 0),eR([eA({type:Boolean})],eO.prototype,"interactive",void 0),eR([eA({type:Boolean})],eO.prototype,"active",void 0),eR([eP("slot")],eO.prototype,"_slot",void 0),eO=o=eR([eT("or-map-marker")],eO);var eV=r(650),e$=r(776);function ej(i){return t||(t=new Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short",maximumFractionDigits:1})),t.format(i).toLowerCase()}function eN(t,i){return t/.075/Math.cos(i*Math.PI/180)}function eU(t){if(t){if(t instanceof eD.st)return t;if(t.lat)return t.lon?{lng:t.lon,lat:t.lat}:{lng:t.lng,lat:t.lat};if(Array.isArray(t))return{lng:t[0],lat:t[1]};if(t.coordinates&&Array.isArray(t.coordinates)&&t.coordinates.length>=2)return eU(t.coordinates);if(t.attributes){let i=t.attributes.location;return i&&i.value?eU(i.value):void 0}if(t.value)return eU(t.value)}}function eq(t){if(t)return Array.isArray(t)?{type:"Point",coordinates:t}:{type:"Point",coordinates:[t.hasOwnProperty("lng")?t.lng:t.lon,t.lat]}}function eG(t){if(t){if(t instanceof e$.LngLatBounds)return t;if(2===t.length){let i=eU(t[0]),r=eU(t[1]);if(i&&r)return new e$.LngLatBounds(i,r)}if(4===t.length)return new e$.LngLatBounds([t[0],t[1],t[2],t[3]])}}function eZ(t,i){if(!t)return;let r="string"==typeof t?eV.AssetModelUtil.getAssetDescriptor(t):t,a=r&&r.icon?r.icon:"help-circle",n=r&&r.colour?r.colour:void 0;if(i&&i.markerConfig){let t=i.markerConfig,r=i.currentValue;if("range"===t.type&&t.ranges&&"number"==typeof r){let i=t.ranges;n=(i.sort((t,i)=>i.min-t.min).find(t=>r>=t.min)||i.reduce((t,i)=>i.min>t.min?t:i)).colour||void 0}else"boolean"===t.type?n=t[!!r+""]:"string"===t.type&&(n=t[r+""])}return{color:n,icon:a}}function eH(t){var i;if(!(null==t?void 0:t.attributes))return!1;let r=t.attributes.location;return!!(null==(i=null==r?void 0:r.value)?void 0:i.coordinates)&&(!r.meta||!("showOnDashboard"in r.meta)||!!h.Util.getMetaValue("showOnDashboard",r))}var eW=function(t,i,r,a){var n,s=arguments.length,o=s<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,r,a);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(o=(s<3?n(o):s>3?n(i,r,o):n(i,r))||o);return s>3&&o&&Object.defineProperty(i,r,o),o};function eX(t,i){if(t&&i&&t[i])return t[i]}function eK(t,i){let r=eX(t,i);if(r)return r.attributeName}let eY=class extends(0,h.subscribe)(u())(eO){constructor(){super(),this.assetTypeAsIcon=!0,this.visible=!1}set type(t){let i,r=eX(this.config,t);if(r&&r.attributeName&&this.asset&&this.asset.attributes&&this.asset.attributes[r.attributeName]&&r.colours){let t=this.asset.attributes[r.attributeName].value;i={markerConfig:r.colours,currentValue:t}}let a=eZ(t,i);if(!a){this.visible=!1;return}this.assetTypeAsIcon&&(this.icon=a.icon),this._markerColor=Array.isArray(a.color)?a.color[0].colour:a.color||void 0,this._updateColor(this.markerContainer),this.visible=!0}shouldUpdate(t){if(t.has("assetId")&&(this.lat=void 0,this.lng=void 0,this.type=void 0,this.direction=void 0,this.displayValue=void 0,this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1===Object.keys(t).length))return!1;if(t.has("asset"))try{this._onAssetChanged(this.asset)}catch(t){console.error(t)}return super.shouldUpdate(t)}_onEvent(t){if("attribute"===t.eventType)return"location"===t.ref.name?void this._updateLocation(t.value):void(this.asset&&(this.asset=h.Util.updateAsset(this.asset,t),this.requestUpdate()));if("asset"===t.eventType)switch(t.cause){case"READ":case"CREATE":case"UPDATE":this._onAssetChanged(t.asset);break;case"DELETE":this._onAssetChanged(void 0)}}_onAssetChanged(t){var i,r,a,n;return i=this,r=void 0,a=void 0,n=function*(){if(t){this.direction=void 0,this.displayValue=void 0;let i=t.attributes?t.attributes.location:void 0;this._updateLocation(i?i.value:null);let r=eX(this.config,t.type),a=!r||!r.hideDirection,n=r&&!0===r.showLabel&&!!r.attributeName,s=!!(r&&!1!==r.showUnits);if(n&&t.attributes&&t.attributes[null==r?void 0:r.attributeName]){let i=t.attributes[r.attributeName],a=eV.AssetModelUtil.getAttributeAndValueDescriptors(t.type,i.name,i);this.displayValue=h.Util.getAttributeValueAsString(i,a[0],t.type,s,"-")}if(a&&t.attributes&&t.attributes.direction){let i=t.attributes.direction.value;null!=i&&(this.direction=i.toString())}this.type=t.type}else this.lat=void 0,this.lng=void 0},new(a||(a=Promise))(function(t,s){function o(t){try{h(n.next(t))}catch(t){s(t)}}function l(t){try{h(n.throw(t))}catch(t){s(t)}}function h(i){var r;i.done?t(i.value):((r=i.value)instanceof a?r:new a(function(t){t(r)})).then(o,l)}h((n=n.apply(i,r||[])).next())})}_updateLocation(t){this.lat=t&&t.coordinates?t.coordinates[1]:void 0,this.lng=t&&t.coordinates?t.coordinates[0]:void 0}_getColor(){return this._markerColor&&!this.color?"#"+this._markerColor:super._getColor()}_getActiveColor(){return this._markerColor&&!this.activeColor?"#"+this._markerColor:super._getActiveColor()}};eW([eA({type:String,reflect:!0,attribute:!0})],eY.prototype,"assetId",void 0),eW([eA({type:Object,attribute:!0})],eY.prototype,"asset",void 0),eW([eA()],eY.prototype,"config",void 0),eY=eW([eT("or-map-marker-asset")],eY),window.Vaadin||={},window.Vaadin.featureFlags||={};let eJ={};function eQ(t,i="25.3.4"){if(Object.defineProperty(t,"version",{get:()=>i}),t.experimental){let i="string"==typeof t.experimental?t.experimental:`${t.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,t=>t[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[i]||eJ[i]){if(eJ[i])return void eJ[i].add(t)}else{eJ[i]=new Set,eJ[i].add(t),Object.defineProperty(window.Vaadin.featureFlags,i,{get:()=>0===eJ[i].size,set(t){t&&eJ[i].size>0&&(eJ[i].forEach(t=>{customElements.define(t.is,t)}),eJ[i].clear())}});return}}let r=customElements.get(t.is);if(r){let i=r.version;i&&t.version&&i===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${r.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}let e0=[];function e2(t,i,r=t.getAttribute("dir")){i?t.setAttribute("dir",i):null!=r&&t.removeAttribute("dir")}function e1(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let t=e1();e0.forEach(i=>{e2(i,t)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let e3=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),e2(this,e1(),null))}attributeChangedCallback(t,i,r){if(super.attributeChangedCallback(t,i,r),"dir"!==t)return;let a=e1(),n=r===a&&-1===e0.indexOf(this),s=!r&&i&&-1===e0.indexOf(this),o=r!==a&&i===a;n||s?(this.__subscribe(),e2(this,a,r)):o&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=e0.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,i,r){("dir"!==r||""!==i||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,i,r)}_attributeToProperty(t,i,r){"dir"!==t||i?super._attributeToProperty(t,i,r):this.dir=""}__subscribe(){e0.includes(this)||e0.push(this)}__unsubscribe(){e0.includes(this)&&e0.splice(e0.indexOf(this),1)}},e5=new WeakMap;function e4(t){return i=>{if(function(t,i){let r=i;for(;r;){if(e5.get(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}(t,i))return i;let r=t(i);return e5.set(r,t),r}}function e6(t,i){return t.split(".").reduce((t,i)=>t?t[i]:void 0,i)}let e8={},e7=/([A-Z])/gu;function e9(t){return e8[t]||(e8[t]=t.replace(e7,"-$1").toLowerCase()),e8[t]}function te(t){return t[0].toUpperCase()+t.substring(1)}function tt(t){let[i,r]=t.split("(");return{method:i,observerProps:r.replace(")","").split(",").map(t=>t.trim())}}function ti(t,i){return Object.prototype.hasOwnProperty.call(t,i)||(t[i]=new Map(t[i])),t[i]}let tr=e4(t=>class extends t{static enabledWarnings=[];static createProperty(t,i){[String,Boolean,Number,Array].includes(i)&&(i={type:i}),i?.reflectToAttribute&&(i.reflect=!0),super.createProperty(t,i)}static getOrCreateMap(t){return ti(this,t)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let t=this.getOrCreateMap("__complexObservers");this.observers.forEach(i=>{let{method:r,observerProps:a}=tt(i);t.set(r,a)})}}static addCheckedInitializer(t){super.addInitializer(i=>{i instanceof this&&t(i)})}static getPropertyDescriptor(t,i,r){let a=super.getPropertyDescriptor(t,i,r),n=a;if(this.getOrCreateMap("__propKeys").set(t,i),r.sync&&(n={get:a.get,set(a){let n=this[t];M(a,n)&&(this[i]=a,this.requestUpdate(t,n,r),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),r.readOnly){let i=n.set;this.addCheckedInitializer(r=>{r[`_set${te(t)}`]=function(t){i.call(r,t)}}),n={get:n.get,set(){},configurable:!0,enumerable:!0}}if("value"in r&&this.addCheckedInitializer(i=>{let a="function"==typeof r.value?r.value.call(i):r.value;r.readOnly?i[`_set${te(t)}`](a):i[t]=a}),r.observer){let i=r.observer;this.getOrCreateMap("__observers").set(t,i),this.addCheckedInitializer(t=>{t[i]||console.warn(`observer method ${i} not defined`)})}if(r.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let t=this.__notifyProps;this.__notifyProps=new Set(t)}}else this.__notifyProps=new Set;this.__notifyProps.add(t)}if(r.computed){let i=`__assignComputed${t}`,a=tt(r.computed);this.prototype[i]=function(...i){this[t]=this[a.method](...i)},this.getOrCreateMap("__computedObservers").set(i,a.observerProps)}return r.attribute||(r.attribute=e9(t)),n}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:t}=this.constructor;this.hasUpdated||t.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(t=>{this.$[t.id]=t})}ready(){}willUpdate(t){this.constructor.__computedObservers&&this.__runComplexObservers(t,this.constructor.__computedObservers)}updated(t){let i=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(t,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(t,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(t,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(t,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(t,this.constructor.__notifyProps),i||this.ready()}setProperties(t){Object.entries(t).forEach(([t,i])=>{let r=this.constructor.__propKeys.get(t),a=this[r];this[r]=i,this.requestUpdate(t,a)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(t){let i=ti(this,"__dynamicMethodObservers"),{method:r,observerProps:a}=tt(t);i.set(r,a)}_createPropertyObserver(t,i){ti(this,"__dynamicPropertyObservers").set(i,t)}__runComplexObservers(t,i){i.forEach((i,r)=>{i.some(i=>t.has(i))&&(this[r]?this[r](...i.map(t=>this[t])):console.warn(`observer method ${r} not defined`))})}__runDynamicObservers(t,i){i.forEach((i,r)=>{t.has(i)&&this[r]&&this[r](this[i],t.get(i))})}__runObservers(t,i){t.forEach((t,r)=>{let a=i.get(r);void 0!==a&&this[a]&&this[a](this[r],t)})}__runNotifyProps(t,i){t.forEach((t,r)=>{i.has(r)&&this.dispatchEvent(new CustomEvent(`${e9(r)}-changed`,{detail:{value:this[r]}}))})}_get(t,i){return e6(t,i)}_set(t,i,r){let a,n;n=(a=t.split(".")).pop(),a.reduce((t,i)=>t[i],r)[n]=i}});function ta(t){try{CSS.registerProperty(t)}catch(i){if(i instanceof DOMException&&"InvalidModificationError"===i.name)console.warn(`The CSS property ${t.name} has already been registered.`);else throw i}}class tn extends EventTarget{#e;#t=new Set;#i;#r=!1;constructor(t){super(),this.#e=t,this.#i=new CSSStyleSheet}#a(t){let{propertyName:i}=t;this.#t.has(i)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:i}}))}observe(t){this.connect(),this.#t.has(t)||(this.#t.add(t),this.#i.replaceSync(`
1186
+ `,eR([eA({type:Number,reflect:!0,attribute:!0})],eO.prototype,"lat",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"lng",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"radius",void 0),eR([eA({reflect:!0})],eO.prototype,"displayValue",void 0),eR([eA({reflect:!0})],eO.prototype,"direction",void 0),eR([eA({type:Boolean})],eO.prototype,"visible",void 0),eR([eA({type:String})],eO.prototype,"icon",void 0),eR([eA({type:String})],eO.prototype,"color",void 0),eR([eA({type:String})],eO.prototype,"activeColor",void 0),eR([eA({type:Boolean})],eO.prototype,"interactive",void 0),eR([eA({type:Boolean})],eO.prototype,"active",void 0),eR([eP("slot")],eO.prototype,"_slot",void 0),eO=o=eR([eT("or-map-marker")],eO);var eV=r(650),e$=r(776);function ej(i){return t||(t=new Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short",maximumFractionDigits:1})),t.format(i).toLowerCase()}function eN(t,i){return t/.075/Math.cos(i*Math.PI/180)}function eU(t){if(t){if(t instanceof eD.st)return t;if(t.lat)return t.lon?{lng:t.lon,lat:t.lat}:{lng:t.lng,lat:t.lat};if(Array.isArray(t))return{lng:t[0],lat:t[1]};if(t.coordinates&&Array.isArray(t.coordinates)&&t.coordinates.length>=2)return eU(t.coordinates);if(t.attributes){let i=t.attributes.location;return i&&i.value?eU(i.value):void 0}if(t.value)return eU(t.value)}}function eq(t){if(t)return Array.isArray(t)?{type:"Point",coordinates:t}:{type:"Point",coordinates:[t.hasOwnProperty("lng")?t.lng:t.lon,t.lat]}}function eG(t){if(t){if(t instanceof e$.LngLatBounds)return t;if(2===t.length){let i=eU(t[0]),r=eU(t[1]);if(i&&r)return new e$.LngLatBounds(i,r)}if(4===t.length)return new e$.LngLatBounds([t[0],t[1],t[2],t[3]])}}function eZ(t,i){if(!t)return;let r="string"==typeof t?eV.AssetModelUtil.getAssetDescriptor(t):t,a=r&&r.icon?r.icon:"help-circle",n=r&&r.colour?r.colour:void 0;if(i&&i.markerConfig){let t=i.markerConfig,r=i.currentValue;if("range"===t.type&&t.ranges&&"number"==typeof r){let i=t.ranges;n=(i.sort((t,i)=>i.min-t.min).find(t=>r>=t.min)||i.reduce((t,i)=>i.min>t.min?t:i)).colour||void 0}else"boolean"===t.type?n=t[!!r+""]:"string"===t.type&&(n=t[r+""])}return{color:n,icon:a}}function eH(t){var i;if(!(null==t?void 0:t.attributes))return!1;let r=t.attributes.location;return!!(null==(i=null==r?void 0:r.value)?void 0:i.coordinates)&&(!r.meta||!("showOnDashboard"in r.meta)||!!h.Util.getMetaValue("showOnDashboard",r))}var eW=function(t,i,r,a){var n,s=arguments.length,o=s<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,r,a);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(o=(s<3?n(o):s>3?n(i,r,o):n(i,r))||o);return s>3&&o&&Object.defineProperty(i,r,o),o};function eX(t,i){if(t&&i&&t[i])return t[i]}function eK(t,i){let r=eX(t,i);if(r)return r.attributeName}let eY=class extends(0,h.subscribe)(u())(eO){constructor(){super(),this.assetTypeAsIcon=!0,this.visible=!1}set type(t){let i,r=eX(this.config,t);if(r&&r.attributeName&&this.asset&&this.asset.attributes&&this.asset.attributes[r.attributeName]&&r.colours){let t=this.asset.attributes[r.attributeName].value;i={markerConfig:r.colours,currentValue:t}}let a=eZ(t,i);if(!a){this.visible=!1;return}this.assetTypeAsIcon&&(this.icon=a.icon),this._markerColor=Array.isArray(a.color)?a.color[0].colour:a.color||void 0,this._updateColor(this.markerContainer),this.visible=!0}shouldUpdate(t){if(t.has("assetId")&&(this.lat=void 0,this.lng=void 0,this.type=void 0,this.direction=void 0,this.displayValue=void 0,this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1===Object.keys(t).length))return!1;if(t.has("asset"))try{this._onAssetChanged(this.asset)}catch(t){console.error(t)}return super.shouldUpdate(t)}_onEvent(t){if("attribute"===t.eventType)return"location"===t.ref.name?void this._updateLocation(t.value):void(this.asset&&(this.asset=h.Util.updateAsset(this.asset,t),this.requestUpdate()));if("asset"===t.eventType)switch(t.cause){case"READ":case"CREATE":case"UPDATE":this._onAssetChanged(t.asset);break;case"DELETE":this._onAssetChanged(void 0)}}_onAssetChanged(t){var i,r,a,n;return i=this,r=void 0,a=void 0,n=function*(){if(t){this.direction=void 0,this.displayValue=void 0;let i=t.attributes?t.attributes.location:void 0;this._updateLocation(i?i.value:null);let r=eX(this.config,t.type),a=!r||!r.hideDirection,n=r&&!0===r.showLabel&&!!r.attributeName,s=!!(r&&!1!==r.showUnits);if(n&&t.attributes&&t.attributes[null==r?void 0:r.attributeName]){let i=t.attributes[r.attributeName],a=eV.AssetModelUtil.getAttributeAndValueDescriptors(t.type,i.name,i);this.displayValue=h.Util.getAttributeValueAsString(i,a[0],t.type,s,"-")}if(a&&t.attributes&&t.attributes.direction){let i=t.attributes.direction.value;null!=i&&(this.direction=i.toString())}this.type=t.type}else this.lat=void 0,this.lng=void 0},new(a||(a=Promise))(function(t,s){function o(t){try{h(n.next(t))}catch(t){s(t)}}function l(t){try{h(n.throw(t))}catch(t){s(t)}}function h(i){var r;i.done?t(i.value):((r=i.value)instanceof a?r:new a(function(t){t(r)})).then(o,l)}h((n=n.apply(i,r||[])).next())})}_updateLocation(t){this.lat=t&&t.coordinates?t.coordinates[1]:void 0,this.lng=t&&t.coordinates?t.coordinates[0]:void 0}_getColor(){return this._markerColor&&!this.color?"#"+this._markerColor:super._getColor()}_getActiveColor(){return this._markerColor&&!this.activeColor?"#"+this._markerColor:super._getActiveColor()}};eW([eA({type:String,reflect:!0,attribute:!0})],eY.prototype,"assetId",void 0),eW([eA({type:Object,attribute:!0})],eY.prototype,"asset",void 0),eW([eA()],eY.prototype,"config",void 0),eY=eW([eT("or-map-marker-asset")],eY),window.Vaadin||={},window.Vaadin.featureFlags||={};let eJ={};function eQ(t,i="25.3.5"){if(Object.defineProperty(t,"version",{get:()=>i}),t.experimental){let i="string"==typeof t.experimental?t.experimental:`${t.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,t=>t[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[i]||eJ[i]){if(eJ[i])return void eJ[i].add(t)}else{eJ[i]=new Set,eJ[i].add(t),Object.defineProperty(window.Vaadin.featureFlags,i,{get:()=>0===eJ[i].size,set(t){t&&eJ[i].size>0&&(eJ[i].forEach(t=>{customElements.define(t.is,t)}),eJ[i].clear())}});return}}let r=customElements.get(t.is);if(r){let i=r.version;i&&t.version&&i===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${r.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}let e0=[];function e2(t,i,r=t.getAttribute("dir")){i?t.setAttribute("dir",i):null!=r&&t.removeAttribute("dir")}function e1(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let t=e1();e0.forEach(i=>{e2(i,t)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let e3=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),e2(this,e1(),null))}attributeChangedCallback(t,i,r){if(super.attributeChangedCallback(t,i,r),"dir"!==t)return;let a=e1(),n=r===a&&-1===e0.indexOf(this),s=!r&&i&&-1===e0.indexOf(this),o=r!==a&&i===a;n||s?(this.__subscribe(),e2(this,a,r)):o&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=e0.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,i,r){("dir"!==r||""!==i||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,i,r)}_attributeToProperty(t,i,r){"dir"!==t||i?super._attributeToProperty(t,i,r):this.dir=""}__subscribe(){e0.includes(this)||e0.push(this)}__unsubscribe(){e0.includes(this)&&e0.splice(e0.indexOf(this),1)}},e5=new WeakMap;function e4(t){return i=>{if(function(t,i){let r=i;for(;r;){if(e5.get(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}(t,i))return i;let r=t(i);return e5.set(r,t),r}}function e6(t,i){return t.split(".").reduce((t,i)=>t?t[i]:void 0,i)}let e8={},e7=/([A-Z])/gu;function e9(t){return e8[t]||(e8[t]=t.replace(e7,"-$1").toLowerCase()),e8[t]}function te(t){return t[0].toUpperCase()+t.substring(1)}function tt(t){let[i,r]=t.split("(");return{method:i,observerProps:r.replace(")","").split(",").map(t=>t.trim())}}function ti(t,i){return Object.prototype.hasOwnProperty.call(t,i)||(t[i]=new Map(t[i])),t[i]}let tr=e4(t=>class extends t{static enabledWarnings=[];static createProperty(t,i){[String,Boolean,Number,Array].includes(i)&&(i={type:i}),i?.reflectToAttribute&&(i.reflect=!0),super.createProperty(t,i)}static getOrCreateMap(t){return ti(this,t)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let t=this.getOrCreateMap("__complexObservers");this.observers.forEach(i=>{let{method:r,observerProps:a}=tt(i);t.set(r,a)})}}static addCheckedInitializer(t){super.addInitializer(i=>{i instanceof this&&t(i)})}static getPropertyDescriptor(t,i,r){let a=super.getPropertyDescriptor(t,i,r),n=a;if(this.getOrCreateMap("__propKeys").set(t,i),r.sync&&(n={get:a.get,set(a){let n=this[t];M(a,n)&&(this[i]=a,this.requestUpdate(t,n,r),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),r.readOnly){let i=n.set;this.addCheckedInitializer(r=>{r[`_set${te(t)}`]=function(t){i.call(r,t)}}),n={get:n.get,set(){},configurable:!0,enumerable:!0}}if("value"in r&&this.addCheckedInitializer(i=>{let a="function"==typeof r.value?r.value.call(i):r.value;r.readOnly?i[`_set${te(t)}`](a):i[t]=a}),r.observer){let i=r.observer;this.getOrCreateMap("__observers").set(t,i),this.addCheckedInitializer(t=>{t[i]||console.warn(`observer method ${i} not defined`)})}if(r.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let t=this.__notifyProps;this.__notifyProps=new Set(t)}}else this.__notifyProps=new Set;this.__notifyProps.add(t)}if(r.computed){let i=`__assignComputed${t}`,a=tt(r.computed);this.prototype[i]=function(...i){this[t]=this[a.method](...i)},this.getOrCreateMap("__computedObservers").set(i,a.observerProps)}return r.attribute||(r.attribute=e9(t)),n}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:t}=this.constructor;this.hasUpdated||t.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(t=>{this.$[t.id]=t})}ready(){}willUpdate(t){this.constructor.__computedObservers&&this.__runComplexObservers(t,this.constructor.__computedObservers)}updated(t){let i=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(t,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(t,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(t,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(t,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(t,this.constructor.__notifyProps),i||this.ready()}setProperties(t){Object.entries(t).forEach(([t,i])=>{let r=this.constructor.__propKeys.get(t),a=this[r];this[r]=i,this.requestUpdate(t,a)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(t){let i=ti(this,"__dynamicMethodObservers"),{method:r,observerProps:a}=tt(t);i.set(r,a)}_createPropertyObserver(t,i){ti(this,"__dynamicPropertyObservers").set(i,t)}__runComplexObservers(t,i){i.forEach((i,r)=>{i.some(i=>t.has(i))&&(this[r]?this[r](...i.map(t=>this[t])):console.warn(`observer method ${r} not defined`))})}__runDynamicObservers(t,i){i.forEach((i,r)=>{t.has(i)&&this[r]&&this[r](this[i],t.get(i))})}__runObservers(t,i){t.forEach((t,r)=>{let a=i.get(r);void 0!==a&&this[a]&&this[a](this[r],t)})}__runNotifyProps(t,i){t.forEach((t,r)=>{i.has(r)&&this.dispatchEvent(new CustomEvent(`${e9(r)}-changed`,{detail:{value:this[r]}}))})}_get(t,i){return e6(t,i)}_set(t,i,r){let a,n;n=(a=t.split(".")).pop(),a.reduce((t,i)=>t[i],r)[n]=i}});function ta(t){try{CSS.registerProperty(t)}catch(i){if(i instanceof DOMException&&"InvalidModificationError"===i.name)console.warn(`The CSS property ${t.name} has already been registered.`);else throw i}}class tn extends EventTarget{#e;#t=new Set;#i;#r=!1;constructor(t){super(),this.#e=t,this.#i=new CSSStyleSheet}#a(t){let{propertyName:i}=t;this.#t.has(i)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:i}}))}observe(t){this.connect(),this.#t.has(t)||(this.#t.add(t),this.#i.replaceSync(`
1187
1187
  :root::before, :host::before {
1188
1188
  content: '' !important;
1189
1189
  position: absolute !important;
@@ -3297,7 +3297,7 @@ ${l.shaderPreludeCode.vertexSource}`,define:l.shaderDefine},defaultProjectionDat
3297
3297
  :host([theme~='align-right']) ::slotted([slot='value']) {
3298
3298
  justify-content: right;
3299
3299
  }
3300
- `;class nl{#W=null;constructor(t,i){this.query=t,this.callback=i}hostConnected(){this.#X(),this.#W=window.matchMedia(this.query),this.#K(),this.#Y(this.#W)}hostDisconnected(){this.#X()}#K(){this.#W&&this.#W.addListener(this.#Y)}#X(){this.#W&&this.#W.removeListener(this.#Y),this.#W=null}#Y=t=>{"function"==typeof this.callback&&this.callback(t.matches)}}class nh extends tJ{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,i)=>{i._setFocusElement(t),i.ariaTarget=t,i.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}let nu=t=>class extends ia(iE(is(iT(t)))){static get properties(){return{items:{type:Array},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged",sync:!0},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object,__slottedListBox:{type:Object,sync:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder, focusElement)"]}constructor(){super(),this._itemId=`value-${this.localName}-${tY++}`,this._srLabelController=new ix(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._overlayElement=this.$.overlay,this._valueButtonController=new nh(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new nl(this._phoneMediaQuery,t=>{this._phone=t})),this._tooltipController=new tQ(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}updated(t){if(super.updated(t),t.has("_phone")&&this.toggleAttribute("phone",this._phone),(t.has("items")||t.has("renderer")||t.has("__slottedListBox"))&&this.__slottedListBox&&(this.items?.length||this.renderer))throw Error('A slotted <vaadin-select-list-box> cannot be used together with the "items" or "renderer" property.');if(t.has("items")&&this._overlayElement.requestContentUpdate(),t.has("__slottedListBox")){let i=this.__slottedListBox;i?this._assignMenuElement(i):t.get("__slottedListBox")&&(this._menuElement=null,this._items=null,this.__lastMenuElement=null)}t.has("accessibleName")&&this._srLabelController.setLabel(this.accessibleName),t.has("required")&&!1===this.required&&this._requestValidation()}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}__onOverlaySlotChange(t){this.__slottedListBox=t.target.assignedElements().find(t=>t._hasVaadinListMixin)}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",()=>{this.__initMenuItems(t)}),t.addEventListener("selected-changed",()=>this.__updateValueButton()),t.addEventListener("keydown",t=>this._onKeyDownInside(t),!0),t.addEventListener("click",t=>{let i=t.composedPath().find(t=>t._hasVaadinItemMixin);this.__dispatchChangePending=i?.value!==void 0&&i.value!==this.value,this.opened=!1},!0),this.__lastMenuElement=t),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,i){this.toggleAttribute("has-value",!!t),void 0===i||this.__dispatchChangePending||this._requestValidation()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onEscape(t){this.opened&&(t.stopPropagation(),this.opened=!1)}_onToggleMouseDown(t){t.preventDefault(),this.opened||this.focusElement.focus()}_onKeyDown(t){if(super._onKeyDown(t),!t.altKey&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey&&t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){let i=this._menuElement.selected,r=this._menuElement._searchKey(i??-1,t.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r)}}}_onKeyDownInside(t){"Tab"===t.key&&(this.focusElement.setAttribute("tabindex","-1"),this._overlayElement.restoreFocusOnClose=!1,this.opened=!1,setTimeout(()=>{this.focusElement.setAttribute("tabindex","0"),this._overlayElement.restoreFocusOnClose=!0}))}_openedChanged(t,i){if(t){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1);let t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else i&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation())}_updateAriaExpanded(t,i){i&&i.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&tG(this.focusElement,"aria-live",t&&"polite")}__attachSelectedItem(t){let i,r=t.getAttribute("label");(i=r?this.__createItemElement({label:r}):t.cloneNode(!0))._sourceItem=t,this.__appendValueItemElement(i,this.focusElement),i.selected=!0}__createItemElement(t){let i=document.createElement(t.component||"vaadin-select-item");return t.label&&(i.textContent=t.label),t.value&&(i.value=t.value),t.disabled&&(i.disabled=t.disabled),t.className&&(i.className=t.className),i}__appendValueItemElement(t,i){i.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}__updateValueButton(){let t=this.focusElement;if(!t)return;t.innerHTML="";let i=this._items?this._items[this._menuElement.selected]:void 0;if(t.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){let i=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(i,t),t.setAttribute("placeholder","")}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),this.__updateFieldAriaControllerLabelledBy()}_hasContent(t){if(!t)return!1;let i=!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim()),r=t.childElementCount>0;return i||r}_updateSelectedItem(t,i,r){if(i){let r=null==t?t:t.toString();this._menuElement.selected=i.reduce((t,i,a)=>void 0===t&&i.value===r?a:t,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}else r&&this.__updateValueButton()}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,i){if(!this.items||0===this.items.length){t.textContent="";return}let r=t.firstElementChild;r||(r=document.createElement("vaadin-select-list-box"),t.appendChild(r)),r.textContent="",this.items.forEach(t=>{r.appendChild(this.__createItemElement(t))})}__dispatchChange(){this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}__updateFieldAriaControllerLabel(){}__updateFieldAriaControllerLabelledBy(){let t;this.accessibleNameRef?t=this.accessibleNameRef:this.accessibleName?t=this._srLabelController.defaultId:this.hasAttribute("has-label")&&(t=this._labelNode?.id);let i=[t,this._items?.[this._menuElement.selected]||this.placeholder?this._itemId:null].filter(Boolean);i.length>0?this._fieldAriaController.setLabelledBy(i.join(" ")):this._fieldAriaController.setLabelledBy(null)}};class nc extends nu(tN(tx(tr(tg(ex))))){static get is(){return"vaadin-select"}static get styles(){return[t1,aH,no]}render(){return et`
3300
+ `;class nl{#W=null;constructor(t,i){this.query=t,this.callback=i}hostConnected(){this.#X(),this.#W=window.matchMedia(this.query),this.#K(),this.#Y(this.#W)}hostDisconnected(){this.#X()}#K(){this.#W&&this.#W.addListener(this.#Y)}#X(){this.#W&&this.#W.removeListener(this.#Y),this.#W=null}#Y=t=>{"function"==typeof this.callback&&this.callback(t.matches)}}class nh extends tJ{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,i)=>{i._setFocusElement(t),i.ariaTarget=t,i.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}let nu=t=>class extends ia(iE(is(iT(t)))){static get properties(){return{items:{type:Array},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged",sync:!0},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object,__slottedListBox:{type:Object,sync:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder, focusElement)"]}constructor(){super(),this._itemId=`value-${this.localName}-${tY++}`,this._srLabelController=new ix(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._overlayElement=this.$.overlay,this._valueButtonController=new nh(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new nl(this._phoneMediaQuery,t=>{this._phone=t})),this._tooltipController=new tQ(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}updated(t){if(super.updated(t),t.has("_phone")&&this.toggleAttribute("phone",this._phone),(t.has("items")||t.has("renderer")||t.has("__slottedListBox"))&&this.__slottedListBox&&(this.items?.length||this.renderer))throw Error('A slotted <vaadin-select-list-box> cannot be used together with the "items" or "renderer" property.');if(t.has("items")&&this._overlayElement.requestContentUpdate(),t.has("__slottedListBox")){let i=this.__slottedListBox;i?this._assignMenuElement(i):t.get("__slottedListBox")&&(this._menuElement=null,this._items=null,this.__lastMenuElement=null)}t.has("accessibleName")&&this._srLabelController.setLabel(this.accessibleName),t.has("required")&&!1===this.required&&this._requestValidation()}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}__onOverlaySlotChange(t){this.__slottedListBox=t.target.assignedElements().find(t=>t._hasVaadinListMixin)}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",()=>{this.__initMenuItems(t)}),t.addEventListener("selected-changed",()=>this.__updateValueButton()),t.addEventListener("keydown",t=>this._onKeyDownInside(t),!0),t.addEventListener("click",t=>{let i=t.composedPath().find(t=>t._hasVaadinItemMixin);this.__dispatchChangePending=i?.value!==void 0&&i.value!==this.value,this.opened=!1},!0),this.__lastMenuElement=t),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,i){this.toggleAttribute("has-value",!!t),void 0===i||this.__dispatchChangePending||this._requestValidation()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onEscape(t){this.opened&&(t.stopPropagation(),this.opened=!1)}_onToggleMouseDown(t){t.preventDefault(),this.opened||this.focusElement.focus()}_onKeyDown(t){if(super._onKeyDown(t),!t.altKey&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey&&t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){let i=this._menuElement.selected,r=this._menuElement._searchKey(i??-1,t.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r)}}}_onKeyDownInside(t){"Tab"===t.key&&(this.focusElement.setAttribute("tabindex","-1"),this._overlayElement.restoreFocusOnClose=!1,this.opened=!1,setTimeout(()=>{this.focusElement.setAttribute("tabindex","0"),this._overlayElement.restoreFocusOnClose=!0}))}_openedChanged(t,i){if(t){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1);let t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else i&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation())}_updateAriaExpanded(t,i){i&&i.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&tG(this.focusElement,"aria-live",t&&"polite")}__attachSelectedItem(t){let i,r=t.getAttribute("label");(i=r?this.__createItemElement({label:r}):t.cloneNode(!0))._sourceItem=t,this.__appendValueItemElement(i,this.focusElement)}__createItemElement(t){let i=document.createElement(t.component||"vaadin-select-item");return t.label&&(i.textContent=t.label),t.value&&(i.value=t.value),t.disabled&&(i.disabled=t.disabled),t.className&&(i.className=t.className),i}__appendValueItemElement(t,i){i.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("selected"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}__updateValueButton(){let t=this.focusElement;if(!t)return;t.innerHTML="";let i=this._items?this._items[this._menuElement.selected]:void 0;if(t.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){let i=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(i,t),t.setAttribute("placeholder","")}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),this.__updateFieldAriaControllerLabelledBy()}_hasContent(t){if(!t)return!1;let i=!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim()),r=t.childElementCount>0;return i||r}_updateSelectedItem(t,i,r){if(i){let r=null==t?t:t.toString();this._menuElement.selected=i.reduce((t,i,a)=>void 0===t&&i.value===r?a:t,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}else r&&this.__updateValueButton()}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,i){if(!this.items||0===this.items.length){t.textContent="";return}let r=t.firstElementChild;r||(r=document.createElement("vaadin-select-list-box"),t.appendChild(r)),r.textContent="",this.items.forEach(t=>{r.appendChild(this.__createItemElement(t))})}__dispatchChange(){this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}__updateFieldAriaControllerLabel(){}__updateFieldAriaControllerLabelledBy(){let t;this.accessibleNameRef?t=this.accessibleNameRef:this.accessibleName?t=this._srLabelController.defaultId:this.hasAttribute("has-label")&&(t=this._labelNode?.id);let i=[t,this._items?.[this._menuElement.selected]||this.placeholder?this._itemId:null].filter(Boolean);i.length>0?this._fieldAriaController.setLabelledBy(i.join(" ")):this._fieldAriaController.setLabelledBy(null)}};class nc extends nu(tN(tx(tr(tg(ex))))){static get is(){return"vaadin-select"}static get styles(){return[t1,aH,no]}render(){return et`
3301
3301
  <div class="vaadin-select-container">
3302
3302
  <div part="label" @click="${this._onClick}">
3303
3303
  <slot name="label"></slot>
@@ -1183,7 +1183,7 @@ ${l.shaderPreludeCode.vertexSource}`,define:l.shaderDefine},defaultProjectionDat
1183
1183
  </div>`:""}
1184
1184
  <or-icon icon="or:marker"></or-icon>
1185
1185
  <or-icon class="marker-icon" icon="${t||""}"></or-icon>
1186
- `,eR([eA({type:Number,reflect:!0,attribute:!0})],eO.prototype,"lat",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"lng",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"radius",void 0),eR([eA({reflect:!0})],eO.prototype,"displayValue",void 0),eR([eA({reflect:!0})],eO.prototype,"direction",void 0),eR([eA({type:Boolean})],eO.prototype,"visible",void 0),eR([eA({type:String})],eO.prototype,"icon",void 0),eR([eA({type:String})],eO.prototype,"color",void 0),eR([eA({type:String})],eO.prototype,"activeColor",void 0),eR([eA({type:Boolean})],eO.prototype,"interactive",void 0),eR([eA({type:Boolean})],eO.prototype,"active",void 0),eR([eP("slot")],eO.prototype,"_slot",void 0),eO=o=eR([eT("or-map-marker")],eO);var eV=r(650),e$=r(776);function ej(i){return t||(t=new Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short",maximumFractionDigits:1})),t.format(i).toLowerCase()}function eN(t,i){return t/.075/Math.cos(i*Math.PI/180)}function eU(t){if(t){if(t instanceof eD.st)return t;if(t.lat)return t.lon?{lng:t.lon,lat:t.lat}:{lng:t.lng,lat:t.lat};if(Array.isArray(t))return{lng:t[0],lat:t[1]};if(t.coordinates&&Array.isArray(t.coordinates)&&t.coordinates.length>=2)return eU(t.coordinates);if(t.attributes){let i=t.attributes.location;return i&&i.value?eU(i.value):void 0}if(t.value)return eU(t.value)}}function eq(t){if(t)return Array.isArray(t)?{type:"Point",coordinates:t}:{type:"Point",coordinates:[t.hasOwnProperty("lng")?t.lng:t.lon,t.lat]}}function eG(t){if(t){if(t instanceof e$.LngLatBounds)return t;if(2===t.length){let i=eU(t[0]),r=eU(t[1]);if(i&&r)return new e$.LngLatBounds(i,r)}if(4===t.length)return new e$.LngLatBounds([t[0],t[1],t[2],t[3]])}}function eZ(t,i){if(!t)return;let r="string"==typeof t?eV.AssetModelUtil.getAssetDescriptor(t):t,a=r&&r.icon?r.icon:"help-circle",n=r&&r.colour?r.colour:void 0;if(i&&i.markerConfig){let t=i.markerConfig,r=i.currentValue;if("range"===t.type&&t.ranges&&"number"==typeof r){let i=t.ranges;n=(i.sort((t,i)=>i.min-t.min).find(t=>r>=t.min)||i.reduce((t,i)=>i.min>t.min?t:i)).colour||void 0}else"boolean"===t.type?n=t[!!r+""]:"string"===t.type&&(n=t[r+""])}return{color:n,icon:a}}function eH(t){var i;if(!(null==t?void 0:t.attributes))return!1;let r=t.attributes.location;return!!(null==(i=null==r?void 0:r.value)?void 0:i.coordinates)&&(!r.meta||!("showOnDashboard"in r.meta)||!!h.Util.getMetaValue("showOnDashboard",r))}var eW=function(t,i,r,a){var n,s=arguments.length,o=s<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,r,a);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(o=(s<3?n(o):s>3?n(i,r,o):n(i,r))||o);return s>3&&o&&Object.defineProperty(i,r,o),o};function eX(t,i){if(t&&i&&t[i])return t[i]}function eK(t,i){let r=eX(t,i);if(r)return r.attributeName}let eY=class extends(0,h.subscribe)(u())(eO){constructor(){super(),this.assetTypeAsIcon=!0,this.visible=!1}set type(t){let i,r=eX(this.config,t);if(r&&r.attributeName&&this.asset&&this.asset.attributes&&this.asset.attributes[r.attributeName]&&r.colours){let t=this.asset.attributes[r.attributeName].value;i={markerConfig:r.colours,currentValue:t}}let a=eZ(t,i);if(!a){this.visible=!1;return}this.assetTypeAsIcon&&(this.icon=a.icon),this._markerColor=Array.isArray(a.color)?a.color[0].colour:a.color||void 0,this._updateColor(this.markerContainer),this.visible=!0}shouldUpdate(t){if(t.has("assetId")&&(this.lat=void 0,this.lng=void 0,this.type=void 0,this.direction=void 0,this.displayValue=void 0,this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1===Object.keys(t).length))return!1;if(t.has("asset"))try{this._onAssetChanged(this.asset)}catch(t){console.error(t)}return super.shouldUpdate(t)}_onEvent(t){if("attribute"===t.eventType)return"location"===t.ref.name?void this._updateLocation(t.value):void(this.asset&&(this.asset=h.Util.updateAsset(this.asset,t),this.requestUpdate()));if("asset"===t.eventType)switch(t.cause){case"READ":case"CREATE":case"UPDATE":this._onAssetChanged(t.asset);break;case"DELETE":this._onAssetChanged(void 0)}}_onAssetChanged(t){var i,r,a,n;return i=this,r=void 0,a=void 0,n=function*(){if(t){this.direction=void 0,this.displayValue=void 0;let i=t.attributes?t.attributes.location:void 0;this._updateLocation(i?i.value:null);let r=eX(this.config,t.type),a=!r||!r.hideDirection,n=r&&!0===r.showLabel&&!!r.attributeName,s=!!(r&&!1!==r.showUnits);if(n&&t.attributes&&t.attributes[null==r?void 0:r.attributeName]){let i=t.attributes[r.attributeName],a=eV.AssetModelUtil.getAttributeAndValueDescriptors(t.type,i.name,i);this.displayValue=h.Util.getAttributeValueAsString(i,a[0],t.type,s,"-")}if(a&&t.attributes&&t.attributes.direction){let i=t.attributes.direction.value;null!=i&&(this.direction=i.toString())}this.type=t.type}else this.lat=void 0,this.lng=void 0},new(a||(a=Promise))(function(t,s){function o(t){try{h(n.next(t))}catch(t){s(t)}}function l(t){try{h(n.throw(t))}catch(t){s(t)}}function h(i){var r;i.done?t(i.value):((r=i.value)instanceof a?r:new a(function(t){t(r)})).then(o,l)}h((n=n.apply(i,r||[])).next())})}_updateLocation(t){this.lat=t&&t.coordinates?t.coordinates[1]:void 0,this.lng=t&&t.coordinates?t.coordinates[0]:void 0}_getColor(){return this._markerColor&&!this.color?"#"+this._markerColor:super._getColor()}_getActiveColor(){return this._markerColor&&!this.activeColor?"#"+this._markerColor:super._getActiveColor()}};eW([eA({type:String,reflect:!0,attribute:!0})],eY.prototype,"assetId",void 0),eW([eA({type:Object,attribute:!0})],eY.prototype,"asset",void 0),eW([eA()],eY.prototype,"config",void 0),eY=eW([eT("or-map-marker-asset")],eY),window.Vaadin||={},window.Vaadin.featureFlags||={};let eJ={};function eQ(t,i="25.3.4"){if(Object.defineProperty(t,"version",{get:()=>i}),t.experimental){let i="string"==typeof t.experimental?t.experimental:`${t.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,t=>t[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[i]||eJ[i]){if(eJ[i])return void eJ[i].add(t)}else{eJ[i]=new Set,eJ[i].add(t),Object.defineProperty(window.Vaadin.featureFlags,i,{get:()=>0===eJ[i].size,set(t){t&&eJ[i].size>0&&(eJ[i].forEach(t=>{customElements.define(t.is,t)}),eJ[i].clear())}});return}}let r=customElements.get(t.is);if(r){let i=r.version;i&&t.version&&i===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${r.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}let e0=[];function e2(t,i,r=t.getAttribute("dir")){i?t.setAttribute("dir",i):null!=r&&t.removeAttribute("dir")}function e1(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let t=e1();e0.forEach(i=>{e2(i,t)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let e3=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),e2(this,e1(),null))}attributeChangedCallback(t,i,r){if(super.attributeChangedCallback(t,i,r),"dir"!==t)return;let a=e1(),n=r===a&&-1===e0.indexOf(this),s=!r&&i&&-1===e0.indexOf(this),o=r!==a&&i===a;n||s?(this.__subscribe(),e2(this,a,r)):o&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=e0.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,i,r){("dir"!==r||""!==i||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,i,r)}_attributeToProperty(t,i,r){"dir"!==t||i?super._attributeToProperty(t,i,r):this.dir=""}__subscribe(){e0.includes(this)||e0.push(this)}__unsubscribe(){e0.includes(this)&&e0.splice(e0.indexOf(this),1)}},e5=new WeakMap;function e4(t){return i=>{if(function(t,i){let r=i;for(;r;){if(e5.get(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}(t,i))return i;let r=t(i);return e5.set(r,t),r}}function e6(t,i){return t.split(".").reduce((t,i)=>t?t[i]:void 0,i)}let e8={},e7=/([A-Z])/gu;function e9(t){return e8[t]||(e8[t]=t.replace(e7,"-$1").toLowerCase()),e8[t]}function te(t){return t[0].toUpperCase()+t.substring(1)}function tt(t){let[i,r]=t.split("(");return{method:i,observerProps:r.replace(")","").split(",").map(t=>t.trim())}}function ti(t,i){return Object.prototype.hasOwnProperty.call(t,i)||(t[i]=new Map(t[i])),t[i]}let tr=e4(t=>class extends t{static enabledWarnings=[];static createProperty(t,i){[String,Boolean,Number,Array].includes(i)&&(i={type:i}),i?.reflectToAttribute&&(i.reflect=!0),super.createProperty(t,i)}static getOrCreateMap(t){return ti(this,t)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let t=this.getOrCreateMap("__complexObservers");this.observers.forEach(i=>{let{method:r,observerProps:a}=tt(i);t.set(r,a)})}}static addCheckedInitializer(t){super.addInitializer(i=>{i instanceof this&&t(i)})}static getPropertyDescriptor(t,i,r){let a=super.getPropertyDescriptor(t,i,r),n=a;if(this.getOrCreateMap("__propKeys").set(t,i),r.sync&&(n={get:a.get,set(a){let n=this[t];M(a,n)&&(this[i]=a,this.requestUpdate(t,n,r),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),r.readOnly){let i=n.set;this.addCheckedInitializer(r=>{r[`_set${te(t)}`]=function(t){i.call(r,t)}}),n={get:n.get,set(){},configurable:!0,enumerable:!0}}if("value"in r&&this.addCheckedInitializer(i=>{let a="function"==typeof r.value?r.value.call(i):r.value;r.readOnly?i[`_set${te(t)}`](a):i[t]=a}),r.observer){let i=r.observer;this.getOrCreateMap("__observers").set(t,i),this.addCheckedInitializer(t=>{t[i]||console.warn(`observer method ${i} not defined`)})}if(r.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let t=this.__notifyProps;this.__notifyProps=new Set(t)}}else this.__notifyProps=new Set;this.__notifyProps.add(t)}if(r.computed){let i=`__assignComputed${t}`,a=tt(r.computed);this.prototype[i]=function(...i){this[t]=this[a.method](...i)},this.getOrCreateMap("__computedObservers").set(i,a.observerProps)}return r.attribute||(r.attribute=e9(t)),n}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:t}=this.constructor;this.hasUpdated||t.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(t=>{this.$[t.id]=t})}ready(){}willUpdate(t){this.constructor.__computedObservers&&this.__runComplexObservers(t,this.constructor.__computedObservers)}updated(t){let i=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(t,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(t,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(t,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(t,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(t,this.constructor.__notifyProps),i||this.ready()}setProperties(t){Object.entries(t).forEach(([t,i])=>{let r=this.constructor.__propKeys.get(t),a=this[r];this[r]=i,this.requestUpdate(t,a)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(t){let i=ti(this,"__dynamicMethodObservers"),{method:r,observerProps:a}=tt(t);i.set(r,a)}_createPropertyObserver(t,i){ti(this,"__dynamicPropertyObservers").set(i,t)}__runComplexObservers(t,i){i.forEach((i,r)=>{i.some(i=>t.has(i))&&(this[r]?this[r](...i.map(t=>this[t])):console.warn(`observer method ${r} not defined`))})}__runDynamicObservers(t,i){i.forEach((i,r)=>{t.has(i)&&this[r]&&this[r](this[i],t.get(i))})}__runObservers(t,i){t.forEach((t,r)=>{let a=i.get(r);void 0!==a&&this[a]&&this[a](this[r],t)})}__runNotifyProps(t,i){t.forEach((t,r)=>{i.has(r)&&this.dispatchEvent(new CustomEvent(`${e9(r)}-changed`,{detail:{value:this[r]}}))})}_get(t,i){return e6(t,i)}_set(t,i,r){let a,n;n=(a=t.split(".")).pop(),a.reduce((t,i)=>t[i],r)[n]=i}});function ta(t){try{CSS.registerProperty(t)}catch(i){if(i instanceof DOMException&&"InvalidModificationError"===i.name)console.warn(`The CSS property ${t.name} has already been registered.`);else throw i}}class tn extends EventTarget{#e;#t=new Set;#i;#r=!1;constructor(t){super(),this.#e=t,this.#i=new CSSStyleSheet}#a(t){let{propertyName:i}=t;this.#t.has(i)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:i}}))}observe(t){this.connect(),this.#t.has(t)||(this.#t.add(t),this.#i.replaceSync(`
1186
+ `,eR([eA({type:Number,reflect:!0,attribute:!0})],eO.prototype,"lat",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"lng",void 0),eR([eA({type:Number,reflect:!0})],eO.prototype,"radius",void 0),eR([eA({reflect:!0})],eO.prototype,"displayValue",void 0),eR([eA({reflect:!0})],eO.prototype,"direction",void 0),eR([eA({type:Boolean})],eO.prototype,"visible",void 0),eR([eA({type:String})],eO.prototype,"icon",void 0),eR([eA({type:String})],eO.prototype,"color",void 0),eR([eA({type:String})],eO.prototype,"activeColor",void 0),eR([eA({type:Boolean})],eO.prototype,"interactive",void 0),eR([eA({type:Boolean})],eO.prototype,"active",void 0),eR([eP("slot")],eO.prototype,"_slot",void 0),eO=o=eR([eT("or-map-marker")],eO);var eV=r(650),e$=r(776);function ej(i){return t||(t=new Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short",maximumFractionDigits:1})),t.format(i).toLowerCase()}function eN(t,i){return t/.075/Math.cos(i*Math.PI/180)}function eU(t){if(t){if(t instanceof eD.st)return t;if(t.lat)return t.lon?{lng:t.lon,lat:t.lat}:{lng:t.lng,lat:t.lat};if(Array.isArray(t))return{lng:t[0],lat:t[1]};if(t.coordinates&&Array.isArray(t.coordinates)&&t.coordinates.length>=2)return eU(t.coordinates);if(t.attributes){let i=t.attributes.location;return i&&i.value?eU(i.value):void 0}if(t.value)return eU(t.value)}}function eq(t){if(t)return Array.isArray(t)?{type:"Point",coordinates:t}:{type:"Point",coordinates:[t.hasOwnProperty("lng")?t.lng:t.lon,t.lat]}}function eG(t){if(t){if(t instanceof e$.LngLatBounds)return t;if(2===t.length){let i=eU(t[0]),r=eU(t[1]);if(i&&r)return new e$.LngLatBounds(i,r)}if(4===t.length)return new e$.LngLatBounds([t[0],t[1],t[2],t[3]])}}function eZ(t,i){if(!t)return;let r="string"==typeof t?eV.AssetModelUtil.getAssetDescriptor(t):t,a=r&&r.icon?r.icon:"help-circle",n=r&&r.colour?r.colour:void 0;if(i&&i.markerConfig){let t=i.markerConfig,r=i.currentValue;if("range"===t.type&&t.ranges&&"number"==typeof r){let i=t.ranges;n=(i.sort((t,i)=>i.min-t.min).find(t=>r>=t.min)||i.reduce((t,i)=>i.min>t.min?t:i)).colour||void 0}else"boolean"===t.type?n=t[!!r+""]:"string"===t.type&&(n=t[r+""])}return{color:n,icon:a}}function eH(t){var i;if(!(null==t?void 0:t.attributes))return!1;let r=t.attributes.location;return!!(null==(i=null==r?void 0:r.value)?void 0:i.coordinates)&&(!r.meta||!("showOnDashboard"in r.meta)||!!h.Util.getMetaValue("showOnDashboard",r))}var eW=function(t,i,r,a){var n,s=arguments.length,o=s<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,r,a);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(o=(s<3?n(o):s>3?n(i,r,o):n(i,r))||o);return s>3&&o&&Object.defineProperty(i,r,o),o};function eX(t,i){if(t&&i&&t[i])return t[i]}function eK(t,i){let r=eX(t,i);if(r)return r.attributeName}let eY=class extends(0,h.subscribe)(u())(eO){constructor(){super(),this.assetTypeAsIcon=!0,this.visible=!1}set type(t){let i,r=eX(this.config,t);if(r&&r.attributeName&&this.asset&&this.asset.attributes&&this.asset.attributes[r.attributeName]&&r.colours){let t=this.asset.attributes[r.attributeName].value;i={markerConfig:r.colours,currentValue:t}}let a=eZ(t,i);if(!a){this.visible=!1;return}this.assetTypeAsIcon&&(this.icon=a.icon),this._markerColor=Array.isArray(a.color)?a.color[0].colour:a.color||void 0,this._updateColor(this.markerContainer),this.visible=!0}shouldUpdate(t){if(t.has("assetId")&&(this.lat=void 0,this.lng=void 0,this.type=void 0,this.direction=void 0,this.displayValue=void 0,this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1===Object.keys(t).length))return!1;if(t.has("asset"))try{this._onAssetChanged(this.asset)}catch(t){console.error(t)}return super.shouldUpdate(t)}_onEvent(t){if("attribute"===t.eventType)return"location"===t.ref.name?void this._updateLocation(t.value):void(this.asset&&(this.asset=h.Util.updateAsset(this.asset,t),this.requestUpdate()));if("asset"===t.eventType)switch(t.cause){case"READ":case"CREATE":case"UPDATE":this._onAssetChanged(t.asset);break;case"DELETE":this._onAssetChanged(void 0)}}_onAssetChanged(t){var i,r,a,n;return i=this,r=void 0,a=void 0,n=function*(){if(t){this.direction=void 0,this.displayValue=void 0;let i=t.attributes?t.attributes.location:void 0;this._updateLocation(i?i.value:null);let r=eX(this.config,t.type),a=!r||!r.hideDirection,n=r&&!0===r.showLabel&&!!r.attributeName,s=!!(r&&!1!==r.showUnits);if(n&&t.attributes&&t.attributes[null==r?void 0:r.attributeName]){let i=t.attributes[r.attributeName],a=eV.AssetModelUtil.getAttributeAndValueDescriptors(t.type,i.name,i);this.displayValue=h.Util.getAttributeValueAsString(i,a[0],t.type,s,"-")}if(a&&t.attributes&&t.attributes.direction){let i=t.attributes.direction.value;null!=i&&(this.direction=i.toString())}this.type=t.type}else this.lat=void 0,this.lng=void 0},new(a||(a=Promise))(function(t,s){function o(t){try{h(n.next(t))}catch(t){s(t)}}function l(t){try{h(n.throw(t))}catch(t){s(t)}}function h(i){var r;i.done?t(i.value):((r=i.value)instanceof a?r:new a(function(t){t(r)})).then(o,l)}h((n=n.apply(i,r||[])).next())})}_updateLocation(t){this.lat=t&&t.coordinates?t.coordinates[1]:void 0,this.lng=t&&t.coordinates?t.coordinates[0]:void 0}_getColor(){return this._markerColor&&!this.color?"#"+this._markerColor:super._getColor()}_getActiveColor(){return this._markerColor&&!this.activeColor?"#"+this._markerColor:super._getActiveColor()}};eW([eA({type:String,reflect:!0,attribute:!0})],eY.prototype,"assetId",void 0),eW([eA({type:Object,attribute:!0})],eY.prototype,"asset",void 0),eW([eA()],eY.prototype,"config",void 0),eY=eW([eT("or-map-marker-asset")],eY),window.Vaadin||={},window.Vaadin.featureFlags||={};let eJ={};function eQ(t,i="25.3.5"){if(Object.defineProperty(t,"version",{get:()=>i}),t.experimental){let i="string"==typeof t.experimental?t.experimental:`${t.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,t=>t[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[i]||eJ[i]){if(eJ[i])return void eJ[i].add(t)}else{eJ[i]=new Set,eJ[i].add(t),Object.defineProperty(window.Vaadin.featureFlags,i,{get:()=>0===eJ[i].size,set(t){t&&eJ[i].size>0&&(eJ[i].forEach(t=>{customElements.define(t.is,t)}),eJ[i].clear())}});return}}let r=customElements.get(t.is);if(r){let i=r.version;i&&t.version&&i===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${r.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}let e0=[];function e2(t,i,r=t.getAttribute("dir")){i?t.setAttribute("dir",i):null!=r&&t.removeAttribute("dir")}function e1(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let t=e1();e0.forEach(i=>{e2(i,t)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let e3=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),e2(this,e1(),null))}attributeChangedCallback(t,i,r){if(super.attributeChangedCallback(t,i,r),"dir"!==t)return;let a=e1(),n=r===a&&-1===e0.indexOf(this),s=!r&&i&&-1===e0.indexOf(this),o=r!==a&&i===a;n||s?(this.__subscribe(),e2(this,a,r)):o&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=e0.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,i,r){("dir"!==r||""!==i||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,i,r)}_attributeToProperty(t,i,r){"dir"!==t||i?super._attributeToProperty(t,i,r):this.dir=""}__subscribe(){e0.includes(this)||e0.push(this)}__unsubscribe(){e0.includes(this)&&e0.splice(e0.indexOf(this),1)}},e5=new WeakMap;function e4(t){return i=>{if(function(t,i){let r=i;for(;r;){if(e5.get(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}(t,i))return i;let r=t(i);return e5.set(r,t),r}}function e6(t,i){return t.split(".").reduce((t,i)=>t?t[i]:void 0,i)}let e8={},e7=/([A-Z])/gu;function e9(t){return e8[t]||(e8[t]=t.replace(e7,"-$1").toLowerCase()),e8[t]}function te(t){return t[0].toUpperCase()+t.substring(1)}function tt(t){let[i,r]=t.split("(");return{method:i,observerProps:r.replace(")","").split(",").map(t=>t.trim())}}function ti(t,i){return Object.prototype.hasOwnProperty.call(t,i)||(t[i]=new Map(t[i])),t[i]}let tr=e4(t=>class extends t{static enabledWarnings=[];static createProperty(t,i){[String,Boolean,Number,Array].includes(i)&&(i={type:i}),i?.reflectToAttribute&&(i.reflect=!0),super.createProperty(t,i)}static getOrCreateMap(t){return ti(this,t)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let t=this.getOrCreateMap("__complexObservers");this.observers.forEach(i=>{let{method:r,observerProps:a}=tt(i);t.set(r,a)})}}static addCheckedInitializer(t){super.addInitializer(i=>{i instanceof this&&t(i)})}static getPropertyDescriptor(t,i,r){let a=super.getPropertyDescriptor(t,i,r),n=a;if(this.getOrCreateMap("__propKeys").set(t,i),r.sync&&(n={get:a.get,set(a){let n=this[t];M(a,n)&&(this[i]=a,this.requestUpdate(t,n,r),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),r.readOnly){let i=n.set;this.addCheckedInitializer(r=>{r[`_set${te(t)}`]=function(t){i.call(r,t)}}),n={get:n.get,set(){},configurable:!0,enumerable:!0}}if("value"in r&&this.addCheckedInitializer(i=>{let a="function"==typeof r.value?r.value.call(i):r.value;r.readOnly?i[`_set${te(t)}`](a):i[t]=a}),r.observer){let i=r.observer;this.getOrCreateMap("__observers").set(t,i),this.addCheckedInitializer(t=>{t[i]||console.warn(`observer method ${i} not defined`)})}if(r.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let t=this.__notifyProps;this.__notifyProps=new Set(t)}}else this.__notifyProps=new Set;this.__notifyProps.add(t)}if(r.computed){let i=`__assignComputed${t}`,a=tt(r.computed);this.prototype[i]=function(...i){this[t]=this[a.method](...i)},this.getOrCreateMap("__computedObservers").set(i,a.observerProps)}return r.attribute||(r.attribute=e9(t)),n}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:t}=this.constructor;this.hasUpdated||t.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(t=>{this.$[t.id]=t})}ready(){}willUpdate(t){this.constructor.__computedObservers&&this.__runComplexObservers(t,this.constructor.__computedObservers)}updated(t){let i=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(t,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(t,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(t,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(t,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(t,this.constructor.__notifyProps),i||this.ready()}setProperties(t){Object.entries(t).forEach(([t,i])=>{let r=this.constructor.__propKeys.get(t),a=this[r];this[r]=i,this.requestUpdate(t,a)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(t){let i=ti(this,"__dynamicMethodObservers"),{method:r,observerProps:a}=tt(t);i.set(r,a)}_createPropertyObserver(t,i){ti(this,"__dynamicPropertyObservers").set(i,t)}__runComplexObservers(t,i){i.forEach((i,r)=>{i.some(i=>t.has(i))&&(this[r]?this[r](...i.map(t=>this[t])):console.warn(`observer method ${r} not defined`))})}__runDynamicObservers(t,i){i.forEach((i,r)=>{t.has(i)&&this[r]&&this[r](this[i],t.get(i))})}__runObservers(t,i){t.forEach((t,r)=>{let a=i.get(r);void 0!==a&&this[a]&&this[a](this[r],t)})}__runNotifyProps(t,i){t.forEach((t,r)=>{i.has(r)&&this.dispatchEvent(new CustomEvent(`${e9(r)}-changed`,{detail:{value:this[r]}}))})}_get(t,i){return e6(t,i)}_set(t,i,r){let a,n;n=(a=t.split(".")).pop(),a.reduce((t,i)=>t[i],r)[n]=i}});function ta(t){try{CSS.registerProperty(t)}catch(i){if(i instanceof DOMException&&"InvalidModificationError"===i.name)console.warn(`The CSS property ${t.name} has already been registered.`);else throw i}}class tn extends EventTarget{#e;#t=new Set;#i;#r=!1;constructor(t){super(),this.#e=t,this.#i=new CSSStyleSheet}#a(t){let{propertyName:i}=t;this.#t.has(i)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:i}}))}observe(t){this.connect(),this.#t.has(t)||(this.#t.add(t),this.#i.replaceSync(`
1187
1187
  :root::before, :host::before {
1188
1188
  content: '' !important;
1189
1189
  position: absolute !important;
@@ -3297,7 +3297,7 @@ ${l.shaderPreludeCode.vertexSource}`,define:l.shaderDefine},defaultProjectionDat
3297
3297
  :host([theme~='align-right']) ::slotted([slot='value']) {
3298
3298
  justify-content: right;
3299
3299
  }
3300
- `;class nl{#W=null;constructor(t,i){this.query=t,this.callback=i}hostConnected(){this.#X(),this.#W=window.matchMedia(this.query),this.#K(),this.#Y(this.#W)}hostDisconnected(){this.#X()}#K(){this.#W&&this.#W.addListener(this.#Y)}#X(){this.#W&&this.#W.removeListener(this.#Y),this.#W=null}#Y=t=>{"function"==typeof this.callback&&this.callback(t.matches)}}class nh extends tJ{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,i)=>{i._setFocusElement(t),i.ariaTarget=t,i.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}let nu=t=>class extends ia(iE(is(iT(t)))){static get properties(){return{items:{type:Array},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged",sync:!0},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object,__slottedListBox:{type:Object,sync:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder, focusElement)"]}constructor(){super(),this._itemId=`value-${this.localName}-${tY++}`,this._srLabelController=new ix(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._overlayElement=this.$.overlay,this._valueButtonController=new nh(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new nl(this._phoneMediaQuery,t=>{this._phone=t})),this._tooltipController=new tQ(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}updated(t){if(super.updated(t),t.has("_phone")&&this.toggleAttribute("phone",this._phone),(t.has("items")||t.has("renderer")||t.has("__slottedListBox"))&&this.__slottedListBox&&(this.items?.length||this.renderer))throw Error('A slotted <vaadin-select-list-box> cannot be used together with the "items" or "renderer" property.');if(t.has("items")&&this._overlayElement.requestContentUpdate(),t.has("__slottedListBox")){let i=this.__slottedListBox;i?this._assignMenuElement(i):t.get("__slottedListBox")&&(this._menuElement=null,this._items=null,this.__lastMenuElement=null)}t.has("accessibleName")&&this._srLabelController.setLabel(this.accessibleName),t.has("required")&&!1===this.required&&this._requestValidation()}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}__onOverlaySlotChange(t){this.__slottedListBox=t.target.assignedElements().find(t=>t._hasVaadinListMixin)}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",()=>{this.__initMenuItems(t)}),t.addEventListener("selected-changed",()=>this.__updateValueButton()),t.addEventListener("keydown",t=>this._onKeyDownInside(t),!0),t.addEventListener("click",t=>{let i=t.composedPath().find(t=>t._hasVaadinItemMixin);this.__dispatchChangePending=i?.value!==void 0&&i.value!==this.value,this.opened=!1},!0),this.__lastMenuElement=t),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,i){this.toggleAttribute("has-value",!!t),void 0===i||this.__dispatchChangePending||this._requestValidation()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onEscape(t){this.opened&&(t.stopPropagation(),this.opened=!1)}_onToggleMouseDown(t){t.preventDefault(),this.opened||this.focusElement.focus()}_onKeyDown(t){if(super._onKeyDown(t),!t.altKey&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey&&t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){let i=this._menuElement.selected,r=this._menuElement._searchKey(i??-1,t.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r)}}}_onKeyDownInside(t){"Tab"===t.key&&(this.focusElement.setAttribute("tabindex","-1"),this._overlayElement.restoreFocusOnClose=!1,this.opened=!1,setTimeout(()=>{this.focusElement.setAttribute("tabindex","0"),this._overlayElement.restoreFocusOnClose=!0}))}_openedChanged(t,i){if(t){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1);let t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else i&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation())}_updateAriaExpanded(t,i){i&&i.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&tG(this.focusElement,"aria-live",t&&"polite")}__attachSelectedItem(t){let i,r=t.getAttribute("label");(i=r?this.__createItemElement({label:r}):t.cloneNode(!0))._sourceItem=t,this.__appendValueItemElement(i,this.focusElement),i.selected=!0}__createItemElement(t){let i=document.createElement(t.component||"vaadin-select-item");return t.label&&(i.textContent=t.label),t.value&&(i.value=t.value),t.disabled&&(i.disabled=t.disabled),t.className&&(i.className=t.className),i}__appendValueItemElement(t,i){i.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}__updateValueButton(){let t=this.focusElement;if(!t)return;t.innerHTML="";let i=this._items?this._items[this._menuElement.selected]:void 0;if(t.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){let i=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(i,t),t.setAttribute("placeholder","")}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),this.__updateFieldAriaControllerLabelledBy()}_hasContent(t){if(!t)return!1;let i=!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim()),r=t.childElementCount>0;return i||r}_updateSelectedItem(t,i,r){if(i){let r=null==t?t:t.toString();this._menuElement.selected=i.reduce((t,i,a)=>void 0===t&&i.value===r?a:t,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}else r&&this.__updateValueButton()}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,i){if(!this.items||0===this.items.length){t.textContent="";return}let r=t.firstElementChild;r||(r=document.createElement("vaadin-select-list-box"),t.appendChild(r)),r.textContent="",this.items.forEach(t=>{r.appendChild(this.__createItemElement(t))})}__dispatchChange(){this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}__updateFieldAriaControllerLabel(){}__updateFieldAriaControllerLabelledBy(){let t;this.accessibleNameRef?t=this.accessibleNameRef:this.accessibleName?t=this._srLabelController.defaultId:this.hasAttribute("has-label")&&(t=this._labelNode?.id);let i=[t,this._items?.[this._menuElement.selected]||this.placeholder?this._itemId:null].filter(Boolean);i.length>0?this._fieldAriaController.setLabelledBy(i.join(" ")):this._fieldAriaController.setLabelledBy(null)}};class nc extends nu(tN(tx(tr(tg(ex))))){static get is(){return"vaadin-select"}static get styles(){return[t1,aH,no]}render(){return et`
3300
+ `;class nl{#W=null;constructor(t,i){this.query=t,this.callback=i}hostConnected(){this.#X(),this.#W=window.matchMedia(this.query),this.#K(),this.#Y(this.#W)}hostDisconnected(){this.#X()}#K(){this.#W&&this.#W.addListener(this.#Y)}#X(){this.#W&&this.#W.removeListener(this.#Y),this.#W=null}#Y=t=>{"function"==typeof this.callback&&this.callback(t.matches)}}class nh extends tJ{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,i)=>{i._setFocusElement(t),i.ariaTarget=t,i.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}let nu=t=>class extends ia(iE(is(iT(t)))){static get properties(){return{items:{type:Array},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged",sync:!0},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object,__slottedListBox:{type:Object,sync:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder, focusElement)"]}constructor(){super(),this._itemId=`value-${this.localName}-${tY++}`,this._srLabelController=new ix(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._overlayElement=this.$.overlay,this._valueButtonController=new nh(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new nl(this._phoneMediaQuery,t=>{this._phone=t})),this._tooltipController=new tQ(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}updated(t){if(super.updated(t),t.has("_phone")&&this.toggleAttribute("phone",this._phone),(t.has("items")||t.has("renderer")||t.has("__slottedListBox"))&&this.__slottedListBox&&(this.items?.length||this.renderer))throw Error('A slotted <vaadin-select-list-box> cannot be used together with the "items" or "renderer" property.');if(t.has("items")&&this._overlayElement.requestContentUpdate(),t.has("__slottedListBox")){let i=this.__slottedListBox;i?this._assignMenuElement(i):t.get("__slottedListBox")&&(this._menuElement=null,this._items=null,this.__lastMenuElement=null)}t.has("accessibleName")&&this._srLabelController.setLabel(this.accessibleName),t.has("required")&&!1===this.required&&this._requestValidation()}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}__onOverlaySlotChange(t){this.__slottedListBox=t.target.assignedElements().find(t=>t._hasVaadinListMixin)}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",()=>{this.__initMenuItems(t)}),t.addEventListener("selected-changed",()=>this.__updateValueButton()),t.addEventListener("keydown",t=>this._onKeyDownInside(t),!0),t.addEventListener("click",t=>{let i=t.composedPath().find(t=>t._hasVaadinItemMixin);this.__dispatchChangePending=i?.value!==void 0&&i.value!==this.value,this.opened=!1},!0),this.__lastMenuElement=t),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,i){this.toggleAttribute("has-value",!!t),void 0===i||this.__dispatchChangePending||this._requestValidation()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onEscape(t){this.opened&&(t.stopPropagation(),this.opened=!1)}_onToggleMouseDown(t){t.preventDefault(),this.opened||this.focusElement.focus()}_onKeyDown(t){if(super._onKeyDown(t),!t.altKey&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey&&t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){let i=this._menuElement.selected,r=this._menuElement._searchKey(i??-1,t.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r)}}}_onKeyDownInside(t){"Tab"===t.key&&(this.focusElement.setAttribute("tabindex","-1"),this._overlayElement.restoreFocusOnClose=!1,this.opened=!1,setTimeout(()=>{this.focusElement.setAttribute("tabindex","0"),this._overlayElement.restoreFocusOnClose=!0}))}_openedChanged(t,i){if(t){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1);let t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else i&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation())}_updateAriaExpanded(t,i){i&&i.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&tG(this.focusElement,"aria-live",t&&"polite")}__attachSelectedItem(t){let i,r=t.getAttribute("label");(i=r?this.__createItemElement({label:r}):t.cloneNode(!0))._sourceItem=t,this.__appendValueItemElement(i,this.focusElement)}__createItemElement(t){let i=document.createElement(t.component||"vaadin-select-item");return t.label&&(i.textContent=t.label),t.value&&(i.value=t.value),t.disabled&&(i.disabled=t.disabled),t.className&&(i.className=t.className),i}__appendValueItemElement(t,i){i.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("selected"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}__updateValueButton(){let t=this.focusElement;if(!t)return;t.innerHTML="";let i=this._items?this._items[this._menuElement.selected]:void 0;if(t.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){let i=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(i,t),t.setAttribute("placeholder","")}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),this.__updateFieldAriaControllerLabelledBy()}_hasContent(t){if(!t)return!1;let i=!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim()),r=t.childElementCount>0;return i||r}_updateSelectedItem(t,i,r){if(i){let r=null==t?t:t.toString();this._menuElement.selected=i.reduce((t,i,a)=>void 0===t&&i.value===r?a:t,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}else r&&this.__updateValueButton()}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,i){if(!this.items||0===this.items.length){t.textContent="";return}let r=t.firstElementChild;r||(r=document.createElement("vaadin-select-list-box"),t.appendChild(r)),r.textContent="",this.items.forEach(t=>{r.appendChild(this.__createItemElement(t))})}__dispatchChange(){this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}__updateFieldAriaControllerLabel(){}__updateFieldAriaControllerLabelledBy(){let t;this.accessibleNameRef?t=this.accessibleNameRef:this.accessibleName?t=this._srLabelController.defaultId:this.hasAttribute("has-label")&&(t=this._labelNode?.id);let i=[t,this._items?.[this._menuElement.selected]||this.placeholder?this._itemId:null].filter(Boolean);i.length>0?this._fieldAriaController.setLabelledBy(i.join(" ")):this._fieldAriaController.setLabelledBy(null)}};class nc extends nu(tN(tx(tr(tg(ex))))){static get is(){return"vaadin-select"}static get styles(){return[t1,aH,no]}render(){return et`
3301
3301
  <div class="vaadin-select-container">
3302
3302
  <div part="label" @click="${this._onClick}">
3303
3303
  <slot name="label"></slot>