diff --git a/home-assistant-polymer b/home-assistant-polymer index 84affcce3..9602c6864 160000 --- a/home-assistant-polymer +++ b/home-assistant-polymer @@ -1 +1 @@ -Subproject commit 84affcce3349c27a6a7c528a74f87fe667d3919c +Subproject commit 9602c686402d5f225a4812ecbebd127531a7ff72 diff --git a/supervisor/api/panel/entrypoint.js b/supervisor/api/panel/entrypoint.js index 8e0ef7457..2f35bcdad 100644 --- a/supervisor/api/panel/entrypoint.js +++ b/supervisor/api/panel/entrypoint.js @@ -1,14 +1,14 @@ function loadES5() { var el = document.createElement('script'); - el.src = '/api/hassio/app/frontend_es5/entrypoint.5c6aba93.js'; + el.src = '/api/hassio/app/frontend_es5/entrypoint.c28a3c3a.js'; document.body.appendChild(el); } if (/.*Version\/(?:11|12)(?:\.\d+)*.*Safari\//.test(navigator.userAgent)) { loadES5(); } else { try { - new Function("import('/api/hassio/app/frontend_latest/entrypoint.499355be.js')")(); + new Function("import('/api/hassio/app/frontend_latest/entrypoint.fc042133.js')")(); } catch (err) { loadES5(); } diff --git a/supervisor/api/panel/entrypoint.js.gz b/supervisor/api/panel/entrypoint.js.gz index 51ba9a0c9..02c9d6b50 100644 Binary files a/supervisor/api/panel/entrypoint.js.gz and b/supervisor/api/panel/entrypoint.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/10eda328.js.gz b/supervisor/api/panel/frontend_es5/10eda328.js.gz deleted file mode 100644 index 5fe1a9db3..000000000 Binary files a/supervisor/api/panel/frontend_es5/10eda328.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/157aeeb9.js b/supervisor/api/panel/frontend_es5/157aeeb9.js new file mode 100644 index 000000000..5ac2397da --- /dev/null +++ b/supervisor/api/panel/frontend_es5/157aeeb9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6635],{57966:function(e,t,r){r.d(t,{z:function(){return n}});var n=function(e){return function(t,r){return e.includes(t,r)}}},12198:function(e,t,r){r.d(t,{WB:function(){return a},p6:function(){return i}});var n=r(14516);r(92874);(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric"})}));var i=function(e,t){return o(t).format(e)},o=(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric"})})),a=function(e,t){return s(t).format(e)},s=(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"numeric",day:"numeric"})}));(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{month:"long"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{weekday:"long"})}))},91168:function(e,t,r){r.d(t,{Z:function(){return i}});var n=function(e){return e<10?"0".concat(e):e};function i(e){var t=Math.floor(e/3600),r=Math.floor(e%3600/60),i=Math.floor(e%3600%60);return t>0?"".concat(t,":").concat(n(r),":").concat(n(i)):r>0?"".concat(r,":").concat(n(i)):i>0?""+i:null}},40095:function(e,t,r){r.d(t,{e:function(){return n},f:function(){return i}});var n=function(e,t){return i(e.attributes,t)},i=function(e,t){return 0!=(e.supported_features&t)}},21780:function(e,t,r){r.d(t,{f:function(){return n}});var n=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},16635:function(e,t,r){r.r(t),r.d(t,{HaSelectorState:function(){return ie}});var n=r(37500),i=r(57626),o=r(73826),a=r(47181),s=r(56007),c=r(24833),l=r(91168),u={s:1,min:60,h:3600,d:86400},d=r(12198),f=r(44583),p=r(14516),h=(r(92874),r(65810));var m=function(e,t){return y(t).format(e)},y=(0,p.Z)((function(e){return new Intl.DateTimeFormat("en"!==e.language||(0,h.y)(e)?e.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:(0,h.y)(e)})})),v=((0,p.Z)((function(e){return new Intl.DateTimeFormat("en"!==e.language||(0,h.y)(e)?e.language:"en-u-hc-h23",{hour:(0,h.y)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:(0,h.y)(e)})})),(0,p.Z)((function(e){return new Intl.DateTimeFormat("en"!==e.language||(0,h.y)(e)?e.language:"en-u-hc-h23",{weekday:"long",hour:(0,h.y)(e)?"numeric":"2-digit",minute:"2-digit",hour12:(0,h.y)(e)})})),(0,p.Z)((function(){return new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1})})),r(98291)),b=r(58831),g=r(40095),w=function(e,t,r,n,i){return k(e,r,n,t.entity_id,t.attributes,void 0!==i?i:t.state)},k=function(e,t,r,n,i,o){if(o===s.lz||o===s.nZ)return e("state.default.".concat(o));var a,p,h=r[n];if((0,v.sJ)(i)){if("duration"===i.device_class&&i.unit_of_measurement&&u[i.unit_of_measurement])try{return a=o,p=i.unit_of_measurement,(0,l.Z)(parseFloat(a)*u[p])||"0"}catch(D){}if("monetary"===i.device_class)try{return(0,v.uf)(o,t,Object.assign({style:"currency",currency:i.unit_of_measurement,minimumFractionDigits:2},(0,v.l4)({state:o,attributes:i},h)))}catch(D){}var y=i.unit_of_measurement?"%"===i.unit_of_measurement?function(e){switch(e.language){case"cz":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}(t)+"%":" ".concat(i.unit_of_measurement):"";return"".concat((0,v.uf)(o,t,(0,v.l4)({state:o,attributes:i},h))).concat(y)}var w,k=(0,b.M)(n);if("input_datetime"===k){var _;if(void 0===o)return i.has_date&&i.has_time?(_=new Date(i.year,i.month-1,i.day,i.hour,i.minute),(0,f.o0)(_,t)):i.has_date?(_=new Date(i.year,i.month-1,i.day),(0,d.p6)(_,t)):i.has_time?((_=new Date).setHours(i.hour,i.minute),m(_,t)):o;try{var E=o.split(" ");if(2===E.length)return(0,f.o0)(new Date(E.join("T")),t);if(1===E.length){if(o.includes("-"))return(0,d.p6)(new Date("".concat(o,"T00:00")),t);if(o.includes(":")){var P=new Date;return m(new Date("".concat(P.toISOString().split("T")[0],"T").concat(o)),t)}}return o}catch(C){return o}}if("humidifier"===k&&"on"===o&&i.humidity)return"".concat(i.humidity," %");if("counter"===k||"number"===k||"input_number"===k)return(0,v.uf)(o,t,(0,v.l4)({state:o,attributes:i},h));if("button"===k||"input_button"===k||"scene"===k||"sensor"===k&&"timestamp"===i.device_class)try{return(0,f.o0)(new Date(o),t)}catch(D){return o}return"update"===k?"on"===o?(0,c.X4)(i)?(0,g.f)(i,c.k6)&&"number"==typeof i.in_progress?e("ui.card.update.installing_with_progress",{progress:i.in_progress}):e("ui.card.update.installing"):i.latest_version:i.skipped_version===i.latest_version?null!==(w=i.latest_version)&&void 0!==w?w:e("state.default.unavailable"):e("ui.card.update.up_to_date"):(null==h?void 0:h.translation_key)&&e("component.".concat(h.platform,".entity.").concat(k,".").concat(h.translation_key,".state.").concat(o))||i.device_class&&e("component.".concat(k,".state.").concat(i.device_class,".").concat(o))||e("component.".concat(k,".state._.").concat(o))||o},_=r(22311);function E(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:void 0,r=(0,_.N)(e),n=[];switch(!t&&r in C?n.push.apply(n,E(C[r])):t&&r in O&&t in O[r]&&n.push.apply(n,E(O[r][t])),r){case"climate":t?"fan_mode"===t?n.push.apply(n,E(e.attributes.fan_modes)):"preset_mode"===t?n.push.apply(n,E(e.attributes.preset_modes)):"swing_mode"===t&&n.push.apply(n,E(e.attributes.swing_modes)):n.push.apply(n,E(e.attributes.hvac_modes));break;case"device_tracker":case"person":t||n.push("home","not_home");break;case"fan":"preset_mode"===t&&n.push.apply(n,E(e.attributes.preset_modes));break;case"humidifier":"mode"===t&&n.push.apply(n,E(e.attributes.available_modes));break;case"input_select":case"select":t||n.push.apply(n,E(e.attributes.options));break;case"light":"effect"===t&&e.attributes.effect_list?n.push.apply(n,E(e.attributes.effect_list)):"color_mode"===t&&e.attributes.supported_color_modes&&n.push.apply(n,E(e.attributes.supported_color_modes));break;case"media_player":"sound_mode"===t?n.push.apply(n,E(e.attributes.sound_mode_list)):"source"===t&&n.push.apply(n,E(e.attributes.source_list));break;case"remote":"current_activity"===t&&n.push.apply(n,E(e.attributes.activity_list));break;case"sensor":t||"enum"!==e.attributes.device_class||n.push.apply(n,E(e.attributes.options));break;case"vacuum":"fan_speed"===t&&n.push.apply(n,E(e.attributes.fan_speed_list));break;case"water_heater":t&&"operation_mode"!==t||n.push.apply(n,E(e.attributes.operation_list))}return t||n.push.apply(n,E(s.V_)),E(new Set(n))}(r,this.attribute).map((function(e){return{value:e,label:t.attribute?(0,j.ZX)(t.hass,e):w(t.hass.localize,r,t.hass.locale,t.hass.entities,e)}})):[]}}},{kind:"method",key:"render",value:function(){var e,t,r;return this.hass?(0,n.dy)(D||(t=[' '],r||(r=t.slice(0)),D=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))),this.hass,this._value,this.autofocus,null!==(e=this.label)&&void 0!==e?e:this.hass.localize("ui.components.entity.entity-state-picker.state"),this.disabled||!this.entityId,this.required,this.helper,this.allowCustomValue,this._openedChanged,this._valueChanged):n.Ld}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();var t=e.detail.value;t!==this._value&&this._setValue(t)}},{kind:"method",key:"_setValue",value:function(e){var t=this;this.value=e,setTimeout((function(){(0,a.B)(t,"value-changed",{value:e}),(0,a.B)(t,"change")}),0)}}]}}),n.oi);function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function X(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r '],a||(a=o.slice(0)),N=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}}))),this.hass,(null===(e=this.selector.state)||void 0===e?void 0:e.entity_id)||(null===(t=this.context)||void 0===t?void 0:t.filter_entity),(null===(r=this.selector.state)||void 0===r?void 0:r.attribute)||(null===(i=this.context)||void 0===i?void 0:i.filter_attribute),this.value,this.label,this.helper,this.disabled,this.required)}}]}}),(0,o.f)(n.oi))},56007:function(e,t,r){r.d(t,{PX:function(){return a},V_:function(){return s},lz:function(){return o},nZ:function(){return i},rk:function(){return l}});var n=r(57966),i="unavailable",o="unknown",a="off",s=[i,o],c=[i,o,a],l=(0,n.z)(s);(0,n.z)(c)},94367:function(e,t,r){r.d(t,{bG:function(){return w},ZX:function(){return k}});var n=r(37500),i=r(22142);function o(e){return!!e&&(e instanceof Date&&!isNaN(e.valueOf()))}var a,s,c,l=r(12198),u=r(44583),d=r(98291),f=r(21780),p="^\\d{4}-(0[1-9]|1[0-2])-([12]\\d|0[1-9]|3[01])",h=new RegExp(p+"$"),m=new RegExp(p),y=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?m.test(e):h.test(e)},v=/^\d{4}-(0[1-9]|1[0-2])-([12]\d|0[1-9]|3[01])[T| ](((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)(\8[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)$/,b=function(e){return v.test(e)};function g(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function w(e){return e=e.replace(/_/g," ").replace(/\bid\b/g,"ID").replace(/\bip\b/g,"IP").replace(/\bmac\b/g,"MAC").replace(/\bgps\b/g,"GPS"),(0,f.f)(e)}function k(e,t){if(null===t)return"—";if(Array.isArray(t)&&t.some((function(e){return e instanceof Object}))||!Array.isArray(t)&&t instanceof Object){c||(c=Promise.all([r.e(7426),r.e(7628)]).then(r.bind(r,17628)));var f=c.then((function(e){return e.dump(t)}));return(0,n.dy)(a||(a=g(["
","
"])),(0,i.C)(f,""))}if("number"==typeof t)return(0,d.uf)(t,e.locale);if("string"==typeof t){if(t.startsWith("http"))try{var p=new URL(t);if("http:"===p.protocol||"https:"===p.protocol)return(0,n.dy)(s||(s=g(['',""])),t,t)}catch(v){}if(y(t,!0)){if(b(t)){var h=new Date(t);if(o(h))return(0,u.E8)(h,e.locale)}var m=new Date(t);if(o(m))return(0,l.p6)(m,e.locale)}}return Array.isArray(t)?t.join(", "):t}}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/157aeeb9.js.gz b/supervisor/api/panel/frontend_es5/157aeeb9.js.gz new file mode 100644 index 000000000..921daa76a Binary files /dev/null and b/supervisor/api/panel/frontend_es5/157aeeb9.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/1cab7924.js b/supervisor/api/panel/frontend_es5/1cab7924.js deleted file mode 100644 index 2076e9df7..000000000 --- a/supervisor/api/panel/frontend_es5/1cab7924.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4191],{12198:function(e,t,r){r.d(t,{WB:function(){return a},p6:function(){return i}});var n=r(14516);r(92874);(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric"})}));var i=function(e,t){return o(t).format(e)},o=(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric"})})),a=function(e,t){return s(t).format(e)},s=(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"numeric",day:"numeric"})}));(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{month:"long"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric"})})),(0,n.Z)((function(e){return new Intl.DateTimeFormat(e.language,{weekday:"long"})}))},98291:function(e,t,r){r.d(t,{uf:function(){return o},l4:function(){return a},sJ:function(){return i}});var n=r(66477),i=function(e){return!!e.unit_of_measurement||!!e.state_class},o=function(e,t,r){var i=t?function(e){switch(e.number_format){case n.y4.comma_decimal:return["en-US","en"];case n.y4.decimal_comma:return["de","es","it"];case n.y4.space_comma:return["fr","sv","cs"];case n.y4.system:return;default:return e.language}}(t):void 0;if(Number.isNaN=Number.isNaN||function e(t){return"number"==typeof t&&e(t)},(null==t?void 0:t.number_format)!==n.y4.none&&!Number.isNaN(Number(e))&&Intl)try{return new Intl.NumberFormat(i,s(e,r)).format(Number(e))}catch(o){return console.error(o),new Intl.NumberFormat(void 0,s(e,r)).format(Number(e))}return Number.isNaN(Number(e))||""===e||(null==t?void 0:t.number_format)!==n.y4.none||!Intl||null==(null==r?void 0:r.maximumFractionDigits)&&null==(null==r?void 0:r.minimumFractionDigits)?"string"==typeof e?e:"".concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}(e,null==r?void 0:r.maximumFractionDigits).toString()).concat("currency"===(null==r?void 0:r.style)?" ".concat(r.currency):""):new Intl.NumberFormat("en-US",s(e,{useGrouping:!1,maximumFractionDigits:null==r?void 0:r.maximumFractionDigits,minimumFractionDigits:null==r?void 0:r.minimumFractionDigits})).format(Number(e))},a=function(e,t){var r,n=null==t?void 0:t.display_precision;return null!=n?{maximumFractionDigits:n,minimumFractionDigits:n}:Number.isInteger(Number(null===(r=e.attributes)||void 0===r?void 0:r.step))&&Number.isInteger(Number(e.state))?{maximumFractionDigits:0}:void 0},s=function(e,t){var r=Object.assign({maximumFractionDigits:2},t);if("string"!=typeof e)return r;if(!t||void 0===t.minimumFractionDigits&&void 0===t.maximumFractionDigits){var n=e.indexOf(".")>-1?e.split(".")[1].length:0;r.minimumFractionDigits=n,r.maximumFractionDigits=n}return r}},21780:function(e,t,r){r.d(t,{f:function(){return n}});var n=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},4191:function(e,t,r){r.r(t),r.d(t,{HaSelectorAttribute:function(){return B}});var n,i=r(37500),o=r(57626),a=r(47181),s=r(94367);r(77576);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r '],r||(r=t.slice(0)),n=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))),this.hass,this.value?(0,s.bG)(this.value):"",this.autofocus,null!==(e=this.label)&&void 0!==e?e:this.hass.localize("ui.components.entity.entity-attribute-picker.attribute"),this.disabled||!this.entityId,this.required,this.helper,this.allowCustomValue,this._openedChanged,this._valueChanged):i.Ld}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_valueChanged",value:function(e){this.value=e.detail.value}}]}}),i.oi);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function P(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r '],o||(o=n.slice(0)),E=Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(o)}}))),this.hass,(null===(e=this.selector.attribute)||void 0===e?void 0:e.entity_id)||(null===(t=this.context)||void 0===t?void 0:t.filter_entity),null===(r=this.selector.attribute)||void 0===r?void 0:r.hide_attributes,this.value,this.label,this.helper,this.disabled,this.required)}},{kind:"method",key:"updated",value:function(e){var t;if(N(R(r.prototype),"updated",this).call(this,e),this.value&&(null===(t=this.selector.attribute)||void 0===t||!t.entity_id)&&e.has("context")){var n=e.get("context");if(this.context&&(null==n?void 0:n.filter_entity)!==this.context.filter_entity){var i=!1;if(this.context.filter_entity){var o=this.hass.states[this.context.filter_entity];o&&this.value in o.attributes||(i=!0)}else i=void 0!==this.value;i&&(0,a.B)(this,"value-changed",{value:void 0})}}}}]}}),i.oi)},94367:function(e,t,r){r.d(t,{bG:function(){return w},ZX:function(){return k}});var n=r(37500),i=r(22142);function o(e){return!!e&&(e instanceof Date&&!isNaN(e.valueOf()))}var a,s,l,c=r(12198),u=r(44583),f=r(98291),d=r(21780),p="^\\d{4}-(0[1-9]|1[0-2])-([12]\\d|0[1-9]|3[01])",m=new RegExp(p+"$"),h=new RegExp(p),y=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?h.test(e):m.test(e)},v=/^\d{4}-(0[1-9]|1[0-2])-([12]\d|0[1-9]|3[01])[T| ](((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)(\8[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)$/,b=function(e){return v.test(e)};function g(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function w(e){return e=e.replace(/_/g," ").replace(/\bid\b/g,"ID").replace(/\bip\b/g,"IP").replace(/\bmac\b/g,"MAC").replace(/\bgps\b/g,"GPS"),(0,d.f)(e)}function k(e,t){if(null===t)return"—";if(Array.isArray(t)&&t.some((function(e){return e instanceof Object}))||!Array.isArray(t)&&t instanceof Object){l||(l=Promise.all([r.e(7426),r.e(7628)]).then(r.bind(r,17628)));var d=l.then((function(e){return e.dump(t)}));return(0,n.dy)(a||(a=g(["
","
"])),(0,i.C)(d,""))}if("number"==typeof t)return(0,f.uf)(t,e.locale);if("string"==typeof t){if(t.startsWith("http"))try{var p=new URL(t);if("http:"===p.protocol||"https:"===p.protocol)return(0,n.dy)(s||(s=g(['',""])),t,t)}catch(v){}if(y(t,!0)){if(b(t)){var m=new Date(t);if(o(m))return(0,u.E8)(m,e.locale)}var h=new Date(t);if(o(h))return(0,c.p6)(h,e.locale)}}return Array.isArray(t)?t.join(", "):t}}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/1cab7924.js.gz b/supervisor/api/panel/frontend_es5/1cab7924.js.gz deleted file mode 100644 index 6513c01ae..000000000 Binary files a/supervisor/api/panel/frontend_es5/1cab7924.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/28522eac.js.gz b/supervisor/api/panel/frontend_es5/28522eac.js.gz deleted file mode 100644 index 8dff7f55f..000000000 Binary files a/supervisor/api/panel/frontend_es5/28522eac.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/345cef64.js b/supervisor/api/panel/frontend_es5/345cef64.js deleted file mode 100644 index ff5e0c96e..000000000 --- a/supervisor/api/panel/frontend_es5/345cef64.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 345cef64.js.LICENSE.txt */ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[8763],{48763:function(e,t,r){var i,n,o,a,s,l,c,u,d,f,h,v=r(37500),p=r(57626),y=r(14516),m=r(47181),b=r(58831),g=r(27269),w=r(5986),k=r(27322);r(32511),r(66255),r(25727),r(49461),r(14089),r(18900);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function E(){E=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),s=new P(n||[]);return i(a,"_invoke",{value:k(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var d={};function f(){}function h(){}function v(){}var p={};l(p,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(S([])));m&&m!==t&&r.call(m,o)&&(p=m);var b=v.prototype=f.prototype=Object.create(p);function g(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,o,a,s){var l=u(e[i],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==_(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(e,t,r){var i="suspendedStart";return function(n,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===n)throw o;return C()}for(r.method=n,r.arg=o;;){var a=r.delegate;if(a){var s=O(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===i)throw i="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i="executing";var l=u(e,t,r);if("normal"===l.type){if(i=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,i=e.iterator[r];if(void 0===i)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var n=u(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var i=r.completion;if("throw"===i.type){var n=i.arg;x(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function O(e,t,r,i,n,o,a){try{var s=e[o](a),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(i,n)}function j(e,t,r){return(t=M(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function P(e,t){return V(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(e,t)||G(e,t)||N()}function S(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r
'," ","
"," ",""])),this.hass,null===(r=this._value)||void 0===r?void 0:r.service,this.disabled,this._serviceChanged,null!=g&&g.description?(0,v.dy)(n||(n=x(["

","

"])),null==g?void 0:g.description):"",this._manifest?(0,v.dy)(o||(o=x([' '])),this._manifest.is_built_in?(0,k.R)(this.hass,"/integrations/".concat(this._manifest.domain)):this._manifest.documentation,this.hass.localize("ui.components.service-control.integration_doc"),"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"):"",g&&"target"in g?(0,v.dy)(a||(a=x([' ',' ',' ',''])),this.narrow,E?(0,v.dy)(s||(s=x(['
']))):"",this.hass.localize("ui.components.service-control.target"),this.hass.localize("ui.components.service-control.target_description"),this.hass,g.target?{target:g.target}:{target:{}},this.disabled,this._targetChanged,null===(h=this._value)||void 0===h?void 0:h.target):_?(0,v.dy)(l||(l=x([''])),this.hass,this.disabled,null===(p=this._value)||void 0===p||null===(y=p.data)||void 0===y?void 0:y.entity_id,_.description,this._entityPicked):"",w?(0,v.dy)(c||(c=x([''])),this.hass,this.hass.localize("ui.components.service-control.data"),"data",this.disabled,null===(m=this._value)||void 0===m?void 0:m.data,this._dataChanged):null==g?void 0:g.fields.map((function(e){var t,r,i,n,o=H(e);return e.selector&&(!e.advanced||b.showAdvanced||null!==(t=b._value)&&void 0!==t&&t.data&&void 0!==b._value.data[e.key])?(0,v.dy)(u||(u=x([' ',' ',' ',' '])),b.narrow,o?(0,v.dy)(f||(f=x([''])),e.key,b._checkedKeys.has(e.key)||(null===(r=b._value)||void 0===r?void 0:r.data)&&void 0!==b._value.data[e.key],b.disabled,b._checkboxChanged):E?(0,v.dy)(d||(d=x(['
']))):"",e.name||e.key,null==e?void 0:e.description,b.disabled||o&&!b._checkedKeys.has(e.key)&&(!(null!==(i=b._value)&&void 0!==i&&i.data)||void 0===b._value.data[e.key]),b.hass,e.selector,e.key,b._serviceDataChanged,null!==(n=b._value)&&void 0!==n&&n.data&&void 0!==b._value.data[e.key]?b._value.data[e.key]:e.default):""})))}},{kind:"method",key:"_checkboxChanged",value:function(e){var t,r=e.currentTarget.checked,i=e.currentTarget.key;if(r){var n,o,a;this._checkedKeys.add(i);var s,l=null===(n=this._getServiceInfo(null===(a=this._value)||void 0===a?void 0:a.service,this.hass.services))||void 0===n||null===(o=n.fields.find((function(e){return e.key===i})))||void 0===o?void 0:o.default;if(l)t=Object.assign({},null===(s=this._value)||void 0===s?void 0:s.data,j({},i,l))}else{var c;this._checkedKeys.delete(i),delete(t=Object.assign({},null===(c=this._value)||void 0===c?void 0:c.data))[i]}t&&(0,m.B)(this,"value-changed",{value:Object.assign({},this._value,{data:t})}),this.requestUpdate("_checkedKeys")}},{kind:"method",key:"_serviceChanged",value:function(e){var t;e.stopPropagation(),e.detail.value!==(null===(t=this._value)||void 0===t?void 0:t.service)&&(0,m.B)(this,"value-changed",{value:{service:e.detail.value||""}})}},{kind:"method",key:"_entityPicked",value:function(e){var t,r,i;e.stopPropagation();var n=e.detail.value;if((null===(t=this._value)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.entity_id)!==n){var o,a;if(!n&&null!==(i=this._value)&&void 0!==i&&i.data)delete(o=Object.assign({},this._value)).data.entity_id;else o=Object.assign({},this._value,{data:Object.assign({},null===(a=this._value)||void 0===a?void 0:a.data,{entity_id:e.detail.value})});(0,m.B)(this,"value-changed",{value:o})}}},{kind:"method",key:"_targetChanged",value:function(e){var t;e.stopPropagation();var r,i=e.detail.value;(null===(t=this._value)||void 0===t?void 0:t.target)!==i&&(i?r=Object.assign({},this._value,{target:e.detail.value}):delete(r=Object.assign({},this._value)).target,(0,m.B)(this,"value-changed",{value:r}))}},{kind:"method",key:"_serviceDataChanged",value:function(e){var t,r,i,n,o;e.stopPropagation();var a=e.currentTarget.key,s=e.detail.value;if((null===(t=this._value)||void 0===t||null===(r=t.data)||void 0===r?void 0:r[a])!==s&&(null!==(i=this._value)&&void 0!==i&&null!==(n=i.data)&&void 0!==n&&n[a]||""!==s&&void 0!==s)){var l=Object.assign({},null===(o=this._value)||void 0===o?void 0:o.data,j({},a,s));""!==s&&void 0!==s||delete l[a],(0,m.B)(this,"value-changed",{value:Object.assign({},this._value,{data:l})})}}},{kind:"method",key:"_dataChanged",value:function(e){e.stopPropagation(),e.detail.isValid&&(0,m.B)(this,"value-changed",{value:Object.assign({},this._value,{data:e.detail.value})})}},{kind:"method",key:"_fetchManifest",value:(r=E().mark((function e(t){return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._manifest=void 0,e.prev=1,e.next=4,(0,w.t4)(this.hass,t);case 4:this._manifest=e.sent,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:case"end":return e.stop()}}),e,this,[[1,7]])})),_=function(){var e=this,t=arguments;return new Promise((function(i,n){var o=r.apply(e,t);function a(e){O(o,i,n,a,s,"next",e)}function s(e){O(o,i,n,a,s,"throw",e)}a(void 0)}))},function(e){return _.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,v.iv)(h||(h=x(["ha-settings-row{padding:var(--service-control-padding, 0 16px)}ha-settings-row{--paper-time-input-justify-content:flex-end;--settings-row-content-width:100%;--settings-row-prefix-display:contents;border-top:var(\n --service-control-items-border-top,\n 1px solid var(--divider-color)\n )}ha-service-picker,ha-entity-picker,ha-yaml-editor{display:block;margin:var(--service-control-padding, 0 16px)}ha-yaml-editor{padding:16px 0}p{margin:var(--service-control-padding, 0 16px);padding:16px 0}.checkbox-spacer{width:32px}ha-checkbox{margin-left:-16px}.help-icon{color:var(--secondary-text-color)}.description{justify-content:space-between;display:flex;align-items:center;padding-right:2px}"])))}}]}}),v.oi)},49461:function(e,t,r){var i,n,o=r(37500),a=r(57626),s=r(14516),l=r(47181),c=r(5986);r(77576);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r ",' '," "])),e.name,e.name===e.service?"":e.service)};!function(e,t,r,i){var n=y();if(i)for(var o=0;o '])),this.hass,this.hass.localize("ui.components.service-picker.service"),this._filteredServices(this.hass.localize,this.hass.services,this._filter),this.value,this.disabled,x,this._filterChanged,this._valueChanged)}},{kind:"field",key:"_services",value:function(){return(0,s.Z)((function(e,t){if(!t)return[];var r=[];return Object.keys(t).sort().forEach((function(i){var n,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=E(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(Object.keys(t[i]).sort());try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push({service:"".concat(i,".").concat(a),name:"".concat((0,c.Lh)(e,i),": ").concat(t[i][a].name||a)})}}catch(s){o.e(s)}finally{o.f()}})),r}))}},{kind:"field",key:"_filteredServices",value:function(){var e=this;return(0,s.Z)((function(t,r,i){if(!r)return[];var n=e._services(t,r);return i?n.filter((function(e){var t;return e.service.toLowerCase().includes(i)||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(i))})):n}))}},{kind:"method",key:"_filterChanged",value:function(e){this._filter=e.detail.value.toLowerCase()}},{kind:"method",key:"_valueChanged",value:function(e){this.value=e.detail.value,(0,l.B)(this,"change"),(0,l.B)(this,"value-changed",{value:this.value})}}]}}),o.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/345cef64.js.gz b/supervisor/api/panel/frontend_es5/345cef64.js.gz deleted file mode 100644 index 5931fb3b6..000000000 Binary files a/supervisor/api/panel/frontend_es5/345cef64.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/f25dc7c5.js b/supervisor/api/panel/frontend_es5/65b43773.js similarity index 60% rename from supervisor/api/panel/frontend_es5/f25dc7c5.js rename to supervisor/api/panel/frontend_es5/65b43773.js index f6c81a89e..4fe037d54 100644 --- a/supervisor/api/panel/frontend_es5/f25dc7c5.js +++ b/supervisor/api/panel/frontend_es5/65b43773.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[2593],{32594:function(e,t,r){r.d(t,{U:function(){return i}});var i=function(e){return e.stopPropagation()}},27269:function(e,t,r){r.d(t,{p:function(){return i}});var i=function(e){return e.substr(e.indexOf(".")+1)}},13095:function(e,t,r){r.r(t),r.d(t,{HaSelectorUiAction:function(){return ue}});var i,n,o=r(37500),a=r(57626),s=r(47181),l=r(14516),c=r(32594);r(54444),r(52039);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function f(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function d(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r '," "])),"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z",this.position,!0,this.label)}},{kind:"get",static:!0,key:"styles",value:function(){return(0,o.iv)(n||(n=f(["ha-svg-icon{--mdc-icon-size:var(--ha-help-tooltip-size, 14px);color:var(--ha-help-tooltip-color, var(--disabled-text-color))}"])))}}]}}),o.oi),r(41813),r(48763);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function z(e,t,r){return(t=W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function R(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r '," "," "," "," "," "," "])),this.label,"action",this._actionPicked,null!==(t=null===(r=this.config)||void 0===r?void 0:r.action)&&void 0!==t?t:"default",c.U,this.hass.localize("ui.panel.lovelace.editor.action-editor.actions.default_action"),u.map((function(e){return(0,o.dy)(j||(j=F([' '," "])),e,l.hass.localize("ui.panel.lovelace.editor.action-editor.actions.".concat(e)))})),this.tooltipText?(0,o.dy)(A||(A=F([' '])),this.tooltipText):"","navigate"===(null===(i=this.config)||void 0===i?void 0:i.action)?(0,o.dy)(_||(_=F([' '])),this.hass,this.hass.localize("ui.panel.lovelace.editor.action-editor.navigation_path"),this._navigation_path,this._navigateValueChanged):"","url"===(null===(n=this.config)||void 0===n?void 0:n.action)?(0,o.dy)(D||(D=F([' '])),this.hass.localize("ui.panel.lovelace.editor.action-editor.url_path"),this._url_path,"url_path",this._valueChanged):"","call-service"===(null===(a=this.config)||void 0===a?void 0:a.action)?(0,o.dy)(S||(S=F([' '])),this.hass,this._serviceAction(this.config),null===(s=this.hass.userData)||void 0===s?void 0:s.showAdvanced,this._serviceValueChanged):"")}},{kind:"method",key:"_actionPicked",value:function(e){var t;if(e.stopPropagation(),this.hass){var r=e.target.value;if((null===(t=this.config)||void 0===t?void 0:t.action)!==r)if("default"!==r){var i;switch(r){case"url":i={url_path:this._url_path};break;case"call-service":i={service:this._service};break;case"navigate":i={navigation_path:this._navigation_path}}(0,s.B)(this,"value-changed",{value:Object.assign({action:r},i)})}else(0,s.B)(this,"value-changed",{value:void 0})}}},{kind:"method",key:"_valueChanged",value:function(e){if(e.stopPropagation(),this.hass){var t=e.target,r=e.target.value;this["_".concat(t.configValue)]!==r&&t.configValue&&(0,s.B)(this,"value-changed",{value:Object.assign({},this.config,z({},t.configValue,r))})}}},{kind:"method",key:"_serviceValueChanged",value:function(e){e.stopPropagation();var t=Object.assign({},this.config,{service:e.detail.value.service||"",data:e.detail.value.data||{},target:e.detail.value.target||{}});"service_data"in t&&delete t.service_data,(0,s.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_navigateValueChanged",value:function(e){e.stopPropagation();var t=Object.assign({},this.config,{navigation_path:e.detail.value});(0,s.B)(this,"value-changed",{value:t})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,o.iv)(T||(T=F([".dropdown{position:relative}ha-help-tooltip{position:absolute;right:40px;top:16px;inset-inline-start:initial;inset-inline-end:40px;direction:var(--direction)}ha-select,ha-textfield{width:100%}ha-service-control,ha-navigation-picker{display:block}ha-textfield,ha-service-control,ha-navigation-picker{margin-top:8px}ha-service-control{--service-control-padding:0}"])))}}]}}),o.oi);function K(e){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K(e)}function Q(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r '],r||(r=t.slice(0)),G=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))),this.label,this.hass,this.value,null===(e=this.selector["ui-action"])||void 0===e?void 0:e.actions,this.helper,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){(0,s.B)(this,"value-changed",{value:e.detail.value})}}]}}),o.oi)}}]); \ No newline at end of file +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[2593],{32594:function(e,t,r){r.d(t,{U:function(){return i}});var i=function(e){return e.stopPropagation()}},27269:function(e,t,r){r.d(t,{p:function(){return i}});var i=function(e){return e.substr(e.indexOf(".")+1)}},13095:function(e,t,r){r.r(t),r.d(t,{HaSelectorUiAction:function(){return ue}});var i,n,o=r(37500),a=r(57626),s=r(47181),l=r(14516),c=r(32594);r(54444),r(52039);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function f(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function d(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r '," "])),"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z",this.position,!0,this.label)}},{kind:"get",static:!0,key:"styles",value:function(){return(0,o.iv)(n||(n=f(["ha-svg-icon{--mdc-icon-size:var(--ha-help-tooltip-size, 14px);color:var(--ha-help-tooltip-color, var(--disabled-text-color))}"])))}}]}}),o.oi),r(41813),r(48763);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function z(e,t,r){return(t=W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function R(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r '," "," "," "," "," "," "])),this.label,"action",this._actionPicked,null!==(t=null===(r=this.config)||void 0===r?void 0:r.action)&&void 0!==t?t:"default",c.U,this.hass.localize("ui.panel.lovelace.editor.action-editor.actions.default_action"),u.map((function(e){return(0,o.dy)(j||(j=F([' '," "])),e,l.hass.localize("ui.panel.lovelace.editor.action-editor.actions.".concat(e)))})),this.tooltipText?(0,o.dy)(A||(A=F([' '])),this.tooltipText):"","navigate"===(null===(i=this.config)||void 0===i?void 0:i.action)?(0,o.dy)(_||(_=F([' '])),this.hass,this.hass.localize("ui.panel.lovelace.editor.action-editor.navigation_path"),this._navigation_path,this._navigateValueChanged):"","url"===(null===(n=this.config)||void 0===n?void 0:n.action)?(0,o.dy)(D||(D=F([' '])),this.hass.localize("ui.panel.lovelace.editor.action-editor.url_path"),this._url_path,"url_path",this._valueChanged):"","call-service"===(null===(a=this.config)||void 0===a?void 0:a.action)?(0,o.dy)(S||(S=F([' '])),this.hass,this._serviceAction(this.config),null===(s=this.hass.userData)||void 0===s?void 0:s.showAdvanced,this._serviceValueChanged):"")}},{kind:"method",key:"_actionPicked",value:function(e){var t;if(e.stopPropagation(),this.hass){var r=e.target.value;if((null===(t=this.config)||void 0===t?void 0:t.action)!==r)if("default"!==r){var i;switch(r){case"url":i={url_path:this._url_path};break;case"call-service":i={service:this._service};break;case"navigate":i={navigation_path:this._navigation_path}}(0,s.B)(this,"value-changed",{value:Object.assign({action:r},i)})}else(0,s.B)(this,"value-changed",{value:void 0})}}},{kind:"method",key:"_valueChanged",value:function(e){if(e.stopPropagation(),this.hass){var t=e.target,r=e.target.value;this["_".concat(t.configValue)]!==r&&t.configValue&&(0,s.B)(this,"value-changed",{value:Object.assign({},this.config,z({},t.configValue,r))})}}},{kind:"method",key:"_serviceValueChanged",value:function(e){e.stopPropagation();var t=Object.assign({},this.config,{service:e.detail.value.service||"",data:e.detail.value.data,target:e.detail.value.target||{}});e.detail.value.data||delete t.data,"service_data"in t&&delete t.service_data,(0,s.B)(this,"value-changed",{value:t})}},{kind:"method",key:"_navigateValueChanged",value:function(e){e.stopPropagation();var t=Object.assign({},this.config,{navigation_path:e.detail.value});(0,s.B)(this,"value-changed",{value:t})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,o.iv)(T||(T=F([".dropdown{position:relative}ha-help-tooltip{position:absolute;right:40px;top:16px;inset-inline-start:initial;inset-inline-end:40px;direction:var(--direction)}ha-select,ha-textfield{width:100%}ha-service-control,ha-navigation-picker{display:block}ha-textfield,ha-service-control,ha-navigation-picker{margin-top:8px}ha-service-control{--service-control-padding:0}"])))}}]}}),o.oi);function K(e){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K(e)}function Q(e,t){for(var r=0;r=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,n[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var u=0;u=0;i--){var n=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(n)||n);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var r=0,i=new Array(t);r '],r||(r=t.slice(0)),G=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))),this.label,this.hass,this.value,null===(e=this.selector["ui-action"])||void 0===e?void 0:e.actions,this.helper,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){(0,s.B)(this,"value-changed",{value:e.detail.value})}}]}}),o.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/65b43773.js.gz b/supervisor/api/panel/frontend_es5/65b43773.js.gz new file mode 100644 index 000000000..4ef2ced7e Binary files /dev/null and b/supervisor/api/panel/frontend_es5/65b43773.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/7ab4573d.js b/supervisor/api/panel/frontend_es5/72abb053.js similarity index 99% rename from supervisor/api/panel/frontend_es5/7ab4573d.js rename to supervisor/api/panel/frontend_es5/72abb053.js index 094e78c49..fd01658ec 100644 --- a/supervisor/api/panel/frontend_es5/7ab4573d.js +++ b/supervisor/api/panel/frontend_es5/72abb053.js @@ -1,2 +1,2 @@ -/*! For license information please see 7ab4573d.js.LICENSE.txt */ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[1882],{27530:function(e,t,n){n.d(t,{t:function(){return k}});var r=n(57835),o=n(37500),i=n(76187);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(c){u=!0,o=c}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i".concat(g.toString().replace(":host","html"),""),document.head.appendChild(w.content);var O,k,S,x=(0,y.iv)(_||(O=["\n /* prettier-ignore */\n :host {\n /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */\n --material-shadow-elevation-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n --material-shadow-elevation-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-6dp: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-8dp: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-12dp: 0 12px 16px 1px rgba(0, 0, 0, 0.14), 0 4px 22px 3px rgba(0, 0, 0, 0.12), 0 6px 7px -4px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-16dp: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4);\n --material-shadow-elevation-24dp: 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.4);\n }\n"],k||(k=O.slice(0)),_=Object.freeze(Object.defineProperties(O,{raw:{value:Object.freeze(k)}})))),P=document.createElement("template");P.innerHTML=""),document.head.appendChild(P.content);var I=(0,y.iv)(S||(S=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n top: 16px;\n right: 16px;\n /* TODO (@jouni): remove unnecessary multiplication after https://github.com/vaadin/vaadin-overlay/issues/90 is fixed */\n bottom: calc(1px * var(--vaadin-overlay-viewport-bottom) + 16px);\n left: 16px;\n }\n\n [part='overlay'] {\n background-color: var(--material-background-color);\n border-radius: 4px;\n box-shadow: var(--material-shadow-elevation-4dp);\n color: var(--material-body-text-color);\n font-family: var(--material-font-family);\n font-size: var(--material-body-font-size);\n font-weight: 400;\n }\n\n [part='content'] {\n padding: 8px 0;\n }\n\n [part='backdrop'] {\n opacity: 0.2;\n animation: 0.2s vaadin-overlay-backdrop-enter;\n will-change: opacity;\n }\n\n @keyframes vaadin-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n"])));(0,y.hC)("",I,{moduleId:"material-overlay"}),(0,y.hC)("vaadin-overlay",I,{moduleId:"material-vaadin-overlay"});var C=n(20723),E=n(87529),j=n(52521),T=n(28426),R=function(e){return e.test(navigator.userAgent)},A=function(e){return e.test(navigator.platform)},V=(R(/Android/),R(/Chrome/)&&/Google Inc/.test(navigator.vendor),R(/Firefox/),A(/^iPad/)||A(/^Mac/)&&navigator.maxTouchPoints>1),z=A(/^iPhone/)||V,L=R(/^((?!chrome|android).)*safari/i),N=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}(),B=n(76389);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function M(e,t){for(var n=0;n0?t="default":(e.scrollLeft=2,e.scrollLeft<2&&(t="negative")),document.body.removeChild(e),t}},{key:"getNormalizedScrollLeft",value:function(e,t,n){var r=n.scrollLeft;if("rtl"!==t||!e)return r;switch(e){case"negative":return n.scrollWidth-n.clientWidth+r;case"reverse":return n.scrollWidth-n.clientWidth-r;default:return r}}},{key:"setNormalizedScrollLeft",value:function(e,t,n,r){if("rtl"===t&&e)switch(e){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+r;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-r;break;default:n.scrollLeft=r}else n.scrollLeft=r}}],(n=null)&&K(t.prototype,n),r&&K(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function X(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:e.getAttribute("dir");t?e.setAttribute("dir",t):null!=n&&e.removeAttribute("dir")}function oe(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){var e=oe();ne.forEach((function(t){re(t,e)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});var ie=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(i,e);var t,n,r,o=J(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,r=[{key:"properties",get:function(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:function(e){return e||""},toAttribute:function(e){return""===e?null:e}}}}}},{key:"finalize",value:function(){Q(ee(i),"finalize",this).call(this),te||(te=G.detectScrollType())}}],(n=[{key:"connectedCallback",value:function(){Q(ee(i.prototype),"connectedCallback",this).call(this),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),re(this,oe(),null))}},{key:"attributeChangedCallback",value:function(e,t,n){if(Q(ee(i.prototype),"attributeChangedCallback",this).call(this,e,t,n),"dir"===e){var r=oe(),o=n===r&&-1===ne.indexOf(this),a=!n&&t&&-1===ne.indexOf(this),l=n!==r&&t===r;o||a?(this.__subscribe(),re(this,r,n)):l&&this.__unsubscribe()}}},{key:"disconnectedCallback",value:function(){Q(ee(i.prototype),"disconnectedCallback",this).call(this),this.__restoreSubscription=ne.includes(this),this.__unsubscribe()}},{key:"_valueToNodeAttribute",value:function(e,t,n){("dir"!==n||""!==t||e.hasAttribute("dir"))&&Q(ee(i.prototype),"_valueToNodeAttribute",this).call(this,e,t,n)}},{key:"_attributeToProperty",value:function(e,t,n){"dir"!==e||t?Q(ee(i.prototype),"_attributeToProperty",this).call(this,e,t,n):this.dir=""}},{key:"__subscribe",value:function(){ne.includes(this)||ne.push(this)}},{key:"__unsubscribe",value:function(){ne.includes(this)&&ne.splice(ne.indexOf(this),1)}},{key:"__getNormalizedScrollLeft",value:function(e){return G.getNormalizedScrollLeft(te,this.getAttribute("dir")||"ltr",e)}},{key:"__setNormalizedScrollLeft",value:function(e,t){return G.setNormalizedScrollLeft(te,this.getAttribute("dir")||"ltr",e,t)}}])&&X(t.prototype,n),r&&X(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(e)};function ae(e){return function(e){if(Array.isArray(e))return le(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&t.length>0;)n=e[0],r=t[0],o=void 0,i=void 0,o=Math.max(n.tabIndex,0),i=Math.max(r.tabIndex,0),(0===o||0===i?i>o:o>i)?a.push(t.shift()):a.push(e.shift());return a.concat(e,t)}(ue(e.slice(0,n)),ue(e.slice(n)))}function ce(e,t){if(e.nodeType!==Node.ELEMENT_NODE||se(e))return!1;var n=e,r=function(e){if(!function(e){return!e.matches('[tabindex="-1"]')&&(e.matches("input, select, textarea, button, object")?e.matches(":not([disabled])"):e.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(e))return-1;var t=e.getAttribute("tabindex")||0;return Number(t)}(n),o=r>0;r>=0&&t.push(n);return ae("slot"===n.localName?n.assignedNodes({flatten:!0}):(n.shadowRoot||n).children).forEach((function(e){o=ce(e,t)||o})),o}function fe(e){return e.getRootNode().activeElement===e}function he(e){var t=[];return ce(e,t)?ue(t):t}function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function pe(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],t=this.__focusableElements,n=e?-1:1,r=this.__focusedElementIndex,o=t[(t.length+r+n)%t.length];o.focus(),"input"===o.localName&&o.select()}},{key:"__focusableElements",get:function(){return he(this.__trapNode)}},{key:"__focusedElementIndex",get:function(){var e=this.__focusableElements;return e.indexOf(e.filter(fe).pop())}}],n&&pe(t.prototype,n),r&&pe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function _e(e,t){for(var n=0;ne,n=document.documentElement.clientHeight;t&&n>e?this.style.setProperty("--vaadin-overlay-viewport-bottom","".concat(n-e,"px")):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}}},{key:"_setTemplateFromNodes",value:function(e){this.template=e.find((function(e){return e.localName&&"template"===e.localName}))||this.template}},{key:"close",value:function(e){var t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}},{key:"connectedCallback",value:function(){ge(Se(i.prototype),"connectedCallback",this).call(this),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}},{key:"disconnectedCallback",value:function(){ge(Se(i.prototype),"disconnectedCallback",this).call(this),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}},{key:"requestContentUpdate",value:function(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}},{key:"_ironOverlayCanceled",value:function(e){e.preventDefault()}},{key:"_mouseDownListener",value:function(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}},{key:"_mouseUpListener",value:function(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}},{key:"_outsideClickListener",value:function(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(this._last){var t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},{key:"_keydownListener",value:function(e){if(this._last&&(!this.modeless||e.composedPath().includes(this.$.overlay))&&"Escape"===e.key){var t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},{key:"_ensureTemplatized",value:function(){this._setTemplateFromNodes(Array.from(this.children))}},{key:"_openedChanged",value:function(e,t){var n=this;this._instance||this._ensureTemplatized(),e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),(0,E.T8)(this,(function(){n.focusTrap&&n.__focusTrapController.trapFocus(n.$.overlay);var e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});n.dispatchEvent(e)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this.focusTrap&&this.__focusTrapController.releaseFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}},{key:"_hiddenChanged",value:function(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}},{key:"_shouldAnimate",value:function(){var e=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&e&&"none"!==e}},{key:"_enqueueAnimation",value:function(e,t){var n=this,r="__".concat(e,"Handler"),o=function e(o){o&&o.target!==n||(t(),n.removeEventListener("animationend",e),delete n[r])};this[r]=o,this.addEventListener("animationend",o)}},{key:"_flushAnimation",value:function(e){var t="__".concat(e,"Handler");"function"==typeof this[t]&&this[t]()}},{key:"_animatedOpening",value:function(){var e=this;this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(function(){e._finishOpening()})):this._finishOpening()}},{key:"_attachOverlay",value:function(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}},{key:"_finishOpening",value:function(){document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")}},{key:"_finishClosing",value:function(){document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing")}},{key:"_animatedClosing",value:function(){var e=this;if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){this._exitModalState();var t=this.restoreFocusNode||this.__restoreFocusNode;if(this.restoreFocusOnClose&&t){var n=this._getActiveElement();(n===document.body||this._deepContains(n))&&setTimeout((function(){return t.focus()})),this.__restoreFocusNode=null}this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(function(){e._finishClosing()})):this._finishClosing()}}},{key:"_detachOverlay",value:function(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}},{key:"_last",get:function(){return this===i.__attachedInstances.pop()}},{key:"_modelessChanged",value:function(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}},{key:"_addGlobalListeners",value:function(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}},{key:"_enterModalState",value:function(){var e=this;"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),i.__attachedInstances.forEach((function(t){t!==e&&(t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}},{key:"_removeGlobalListeners",value:function(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}},{key:"_exitModalState",value:function(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);for(var e,t=i.__attachedInstances;(e=t.pop())&&(e===this||(e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.modeless)););}},{key:"_removeOldContent",value:function(){var e=this;this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((function(t){t.parentNode===e.content&&e.content.removeChild(t)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}},{key:"_stampOverlayTemplate",value:function(e){this._removeOldContent(),e._Templatizer||(e._Templatizer=(0,j.Uv)(e,this,{forwardHostProp:function(e,t){this._instance&&this._instance.forwardHostProp(e,t)}})),this._instance=new e._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);var t=e._templateRoot||(e._templateRoot=e.getRootNode());if(t!==document){this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});var n=Array.from(t.querySelectorAll("style")).reduce((function(e,t){return e+t.textContent}),"");if(n=n.replace(/:host/g,":host-nomatch")){var r=document.createElement("style");r.textContent=n,this.$.content.shadowRoot.appendChild(r),this._contentNodes.unshift(r)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}},{key:"_removeNewRendererOrTemplate",value:function(e,t,n,r){e!==t?this.template=void 0:n!==r&&(this.renderer=void 0)}},{key:"_templateOrRendererChanged",value:function(e,t,n,r,o){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");var i=this._oldOwner!==n||this._oldModel!==r;this._oldModel=r,this._oldOwner=n;var a=this._oldTemplate!==e;this._oldTemplate=e;var l=this._oldRenderer!==t;this._oldRenderer=t;var s=this._oldOpened!==o;this._oldOpened=o,l&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),e&&a?this._stampOverlayTemplate(e):t&&(l||s||i)&&o&&this.requestContentUpdate()}},{key:"_getActiveElement",value:function(){for(var e=document.activeElement||document.body;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}},{key:"_deepContains",value:function(e){if(this.contains(e))return!0;for(var t=e,n=e.ownerDocument;t&&t!==n&&t!==this;)t=t.parentNode||t.host;return t===this}},{key:"bringToFront",value:function(){var e=this,t="",n=i.__attachedInstances.filter((function(t){return t!==e})).pop();n&&(t=n.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}],r=[{key:"template",get:function(){return(0,T.dy)(ye||(ye=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n\n
\n
\n
\n \n
\n
\n '])))}},{key:"is",get:function(){return"vaadin-overlay"}},{key:"properties",get:function(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldRenderer:Object,_oldOpened:Boolean}}},{key:"observers",get:function(){return["_templateOrRendererChanged(template, renderer, owner, model, opened)"]}},{key:"__attachedInstances",get:function(){return Array.from(document.body.children).filter((function(e){return e instanceof i&&!e.hasAttribute("closing")})).sort((function(e,t){return e.__zIndex-t.__zIndex||0}))}}],n&&_e(t.prototype,n),r&&_e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}((0,y.Tb)(ie(W(T.H3))));customElements.define(Pe.is,Pe);var Ie,Ce=(0,y.iv)(xe||(xe=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n [part~='loader'] {\n height: 2px;\n background: var(--material-background-color)\n linear-gradient(\n 90deg,\n transparent 0%,\n transparent 20%,\n var(--material-primary-color) 20%,\n var(--material-primary-color) 40%,\n transparent 40%,\n transparent 60%,\n var(--material-primary-color) 60%,\n var(--material-primary-color) 80%,\n transparent 80%,\n transparent 100%\n )\n 0 0 / 400% 100% repeat-x;\n opacity: 0;\n }\n\n :host(:not([loading])) [part~='loader'] {\n display: none;\n }\n\n :host([loading]) [part='loader'] {\n animation: 3s linear infinite material-loader-progress, 0.3s 0.1s both material-loader-fade-in;\n }\n\n [part='loader']::before {\n content: '';\n display: block;\n height: 100%;\n opacity: 0.16;\n background: var(--material-primary-color);\n }\n\n @keyframes material-loader-fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes material-loader-progress {\n 0% {\n background-position: 0 0;\n background-size: 300% 100%;\n }\n\n 33% {\n background-position: -100% 0;\n background-size: 400% 100%;\n }\n\n 67% {\n background-position: -200% 0;\n background-size: 250% 100%;\n }\n\n 100% {\n background-position: -300% 0;\n background-size: 300% 100%;\n }\n }\n\n /* RTL specific styles */\n\n @keyframes material-loader-progress-rtl {\n 0% {\n background-position: 100% 0;\n background-size: 300% 100%;\n }\n\n 33% {\n background-position: 200% 0;\n background-size: 400% 100%;\n }\n\n 67% {\n background-position: 300% 0;\n background-size: 250% 100%;\n }\n\n 100% {\n background-position: 400% 0;\n background-size: 300% 100%;\n }\n }\n\n :host([loading][dir='rtl']) [part='loader'] {\n animation: 3s linear infinite material-loader-progress-rtl, 0.3s 0.1s both material-loader-fade-in;\n }\n"]))),Ee=I;(0,y.hC)("",Ee,{moduleId:"material-menu-overlay"});var je,Te=(0,y.iv)(Ie||(Ie=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n --_vaadin-combo-box-items-container-border-width: 8px 0;\n --_vaadin-combo-box-items-container-border-style: solid;\n --_vaadin-combo-box-items-container-border-color: transparent;\n }\n\n [part='overlay'] {\n position: relative;\n overflow: visible;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n [part='content'] {\n padding: 0;\n }\n\n [part~='loader'] {\n position: absolute;\n z-index: 1;\n top: -2px;\n left: 0;\n right: 0;\n }\n"])));(0,y.hC)("vaadin-combo-box-overlay",[Ee,Te,Ce],{moduleId:"material-combo-box-overlay"});var Re,Ae=(0,y.iv)(je||(je=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n min-height: 36px;\n padding: 8px 32px 8px 10px;\n overflow: hidden;\n font-family: var(--material-font-family);\n font-size: var(--material-small-font-size);\n line-height: 24px;\n }\n\n /* It's the list-box's responsibility to add the focus style */\n :host([focused]) {\n outline: none;\n }\n\n /* Checkmark */\n [part='checkmark']::before {\n display: var(--_material-item-selected-icon-display, none);\n content: '';\n font-family: material-icons;\n font-size: 24px;\n line-height: 1;\n font-weight: 400;\n width: 24px;\n text-align: center;\n margin-right: 10px;\n color: var(--material-secondary-text-color);\n flex: none;\n }\n\n :host([selected]) [part='checkmark']::before {\n content: var(--material-icons-check);\n }\n\n @media (any-hover: hover) {\n :host(:hover:not([disabled])) {\n background-color: var(--material-secondary-background-color);\n }\n\n :host([focused]:not([disabled])) {\n background-color: var(--material-divider-color);\n }\n }\n\n /* Disabled */\n :host([disabled]) {\n color: var(--material-disabled-text-color);\n cursor: default;\n pointer-events: none;\n }\n\n /* RTL specific styles */\n :host([dir='rtl']) {\n padding: 8px 10px 8px 32px;\n }\n\n :host([dir='rtl']) [part='checkmark']::before {\n margin-right: 0;\n margin-left: 10px;\n }\n"])));(0,y.hC)("vaadin-item",Ae,{moduleId:"material-item"});var Ve,ze=(0,y.iv)(Re||(Re=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n :host {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n padding: 4px 10px;\n --_material-item-selected-icon-display: block;\n }\n"])));function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Ne(e,t){for(var n=0;n\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n \n \n
\n \n
\n '])))}},{key:"is",get:function(){return"vaadin-combo-box-item"}},{key:"properties",get:function(){return{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,_oldRenderer:Function}}},{key:"observers",get:function(){return["__rendererOrItemChanged(renderer, index, item.*, selected, focused)","__updateLabel(label, renderer)"]}}],n&&Ne(t.prototype,n),r&&Ne(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}((0,y.Tb)(ie(T.H3)));function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function Ue(e,t,n){return(t=$e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e,t){for(var n=0;n(o?s:l)||u>t)}},{key:"__adjustBottomProperty",value:function(e,t,n){var r;if(e===t.end){if(t.end===et.end){var o=Math.min(window.innerHeight,document.documentElement.clientHeight);n>o&&this.__oldViewportHeight&&(r=n-(this.__oldViewportHeight-o)),this.__oldViewportHeight=o}if(t.end===tt.end){var i=Math.min(window.innerWidth,document.documentElement.clientWidth);n>i&&this.__oldViewportWidth&&(r=n-(this.__oldViewportWidth-i)),this.__oldViewportWidth=i}}return r}},{key:"__calculatePositionInOneDimension",value:function(e,t,n,r,o,i){var a,l=i?r.start:r.end,s=i?r.end:r.start,u=parseFloat(o.style[l]||getComputedStyle(o)[l]),c=this.__adjustBottomProperty(l,r,u),f=t[i?r.start:r.end]-e[n===i?r.end:r.start];return Ue(a={},l,"".concat(c||u+f*(i?-1:1),"px")),Ue(a,s,""),a}}],r=[{key:"properties",get:function(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}},{key:"observers",get:function(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}}],n&&We(t.prototype,n),r&&We(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Pe));customElements.define(ut.is,ut);var ct=0;var ft=0,ht=0,dt=[],pt=0,yt=!1,vt=document.createTextNode("");new window.MutationObserver((function(){yt=!1;for(var e=dt.length,t=0;t=0){if(!dt[t])throw new Error("invalid async handle: ".concat(e));dt[t]=null}}};function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function Ot(e,t){for(var n=0;n=8,Ct={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._virtualCount;return Math.max(0,e-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this._virtualStartVal=e},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(e){(e%=this._physicalCount)<0&&(e=this._physicalCount+e),this._physicalStartVal=e},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(e){this._physicalCountVal=e},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this,t=this._firstVisibleIndexVal;if(null==t){var n=this._physicalTop+this._scrollOffset;t=this._iterateItems((function(t,r){if((n+=e._getPhysicalSizeIncrement(t))>e._scrollPosition)return r}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){var e=this,t=this._lastVisibleIndexVal;if(null==t){var n=this._physicalTop+this._scrollOffset;this._iterateItems((function(r,o){n=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;var r=Math.round(t/this._physicalAverage);this._virtualStart+=r,this._physicalStart+=r,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){var o=this._getReusables(n);n?(this._physicalTop=o.physicalTop,this._virtualStart+=o.indexes.length,this._physicalStart+=o.indexes.length):(this._virtualStart-=o.indexes.length,this._physicalStart-=o.indexes.length),this._update(o.indexes,n?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),gt)}},_getReusables:function(e){var t,n,r,o=[],i=this._hiddenContentSize*this._ratio,a=this._virtualStart,l=this._virtualEnd,s=this._physicalCount,u=this._physicalTop+this._scrollOffset,c=this._physicalBottom+this._scrollOffset,f=this._scrollPosition,h=this._scrollBottom;for(e?(t=this._physicalStart,n=f-u):(t=this._physicalEnd,n=c-h);n-=r=this._getPhysicalSizeIncrement(t),!(o.length>=s||n<=i);)if(e){if(l+o.length+1>=this._virtualCount)break;if(u+r>=f-this._scrollOffset)break;o.push(t),u+=r,t=(t+1)%s}else{if(a-o.length<=0)break;if(u+this._physicalSize-r<=h)break;o.push(t),u-=r,t=0===t?s-1:t-1}return{indexes:o,physicalTop:u-this._scrollOffset}},_update:function(e,t){if(!(e&&0===e.length||0===this._physicalCount)){if(this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var n=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(n)}this._positionItems(),this._updateScrollerSize()}},_isClientFull:function(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart)-this._physicalCount,n=Math.round(.5*this._physicalCount);if(!(t<0)){if(t>0){var r=window.performance.now();[].push.apply(this._physicalItems,this._createPool(t));for(var o=0;othis._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)=this._virtualCount-1||0===n||(this._isClientFull()?this._physicalSize0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged:function(e){"items"===e.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,bt))},_iterateItems:function(e,t){var n,r,o,i;if(2===arguments.length&&t){for(i=0;i=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_positionItems:function(){var e=this;this._adjustScrollPosition();var t=this._physicalTop;this._iterateItems((function(n){e.translate3d(0,"".concat(t,"px"),0,e._physicalItems[n]),t+=e._physicalSizes[n]}))},_getPhysicalSizeIncrement:function(e){return this._physicalSizes[e]},_adjustScrollPosition:function(){var e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop-=e;var t=this._scrollPosition;!It&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((e=(e=e||0===this._scrollHeight)||this._scrollPosition>=this._estScrollHeight-this._physicalSize)||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height="".concat(this._estScrollHeight,"px"),this._scrollHeight=this._estScrollHeight)},scrollToIndex:function(e){if(!("number"!=typeof e||e<0||e>this.items.length-1)&&(xt(),0!==this._physicalCount)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=e-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;for(var t=this._physicalStart,n=this._virtualStart,r=0,o=this._hiddenContentSize;n=this._virtualStart&&e<=this._virtualEnd},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:function(e,t,n){return Math.min(n,Math.max(t,e))},_debounce:function(e,t,n){var r;this._debouncers=this._debouncers||{},this._debouncers[e]=kt.debounce(this._debouncers[e],n,t.bind(this)),r=this._debouncers[e],St.add(r)}};function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function jt(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-1;this.__getVisibleElements().forEach((function(r){r.__virtualIndex>=t&&r.__virtualIndex<=n&&e.__updateElement(r,r.__virtualIndex,!0)}))}},{key:"_updateMetrics",value:function(e){var t=this;xt();var n=0,r=0,o=this._physicalAverageCount,i=this._physicalAverage;this._iterateItems((function(e,o){r+=t._physicalSizes[e],t._physicalSizes[e]=Math.ceil(t.__getBorderBoxHeight(t._physicalItems[e])),n+=t._physicalSizes[e],t._physicalAverageCount+=t._physicalSizes[e]?1:0}),e),this._physicalSize=this._physicalSize+n-r,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((i*o+n)/this._physicalAverageCount))}},{key:"__getBorderBoxHeight",value:function(e){var t=getComputedStyle(e),n=parseFloat(t.height)||0;return"border-box"===t.boxSizing?n:n+(parseFloat(t.paddingBottom)||0)+(parseFloat(t.paddingTop)||0)+(parseFloat(t.borderBottomWidth)||0)+(parseFloat(t.borderTopWidth)||0)}},{key:"__updateElement",value:function(e,t,n){var r=this;e.style.paddingTop&&(e.style.paddingTop=""),this.__preventElementUpdates||e.__lastUpdatedIndex===t&&!n||(this.updateElement(e,t),e.__lastUpdatedIndex=t);var o=e.offsetHeight;if(0===o)e.style.paddingTop="".concat(this.__placeholderHeight,"px"),requestAnimationFrame((function(){return r._resizeHandler()}));else{this.__elementHeightQueue.push(o),this.__elementHeightQueue.shift();var i=this.__elementHeightQueue.filter((function(e){return void 0!==e}));this.__placeholderHeight=Math.round(i.reduce((function(e,t){return e+t}),0)/i.length)}}},{key:"__getIndexScrollOffset",value:function(e){var t=this.__getVisibleElements().find((function(t){return t.__virtualIndex===e}));return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}},{key:"size",get:function(){return this.__size},set:function(e){var t=this;if(e!==this.size){var n,r;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,e>0&&(n=this.adjustedFirstVisibleIndex,r=this.__getIndexScrollOffset(n)),this.__size=e,this._itemsChanged({path:"items"}),xt(),e>0){n=Math.min(n,e-1),this.scrollToIndex(n);var o=this.__getIndexScrollOffset(n);void 0!==r&&void 0!==o&&(this._scrollTop+=r-o)}this.elementsContainer.children.length||requestAnimationFrame((function(){return t._resizeHandler()})),this.__preventElementUpdates=!1,this._resizeHandler(),xt()}}},{key:"_scrollTop",get:function(){return this.scrollTarget.scrollTop},set:function(e){this.scrollTarget.scrollTop=e}},{key:"items",get:function(){return{length:Math.min(this.size,1e5)}}},{key:"offsetHeight",get:function(){return this.scrollTarget.offsetHeight}},{key:"$",get:function(){return{items:this.scrollContainer}}},{key:"updateViewportBoundaries",value:function(){var e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean("rtl"===e.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}},{key:"setAttribute",value:function(){}},{key:"_createPool",value:function(e){var t=this,n=this.createElements(e),r=document.createDocumentFragment();return n.forEach((function(e){e.style.position="absolute",r.appendChild(e),t.__resizeObserver.observe(e)})),this.elementsContainer.appendChild(r),n}},{key:"_assignModels",value:function(e){var t=this;this._iterateItems((function(e,n){var r=t._physicalItems[e];r.hidden=n>=t.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=n+(t._vidxOffset||0),t.__updateElement(r,r.__virtualIndex))}),e)}},{key:"_isClientFull",value:function(){var t=this;return setTimeout((function(){t.__clientFull=!0})),this.__clientFull||Tt(Rt(e.prototype),"_isClientFull",this).call(this)}},{key:"translate3d",value:function(e,t,n,r){r.style.transform="translateY(".concat(t,")")}},{key:"toggleScrollListener",value:function(){}},{key:"_scrollHandler",value:function(){var t=this;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));var n=this.scrollTarget.scrollTop-this._scrollPosition;if(Tt(Rt(e.prototype),"_scrollHandler",this).call(this),0!==this._physicalCount){var r=n>=0,o=this._getReusables(!r);o.indexes.length&&(this._physicalTop=o.physicalTop,r?(this._virtualStart-=o.indexes.length,this._physicalStart-=o.indexes.length):(this._virtualStart+=o.indexes.length,this._physicalStart+=o.indexes.length),this._resizeHandler())}n&&(this.__fixInvalidItemPositioningDebouncer=kt.debounce(this.__fixInvalidItemPositioningDebouncer,mt(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(function(){return t.__fixInvalidItemPositioning()}))),this.reorderElements&&(this.__scrollReorderDebouncer=kt.debounce(this.__scrollReorderDebouncer,mt(this.timeouts.SCROLL_REORDER),(function(){return t.__reorderElements()}))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(n)>0&&this.scrollToIndex(0)}},{key:"__fixInvalidItemPositioning",value:function(){if(this.scrollTarget.isConnected){var e=this._physicalTop>this._scrollTop,t=this._physicalBottomthis._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=r}}},{key:"_hasScrolledAncestor",value:function(e,t,n){return e!==this.scrollTarget&&e!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(e,t,n)||-1===["auto","scroll"].indexOf(getComputedStyle(e).overflow))||(e!==this&&e.parentElement?this._hasScrolledAncestor(e.parentElement,t,n):void 0))}},{key:"_canScroll",value:function(e,t,n){return n>0&&e.scrollTop0||t>0&&e.scrollLeft0}},{key:"_getScrollLineHeight",value:function(){var e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);var t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}},{key:"__getVisibleElements",value:function(){return Array.from(this.elementsContainer.children).filter((function(e){return!e.hidden}))}},{key:"__reorderElements",value:function(){var e=this;if(this.__mouseDown)this.__pendingReorder=!0;else{this.__pendingReorder=!1;var t=this._virtualStart+(this._vidxOffset||0),n=this.__getVisibleElements(),r=n.find((function(t){return t.contains(e.elementsContainer.getRootNode().activeElement)||t.contains(e.scrollTarget.getRootNode().activeElement)}))||n[0];if(r){var o=r.__virtualIndex-t,i=n.indexOf(r)-o;if(i>0)for(var a=0;a=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){var n=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight),r=n*this.size;this._vidxOffset=Math.round(r-n*this._virtualCount)}else{var o=this._vidxOffset;0===this._scrollTop?(this._vidxOffset=0,o!==this._vidxOffset&&Tt(Rt(e.prototype),"scrollToIndex",this).call(this,0)):this.firstVisibleIndex<1e3&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,100),Tt(Rt(e.prototype),"scrollToIndex",this).call(this,this.firstVisibleIndex+(o-this._vidxOffset)));var i=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=i,o!==this._vidxOffset&&Tt(Rt(e.prototype),"scrollToIndex",this).call(this,this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-1e3&&this._vidxOffset0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-1;this.__adapter.update(e,t)}},{key:"flush",value:function(){this.__adapter.flush()}},{key:"firstVisibleIndex",get:function(){return this.__adapter.adjustedFirstVisibleIndex}},{key:"lastVisibleIndex",get:function(){return this.__adapter.adjustedLastVisibleIndex}}],n&&Lt(t.prototype,n),r&&Lt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Bt(e){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function Dt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0){var n=this._visibleItemsCount(),r=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),r=e-n+1):e>this.__virtualizer.firstVisibleIndex&&(r=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,r));var o=qt(this.children).find((function(e){return!e.hidden&&e.index===t.__virtualizer.lastVisibleIndex}));if(o&&e===o.index){var i=o.getBoundingClientRect(),a=this.getBoundingClientRect(),l=i.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l)}}}},{key:"__getAriaRole",value:function(e){return void 0!==e&&"option"}},{key:"__isItemFocused",value:function(e,t){return!this.loading&&e===t}},{key:"_isItemSelected",value:function(e,t,n){return!(e instanceof Ft)&&(n&&void 0!==e&&void 0!==t?this.get(n,e)===this.get(n,t):e===t)}},{key:"__itemsChanged",value:function(e){this.__virtualizer&&e&&(this.__virtualizer.size=e.length,this.__virtualizer.flush(),this.requestContentUpdate())}},{key:"__loadingChanged",value:function(){this.requestContentUpdate()}},{key:"__selectedItemChanged",value:function(){this.requestContentUpdate()}},{key:"__focusedIndexChanged",value:function(e,t){e!==t&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e)}},{key:"__rendererChanged",value:function(e,t){(e||t)&&this.requestContentUpdate()}},{key:"__createElements",value:function(e){var t=this;return qt(Array(e)).map((function(){var e=document.createElement("".concat(t.__hostTagName,"-item"));return e.addEventListener("click",t.__boundOnItemClick),e.tabIndex="-1",e.style.width="100%",e}))}},{key:"__updateElement",value:function(e,t){var n=this.items[t],r=this.focusedIndex,o=this._isItemSelected(n,this.selectedItem,this.itemIdPath);e.setProperties({item:n,index:t,label:this.getItemLabel(n),selected:o,renderer:this.renderer,focused:this.__isItemFocused(r,t)}),e.id="".concat(this.__hostTagName,"-item-").concat(t),e.setAttribute("role",this.__getAriaRole(t)),e.setAttribute("aria-selected",o.toString()),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),n instanceof Ft&&this.__requestItemByIndex(t)}},{key:"__onItemClick",value:function(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}},{key:"__patchWheelOverScrolling",value:function(){var e=this;this.$.selector.addEventListener("wheel",(function(t){var n=0===e.scrollTop,r=e.scrollHeight-e.scrollTop-e.clientHeight<=1;(n&&t.deltaY<0||r&&t.deltaY>0)&&t.preventDefault()}))}},{key:"_viewportTotalPaddingBottom",get:function(){if(void 0===this._cachedViewportTotalPaddingBottom){var e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map((function(e){return parseInt(e,10)})).reduce((function(e,t){return e+t}))}return this._cachedViewportTotalPaddingBottom}},{key:"__requestItemByIndex",value:function(e){var t=this;requestAnimationFrame((function(){t.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e,currentScrollerPos:t._oldScrollerPosition}}))}))}},{key:"_visibleItemsCount",value:function(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}],r=[{key:"is",get:function(){return"vaadin-combo-box-scroller"}},{key:"template",get:function(){return(0,T.dy)(Mt||(Mt=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n \n
\n \n
\n "])))}},{key:"properties",get:function(){return{items:{type:Array,observer:"__itemsChanged"},focusedIndex:{type:Number,observer:"__focusedIndexChanged"},loading:{type:Boolean,observer:"__loadingChanged"},opened:{type:Boolean,observer:"__openedChanged"},selectedItem:{type:Object,observer:"__selectedItemChanged"},itemIdPath:{type:String},comboBox:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,observer:"__rendererChanged"},theme:{type:String}}}}],n&&Wt(t.prototype,n),r&&Wt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(T.H3);customElements.define(Qt.is,Qt);var Zt=n(67130);function Jt(e){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(e)}function en(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}}])&&En(t.prototype,n),r&&En(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(e)}));function zn(e){return zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zn(e)}function Ln(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n :host([opened]) {\n pointer-events: auto;\n }\n \n\n \n\n \n '])))}},{key:"properties",get:function(){return{attrForValue:{type:String,value:"value"}}}}],(n=[{key:"clearElement",get:function(){return this.querySelector(".clear-button")}},{key:"ready",value:function(){var e=this;Zn(tr(i.prototype),"ready",this).call(this),this._toggleElement=this.querySelector(".toggle-button"),(0,E.T8)(this,(function(){e._setInputElement(e.querySelector("vaadin-text-field,.input")),e._revertInputValue()}))}},{key:"checkValidity",value:function(){return this.inputElement.validate?this.inputElement.validate():Zn(tr(i.prototype),"checkValidity",this).call(this)}},{key:"_propertyForValue",get:function(){return(0,Zt.z)(this.attrForValue)}},{key:"_nativeInput",get:function(){var e=this.inputElement;if(e){if(e instanceof HTMLInputElement)return e;var t=e.querySelector("input");if(t)return t;if(e.shadowRoot){var n=e.shadowRoot.querySelector("input");if(n)return n}}}},{key:"_isClearButton",value:function(e){return Zn(tr(i.prototype),"_isClearButton",this).call(this,e)||"input"===e.type&&!e.isTrusted||"clear-button"===e.composedPath()[0].getAttribute("part")}},{key:"_onChange",value:function(e){Zn(tr(i.prototype),"_onChange",this).call(this,e),this._isClearButton(e)&&this._clear()}}])&&Qn(t.prototype,n),r&&Qn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fn(e,t)}(i,e);var t,n,r,o=hn(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,n=[{key:"ready",value:function(){var e=this;cn(dn(i.prototype),"ready",this).call(this),this._scroller.addEventListener("index-requested",(function(t){var n=t.detail.index,r=t.detail.currentScrollerPos,o=Math.floor(1.5*e.pageSize);if(!e._shouldSkipIndex(n,o,r)&&void 0!==n){var i=e._getPageForIndex(n);e._shouldLoadPage(i)&&e._loadPage(i)}}))}},{key:"_dataProviderFilterChanged",value:function(e){void 0!==this.__previousDataProviderFilter||""!==e?this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this._pendingRequests={},this.loading=this._shouldFetchData(),this.size=void 0,this.clearCache()):this.__previousDataProviderFilter=e}},{key:"_shouldFetchData",value:function(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}},{key:"_ensureFirstPage",value:function(e){e&&this._shouldLoadPage(0)&&this._loadPage(0)}},{key:"_shouldSkipIndex",value:function(e,t,n){return 0!==n&&e>=n-t&&e<=n+t}},{key:"_shouldLoadPage",value:function(e){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;var t=this.filteredItems[e*this.pageSize];return void 0!==t?t instanceof Ft:void 0===this.size}},{key:"_loadPage",value:function(e){var t=this;if(!this._pendingRequests[e]&&this.dataProvider){var n={page:e,pageSize:this.pageSize,filter:this.filter},r=function r(o,i){if(t._pendingRequests[e]===r){var a=t.filteredItems?ln(t.filteredItems):[];a.splice.apply(a,[n.page*n.pageSize,o.length].concat(ln(o))),t.filteredItems=a,t.opened||t._isInputFocused()||t._commitValue(),void 0!==i&&(t.size=i),delete t._pendingRequests[e],0===Object.keys(t._pendingRequests).length&&(t.loading=!1)}};this._pendingRequests[e]=r,this.loading=!0,this.dataProvider(n,r)}}},{key:"_getPageForIndex",value:function(e){return Math.floor(e/this.pageSize)}},{key:"clearCache",value:function(){if(this.dataProvider){this._pendingRequests={};for(var e=[],t=0;t<(this.size||0);t++)e.push(this.__placeHolder);this.filteredItems=e,this._shouldFetchData()?(this._forceNextRequest=!1,this._loadPage(0)):this._forceNextRequest=!0}}},{key:"_sizeChanged",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(this.filteredItems||[]).slice(0,e),n=0;n 0");this.clearCache()}},{key:"_dataProviderChanged",value:function(e,t){var n=this;this._ensureItemsOrDataProvider((function(){n.dataProvider=t})),this.clearCache()}},{key:"_ensureItemsOrDataProvider",value:function(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}},{key:"_warnDataProviderValue",value:function(e,t){if(e&&""!==t&&(void 0===this.selectedItem||null===this.selectedItem)){var n=this.__getItemIndexByValue(this.filteredItems,t);(n<0||!this._getItemLabel(this.filteredItems[n]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}},{key:"_flushPendingRequests",value:function(e){if(this._pendingRequests)for(var t=Math.ceil(e/this.pageSize),n=Object.keys(this._pendingRequests),r=0;r=t&&this._pendingRequests[o]([],e)}}}],r=[{key:"properties",get:function(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:function(){return{}}},__placeHolder:{value:new Ft},__previousDataProviderFilter:{type:String}}}},{key:"observers",get:function(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}}],n&&un(t.prototype,n),r&&un(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(e)}((nr=on((0,y.Tb)(T.H3)),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(i,e);var t,n,r,o=Un(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this))._boundOnFocusout=e._onFocusout.bind(Wn(e)),e._boundOverlaySelectedItemChanged=e._overlaySelectedItemChanged.bind(Wn(e)),e._boundOnClearButtonMouseDown=e.__onClearButtonMouseDown.bind(Wn(e)),e._boundOnClick=e._onClick.bind(Wn(e)),e._boundOnOverlayTouchAction=e._onOverlayTouchAction.bind(Wn(e)),e._boundOnTouchend=e._onTouchend.bind(Wn(e)),e}return t=i,n=[{key:"_tagNamePrefix",get:function(){return"vaadin-combo-box"}},{key:"_inputElementValue",get:function(){return this.inputElement?this.inputElement[this._propertyForValue]:void 0},set:function(e){this.inputElement&&(this.inputElement[this._propertyForValue]=e)}},{key:"_nativeInput",get:function(){return this.inputElement}},{key:"_inputElementChanged",value:function(e){Hn($n(i.prototype),"_inputElementChanged",this).call(this,e);var t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}},{key:"ready",value:function(){var e=this;Hn($n(i.prototype),"ready",this).call(this),this._initOverlay(),this._initScroller(),this.addEventListener("focusout",this._boundOnFocusout),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);var t,n=function(){requestAnimationFrame((function(){e.$.overlay.bringToFront()}))};this.addEventListener("mousedown",n),this.addEventListener("touchstart",n),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn("WARNING: