diff --git a/home-assistant-polymer b/home-assistant-polymer index 255cb23c7..5bb953886 160000 --- a/home-assistant-polymer +++ b/home-assistant-polymer @@ -1 +1 @@ -Subproject commit 255cb23c7df57234fd53b1f806bc1b03e0a56519 +Subproject commit 5bb9538861bf14a3849c1a2e167a948856a7e3ce diff --git a/supervisor/api/panel/entrypoint.js b/supervisor/api/panel/entrypoint.js index ce4698db9..45b9790b1 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.169d7fb4.js'; + el.src = '/api/hassio/app/frontend_es5/entrypoint.4dd28383.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.24687610.js')")(); + new Function("import('/api/hassio/app/frontend_latest/entrypoint.962b867f.js')")(); } catch (err) { loadES5(); } diff --git a/supervisor/api/panel/entrypoint.js.gz b/supervisor/api/panel/entrypoint.js.gz index 1f7d1f495..c2c99391d 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/00c68234.js b/supervisor/api/panel/frontend_es5/00c68234.js new file mode 100644 index 000000000..eafc07260 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/00c68234.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[419],{42141:function(e,t,n){function i(e){return void 0===e||Array.isArray(e)?e:[e]}n.d(t,{r:function(){return i}})},40095:function(e,t,n){n.d(t,{e:function(){return i},f:function(){return r}});var i=function(e,t){return r(e.attributes,t)},r=function(e,t){return 0!=(e.supported_features&t)}},15033:function(e,t,n){n.r(t),n.d(t,{HaTargetSelector:function(){return Ee}});var i,r,o,a,s,c,l,d,u,p,f,h,v,m,y,b,k=n(37500),_=n(63550),g=n(14516),w=n(57292),E=n(74186),C=n(30715),x=n(33855),P=n(73826),D=n(67182),S=(n(51187),n(54444),n(8636)),O=n(47181),j=n(42141),z=n(58831),A=n(91741),T=n(57066);n(60033),n(46647),n(68101),n(66255),n(16235),n(52039);function F(e){return F="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},F(e)}function V(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||te(e)||Y(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 R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(i,r)}function M(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function I(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(e,t){return B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},B(e,t)}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=U(e);if(t){var r=U(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}function q(){q=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(n){t.forEach((function(t){t.kind===n&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var n=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var r=t.placement;if(t.kind===i&&("static"===r||"prototype"===r)){var o="static"===r?e:n;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var n=t.descriptor;if("field"===t.kind){var i=t.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,n)},decorateClass:function(e,t){var n=[],i=[],r={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,r)}),this),e.forEach((function(e){if(!W(e))return n.push(e);var t=this.decorateElement(e,r);n.push(t.element),n.push.apply(n,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:n,finishers:i};var o=this.decorateConstructor(n,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,n){var i=t[e.placement];if(!n&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var n=[],i=[],r=e.decorators,o=r.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,r[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;i--){var r=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(r)||r);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var n=0,i=new Array(t);n\n '," ","\n \n ","\n "])),this._renderChips(),this._renderPicker(),this._renderItems()):(0,k.dy)(a||(a=M(["\n
\n "," ","\n ","\n
\n "])),this._renderItems(),this._renderPicker(),this._renderChips())):(0,k.dy)(i||(i=M([""])))}},{kind:"method",key:"_renderItems",value:function(){var e,t,n,i=this;return(0,k.dy)(s||(s=M(['\n
\n ',"\n ","\n ","\n
\n "])),null!==(e=this.value)&&void 0!==e&&e.area_id?(0,j.r)(this.value.area_id).map((function(e){var t=i._areas[e];return i._renderChip("area_id",e,(null==t?void 0:t.name)||e,void 0,"M12.5 7C12.5 5.89 13.39 5 14.5 5H18C19.1 5 20 5.9 20 7V9.16C18.84 9.57 18 10.67 18 11.97V14H12.5V7M6 11.96V14H11.5V7C11.5 5.89 10.61 5 9.5 5H6C4.9 5 4 5.9 4 7V9.15C5.16 9.56 6 10.67 6 11.96M20.66 10.03C19.68 10.19 19 11.12 19 12.12V15H5V12C5 10.9 4.11 10 3 10S1 10.9 1 12V17C1 18.1 1.9 19 3 19V21H5V19H19V21H21V19C22.1 19 23 18.1 23 17V12C23 10.79 21.91 9.82 20.66 10.03Z")})):"",null!==(t=this.value)&&void 0!==t&&t.device_id?(0,j.r)(this.value.device_id).map((function(e){var t=i._devices[e];return i._renderChip("device_id",e,t?(0,w.jL)(t,i.hass):e,void 0,"M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z")})):"",null!==(n=this.value)&&void 0!==n&&n.entity_id?(0,j.r)(this.value.entity_id).map((function(e){var t=i.hass.states[e];return i._renderChip("entity_id",e,t?(0,A.C)(t):e,t)})):"")}},{kind:"method",key:"_renderChips",value:function(){return(0,k.dy)(c||(c=M(['\n
\n \n
\n \n \n \n ','\n \n \n
\n \n
\n \n \n \n ','\n \n \n \n \n
\n \n \n \n ',"\n \n \n \n \n ","\n "])),"area_id",this._showPicker,oe,this.hass.localize("ui.components.target-picker.add_area_id"),"device_id",this._showPicker,oe,this.hass.localize("ui.components.target-picker.add_device_id"),"entity_id",this._showPicker,oe,this.hass.localize("ui.components.target-picker.add_entity_id"),this.helper?(0,k.dy)(l||(l=M(["",""])),this.helper):"")}},{kind:"method",key:"_showPicker",value:(n=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._addMode=t.currentTarget.type,e.next=3,this.updateComplete;case 3:return e.next=5,null===(n=this._inputElement)||void 0===n?void 0:n.focus();case 5:return e.next=7,null===(i=this._inputElement)||void 0===i?void 0:i.open();case 7:case"end":return e.stop()}}),e,this)})),g=function(){var e=this,t=arguments;return new Promise((function(i,r){var o=n.apply(e,t);function a(e){L(o,i,r,a,s,"next",e)}function s(e){L(o,i,r,a,s,"throw",e)}a(void 0)}))},function(e){return g.apply(this,arguments)})},{kind:"method",key:"_renderChip",value:function(e,t,n,i,r){return(0,k.dy)(d||(d=M(['\n \n ',"\n ",'\n \n \n ',"\n \n \n ",'\n \n \n ',"\n \n \n "])),(0,S.$)(R({},e,!0)),r?(0,k.dy)(u||(u=M(['\n \n ',"\n "])),this.hass.localize("ui.components.target-picker.expand"),"M18.17,12L15,8.83L16.41,7.41L21,12L16.41,16.58L15,15.17L18.17,12M5.83,12L9,15.17L7.59,16.59L3,12L7.59,7.42L9,8.83L5.83,12Z",t,e,this._handleExpand,this.hass.localize("ui.components.target-picker.expand_".concat(e))),this.hass.localize("ui.components.target-picker.remove"),"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",t,e,this._handleRemove,this.hass.localize("ui.components.target-picker.remove_".concat(e)))}},{kind:"method",key:"_renderPicker",value:function(){switch(this._addMode){case"area_id":return(0,k.dy)(h||(h=M(["\n =0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,r[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;i--){var r=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[i])(r)||r);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var n=0,i=new Array(t);n"])),this.hass,this.value,this.helper,this._filterDevices,this._filterEntities,this.disabled)}},{kind:"field",key:"_filterEntities",value:function(){var e=this;return function(t){return!e.selector.target.entity||(0,x.J)(e.selector.target.entity,t,e._entitySources)}}},{kind:"field",key:"_filterDevices",value:function(){var e=this;return function(t){if(!e.selector.target.device)return!0;var n=e._entitySources&&e._entities?e._deviceIntegrationLookup(e._entitySources,e._entities):void 0;return(0,x.l)(e.selector.target.device,t,n)}}},{kind:"get",static:!0,key:"styles",value:function(){return(0,k.iv)(re||(re=se(["\n ha-target-picker {\n display: block;\n }\n "])))}}]}}),(0,P.f)(k.oi))},22814:function(e,t,n){n.d(t,{iI:function(){return i}});"".concat(location.protocol,"//").concat(location.host);var i=function(e,t){return e.callWS({type:"auth/sign_path",path:t})}},56007:function(e,t,n){n.d(t,{nZ:function(){return i},lz:function(){return r},V_:function(){return o}});var i="unavailable",r="unknown",o=[i,r]}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/00c68234.js.gz b/supervisor/api/panel/frontend_es5/00c68234.js.gz new file mode 100644 index 000000000..ba0c69e5f Binary files /dev/null and b/supervisor/api/panel/frontend_es5/00c68234.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/01f7f20e.js b/supervisor/api/panel/frontend_es5/01f7f20e.js new file mode 100644 index 000000000..8e736c6e4 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/01f7f20e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[7016],{77016:function(e,t,r){r.r(t),r.d(t,{HaFileSelector:function(){return D}});var n=r(37500),i=r(63550),o=r(47181);function a(e,t,r,n,i,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(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,l,"next",e)}function l(e){a(o,n,i,s,l,"throw",e)}s(void 0)}))}}var l,c=function(){var e=s(regeneratorRuntime.mark((function e(t,r){var n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).append("file",r),e.next=4,t.fetchWithAuth("/api/file_upload",{method:"POST",body:n});case 4:if(413!==(i=e.sent).status){e.next=9;break}throw new Error("Uploaded file is too large (".concat(r.name,")"));case 9:if(200===i.status){e.next=11;break}throw new Error("Unknown error");case 11:return e.next=13,i.json();case 13:return o=e.sent,e.abrupt("return",o.file_id);case 15:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),u=function(){var e=s(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.callApi("DELETE","file_upload",{file_id:r}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),f=r(26765);r(67622);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,r,n,i,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(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){p(o,n,i,a,s,"next",e)}function s(e){p(o,n,i,a,s,"throw",e)}a(void 0)}))}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A(e);if(t){var i=A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b(this,r)}}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(){k=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!P(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n "],r||(r=t.slice(0)),l=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}}))),this.hass,this.selector.file.accept,"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z",this.label,this.required,this.disabled,this.helper,this._busy,this.value?(null===(e=this._filename)||void 0===e?void 0:e.name)||"Unknown file":"",this._uploadFile,this._removeFile)}},{kind:"method",key:"willUpdate",value:function(e){S(A(a.prototype),"willUpdate",this).call(this,e),e.has("value")&&this._filename&&this.value!==this._filename.fileId&&(this._filename=void 0)}},{kind:"method",key:"_uploadFile",value:(r=h(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._busy=!0,r=t.detail.files[0],e.prev=2,e.next=5,c(this.hass,r);case 5:n=e.sent,this._filename={fileId:n,name:r.name},(0,o.B)(this,"value-changed",{value:n}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),(0,f.Ys)(this,{text:this.hass.localize("ui.components.selectors.file.upload_failed",{reason:e.t0.message||e.t0})});case 13:return e.prev=13,this._busy=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[2,10,13,16]])}))),function(e){return r.apply(this,arguments)})},{kind:"field",key:"_removeFile",value:function(){var e=this;return h(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e._busy=!0,t.prev=1,t.next=4,u(e.hass,e.value);case 4:t.next=8;break;case 6:t.prev=6,t.t0=t.catch(1);case 8:return t.prev=8,e._busy=!1,t.finish(8);case 11:e._filename=void 0,(0,o.B)(e,"value-changed",{value:""});case 13:case"end":return t.stop()}}),t,null,[[1,6,8,11]])})))}}]}}),n.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/01f7f20e.js.gz b/supervisor/api/panel/frontend_es5/01f7f20e.js.gz new file mode 100644 index 000000000..7a709a08d Binary files /dev/null and b/supervisor/api/panel/frontend_es5/01f7f20e.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/03402036.js b/supervisor/api/panel/frontend_es5/03402036.js new file mode 100644 index 000000000..f685d7053 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/03402036.js @@ -0,0 +1,2 @@ +/*! For license information please see 03402036.js.LICENSE.txt */ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[7426],{77426:function(e,t,n){function i(e){return i="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},i(e)}function r(e){return null==e}n.d(t,{oW:function(){return nt},Dy:function(){return tt},$w:function(){return rt},zD:function(){return it}});var o={isNothing:r,isObject:function(e){return"object"===i(e)&&null!==e},toArray:function(e){return Array.isArray(e)?e:r(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function s(e,t){return o.repeat(" ",t-e.length)+e}var p=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,r=[0],a=[],l=-1;n=i.exec(e.buffer);)a.push(n.index),r.push(n.index+n[0].length),e.position<=n.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var c,p,f="",d=Math.min(e.line+t.linesAfter,a.length).toString().length,h=t.maxLength-(t.indent+d+3);for(c=1;c<=t.linesBefore&&!(l-c<0);c++)p=u(e.buffer,r[l-c],a[l-c],e.position-(r[l]-r[l-c]),h),f=o.repeat(" ",t.indent)+s((e.line-c+1).toString(),d)+" | "+p.str+"\n"+f;for(p=u(e.buffer,r[l],a[l],e.position,h),f+=o.repeat(" ",t.indent)+s((e.line+1).toString(),d)+" | "+p.str+"\n",f+=o.repeat("-",t.indent+d+3+p.pos)+"^\n",c=1;c<=t.linesAfter&&!(l+c>=a.length);c++)p=u(e.buffer,r[l+c],a[l+c],e.position-(r[l]-r[l+c]),h),f+=o.repeat(" ",t.indent)+s((e.line+c+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},f=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"];var h=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===f.indexOf(t))throw new c('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===d.indexOf(this.kind))throw new c('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function g(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function m(e){return this.extend(e)}m.prototype.extend=function(e){var t=[],n=[];if(e instanceof h)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new c("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof h))throw new c("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new c("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new c("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof h))throw new c("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(m.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=g(i,"implicit"),i.compiledExplicit=g(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),j=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var S=/^[-+]?[0-9]+e/;var T=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!j.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return n=e.toString(10),S.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),N=w.extend({implicit:[k,C,O,T]}),F=N,M=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),L=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var E=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==M.exec(e)||null!==L.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,u=0,s=null;if(null===(t=M.exec(e))&&(t=L.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(s=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(s=-s)),c=new Date(Date.UTC(n,i,r,o,a,l,u)),s&&c.setTime(c.getTime()-s),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var _=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var q=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=D;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=D,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=D;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),U=Object.prototype.hasOwnProperty,Y=Object.prototype.toString;var R=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ae=new Array(256),le=new Array(256),ce=0;ce<256;ce++)ae[ce]=re(ce)?1:0,le[ce]=re(ce);function ue(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||P,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function se(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=p(n),new c(t,n)}function pe(e,t){throw se(e,t)}function fe(e,t){e.onWarning&&e.onWarning.call(null,se(e,t))}var de={YAML:function(e,t,n){var i,r,o;null!==e.version&&pe(e,"duplication of %YAML directive"),1!==n.length&&pe(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&pe(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&pe(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&fe(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&pe(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],Q.test(i)||pe(e,"ill-formed tag handle (first argument) of the TAG directive"),G.call(e.tagMap,i)&&pe(e,'there is a previously declared suffix for "'+i+'" tag handle'),J.test(r)||pe(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(o){pe(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function he(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=o.repeat("\n",t-1))}function we(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,pe(e,"tab characters must not be used in indentation")),45===i)&&te(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,be(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,xe(e,t,3,!1,!0),a.push(e.result),be(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)pe(e,"bad indentation of a sequence entry");else if(e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),xe(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(me(e,f,d,h,g,m,a,l,c),h=g=m=null),be(e,!0,-1),u=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==u)pe(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===r?pe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?pe(e,"repeat of an indentation width identifier"):(p=t+r-1,s=!0)}if(ee(a)){do{a=e.input.charCodeAt(++e.position)}while(ee(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!X(a)&&0!==a)}for(;0!==a;){for(ye(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!s||e.lineIndentp&&(p=e.lineIndent),X(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=ie(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:pe(e,"expected hexadecimal character");e.result+=oe(o),e.position++}else pe(e,"unknown escape sequence");n=i=e.position}else X(l)?(he(e,n,i,!0),Ae(e,be(e,!1,t)),n=i=e.position):e.position===e.lineStart&&ve(e)?pe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}pe(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!te(i)&&!ne(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&pe(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),G.call(e.anchorMap,n)||pe(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],be(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,u,s,p=e.kind,f=e.result;if(te(s=e.input.charCodeAt(e.position))||ne(s)||35===s||38===s||42===s||33===s||124===s||62===s||39===s||34===s||37===s||64===s||96===s)return!1;if((63===s||45===s)&&(te(i=e.input.charCodeAt(e.position+1))||n&&ne(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==s;){if(58===s){if(te(i=e.input.charCodeAt(e.position+1))||n&&ne(i))break}else if(35===s){if(te(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ve(e)||n&&ne(s))break;if(X(s)){if(l=e.line,c=e.lineStart,u=e.lineIndent,be(e,!1,-1),e.lineIndent>=t){a=!0,s=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=u;break}}a&&(he(e,r,o,!1),Ae(e,e.line-l),r=o=e.position,a=!1),ee(s)||(o=e.position+1),s=e.input.charCodeAt(++e.position)}return he(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===n)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||pe(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&we(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&pe(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),u=0,s=e.implicitTypes.length;u"),null!==e.result&&f.kind!==e.kind&&pe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):pe(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Ie(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(be(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!te(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&pe(e,"directive name must not be less than one character in length");0!==r;){for(;ee(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!X(r));break}if(X(r))break;for(t=e.position;0!==r&&!te(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&ye(e),G.call(de,n)?de[n](e,n,i):fe(e,'unknown document directive "'+n+'"')}be(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,be(e,!0,-1)):a&&pe(e,"directives end mark is expected"),xe(e,e.lineIndent-1,4,!1,!0),be(e,!0,-1),e.checkLineBreaks&&Z.test(e.input.slice(o,e.position))&&fe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ve(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,be(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Ke(e){return/^\n* /.test(e)}function $e(e,t,n,i,r,o,a,l){var c,u,s=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=Ye(u=We(e,0))&&u!==Ne&&!Ue(u)&&45!==u&&63!==u&&58!==u&&44!==u&&91!==u&&93!==u&&123!==u&&125!==u&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&61!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&function(e){return!Ue(e)&&58!==e}(We(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!Ye(s=We(e,c)))return 5;m=m&&Be(s,p,l),p=s}else{for(c=0;c=65536?c+=2:c++){if(10===(s=We(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!Ye(s))return 5;m=m&&Be(s,p,l),p=s}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Ke(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function Pe(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Me.indexOf(t)||Le.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch($e(t,l,e.indent,a,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+Ge(t,e.indent)+Ve(De(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,Ze(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],u=i[2];n=" "===u[0],o+=c+(a||n||""===u?"":"\n")+Ze(u,t),a=n}return o}(t,a),o));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=We(e,r),!(t=Fe[i])&&Ye(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Ee(i);return n}(t)+'"';default:throw new c("impossible error: invalid scalar style")}}()}function Ge(e,t){var n=Ke(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function Ve(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Ze(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function ze(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');r=u.represent[s](t,s)}e.dump=r}return!0}return!1}function Je(e,t,n,i,r,o,a){e.tag=null,e.dump=n,Qe(e,n,!1)||Qe(e,n,!0);var l,u=Se.call(e.dump),s=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===u||"[object Array]"===u;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===u)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,o,a,l,u,s,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new c("sortKeys must be a boolean or a function");for(r=0,o=d.length;r1024)&&(e.dump&&10===e.dump.charCodeAt(0)?s+="?":s+="? "),s+=e.dump,u&&(s+=qe(e,t)),Je(e,t+1,l,!0,u)&&(e.dump&&10===e.dump.charCodeAt(0)?s+=":":s+=": ",p+=s+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",u=e.tag,s=Object.keys(n);for(i=0,r=s.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Je(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=u,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===u)i&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?ze(e,t-1,e.dump,r):ze(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=l+" "+e.dump)}return!0}function He(e,t){var n,i,r=[],o=[];for(Xe(e,r,o),n=0,i=o.length;n=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 d=0;d=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\n ',"\n ","\n ",'\n \n
\n ',""])),this._error):"",this._inputDevices&&(0,n.dy)(w||(w=D(["\n ","\n "])),this.supervisor.localize("addon.configuration.audio.input"),this._setInputDevice,m.U,this._selectedInput,this._inputDevices.map((function(e){return(0,n.dy)(k||(k=D(["\n \n ","\n \n "])),e.device||"",e.name)}))),this._outputDevices&&(0,n.dy)(E||(E=D(["\n ","\n "])),this.supervisor.localize("addon.configuration.audio.output"),this._setOutputDevice,m.U,this._selectedOutput,this._outputDevices.map((function(e){return(0,n.dy)(_||(_=D(["\n ","\n "])),e.device||"",e.name)}))),this._saveSettings,this.supervisor.localize("common.save"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(C||(C=D(["\n :host,\n ha-card {\n display: block;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n ha-select {\n width: 100%;\n }\n ha-select:last-child {\n margin-top: 8px;\n }\n "])))]}},{kind:"method",key:"willUpdate",value:function(e){q(Q(a.prototype),"willUpdate",this).call(this,e),e.has("addon")&&this._addonChanged()}},{kind:"method",key:"_setInputDevice",value:function(e){var t=e.target.value;this._selectedInput=t}},{kind:"method",key:"_setOutputDevice",value:function(e){var t=e.target.value;this._selectedOutput=t}},{kind:"method",key:"_addonChanged",value:(o=S(regeneratorRuntime.mark((function e(){var t,r,n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._selectedInput=null===this.addon.audio_input?"default":this.addon.audio_input,this._selectedOutput=null===this.addon.audio_output?"default":this.addon.audio_output,!this._outputDevices){e.next=4;break}return e.abrupt("return");case 4:return t={device:"default",name:this.supervisor.localize("addon.configuration.audio.default")},e.prev=5,e.next=8,(0,v.G)(this.hass);case 8:r=e.sent,n=r.audio,i=Object.keys(n.input).map((function(e){return{device:e,name:n.input[e]}})),o=Object.keys(n.output).map((function(e){return{device:e,name:n.output[e]}})),this._inputDevices=[t].concat(A(i)),this._outputDevices=[t].concat(A(o)),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(5),this._error="Failed to fetch audio hardware",this._inputDevices=[t],this._outputDevices=[t];case 21:case"end":return e.stop()}}),e,this,[[5,16]])}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"_saveSettings",value:(r=S(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,this._error=void 0,n={audio_input:"default"===this._selectedInput?null:this._selectedInput,audio_output:"default"===this._selectedOutput?null:this._selectedOutput},e.prev=4,e.next=7,(0,l.d3)(this.hass,this.addon.slug,n);case 7:if("started"!==(null===(i=this.addon)||void 0===i?void 0:i.state)){e.next=10;break}return e.next=10,x(this,this.hass,this.supervisor,this.addon);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this._error="Failed to set addon audio device";case 15:r.progress=!1;case 16:case"end":return e.stop()}}),e,this,[[4,12]])}))),function(e){return r.apply(this,arguments)})}]}}),n.oi);var Y,W,K,G,J,X,ee,te=r(77426);r(81545),r(63727),r(83927),r(66255),r(4019),r(18900);function re(e){return re="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},re(e)}function ne(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ie(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){ne(o,n,i,a,s,"next",e)}function s(e){ne(o,n,i,a,s,"throw",e)}a(void 0)}))}}function oe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function se(e,t){return se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},se(e,t)}function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=we(e);if(t){var i=we(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return le(this,r)}}function le(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return de(e)}function de(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(){ue=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!he(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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",'\n \n
\n

\n ','\n

\n
\n \n \n \n ','\n \n \n
\n
\n\n
\n ',"\n ","\n ","\n
\n ",'\n
\n ',""])),this._error):"",!this._yamlMode||this._canShowSchema&&this.addon.schema||this._valid?"":(0,n.dy)(J||(J=oe(['\n \n ',"\n \n "])),this.supervisor.localize("addon.configuration.options.invalid_yaml")),t?(0,n.dy)(X||(X=oe(['=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 d=0;d=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\n

\n ',"\n

\n ","\n\n \n
\n ",'\n
\n ',""])),this._error):"",this._config,this._configChanged,this._computeLabel,this._computeHelper,this._createSchema(this._config,this._showOptional,(null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced)||!1),r?(0,n.dy)(Ce||(Ce=Te(['=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 d=0;d=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"])));var e=this.addon.options&&Object.keys(this.addon.options).length||this.addon.schema&&Object.keys(this.addon.schema).length;return(0,n.dy)(Xe||(Xe=st(['\n
\n ',"\n
\n "])),e||this.addon.network||this.addon.audio?(0,n.dy)(et||(et=st(["\n ","\n ","\n ","\n "])),e?(0,n.dy)(tt||(tt=st(["\n \n "])),this.hass,this.addon,this.supervisor):"",this.addon.network?(0,n.dy)(rt||(rt=st(["\n \n "])),this.hass,this.addon,this.supervisor):"",this.addon.audio?(0,n.dy)(nt||(nt=st(["\n \n "])),this.hass,this.addon,this.supervisor):""):this.supervisor.localize("addon.configuration.no_configuration"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(it||(it=st(["\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n }\n "])))]}}]}}),n.oi),r(93546);function Ot(e){return Ot="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},Ot(e)}function St(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Dt(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function zt(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Dt(o,n,i,a,s,"next",e)}function s(e){Dt(o,n,i,a,s,"throw",e)}a(void 0)}))}}function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tt(e,t){return Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tt(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qt(e);if(t){var i=qt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Rt(this,r)}}function Rt(e,t){if(t&&("object"===Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vt(e)}function Vt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lt(){Lt=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ft(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n \n ','\n
\n ',"\n
\n
\n
\n "])),this._error?(0,n.dy)(Ct||(Ct=St(['',""])),this._error):"",this._content?(0,n.dy)(xt||(xt=St([""])),this._content):(0,n.dy)(Pt||(Pt=St([""])))):(0,n.dy)(Et||(Et=St([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(At||(At=St(["\n ha-card {\n display: block;\n }\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n ha-markdown {\n padding: 16px;\n }\n "])))]}},{kind:"method",key:"_loadData",value:(r=zt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,(0,l.ii)(this.hass,this.addon.slug);case 4:this._content=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this._error=this.supervisor.localize("addon.documentation.get_documentation","error",(0,d.js)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return r.apply(this,arguments)})}]}}),n.oi);var Qt,Yt,Wt=r(8636),Kt=r(63864);function Gt(e){return Gt="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},Gt(e)}function Jt(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Xt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(e,t){return tr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},tr(e,t)}function rr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=or(e);if(t){var i=or(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nr(this,r)}}function nr(e,t){if(t&&("object"===Gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ir(e)}function ir(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function or(e){return or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},or(e)}function ar(){ar=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!lr(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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
\n "])),this.progress,this._buttonTapped,this.disabled)}},{kind:"method",key:"_buttonTapped",value:(r=regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.progress=!0,t={method:this.method,path:this.path,data:this.data},e.prev=2,e.next=5,this.hass.callApi(this.method,this.path,this.data);case 5:r=e.sent,this.progress=!1,this._progressButton.actionSuccess(),t.success=!0,t.response=r,e.next=18;break;case 12:e.prev=12,e.t0=e.catch(2),this.progress=!1,this._progressButton.actionError(),t.success=!1,t.response=e.t0;case 18:(0,a.B)(this,"hass-api-called",t);case 19:case"end":return e.stop()}}),e,this,[[2,12]])})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Jt(o,n,i,a,s,"next",e)}function s(e){Jt(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Yt||(Yt=Xt(["\n :host([disabled]) {\n pointer-events: none;\n }\n "])))}}]}}),n.oi);customElements.define("ha-call-api-button",hr);r(88324),r(85124),r(14089),r(52039);var mr,vr,yr,br,gr,wr,kr,Er,_r,Cr,xr,Pr,Ar,Or,Sr,Dr,zr,jr,Tr,Hr,Rr,Vr,Lr,Mr,Ir,Fr,Br,Ur,Zr,Nr,$r,qr,Qr,Yr,Wr,Kr,Gr,Jr,Xr,en,tn,rn=r(70203),nn=(r(46586),r(63226),function(e,t){(0,a.B)(e,"show-dialog",{dialogTag:"dialog-hassio-markdown",dialogImport:function(){return r.e(6884).then(r.bind(r,56884))},dialogParams:t})}),on=(r(23432),r(34450));function an(e){return an="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},an(e)}function sn(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function cn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){sn(o,n,i,a,s,"next",e)}function s(e){sn(o,n,i,a,s,"throw",e)}a(void 0)}))}}function ln(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function dn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t){return un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},un(e,t)}function pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cn(e);if(t){var i=Cn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hn(e)}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mn(){mn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!bn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n
\n
\n ','\n
\n ','\n
\n
\n
\n ','\n
\n\n \n ',"\n\n \n \n\n
\n ',".
\n ",'\n
\n
\n
\n ',"\n ","\n
\n
\n ","\n
\n
\n ","\n ",'\n
\n
\n
\n ',"\n
\n
\n ","\n
\n
\n \n\n ","\n "])),this.addon.update_available?(0,n.dy)(vr||(vr=ln(["\n \n "])),this.hass,this.narrow,this.supervisor,this.addon.slug,this._updateComplete):"","protected"in this.addon&&!this.addon.protected?(0,n.dy)(yr||(yr=ln(['\n \n (',")\n
\n "])),this.addon.version,this._openChangelog,this.supervisor.localize("addon.dashboard.changelog")):(0,n.dy)(_r||(_r=ln(['\n \n \n \n \n \n \n \n \n \n \n ',""])),this.addon.url,this.addon.name)),this.addon.logo?(0,n.dy)(Vr||(Vr=ln(['\n \n \n ',"\n \n \n \n\n ","\n ","\n ","\n ","\n \n "])),(0,Wt.$)({"addon-options":!0,started:"started"===this.addon.state}),this.narrow,this.supervisor.localize("addon.dashboard.option.boot.title"),this.supervisor.localize("addon.dashboard.option.boot.description"),this._startOnBootToggled,"auto"===this.addon.boot,"once"!==this.addon.startup?(0,n.dy)(Mr||(Mr=ln(["\n \n ','\n
\n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.watchdog.title"),this.supervisor.localize("addon.dashboard.option.watchdog.description"),this._watchdogToggled,this.addon.watchdog):"",this.addon.auto_update||null!==(o=this.hass.userData)&&void 0!==o&&o.showAdvanced?(0,n.dy)(Ir||(Ir=ln(["\n \n ','\n \n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.auto_update.title"),this.supervisor.localize("addon.dashboard.option.auto_update.description"),this._autoUpdateToggled,this.addon.auto_update):"",!this._computeCannotIngressSidebar&&this.addon.ingress?(0,n.dy)(Fr||(Fr=ln(["\n \n ','\n \n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.ingress_panel.title"),this.supervisor.localize("addon.dashboard.option.ingress_panel.description"),this._panelToggled,this.addon.ingress_panel):"",this._computeUsesProtectedOptions?(0,n.dy)(Br||(Br=ln(["\n \n ','\n \n \n ',"\n \n \n \n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.protected.title"),this.supervisor.localize("addon.dashboard.option.protected.description"),this._protectionToggled,this.addon.protected):""):"",this.addon.version&&"started"===this.addon.state?(0,n.dy)(Ur||(Ur=ln(["\n ','\n \n '," \n \n ",""])),this.narrow,this.supervisor.localize("addon.dashboard.hostname"),this.addon.hostname,s.map((function(e){var t;return(0,n.dy)(Zr||(Zr=ln(["\n \n "])),e.description,null!==(t=e.value)&&void 0!==t?t:0,e.tooltip)}))):"",this._error?(0,n.dy)(Nr||(Nr=ln(['',""])),this._error):"",this.addon.version||!a||this.addon.available?"":(0,on.I)(this.supervisor.info.supported_arch,this.addon.arch)?(0,n.dy)(qr||(qr=ln(['\n \n ',"\n \n "])),this.supervisor.localize("addon.dashboard.not_available_version","core_version_installed",this.supervisor.core.version,"core_version_needed",a.homeassistant)):(0,n.dy)($r||($r=ln(['\n \n ',"\n \n "])),this.supervisor.localize("addon.dashboard.not_available_arch")),this.addon.version?this._computeIsRunning?(0,n.dy)(Qr||(Qr=ln(['\n \n \n \n ',"\n \n \n "])),this._pathWebui,this.supervisor.localize("addon.dashboard.open_web_ui")):"",this._computeShowIngressUI?(0,n.dy)(Jr||(Jr=ln(["\n \n ","\n \n "])),this._openIngress,this.supervisor.localize("addon.dashboard.open_web_ui")):"",this._uninstallClicked,this.supervisor.localize("addon.dashboard.uninstall"),this.addon.build?(0,n.dy)(Xr||(Xr=ln(['\n \n ',"\n \n "])),this.hass,this.addon.slug,this.supervisor.localize("addon.dashboard.rebuild")):""):"",this.addon.long_description?(0,n.dy)(en||(en=ln(['\n \n
\n '),"icon_experimental",''),"icon_deprecated",'')):this.supervisor.localize("addon.dashboard.capability.".concat(t,".description"))})}},{kind:"get",key:"_computeIsRunning",value:function(){var e;return"started"===(null===(e=this.addon)||void 0===e?void 0:e.state)}},{kind:"get",key:"_pathWebui",value:function(){return this.addon.webui.replace("[HOST]",document.location.hostname)}},{kind:"get",key:"_computeShowWebUI",value:function(){return!this.addon.ingress&&this.addon.webui&&this._computeIsRunning}},{kind:"method",key:"_openIngress",value:function(){(0,s.c)("/hassio/ingress/".concat(this.addon.slug))}},{kind:"get",key:"_computeShowIngressUI",value:function(){return this.addon.ingress&&this._computeIsRunning}},{kind:"get",key:"_computeCannotIngressSidebar",value:function(){return!this.addon.ingress||!(0,Kt.I)(this.hass.config.version,0,92)}},{kind:"get",key:"_computeUsesProtectedOptions",value:function(){return this.addon.docker_api||this.addon.full_access||this.addon.host_pid}},{kind:"method",key:"_startOnBootToggled",value:(E=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={boot:"auto"===this.addon.boot?"manual":"auto"},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return E.apply(this,arguments)})},{kind:"method",key:"_watchdogToggled",value:(k=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={watchdog:!this.addon.watchdog},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return k.apply(this,arguments)})},{kind:"method",key:"_autoUpdateToggled",value:(w=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={auto_update:!this.addon.auto_update},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return w.apply(this,arguments)})},{kind:"method",key:"_protectionToggled",value:(g=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={protected:!this.addon.protected},e.prev=2,e.next=5,(0,l.NI)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"security"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return g.apply(this,arguments)})},{kind:"method",key:"_panelToggled",value:(b=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={ingress_panel:!this.addon.ingress_panel},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return b.apply(this,arguments)})},{kind:"method",key:"_openChangelog",value:(y=cn(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,l.CH)(this.hass,this.addon.slug);case 3:t=e.sent,nn(this,{title:this.supervisor.localize("addon.dashboard.changelog"),content:(0,on.H)(this.addon,t)}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.get_changelog"),text:(0,d.js)(e.t0)});case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return y.apply(this,arguments)})},{kind:"method",key:"_updateComplete",value:function(){var e={success:!0,response:void 0,path:"install"};(0,a.B)(this,"hass-api-called",e)}},{kind:"method",key:"_installClicked",value:(v=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.fU)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"install"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.install"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return v.apply(this,arguments)})},{kind:"method",key:"_stopClicked",value:(m=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.ow)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"stop"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.stop"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return m.apply(this,arguments)})},{kind:"method",key:"_restartClicked",value:(u=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.P$)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"stop"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.restart"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return u.apply(this,arguments)})},{kind:"method",key:"_startClicked",value:(c=cn(regeneratorRuntime.mark((function e(t){var r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.su)(this.hass,this.addon.slug);case 5:if((n=e.sent).valid){e.next=11;break}return e.next=9,(0,p.g7)(this,{title:this.supervisor.localize("addon.dashboard.action_error.start_invalid_config"),text:n.message.split(" Got ")[0],confirm:function(){return o._openConfiguration()},confirmText:this.supervisor.localize("addon.dashboard.action_error.go_to_config"),dismissText:this.supervisor.localize("common.cancel")});case 9:return r.progress=!1,e.abrupt("return");case 11:e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(2),(0,p.Ys)(this,{title:"Failed to validate addon configuration",text:(0,d.js)(e.t0)}),r.progress=!1,e.abrupt("return");case 18:return e.prev=18,e.next=21,(0,l.kP)(this.hass,this.addon.slug);case 21:return e.next=23,(0,l.AD)(this.hass,this.addon.slug);case 23:this.addon=e.sent,i={success:!0,response:void 0,path:"start"},(0,a.B)(this,"hass-api-called",i),e.next=31;break;case 28:e.prev=28,e.t1=e.catch(18),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.start"),text:(0,d.js)(e.t1)});case 31:r.progress=!1;case 32:case"end":return e.stop()}}),e,this,[[2,13],[18,28]])}))),function(e){return c.apply(this,arguments)})},{kind:"method",key:"_openConfiguration",value:function(){(0,s.c)("/hassio/addon/".concat(this.addon.slug,"/config"))}},{kind:"method",key:"_uninstallClicked",value:(r=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.next=4,(0,p.g7)(this,{title:this.supervisor.localize("dialog.uninstall_addon.title",{name:this.addon.name}),text:this.supervisor.localize("dialog.uninstall_addon.text"),confirmText:this.supervisor.localize("dialog.uninstall_addon.uninstall"),dismissText:this.supervisor.localize("common.cancel"),destructive:!0});case 4:if(e.sent){e.next=8;break}return r.progress=!1,e.abrupt("return");case 8:return this._error=void 0,e.prev=9,e.next=12,(0,l.Yn)(this.hass,this.addon.slug);case 12:n={success:!0,response:void 0,path:"uninstall"},(0,a.B)(this,"hass-api-called",n),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(9),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.uninstall"),text:(0,d.js)(e.t0)});case 19:r.progress=!1;case 20:case"end":return e.stop()}}),e,this,[[9,16]])}))),function(e){return r.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(tn||(tn=ln(['\n :host {\n display: block;\n }\n ha-card {\n display: block;\n margin-bottom: 16px;\n }\n ha-card.warning {\n background-color: var(--error-color);\n color: white;\n }\n ha-card.warning .card-header {\n color: white;\n }\n ha-card.warning .card-content {\n color: white;\n }\n ha-card.warning mwc-button {\n --mdc-theme-primary: white !important;\n }\n .warning {\n color: var(--error-color);\n --mdc-theme-primary: var(--error-color);\n }\n .light-color {\n color: var(--secondary-text-color);\n }\n .addon-header {\n padding-left: 8px;\n font-size: 24px;\n color: var(--ha-card-header-color, --primary-text-color);\n }\n .addon-version {\n float: right;\n font-size: 15px;\n vertical-align: middle;\n }\n .errors {\n color: var(--error-color);\n margin-bottom: 16px;\n }\n .description {\n margin-bottom: 16px;\n }\n img.logo {\n max-width: 100%;\n max-height: 60px;\n margin: 16px 0;\n display: block;\n }\n\n ha-switch {\n display: flex;\n }\n ha-svg-icon.running {\n color: var(--success-color);\n }\n ha-svg-icon.stopped {\n color: var(--error-color);\n }\n ha-call-api-button {\n font-weight: 500;\n color: var(--primary-color);\n }\n protection-enable mwc-button {\n --mdc-theme-primary: white;\n }\n .description a {\n color: var(--primary-color);\n }\n ha-chip {\n text-transform: capitalize;\n --ha-chip-text-color: var(--text-primary-color);\n --ha-chip-background-color: var(--primary-color);\n }\n\n .red {\n --ha-chip-background-color: var(--label-badge-red, #df4c1e);\n }\n .blue {\n --ha-chip-background-color: var(--label-badge-blue, #039be5);\n }\n .green {\n --ha-chip-background-color: var(--label-badge-green, #0da035);\n }\n .yellow {\n --ha-chip-background-color: var(--label-badge-yellow, #f4b400);\n }\n .capabilities {\n margin-bottom: 16px;\n }\n .card-actions {\n justify-content: space-between;\n display: flex;\n }\n .changelog {\n display: contents;\n }\n .changelog-link {\n color: var(--primary-color);\n text-decoration: underline;\n cursor: pointer;\n }\n ha-markdown {\n padding: 16px;\n }\n ha-settings-row {\n padding: 0;\n height: 54px;\n width: 100%;\n }\n ha-settings-row > span[slot="description"] {\n white-space: normal;\n color: var(--secondary-text-color);\n }\n ha-settings-row[three-line] {\n height: 74px;\n }\n\n .addon-options {\n max-width: 90%;\n }\n\n .addon-container {\n display: grid;\n grid-auto-flow: column;\n grid-template-columns: 60% 40%;\n }\n\n .addon-container > div:last-of-type {\n align-self: end;\n }\n\n ha-alert mwc-button {\n --mdc-theme-primary: var(--primary-text-color);\n }\n a {\n text-decoration: none;\n }\n\n update-available-card {\n padding-bottom: 16px;\n }\n\n @media (max-width: 720px) {\n ha-chip {\n line-height: 36px;\n }\n .addon-options {\n max-width: 100%;\n }\n .addon-container {\n display: block;\n }\n }\n '])))]}}]}}),n.oi);function jn(e){return jn="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},jn(e)}function Tn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){return Rn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Rn(e,t)}function Vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=In(e);if(t){var i=In(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ln(this,r)}}function Ln(e,t){if(t&&("object"===jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Mn(e)}function Mn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function In(e){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},In(e)}function Fn(){Fn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Zn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n =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 d=0;d=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","\n \n ",'\n
\n ','\n
\n
\n ',""])),this._error):"",this._content?(0,n.dy)(Kn||(Kn=Xn([""])),this._content):"",this._refresh,this.supervisor.localize("common.refresh"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(Gn||(Gn=Xn(["\n :host,\n ha-card {\n display: block;\n }\n "])))]}},{kind:"method",key:"_loadData",value:(o=ti(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,(0,l.kr)(this.hass,this.addon.slug);case 4:this._content=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this._error=this.supervisor.localize("addon.logs.get_logs","error",(0,d.js)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"_refresh",value:(r=ti(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._loadData();case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})}]}}),n.oi);function wi(e){return wi="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},wi(e)}function ki(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _i(e,t){return _i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_i(e,t)}function Ci(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ai(e);if(t){var i=Ai(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xi(this,r)}}function xi(e,t){if(t&&("object"===wi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pi(e)}function Pi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ai(e){return Ai=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ai(e)}function Oi(){Oi=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!zi(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n =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 d=0;d=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=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 d=0;d=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"])),this._error);if(!this.addon||null===(e=this.supervisor)||void 0===e||!e.addon)return(0,n.dy)(Ji||(Ji=io([""])));var t=[{translationKey:"addon.panel.info",path:"/hassio/addon/".concat(this.addon.slug,"/info"),iconPath:"M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z"}];this.addon.documentation&&t.push({translationKey:"addon.panel.documentation",path:"/hassio/addon/".concat(this.addon.slug,"/documentation"),iconPath:"M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z"}),this.addon.version&&t.push({translationKey:"addon.panel.configuration",path:"/hassio/addon/".concat(this.addon.slug,"/config"),iconPath:"M15.9,18.45C17.25,18.45 18.35,17.35 18.35,16C18.35,14.65 17.25,13.55 15.9,13.55C14.54,13.55 13.45,14.65 13.45,16C13.45,17.35 14.54,18.45 15.9,18.45M21.1,16.68L22.58,17.84C22.71,17.95 22.75,18.13 22.66,18.29L21.26,20.71C21.17,20.86 21,20.92 20.83,20.86L19.09,20.16C18.73,20.44 18.33,20.67 17.91,20.85L17.64,22.7C17.62,22.87 17.47,23 17.3,23H14.5C14.32,23 14.18,22.87 14.15,22.7L13.89,20.85C13.46,20.67 13.07,20.44 12.71,20.16L10.96,20.86C10.81,20.92 10.62,20.86 10.54,20.71L9.14,18.29C9.05,18.13 9.09,17.95 9.22,17.84L10.7,16.68L10.65,16L10.7,15.31L9.22,14.16C9.09,14.05 9.05,13.86 9.14,13.71L10.54,11.29C10.62,11.13 10.81,11.07 10.96,11.13L12.71,11.84C13.07,11.56 13.46,11.32 13.89,11.15L14.15,9.29C14.18,9.13 14.32,9 14.5,9H17.3C17.47,9 17.62,9.13 17.64,9.29L17.91,11.15C18.33,11.32 18.73,11.56 19.09,11.84L20.83,11.13C21,11.07 21.17,11.13 21.26,11.29L22.66,13.71C22.75,13.86 22.71,14.05 22.58,14.16L21.1,15.31L21.15,16L21.1,16.68M6.69,8.07C7.56,8.07 8.26,7.37 8.26,6.5C8.26,5.63 7.56,4.92 6.69,4.92A1.58,1.58 0 0,0 5.11,6.5C5.11,7.37 5.82,8.07 6.69,8.07M10.03,6.94L11,7.68C11.07,7.75 11.09,7.87 11.03,7.97L10.13,9.53C10.08,9.63 9.96,9.67 9.86,9.63L8.74,9.18L8,9.62L7.81,10.81C7.79,10.92 7.7,11 7.59,11H5.79C5.67,11 5.58,10.92 5.56,10.81L5.4,9.62L4.64,9.18L3.5,9.63C3.41,9.67 3.3,9.63 3.24,9.53L2.34,7.97C2.28,7.87 2.31,7.75 2.39,7.68L3.34,6.94L3.31,6.5L3.34,6.06L2.39,5.32C2.31,5.25 2.28,5.13 2.34,5.03L3.24,3.47C3.3,3.37 3.41,3.33 3.5,3.37L4.63,3.82L5.4,3.38L5.56,2.19C5.58,2.08 5.67,2 5.79,2H7.59C7.7,2 7.79,2.08 7.81,2.19L8,3.38L8.74,3.82L9.86,3.37C9.96,3.33 10.08,3.37 10.13,3.47L11.03,5.03C11.09,5.13 11.07,5.25 11,5.32L10.03,6.06L10.06,6.5L10.03,6.94Z"},{translationKey:"addon.panel.log",path:"/hassio/addon/".concat(this.addon.slug,"/logs"),iconPath:"M18 7C16.9 7 16 7.9 16 9V15C16 16.1 16.9 17 18 17H20C21.1 17 22 16.1 22 15V11H20V15H18V9H22V7H18M2 7V17H8V15H4V7H2M11 7C9.9 7 9 7.9 9 9V15C9 16.1 9.9 17 11 17H13C14.1 17 15 16.1 15 15V9C15 7.9 14.1 7 13 7H11M11 9H13V15H11V9Z"});var r=this._computeTail(this.route);return(0,n.dy)(Xi||(Xi=io(["\n ',"\n \n \n "])),this.hass,this.supervisor.localize,this.narrow,r,t,this._backPath,this.addon.name,r,this.narrow,this.hass,this.supervisor,this.addon)}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(eo||(eo=io(["\n :host {\n color: var(--primary-text-color);\n }\n .content {\n padding: 24px 0 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n width: 600px;\n }\n hassio-addon-logs {\n max-width: calc(100% - 8px);\n min-width: 600px;\n }\n @media only screen and (max-width: 600px) {\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config,\n hassio-addon-logs {\n max-width: 100%;\n min-width: 100%;\n }\n }\n "])))]}},{kind:"method",key:"firstUpdated",value:(v=no(regeneratorRuntime.mark((function e(){var t,r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==this.route.path){e.next=27;break}if(t=(0,c.io)("addon"),!(r=(0,c.io)("repository_url"))){e.next=21;break}return e.next=6,(0,u.Er)(this.hass);case 6:if(e.sent.repositories.find((function(e){return e.source===r}))){e.next=21;break}return e.next=10,(0,p.g7)(this,{title:this.supervisor.localize("my.add_addon_repository_title"),text:this.supervisor.localize("my.add_addon_repository_description",{addon:t,repository:r}),confirmText:this.supervisor.localize("common.add"),dismissText:this.supervisor.localize("common.cancel")});case 10:if(e.sent){e.next=13;break}return this._error=this.supervisor.localize("my.error_repository_not_found"),e.abrupt("return");case 13:return e.prev=13,e.next=16,(0,u.FV)(this.hass,r);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(13),this._error=(0,d.js)(e.t0);case 21:if(!t){e.next=27;break}return e.next=24,(0,u.Er)(this.hass);case 24:n=e.sent,i=n.addons.some((function(e){return e.slug===t})),i?(0,s.c)("/hassio/addon/".concat(t),{replace:!0}):this._error=this.supervisor.localize("my.error_addon_not_found");case 27:this.addEventListener("hass-api-called",(function(e){return o._apiCalled(e)}));case 28:case"end":return e.stop()}}),e,this,[[13,18]])}))),function(){return v.apply(this,arguments)})},{kind:"method",key:"_apiCalled",value:(m=no(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.detail.success){e.next=2;break}return e.abrupt("return");case 2:if((n=null===(r=t.detail.path)||void 0===r?void 0:r.split("/"))&&0!==n.length){e.next=5;break}return e.abrupt("return");case 5:if(i=n[n.length-1],["uninstall","install","update","start","stop"].includes(i)&&(0,a.B)(this,"supervisor-collection-refresh",{collection:"addon"}),"uninstall"!==i){e.next=11;break}window.history.back(),e.next=19;break;case 11:if("install"!==i){e.next=17;break}return e.next=14,(0,l.AD)(this.hass,this.addon.slug);case 14:this.addon=e.sent,e.next=19;break;case 17:return e.next=19,this._routeDataChanged();case 19:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{kind:"method",key:"updated",value:function(e){e.has("route")&&!this.addon&&this._routeDataChanged()}},{kind:"method",key:"_routeDataChanged",value:(r=no(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.route.path.split("/")[1]){e.next=3;break}return e.abrupt("return");case 3:if(e.prev=3,this.supervisor.addon){e.next=9;break}return e.next=7,(0,l.yt)(this.hass);case 7:r=e.sent,(0,a.B)(this,"supervisor-update",{addon:r});case 9:return e.next=11,(0,l.R_)(this.hass,this.supervisor,t);case 11:this.addon=e.sent,e.next=18;break;case 14:e.prev=14,e.t0=e.catch(3),this._error="Error fetching addon info: ".concat((0,d.js)(e.t0)),this.addon=void 0;case 18:case"end":return e.stop()}}),e,this,[[3,14]])}))),function(){return r.apply(this,arguments)})}]}}),n.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/05fc2212.js.gz b/supervisor/api/panel/frontend_es5/05fc2212.js.gz new file mode 100644 index 000000000..48c77a724 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/05fc2212.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/06fd585a.js b/supervisor/api/panel/frontend_es5/06fd585a.js new file mode 100644 index 000000000..242e02175 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/06fd585a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4875],{94875:function(e,t,r){r.r(t),r.d(t,{HaColorTempSelector:function(){return B}});var n,i=r(37500),o=r(63550),a=r(47181),l=r(50856),s=r(28426);r(65025);function c(e){return c="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},c(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r\n :host {\n display: block;\n }\n\n .title {\n margin: 5px 0 8px;\n color: var(--primary-text-color);\n }\n\n .slider-container {\n display: flex;\n }\n\n ha-icon {\n margin-top: 4px;\n color: var(--secondary-text-color);\n }\n\n ha-slider {\n flex-grow: 1;\n background-image: var(--ha-slider-background);\n border-radius: 4px;\n }\n \n\n
[[_getTitle()]]
\n
\n
\n \n \n
\n \n '],t||(t=e.slice(0)),n=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))));var e,t}},{key:"properties",get:function(){return{caption:String,disabled:Boolean,required:Boolean,min:Number,max:Number,pin:Boolean,step:Number,helper:String,extra:{type:Boolean,value:!1},ignoreBarTouch:{type:Boolean,value:!0},icon:{type:String,value:""},value:{type:Number,notify:!0}}}}],(r=[{key:"_getTitle",value:function(){return"".concat(this.caption).concat(this.caption&&this.required?" *":"")}}])&&f(t.prototype,r),i&&f(t,i),a}(s.H3);function w(e){return w="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},w(e)}function k(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=S(e);if(t){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return P(this,r)}}function P(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function j(){j=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!T(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var l=this.fromElementDescriptor(e),s=this.toElementFinisherExtras((0,i[o])(l)||l);e=s.element,this.addElementPlacement(e,t),s.finisher&&n.push(s.finisher);var c=s.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);rr.length)&&(t=r.length);for(var e=0,n=new Array(t);ea?1*u:0}))}};(0,n.Jj)(i)}},n={};function o(r){var t=n[r];if(void 0!==t)return t.exports;var u=n[r]={exports:{}};return e[r](u,u.exports,o),u.exports}o.m=e,o.x=function(){var r=o.O(void 0,[9191],(function(){return o(5425)}));return r=o.O(r)},r=[],o.O=function(t,e,n,u){if(!e){var i=1/0;for(c=0;c=u)&&Object.keys(o.O).every((function(r){return o.O[r](e[f])}))?e.splice(f--,1):(a=!1,u0&&r[c-1][2]>u;c--)r[c]=r[c-1];r[c]=[e,n,u]},o.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(t,{a:t}),t},o.d=function(r,t){for(var e in t)o.o(t,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o.f={},o.e=function(r){return Promise.all(Object.keys(o.f).reduce((function(t,e){return o.f[e](r,t),t}),[]))},o.u=function(r){return"ed6e5677.js"},o.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},o.p="/api/hassio/app/frontend_es5/",function(){var r={5425:1,5477:1};o.f.i=function(t,e){r[t]||importScripts(o.p+o.u(t))};var t=self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[],e=t.push.bind(t);t.push=function(t){var n=t[0],u=t[1],i=t[2];for(var a in u)o.o(u,a)&&(o.m[a]=u[a]);for(i&&i(o);n.length;)r[n.pop()]=1;e(t)}}(),t=o.x,o.x=function(){return o.e(9191).then(t)};o.x()}(); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/085dd45b.js.gz b/supervisor/api/panel/frontend_es5/085dd45b.js.gz new file mode 100644 index 000000000..6f2a2fd57 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/085dd45b.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/098df01f.js b/supervisor/api/panel/frontend_es5/098df01f.js new file mode 100644 index 000000000..3184dd092 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/098df01f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[8900],{18900:function(e,t,r){var n,i,o,a=r(77426),s=r(37500),l=r(63550),c=r(47181);r(53822);function u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=m(e);if(t){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(){v=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!w(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n '])),this.label?(0,s.dy)(o||(o=u(["

","","

"])),this.label,this.required?" *":""):"",this.hass,this._yaml,this.readOnly,!1===this.isValid,this._onChange)}},{kind:"method",key:"_onChange",value:function(e){var t;e.stopPropagation(),this._yaml=e.detail.value;var r=!0;if(this._yaml)try{t=(0,a.zD)(this._yaml,{schema:this.yamlSchema})}catch(n){r=!1}else t={};this.value=t,this.isValid=r,(0,c.B)(this,"value-changed",{value:t,isValid:r})}},{kind:"get",key:"yaml",value:function(){return this._yaml}}]}}),s.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/098df01f.js.gz b/supervisor/api/panel/frontend_es5/098df01f.js.gz new file mode 100644 index 000000000..fe799c7cb Binary files /dev/null and b/supervisor/api/panel/frontend_es5/098df01f.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/0bcce3af.js b/supervisor/api/panel/frontend_es5/0bcce3af.js new file mode 100644 index 000000000..081d07137 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/0bcce3af.js @@ -0,0 +1 @@ +(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[7752],{91100:function(e,t,n){var r=n(79668),u=n(48544);n(27301);function i(e){return null==e}function s(e){(e=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{})).whiteList=e.whiteList||r.whiteList,e.onAttr=e.onAttr||r.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||r.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,this.options=e}s.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,n=t.whiteList,r=t.onAttr,s=t.onIgnoreAttr,a=t.safeAttrValue;return u(e,(function(e,t,u,o,l){var c=n[u],D=!1;if(!0===c?D=c:"function"==typeof c?D=c(o):c instanceof RegExp&&(D=c.test(o)),!0!==D&&(D=!1),o=a(u,o)){var h,p={position:t,sourcePosition:e,source:l,isWhite:D};return D?i(h=r(u,o,p))?u+":"+o:h:i(h=s(u,o,p))?void 0:h}}))},e.exports=s},79668:function(e,t){function n(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var r=/javascript\s*\:/gim;t.whiteList=n(),t.getDefaultWhiteList=n,t.onAttr=function(e,t,n){},t.onIgnoreAttr=function(e,t,n){},t.safeAttrValue=function(e,t){return r.test(t)?"":t}},8300:function(e,t,n){var r=n(79668),u=n(91100);for(var i in(t=e.exports=function(e,t){return new u(t).process(e)}).FilterCSS=u,r)t[i]=r[i];"undefined"!=typeof window&&(window.filterCSS=e.exports)},48544:function(e,t,n){var r=n(27301);e.exports=function(e,t){";"!==(e=r.trimRight(e))[e.length-1]&&(e+=";");var n=e.length,u=!1,i=0,s=0,a="";function o(){if(!u){var n=r.trim(e.slice(i,s)),o=n.indexOf(":");if(-1!==o){var l=r.trim(n.slice(0,o)),c=r.trim(n.slice(o+1));if(l){var D=t(i,a.length,l,c,n);D&&(a+=D+"; ")}}}i=s+1}for(;s/g,D=/"/g,h=/"/g,p=/&#([a-zA-Z0-9]*);?/gim,f=/:?/gim,g=/&newline;?/gim,d=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,k=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,m=/u\s*r\s*l\s*\(.*/gi;function A(e){return e.replace(D,""")}function F(e){return e.replace(h,'"')}function b(e){return e.replace(p,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function x(e){return e.replace(f,":").replace(g," ")}function C(e){for(var t="",n=0,r=e.length;n/g;t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},t.getDefaultWhiteList=s,t.onTag=function(e,t,n){},t.onIgnoreTag=function(e,t,n){},t.onTagAttr=function(e,t,n){},t.onIgnoreTagAttr=function(e,t,n){},t.safeAttrValue=function(e,t,n,r){if(n=v(n),"href"===t||"src"===t){if("#"===(n=i.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(d.lastIndex=0,d.test(n))return""}else if("style"===t){if(k.lastIndex=0,k.test(n))return"";if(m.lastIndex=0,m.test(n)&&(d.lastIndex=0,d.test(n)))return"";!1!==r&&(n=(r=r||a).process(n))}return n=E(n)},t.escapeHtml=o,t.escapeQuote=A,t.unescapeQuote=F,t.escapeHtmlEntities=b,t.escapeDangerHtml5Entities=x,t.clearNonPrintableCharacter=C,t.friendlyAttrValue=v,t.escapeAttrValue=E,t.onIgnoreTagStripAll=function(){return""},t.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var n=!Array.isArray(e),r=[],u=!1;return{onIgnoreTag:function(s,a,o){if(function(t){return!!n||-1!==i.indexOf(e,t)}(s)){if(o.isClosing){var l="[/removed]",c=o.position+l.length;return r.push([!1!==u?u:o.position,c]),u=!1,l}return u||(u=o.position),"[removed]"}return t(s,a,o)},remove:function(e){var t="",n=0;return i.forEach(r,(function(r){t+=e.slice(n,r[0]),n=r[1]})),t+=e.slice(n)}}},t.stripCommentTag=function(e){return e.replace(w,"")},t.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},t.cssFilter=a,t.getDefaultCSSWhiteList=u},62173:function(e,t,n){var r=n(60841),u=n(79542),i=n(61585);function s(e,t){return new i(t).process(e)}for(var a in(t=e.exports=s).filterXSS=s,t.FilterXSS=i,r)t[a]=r[a];for(var a in u)t[a]=u[a];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)},79542:function(e,t,n){var r=n(58511);function u(e){var t=r.spaceIndex(e);if(-1===t)var n=e.slice(1,-1);else n=e.slice(1,t+1);return"/"===(n=r.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function i(e){return"0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function l(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}t.parseTag=function(e,t,n){"use strict";var r="",s=0,a=!1,o=!1,l=0,c=e.length,D="",h="";e:for(l=0;l"===p){r+=n(e.slice(s,a)),D=u(h=e.slice(a,l+1)),r+=t(a,r.length,D,h,i(h)),s=l+1,a=!1;continue}if('"'===p||"'"===p)for(var f=1,g=e.charAt(l-f);""===g.trim()||"="===g;){if("="===g){o=p;continue e}g=e.charAt(l-++f)}}else if(p===o){o=!1;continue}}return s";var m=function(e){var t=o.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=o.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=o.trim(e.slice(0,-1))),{html:e,closing:n}}(s),A=n[u],F=a(m.html,(function(e,t){var n,r=-1!==o.indexOf(A,e);return l(n=c(u,e,t,r))?r?(t=h(u,e,t,f))?e+'="'+t+'"':e:l(n=D(u,e,t,r))?void 0:n:n}));s="<"+u;return F&&(s+=" "+F),m.closing&&(s+=" /"),s+=">"}return l(d=i(u,s,k))?p(s):d}),p);return g&&(d=g.remove(d)),d},e.exports=c},69330:function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}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 i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n"']/,p=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,g=/[<>"']|&(?!#?\w+;)/g,d={"&":"&","<":"<",">":">",'"':""","'":"'"},k=function(e){return d[e]};function m(e,t){if(t){if(h.test(e))return e.replace(p,k)}else if(f.test(e))return e.replace(g,k);return e}var A=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function F(e){return e.replace(A,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var b=/(^|[^\[])\^/g;function x(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(b,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var C=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(e,t,n){if(e){var r;try{r=decodeURIComponent(F(n)).replace(C,"").toLowerCase()}catch(u){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!v.test(n)&&(n=function(e,t){w[" "+e]||(y.test(e)?w[" "+e]=e+"/":w[" "+e]=I(e,"/",!0));var n=-1===(e=w[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(B,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(_,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(u){return null}return n}var w={},y=/^[^:]+:\/*[^/]*$/,B=/^([^:]+:)[\s\S]*$/,_=/^([^:]+:\/*[^/]*)[\s\S]*$/;var z={exec:function(){}};function S(e){for(var t,n,r=1;r=0&&"\\"===n[u];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function L(e,t,n,r){var u=t.href,i=t.title?m(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var a={type:"link",raw:n,href:u,title:i,text:s,tokens:r.inlineTokens(s,[])};return r.state.inLink=!1,a}return{type:"image",raw:n,href:u,title:i,text:m(s)}}var O=function(){function e(t){u(this,e),this.options=t||D}return s(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:I(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:a(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=I(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}var u={type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:[]};return this.lexer.inline(u.text,u.tokens),u}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,u,i,s,a,o,l,c,D,h,p,f,g=t[1].trim(),d=g.length>1,k={type:"list",raw:"",ordered:d,start:d?+g.slice(0,-1):"",loose:!1,items:[]};g=d?"\\d{1,9}\\".concat(g.slice(-1)):"\\".concat(g),this.options.pedantic&&(g=d?g:"[*+-]");for(var m=new RegExp("^( {0,3}".concat(g,")((?: [^\\n]*)?(?:\\n|$))"));e&&(f=!1,t=m.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],D=e.split("\n",1)[0],this.options.pedantic?(s=2,p=c.trimLeft()):(s=(s=t[2].search(/[^ ]/))>4?1:s,p=c.slice(s),s+=t[1].length),o=!1,!c&&/^ *$/.test(D)&&(n+=D+"\n",e=e.substring(D.length+1),f=!0),!f)for(var A=new RegExp("^ {0,".concat(Math.min(3,s-1),"}(?:[*+-]|\\d{1,9}[.)])"));e&&(c=h=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!A.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())p+="\n"+c.slice(s);else{if(o)break;p+="\n"+c}o||c.trim()||(o=!0),n+=h+"\n",e=e.substring(h.length+1)}k.loose||(l?k.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(u=/^\[[ xX]\] /.exec(p))&&(i="[ ] "!==u[0],p=p.replace(/^\[[ xX]\] +/,"")),k.items.push({type:"list_item",raw:n,task:!!u,checked:i,loose:!1,text:p}),k.raw+=n}k.items[k.items.length-1].raw=n.trimRight(),k.items[k.items.length-1].text=p.trimRight(),k.raw=k.raw.trimRight();var F=k.items.length;for(a=0;a1)return!0}}catch(i){u.e(i)}finally{u.f()}return!1}));!k.loose&&b.length&&x&&(k.loose=!0,k.items[a].loose=!0)}return k}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(n.type="paragraph",n.text=this.options.sanitizer?this.options.sanitizer(t[0]):m(t[0]),n.tokens=[],this.lexer.inline(n.text,n.tokens)),n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:T(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,u,i,s,a=n.align.length;for(r=0;r/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):m(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=I(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var u=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,u=0;u-1){var i=(0===t[0].indexOf("!")?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,i).trim(),t[3]=""}}var s=t[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);o&&(s=o[1],a=o[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s.slice(1):s.slice(1,-1)),L(t,{href:s?s.replace(this.rules.inline._escapes,"$1"):s,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return L(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var u=r[1]||r[2]||"";if(!u||u&&(""===n||this.rules.inline.punctuation.exec(n))){var i,s,a=r[0].length-1,o=a,l=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+a);null!=(r=c.exec(t));)if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(s=i.length,r[3]||r[4])o+=s;else if(!((r[5]||r[6])&&a%3)||(a+s)%3){if(!((o-=s)>0)){if(s=Math.min(s,s+o+l),Math.min(a,s)%2){var D=e.slice(1,a+r.index+s);return{type:"em",raw:e.slice(0,a+r.index+s+1),text:D,tokens:this.lexer.inlineTokens(D,[])}}var h=e.slice(2,a+r.index+s-1);return{type:"strong",raw:e.slice(0,a+r.index+s+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}}else l+=s}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),u=/^ /.test(n)&&/ $/.test(n);return r&&u&&(n=n.substring(1,n.length-1)),n=m(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}},{key:"autolink",value:function(e,t){var n,r,u=this.rules.inline.autolink.exec(e);if(u)return r="@"===u[2]?"mailto:"+(n=m(this.options.mangle?t(u[1]):u[1])):n=m(u[1]),{type:"link",raw:u[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,u;if("@"===n[2])u="mailto:"+(r=m(this.options.mangle?t(n[0]):n[0]));else{var i;do{i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(i!==n[0]);r=m(n[0]),u="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:u,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):m(r[0]):r[0]:m(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),q={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};q.def=x(q.def).replace("label",q._label).replace("title",q._title).getRegex(),q.bullet=/(?:[*+-]|\d{1,9}[.)])/,q.listItemStart=x(/^( *)(bull) */).replace("bull",q.bullet).getRegex(),q.list=x(q.list).replace(/bull/g,q.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+q.def.source+")").getRegex(),q._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",q._comment=/|$)/,q.html=x(q.html,"i").replace("comment",q._comment).replace("tag",q._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),q.paragraph=x(q._paragraph).replace("hr",q.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",q._tag).getRegex(),q.blockquote=x(q.blockquote).replace("paragraph",q.paragraph).getRegex(),q.normal=S({},q),q.gfm=S({},q.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),q.gfm.table=x(q.gfm.table).replace("hr",q.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",q._tag).getRegex(),q.gfm.paragraph=x(q._paragraph).replace("hr",q.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",q.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",q._tag).getRegex(),q.pedantic=S({},q.normal,{html:x("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",q._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:x(q.normal._paragraph).replace("hr",q.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",q.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var j={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}j._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",j.punctuation=x(j.punctuation).replace(/punctuation/g,j._punctuation).getRegex(),j.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,j.escapedEmSt=/\\\*|\\_/g,j._comment=x(q._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),j.emStrong.lDelim=x(j.emStrong.lDelim).replace(/punct/g,j._punctuation).getRegex(),j.emStrong.rDelimAst=x(j.emStrong.rDelimAst,"g").replace(/punct/g,j._punctuation).getRegex(),j.emStrong.rDelimUnd=x(j.emStrong.rDelimUnd,"g").replace(/punct/g,j._punctuation).getRegex(),j._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,j._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,j._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,j.autolink=x(j.autolink).replace("scheme",j._scheme).replace("email",j._email).getRegex(),j._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,j.tag=x(j.tag).replace("comment",j._comment).replace("attribute",j._attribute).getRegex(),j._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,j._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,j._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,j.link=x(j.link).replace("label",j._label).replace("href",j._href).replace("title",j._title).getRegex(),j.reflink=x(j.reflink).replace("label",j._label).replace("ref",q._label).getRegex(),j.nolink=x(j.nolink).replace("ref",q._label).getRegex(),j.reflinkSearch=x(j.reflinkSearch,"g").replace("reflink",j.reflink).replace("nolink",j.nolink).getRegex(),j.normal=S({},j),j.pedantic=S({},j.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",j._label).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j._label).getRegex()}),j.gfm=S({},j.normal,{escape:x(j.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:i},e,s))&&(e=e.substring(t.raw.length),s.push(t),!0)}))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&s.length>0?s[s.length-1].raw+="\n":s.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),!(n=s[s.length-1])||"paragraph"!==n.type&&"text"!==n.type?s.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),!(n=s[s.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),s.push(t);else if(r=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,n=e.slice(1),u=void 0;i.options.extensions.startBlock.forEach((function(e){"number"==typeof(u=e.call({lexer:this},n))&&u>=0&&(t=Math.min(t,u))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),this.state.top&&(t=this.tokenizer.paragraph(r)))n=s[s.length-1],u&&"paragraph"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):s.push(t),u=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),(n=s[s.length-1])&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):s.push(t);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,s}},{key:"inline",value:function(e,t){this.inlineQueue.push({src:e,tokens:t})}},{key:"inlineTokens",value:function(e){var t,n,r,u,i,s,a=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(u=this.tokenizer.rules.inline.reflinkSearch.exec(l));)c.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,u.index)+"["+R("a",u[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(u=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,u.index)+"["+R("a",u[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(u=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,u.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(i||(s=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:a},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0)}))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),(n=o[o.length-1])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):o.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),(n=o[o.length-1])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):o.push(t);else if(t=this.tokenizer.emStrong(e,l,s))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.autolink(e,P))e=e.substring(t.raw.length),o.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,P))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),u=void 0;a.options.extensions.startInline.forEach((function(e){"number"==typeof(u=e.call({lexer:this},n))&&u>=0&&(t=Math.min(t,u))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Z))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(s=t.raw.slice(-1)),i=!0,(n=o[o.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):o.push(t);else if(e){var D="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(D);break}throw new Error(D)}}else e=e.substring(t.raw.length),o.push(t);return o}}],[{key:"rules",get:function(){return{block:q,inline:j}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),U=function(){function e(t){u(this,e),this.options=t||D}return s(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var u=this.options.highlight(e,r);null!=u&&u!==e&&(n=!0,e=u)}return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:m(e,!0))+"
\n":"
"+(n?e:m(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"
\n"+e+"
\n"}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"}},{key:"hr",value:function(){return this.options.xhtml?"
\n":"
\n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • "+e+"
  • \n"}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    "+e+"

    \n"}},{key:"table",value:function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n"+e+"\n"}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"}},{key:"strong",value:function(e){return""+e+""}},{key:"em",value:function(e){return""+e+""}},{key:"codespan",value:function(e){return""+e+""}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return""+e+""}},{key:"link",value:function(e,t,n){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"}},{key:"image",value:function(e,t,n){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"}},{key:"text",value:function(e){return e}}]),e}(),V=function(){function e(){u(this,e)}return s(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),W=function(){function e(){u(this,e),this.seen={}}return s(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),H=function(){function e(t){u(this,e),this.options=t||D,this.options.renderer=this.options.renderer||new U,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new V,this.slugger=new W}return s(e,[{key:"parse",value:function(e){var t,n,r,u,i,s,a,o,l,c,D,h,p,f,g,d,k,m,A,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],x="",C=e.length;for(t=0;t0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=m+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=m+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:m}):f+=m),f+=this.parse(g.tokens,p),l+=this.renderer.listitem(f,k,d);x+=this.renderer.list(l,D,h);continue;case"html":x+=this.renderer.html(c.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(l=c.tokens?this.parseInline(c.tokens):c.text;t+1An error occurred:

    "+m(o.message+"",!0)+"
    ";throw o}}M.options=M.setOptions=function(e){var t;return S(M.defaults,e),t=M.defaults,D=t,M},M.getDefaults=c,M.defaults=D,M.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+m(r.message+"",!0)+"
    ";throw r}},M.Parser=H,M.parser=H.parse,M.Renderer=U,M.TextRenderer=V,M.Lexer=Q,M.lexer=Q.lex,M.Tokenizer=O,M.Slugger=W,M.parse=M;M.options,M.setOptions,M.use,M.walkTokens,M.parseInline,H.parse,Q.lex}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/0bcce3af.js.gz b/supervisor/api/panel/frontend_es5/0bcce3af.js.gz new file mode 100644 index 000000000..adfb9b507 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/0bcce3af.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/0c3f120a.js b/supervisor/api/panel/frontend_es5/0c3f120a.js new file mode 100644 index 000000000..3e34bf70a --- /dev/null +++ b/supervisor/api/panel/frontend_es5/0c3f120a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[33],{60033:function(e,t,r){r(44577);var n,i,o=r(37500),a=r(63550),s=r(14516),c=r(47181),l=r(58831),u=r(85415),d=r(57066),f=r(57292),p=r(74186),h=r(73826);r(77576);function v(e){return v="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},v(e)}function m(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){m(o,n,i,a,s,"next",e)}function s(e){m(o,n,i,a,s,"throw",e)}a(void 0)}))}}function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=T(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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}}}}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){return w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=C(e);if(t){var i=C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function x(){x=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!S(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n ",'\n ',"\n"])),!!e.area,e.name,e.area)};!function(e,t,r,n){var i=x();if(n)for(var o=0;o0},t}(),M=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=h.getInstance();this.observer_=new O(e,n,this)}return t.prototype.observe=function(t){this.observer_.observe(t)},t.prototype.unobserve=function(t){this.observer_.unobserve(t)},t.prototype.disconnect=function(){this.observer_.disconnect()},t}(),T=void 0!==i.ResizeObserver?i.ResizeObserver:M;e.default=T}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/0ef95294.js.gz b/supervisor/api/panel/frontend_es5/0ef95294.js.gz deleted file mode 100644 index a6109cf51..000000000 Binary files a/supervisor/api/panel/frontend_es5/0ef95294.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/0f16c741.js b/supervisor/api/panel/frontend_es5/0f16c741.js deleted file mode 100644 index 540c21ec3..000000000 --- a/supervisor/api/panel/frontend_es5/0f16c741.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[716],{27716:function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e,i;e=window,i=document,L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"Error: shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),o=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(o,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null},_endPoint:function(t,i,o){if(this._mouseDownOrigin){var n=L.point(t,i).distanceTo(this._mouseDownOrigin),a=this._calculateFinishDistance(o.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(o.latlng),this._finishShape()):a<10&&L.Browser.touch?this._finishShape():Math.abs(n)<9*(e.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var o=this._map.latLngToContainerPoint(i.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),a=this._map.latLngToContainerPoint(n.getLatLng());e=o.distanceTo(a)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,n,a=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),s=this.options.guidelineDistance,r=this.options.maxGuideLineLength,l=a>r?a-r:s;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="
    "+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),i.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(i,"mouseup",this._onMouseUp,this),L.DomEvent.off(i,"touchend",this._onMouseUp,this),i.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(i,"mouseup",this._onMouseUp,this).on(i,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,o=L.Draw.SimpleShape.prototype._getTooltipText.call(this),n=this._shape,a=this.options.showArea;return n&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=a?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:o.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,o=this.options.showRadius,n=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var a="";o&&(a=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,n,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:a})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;et&&(i._index+=e)}))},_createMiddleMarker:function(t,e){var i,o,n,a=this._getMiddleLatLng(t,e),s=this._createMarker(a);s.setOpacity(.6),t._middleRight=e._middleLeft=s,o=function(){s.off("touchmove",o,this);var n=e._index;s._index=n,s.off("click",i,this).on("click",this._onMarkerClick,this),a.lat=s.getLatLng().lat,a.lng=s.getLatLng().lng,this._spliceLatLngs(n,0,a),this._markers.splice(n,0,s),s.setOpacity(1),this._updateIndexes(n,1),e._index++,this._updatePrevNext(t,s),this._updatePrevNext(s,e),this._poly.fire("editstart")},n=function(){s.off("dragstart",o,this),s.off("dragend",n,this),s.off("touchmove",o,this),this._createMiddleMarker(t,s),this._createMiddleMarker(s,e)},i=function(){o.call(this),n.call(this),this._fireEdit()},s.on("click",i,this).on("dragstart",o,this).on("dragend",n,this).on("touchmove",o,this),this._markerGroup.addLayer(s)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),n=i.project(e.getLatLng());return i.unproject(o._add(n)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var o=this._map.mouseEventToContainerPoint(i),n=this._map.mouseEventToLayerPoint(i),a=this._map.layerPointToLatLng(n);this._map.fire(e,{latlng:a,layerPoint:n,containerPoint:o,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var t=e.navigator.userAgent,i=t.indexOf("MSIE ");if(i>0)return parseInt(t.substring(i+5,t.indexOf(".",i)),10);if(t.indexOf("Trident/")>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i0)return parseInt(t.substring(i+5,t.indexOf(".",i)),10);if(t.indexOf("Trident/")>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,o=t.length;i2){for(var s=0;s1&&(i=i+s+r[1])}return i},readableArea:function(i,o,n){var a,s;return n=L.Util.extend({},e,n),o?(s=["ha","m"],type=t(o),"string"===type?s=[o]:"boolean"!==type&&(s=o),a=i>=1e6&&-1!==s.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*i,n.km)+" km²":i>=1e4&&-1!==s.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*i,n.ha)+" ha":L.GeometryUtil.formattedNumber(i,n.m)+" m²"):a=(i/=.836127)>=3097600?L.GeometryUtil.formattedNumber(i/3097600,n.mi)+" mi²":i>=4840?L.GeometryUtil.formattedNumber(i/4840,n.ac)+" acres":L.GeometryUtil.formattedNumber(i,n.yd)+" yd²",a},readableDistance:function(t,i,o,n,a){var s;switch(a=L.Util.extend({},e,a),i?"string"==typeof i?i:"metric":o?"feet":n?"nauticalMile":"yards"){case"metric":s=t>1e3?L.GeometryUtil.formattedNumber(t/1e3,a.km)+" km":L.GeometryUtil.formattedNumber(t,a.m)+" m";break;case"feet":t*=3.28083,s=L.GeometryUtil.formattedNumber(t,a.ft)+" ft";break;case"nauticalMile":t*=.53996,s=L.GeometryUtil.formattedNumber(t/1e3,a.nm)+" nm";break;default:s=(t*=1.09361)>1760?L.GeometryUtil.formattedNumber(t/1760,a.mi)+" miles":L.GeometryUtil.formattedNumber(t,a.yd)+" yd"}return s},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,o=this._getProjectedPoints(),n=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=n-1;t>=3;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),o=i?i.length:0,n=i?i[o-1]:null,a=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(n,t,a,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,o){var n,a,s=this._getProjectedPoints();o=o||0;for(var r=i;r>o;r--)if(n=s[r-1],a=s[r],L.LineUtil.segmentsIntersect(t,e,n,a))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,n=this._toolbarClass||"",a=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?''+t.subtext+"
    ":"")+""+t.text+"",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,o=t.layer||t.target||t;this._backupLayer(o),this.options.poly&&(i=L.Util.extend({},this.options.poly),o.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=o.options.color,e.fillColor=o.options.fillColor),o.options.original=L.extend({},o.options),o.options.editing=e),o instanceof L.Marker?(o.editing&&o.editing.enable(),o.dragging.enable(),o.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):o.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),o=this._map.layerPointToLatLng(i);t.target.setLatLng(o)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/0f16c741.js.gz b/supervisor/api/panel/frontend_es5/0f16c741.js.gz deleted file mode 100644 index 7d8c57717..000000000 Binary files a/supervisor/api/panel/frontend_es5/0f16c741.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/106be44c.js b/supervisor/api/panel/frontend_es5/106be44c.js new file mode 100644 index 000000000..2e26deb81 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/106be44c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[3862],{53862:function(e,t,r){r.r(t),r.d(t,{HaIconSelector:function(){return g}});var n,i=r(37500),o=r(63550),a=r(47181);function s(e){return s="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},s(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function u(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(){h=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!v(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 f=0;f=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\n "],t||(t=e.slice(0)),n=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,this.label,this.value,this.required,this.disabled,this.helper,this.selector.icon.fallbackPath,this.selector.icon.placeholder,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){(0,a.B)(this,"value-changed",{value:e.detail.value})}}]}}),i.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/106be44c.js.gz b/supervisor/api/panel/frontend_es5/106be44c.js.gz new file mode 100644 index 000000000..119e87a1d Binary files /dev/null and b/supervisor/api/panel/frontend_es5/106be44c.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/11665104.js b/supervisor/api/panel/frontend_es5/11665104.js deleted file mode 100644 index 4a5d1868f..000000000 --- a/supervisor/api/panel/frontend_es5/11665104.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[884],{56884:function(e,t,r){r.r(t);var n,i,o,a=r(37500),s=r(63550),c=r(39710),l=(r(93546),r(11654)),f=r(55677);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 u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=b(e);if(t){var i=b(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y(this,r)}}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function w(){w=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!E(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 f=0;f=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\n \n \n "])),this.closeDialog,(0,c.i)(this.hass,this.title),this.content||""):(0,a.dy)(n||(n=u([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return[l.yu,f.l,(0,a.iv)(o||(o=u(["\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n ha-markdown {\n padding: 16px;\n }\n }\n "])))]}}]}}),a.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/11665104.js.gz b/supervisor/api/panel/frontend_es5/11665104.js.gz deleted file mode 100644 index 0e4845fc8..000000000 Binary files a/supervisor/api/panel/frontend_es5/11665104.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/122c4a56.js b/supervisor/api/panel/frontend_es5/122c4a56.js new file mode 100644 index 000000000..3ef174125 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/122c4a56.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4758],{94758:function(e,t,r){var n,i,o,a,s,l=r(37500),c=r(63550),u=r(63864),d=r(12198),f=r(44583);r(32511),r(83927),r(260),r(52039);function p(e){return p="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},p(e)}function h(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g(e);if(t){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b(this,r)}}function b(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(){w=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!P(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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',"\n ","\n "])),this.imageUrl?(0,l.dy)(i||(i=h([''])),this.imageUrl):this.iconPath?(0,l.dy)(o||(o=h(["'])),this.iconPath):"",this.label,this.version?(0,l.dy)(a||(a=h(['(',")"])),this.version):"")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,l.iv)(s||(s=h(["\n :host {\n display: flex;\n align-items: center;\n }\n .label {\n margin-right: 4px;\n }\n .version {\n color: var(--secondary-text-color);\n }\n .icon {\n max-height: 22px;\n max-width: 22px;\n margin-right: 8px;\n }\n "])))}}]}}),l.oi);function G(e){return G="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},G(e)}function J(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){return Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Q(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ue(e);if(t){var i=ue(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Y(this,r)}}function Y(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ee(e)}function ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function te(){te=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ie(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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);rt.name?1:-1}))),this.addons=(this.backup?this.backup.addons:null===(t=this.supervisor)||void 0===t?void 0:t.addon.addons).map((function(e){return{slug:e.slug,name:e.name,version:e.version,checked:!1}})).sort((function(e,t){return e.name>t.name?1:-1})),this.backupType=(null===(n=this.backup)||void 0===n?void 0:n.type)||"full",this.backupName=(null===(i=this.backup)||void 0===i?void 0:i.name)||"",this.backupHasPassword=(null===(o=this.backup)||void 0===o?void 0:o.protected)||!1)}},{kind:"method",key:"focus",value:function(){var e;null===(e=this._focusTarget)||void 0===e||e.focus()}},{kind:"field",key:"_localize",value:function(){var e=this;return function(t){var r;return(null===(r=e.supervisor)||void 0===r?void 0:r.localize("backup.".concat(t)))||e.localize("ui.panel.page-onboarding.restore.".concat(t))}}},{kind:"method",key:"render",value:function(){if(!this.onboarding&&!this.supervisor)return(0,l.dy)(S||(S=J([""])));var e="partial"===this.backupType?this._getSection("folders"):void 0,t="partial"===this.backupType?this._getSection("addons"):void 0;return(0,l.dy)(D||(D=J(["\n ","\n ","\n ","\n ","\n ","\n ","\n "])),this.backup?(0,l.dy)(O||(O=J(['
    \n ',"\n (",")
    \n ","\n
    "])),"full"===this.backup.type?this._localize("full_backup"):this._localize("partial_backup"),Math.ceil(10*this.backup.size)/10+" MB",this.hass?(0,f.o0)(new Date(this.backup.date),this.hass.locale):this.backup.date):(0,l.dy)(z||(z=J(['\n ','\n
    \n
    \n \n ',"\n ","\n ","\n
    "])),!this.backup||this.backup.homeassistant?(0,l.dy)(V||(V=J(["\n \n \n "])),(0,l.dy)(F||(F=J(['\n \n \n
    ',"
    \n "])),(0,l.dy)(I||(I=J(["\n "])),this._localize("folders"),de),this._toggleSection,e.checked,e.indeterminate,"folders",e.templates):"",null!=t&&t.templates.length?(0,l.dy)(L||(L=J(["\n \n ',"
    \n "])),(0,l.dy)(M||(M=J(["\n "])),this._localize("addons"),fe),this._toggleSection,t.checked,t.indeterminate,"addons",t.templates):""):"","partial"!==this.backupType||this.backup&&!this.backupHasPassword?"":(0,l.dy)(B||(B=J(["
    "]))),this.backup?"":(0,l.dy)(Z||(Z=J(['0){for(var e=new Array(arguments.length),t=0;t1&&void 0!==arguments[1]?arguments[1]:2;return Math.round(C*Math.pow(10,A))/Math.pow(10,A)}(C,null==H?void 0:H.maximumFractionDigits).toString()).concat("currency"===(null==H?void 0:H.style)?" ".concat(H.currency):"")},t=function(C,A){var H=Object.assign({maximumFractionDigits:2},A);if("string"!=typeof C)return H;if(!A||!A.minimumFractionDigits&&!A.maximumFractionDigits){var V=C.indexOf(".")>-1?C.split(".")[1].length:0;H.minimumFractionDigits=V,H.maximumFractionDigits=V}return H}},24833:function(C,A,H){H.d(A,{k6:function(){return L},Sk:function(){return t},X4:function(){return M}});H(49706);var V=H(40095);var L=4,n=function(C){return(0,V.f)(C,L)&&"number"==typeof C.in_progress},t=function(C){return function(C){return n(C.attributes)}(C)||!!C.attributes.in_progress},M=function(C){return n(C)||!!C.in_progress}}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/15d3ce0f.js.gz b/supervisor/api/panel/frontend_es5/15d3ce0f.js.gz new file mode 100644 index 000000000..961f780bc Binary files /dev/null and b/supervisor/api/panel/frontend_es5/15d3ce0f.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/1696b026.js b/supervisor/api/panel/frontend_es5/1696b026.js new file mode 100644 index 000000000..d2490080c --- /dev/null +++ b/supervisor/api/panel/frontend_es5/1696b026.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[2914],{92914:function(r,o,e){e.r(o),e.d(o,{defaultKeymap:function(){return t.wQ},lineNumbers:function(){return d.Eu},HighlightStyle:function(){return a.Qf},tags:function(){return a.pJ},history:function(){return m.m8},historyKeymap:function(){return m.f$},rectangularSelection:function(){return u.Z},highlightSelectionMatches:function(){return g.sW},searchKeymap:function(){return g.Lp},EditorState:function(){return i.yy},Prec:function(){return i.Wl},autocompletion:function(){return s.ys},drawSelection:function(){return p.Uw},EditorView:function(){return p.tk},highlightActiveLine:function(){return p.ZO},keymap:function(){return p.$f},langs:function(){return v},langCompartment:function(){return b},readonlyCompartment:function(){return f},tabKeyBindings:function(){return x},theme:function(){return y},highlightStyle:function(){return h}});var t=e(80508),a=e(42484),c=e(17429),n=e(76697),i=e(74075),l=e(67545),p=e(91643),d=e(55987),m=e(74506),u=e(42454),g=e(86315),s=e(75254),v={jinja2:l.i.define(c.b),yaml:l.i.define(n.r)},b=new i.F6,f=new i.F6,x=[{key:"Tab",run:t.at},{key:"Shift-Tab",run:t.xi}],y=p.tk.theme({"&":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--mdc-text-field-fill-color, whitesmoke))","& ::selection":{backgroundColor:"rgba(var(--rgb-primary-color), 0.3)"},borderRadius:"var(--mdc-shape-small, 4px) var(--mdc-shape-small, 4px) 0px 0px",caretColor:"var(--secondary-text-color)",height:"var(--code-mirror-height, auto)",maxHeight:"var(--code-mirror-max-height, unset)"},"&.cm-editor.cm-focused":{outline:"none"},"&.cm-focused .cm-cursor":{borderLeftColor:"var(--secondary-text-color)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{backgroundColor:"rgba(var(--rgb-primary-color), 0.3)"},".cm-activeLine":{backgroundColor:"rgba(var(--rgb-secondary-text-color), 0.1)"},".cm-scroller":{outline:"none"},".cm-content":{caretColor:"var(--secondary-text-color)",paddingTop:"16px"},".cm-panels":{backgroundColor:"var(--primary-background-color)",color:"var(--primary-text-color)"},".cm-panels.top":{borderBottom:"1px solid var(--divider-color)"},".cm-panels.bottom":{borderTop:"1px solid var(--divider-color)"},".cm-button":{border:"1px solid var(--primary-color)",padding:"0px 16px",textTransform:"uppercase",margin:"4px",background:"none",color:"var(--primary-color)",fontFamily:"var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif))",fontSize:"var(--mdc-typography-button-font-size, 0.875rem)",height:"36px",fontWeight:"var(--mdc-typography-button-font-weight, 500)",borderRadius:"4px",letterSpacing:"var(--mdc-typography-button-letter-spacing, 0.0892857em)"},".cm-textfield":{padding:"4px 0px 5px",borderRadius:"0",fontSize:"16px",color:"var(--primary-text-color)",border:"0",background:"none",fontFamily:"Roboto",borderBottom:"1px solid var(--paper-input-container-color, var(--secondary-text-color))",margin:"4px 4px 0","& ::placeholder":{color:"var(--paper-input-container-color, var(--secondary-text-color))"},"&:focus":{outline:"none",borderBottom:"2px solid var(--primary-color)",paddingBottom:"4px"}},".cm-tooltip":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--card-background-color))",border:"1px solid var(--divider-color)",borderRadius:"var(--mdc-shape-medium, 4px)",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%)"},"& .cm-tooltip.cm-tooltip-autocomplete > ul > li":{padding:"4px 8px"},"& .cm-tooltip-autocomplete ul li[aria-selected]":{background:"var(--primary-color)",color:"var(--text-primary-color)"},".cm-completionIcon":{display:"none"},".cm-completionDetail":{fontFamily:"Roboto",color:"var(--secondary-text-color)"},"li[aria-selected] .cm-completionDetail":{color:"var(--text-primary-color)"},"& .cm-completionInfo.cm-completionInfo-right":{left:"calc(100% + 4px)"},"& .cm-tooltip.cm-completionInfo":{padding:"4px 8px",marginTop:"-5px"},".cm-selectionMatch":{backgroundColor:"rgba(var(--rgb-primary-color), 0.1)"},".cm-searchMatch":{backgroundColor:"rgba(var(--rgb-accent-color), .2)",outline:"1px solid rgba(var(--rgb-accent-color), .4)"},".cm-searchMatch.selected":{backgroundColor:"rgba(var(--rgb-accent-color), .4)",outline:"1px solid var(--accent-color)"},".cm-gutters":{backgroundColor:"var(--code-editor-gutter-color, var(--mdc-text-field-fill-color, whitesmoke))",color:"var(--paper-dialog-color, var(--secondary-text-color))",border:"none",borderRight:"1px solid var(--paper-input-container-color, var(--secondary-text-color))",paddingRight:"1px"},"&.cm-focused .cm-gutters":{borderRight:"2px solid var(--paper-input-container-focus-color, var(--primary-color))",paddingRight:"0"},".cm-gutterElement.lineNumber":{color:"inherit"}}),h=a.Qf.define([{tag:a.pJ.keyword,color:"var(--codemirror-keyword, #6262FF)"},{tag:[a.pJ.name,a.pJ.deleted,a.pJ.character,a.pJ.propertyName,a.pJ.macroName],color:"var(--codemirror-property, #905)"},{tag:[a.pJ.function(a.pJ.variableName),a.pJ.labelName],color:"var(--codemirror-variable, #07a)"},{tag:[a.pJ.color,a.pJ.constant(a.pJ.name),a.pJ.standard(a.pJ.name)],color:"var(--codemirror-qualifier, #690)"},{tag:[a.pJ.definition(a.pJ.name),a.pJ.separator],color:"var(--codemirror-def, #8DA6CE)"},{tag:[a.pJ.typeName,a.pJ.className,a.pJ.number,a.pJ.changed,a.pJ.annotation,a.pJ.modifier,a.pJ.self,a.pJ.namespace],color:"var(--codemirror-number, #ca7841)"},{tag:[a.pJ.operator,a.pJ.operatorKeyword,a.pJ.url,a.pJ.escape,a.pJ.regexp,a.pJ.link,a.pJ.special(a.pJ.string)],color:"var(--codemirror-operator, #cda869)"},{tag:a.pJ.comment,color:"var(--codemirror-comment, #777)"},{tag:a.pJ.meta,color:"var(--codemirror-meta, var(--primary-text-color))"},{tag:a.pJ.strong,fontWeight:"bold"},{tag:a.pJ.emphasis,fontStyle:"italic"},{tag:a.pJ.link,color:"var(--primary-color)",textDecoration:"underline"},{tag:a.pJ.heading,fontWeight:"bold"},{tag:a.pJ.atom,color:"var(--codemirror-atom, #F90)"},{tag:a.pJ.bool,color:"var(--codemirror-atom, #F90)"},{tag:a.pJ.special(a.pJ.variableName),color:"var(--codemirror-variable-2, #690)"},{tag:a.pJ.processingInstruction,color:"var(--secondary-text-color)"},{tag:a.pJ.string,color:"var(--codemirror-string, #07a)"},{tag:a.pJ.inserted,color:"var(--codemirror-string2, #07a)"},{tag:a.pJ.invalid,color:"var(--error-color)"}])}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/1696b026.js.gz b/supervisor/api/panel/frontend_es5/1696b026.js.gz new file mode 100644 index 000000000..5575ba607 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/1696b026.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/16aa06d8.js b/supervisor/api/panel/frontend_es5/16aa06d8.js deleted file mode 100644 index 5e69de4ef..000000000 --- a/supervisor/api/panel/frontend_es5/16aa06d8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[639],{71639:function(s){s.exports=[]}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/19929d68.js b/supervisor/api/panel/frontend_es5/19929d68.js deleted file mode 100644 index 90a8cb6bc..000000000 --- a/supervisor/api/panel/frontend_es5/19929d68.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[900],{53822:function(e,t,r){var n,i=r(37500),o=r(63550),a=r(14516),s=r(47181);function l(e,t,r,n,i,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(n,i)}var c,d=function(){var e,t=(e=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n||(n=Promise.all([r.e(42),r.e(914)]).then(r.bind(r,92914))),e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();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){return function(e){if(Array.isArray(e))return j(e)}(e)||x(e)||O(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,r,n,i,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(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){p(o,n,i,a,s,"next",e)}function s(e){p(o,n,i,a,s,"throw",e)}a(void 0)}))}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=D(e);if(t){var i=D(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b(this,r)}}function b(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(){w=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!C(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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);r0&&t.push(this._loadedCodeMirror.autocompletion({override:r,maxRenderedOptions:10}))),this.codemirror=new this._loadedCodeMirror.EditorView({state:this._loadedCodeMirror.EditorState.create({doc:this._value,extensions:t}),root:this.shadowRoot,parent:this.shadowRoot});case 6:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{kind:"field",key:"_getStates",value:function(){return(0,a.Z)((function(e){return e?Object.keys(e).map((function(t){return{type:"variable",label:t,detail:e[t].attributes.friendly_name,info:"State: ".concat(e[t].state)}})):[]}))}},{kind:"method",key:"_entityCompletions",value:function(e){var t=e.matchBefore(/[a-z_]{3,}\.\w*/);if(!t||t.from===t.to&&!e.explicit)return null;var r=this._getStates(this.hass.states);return r&&r.length?{from:Number(t.from),options:r,span:/^[a-z_]{3,}\.\w*$/}:null}},{kind:"field",key:"_getIconItems",value:function(){var e=this;return h(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e._iconList){t.next=9;break}0,n=[],t.next=8;break;case 5:return t.next=7,r.e(639).then(r.t.bind(r,71639,19));case 7:n=t.sent.default;case 8:e._iconList=n.map((function(e){return{type:"variable",label:"mdi:".concat(e.name),detail:e.keywords.join(", "),info:T}}));case 9:return t.abrupt("return",e._iconList);case 10:case"end":return t.stop()}}),t)})))}},{kind:"method",key:"_mdiCompletions",value:(n=h(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=t.matchBefore(/mdi:\S*/))&&(r.from!==r.to||t.explicit)){e.next=3;break}return e.abrupt("return",null);case 3:return e.next=5,this._getIconItems();case 5:return n=e.sent,e.abrupt("return",{from:Number(r.from),options:n,span:/^mdi:\S*$/});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{kind:"method",key:"_blockKeyboardShortcuts",value:function(){this.addEventListener("keydown",(function(e){return e.stopPropagation()}))}},{kind:"method",key:"_onUpdate",value:function(e){if(e.docChanged){var t=this.value;t!==this._value&&(this._value=t,(0,s.B)(this,"value-changed",{value:this._value}))}}},{kind:"get",static:!0,key:"styles",value:function(){return(0,i.iv)(c||(e=["\n :host(.error-state) .cm-gutters {\n border-color: var(--error-state-color, red);\n }\n "],t||(t=e.slice(0)),c=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))));var e,t}}]}}),i.fl)},18900:function(e,t,r){var n,i,o,a=r(77426),s=r(37500),l=r(63550),c=r(47181);r(53822);function d(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=y(e);if(t){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(){v=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!w(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n '])),this.label?(0,s.dy)(o||(o=d(["

    ","","

    "])),this.label,this.required?" *":""):"",this.hass,this._yaml,this.readOnly,!1===this.isValid,this._onChange)}},{kind:"method",key:"_onChange",value:function(e){var t;e.stopPropagation(),this._yaml=e.detail.value;var r=!0;if(this._yaml)try{t=(0,a.zD)(this._yaml,{schema:this.yamlSchema})}catch(n){r=!1}else t={};this.value=t,this.isValid=r,(0,c.B)(this,"value-changed",{value:t,isValid:r})}},{kind:"get",key:"yaml",value:function(){return this._yaml}}]}}),s.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/19929d68.js.gz b/supervisor/api/panel/frontend_es5/19929d68.js.gz deleted file mode 100644 index fbefe612b..000000000 Binary files a/supervisor/api/panel/frontend_es5/19929d68.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/1b81eab3.js b/supervisor/api/panel/frontend_es5/1b81eab3.js new file mode 100644 index 000000000..42c804205 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/1b81eab3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[9713],{58831:function(e,t,r){r.d(t,{M:function(){return n}});var n=function(e){return e.substr(0,e.indexOf("."))}},22311:function(e,t,r){r.d(t,{N:function(){return i}});var n=r(58831),i=function(e){return(0,n.M)(e.entity_id)}},79713:function(e,t,r){r.r(t),r.d(t,{HaDeviceSelector:function(){return ie}});var n,i,o,s,a=r(37500),c=r(63550),l=r(14516),u=r(57292),d=r(74186),f=r(30715),p=r(33855),h=r(73826),v=(r(60033),r(47181));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 m(e){return function(e){if(Array.isArray(e))return F(e)}(e)||I(e)||R(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 b(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){b(o,n,i,s,a,"next",e)}function a(e){b(o,n,i,s,a,"throw",e)}s(void 0)}))}}function w(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_(e);if(t){var i=_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return P(this,r)}}function P(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function S(){S=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!x(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);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 s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n \n \n "])),t.map((function(t){return(0,a.dy)(o||(o=w(["\n
    \n \n
    \n "])),t,e.hass,e.deviceFilter,e.includeDomains,e.excludeDomains,e.includeDeviceClasses,t,e.pickedDeviceLabel,e.disabled,e._deviceChanged)})),this.hass,this.helper,this.deviceFilter,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.pickDeviceLabel,this.disabled,this.required&&!t.length,this._addDevice)}},{kind:"get",key:"_currentDevices",value:function(){return this.value||[]}},{kind:"method",key:"_updateDevices",value:(l=k(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,v.B)(this,"value-changed",{value:t}),this.value=t;case 2:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{kind:"method",key:"_deviceChanged",value:function(e){e.stopPropagation();var t=e.currentTarget.curValue,r=e.detail.value;r!==t&&""===r&&(""===r?this._updateDevices(this._currentDevices.filter((function(e){return e!==t}))):this._updateDevices(this._currentDevices.map((function(e){return e===t?r:e}))))}},{kind:"method",key:"_addDevice",value:(r=k(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),r=t.detail.value,t.currentTarget.value="",r){e.next=5;break}return e.abrupt("return");case 5:if(!(n=this._currentDevices).includes(r)){e.next=8;break}return e.abrupt("return");case 8:this._updateDevices([].concat(m(n),[r]));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{kind:"field",static:!0,key:"styles",value:function(){return(0,a.iv)(s||(s=w(["\n div {\n margin-top: 8px;\n }\n "])))}}]}}),a.oi);function N(e){return N="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},N(e)}function H(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){return U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},U(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ne(e);if(t){var i=ne(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $(this,r)}}function $(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return J(e)}function J(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(){W=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Q(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);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 s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "])),this.label?(0,a.dy)(M||(M=H([""])),this.label):"",this.hass,this.value,this.helper,this._filterDevices,null!==(e=this.selector.device.entity)&&void 0!==e&&e.device_class?[this.selector.device.entity.device_class]:void 0,null!==(t=this.selector.device.entity)&&void 0!==t&&t.domain?[this.selector.device.entity.domain]:void 0,this.disabled,this.required):(0,a.dy)(q||(q=H(["\n \n "])),this.hass,this.value,this.label,this.helper,this._filterDevices,null!==(r=this.selector.device.entity)&&void 0!==r&&r.device_class?[this.selector.device.entity.device_class]:void 0,null!==(n=this.selector.device.entity)&&void 0!==n&&n.domain?[this.selector.device.entity.domain]:void 0,this.disabled,this.required)}},{kind:"field",key:"_filterDevices",value:function(){var e=this;return function(t){var r=e._entitySources&&e._entities?e._deviceIntegrationLookup(e._entitySources,e._entities):void 0;return(0,p.l)(e.selector.device,t,r)}}}]}}),(0,h.f)(a.oi))},30715:function(e,t,r){function n(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}r.d(t,{m:function(){return s}});var i=function(){var e,t=(e=regeneratorRuntime.mark((function e(t,r,n,o,s){var a,c,l,u,d,f,p,h=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a=h.length,c=new Array(a>5?a-5:0),l=5;l=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);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 s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n ','\n ',"\n ","\n"])),e.name,e.slug,e.icon?(0,a.dy)(i||(i=_([''])),e.slug):"")};!function(e,t,r,n){var i=E();if(n)for(var o=0;o=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);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 s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r"])),this.hass,this.value,this.label,this.helper,this.disabled,this.required)}},{kind:"field",static:!0,key:"styles",value:function(){return(0,a.iv)(T||(T=F(["\n ha-addon-picker {\n width: 100%;\n }\n "])))}}]}}),a.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/1f1715bf.js.gz b/supervisor/api/panel/frontend_es5/1f1715bf.js.gz new file mode 100644 index 000000000..24f0106a6 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/1f1715bf.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/1fde03cf.js b/supervisor/api/panel/frontend_es5/1fde03cf.js new file mode 100644 index 000000000..c07ef6473 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/1fde03cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6647],{46647:function(e,t,r){r(44577);var n,i=r(37500),o=r(63550),a=r(14516),s=r(47181),c=r(58831),l=r(91741),u=r(85415),d=(r(77576),r(66255),r(52039),r(51346)),f=r(70483),V=r(56007),H=r(22311);var C,p,h=(0,i.iv)(n||(C=['\n ha-state-icon[data-domain="alert"][data-state="on"],\n ha-state-icon[data-domain="automation"][data-state="on"],\n ha-state-icon[data-domain="binary_sensor"][data-state="on"],\n ha-state-icon[data-domain="calendar"][data-state="on"],\n ha-state-icon[data-domain="camera"][data-state="streaming"],\n ha-state-icon[data-domain="cover"][data-state="open"],\n ha-state-icon[data-domain="device_tracker"][data-state="home"],\n ha-state-icon[data-domain="fan"][data-state="on"],\n ha-state-icon[data-domain="humidifier"][data-state="on"],\n ha-state-icon[data-domain="light"][data-state="on"],\n ha-state-icon[data-domain="input_boolean"][data-state="on"],\n ha-state-icon[data-domain="lock"][data-state="unlocked"],\n ha-state-icon[data-domain="media_player"][data-state="on"],\n ha-state-icon[data-domain="media_player"][data-state="paused"],\n ha-state-icon[data-domain="media_player"][data-state="playing"],\n ha-state-icon[data-domain="remote"][data-state="on"],\n ha-state-icon[data-domain="script"][data-state="on"],\n ha-state-icon[data-domain="sun"][data-state="above_horizon"],\n ha-state-icon[data-domain="switch"][data-state="on"],\n ha-state-icon[data-domain="timer"][data-state="active"],\n ha-state-icon[data-domain="vacuum"][data-state="cleaning"],\n ha-state-icon[data-domain="group"][data-state="on"],\n ha-state-icon[data-domain="group"][data-state="home"],\n ha-state-icon[data-domain="group"][data-state="open"],\n ha-state-icon[data-domain="group"][data-state="locked"],\n ha-state-icon[data-domain="group"][data-state="problem"] {\n color: var(--paper-item-icon-active-color, #fdd835);\n }\n\n ha-state-icon[data-domain="climate"][data-state="cooling"] {\n color: var(--cool-color, var(--state-climate-cool-color));\n }\n\n ha-state-icon[data-domain="climate"][data-state="heating"] {\n color: var(--heat-color, var(--state-climate-heat-color));\n }\n\n ha-state-icon[data-domain="climate"][data-state="drying"] {\n color: var(--dry-color, var(--state-climate-dry-color));\n }\n\n ha-state-icon[data-domain="alarm_control_panel"] {\n color: var(--alarm-color-armed, var(--label-badge-red));\n }\n ha-state-icon[data-domain="alarm_control_panel"][data-state="disarmed"] {\n color: var(--alarm-color-disarmed, var(--label-badge-green));\n }\n ha-state-icon[data-domain="alarm_control_panel"][data-state="pending"],\n ha-state-icon[data-domain="alarm_control_panel"][data-state="arming"] {\n color: var(--alarm-color-pending, var(--label-badge-yellow));\n animation: pulse 1s infinite;\n }\n ha-state-icon[data-domain="alarm_control_panel"][data-state="triggered"] {\n color: var(--alarm-color-triggered, var(--label-badge-red));\n animation: pulse 1s infinite;\n }\n\n @keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n ha-state-icon[data-domain="plant"][data-state="problem"] {\n color: var(--state-icon-error-color);\n }\n\n /* Color the icon if unavailable */\n ha-state-icon[data-state="unavailable"] {\n color: var(--state-unavailable-color);\n }\n'],p||(p=C.slice(0)),n=Object.freeze(Object.defineProperties(C,{raw:{value:Object.freeze(p)}}))));r(22814);var m,L=function(e,t,r){return"".concat(e,"&width=").concat(t,"&height=").concat(r)},y=r(49706),A=r(24833);r(98291);function v(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var M,b,g="M3,15H13A1,1 0 0,1 14,16A1,1 0 0,1 13,17H3A1,1 0 0,1 2,16A1,1 0 0,1 3,15M16,15H21A1,1 0 0,1 22,16A1,1 0 0,1 21,17H16A1,1 0 0,1 15,16A1,1 0 0,1 16,15M1,12A5,5 0 0,1 6,7C7,4.65 9.3,3 12,3C15.43,3 18.24,5.66 18.5,9.03L19,9C21.19,9 22.97,10.76 23,13H21A2,2 0 0,0 19,11H17V10A5,5 0 0,0 12,5C9.5,5 7.45,6.82 7.06,9.19C6.73,9.07 6.37,9 6,9A3,3 0 0,0 3,12C3,12.35 3.06,12.69 3.17,13H1.1L1,12M3,19H5A1,1 0 0,1 6,20A1,1 0 0,1 5,21H3A1,1 0 0,1 2,20A1,1 0 0,1 3,19M8,19H21A1,1 0 0,1 22,20A1,1 0 0,1 21,21H8A1,1 0 0,1 7,20A1,1 0 0,1 8,19Z",w="M6,14.03A1,1 0 0,1 7,15.03C7,15.58 6.55,16.03 6,16.03C3.24,16.03 1,13.79 1,11.03C1,8.27 3.24,6.03 6,6.03C7,3.68 9.3,2.03 12,2.03C15.43,2.03 18.24,4.69 18.5,8.06L19,8.03A4,4 0 0,1 23,12.03C23,14.23 21.21,16.03 19,16.03H18C17.45,16.03 17,15.58 17,15.03C17,14.47 17.45,14.03 18,14.03H19A2,2 0 0,0 21,12.03A2,2 0 0,0 19,10.03H17V9.03C17,6.27 14.76,4.03 12,4.03C9.5,4.03 7.45,5.84 7.06,8.21C6.73,8.09 6.37,8.03 6,8.03A3,3 0 0,0 3,11.03A3,3 0 0,0 6,14.03M12,14.15C12.18,14.39 12.37,14.66 12.56,14.94C13,15.56 14,17.03 14,18C14,19.11 13.1,20 12,20A2,2 0 0,1 10,18C10,17.03 11,15.56 11.44,14.94C11.63,14.66 11.82,14.4 12,14.15M12,11.03L11.5,11.59C11.5,11.59 10.65,12.55 9.79,13.81C8.93,15.06 8,16.56 8,18A4,4 0 0,0 12,22A4,4 0 0,0 16,18C16,16.56 15.07,15.06 14.21,13.81C13.35,12.55 12.5,11.59 12.5,11.59",k="M4,10A1,1 0 0,1 3,9A1,1 0 0,1 4,8H12A2,2 0 0,0 14,6A2,2 0 0,0 12,4C11.45,4 10.95,4.22 10.59,4.59C10.2,5 9.56,5 9.17,4.59C8.78,4.2 8.78,3.56 9.17,3.17C9.9,2.45 10.9,2 12,2A4,4 0 0,1 16,6A4,4 0 0,1 12,10H4M19,12A1,1 0 0,0 20,11A1,1 0 0,0 19,10C18.72,10 18.47,10.11 18.29,10.29C17.9,10.68 17.27,10.68 16.88,10.29C16.5,9.9 16.5,9.27 16.88,8.88C17.42,8.34 18.17,8 19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14H5A1,1 0 0,1 4,13A1,1 0 0,1 5,12H19M18,18H4A1,1 0 0,1 3,17A1,1 0 0,1 4,16H18A3,3 0 0,1 21,19A3,3 0 0,1 18,22C17.17,22 16.42,21.66 15.88,21.12C15.5,20.73 15.5,20.1 15.88,19.71C16.27,19.32 16.9,19.32 17.29,19.71C17.47,19.89 17.72,20 18,20A1,1 0 0,0 19,19A1,1 0 0,0 18,18Z",_=(new Set(["clear-night","cloudy","fog","lightning","lightning-rainy","partlycloudy","pouring","rainy","hail","snowy","snowy-rainy","sunny","windy","windy-variant"]),{"clear-night":"M17.75,4.09L15.22,6.03L16.13,9.09L13.5,7.28L10.87,9.09L11.78,6.03L9.25,4.09L12.44,4L13.5,1L14.56,4L17.75,4.09M21.25,11L19.61,12.25L20.2,14.23L18.5,13.06L16.8,14.23L17.39,12.25L15.75,11L17.81,10.95L18.5,9L19.19,10.95L21.25,11M18.97,15.95C19.8,15.87 20.69,17.05 20.16,17.8C19.84,18.25 19.5,18.67 19.08,19.07C15.17,23 8.84,23 4.94,19.07C1.03,15.17 1.03,8.83 4.94,4.93C5.34,4.53 5.76,4.17 6.21,3.85C6.96,3.32 8.14,4.21 8.06,5.04C7.79,7.9 8.75,10.87 10.95,13.06C13.14,15.26 16.1,16.22 18.97,15.95M17.33,17.97C14.5,17.81 11.7,16.64 9.53,14.5C7.36,12.31 6.2,9.5 6.04,6.68C3.23,9.82 3.34,14.64 6.35,17.66C9.37,20.67 14.19,20.78 17.33,17.97Z",cloudy:"M6,19A5,5 0 0,1 1,14A5,5 0 0,1 6,9C7,6.65 9.3,5 12,5C15.43,5 18.24,7.66 18.5,11.03L19,11A4,4 0 0,1 23,15A4,4 0 0,1 19,19H6M19,13H17V12A5,5 0 0,0 12,7C9.5,7 7.45,8.82 7.06,11.19C6.73,11.07 6.37,11 6,11A3,3 0 0,0 3,14A3,3 0 0,0 6,17H19A2,2 0 0,0 21,15A2,2 0 0,0 19,13Z",exceptional:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",fog:g,hail:"M6,14A1,1 0 0,1 7,15A1,1 0 0,1 6,16A5,5 0 0,1 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16H18A1,1 0 0,1 17,15A1,1 0 0,1 18,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11A3,3 0 0,0 6,14M10,18A2,2 0 0,1 12,20A2,2 0 0,1 10,22A2,2 0 0,1 8,20A2,2 0 0,1 10,18M14.5,16A1.5,1.5 0 0,1 16,17.5A1.5,1.5 0 0,1 14.5,19A1.5,1.5 0 0,1 13,17.5A1.5,1.5 0 0,1 14.5,16M10.5,12A1.5,1.5 0 0,1 12,13.5A1.5,1.5 0 0,1 10.5,15A1.5,1.5 0 0,1 9,13.5A1.5,1.5 0 0,1 10.5,12Z",lightning:"M6,16A5,5 0 0,1 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16H18A1,1 0 0,1 17,15A1,1 0 0,1 18,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11A3,3 0 0,0 6,14H7A1,1 0 0,1 8,15A1,1 0 0,1 7,16H6M12,11H15L13,15H15L11.25,22L12,17H9.5L12,11Z","lightning-rainy":"M4.5,13.59C5,13.87 5.14,14.5 4.87,14.96C4.59,15.44 4,15.6 3.5,15.33V15.33C2,14.47 1,12.85 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16A1,1 0 0,1 18,15A1,1 0 0,1 19,14A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11C3,12.11 3.6,13.08 4.5,13.6V13.59M9.5,11H12.5L10.5,15H12.5L8.75,22L9.5,17H7L9.5,11M17.5,18.67C17.5,19.96 16.5,21 15.25,21C14,21 13,19.96 13,18.67C13,17.12 15.25,14.5 15.25,14.5C15.25,14.5 17.5,17.12 17.5,18.67Z",partlycloudy:"M12.74,5.47C15.1,6.5 16.35,9.03 15.92,11.46C17.19,12.56 18,14.19 18,16V16.17C18.31,16.06 18.65,16 19,16A3,3 0 0,1 22,19A3,3 0 0,1 19,22H6A4,4 0 0,1 2,18A4,4 0 0,1 6,14H6.27C5,12.45 4.6,10.24 5.5,8.26C6.72,5.5 9.97,4.24 12.74,5.47M11.93,7.3C10.16,6.5 8.09,7.31 7.31,9.07C6.85,10.09 6.93,11.22 7.41,12.13C8.5,10.83 10.16,10 12,10C12.7,10 13.38,10.12 14,10.34C13.94,9.06 13.18,7.86 11.93,7.3M13.55,3.64C13,3.4 12.45,3.23 11.88,3.12L14.37,1.82L15.27,4.71C14.76,4.29 14.19,3.93 13.55,3.64M6.09,4.44C5.6,4.79 5.17,5.19 4.8,5.63L4.91,2.82L7.87,3.5C7.25,3.71 6.65,4.03 6.09,4.44M18,9.71C17.91,9.12 17.78,8.55 17.59,8L19.97,9.5L17.92,11.73C18.03,11.08 18.05,10.4 18,9.71M3.04,11.3C3.11,11.9 3.24,12.47 3.43,13L1.06,11.5L3.1,9.28C3,9.93 2.97,10.61 3.04,11.3M19,18H16V16A4,4 0 0,0 12,12A4,4 0 0,0 8,16H6A2,2 0 0,0 4,18A2,2 0 0,0 6,20H19A1,1 0 0,0 20,19A1,1 0 0,0 19,18Z",pouring:"M9,12C9.53,12.14 9.85,12.69 9.71,13.22L8.41,18.05C8.27,18.59 7.72,18.9 7.19,18.76C6.65,18.62 6.34,18.07 6.5,17.54L7.78,12.71C7.92,12.17 8.47,11.86 9,12M13,12C13.53,12.14 13.85,12.69 13.71,13.22L11.64,20.95C11.5,21.5 10.95,21.8 10.41,21.66C9.88,21.5 9.56,20.97 9.7,20.43L11.78,12.71C11.92,12.17 12.47,11.86 13,12M17,12C17.53,12.14 17.85,12.69 17.71,13.22L16.41,18.05C16.27,18.59 15.72,18.9 15.19,18.76C14.65,18.62 14.34,18.07 14.5,17.54L15.78,12.71C15.92,12.17 16.47,11.86 17,12M17,10V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11C3,12.11 3.6,13.08 4.5,13.6V13.59C5,13.87 5.14,14.5 4.87,14.96C4.59,15.43 4,15.6 3.5,15.32V15.33C2,14.47 1,12.85 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12C23,13.5 22.2,14.77 21,15.46V15.46C20.5,15.73 19.91,15.57 19.63,15.09C19.36,14.61 19.5,14 20,13.72V13.73C20.6,13.39 21,12.74 21,12A2,2 0 0,0 19,10H17Z",rainy:w,snowy:"M6,14A1,1 0 0,1 7,15A1,1 0 0,1 6,16A5,5 0 0,1 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16H18A1,1 0 0,1 17,15A1,1 0 0,1 18,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11A3,3 0 0,0 6,14M7.88,18.07L10.07,17.5L8.46,15.88C8.07,15.5 8.07,14.86 8.46,14.46C8.85,14.07 9.5,14.07 9.88,14.46L11.5,16.07L12.07,13.88C12.21,13.34 12.76,13.03 13.29,13.17C13.83,13.31 14.14,13.86 14,14.4L13.41,16.59L15.6,16C16.14,15.86 16.69,16.17 16.83,16.71C16.97,17.24 16.66,17.79 16.12,17.93L13.93,18.5L15.54,20.12C15.93,20.5 15.93,21.15 15.54,21.54C15.15,21.93 14.5,21.93 14.12,21.54L12.5,19.93L11.93,22.12C11.79,22.66 11.24,22.97 10.71,22.83C10.17,22.69 9.86,22.14 10,21.6L10.59,19.41L8.4,20C7.86,20.14 7.31,19.83 7.17,19.29C7.03,18.76 7.34,18.21 7.88,18.07Z","snowy-rainy":"M18.5,18.67C18.5,19.96 17.5,21 16.25,21C15,21 14,19.96 14,18.67C14,17.12 16.25,14.5 16.25,14.5C16.25,14.5 18.5,17.12 18.5,18.67M4,17.36C3.86,16.82 4.18,16.25 4.73,16.11L7,15.5L5.33,13.86C4.93,13.46 4.93,12.81 5.33,12.4C5.73,12 6.4,12 6.79,12.4L8.45,14.05L9.04,11.8C9.18,11.24 9.75,10.92 10.29,11.07C10.85,11.21 11.17,11.78 11,12.33L10.42,14.58L12.67,14C13.22,13.83 13.79,14.15 13.93,14.71C14.08,15.25 13.76,15.82 13.2,15.96L10.95,16.55L12.6,18.21C13,18.6 13,19.27 12.6,19.67C12.2,20.07 11.54,20.07 11.15,19.67L9.5,18L8.89,20.27C8.75,20.83 8.18,21.14 7.64,21C7.08,20.86 6.77,20.29 6.91,19.74L7.5,17.5L5.26,18.09C4.71,18.23 4.14,17.92 4,17.36M1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16A1,1 0 0,1 18,15A1,1 0 0,1 19,14A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11C3,11.85 3.35,12.61 3.91,13.16C4.27,13.55 4.26,14.16 3.88,14.54C3.5,14.93 2.85,14.93 2.47,14.54C1.56,13.63 1,12.38 1,11Z",sunny:"M12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,2L14.39,5.42C13.65,5.15 12.84,5 12,5C11.16,5 10.35,5.15 9.61,5.42L12,2M3.34,7L7.5,6.65C6.9,7.16 6.36,7.78 5.94,8.5C5.5,9.24 5.25,10 5.11,10.79L3.34,7M3.36,17L5.12,13.23C5.26,14 5.53,14.78 5.95,15.5C6.37,16.24 6.91,16.86 7.5,17.37L3.36,17M20.65,7L18.88,10.79C18.74,10 18.47,9.23 18.05,8.5C17.63,7.78 17.1,7.15 16.5,6.64L20.65,7M20.64,17L16.5,17.36C17.09,16.85 17.62,16.22 18.04,15.5C18.46,14.77 18.73,14 18.87,13.21L20.64,17M12,22L9.59,18.56C10.33,18.83 11.14,19 12,19C12.82,19 13.63,18.83 14.37,18.56L12,22Z",windy:k,"windy-variant":"M6,6L6.69,6.06C7.32,3.72 9.46,2 12,2A5.5,5.5 0 0,1 17.5,7.5L17.42,8.45C17.88,8.16 18.42,8 19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14H6A4,4 0 0,1 2,10A4,4 0 0,1 6,6M6,8A2,2 0 0,0 4,10A2,2 0 0,0 6,12H19A1,1 0 0,0 20,11A1,1 0 0,0 19,10H15.5V7.5A3.5,3.5 0 0,0 12,4A3.5,3.5 0 0,0 8.5,7.5V8H6M18,18H4A1,1 0 0,1 3,17A1,1 0 0,1 4,16H18A3,3 0 0,1 21,19A3,3 0 0,1 18,22C17.17,22 16.42,21.66 15.88,21.12C15.5,20.73 15.5,20.1 15.88,19.71C16.27,19.32 16.9,19.32 17.29,19.71C17.47,19.89 17.72,20 18,20A1,1 0 0,0 19,19A1,1 0 0,0 18,18Z"}),E=(new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),new Set(["hail","rainy","pouring"]),new Set(["windy","windy-variant"]),new Set(["snowy","snowy-rainy"]),new Set(["lightning","lightning-rainy"]),(0,i.iv)(m||(m=v(["\n .rain {\n fill: var(--weather-icon-rain-color, #30b3ff);\n }\n .sun {\n fill: var(--weather-icon-sun-color, #fdd93c);\n }\n .moon {\n fill: var(--weather-icon-moon-color, #fcf497);\n }\n .cloud-back {\n fill: var(--weather-icon-cloud-back-color, #d4d4d4);\n }\n .cloud-front {\n fill: var(--weather-icon-cloud-front-color, #f9f9f9);\n }\n"]))),"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z"),Z="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z",S="M12 5.69L17 10.19V18H15V12H9V18H7V10.19L12 5.69M12 3L2 12H5V20H11V14H13V20H19V12H22",P="M16,7V3H14V7H10V3H8V7H8C7,7 6,8 6,9V14.5L9.5,18V21H14.5V18L18,14.5V9C18,8 17,7 16,7Z",O="M20.84 22.73L15.31 17.2L14.5 18V21H9.5V18L6 14.5V9C6 8.7 6.1 8.41 6.25 8.14L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M18 14.5V9C18 8 17 7 16 7V3H14V7H10.2L17.85 14.65L18 14.5M10 3H8V4.8L10 6.8V3Z",j="M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z",x="M21,19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19C20.11,3 21,3.9 21,5V19M13,18V9.5L16.5,13L17.92,11.58L12,5.66L6.08,11.58L7.5,13L11,9.5V18H13Z",D="M3,5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5M11,6V14.5L7.5,11L6.08,12.42L12,18.34L17.92,12.42L16.5,11L13,14.5V6H11Z",T="M6,11H10V9H14V11H18V4H6V11M18,13H6V20H18V13M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z",z="M6,8H10V6H14V8H18V4H6V8M18,10H6V15H18V10M6,20H18V17H6V20M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z",I="M13,20V4H15.03V20H13M10,20V4H12.03V20H10M5,8L9.03,12L5,16V13H2V11H5V8M20,16L16,12L20,8V11H23V13H20V16Z",R="M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",F={10:"M16,18H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",20:"M16,17H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",30:"M16,15H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",40:"M16,14H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",50:"M16,13H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",60:"M16,12H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",70:"M16,10H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",80:"M16,9H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",90:"M16,8H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",100:R},B={10:"M23.05,11H20.05V4L15.05,14H18.05V22M12,18H4L4.05,6H12.05M12.72,4H11.05V2H5.05V4H3.38A1.33,1.33 0 0,0 2.05,5.33V20.67C2.05,21.4 2.65,22 3.38,22H12.72C13.45,22 14.05,21.4 14.05,20.67V5.33A1.33,1.33 0 0,0 12.72,4Z",20:"M23.05,11H20.05V4L15.05,14H18.05V22M12.05,17H4.05V6H12.05M12.72,4H11.05V2H5.05V4H3.38A1.33,1.33 0 0,0 2.05,5.33V20.67C2.05,21.4 2.65,22 3.38,22H12.72C13.45,22 14.05,21.4 14.05,20.67V5.33A1.33,1.33 0 0,0 12.72,4Z",30:"M12,15H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4M23,11H20V4L15,14H18V22L23,11Z",40:"M13 4H11V2H5V4H3C2.4 4 2 4.4 2 5V21C2 21.6 2.4 22 3 22H13C13.6 22 14 21.6 14 21V5C14 4.4 13.6 4 13 4M12 14.5H4V6H12V14.5M23 11H20V4L15 14H18V22",50:"M23,11H20V4L15,14H18V22M12,13H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z",60:"M12,11H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4M23,11H20V4L15,14H18V22L23,11Z",70:"M12,10H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4M23,11H20V4L15,14H18V22L23,11Z",80:"M23,11H20V4L15,14H18V22M12,9H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z",90:"M23,11H20V4L15,14H18V22M12,8H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z",100:"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.66C6,21.4 6.6,22 7.33,22H16.66C17.4,22 18,21.4 18,20.67V5.33C18,4.6 17.4,4 16.67,4M11,20V14.5H9L13,7V12.5H15"},U=function(e,t){var r=Number(e);if(isNaN(r))return"off"===e?R:"on"===e?"M13 14H11V8H13M13 18H11V16H13M16.7 4H15V2H9V4H7.3C6.6 4 6 4.6 6 5.3V20.6C6 21.4 6.6 22 7.3 22H16.6C17.3 22 17.9 21.4 17.9 20.7V5.3C18 4.6 17.4 4 16.7 4Z":"M15.07,12.25L14.17,13.17C13.63,13.71 13.25,14.18 13.09,15H11.05C11.16,14.1 11.56,13.28 12.17,12.67L13.41,11.41C13.78,11.05 14,10.55 14,10C14,8.89 13.1,8 12,8A2,2 0 0,0 10,10H8A4,4 0 0,1 12,6A4,4 0 0,1 16,10C16,10.88 15.64,11.68 15.07,12.25M13,19H11V17H13M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.66C6,21.4 6.6,22 7.33,22H16.67C17.4,22 18,21.4 18,20.66V5.33C18,4.59 17.4,4 16.67,4Z";var n=10*Math.round(r/10);return t&&r>=10?B[n]:t?"M23.05,11H20.05V4L15.05,14H18.05V22M12,20H4L4.05,6H12.05M12.72,4H11.05V2H5.05V4H3.38A1.33,1.33 0 0,0 2.05,5.33V20.67C2.05,21.4 2.65,22 3.38,22H12.72C13.45,22 14.05,21.4 14.05,20.67V5.33A1.33,1.33 0 0,0 12.72,4Z":r<=5?"M14 20H6V6H14M14.67 4H13V2H7V4H5.33C4.6 4 4 4.6 4 5.33V20.67C4 21.4 4.6 22 5.33 22H14.67C15.4 22 16 21.4 16 20.67V5.33C16 4.6 15.4 4 14.67 4M21 7H19V13H21V8M21 15H19V17H21V15Z":F[n]},N=function(e){var t,r,n,i=null==e?void 0:e.attributes.device_class;if(i&&i in y.h2)return y.h2[i];if("battery"===i)return e?(r=e.state,n=t&&"on"===t.state,U(r,n)):"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z";var o=null==e?void 0:e.attributes.unit_of_measurement;return o===y.ot||o===y.gD?"M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z":void 0},q="M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M5.12,5H18.87L17.93,4H5.93L5.12,5M12,9.5L6.5,15H10V17H14V15H17.5L12,9.5Z",$="M18.4 1.6C18 1.2 17.5 1 17 1H7C6.5 1 6 1.2 5.6 1.6C5.2 2 5 2.5 5 3V21C5 21.5 5.2 22 5.6 22.4C6 22.8 6.5 23 7 23H17C17.5 23 18 22.8 18.4 22.4C18.8 22 19 21.5 19 21V3C19 2.5 18.8 2 18.4 1.6M16 7C16 7.6 15.6 8 15 8H9C8.4 8 8 7.6 8 7V5C8 4.4 8.4 4 9 4H15C15.6 4 16 4.4 16 5V7Z",G=function(e,t,r){var n=void 0!==r?r:null==t?void 0:t.state;switch(e){case"alarm_control_panel":return function(e){switch(e){case"armed_away":return"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1M12,7C13.4,7 14.8,8.1 14.8,9.5V11C15.4,11 16,11.6 16,12.3V15.8C16,16.4 15.4,17 14.7,17H9.2C8.6,17 8,16.4 8,15.7V12.2C8,11.6 8.6,11 9.2,11V9.5C9.2,8.1 10.6,7 12,7M12,8.2C11.2,8.2 10.5,8.7 10.5,9.5V11H13.5V9.5C13.5,8.7 12.8,8.2 12,8.2Z";case"armed_vacation":return"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1M12,5.68C12.5,5.68 12.95,6.11 12.95,6.63V10.11L18,13.26V14.53L12.95,12.95V16.42L14.21,17.37V18.32L12,17.68L9.79,18.32V17.37L11.05,16.42V12.95L6,14.53V13.26L11.05,10.11V6.63C11.05,6.11 11.5,5.68 12,5.68Z";case"armed_home":return"M11,13H13V16H16V11H18L12,6L6,11H8V16H11V13M12,1L21,5V11C21,16.55 17.16,21.74 12,23C6.84,21.74 3,16.55 3,11V5L12,1Z";case"armed_night":return"M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1M15.97 14.41C14.13 16.58 10.76 16.5 9 14.34C6.82 11.62 8.36 7.62 11.7 7C12.04 6.95 12.33 7.28 12.21 7.61C11.75 8.84 11.82 10.25 12.53 11.47C13.24 12.69 14.42 13.46 15.71 13.67C16.05 13.72 16.2 14.14 15.97 14.41Z";case"armed_custom_bypass":return"M12,12H19C18.47,16.11 15.72,19.78 12,20.92V12H5V6.3L12,3.19M12,1L3,5V11C3,16.55 6.84,21.73 12,23C17.16,21.73 21,16.55 21,11V5L12,1Z";case"pending":return"M21,11C21,16.55 17.16,21.74 12,23C6.84,21.74 3,16.55 3,11V5L12,1L21,5V11M12,21C15.75,20 19,15.54 19,11.22V6.3L12,3.18L5,6.3V11.22C5,15.54 8.25,20 12,21Z";case"triggered":return"M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21M19.75,3.19L18.33,4.61C20.04,6.3 21,8.6 21,11H23C23,8.07 21.84,5.25 19.75,3.19M1,11H3C3,8.6 3.96,6.3 5.67,4.61L4.25,3.19C2.16,5.25 1,8.07 1,11Z";case"disarmed":return"M1,4.27L2.28,3L20.5,21.22L19.23,22.5L17,20.25C15.57,21.57 13.87,22.54 12,23C6.84,21.74 3,16.55 3,11V6.27L1,4.27M12,1L21,5V11C21,13.28 20.35,15.5 19.23,17.41L5.65,3.82L12,1Z";default:return"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1Z"}}(n);case"binary_sensor":return function(e,t){var r="off"===e;switch(null==t?void 0:t.attributes.device_class){case"battery":return r?E:"M16,20H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z";case"battery_charging":return r?E:"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.66C6,21.4 6.6,22 7.33,22H16.66C17.4,22 18,21.4 18,20.67V5.33C18,4.6 17.4,4 16.67,4M11,20V14.5H9L13,7V12.5H15";case"carbon_monoxide":return r?"M12,18A6,6 0 0,0 18,12C18,8.68 15.31,6 12,6C8.68,6 6,8.68 6,12A6,6 0 0,0 12,18M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H19M8,12A4,4 0 0,1 12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12Z":"M10 18C13.3 18 16 15.3 16 12C16 8.7 13.3 6 10 6C6.7 6 4 8.7 4 12C4 15.3 6.7 18 10 18M17 3C18.1 3 19 3.9 19 5V19C19 20.1 18.1 21 17 21H3C1.9 21 1 20.1 1 19V5C1 3.9 1.9 3 3 3H17M6 12C6 9.8 7.8 8 10 8S14 9.8 14 12 12.2 16 10 16 6 14.2 6 12M23 7H21V13H23V8M23 15H21V17H23V15Z";case"cold":return r?j:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z";case"connectivity":return r?"M15,20A1,1 0 0,0 14,19H13V17H17A2,2 0 0,0 19,15V5A2,2 0 0,0 17,3H7A2,2 0 0,0 5,5V15A2,2 0 0,0 7,17H11V19H10A1,1 0 0,0 9,20H2V22H9A1,1 0 0,0 10,23H14A1,1 0 0,0 15,22H22V20H15M7,15V5H17V15H7M15.54,12.12L13.41,10L15.53,7.87L14.12,6.46L12,8.59L9.88,6.46L8.47,7.87L10.59,10L8.47,12.13L9.88,13.54L12,11.41L14.12,13.54L15.54,12.12Z":"M15,20A1,1 0 0,0 14,19H13V17H17A2,2 0 0,0 19,15V5A2,2 0 0,0 17,3H7A2,2 0 0,0 5,5V15A2,2 0 0,0 7,17H11V19H10A1,1 0 0,0 9,20H2V22H9A1,1 0 0,0 10,23H14A1,1 0 0,0 15,22H22V20H15M7,15V5H17V15H7M8,10.37L9.24,9.13L10.93,10.83L14.76,7L16,8.5L10.93,13.57L8,10.37Z";case"door":return r?"M16,11H18V13H16V11M12,3H19C20.11,3 21,3.89 21,5V19H22V21H2V19H10V5C10,3.89 10.89,3 12,3M12,5V19H19V5H12Z":"M12,3C10.89,3 10,3.89 10,5H3V19H2V21H22V19H21V5C21,3.89 20.11,3 19,3H12M12,5H19V19H12V5M5,11H7V13H5V11Z";case"garage_door":return r?"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12M8,15H16V17H8V15M16,18V20H8V18H16Z":"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12Z";case"power":case"plug":return r?O:P;case"gas":case"problem":case"safety":case"tamper":return r?"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z":"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";case"smoke":return r?"M12 4C16.41 4 20 7.59 20 12S16.41 20 12 20 4 16.41 4 12 7.59 4 12 4M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 11C11.45 11 11 11.45 11 12S11.45 13 12 13 13 12.55 13 12 12.55 11 12 11M10.72 9.3C11.11 9.11 11.54 9 12 9S12.89 9.11 13.29 9.3L14 8.57C13.43 8.22 12.74 8 12 8S10.58 8.22 10 8.57L10.72 9.3M15 12C15 12.46 14.89 12.89 14.7 13.29L15.43 14C15.79 13.43 16 12.74 16 12S15.79 10.58 15.43 10L14.7 10.72C14.89 11.11 15 11.54 15 12M9 12C9 11.54 9.11 11.11 9.3 10.72L8.57 10C8.22 10.58 8 11.26 8 12S8.22 13.43 8.57 14L9.3 13.29C9.11 12.89 9 12.46 9 12M13.29 14.7C12.89 14.89 12.46 15 12 15S11.11 14.89 10.72 14.7L10 15.43C10.58 15.79 11.26 16 12 16S13.43 15.79 14 15.43L13.29 14.7M16.89 8.53L16.17 9.25C16.69 10.04 17 11 17 12S16.69 13.96 16.17 14.75L16.89 15.47C17.59 14.5 18 13.3 18 12S17.59 9.5 16.89 8.53M9.25 7.83C10.04 7.31 11 7 12 7S13.96 7.31 14.75 7.83L15.47 7.11C14.5 6.42 13.3 6 12 6S9.5 6.42 8.53 7.11L9.25 7.83M14.75 16.17C13.96 16.69 13 17 12 17S10.04 16.69 9.25 16.17L8.53 16.89C9.5 17.59 10.7 18 12 18S14.5 17.59 15.47 16.89L14.75 16.17M7.83 14.75C7.31 13.96 7 13 7 12S7.31 10.04 7.83 9.25L7.11 8.53C6.42 9.5 6 10.7 6 12S6.42 14.5 7.11 15.47L7.83 14.75Z":"M10 4C14.4 4 18 7.6 18 12S14.4 20 10 20 2 16.4 2 12 5.6 4 10 4M10 2C4.5 2 0 6.5 0 12S4.5 22 10 22 20 17.5 20 12 15.5 2 10 2M10 11C9.4 11 9 11.4 9 12S9.4 13 10 13 11 12.6 11 12 10.6 11 10 11M8.7 9.3C9.1 9.1 9.5 9 10 9S10.9 9.1 11.3 9.3L12 8.6C11.4 8.2 10.7 8 10 8S8.6 8.2 8 8.6L8.7 9.3M13 12C13 12.5 12.9 12.9 12.7 13.3L13.4 14C13.8 13.4 14 12.7 14 12S13.8 10.6 13.4 10L12.7 10.7C12.9 11.1 13 11.5 13 12M7 12C7 11.5 7.1 11.1 7.3 10.7L6.6 10C6.2 10.6 6 11.3 6 12S6.2 13.4 6.6 14L7.3 13.3C7.1 12.9 7 12.5 7 12M11.3 14.7C10.9 14.9 10.5 15 10 15S9.1 14.9 8.7 14.7L8 15.4C8.6 15.8 9.3 16 10 16S11.4 15.8 12 15.4L11.3 14.7M14.9 8.5L14.2 9.2C14.7 10 15 11 15 12S14.7 14 14.2 14.8L14.9 15.5C15.6 14.5 16 13.3 16 12S15.6 9.5 14.9 8.5M7.2 7.8C8 7.3 9 7 10 7S12 7.3 12.8 7.8L13.5 7.1C12.5 6.4 11.3 6 10 6S7.5 6.4 6.5 7.1L7.2 7.8M12.8 16.2C12 16.7 11 17 10 17S8 16.7 7.2 16.2L6.5 16.9C7.5 17.6 8.7 18 10 18S12.5 17.6 13.5 16.9L12.8 16.2M5.8 14.8C5.3 14 5 13 5 12S5.3 10 5.8 9.2L5.1 8.5C4.4 9.5 4 10.7 4 12S4.4 14.5 5.1 15.5L5.8 14.8M24 7H22V13H24V8M24 15H22V17H24V15Z";case"heat":return r?j:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z";case"light":return r?"M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z":"M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z";case"lock":return r?"M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z":"M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z";case"moisture":return r?"M20.84 22.73L16.29 18.18C15.2 19.3 13.69 20 12 20C8.69 20 6 17.31 6 14C6 12.67 6.67 11.03 7.55 9.44L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M18 14C18 10 12 3.25 12 3.25S10.84 4.55 9.55 6.35L17.95 14.75C18 14.5 18 14.25 18 14Z":"M12,20A6,6 0 0,1 6,14C6,10 12,3.25 12,3.25C12,3.25 18,10 18,14A6,6 0 0,1 12,20Z";case"motion":return r?"M11.4 8.2H15V10H13.2L11.4 8.2M19.67 1H18.33C18.33 3.58 20.42 5.67 23 5.67V4.33C21.16 4.33 19.67 2.84 19.67 1M21 1C21 2.11 21.9 3 23 3V1H21M17 1H15.67C15.67 5.05 18.95 8.33 23 8.33V7C19.69 7 17 4.31 17 1M10 3.8C11 3.8 11.8 3 11.8 2S11 .2 10 .2 8.2 1 8.2 2 9 3.8 10 3.8M2.39 1.73L1.11 3L3.46 5.35L2 5.8V11H3.8V7.33L5.05 6.94L5.68 7.57L2 22H3.8L6.67 13.89L9 17V22H10.8V15.59L8.31 11.05L8.5 10.37L20.84 22.73L22.11 21.46L2.39 1.73M9.38 4.87C9.08 4.37 8.54 4.03 7.92 4.03C7.75 4.03 7.58 4.06 7.42 4.11L7.34 4.14L11.35 8.15L9.38 4.87Z":"M10,0.2C9,0.2 8.2,1 8.2,2C8.2,3 9,3.8 10,3.8C11,3.8 11.8,3 11.8,2C11.8,1 11,0.2 10,0.2M15.67,1A7.33,7.33 0 0,0 23,8.33V7A6,6 0 0,1 17,1H15.67M18.33,1C18.33,3.58 20.42,5.67 23,5.67V4.33C21.16,4.33 19.67,2.84 19.67,1H18.33M21,1A2,2 0 0,0 23,3V1H21M7.92,4.03C7.75,4.03 7.58,4.06 7.42,4.11L2,5.8V11H3.8V7.33L5.91,6.67L2,22H3.8L6.67,13.89L9,17V22H10.8V15.59L8.31,11.05L9.04,8.18L10.12,10H15V8.2H11.38L9.38,4.87C9.08,4.37 8.54,4.03 7.92,4.03Z";case"occupancy":case"presence":return r?S:Z;case"opening":return r?"M3,3V21H21V3":"M3,3H21V21H3V3M5,5V19H19V5H5Z";case"running":return r?"M18,18H6V6H18V18Z":"M8,5.14V19.14L19,12.14L8,5.14Z";case"sound":return r?"M4.27 3L3 4.27L12 13.27V13.55C11.41 13.21 10.73 13 10 13C7.79 13 6 14.79 6 17S7.79 21 10 21 14 19.21 14 17V15.27L19.73 21L21 19.73L4.27 3M14 7H18V3H12V8.18L14 10.18Z":"M12 3V13.55C11.41 13.21 10.73 13 10 13C7.79 13 6 14.79 6 17S7.79 21 10 21 14 19.21 14 17V7H18V3H12Z";case"update":return r?"M5.12,5H18.87L17.93,4H5.93L5.12,5M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M6,18H12V15H6V18Z":"M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M5.12,5H18.87L17.93,4H5.93L5.12,5M12,9.5L6.5,15H10V17H14V15H17.5L12,9.5Z";case"vibration":return r?"M17,19H7V5H17M17,3H7A2,2 0 0,0 5,5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V5C19,3.89 18.1,3 17,3Z":"M16,19H8V5H16M16.5,3H7.5A1.5,1.5 0 0,0 6,4.5V19.5A1.5,1.5 0 0,0 7.5,21H16.5A1.5,1.5 0 0,0 18,19.5V4.5A1.5,1.5 0 0,0 16.5,3M19,17H21V7H19M22,9V15H24V9M3,17H5V7H3M0,15H2V9H0V15Z";case"window":return r?"M6,11H10V9H14V11H18V4H6V11M18,13H6V20H18V13M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z":"M6,8H10V6H14V8H18V4H6V8M18,10H6V15H18V10M6,20H18V17H6V20M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2Z";default:return r?"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z":"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}}(n,t);case"button":switch(null==t?void 0:t.attributes.device_class){case"restart":return"M12,4C14.1,4 16.1,4.8 17.6,6.3C20.7,9.4 20.7,14.5 17.6,17.6C15.8,19.5 13.3,20.2 10.9,19.9L11.4,17.9C13.1,18.1 14.9,17.5 16.2,16.2C18.5,13.9 18.5,10.1 16.2,7.7C15.1,6.6 13.5,6 12,6V10.6L7,5.6L12,0.6V4M6.3,17.6C3.7,15 3.3,11 5.1,7.9L6.6,9.4C5.5,11.6 5.9,14.4 7.8,16.2C8.3,16.7 8.9,17.1 9.6,17.4L9,19.4C8,19 7.1,18.4 6.3,17.6Z";case"update":return q;default:return"M13 5C15.21 5 17 6.79 17 9C17 10.5 16.2 11.77 15 12.46V11.24C15.61 10.69 16 9.89 16 9C16 7.34 14.66 6 13 6S10 7.34 10 9C10 9.89 10.39 10.69 11 11.24V12.46C9.8 11.77 9 10.5 9 9C9 6.79 10.79 5 13 5M20 20.5C19.97 21.32 19.32 21.97 18.5 22H13C12.62 22 12.26 21.85 12 21.57L8 17.37L8.74 16.6C8.93 16.39 9.2 16.28 9.5 16.28H9.7L12 18V9C12 8.45 12.45 8 13 8S14 8.45 14 9V13.47L15.21 13.6L19.15 15.79C19.68 16.03 20 16.56 20 17.14V20.5M20 2H4C2.9 2 2 2.9 2 4V12C2 13.11 2.9 14 4 14H8V12L4 12L4 4H20L20 12H18V14H20V13.96L20.04 14C21.13 14 22 13.09 22 12V4C22 2.9 21.11 2 20 2Z"}case"cover":return function(e,t){var r="closed"!==e;switch(null==t?void 0:t.attributes.device_class){case"garage":switch(e){case"opening":return x;case"closing":return D;case"closed":return"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12M8,15H16V17H8V15M16,18V20H8V18H16Z";default:return"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12Z"}case"gate":switch(e){case"opening":case"closing":return"M15 6V11H13V7H11V11H9V9H7V21H9V19H11V21H12.09C12.03 20.67 12 20.34 12 20C12 18.82 12.35 17.67 13 16.69V13H15V14.81C15.62 14.45 16.3 14.21 17 14.09V13H19V14.09C19.7 14.21 20.38 14.45 21 14.81V13H22V11H21V6H19V11H17V6H15M9 13H11V17H9V13M19 17V19H15V21H19V23L22 20L19 17Z";case"closed":return"M9 6V11H7V7H5V11H3V9H1V21H3V19H5V21H7V19H9V21H11V19H13V21H15V19H17V21H19V19H21V21H23V9H21V11H19V7H17V11H15V6H13V11H11V6H9M3 13H5V17H3V13M7 13H9V17H7V13M11 13H13V17H11V13M15 13H17V17H15V13M19 13H21V17H19V13Z";default:return"M7 21V7H5V11H3V9H1V21H3V19H5V21H7M3 17V13H5V17H3M21 9V11H19V7H17V21H19V19H21V21H23V9H21M21 17H19V13H21V17Z"}case"door":return r?"M12,3C10.89,3 10,3.89 10,5H3V19H2V21H22V19H21V5C21,3.89 20.11,3 19,3H12M12,5H19V19H12V5M5,11H7V13H5V11Z":"M16,11H18V13H16V11M12,3H19C20.11,3 21,3.89 21,5V19H22V21H2V19H10V5C10,3.89 10.89,3 12,3M12,5V19H19V5H12Z";case"damper":return r?"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z":"M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4Z";case"shutter":switch(e){case"opening":return x;case"closing":return D;case"closed":return"M3 4H21V8H19V20H17V8H7V20H5V8H3V4M8 9H16V11H8V9M8 12H16V14H8V12M8 15H16V17H8V15M8 18H16V20H8V18Z";default:return"M3 4H21V8H19V20H17V8H7V20H5V8H3V4M8 9H16V11H8V9Z"}case"curtain":switch(e){case"opening":return"M18,16V13H15V22H13V2H15V11H18V8L22,12L18,16M2,12L6,16V13H9V22H11V2H9V11H6V8L2,12Z";case"closing":return I;case"closed":return"M23 3H1V1H23V3M2 22H11V4H2V22M22 4H13V22H22V4Z";default:return"M23 3H1V1H23V3M2 22H6C6 19 4 17 4 17C10 13 11 4 11 4H2V22M22 4H13C13 4 14 13 20 17C20 17 18 19 18 22H22V4Z"}case"blind":case"shade":switch(e){case"opening":return x;case"closing":return D;case"closed":return"M3,2H21A1,1 0 0,1 22,3V5A1,1 0 0,1 21,6H20V13A1,1 0 0,1 19,14H13V16.17C14.17,16.58 15,17.69 15,19A3,3 0 0,1 12,22A3,3 0 0,1 9,19C9,17.69 9.83,16.58 11,16.17V14H5A1,1 0 0,1 4,13V6H3A1,1 0 0,1 2,5V3A1,1 0 0,1 3,2M12,18A1,1 0 0,0 11,19A1,1 0 0,0 12,20A1,1 0 0,0 13,19A1,1 0 0,0 12,18Z";default:return"M3 2H21C21.55 2 22 2.45 22 3V5C22 5.55 21.55 6 21 6H20V7C20 7.55 19.55 8 19 8H13V10.17C14.17 10.58 15 11.7 15 13C15 14.66 13.66 16 12 16C10.34 16 9 14.66 9 13C9 11.69 9.84 10.58 11 10.17V8H5C4.45 8 4 7.55 4 7V6H3C2.45 6 2 5.55 2 5V3C2 2.45 2.45 2 3 2M12 12C11.45 12 11 12.45 11 13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13C13 12.45 12.55 12 12 12Z"}case"window":switch(e){case"opening":return x;case"closing":return D;case"closed":return T;default:return z}}switch(e){case"opening":return x;case"closing":return D;case"closed":return T;default:return z}}(n,t);case"device_tracker":return"router"===(null==t?void 0:t.attributes.source_type)?"home"===n?"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M3,13V18L3,20H10V18H5V13H3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M14,15H20V19H14V15Z":"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M3.88,13.46L2.46,14.88L4.59,17L2.46,19.12L3.88,20.54L6,18.41L8.12,20.54L9.54,19.12L7.41,17L9.54,14.88L8.12,13.46L6,15.59L3.88,13.46M14,15H20V19H14V15Z":["bluetooth","bluetooth_le"].includes(null==t?void 0:t.attributes.source_type)?"home"===n?"M19,10L17,12L19,14L21,12M14.88,16.29L13,18.17V14.41M13,5.83L14.88,7.71L13,9.58M17.71,7.71L12,2H11V9.58L6.41,5L5,6.41L10.59,12L5,17.58L6.41,19L11,14.41V22H12L17.71,16.29L13.41,12M7,12L5,10L3,12L5,14L7,12Z":"M14.88,16.29L13,18.17V14.41M13,5.83L14.88,7.71L13,9.58M17.71,7.71L12,2H11V9.58L6.41,5L5,6.41L10.59,12L5,17.58L6.41,19L11,14.41V22H12L17.71,16.29L13.41,12L17.71,7.71Z":"not_home"===n?"M18 16H14V18H18V20L21 17L18 14V16M11 4C8.8 4 7 5.8 7 8S8.8 12 11 12 15 10.2 15 8 13.2 4 11 4M11 14C6.6 14 3 15.8 3 18V20H12.5C12.2 19.2 12 18.4 12 17.5C12 16.3 12.3 15.2 12.9 14.1C12.3 14.1 11.7 14 11 14":"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z";case"humidifier":return r&&"off"===r?"M22.1 21.5L2.4 1.7L1.1 3L3.8 5.7C3.3 6.3 3 7.1 3 8V22H18V19.9L20.8 22.7L22.1 21.5M9.6 11.5L12.4 14.3C12.1 14.7 11.6 15 11 15C9.9 15 9 14.1 9 13C9 12.4 9.3 11.9 9.6 11.5M16 17.9V20H5V8C5 7.7 5.1 7.4 5.2 7.1L8.2 10.1C7.5 10.8 7 11.9 7 13C7 15.2 8.8 17 11 17C12.1 17 13.2 16.5 13.9 15.8L16 17.9M17 13.8C17.1 12.5 19 10.5 19 10.5S21 12.7 21 14C21 15 20.2 15.9 19.2 16L17 13.8M9.2 6L7.2 4H14C16.2 4 18 5.8 18 8V9H16V8C16 6.9 15.1 6 14 6H9.2Z":"M11 9C8.79 9 7 10.79 7 13S8.79 17 11 17 15 15.21 15 13 13.21 9 11 9M11 15C9.9 15 9 14.11 9 13S9.9 11 11 11 13 11.9 13 13 12.11 15 11 15M7 4H14C16.21 4 18 5.79 18 8V9H16V8C16 6.9 15.11 6 14 6H7C5.9 6 5 6.9 5 8V20H16V18H18V22H3V8C3 5.79 4.79 4 7 4M19 10.5C19 10.5 21 12.67 21 14C21 15.1 20.1 16 19 16S17 15.1 17 14C17 12.67 19 10.5 19 10.5";case"input_boolean":return"on"===n?"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z":"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2C6.47,2 2,6.47 2,12C2,17.53 6.47,22 12,22C17.53,22 22,17.53 22,12C22,6.47 17.53,2 12,2M14.59,8L12,10.59L9.41,8L8,9.41L10.59,12L8,14.59L9.41,16L12,13.41L14.59,16L16,14.59L13.41,12L16,9.41L14.59,8Z";case"input_datetime":if(null==t||!t.attributes.has_date)return"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z";if(!t.attributes.has_time)return"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z";break;case"lock":switch(n){case"unlocked":return"M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z";case"jammed":return"M10 17C11.1 17 12 16.1 12 15C12 13.9 11.1 13 10 13C8.9 13 8 13.9 8 15S8.9 17 10 17M16 8C17.1 8 18 8.9 18 10V20C18 21.1 17.1 22 16 22H4C2.9 22 2 21.1 2 20V10C2 8.9 2.9 8 4 8H5V6C5 3.2 7.2 1 10 1S15 3.2 15 6V8H16M10 3C8.3 3 7 4.3 7 6V8H13V6C13 4.3 11.7 3 10 3M22 13H20V7H22V13M22 17H20V15H22V17Z";case"locking":case"unlocking":return"M8.5,2C6,2 4,4 4,6.5V7C2.89,7 2,7.89 2,9V18C2,19.11 2.89,20 4,20H8.72C10.18,21.29 12.06,22 14,22A8,8 0 0,0 22,14A8,8 0 0,0 14,6C13.66,6 13.32,6.03 13,6.08C12.76,3.77 10.82,2 8.5,2M8.5,4A2.5,2.5 0 0,1 11,6.5V7H6V6.5A2.5,2.5 0 0,1 8.5,4M14,8A6,6 0 0,1 20,14A6,6 0 0,1 14,20A6,6 0 0,1 8,14A6,6 0 0,1 14,8M13,10V15L16.64,17.19L17.42,15.9L14.5,14.15V10H13Z";default:return"M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"}case"media_player":switch(null==t?void 0:t.attributes.device_class){case"speaker":switch(n){case"playing":return"M16 15V21L21 18L16 15M12.28 19.81C11.87 19.92 11.45 20 11 20C8.24 20 6 17.76 6 15S8.24 10 11 10C12.89 10 14.5 11.06 15.37 12.61C16.16 12.23 17.06 12 18 12V4C18 2.89 17.1 2 16 2H6C4.89 2 4 2.89 4 4V20C4 21.11 4.89 22 6 22H13.54C13 21.37 12.54 20.63 12.28 19.81M11 4C12.11 4 13 4.89 13 6S12.11 8 11 8C9.89 8 9 7.1 9 6C9 4.89 9.89 4 11 4M13.74 13.78C12.7 14.82 12.06 16.24 12 17.81C11.69 17.93 11.36 18 11 18C9.34 18 8 16.66 8 15S9.34 12 11 12C12.22 12 13.27 12.73 13.74 13.78Z";case"paused":return"M12.28 19.81C11.87 19.92 11.45 20 11 20C8.24 20 6 17.76 6 15S8.24 10 11 10C12.89 10 14.5 11.06 15.37 12.61C16.16 12.23 17.06 12 18 12V4C18 2.89 17.1 2 16 2H6C4.89 2 4 2.89 4 4V20C4 21.11 4.89 22 6 22H13.54C13 21.37 12.54 20.63 12.28 19.81M11 4C12.11 4 13 4.89 13 6S12.11 8 11 8C9.89 8 9 7.1 9 6C9 4.89 9.89 4 11 4M13.74 13.78C12.7 14.82 12.06 16.24 12 17.81C11.69 17.93 11.36 18 11 18C9.34 18 8 16.66 8 15S9.34 12 11 12C12.22 12 13.27 12.73 13.74 13.78M19 15H21V21H19M15 15H17V21H15V15Z";case"off":return"M2,5.27L3.28,4L21,21.72L19.73,23L18.27,21.54C17.93,21.83 17.5,22 17,22H7C5.89,22 5,21.1 5,20V8.27L2,5.27M12,18A3,3 0 0,1 9,15C9,14.24 9.28,13.54 9.75,13L8.33,11.6C7.5,12.5 7,13.69 7,15A5,5 0 0,0 12,20C13.31,20 14.5,19.5 15.4,18.67L14,17.25C13.45,17.72 12.76,18 12,18M17,15A5,5 0 0,0 12,10H11.82L5.12,3.3C5.41,2.54 6.14,2 7,2H17A2,2 0 0,1 19,4V17.18L17,15.17V15M12,4C10.89,4 10,4.89 10,6A2,2 0 0,0 12,8A2,2 0 0,0 14,6C14,4.89 13.1,4 12,4Z";default:return"M12,12A3,3 0 0,0 9,15A3,3 0 0,0 12,18A3,3 0 0,0 15,15A3,3 0 0,0 12,12M12,20A5,5 0 0,1 7,15A5,5 0 0,1 12,10A5,5 0 0,1 17,15A5,5 0 0,1 12,20M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8C10.89,8 10,7.1 10,6C10,4.89 10.89,4 12,4M17,2H7C5.89,2 5,2.89 5,4V20A2,2 0 0,0 7,22H17A2,2 0 0,0 19,20V4C19,2.89 18.1,2 17,2Z"}case"tv":switch(n){case"playing":return"M21,3H3C1.89,3 1,3.89 1,5V17A2,2 0 0,0 3,19H8V21H16V19H21A2,2 0 0,0 23,17V5C23,3.89 22.1,3 21,3M21,17H3V5H21M16,11L9,15V7";case"paused":return"M3 3C1.89 3 1 3.89 1 5V17C1 18.1 1.9 19 3 19H8V21H16V19H21C22.1 19 23 18.1 23 17V5C23 3.89 22.1 3 21 3M3 5H21V17H3M9 8V14H11V8M13 8V14H15V8";case"off":return"M0.5,2.77L1.78,1.5L21,20.72L19.73,22L16.73,19H16V21H8V19H3A2,2 0 0,1 1,17V5C1,4.5 1.17,4.07 1.46,3.73L0.5,2.77M21,17V5H7.82L5.82,3H21A2,2 0 0,1 23,5V17C23,17.85 22.45,18.59 21.7,18.87L19.82,17H21M3,17H14.73L3,5.27V17Z";default:return"M21,17H3V5H21M21,3H3A2,2 0 0,0 1,5V17A2,2 0 0,0 3,19H8V21H16V19H21A2,2 0 0,0 23,17V5A2,2 0 0,0 21,3Z"}case"receiver":return"off"===n?"M22.1 21.5L2.4 1.7L1.1 3L5.1 7H4C2.9 7 2 7.9 2 9V15C2 16.1 2.9 17 4 17H5V18C5 18.6 5.4 19 6 19H8C8.6 19 9 18.6 9 18V17H15V18C15 18.6 15.4 19 16 19H17.1L20.8 22.7L22.1 21.5M6 15H4V14H6V15M4 12V10H8.1L10.1 12H4M10 15H8V14H10V15M12 15V14H12.1L13.1 15H12M14 10V10.8L20.2 17C21.2 16.9 22 16.1 22 15V9C22 7.9 21.1 7 20 7H10.2L13.2 10H14M18 9C19.1 9 20 9.9 20 11S19.1 13 18 13 16 12.1 16 11 16.9 9 18 9Z":"M20,7H4A2,2 0 0,0 2,9V15A2,2 0 0,0 4,17H5V18C5,18.6 5.4,19 6,19H8C8.6,19 9,18.6 9,18V17H15V18C15,18.6 15.4,19 16,19H18C18.6,19 19,18.6 19,18V17H20A2,2 0 0,0 22,15V9A2,2 0 0,0 20,7M14,12H4V10H14V12M18,13A2,2 0 0,1 16,11A2,2 0 0,1 18,9A2,2 0 0,1 20,11A2,2 0 0,1 18,13M6,15H4V14H6V15M10,15H8V14H10V15M14,15H12V14H14V15Z";default:switch(n){case"playing":case"paused":return"M21,3H3C1.89,3 1,3.89 1,5V8H3V5H21V19H14V21H21A2,2 0 0,0 23,19V5C23,3.89 22.1,3 21,3M1,10V12A9,9 0 0,1 10,21H12C12,14.92 7.07,10 1,10M19,7H5V8.63C8.96,9.91 12.09,13.04 13.37,17H19M1,14V16A5,5 0 0,1 6,21H8A7,7 0 0,0 1,14M1,18V21H4A3,3 0 0,0 1,18Z";case"off":return"M1.6,1.27L0.25,2.75L1.41,3.8C1.16,4.13 1,4.55 1,5V8H3V5.23L18.2,19H14V21H20.41L22.31,22.72L23.65,21.24M6.5,3L8.7,5H21V16.14L23,17.95V5C23,3.89 22.1,3 21,3M1,10V12A9,9 0 0,1 10,21H12C12,14.92 7.08,10 1,10M1,14V16A5,5 0 0,1 6,21H8A7,7 0 0,0 1,14M1,18V21H4A3,3 0 0,0 1,18Z";default:return"M1,10V12A9,9 0 0,1 10,21H12C12,14.92 7.07,10 1,10M1,14V16A5,5 0 0,1 6,21H8A7,7 0 0,0 1,14M1,18V21H4A3,3 0 0,0 1,18M21,3H3C1.89,3 1,3.89 1,5V8H3V5H21V19H14V21H21A2,2 0 0,0 23,19V5C23,3.89 22.1,3 21,3Z"}}case"switch":switch(null==t?void 0:t.attributes.device_class){case"outlet":return"on"===n?"M16,7V3H14V7H10V3H8V7H8C7,7 6,8 6,9V14.5L9.5,18V21H14.5V18L18,14.5V9C18,8 17,7 16,7Z":"M20.84 22.73L15.31 17.2L14.5 18V21H9.5V18L6 14.5V9C6 8.7 6.1 8.41 6.25 8.14L1.11 3L2.39 1.73L22.11 21.46L20.84 22.73M18 14.5V9C18 8 17 7 16 7V3H14V7H10.2L17.85 14.65L18 14.5M10 3H8V4.8L10 6.8V3Z";case"switch":return"on"===n?$:"M5.6 1.6C6 1.2 6.5 1 7 1H17C17.5 1 18 1.2 18.4 1.6C18.8 2 19 2.5 19 3V21C19 21.5 18.8 22 18.4 22.4C18 22.8 17.5 23 17 23H7C6.5 23 6 22.8 5.6 22.4C5.2 22 5 21.5 5 21V3C5 2.5 5.2 2 5.6 1.6M8 3C7.4 3 7 3.4 7 4V20C7 20.6 7.4 21 8 21H16C16.6 21 17 20.6 17 20V4C17 3.4 16.6 3 16 3H8M8 17C8 16.4 8.4 16 9 16H15C15.6 16 16 16.4 16 17V19C16 19.6 15.6 20 15 20H9C8.4 20 8 19.6 8 19V17Z";default:return $}case"sensor":var i=N(t);if(i)return i;break;case"sun":return"above_horizon"===(null==t?void 0:t.state)?y.Zy[e]:"M17.75,4.09L15.22,6.03L16.13,9.09L13.5,7.28L10.87,9.09L11.78,6.03L9.25,4.09L12.44,4L13.5,1L14.56,4L17.75,4.09M21.25,11L19.61,12.25L20.2,14.23L18.5,13.06L16.8,14.23L17.39,12.25L15.75,11L17.81,10.95L18.5,9L19.19,10.95L21.25,11M18.97,15.95C19.8,15.87 20.69,17.05 20.16,17.8C19.84,18.25 19.5,18.67 19.08,19.07C15.17,23 8.84,23 4.94,19.07C1.03,15.17 1.03,8.83 4.94,4.93C5.34,4.53 5.76,4.17 6.21,3.85C6.96,3.32 8.14,4.21 8.06,5.04C7.79,7.9 8.75,10.87 10.95,13.06C13.14,15.26 16.1,16.22 18.97,15.95M17.33,17.97C14.5,17.81 11.7,16.64 9.53,14.5C7.36,12.31 6.2,9.5 6.04,6.68C3.23,9.82 3.34,14.64 6.35,17.66C9.37,20.67 14.19,20.78 17.33,17.97Z";case"switch_as_x":return"M21,9L17,5V8H10V10H17V13M7,11L3,15L7,19V16H14V14H7V11Z";case"threshold":return"M22 5H4V2H2V22H22V20H4V9C8.09 9 10.13 11 12.29 13.21S17.09 18 22 18V16C17.91 16 15.87 14 13.71 11.79S8.91 7 4 7H22Z";case"update":return"on"===n?(0,A.Sk)(t)?"M5.12,5L5.93,4H17.93L18.87,5M12,17.5L6.5,12H10V10H14V12H17.5L12,17.5M20.54,5.23L19.15,3.55C18.88,3.21 18.47,3 18,3H6C5.53,3 5.12,3.21 4.84,3.55L3.46,5.23C3.17,5.57 3,6 3,6.5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V6.5C21,6 20.83,5.57 20.54,5.23Z":q:"M5.12,5H18.87L17.93,4H5.93L5.12,5M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M6,18H12V15H6V18Z";case"weather":return function(e,t){return e?t&&"partlycloudy"===e?"M22,10.28C21.74,10.3 21.5,10.31 21.26,10.31C19.32,10.31 17.39,9.57 15.91,8.09C14.25,6.44 13.5,4.19 13.72,2C13.77,1.53 13.22,1 12.71,1C12.57,1 12.44,1.04 12.32,1.12C12,1.36 11.66,1.64 11.36,1.94C9.05,4.24 8.55,7.66 9.84,10.46C8.31,11.11 7.13,12.43 6.69,14.06L6,14A4,4 0 0,0 2,18A4,4 0 0,0 6,22H19A3,3 0 0,0 22,19A3,3 0 0,0 19,16C18.42,16 17.88,16.16 17.42,16.45L17.5,15.5C17.5,15.28 17.5,15.05 17.46,14.83C19.14,14.67 20.77,13.94 22.06,12.64C22.38,12.34 22.64,12 22.88,11.68C23.27,11.13 22.65,10.28 22.04,10.28M19,18A1,1 0 0,1 20,19A1,1 0 0,1 19,20H6A2,2 0 0,1 4,18A2,2 0 0,1 6,16H8.5V15.5C8.5,13.94 9.53,12.64 10.94,12.18C11.1,12.13 11.26,12.09 11.43,12.06C11.61,12.03 11.8,12 12,12C12.23,12 12.45,12.03 12.66,12.07C12.73,12.08 12.8,12.1 12.87,12.13C13,12.16 13.15,12.2 13.28,12.25C13.36,12.28 13.44,12.32 13.5,12.36C13.63,12.41 13.74,12.47 13.84,12.54C13.92,12.59 14,12.64 14.07,12.7C14.17,12.77 14.25,12.84 14.34,12.92C14.41,13 14.5,13.05 14.55,13.12C14.63,13.2 14.69,13.29 14.76,13.37C14.82,13.45 14.89,13.53 14.94,13.62C15,13.71 15.04,13.8 15.09,13.9C15.14,14 15.2,14.08 15.24,14.18C15.41,14.59 15.5,15.03 15.5,15.5V18M16.83,12.86C15.9,11.16 14.08,10 12,10H11.87C11.41,9.19 11.14,8.26 11.14,7.29C11.14,6.31 11.39,5.37 11.86,4.55C12.21,6.41 13.12,8.14 14.5,9.5C15.86,10.88 17.58,11.79 19.45,12.14C18.66,12.6 17.76,12.84 16.83,12.86Z":_[e]:void 0}(null==t?void 0:t.state)}if(e in y.Zy)return y.Zy[e]},J=function(e){return e?function(e,t,r){return G(e,t,r)||(console.warn("Unable to find icon for domain ".concat(e)),y.Rb)}((0,c.M)(e.entity_id),e):y.Rb};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){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){return X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},X(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=re(e);if(t){var i=re(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ee(this,r)}}function ee(e,t){if(t&&("object"===K(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return te(e)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}function ne(){ne=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ae(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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"])),this.icon||(null===(t=this.state)||void 0===t?void 0:t.attributes.icon)):(0,i.dy)(b||(b=Q([""])),J(this.state))}}]}}),i.oi);function Ce(e){return Ce="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},Ce(e)}function pe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){return me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},me(e,t)}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Se(e);if(t){var i=Se(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ye(this,r)}}function ye(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ae(e)}function Ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ve(){ve=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ge(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n =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\n ',"\n "])),!!e.entity_id,e.state?(0,i.dy)(Oe||(Oe=Ye(['t.length)&&(e=t.length);for(var i=0,r=new Array(e);i=0?Math.max.apply(Math,y(i)):i[0]+i[1]}var I=function(){function t(){f(this,t),this._childSizeCache=new s,this._marginSizeCache=new s,this._metricsCache=new Map}return g(t,[{key:"update",value:function(t,e){var i,r,s=this,a=new Set;Object.keys(t).forEach((function(i){var r=Number(i);s._metricsCache.set(r,t[r]),s._childSizeCache.set(r,t[r][(0,n.qF)(e)]),a.add(r),a.add(r+1)}));var h,o=function(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=v(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var r=0,s=function(){};return{s:s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}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 n,a=!0,h=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){h=!0,n=t},f:function(){try{a||null==i.return||i.return()}finally{if(h)throw n}}}}(a);try{for(o.s();!(h=o.n()).done;){var c=h.value,l=(null===(i=this._metricsCache.get(c))||void 0===i?void 0:i[S(e)])||0,u=(null===(r=this._metricsCache.get(c-1))||void 0===r?void 0:r[z(e)])||0;this._marginSizeCache.set(c,b(l,u))}}catch(_){o.e(_)}finally{o.f()}}},{key:"averageChildSize",get:function(){return this._childSizeCache.averageSize}},{key:"totalChildSize",get:function(){return this._childSizeCache.totalSize}},{key:"averageMarginSize",get:function(){return this._marginSizeCache.averageSize}},{key:"totalMarginSize",get:function(){return this._marginSizeCache.totalSize}},{key:"getLeadingMarginValue",value:function(t,e){var i;return(null===(i=this._metricsCache.get(t))||void 0===i?void 0:i[S(e)])||0}},{key:"getChildSize",value:function(t){return this._childSizeCache.getSize(t)}},{key:"getMarginSize",value:function(t){return this._marginSizeCache.getSize(t)}},{key:"clear",value:function(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}]),t}(),C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,t);var e=l(i);function i(){var t;return f(this,i),(t=e.apply(this,arguments))._itemSize={width:100,height:100},t._physicalItems=new Map,t._newPhysicalItems=new Map,t._metricsCache=new I,t._anchorIdx=null,t._anchorPos=null,t._stable=!0,t._needsRemeasure=!1,t._measureChildren=!0,t._estimate=!0,t}return g(i,[{key:"measureChildren",get:function(){return this._measureChildren}},{key:"updateItemSizes",value:function(t){this._metricsCache.update(t,this.direction),this._scheduleReflow()}},{key:"_getPhysicalItem",value:function(t){var e;return null!==(e=this._newPhysicalItems.get(t))&&void 0!==e?e:this._physicalItems.get(t)}},{key:"_getSize",value:function(t){return this._getPhysicalItem(t)&&this._metricsCache.getChildSize(t)}},{key:"_getAverageSize",value:function(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}},{key:"_getPosition",value:function(t){var e,i=this._getPhysicalItem(t),r=this._metricsCache.averageMarginSize;return 0===t?null!==(e=this._metricsCache.getMarginSize(0))&&void 0!==e?e:r:i?i.pos:r+t*(r+this._getAverageSize())}},{key:"_calculateAnchor",value:function(t,e){return t<=0?0:e>this._scrollSize-this._viewDim1?this._totalItems-1:Math.max(0,Math.min(this._totalItems-1,Math.floor((t+e)/2/this._delta)))}},{key:"_getAnchor",value:function(t,e){if(0===this._physicalItems.size)return this._calculateAnchor(t,e);if(this._first<0)return console.error("_getAnchor: negative _first"),this._calculateAnchor(t,e);if(this._last<0)return console.error("_getAnchor: negative _last"),this._calculateAnchor(t,e);var i=this._getPhysicalItem(this._first),r=this._getPhysicalItem(this._last),s=i.pos;if(r.pos+this._metricsCache.getChildSize(this._last)e)return this._calculateAnchor(t,e);for(var n=this._firstVisible-1,a=-1/0;a=0&&(this._anchorIdx=Math.min(this._scrollToIndex,this._totalItems-1),this._anchorPos=this._getPosition(this._anchorIdx),this._scrollIfNeeded()),i=this._scrollPosition-this._overhang,(r=this._scrollPosition+this._viewDim1+this._overhang)<0||i>this._scrollSize)this._clearItems();else{null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(i,r),this._anchorPos=this._getPosition(this._anchorIdx));var n=this._getSize(this._anchorIdx);void 0===n&&(this._stable=!1,n=this._getAverageSize());var a=null!==(t=this._metricsCache.getMarginSize(this._anchorIdx))&&void 0!==t?t:this._metricsCache.averageMarginSize,h=null!==(e=this._metricsCache.getMarginSize(this._anchorIdx+1))&&void 0!==e?e:this._metricsCache.averageMarginSize;0===this._anchorIdx&&(this._anchorPos=a),this._anchorIdx===this._totalItems-1&&(this._anchorPos=this._scrollSize-h-n);var o=0;for(this._anchorPos+n+hr&&(o=r-(this._anchorPos-a)),o&&(this._scrollPosition-=o,i-=o,r-=o,this._scrollError+=o),s.set(this._anchorIdx,{pos:this._anchorPos,size:n}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos,this._physicalMax=this._anchorPos+n;this._physicalMin>i&&this._first>0;){var c=this._getSize(--this._first);void 0===c&&(this._stable=!1,c=this._getAverageSize());var l=this._metricsCache.getMarginSize(this._first+1);void 0===l&&(this._stable=!1,l=this._metricsCache.averageMarginSize),this._physicalMin-=c+l;var u=this._physicalMin;if(s.set(this._first,{pos:u,size:c}),!1===this._stable&&!1===this._estimate)break}for(;this._physicalMax=this._scrollSize?this._physicalMax-this._scrollSize+(this._totalItems-1-this._last)*this._delta:0}},{key:"_reflow",value:function(){var t=this._first,e=this._last,i=this._scrollSize;this._updateScrollSize(),this._getActiveItems(),this._scrollSize!==i&&this._emitScrollSize(),this._updateVisibleIndices(),this._emitRange(),-1===this._first&&-1===this._last?this._resetReflowState():this._first!==t||this._last!==e||this._needsRemeasure?(this._emitChildPositions(),this._emitScrollError()):(this._emitChildPositions(),this._emitScrollError(),this._resetReflowState())}},{key:"_resetReflowState",value:function(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}},{key:"_updateScrollSize",value:function(){var t=this._metricsCache.averageMarginSize;this._scrollSize=Math.max(1,this._totalItems*(t+this._getAverageSize())+t)}},{key:"_delta",get:function(){var t=this._metricsCache.averageMarginSize;return this._getAverageSize()+t}},{key:"_getItemPosition",value:function(t){var e,i;return h(e={},this._positionDim,this._getPosition(t)),h(e,this._secondaryPositionDim,0),h(e,"horizontal"===this.direction?"xOffset":"yOffset",-(null!==(i=this._metricsCache.getLeadingMarginValue(t,this.direction))&&void 0!==i?i:this._metricsCache.averageMarginSize)),e}},{key:"_getItemSize",value:function(t){var e,i;return h(e={},this._sizeDim,(this._getSize(t)||this._getAverageSize())+(null!==(i=this._metricsCache.getMarginSize(t+1))&&void 0!==i?i:this._metricsCache.averageMarginSize)),h(e,this._secondarySizeDim,this._itemSize[this._secondarySizeDim]),e}},{key:"_viewDim2Changed",value:function(){this._needsRemeasure=!0,this._scheduleReflow()}},{key:"_emitRange",value:function(){var t=this._needsRemeasure,e=this._stable;this._needsRemeasure=!1,o(_(i.prototype),"_emitRange",this).call(this,{remeasure:t,stable:e})}}]),i}(n.IE)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/916349a7.js.LICENSE.txt b/supervisor/api/panel/frontend_es5/20f8de36.js.LICENSE.txt similarity index 100% rename from supervisor/api/panel/frontend_es5/916349a7.js.LICENSE.txt rename to supervisor/api/panel/frontend_es5/20f8de36.js.LICENSE.txt diff --git a/supervisor/api/panel/frontend_es5/20f8de36.js.gz b/supervisor/api/panel/frontend_es5/20f8de36.js.gz new file mode 100644 index 000000000..a9e6487b0 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/20f8de36.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/2d114eec.js b/supervisor/api/panel/frontend_es5/2d114eec.js new file mode 100644 index 000000000..25398e23a --- /dev/null +++ b/supervisor/api/panel/frontend_es5/2d114eec.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[186],{58831:function(e,t,r){r.d(t,{M:function(){return n}});var n=function(e){return e.substr(0,e.indexOf("."))}},13095:function(e,t,r){r.r(t),r.d(t,{HaSelectorUiAction:function(){return he}});var n,i,o=r(37500),a=r(63550),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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=y(e);if(t){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}function v(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(){b=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!k(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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=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\n \n \n ',"\n \n ","\n \n ","\n \n ","\n ","\n ","\n "])),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)(D||(D=I(["\n \n ","\n \n "])),e,l.hass.localize("ui.panel.lovelace.editor.action-editor.actions.".concat(e)))})),this.tooltipText?(0,o.dy)(S||(S=I(["\n \n "])),this.tooltipText):"","navigate"===(null===(n=this.config)||void 0===n?void 0:n.action)?(0,o.dy)(j||(j=I(["\n \n "])),this.hass,this.hass.localize("ui.panel.lovelace.editor.action-editor.navigation_path"),this._navigation_path,this._navigateValueChanged):"","url"===(null===(i=this.config)||void 0===i?void 0:i.action)?(0,o.dy)(T||(T=I(["\n \n "])),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)(x||(x=I(["\n \n "])),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 n;switch(r){case"url":n={url_path:this._url_path};break;case"call-service":n={service:this._service};break;case"navigate":n={navigation_path:this._navigation_path}}(0,s.B)(this,"value-changed",{value:Object.assign({action:r},n)})}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,R({},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)(z||(z=I(["\n .dropdown {\n position: relative;\n }\n ha-help-tooltip {\n position: absolute;\n right: 40px;\n top: 16px;\n inset-inline-start: initial;\n inset-inline-end: 40px;\n direction: var(--direction);\n }\n ha-select,\n ha-textfield {\n width: 100%;\n }\n ha-service-control,\n ha-navigation-picker {\n display: block;\n }\n ha-textfield,\n ha-service-control,\n ha-navigation-picker {\n margin-top: 8px;\n }\n ha-service-control {\n --service-control-padding: 0;\n }\n "])))}}]}}),o.oi);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 ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){return te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},te(e,t)}function re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=oe(e);if(t){var i=oe(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ne(this,r)}}function ne(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ie(e)}function ie(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ae(){ae=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ce(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n "],t||(t=e.slice(0)),Q=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.label,this.hass,this.value,this.selector["ui-action"].actions,this.helper,this._valueChanged);var e,t}},{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/2d114eec.js.gz b/supervisor/api/panel/frontend_es5/2d114eec.js.gz new file mode 100644 index 000000000..0df96f45f Binary files /dev/null and b/supervisor/api/panel/frontend_es5/2d114eec.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/2dbdaab4.js b/supervisor/api/panel/frontend_es5/2dbdaab4.js deleted file mode 100644 index 2559c28be..000000000 --- a/supervisor/api/panel/frontend_es5/2dbdaab4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[191],{58556:function(t,n,r){"use strict";var e;(e="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)||"undefined"!=typeof navigator&&"ReactNative"===navigator.product?global:self).Proxy||(e.Proxy=r(87082)(),e.Proxy.revocable=e.Proxy.revocable)},87082:function(t){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}t.exports=function(){var t,r=null;function e(t){return!!t&&("object"===n(t)||"function"==typeof t)}function o(t){if(null!==t&&!e(t))throw new TypeError("Object prototype may only be an Object or null: "+t)}var a=Object,i=Boolean(a.create)||!({__proto__:null}instanceof a),u=a.create||(i?function(t){return o(t),{__proto__:t}}:function(t){if(o(t),null===t)throw new SyntaxError("Native Object.create is required to create objects with null prototype");var n=function(){};return n.prototype=t,new n}),c=function(){return null},l=a.getPrototypeOf||([].__proto__===Array.prototype?function(t){var n=t.__proto__;return e(n)?n:null}:c);return t=function(n,f){if(void 0===(this&&this instanceof t?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!e(n)||!e(f))throw new TypeError("Cannot create proxy with a non-object as target or handler");var s=function(){};r=function(){n=null,s=function(t){throw new TypeError("Cannot perform '".concat(t,"' on a proxy that has been revoked"))}},setTimeout((function(){r=null}),0);var p=f;for(var y in f={get:null,set:null,apply:null,construct:null},p){if(!(y in f))throw new TypeError("Proxy polyfill does not support trap '".concat(y,"'"));f[y]=p[y]}"function"==typeof p&&(f.apply=p.apply.bind(p));var v,b=l(n),h=!1,m=!1;"function"==typeof n?(v=function(){var t=this&&this.constructor===v,r=Array.prototype.slice.call(arguments);if(s(t?"construct":"apply"),t&&f.construct)return f.construct.call(this,n,r);if(!t&&f.apply)return f.apply(n,this,r);if(t){r.unshift(n);var e=n.bind.apply(n,r);return new e}return n.apply(this,r)},h=!0):n instanceof Array?(v=[],m=!0):v=i||null!==b?u(b):{};var d=f.get?function(t){return s("get"),f.get(this,t,v)}:function(t){return s("get"),this[t]},g=f.set?function(t,n){s("set");f.set(this,t,n,v)}:function(t,n){s("set"),this[t]=n},w=a.getOwnPropertyNames(n),S={};w.forEach((function(t){if(!h&&!m||!(t in v)){var r=a.getOwnPropertyDescriptor(n,t),e={enumerable:Boolean(r.enumerable),get:d.bind(n,t),set:g.bind(n,t)};a.defineProperty(v,t,e),S[t]=!0}}));var E=!0;if(h||m){var _=a.setPrototypeOf||([].__proto__===Array.prototype?function(t,n){return o(n),t.__proto__=n,t}:c);b&&_(v,b)||(E=!1)}if(f.get||!E)for(var A in n)S[A]||a.defineProperty(v,A,{get:d.bind(n,A)});return a.seal(n),a.seal(v),v},t.revocable=function(n,e){return{proxy:new t(n,e),revoke:r}},t}},93217:function(t,n,r){"use strict";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var e,o,a=[],i=!0,u=!1;try{for(r=r.call(t);!(i=(e=r.next()).done)&&(a.push(e.value),!n||a.length!==n);i=!0);}catch(c){u=!0,o=c}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}(t,n)||l(t,n)||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 o(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function a(t,n,r){return a=i()?Reflect.construct:function(t,n,r){var e=[null];e.push.apply(e,n);var o=new(Function.bind.apply(t,e));return r&&u(o,r.prototype),o},a.apply(null,arguments)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function u(t,n){return u=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},u(t,n)}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||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 l(t,n){if(t){if("string"==typeof t)return f(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,n):void 0}}function f(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r1&&void 0!==arguments[1]?arguments[1]:self;n.addEventListener("message",(function r(i){if(i&&i.data){var u,l=Object.assign({path:[]},i.data),f=l.id,s=l.type,p=l.path,y=(i.data.argumentList||[]).map(O);try{var v=p.slice(0,-1).reduce((function(t,n){return t[n]}),t),h=p.reduce((function(t,n){return t[n]}),t);switch(s){case"GET":u=h;break;case"SET":v[p.slice(-1)[0]]=O(i.data.value),u=!0;break;case"APPLY":u=h.apply(v,y);break;case"CONSTRUCT":var m;u=P(a(h,c(y)));break;case"ENDPOINT":var w=new MessageChannel,S=w.port1,E=w.port2;d(t,E),u=A(S,[S]);break;case"RELEASE":u=void 0;break;default:return}}catch(m){u=o({value:m},b,0)}Promise.resolve(u).catch((function(t){return o({value:t},b,0)})).then((function(t){var o=e(j(t),2),a=o[0],i=o[1];n.postMessage(Object.assign(Object.assign({},a),{id:f}),i),"RELEASE"===s&&(n.removeEventListener("message",r),g(n))}))}})),n.start&&n.start()}function g(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function w(t){if(t)throw new Error("Proxy has been released and is not useable")}function S(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=!1,a=new Proxy(r,{get:function(r,e){if(w(o),e===v)return function(){return T(t,{type:"RELEASE",path:n.map((function(t){return t.toString()}))}).then((function(){g(t),o=!0}))};if("then"===e){if(0===n.length)return{then:function(){return a}};var i=T(t,{type:"GET",path:n.map((function(t){return t.toString()}))}).then(O);return i.then.bind(i)}return S(t,[].concat(c(n),[e]))},set:function(r,a,i){w(o);var u=e(j(i),2),l=u[0],f=u[1];return T(t,{type:"SET",path:[].concat(c(n),[a]).map((function(t){return t.toString()})),value:l},f).then(O)},apply:function(r,a,i){w(o);var u=n[n.length-1];if(u===y)return T(t,{type:"ENDPOINT"}).then(O);if("bind"===u)return S(t,n.slice(0,-1));var c=e(E(i),2),l=c[0],f=c[1];return T(t,{type:"APPLY",path:n.map((function(t){return t.toString()})),argumentList:l},f).then(O)},construct:function(r,a){w(o);var i=e(E(a),2),u=i[0],c=i[1];return T(t,{type:"CONSTRUCT",path:n.map((function(t){return t.toString()})),argumentList:u},c).then(O)}});return a}function E(t){var n,r=t.map(j);return[r.map((function(t){return t[0]})),(n=r.map((function(t){return t[1]})),Array.prototype.concat.apply([],n))]}var _=new WeakMap;function A(t,n){return _.set(t,n),t}function P(t){return Object.assign(t,o({},p,!0))}function j(t){var n,r=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=l(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}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 a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}(m);try{for(r.s();!(n=r.n()).done;){var o=e(n.value,2),a=o[0],i=o[1];if(i.canHandle(t)){var u=e(i.serialize(t),2);return[{type:"HANDLER",name:a,value:u[0]},u[1]]}}}catch(c){r.e(c)}finally{r.f()}return[{type:"RAW",value:t},_.get(t)||[]]}function O(t){switch(t.type){case"HANDLER":return m.get(t.name).deserialize(t.value);case"RAW":return t.value}}function T(t,n,r){return new Promise((function(e){var o=new Array(4).fill(0).map((function(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)})).join("-");t.addEventListener("message",(function n(r){r.data&&r.data.id&&r.data.id===o&&(t.removeEventListener("message",n),e(r.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:o},n),r)}))}}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/2dbdaab4.js.gz b/supervisor/api/panel/frontend_es5/2dbdaab4.js.gz deleted file mode 100644 index 10cccad76..000000000 Binary files a/supervisor/api/panel/frontend_es5/2dbdaab4.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/2e43fd79.js b/supervisor/api/panel/frontend_es5/2e43fd79.js deleted file mode 100644 index 3bfcd6be5..000000000 --- a/supervisor/api/panel/frontend_es5/2e43fd79.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[702],{3702:function(t,e,n){n.d(e,{jt:function(){return E}});var r=n(15304),i=n(57835),o=n(19596);var s=new WeakMap;function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||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 l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||c(t,e)||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 c(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:this.A(),n=Object.assign({},x);return e.forEach((function(t){return Object.assign(n,t.options.keyframeOptions)})),Object.assign(n,t),n}},{key:"j",value:function(t,e,n){t=Object.assign({},t),e=Object.assign({},e);var r=n.map((function(t){return t.animatingProperties})).filter((function(t){return void 0!==t})),i=1,o=1;return void 0!==r&&(r.forEach((function(t){t.width&&(i/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=i*t.left,e.left=i*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}},{key:"calculateKeyframes",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={},o={},s=!1,a={};for(var u in e){var l=t[u],c=e[u];if(u in j){var f=j[u];if(void 0===l||void 0===c)continue;var h=f(l,c);void 0!==h.transform&&(a[u]=h.value,s=!0,i.transform="".concat(null!==(n=i.transform)&&void 0!==n?n:""," ").concat(h.transform))}else l!==c&&void 0!==l&&void 0!==c&&(s=!0,i[u]=l,o[u]=c)}return i.transformOrigin=o.transformOrigin=r?"center center":"top left",this.animatingProperties=a,s?[i,o]:void 0}},{key:"animate",value:(a=p(regeneratorRuntime.mark((function t(e){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:this.options.keyframeOptions,this.start(),this.frames=e,r=!1,this.isAnimating()||this.isDisabled()||(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),void 0===e)){t.next=15;break}return this.log("animate",[e,n]),r=!0,this.webAnimation=this.element.animate(e,n),null==(i=this.getController())||i.add(this),t.prev=7,t.next=10,this.webAnimation.finished;case 10:t.next=14;break;case 12:t.prev=12,t.t0=t.catch(7);case 14:null==i||i.remove(this);case 15:return t.abrupt("return",(this.didFinish(r),r));case 16:case"end":return t.stop()}}),t,this,[[7,12]])}))),function(t){return a.apply(this,arguments)})},{key:"isAnimating",value:function(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}},{key:"log",value:function(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}],n&&d(e.prototype,n),o&&d(e,o),S}(o.s),E=(0,i.XM)(_);function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function F(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t,e)||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 I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=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=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"])),this.content,this.allowSvg,this.breaks):(0,i.dy)(C||(C=j([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,i.iv)(T||(T=j(["\n :host {\n display: block;\n }\n ha-markdown-element {\n -ms-user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n }\n ha-markdown-element > *:first-child {\n margin-top: 0;\n }\n ha-markdown-element > *:last-child {\n margin-bottom: 0;\n }\n a {\n color: var(--primary-color);\n }\n img {\n max-width: 100%;\n }\n code,\n pre {\n background-color: var(--markdown-code-background-color, none);\n border-radius: 3px;\n }\n svg {\n background-color: var(--markdown-svg-background-color, none);\n color: var(--markdown-svg-color, none);\n }\n code {\n font-size: 85%;\n padding: 0.2em 0.4em;\n }\n pre code {\n padding: 0;\n }\n pre {\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n font-family: var(--code-font-family, monospace);\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n line-height: initial;\n }\n h2 {\n font-size: 1.5em;\n font-weight: bold;\n }\n "])))}}]}}),i.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/2fd7f4ad.js.gz b/supervisor/api/panel/frontend_es5/2fd7f4ad.js.gz deleted file mode 100644 index a793b2ec9..000000000 Binary files a/supervisor/api/panel/frontend_es5/2fd7f4ad.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/32b31efd.js b/supervisor/api/panel/frontend_es5/32b31efd.js new file mode 100644 index 000000000..fa53f2441 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/32b31efd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[2395],{42395:function(e,t,r){r.r(t);var n=r(37500),i=r(63550),o=r(47181),s=r(83849),a=r(15493),c=r(96151),l=(r(66255),r(34154)),u=r(41682),d=r(63864);function p(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){p(o,n,i,s,a,"next",e)}function a(e){p(o,n,i,s,a,"throw",e)}s(void 0)}))}}function h(e){return document.cookie="ingress_session=".concat(e,";path=/api/hassio_ingress/;SameSite=Strict").concat("https:"===location.protocol?";Secure":""),e}var v,m,y,b,g,k,w=function(){var e=f(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,d.I)(t.config.version,2021,2,4)){e.next=5;break}return e.next=3,t.callWS({type:"supervisor/api",endpoint:"/ingress/session",method:"post"});case 3:return r=e.sent,e.abrupt("return",h(r.session));case 5:return e.next=7,t.callApi("POST","hassio/ingress/session");case 7:return n=e.sent,e.abrupt("return",h(n.data.session));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=f(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,d.I)(t.config.version,2021,2,4)){e.next=4;break}return e.next=3,t.callWS({type:"supervisor/api",endpoint:"/ingress/validate_session",method:"post",data:{session:r}});case 3:return e.abrupt("return");case 4:return e.next=6,t.callApi("POST","hassio/ingress/validate_session",{session:r});case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),E=r(26765);r(21625),r(47915);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 P(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function A(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){P(o,n,i,s,a,"next",e)}function a(e){P(o,n,i,s,a,"throw",e)}s(void 0)}))}}function S(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=B(e);if(t){var i=B(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return j(this,r)}}function j(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(){z=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!F(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);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 s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r "])));var e=(0,n.dy)(m||(m=S([""])),this._addon.ingress_url);return this.ingressPanel?(0,n.dy)(b||(b=S(["",""])),this.narrow||"always_hidden"===this.hass.dockedSidebar?(0,n.dy)(g||(g=S(['
    \n \n
    ',"
    \n
    \n ",""])),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,this._addon.name,e):e):(0,n.dy)(y||(y=S(["\n ","\n "])),this.hass,this._addon.name,this.narrow,e)}},{kind:"method",key:"firstUpdated",value:(d=A(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==this.route.path){e.next=34;break}if(!(t=(0,a.io)("addon"))){e.next=34;break}return e.prev=3,e.next=6,(0,l.AD)(this.hass,t);case 6:r=e.sent,e.next=17;break;case 9:return e.prev=9,e.t0=e.catch(3),e.next=13,(0,E.Ys)(this,{text:(0,u.js)(e.t0),title:t});case 13:return e.next=15,(0,c.y)();case 15:return(0,s.c)("/hassio/store",{replace:!0}),e.abrupt("return");case 17:if(r.version){e.next=25;break}return e.next=20,(0,E.Ys)(this,{text:this.supervisor.localize("my.error_addon_not_installed"),title:r.name});case 20:return e.next=22,(0,c.y)();case 22:(0,s.c)("/hassio/addon/".concat(r.slug,"/info"),{replace:!0}),e.next=34;break;case 25:if(r.ingress){e.next=33;break}return e.next=28,(0,E.Ys)(this,{text:this.supervisor.localize("my.error_addon_no_ingress"),title:r.name});case 28:return e.next=30,(0,c.y)();case 30:(0,s.c)("/hassio/addon/".concat(r.slug,"/info"),{replace:!0}),e.next=34;break;case 33:(0,s.c)("/hassio/ingress/".concat(r.slug),{replace:!0});case 34:case"end":return e.stop()}}),e,this,[[3,9]])}))),function(){return d.apply(this,arguments)})},{kind:"method",key:"updated",value:function(e){if(V(B(p.prototype),"updated",this).call(this,e),e.has("route")){var t=this.route.path.substr(1),r=e.get("route"),n=r?r.path.substr(1):void 0;t&&t!==n&&this._fetchData(t)}}},{kind:"method",key:"_fetchData",value:(r=A(regeneratorRuntime.mark((function e(t){var r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=w(this.hass),e.prev=1,e.next=4,(0,l.AD)(this.hass,t);case 4:n=e.sent,e.next=15;break;case 7:return e.prev=7,e.t0=e.catch(1),e.next=11,(0,E.Ys)(this,{text:"Unable to fetch add-on info to start Ingress",title:"Supervisor"});case 11:return e.next=13,(0,c.y)();case 13:return history.back(),e.abrupt("return");case 15:if(n.ingress_url){e.next=22;break}return e.next=18,(0,E.Ys)(this,{text:"Add-on does not support Ingress",title:n.name});case 18:return e.next=20,(0,c.y)();case 20:return history.back(),e.abrupt("return");case 22:if("started"===n.state){e.next=29;break}return e.next=25,(0,E.Ys)(this,{text:"Add-on is not running. Please start it first",title:n.name});case 25:return e.next=27,(0,c.y)();case 27:return(0,s.c)("/hassio/addon/".concat(n.slug,"/info"),{replace:!0}),e.abrupt("return");case 29:return e.prev=29,e.next=32,r;case 32:i=e.sent,e.next=43;break;case 35:return e.prev=35,e.t1=e.catch(29),e.next=39,(0,E.Ys)(this,{text:"Unable to create an Ingress session",title:n.name});case 39:return e.next=41,(0,c.y)();case 41:return history.back(),e.abrupt("return");case 43:this._sessionKeepAlive&&clearInterval(this._sessionKeepAlive),this._sessionKeepAlive=window.setInterval(A(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,x(o.hass,i);case 3:e.next=10;break;case 5:return e.prev=5,e.t0=e.catch(0),e.next=9,w(o.hass);case 9:i=e.sent;case 10:case"end":return e.stop()}}),e,null,[[0,5]])}))),6e4),this._addon=n;case 46:case"end":return e.stop()}}),e,this,[[1,7],[29,35]])}))),function(e){return r.apply(this,arguments)})},{kind:"method",key:"_toggleMenu",value:function(){(0,o.B)(this,"hass-toggle-menu")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(k||(k=S(["\n iframe {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n }\n\n .header + iframe {\n height: calc(100% - 40px);\n }\n\n .header {\n display: flex;\n align-items: center;\n font-size: 16px;\n height: 40px;\n padding: 0 16px;\n pointer-events: none;\n background-color: var(--app-header-background-color);\n font-weight: 400;\n color: var(--app-header-text-color, white);\n border-bottom: var(--app-header-border-bottom, none);\n box-sizing: border-box;\n --mdc-icon-size: 20px;\n }\n\n .main-title {\n margin: 0 0 0 24px;\n line-height: 20px;\n flex-grow: 1;\n }\n\n ha-icon-button {\n pointer-events: auto;\n }\n\n hass-subpage {\n --app-header-background-color: var(--sidebar-background-color);\n --app-header-text-color: var(--sidebar-text-color);\n --app-header-border-bottom: 1px solid var(--divider-color);\n }\n "])))}}]}}),n.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/32b31efd.js.gz b/supervisor/api/panel/frontend_es5/32b31efd.js.gz new file mode 100644 index 000000000..80f8fbab9 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/32b31efd.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/33513860.js b/supervisor/api/panel/frontend_es5/33513860.js new file mode 100644 index 000000000..cd8ab8726 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/33513860.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[3117],{40095:function(e,t,i){i.d(t,{e:function(){return n},f:function(){return r}});var n=function(e,t){return r(e.attributes,t)},r=function(e,t){return 0!=(e.supported_features&t)}},3117:function(e,t,i){i.r(t),i.d(t,{HaMediaSelector:function(){return S}});var n,r,o,a,s,l,c=i(37500),d=i(63550),u=i(8636),p=i(47181),f=i(40095),h=i(22814),m=i(69371),v=i(11254);i(9381),i(63727);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 b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=w(e);if(t){var r=w(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return k(this,i)}}function k(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function H(){H=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(i){t.forEach((function(t){t.kind===i&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var i=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var r=t.placement;if(t.kind===n&&("static"===r||"prototype"===r)){var o="static"===r?e:i;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var i=t.descriptor;if("field"===t.kind){var n=t.initializer;i={enumerable:i.enumerable,writable:i.writable,configurable:i.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,i)},decorateClass:function(e,t){var i=[],n=[],r={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,r)}),this),e.forEach((function(e){if(!L(e))return i.push(e);var t=this.decorateElement(e,r);i.push(t.element),i.push.apply(i,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:i,finishers:n};var o=this.decorateConstructor(i,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,i){var n=t[e.placement];if(!i&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var i=[],n=[],r=e.decorators,o=r.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,r[o])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var d=0;d=0;n--){var r=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(r)||r);if(void 0!==o.finisher&&i.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;ae.length)&&(t=e.length);for(var i=0,n=new Array(t);i\n ",""])),this.hass,null===(i=this.value)||void 0===i?void 0:i.entity_id,this.label||this.hass.localize("ui.components.selectors.media.pick_media_player"),this.disabled,this.helper,this.required,this._entityChanged,w?(0,c.dy)(o||(o=b(["\n ','\n \n
    \n ',"\n
    \n
    "])),this._pickMedia,this.disabled||null===(l=this.value)||void 0===l||!l.entity_id?"disabled":"",(0,u.$)({portrait:!(null===(d=this.value)||void 0===d||null===(p=d.metadata)||void 0===p||!p.media_class)&&"portrait"===m.Fn[this.value.metadata.children_media_class||this.value.metadata.media_class].thumbnail_ratio}),null!==(h=this.value)&&void 0!==h&&null!==(v=h.metadata)&&void 0!==v&&v.thumbnail?(0,c.dy)(a||(a=b(['\n \n =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 d=0;d=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\n

    \n ',"\n

    \n \n \n
    \n \n ',":\n \n ",'\n
    \n
    \n \n ',":\n \n ","\n
    \n ",'\n
    \n \n ',":\n \n
    ","
    \n
    \n "])),e.name,e.by_id||void 0,t._dialogParams.supervisor.localize("dialog.hardware.subsystem"),e.subsystem,t._dialogParams.supervisor.localize("dialog.hardware.device_path"),e.dev_path,e.by_id?(0,l.dy)(a||(a=y(['
    \n \n ',":\n \n ","\n
    "])),t._dialogParams.supervisor.localize("dialog.hardware.id"),e.by_id):"",t._dialogParams.supervisor.localize("dialog.hardware.attributes"),(0,f.dump)(e.attributes,{indent:2}))})))}},{kind:"method",key:"_handleSearchChange",value:function(e){this._filter=e.detail.value}},{kind:"get",static:!0,key:"styles",value:function(){return[h.Qx,h.yu,(0,l.iv)(s||(s=y(["\n ha-icon-button {\n position: absolute;\n right: 16px;\n top: 10px;\n text-decoration: none;\n color: var(--primary-text-color);\n }\n h2 {\n margin: 18px 42px 0 18px;\n color: var(--primary-text-color);\n }\n\n ha-expansion-panel {\n margin: 4px 0;\n }\n pre,\n code {\n background-color: var(--markdown-code-background-color, none);\n border-radius: 3px;\n }\n pre {\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n font-family: var(--code-font-family, monospace);\n }\n code {\n font-size: 85%;\n padding: 0.2em 0.4em;\n }\n search-input {\n margin: 8px 16px 0;\n display: block;\n }\n .device-property {\n display: flex;\n justify-content: space-between;\n }\n .attributes {\n margin-top: 12px;\n }\n "])))]}}]}}),l.oi)},17628:function(e,t,r){r.r(t),r.d(t,{dump:function(){return n.$w}});var n=r(77426)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/3c3e8a51.js.gz b/supervisor/api/panel/frontend_es5/3c3e8a51.js.gz new file mode 100644 index 000000000..468548bb6 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/3c3e8a51.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/3f6d8982.js b/supervisor/api/panel/frontend_es5/3f6d8982.js new file mode 100644 index 000000000..7b70a4ec6 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/3f6d8982.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[7628],{17628:function(n,s,t){t.r(s),t.d(s,{dump:function(){return e.$w}});var e=t(77426)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/3f6d8982.js.gz b/supervisor/api/panel/frontend_es5/3f6d8982.js.gz new file mode 100644 index 000000000..72fc4e9bb Binary files /dev/null and b/supervisor/api/panel/frontend_es5/3f6d8982.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/3f904f2c.js b/supervisor/api/panel/frontend_es5/3f904f2c.js deleted file mode 100644 index 7ff7809eb..000000000 --- a/supervisor/api/panel/frontend_es5/3f904f2c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[708],{52708:function(e,t,r){r.r(t);r(44577);var i,n,o,s,a,c,l,d=r(37500),u=r(63550),f=r(14516),p=r(47181),h=(r(34552),r(93546),r(86248),r(41682)),m=r(35460),v=r(26765),y=r(11654);function g(e){return g="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},g(e)}function k(e,t,r,i,n,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(i,n)}function b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=x(e);if(t){var n=x(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return D(e)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function z(){z=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!O(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,n[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=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 s=0;se.length)&&(t=e.length);for(var r=0,i=new Array(t);r\n ","\n \n "])),this.moving?this.dialogParams.supervisor.localize("dialog.datadisk_move.moving"):this.dialogParams.supervisor.localize("dialog.datadisk_move.title"),this.closeDialog,this.moving,this.moving?(0,d.dy)(o||(o=b([' \n \n

    \n ',"\n

    "])),this.dialogParams.supervisor.localize("dialog.datadisk_move.moving_desc")):(0,d.dy)(s||(s=b([" ",'\n\n =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\n ',"\n "])),this.label?(0,s.dy)(i||(i=f(["

    ","","

    "])),this.label,this.required?" *":""):"",this.hass,this.value,this.disabled,this._handleChange,this.helper?(0,s.dy)(o||(o=f(["",""])),this.helper):"")}},{kind:"method",key:"_handleChange",value:function(e){var t=e.target.value;this.value!==t&&(0,c.B)(this,"value-changed",{value:t})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,s.iv)(a||(a=f(["\n p {\n margin-top: 0;\n }\n "])))}}]}}),s.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/420c6b2a.js.gz b/supervisor/api/panel/frontend_es5/420c6b2a.js.gz new file mode 100644 index 000000000..10e71ab26 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/420c6b2a.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/438d8504.js b/supervisor/api/panel/frontend_es5/438d8504.js new file mode 100644 index 000000000..31e1ee75f --- /dev/null +++ b/supervisor/api/panel/frontend_es5/438d8504.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6515],{58831:function(e,t,r){r.d(t,{M:function(){return n}});var n=function(e){return e.substr(0,e.indexOf("."))}},22311:function(e,t,r){r.d(t,{N:function(){return i}});var n=r(58831),i=function(e){return(0,n.M)(e.entity_id)}},56515:function(e,t,r){r.r(t),r.d(t,{HaLocationSelector:function(){return qe}});var n=r(37500),i=r(63550),o=r(14516),a=r(47181);r(16235);function s(e,t,r,n,i,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(n,i)}var l,c,u,d=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.parentNode){e.next=2;break}throw new Error("Cannot setup Leaflet map on disconnected element");case 2:return e.next=4,r.e(208).then(r.t.bind(r,70208,23));case 4:return(n=e.sent.default).Icon.Default.imagePath="/static/images/leaflet/images/",i=n.map(t),(o=document.createElement("link")).setAttribute("href","/static/images/leaflet/leaflet.css"),o.setAttribute("rel","stylesheet"),t.parentNode.appendChild(o),i.setView([52.3731339,4.8903147],13),a=f(n).addTo(i),e.abrupt("return",[i,n,a]);case 14:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){s(o,n,i,a,l,"next",e)}function l(e){s(o,n,i,a,l,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),f=function(e){return e.tileLayer("https://basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}".concat(e.Browser.retina?"@2x.png":".png"),{attribution:'©
    OpenStreetMap, © CARTO',subdomains:"abcd",minZoom:0,maxZoom:20})},p=r(22311),h=r(91741),m=r(54845),y=(r(66255),r(70483));function v(e){return v="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},v(e)}function b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_(e);if(t){var i=_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return E(this,r)}}function E(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function O(){O=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!x(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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=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=0){var u=t.gradualOpacity?a+c*o:void 0;e._mapPaths.push(n.circleMarker(t.points[c],{radius:3,color:t.color||i,opacity:u,fillOpacity:u,interactive:!1}))}e._mapPaths.forEach((function(e){return r.addLayer(e)}))}))}}},{kind:"method",key:"_drawEntities",value:function(){var e,t=this.hass,r=this.leafletMap,n=this.Leaflet;if(t&&r&&n&&(this._mapItems.length&&(this._mapItems.forEach((function(e){return e.remove()})),this._mapItems=[]),this._mapZones.length&&(this._mapZones.forEach((function(e){return e.remove()})),this._mapZones=[]),this.entities)){var i,o=getComputedStyle(this),a=o.getPropertyValue("--accent-color"),s=o.getPropertyValue("--dark-primary-color"),l=(null!==(e=this.darkMode)&&void 0!==e?e:this.hass.themes.darkMode)?"dark":"light",c=F(this.entities);try{for(c.s();!(i=c.n()).done;){var u=i.value,d=t.states[se(u)];if(d){var f=(0,h.C)(d),m=d.attributes,y=m.latitude,v=m.longitude,b=m.passive,k=m.icon,g=m.radius,w=m.entity_picture,E=m.gps_accuracy;if(y&&v)if("zone"!==(0,p.N)(d)){var P=f.split(" ").map((function(e){return e[0]})).join("").substr(0,3);this._mapItems.push(n.marker([y,v],{icon:n.divIcon({html:'\n \n "),iconSize:[48,48],className:""}),title:(0,h.C)(d)})),E&&this._mapItems.push(n.circle([y,v],{interactive:!1,color:s,radius:E}))}else{if(b)continue;var _="";if(k){var O=document.createElement("ha-icon");O.setAttribute("icon",k),_=O.outerHTML}else{var C=document.createElement("span");C.innerHTML=f,_=C.outerHTML}this._mapZones.push(n.marker([y,v],{icon:n.divIcon({html:_,iconSize:[24,24],className:l}),interactive:!1,title:f})),this._mapZones.push(n.circle([y,v],{interactive:!1,color:a,radius:g}))}}}}catch(S){c.e(S)}finally{c.f()}this._mapItems.forEach((function(e){return r.addLayer(e)})),this._mapZones.forEach((function(e){return r.addLayer(e)}))}}},{kind:"method",key:"_attachObserver",value:(r=B(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resizeObserver){e.next=4;break}return e.next=3,(0,m.P)();case 3:this._resizeObserver=new ResizeObserver((function(){var e;null===(e=t.leafletMap)||void 0===e||e.invalidateSize({debounceMoveend:!0})}));case 4:this._resizeObserver.observe(this);case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(T||(e=["\n :host {\n display: block;\n height: 300px;\n }\n #map {\n height: 100%;\n }\n #map.dark {\n background: #090909;\n --map-filter: invert(0.9) hue-rotate(170deg) grayscale(0.7);\n }\n .light {\n color: #000000;\n }\n .dark {\n color: #ffffff;\n }\n .leaflet-tile-pane {\n filter: var(--map-filter);\n }\n .dark .leaflet-bar a {\n background-color: var(--card-background-color, #1c1c1c);\n color: #ffffff;\n }\n .leaflet-marker-draggable {\n cursor: move !important;\n }\n .leaflet-edit-resize {\n border-radius: 50%;\n cursor: nesw-resize !important;\n }\n .named-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n text-align: center;\n color: var(--primary-text-color);\n }\n .leaflet-pane {\n z-index: 0 !important;\n }\n .leaflet-control,\n .leaflet-top,\n .leaflet-bottom {\n z-index: 1 !important;\n }\n "],t||(t=e.slice(0)),T=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))));var e,t}}]}}),n.fl);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 ce(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ue(e,t){return ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ue(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pe(e);if(t){var i=Pe(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fe(this,r)}}function fe(e,t){if(t&&("object"===le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pe(e)}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function he(){he=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!ve(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n ","\n "])),this.hass,this._getLayers(this._circles,this._locationMarkers),this.zoom,this.autoFit,this.darkMode,this.helper?(0,n.dy)(oe||(oe=ce(["",""])),this.helper):"")}},{kind:"field",key:"_getLayers",value:function(){return(0,o.Z)((function(e,t){var r=[];return Array.prototype.push.apply(r,Object.values(e)),t&&Array.prototype.push.apply(r,Object.values(t)),r}))}},{kind:"method",key:"willUpdate",value:function(e){Ee(Pe(s.prototype),"willUpdate",this).call(this,e),this.Leaflet&&e.has("locations")&&this._updateMarkers()}},{kind:"method",key:"_updateLocation",value:function(e){var t=e.target,r=t.getLatLng(),n=r.lng;Math.abs(n)>180&&(n=(n%360+540)%360-180);var i=[r.lat,n];(0,a.B)(this,"location-updated",{id:t.id,location:i},{bubbles:!1})}},{kind:"method",key:"_updateRadius",value:function(e){var t=e.target,r=this._locationMarkers[t.id];(0,a.B)(this,"radius-updated",{id:t.id,radius:r.getRadius()},{bubbles:!1})}},{kind:"method",key:"_markerClicked",value:function(e){var t=e.target;(0,a.B)(this,"marker-clicked",{id:t.id},{bubbles:!1})}},{kind:"method",key:"_updateMarkers",value:function(){var e=this;if(!this.locations||!this.locations.length)return this._circles={},void(this._locationMarkers=void 0);var t={},r={},n=getComputedStyle(this).getPropertyValue("--accent-color");this.locations.forEach((function(i){var o;if(i.icon){var a=document.createElement("div");a.className="named-icon",i.name&&(a.innerText=i.name);var s=document.createElement("ha-icon");s.setAttribute("icon",i.icon),a.prepend(s),o=e.Leaflet.divIcon({html:a.outerHTML,iconSize:[24,24],className:"light"})}if(i.radius){var l=e.Leaflet.circle([i.latitude,i.longitude],{color:i.radius_color||n,radius:i.radius});i.radius_editable||i.location_editable?(l.editing.enable(),l.addEventListener("add",(function(){var t=l.editing._moveMarker,r=l.editing._resizeMarkers[0];o&&t.setIcon(o),r.id=t.id=i.id,t.addEventListener("dragend",(function(t){return e._updateLocation(t)})).addEventListener("click",(function(t){return e._markerClicked(t)})),i.radius_editable?r.addEventListener("dragend",(function(t){return e._updateRadius(t)})):r.remove()})),t[i.id]=l):r[i.id]=l}if(!i.radius||!i.radius_editable&&!i.location_editable){var c={title:i.name,draggable:i.location_editable};o&&(c.icon=o);var u=e.Leaflet.marker([i.latitude,i.longitude],c).addEventListener("dragend",(function(t){return e._updateLocation(t)})).addEventListener("click",(function(t){return e._markerClicked(t)}));u.id=i.id,t[i.id]=u}})),this._circles=r,this._locationMarkers=t,(0,a.B)(this,"markers-updated")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(ae||(ae=ce(["\n ha-map {\n display: block;\n height: 100%;\n }\n "])))}}]}}),n.oi);function Ce(e){return Ce="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},Ce(e)}function Se(e,t){return $e(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||Ue(e,t)||Ve()}function xe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){return je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},je(e,t)}function Ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Me(e);if(t){var i=Me(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return De(this,r)}}function De(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Te(e)}function Te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}function Re(){Re=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Be(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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=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\n "],t||(t=e.slice(0)),n=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,this.label,this.value,this.required,this.disabled,this.helper,this._valueChanged);var e,t}},{kind:"method",key:"_valueChanged",value:function(e){(0,a.B)(this,"value-changed",{value:e.detail.value})}}]}}),i.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/494ca23c.js.gz b/supervisor/api/panel/frontend_es5/494ca23c.js.gz new file mode 100644 index 000000000..052f81d07 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/494ca23c.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/4da5d920.js b/supervisor/api/panel/frontend_es5/4da5d920.js new file mode 100644 index 000000000..41a22a2f6 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/4da5d920.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[3512],{23512:function(e,t,r){r.r(t),r.d(t,{HaColorRGBSelector:function(){return x}});var n,i,o=r(37500),a=r(63550),s=r(15838),l=r(47181);r(3555);function c(e){return c="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},c(e)}function f(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=y(e);if(t){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(){v=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!k(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 f=0;f=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=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(a)||a);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 s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r',"\n ","\n \n "])),this.label||this.hass.localize("ui.components.theme-picker.theme"),this.value,this.required,this.disabled,this._changed,c.U,this.hass.localize("ui.components.theme-picker.no_theme"),Object.keys(this.hass.themes.themes).sort().map((function(e){return(0,s.dy)(i||(i=f(["",""])),e,e)})))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,s.iv)(o||(o=f(["\n ha-select {\n width: 100%;\n }\n "])))}},{kind:"method",key:"_changed",value:function(e){this.hass&&""!==e.target.value&&(this.value="remove"===e.target.value?void 0:e.target.value,(0,l.B)(this,"value-changed",{value:this.value}))}}]}}),s.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 A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_(e);if(t){var i=_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return z(this,r)}}function z(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function F(){F=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!B(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[o])(a)||a);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 s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n "],t||(t=e.slice(0)),S=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.hass,this.value,this.label,this.disabled,this.required);var e,t}}]}}),s.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/5094f794.js.gz b/supervisor/api/panel/frontend_es5/5094f794.js.gz new file mode 100644 index 000000000..e585b97f8 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/5094f794.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/53a1e29c.js b/supervisor/api/panel/frontend_es5/53a1e29c.js new file mode 100644 index 000000000..45d96afdc --- /dev/null +++ b/supervisor/api/panel/frontend_es5/53a1e29c.js @@ -0,0 +1 @@ +!function(){"use strict";var r,t,e={5425:function(r,t,e){var n=e(93217);e(58556);function o(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==e)return;var n,o,u=[],i=!0,a=!1;try{for(e=e.call(r);!(i=(n=e.next()).done)&&(u.push(n.value),!t||u.length!==t);i=!0);}catch(f){a=!0,o=f}finally{try{i||null==e.return||e.return()}finally{if(a)throw o}}return u}(r,t)||function(r,t){if(!r)return;if("string"==typeof r)return u(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return u(r,t)}(r,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(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);ea?1*u:0}))}};(0,n.Jj)(i)}},n={};function o(r){var t=n[r];if(void 0!==t)return t.exports;var u=n[r]={exports:{}};return e[r](u,u.exports,o),u.exports}o.m=e,o.x=function(){var r=o.O(void 0,[9191],(function(){return o(5425)}));return r=o.O(r)},r=[],o.O=function(t,e,n,u){if(!e){var i=1/0;for(c=0;c=u)&&Object.keys(o.O).every((function(r){return o.O[r](e[f])}))?e.splice(f--,1):(a=!1,u0&&r[c-1][2]>u;c--)r[c]=r[c-1];r[c]=[e,n,u]},o.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(t,{a:t}),t},o.d=function(r,t){for(var e in t)o.o(t,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o.f={},o.e=function(r){return Promise.all(Object.keys(o.f).reduce((function(t,e){return o.f[e](r,t),t}),[]))},o.u=function(r){return"ed6e5677.js"},o.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},o.p="/api/hassio/app/frontend_es5/",function(){var r={5477:1,5425:1};o.f.i=function(t,e){r[t]||importScripts(o.p+o.u(t))};var t=self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[],e=t.push.bind(t);t.push=function(t){var n=t[0],u=t[1],i=t[2];for(var a in u)o.o(u,a)&&(o.m[a]=u[a]);for(i&&i(o);n.length;)r[n.pop()]=1;e(t)}}(),t=o.x,o.x=function(){return o.e(9191).then(t)};o.x()}(); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/53a1e29c.js.gz b/supervisor/api/panel/frontend_es5/53a1e29c.js.gz new file mode 100644 index 000000000..a5af1a15e Binary files /dev/null and b/supervisor/api/panel/frontend_es5/53a1e29c.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/5467c324.js b/supervisor/api/panel/frontend_es5/5467c324.js new file mode 100644 index 000000000..552936f27 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/5467c324.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[8763],{48763:function(e,t,r){var n,i,o,a,s,l,c,d,u,f,h,v=r(37500),p=r(63550),y=r(14516),m=r(47181),b=r(58831),g=r(27269),k=r(5986),w=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,t,r,n,i,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(n,i)}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function P(e,t){return U(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||V(e,t)||L()}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=T(e);if(t){var i=T(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return A(this,r)}}function A(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return D(e)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function z(){z=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!I(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n ',"\n ","\n \n ","\n ",""])),this.hass,null===(r=this._value)||void 0===r?void 0:r.service,this.disabled,this._serviceChanged,null!=g&&g.description?(0,v.dy)(i||(i=C(["

    ","

    "])),null==g?void 0:g.description):"",this._manifest?(0,v.dy)(o||(o=C([" \n \n '])),this._manifest.is_built_in?(0,w.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=C(["\n ",'\n ','\n ',""])),this.narrow,E?(0,v.dy)(s||(s=C(['
    ']))):"",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=C([""])),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):"",k?(0,v.dy)(c||(c=C([""])),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,n,i,o=Z(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)(d||(d=C(["\n ",'\n ','\n ',"\n \n "])),b.narrow,o?(0,v.dy)(f||(f=C(["'])),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)(u||(u=C(['
    ']))):"",e.name||e.key,null==e?void 0:e.description,b.disabled||o&&!b._checkedKeys.has(e.key)&&(!(null!==(n=b._value)&&void 0!==n&&n.data)||void 0===b._value.data[e.key]),b.hass,e.selector,e.key,b._serviceDataChanged,null!==(i=b._value)&&void 0!==i&&i.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,n=e.currentTarget.key;if(r){var i,o,a;this._checkedKeys.add(n);var s,l=null===(i=this._getServiceInfo(null===(a=this._value)||void 0===a?void 0:a.service,this.hass.services))||void 0===i||null===(o=i.fields.find((function(e){return e.key===n})))||void 0===o?void 0:o.default;if(l)t=Object.assign({},null===(s=this._value)||void 0===s?void 0:s.data,O({},n,l))}else{var c;this._checkedKeys.delete(n),delete(t=Object.assign({},null===(c=this._value)||void 0===c?void 0:c.data))[n]}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,n;e.stopPropagation();var i=e.detail.value;if((null===(t=this._value)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.entity_id)!==i){var o,a;if(!i&&null!==(n=this._value)&&void 0!==n&&n.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,n=e.detail.value;(null===(t=this._value)||void 0===t?void 0:t.target)!==n&&(n?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,n,i,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!==(n=this._value)&&void 0!==n&&null!==(i=n.data)&&void 0!==i&&i[a]||""!==s&&void 0!==s)){var l=Object.assign({},null===(o=this._value)||void 0===o?void 0:o.data,O({},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=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._manifest=void 0,e.prev=1,e.next=4,(0,k.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(n,i){var o=r.apply(e,t);function a(e){E(o,n,i,a,s,"next",e)}function s(e){E(o,n,i,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=C(["\n ha-settings-row {\n padding: var(--service-control-padding, 0 16px);\n }\n ha-settings-row {\n --paper-time-input-justify-content: flex-end;\n --settings-row-content-width: 100%;\n --settings-row-prefix-display: contents;\n border-top: var(\n --service-control-items-border-top,\n 1px solid var(--divider-color)\n );\n }\n ha-service-picker,\n ha-entity-picker,\n ha-yaml-editor {\n display: block;\n margin: var(--service-control-padding, 0 16px);\n }\n ha-yaml-editor {\n padding: 16px 0;\n }\n p {\n margin: var(--service-control-padding, 0 16px);\n padding: 16px 0;\n }\n .checkbox-spacer {\n width: 32px;\n }\n ha-checkbox {\n margin-left: -16px;\n }\n .help-icon {\n color: var(--secondary-text-color);\n }\n .description {\n justify-content: space-between;\n display: flex;\n align-items: center;\n padding-right: 2px;\n }\n "])))}}]}}),v.oi)},49461:function(e,t,r){var n,i,o=r(37500),a=r(63550),s=r(14516),l=r(47181),c=r(5986);r(77576);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 u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=y(e);if(t){var i=y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}function v(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(){m=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!k(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n ",'\n ',"\n"])),e.name,e.name===e.service?"":e.service)},S=function(e,t,r,n){var i=m();if(n)for(var o=0;o\n ',"\n ","\n ","\n ","\n ","\n \n ","\n "])),(0,f.$)(i),this.renderRipple(),this.outlined?this.renderOutline():this.renderLabel(),this.renderInput(),this.renderCharCounter(t),this.renderLineRipple(),this.renderHelperText(o,n))}},{key:"renderInput",value:function(){var e=this.label?"label":void 0,t=-1===this.minLength?void 0:this.minLength,n=-1===this.maxLength?void 0:this.maxLength,r=this.autocapitalize?this.autocapitalize:void 0;return(0,a.dy)(o||(o=y(["\n \n '])),(0,s.o)(e),(0,l.a)(this.value),this.rows,this.cols,this.disabled,this.placeholder,this.required,this.readOnly,(0,s.o)(t),(0,s.o)(n),(0,s.o)(""===this.name?void 0:this.name),(0,s.o)(this.inputMode),(0,s.o)(r),this.handleInputChange,this.onInputBlur)}}])&&v(t.prototype,n),i&&v(t,i),c}(u.P);(0,i.__decorate)([(0,c.IO)("textarea")],g.prototype,"formElement",void 0),(0,i.__decorate)([(0,c.Cb)({type:Number})],g.prototype,"rows",void 0),(0,i.__decorate)([(0,c.Cb)({type:Number})],g.prototype,"cols",void 0),(0,i.__decorate)([(0,c.Cb)({converter:{fromAttribute:function(e){return null!==e&&(""===e||e)},toAttribute:function(e){return"boolean"==typeof e?e?"":null:e}}})],g.prototype,"charCounter",void 0)},96791:function(e,t,n){var r;n.d(t,{W:function(){return u}});var o,i,u=(0,n(37500).iv)(r||(o=[".mdc-text-field{height:100%}.mdc-text-field__input{resize:none}"],i||(i=o.slice(0)),r=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}}))))},95337:function(e,t,n){n.d(t,{L:function(){return i}});var r={en:"US",zh:"CN",zh_hans:"CN",hans:"CN",wuu:"CN",hsn:"CN",hak:"CN",nan:"CN",gan:"CN",hi:"IN",te:"IN",mr:"IN",ta:"IN",gu:"IN",kn:"IN",or:"IN",ml:"IN",pa_guru:"IN",bho:"IN",awa:"IN",as:"IN",mwr:"IN",mai:"IN",mag:"IN",bgc:"IN",hne:"IN",dcc:"IN",dz:"BT",tn:"BW",am:"ET",om:"ET",quc:"GT",id:"ID",jv:"ID",su:"ID",mad:"ID",ms_arab:"ID",ga:"IE",he:"IL",jam:"JM",ja:"JP",km:"KH",ko:"KR",lo:"LA",mh:"MH",my:"MM",mt:"MT",ne:"NP",fil:"PH",ceb:"PH",ilo:"PH",ur:"PK",pa:"PK",pa_arab:"PK",arab:"PK",lah:"PK",ps:"PK",sd:"PK",sd_arab:"PK",skr:"PK",gn:"PY",th:"TH",tts:"TH",aeb:"TN",zh_hant:"TW",hant:"TW",sm:"WS",zu:"ZA",sn:"ZW",arq:"DZ",ar:"EG",arz:"EG",fa:"IR",az_arab:"IR",ary:"MA",bn:"BD",rkt:"BD",dv:"MV"},o={AG:0,ATG:0,28:0,AR:0,ARG:0,32:0,AS:0,ASM:0,16:0,AU:0,AUS:0,36:0,BR:0,BRA:0,76:0,BS:0,BHS:0,44:0,BT:0,BTN:0,64:0,BW:0,BWA:0,72:0,BZ:0,BLZ:0,84:0,CA:0,CAN:0,124:0,CN:0,CHN:0,156:0,CO:0,COL:0,170:0,DM:0,DMA:0,212:0,DO:0,DOM:0,214:0,ET:0,ETH:0,231:0,GT:0,GTM:0,320:0,GU:0,GUM:0,316:0,HK:0,HKG:0,344:0,HN:0,HND:0,340:0,ID:0,IDN:0,360:0,IE:0,IRL:0,372:0,IL:0,ISR:0,376:0,IN:0,IND:0,356:0,JM:0,JAM:0,388:0,JP:0,JPN:0,392:0,KE:0,KEN:0,404:0,KH:0,KHM:0,116:0,KR:0,KOR:0,410:0,LA:0,LA0:0,418:0,MH:0,MHL:0,584:0,MM:0,MMR:0,104:0,MO:0,MAC:0,446:0,MT:0,MLT:0,470:0,MX:0,MEX:0,484:0,MZ:0,MOZ:0,508:0,NI:0,NIC:0,558:0,NP:0,NPL:0,524:0,NZ:0,NZL:0,554:0,PA:0,PAN:0,591:0,PE:0,PER:0,604:0,PH:0,PHL:0,608:0,PK:0,PAK:0,586:0,PR:0,PRI:0,630:0,PY:0,PRY:0,600:0,SA:0,SAU:0,682:0,SG:0,SGP:0,702:0,SV:0,SLV:0,222:0,TH:0,THA:0,764:0,TN:0,TUN:0,788:0,TT:0,TTO:0,780:0,TW:0,TWN:0,158:0,UM:0,UMI:0,581:0,US:0,USA:0,840:0,VE:0,VEN:0,862:0,VI:0,VIR:0,850:0,WS:0,WSM:0,882:0,YE:0,YEM:0,887:0,ZA:0,ZAF:0,710:0,ZW:0,ZWE:0,716:0,AE:6,ARE:6,784:6,AF:6,AFG:6,4:6,BH:6,BHR:6,48:6,DJ:6,DJI:6,262:6,DZ:6,DZA:6,12:6,EG:6,EGY:6,818:6,IQ:6,IRQ:6,368:6,IR:6,IRN:6,364:6,JO:6,JOR:6,400:6,KW:6,KWT:6,414:6,LY:6,LBY:6,434:6,MA:6,MAR:6,504:6,OM:6,OMN:6,512:6,QA:6,QAT:6,634:6,SD:6,SDN:6,729:6,SY:6,SYR:6,760:6,BD:5,BGD:5,50:5,MV:5,MDV:5,462:5};function i(e){return function(e,t,n){if(e){var r,o=e.toLowerCase().split(/[-_]/),i=o[0];if(o[1]&&4===o[1].length?(i+="_"+o[1],r=o[2]):r=o[1],r||(r=t[i]),r)return function(e,t){var n=t["string"==typeof e?e.toUpperCase():e];return"number"==typeof n?n:1}(r.match(/^\d+$/)?Number(r):r,n)}return 1}(e,r,o)}},1460:function(e,t,n){n.d(t,{l:function(){return v}});var r=n(15304),o=n(38941);function i(e){return i="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},i(e)}function u(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)return;var r,o,i=[],u=!0,a=!1;try{for(n=n.call(e);!(u=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);u=!0);}catch(c){a=!0,o=c}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(e,t)}(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&othis._$Cft);f++){var s=c(f);if("object"===y(s))return s.v}return r.Jb}},{key:"disconnected",value:function(){this._$CG.disconnect(),this._$CK.pause()}},{key:"reconnected",value:function(){this._$CG.reconnect(this),this._$CK.resume()}}],n&&v(t.prototype,n),o&&v(t,o),u}(u.s),O=(0,o.XM)(k)},69505:function(e,t,n){n.d(t,{DD:function(){return _},Yj:function(){return K},IX:function(){return H},hu:function(){return E},f0:function(){return D},O7:function(){return L},is:function(){return T},i0:function(){return G},Rx:function(){return U},Ry:function(){return Y},jt:function(){return W},lF:function(){return q},Z_:function(){return Z},G0:function(){return J}});var r=["message"];function o(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw i}}}}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 p(e){return function(e){if(Array.isArray(e))return v(e)}(e)||h(e)||y(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 y(e,t){if(e){if("string"==typeof e)return v(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)?v(e,t):void 0}}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t="function"==typeof Map?new Map:void 0;return g=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return x(e,arguments,A(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),O(r,e)},g(e)}function x(e,t,n){return x=k()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&O(o,n.prototype),o},x.apply(null,arguments)}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function O(e,t){return O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},O(e,t)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var _=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}}),t&&O(e,t)}(i,e);var t,n,o=(t=i,n=k(),function(){var e,r=A(t);if(n){var o=A(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return m(this,e)});function i(e,t){var n,u;b(this,i);var a=e.message,c=d(e,r),f=e.path,s=0===f.length?a:"At path: "+f.join(".")+" -- "+a;return n=o.call(this,s),Object.assign(w(n),c),n.name=n.constructor.name,n.failures=function(){var n;return null!=(n=u)?n:u=[e].concat(p(t()))},n}return i}(g(TypeError));function j(e){return"object"===l(e)&&null!=e}function R(e){return"string"==typeof e?JSON.stringify(e):""+e}function S(e){var t=e.next(),n=t.done,r=t.value;return n?void 0:r}function P(e,t,n,r){if(!0!==e){!1===e?e={}:"string"==typeof e&&(e={message:e});var o=t.path,i=t.branch,u=n.type,a=e,c=a.refinement,f=a.message,s=void 0===f?"Expected a value of type `"+u+"`"+(c?" with refinement `"+c+"`":"")+", but received: `"+R(r)+"`":f;return Object.assign({value:r,type:u,refinement:c,key:o[o.length-1],path:o,branch:i},e,{message:s})}}function I(e,t,n,r){var o,i,u,a;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:j(f=e)&&"function"==typeof f[Symbol.iterator]||(e=[e]),o=s(e),c.prev=2,o.s();case 4:if((i=o.n()).done){c.next=12;break}if(u=i.value,!(a=P(u,t,n,r))){c.next=10;break}return c.next=10,a;case 10:c.next=4;break;case 12:c.next=17;break;case 14:c.prev=14,c.t0=c.catch(2),o.e(c.t0);case 17:return c.prev=17,o.f(),c.finish(17);case 20:case"end":return c.stop()}var f}),c,null,[[2,14,17,20]])}function N(e,t){var n,r,o,u,a,c,l,y,h,v,d,b,m,w,g,x,k,O,A,_,R,S,P,I,C,E,T,M,D=arguments;return regeneratorRuntime.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:if(n=D.length>2&&void 0!==D[2]?D[2]:{},r=n.path,o=void 0===r?[]:r,u=n.branch,a=void 0===u?[e]:u,c=n.coerce,l=void 0!==c&&c,y=n.mask,h=void 0!==y&&y,v={path:o,branch:a},l&&(e=t.coercer(e,v),h&&"type"!==t.type&&j(t.schema)&&j(e)&&!Array.isArray(e)))for(d in e)void 0===t.schema[d]&&delete e[d];b=!0,m=s(t.validator(e,v)),f.prev=6,m.s();case 8:if((w=m.n()).done){f.next=15;break}return g=w.value,b=!1,f.next=13,[g,void 0];case 13:f.next=8;break;case 15:f.next=20;break;case 17:f.prev=17,f.t0=f.catch(6),m.e(f.t0);case 20:return f.prev=20,m.f(),f.finish(20);case 23:x=s(t.entries(e,v)),f.prev=24,x.s();case 26:if((k=x.n()).done){f.next=53;break}O=i(k.value,3),A=O[0],_=O[1],R=O[2],S=N(_,R,{path:void 0===A?o:[].concat(p(o),[A]),branch:void 0===A?a:[].concat(p(a),[_]),coerce:l,mask:h}),P=s(S),f.prev=30,P.s();case 32:if((I=P.n()).done){f.next=43;break}if(!(C=I.value)[0]){f.next=40;break}return b=!1,f.next=38,[C[0],void 0];case 38:f.next=41;break;case 40:l&&(_=C[1],void 0===A?e=_:e instanceof Map?e.set(A,_):e instanceof Set?e.add(_):j(e)&&(e[A]=_));case 41:f.next=32;break;case 43:f.next=48;break;case 45:f.prev=45,f.t1=f.catch(30),P.e(f.t1);case 48:return f.prev=48,P.f(),f.finish(48);case 51:f.next=26;break;case 53:f.next=58;break;case 55:f.prev=55,f.t2=f.catch(24),x.e(f.t2);case 58:return f.prev=58,x.f(),f.finish(58);case 61:if(!b){f.next=80;break}E=s(t.refiner(e,v)),f.prev=63,E.s();case 65:if((T=E.n()).done){f.next=72;break}return M=T.value,b=!1,f.next=70,[M,void 0];case 70:f.next=65;break;case 72:f.next=77;break;case 74:f.prev=74,f.t3=f.catch(63),E.e(f.t3);case 77:return f.prev=77,E.f(),f.finish(77);case 80:if(!b){f.next=83;break}return f.next=83,[void 0,e];case 83:case"end":return f.stop()}}),f,null,[[6,17,20,23],[24,55,58,61],[30,45,48,51],[63,74,77,80]])}var C=function(){function e(t){var n=this;b(this,e);var r=t.type,o=t.schema,i=t.validator,u=t.refiner,a=t.coercer,c=void 0===a?function(e){return e}:a,f=t.entries,s=void 0===f?regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})):f;this.type=r,this.schema=o,this.entries=s,this.coercer=c,this.validator=i?function(e,t){return I(i(e,t),t,n,e)}:function(){return[]},this.refiner=u?function(e,t){return I(u(e,t),t,n,e)}:function(){return[]}}var t,n,r;return t=e,n=[{key:"assert",value:function(e){return E(e,this)}},{key:"create",value:function(e){return function(e,t){var n=M(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"is",value:function(e){return T(e,this)}},{key:"mask",value:function(e){return function(e,t){var n=M(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(e,this)}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return M(e,this,t)}}],n&&o(t.prototype,n),r&&o(t,r),e}();function E(e,t){var n=M(e,t);if(n[0])throw n[0]}function T(e,t){return!M(e,t)[0]}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=N(e,t,n),o=S(r);if(o[0]){var i=new _(o[0],regeneratorRuntime.mark((function e(){var t,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=s(r),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!(o=n.value)[0]){e.next=8;break}return e.next=8,o[0];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])})));return[i,void 0]}var u=o[1];return[void 0,u]}function D(){for(var e=arguments.length,t=new Array(e),n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:this.A(),n=Object.assign({},x);return e.forEach((function(t){return Object.assign(n,t.options.keyframeOptions)})),Object.assign(n,t),n}},{key:"j",value:function(t,e,n){t=Object.assign({},t),e=Object.assign({},e);var r=n.map((function(t){return t.animatingProperties})).filter((function(t){return void 0!==t})),i=1,o=1;return void 0!==r&&(r.forEach((function(t){t.width&&(i/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=i*t.left,e.left=i*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}},{key:"calculateKeyframes",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={},o={},s=!1,a={};for(var u in e){var l=t[u],c=e[u];if(u in j){var f=j[u];if(void 0===l||void 0===c)continue;var h=f(l,c);void 0!==h.transform&&(a[u]=h.value,s=!0,i.transform="".concat(null!==(n=i.transform)&&void 0!==n?n:""," ").concat(h.transform))}else l!==c&&void 0!==l&&void 0!==c&&(s=!0,i[u]=l,o[u]=c)}return i.transformOrigin=o.transformOrigin=r?"center center":"top left",this.animatingProperties=a,s?[i,o]:void 0}},{key:"animate",value:(a=p(regeneratorRuntime.mark((function t(e){var n,r,i,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:this.options.keyframeOptions,this.start(),this.frames=e,r=!1,this.isAnimating()||this.isDisabled()||(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),void 0===e)){t.next=15;break}return this.log("animate",[e,n]),r=!0,this.webAnimation=this.element.animate(e,n),null==(i=this.getController())||i.add(this),t.prev=7,t.next=10,this.webAnimation.finished;case 10:t.next=14;break;case 12:t.prev=12,t.t0=t.catch(7);case 14:null==i||i.remove(this);case 15:return t.abrupt("return",(this.didFinish(r),r));case 16:case"end":return t.stop()}}),t,this,[[7,12]])}))),function(t){return a.apply(this,arguments)})},{key:"isAnimating",value:function(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}},{key:"log",value:function(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}],n&&d(e.prototype,n),o&&d(e,o),S}(o.s),E=(0,i.XM)(_);function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function F(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t,e)||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 I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=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 f=0;f=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\n \n \n ","\n "])),this.label,this.value,this._handleChange,this.disabled,this.helper?(0,a.dy)(i||(i=f(["",""])),this.helper):"")}},{kind:"method",key:"_handleChange",value:function(e){var t=e.target.checked;this.value!==t&&(0,l.B)(this,"value-changed",{value:t})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,a.iv)(o||(o=f(["\n ha-formfield {\n display: flex;\n height: 56px;\n align-items: center;\n --mdc-typography-body2-font-size: 1em;\n }\n "])))}}]}}),a.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/64d230d0.js.gz b/supervisor/api/panel/frontend_es5/64d230d0.js.gz new file mode 100644 index 000000000..43e1ed26e Binary files /dev/null and b/supervisor/api/panel/frontend_es5/64d230d0.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/6962867e.js b/supervisor/api/panel/frontend_es5/6962867e.js new file mode 100644 index 000000000..ee3ce44f9 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/6962867e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[1813],{41813:function(e,t,r){var n,i,o,a=r(37500),s=r(63550),l=r(47181),c=function(e){return e.replace(/^_*(.)|_+(.)/g,(function(e,t,r){return t?t.toUpperCase():" "+r.toUpperCase()}))},u=function(e,t,r){return e.sendMessagePromise({type:"lovelace/config",url_path:t,force:r})};r(77576);function f(e){return f="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},f(e)}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=j(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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}}}}function p(e,t){return D(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||j(e,t)||O()}function h(e,t,r,n,i,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(n,i)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=w(e);if(t){var i=w(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return k(this,r)}}function k(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function E(){E=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!C(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n ','\n ',"\n \n"])),!!e.title,e.icon,e.title||e.path,e.path)},B=function(e,t,r){var n,i,o;return{path:"/".concat(e,"/").concat(null!==(n=t.path)&&void 0!==n?n:r),icon:null!==(i=t.icon)&&void 0!==i?i:"mdi:view-compact",title:null!==(o=t.title)&&void 0!==o?o:t.path?c(t.path):"".concat(r)}},F=function(e,t){var r;return{path:"/".concat(t.url_path),icon:null!==(r=t.icon)&&void 0!==r?r:"mdi:view-dashboard",title:t.url_path===e.defaultPanel?e.localize("panel.states"):e.localize("panel.".concat(t.title))||t.title||(t.url_path?c(t.url_path):"")}};!function(e,t,r,n){var i=E();if(n)for(var o=0;ol&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function s(e,t){return o.repeat(" ",t-e.length)+e}var p=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,r=[0],a=[],l=-1;n=i.exec(e.buffer);)a.push(n.index),r.push(n.index+n[0].length),e.position<=n.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var c,p,f="",d=Math.min(e.line+t.linesAfter,a.length).toString().length,h=t.maxLength-(t.indent+d+3);for(c=1;c<=t.linesBefore&&!(l-c<0);c++)p=u(e.buffer,r[l-c],a[l-c],e.position-(r[l]-r[l-c]),h),f=o.repeat(" ",t.indent)+s((e.line-c+1).toString(),d)+" | "+p.str+"\n"+f;for(p=u(e.buffer,r[l],a[l],e.position,h),f+=o.repeat(" ",t.indent)+s((e.line+1).toString(),d)+" | "+p.str+"\n",f+=o.repeat("-",t.indent+d+3+p.pos)+"^\n",c=1;c<=t.linesAfter&&!(l+c>=a.length);c++)p=u(e.buffer,r[l+c],a[l+c],e.position-(r[l]-r[l+c]),h),f+=o.repeat(" ",t.indent)+s((e.line+c+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},f=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"];var h=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===f.indexOf(t))throw new c('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===d.indexOf(this.kind))throw new c('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function g(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function m(e){return this.extend(e)}m.prototype.extend=function(e){var t=[],n=[];if(e instanceof h)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new c("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof h))throw new c("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new c("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new c("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof h))throw new c("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(m.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=g(i,"implicit"),i.compiledExplicit=g(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),j=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var S=/^[-+]?[0-9]+e/;var T=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!j.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return n=e.toString(10),S.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),N=w.extend({implicit:[k,C,O,T]}),F=N,M=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),L=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var E=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==M.exec(e)||null!==L.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,u=0,s=null;if(null===(t=M.exec(e))&&(t=L.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(s=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(s=-s)),c=new Date(Date.UTC(n,i,r,o,a,l,u)),s&&c.setTime(c.getTime()-s),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var _=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var q=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=D;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=D,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=D;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),U=Object.prototype.hasOwnProperty,Y=Object.prototype.toString;var R=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ae=new Array(256),le=new Array(256),ce=0;ce<256;ce++)ae[ce]=re(ce)?1:0,le[ce]=re(ce);function ue(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||P,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function se(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=p(n),new c(t,n)}function pe(e,t){throw se(e,t)}function fe(e,t){e.onWarning&&e.onWarning.call(null,se(e,t))}var de={YAML:function(e,t,n){var i,r,o;null!==e.version&&pe(e,"duplication of %YAML directive"),1!==n.length&&pe(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&pe(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&pe(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&fe(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&pe(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],Q.test(i)||pe(e,"ill-formed tag handle (first argument) of the TAG directive"),G.call(e.tagMap,i)&&pe(e,'there is a previously declared suffix for "'+i+'" tag handle'),J.test(r)||pe(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(o){pe(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function he(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=o.repeat("\n",t-1))}function we(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,pe(e,"tab characters must not be used in indentation")),45===i)&&te(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,be(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,xe(e,t,3,!1,!0),a.push(e.result),be(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)pe(e,"bad indentation of a sequence entry");else if(e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),xe(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(me(e,f,d,h,g,m,a,l,c),h=g=m=null),be(e,!0,-1),u=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==u)pe(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===r?pe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?pe(e,"repeat of an indentation width identifier"):(p=t+r-1,s=!0)}if(ee(a)){do{a=e.input.charCodeAt(++e.position)}while(ee(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!X(a)&&0!==a)}for(;0!==a;){for(ye(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!s||e.lineIndentp&&(p=e.lineIndent),X(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=ie(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:pe(e,"expected hexadecimal character");e.result+=oe(o),e.position++}else pe(e,"unknown escape sequence");n=i=e.position}else X(l)?(he(e,n,i,!0),Ae(e,be(e,!1,t)),n=i=e.position):e.position===e.lineStart&&ve(e)?pe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}pe(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!te(i)&&!ne(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&pe(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),G.call(e.anchorMap,n)||pe(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],be(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,u,s,p=e.kind,f=e.result;if(te(s=e.input.charCodeAt(e.position))||ne(s)||35===s||38===s||42===s||33===s||124===s||62===s||39===s||34===s||37===s||64===s||96===s)return!1;if((63===s||45===s)&&(te(i=e.input.charCodeAt(e.position+1))||n&&ne(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==s;){if(58===s){if(te(i=e.input.charCodeAt(e.position+1))||n&&ne(i))break}else if(35===s){if(te(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ve(e)||n&&ne(s))break;if(X(s)){if(l=e.line,c=e.lineStart,u=e.lineIndent,be(e,!1,-1),e.lineIndent>=t){a=!0,s=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=u;break}}a&&(he(e,r,o,!1),Ae(e,e.line-l),r=o=e.position,a=!1),ee(s)||(o=e.position+1),s=e.input.charCodeAt(++e.position)}return he(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===n)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||pe(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&we(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&pe(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),u=0,s=e.implicitTypes.length;u"),null!==e.result&&f.kind!==e.kind&&pe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):pe(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Ie(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(be(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!te(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&pe(e,"directive name must not be less than one character in length");0!==r;){for(;ee(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!X(r));break}if(X(r))break;for(t=e.position;0!==r&&!te(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&ye(e),G.call(de,n)?de[n](e,n,i):fe(e,'unknown document directive "'+n+'"')}be(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,be(e,!0,-1)):a&&pe(e,"directives end mark is expected"),xe(e,e.lineIndent-1,4,!1,!0),be(e,!0,-1),e.checkLineBreaks&&Z.test(e.input.slice(o,e.position))&&fe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ve(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,be(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Ke(e){return/^\n* /.test(e)}function $e(e,t,n,i,r,o,a,l){var c,u,s=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=Ye(u=We(e,0))&&u!==Ne&&!Ue(u)&&45!==u&&63!==u&&58!==u&&44!==u&&91!==u&&93!==u&&123!==u&&125!==u&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&61!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&function(e){return!Ue(e)&&58!==e}(We(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!Ye(s=We(e,c)))return 5;m=m&&Be(s,p,l),p=s}else{for(c=0;c=65536?c+=2:c++){if(10===(s=We(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!Ye(s))return 5;m=m&&Be(s,p,l),p=s}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Ke(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function Pe(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Me.indexOf(t)||Le.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch($e(t,l,e.indent,a,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+Ge(t,e.indent)+Ve(De(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,Ze(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],u=i[2];n=" "===u[0],o+=c+(a||n||""===u?"":"\n")+Ze(u,t),a=n}return o}(t,a),o));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=We(e,r),!(t=Fe[i])&&Ye(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Ee(i);return n}(t)+'"';default:throw new c("impossible error: invalid scalar style")}}()}function Ge(e,t){var n=Ke(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function Ve(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Ze(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function ze(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');r=u.represent[s](t,s)}e.dump=r}return!0}return!1}function Je(e,t,n,i,r,o,a){e.tag=null,e.dump=n,Qe(e,n,!1)||Qe(e,n,!0);var l,u=Se.call(e.dump),s=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===u||"[object Array]"===u;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===u)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,o,a,l,u,s,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new c("sortKeys must be a boolean or a function");for(r=0,o=d.length;r1024)&&(e.dump&&10===e.dump.charCodeAt(0)?s+="?":s+="? "),s+=e.dump,u&&(s+=qe(e,t)),Je(e,t+1,l,!0,u)&&(e.dump&&10===e.dump.charCodeAt(0)?s+=":":s+=": ",p+=s+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",u=e.tag,s=Object.keys(n);for(i=0,r=s.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Je(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=u,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===u)i&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?ze(e,t-1,e.dump,r):ze(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=l+" "+e.dump)}return!0}function He(e,t){var n,i,r=[],o=[];for(Xe(e,r,o),n=0,i=o.length;nr.length)&&(t=r.length);for(var n=0,e=new Array(t);na?1*u:0}))}};(0,e.Jj)(i)}},e={};function o(r){var t=e[r];if(void 0!==t)return t.exports;var u=e[r]={exports:{}};return n[r](u,u.exports,o),u.exports}o.m=n,o.x=function(){var r=o.O(void 0,[191],(function(){return o(5425)}));return r=o.O(r)},r=[],o.O=function(t,n,e,u){if(!n){var i=1/0;for(c=0;c=u)&&Object.keys(o.O).every((function(r){return o.O[r](n[f])}))?n.splice(f--,1):(a=!1,u0&&r[c-1][2]>u;c--)r[c]=r[c-1];r[c]=[n,e,u]},o.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(t,{a:t}),t},o.d=function(r,t){for(var n in t)o.o(t,n)&&!o.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o.f={},o.e=function(r){return Promise.all(Object.keys(o.f).reduce((function(t,n){return o.f[n](r,t),t}),[]))},o.u=function(r){return"2dbdaab4.js"},o.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},o.p="/api/hassio/app/frontend_es5/",function(){var r={477:1,425:1};o.f.i=function(t,n){r[t]||importScripts(o.p+o.u(t))};var t=self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[],n=t.push.bind(t);t.push=function(t){var e=t[0],u=t[1],i=t[2];for(var a in u)o.o(u,a)&&(o.m[a]=u[a]);for(i&&i(o);e.length;)r[e.pop()]=1;n(t)}}(),t=o.x,o.x=function(){return o.e(191).then(t)};o.x()}(); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/6b0926eb.js.gz b/supervisor/api/panel/frontend_es5/6b0926eb.js.gz deleted file mode 100644 index 5f26e168f..000000000 Binary files a/supervisor/api/panel/frontend_es5/6b0926eb.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/6bd7f9a3.js b/supervisor/api/panel/frontend_es5/6bd7f9a3.js new file mode 100644 index 000000000..0cb4e5097 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/6bd7f9a3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6884],{56884:function(e,t,r){r.r(t);var n,i,o,a=r(37500),s=r(63550),c=r(39710),l=(r(93546),r(11654)),f=r(55677);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 u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=b(e);if(t){var i=b(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y(this,r)}}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function w(){w=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!E(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 f=0;f=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\n \n \n "])),this.closeDialog,(0,c.i)(this.hass,this.title),this.content||""):(0,a.dy)(n||(n=u([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return[l.yu,f.l,(0,a.iv)(o||(o=u(["\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n ha-markdown {\n padding: 16px;\n }\n }\n "])))]}}]}}),a.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/6bd7f9a3.js.gz b/supervisor/api/panel/frontend_es5/6bd7f9a3.js.gz new file mode 100644 index 000000000..aa16bb74f Binary files /dev/null and b/supervisor/api/panel/frontend_es5/6bd7f9a3.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/6d7a3730.js b/supervisor/api/panel/frontend_es5/6d7a3730.js deleted file mode 100644 index 7d7be2231..000000000 --- a/supervisor/api/panel/frontend_es5/6d7a3730.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[529],{64529:function(e,t,r){r.r(t);var n,i,o=r(37500),a=r(63550);r(60010),r(23432);function s(e){return s="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},s(e)}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(){m=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!b(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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\n \n \n "])),this.hass,this.narrow,this.route,this.hass,this.supervisor,this.route,this.narrow,this._updateComplete)}},{kind:"method",key:"_updateComplete",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return(0,o.iv)(i||(i=c(["\n hass-subpage {\n --app-header-background-color: var(--primary-background-color);\n --app-header-text-color: var(--sidebar-text-color);\n }\n update-available-card {\n margin: auto;\n margin-top: 16px;\n margin-bottom: 24px;\n max-width: 600px;\n }\n "])))}}]}}),o.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/6d7a3730.js.gz b/supervisor/api/panel/frontend_es5/6d7a3730.js.gz deleted file mode 100644 index f32023943..000000000 Binary files a/supervisor/api/panel/frontend_es5/6d7a3730.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/6e62d7bc.js b/supervisor/api/panel/frontend_es5/6e62d7bc.js new file mode 100644 index 000000000..bab125efc --- /dev/null +++ b/supervisor/api/panel/frontend_es5/6e62d7bc.js @@ -0,0 +1,2 @@ +/*! For license information please see 6e62d7bc.js.LICENSE.txt */ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6087],{56087:function(t,e,n){function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}n.d(e,{lK:function(){return te},V8:function(){return le}});function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),h=c(/firefox/i),f=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),g=c(/chrome/i)&&c(/android/i),v={capture:!1,passive:!1};function m(t,e,n){t.addEventListener(e,n,!u&&v)}function b(t,e,n){t.removeEventListener(e,n,!u&&v)}function y(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function w(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function E(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&y(t,e):y(t,e))||o&&t===n)return t;if(t===n)break}while(t=w(t))}return null}var _,D=/\s+/g;function S(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(D," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(D," ")}}function T(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function C(t,e){var n="";if("string"==typeof t)n=t;else do{var o=T(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function O(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=r:i<=r))return o;if(o===x())break;o=X(o,!1)}return!1}function P(t,e,n,o){for(var i=0,r=0,a=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=s(n,U);z.pluginEvent.bind(Ft)(t,e,i({dragEl:Z,parentEl:K,ghostEl:Q,rootEl:$,nextEl:J,lastDownEl:tt,cloneEl:et,cloneHidden:nt,dragStarted:gt,putSortable:st,activeSortable:Ft.active,originalEvent:o,oldIndex:ot,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:at,hideGhostForTarget:Xt,unhideGhostForTarget:Yt,cloneNowHidden:function(){nt=!0},cloneNowShown:function(){nt=!1},dispatchSortableEvent:function(t){q({sortable:e,name:t,originalEvent:o})}},r))};function q(t){G(i({putSortable:st,cloneEl:et,targetEl:Z,rootEl:$,oldIndex:ot,oldDraggableIndex:rt,newIndex:it,newDraggableIndex:at},t))}var Z,K,Q,$,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt,mt,bt,yt,wt=!1,Et=!1,_t=[],Dt=!1,St=!1,Tt=[],Ct=!1,Ot=[],xt="undefined"!=typeof document,Nt=p,Mt=d||u?"cssFloat":"float",Pt=xt&&!g&&!p&&"draggable"in document.createElement("div"),It=function(){if(xt){if(u)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),At=function(t,e){var n=T(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=P(t,0,e),r=P(t,1,e),a=i&&T(i),l=r&&T(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+N(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+N(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Mt]||r&&"none"===n[Mt]&&s+c>o)?"vertical":"horizontal"},kt=function(t){function e(t,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},o=t.group;o&&"object"==r(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Xt=function(){!It&&Q&&T(Q,"display","none")},Yt=function(){!It&&Q&&T(Q,"display","")};xt&&document.addEventListener("click",(function(t){if(Et)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Et=!1,!1}),!0);var Rt=function(t){if(Z){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,_t.some((function(t){var e=t[j].options.emptyInsertThreshold;if(e&&!I(t)){var n=N(t),o=i>=n.left-e&&i<=n.right+e,l=r>=n.top-e&&r<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[j]._onDragOver(n)}}var i,r,a},Bt=function(t){Z&&Z.parentNode[j]._isOutsideThisEl(t.target)};function Ft(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=l({},e),t[j]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return At(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ft.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var o in z.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in kt(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?m(t,"pointerdown",this._onTapStart):(m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),_t.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),l(this,H())}function jt(t,e,n,o,i,r,a,l){var s,c,h=t[j],f=h.options.onMove;return!window.CustomEvent||u||d?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||N(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),f&&(c=f.call(h,s,a)),c}function Ht(t){t.draggable=!1}function Lt(){Ct=!1}function Wt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function zt(t){return setTimeout(t,0)}function Gt(t){return clearTimeout(t)}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Z):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){Ot.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Ot.push(o)}}(n),!Z&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!f||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=E(l,o.draggable,n,!1))&&l.animated||tt===l)){if(ot=A(l),rt=A(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return q({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),V("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=E(s,o.trim(),n,!1))return q({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),V("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!E(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!Z&&n.parentNode===r){var s=N(n);if($=r,K=(Z=n).parentNode,J=Z.nextSibling,tt=n,lt=a.group,Ft.dragged=Z,ct={target:Z,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ct.clientX-s.left,pt=ct.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Z.style["will-change"]="all",o=function(){V("delayEnded",i,{evt:t}),Ft.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(Z.draggable=!0),i._triggerDragStart(t,e),q({sortable:i,name:"choose",originalEvent:t}),S(Z,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){O(Z,t.trim(),Ht)})),m(l,"dragover",Rt),m(l,"mousemove",Rt),m(l,"touchmove",Rt),m(l,"mouseup",i._onDrop),m(l,"touchend",i._onDrop),m(l,"touchcancel",i._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),V("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(d||u))o();else{if(Ft.eventCanceled)return void this._onDrop();m(l,"mouseup",i._disableDelayedDrag),m(l,"touchend",i._disableDelayedDrag),m(l,"touchcancel",i._disableDelayedDrag),m(l,"mousemove",i._delayedDragTouchMoveHandler),m(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&m(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Ht(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?m(document,"pointermove",this._onTouchMove):m(document,e?"touchmove":"mousemove",this._onTouchMove):(m(Z,"dragend",this),m($,"dragstart",this._onDragStart));try{document.selection?zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(wt=!1,$&&Z){V("dragStarted",this,{evt:e}),this.nativeDraggable&&m(document,"dragover",Bt);var n=this.options;!t&&S(Z,n.dragClass,!1),S(Z,n.ghostClass,!0),Ft.active=this,t&&this._appendGhost(),q({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ut){this._lastX=ut.clientX,this._lastY=ut.clientY,Xt();for(var t=document.elementFromPoint(ut.clientX,ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ut.clientX,ut.clientY))!==e;)e=t;if(Z.parentNode[j]._isOutsideThisEl(t),e)do{if(e[j]){if(e[j]._onDragOver({clientX:ut.clientX,clientY:ut.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Yt()}},_onTouchMove:function(t){if(ct){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Q&&C(Q,!0),a=Q&&r&&r.a,l=Q&&r&&r.d,s=Nt&&yt&&k(yt),c=(i.clientX-ct.clientX+o.x)/(a||1)+(s?s[0]-Tt[0]:0)/(a||1),u=(i.clientY-ct.clientY+o.y)/(l||1)+(s?s[1]-Tt[1]:0)/(l||1);if(!Ft.active&&!wt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))o.right+i||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+i}(t,r,this)&&!v.animated){if(v===Z)return L(!1);if(v&&a===t.target&&(l=v),l&&(n=N(l)),!1!==jt($,a,Z,e,l,n,t,!!l))return H(),a.appendChild(Z),K=a,W(),L(!0)}else if(v&&function(t,e,n){var o=N(P(n.el,0,n.options,!0)),i=10;return e?t.clientXu+c*r/2:sd-bt)return-mt}else if(s>u+c*(1-i)/2&&sd-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,n,r,D?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,St,vt===l),0!==b){var k=A(Z);do{k-=b,w=K.children[k]}while(w&&("none"===T(w,"display")||w===Q))}if(0===b||w===l)return L(!1);vt=l,mt=b;var X=l.nextElementSibling,Y=!1,R=jt($,a,Z,e,l,n,t,Y=1===b);if(!1!==R)return 1!==R&&-1!==R||(Y=1===R),Ct=!0,setTimeout(Lt,30),H(),Y&&!X?a.appendChild(Z):l.parentNode.insertBefore(Z,Y?X:l),O&&B(O,0,x-O.scrollTop),K=Z.parentNode,void 0===y||St||(bt=Math.abs(y-N(l)[C])),W(),L(!0)}if(a.contains(Z))return L(!1)}return!1}function F(s,c){V(s,p,i({evt:t,isOwner:d,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:f,target:l,completed:L,onMove:function(n,o){return jt($,a,Z,e,n,N(n),t,o)},changed:W},c))}function H(){F("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function L(e){return F("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(S(Z,st?st.options.ghostClass:u.options.ghostClass,!1),S(Z,s.ghostClass,!0)),st!==p&&p!==Ft.active?st=p:p===Ft.active&&st&&(st=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){F("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===Z&&!Z.animated||l===a&&!l.animated)&&(vt=null),s.dragoverBubble||t.rootEl||l===document||(Z.parentNode[j]._isOutsideThisEl(t.target),!e&&Rt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function W(){it=A(Z),at=A(Z,s.draggable),q({sortable:p,name:"change",toEl:a,newIndex:it,newDraggableIndex:at,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Rt),b(document,"mousemove",Rt),b(document,"touchmove",Rt)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;it=A(Z),at=A(Z,n.draggable),V("drop",this,{evt:t}),K=Z&&Z.parentNode,it=A(Z),at=A(Z,n.draggable),Ft.eventCanceled||(wt=!1,St=!1,Dt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Gt(this.cloneId),Gt(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&T(document.body,"user-select",""),T(Z,"transform",""),t&&(gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),($===K||st&&"clone"!==st.lastPutMode)&&et&&et.parentNode&&et.parentNode.removeChild(et),Z&&(this.nativeDraggable&&b(Z,"dragend",this),Ht(Z),Z.style["will-change"]="",gt&&!wt&&S(Z,st?st.options.ghostClass:this.options.ghostClass,!1),S(Z,this.options.chosenClass,!1),q({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:t}),$!==K?(it>=0&&(q({rootEl:K,name:"add",toEl:K,fromEl:$,originalEvent:t}),q({sortable:this,name:"remove",toEl:K,originalEvent:t}),q({rootEl:K,name:"sort",toEl:K,fromEl:$,originalEvent:t}),q({sortable:this,name:"sort",toEl:K,originalEvent:t})),st&&st.save()):it!==ot&&it>=0&&(q({sortable:this,name:"update",toEl:K,originalEvent:t}),q({sortable:this,name:"sort",toEl:K,originalEvent:t})),Ft.active&&(null!=it&&-1!==it||(it=ot,at=rt),q({sortable:this,name:"end",toEl:K,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){V("nulling",this),$=Z=K=Q=J=et=tt=nt=ct=ut=gt=it=at=ot=rt=vt=mt=st=lt=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,Ot.forEach((function(t){t.checked=!0})),Ot.length=dt=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o + * @author owenm + * @license MIT + */ diff --git a/supervisor/api/panel/frontend_es5/6e62d7bc.js.gz b/supervisor/api/panel/frontend_es5/6e62d7bc.js.gz new file mode 100644 index 000000000..c248bcae7 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/6e62d7bc.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/709bc844.js b/supervisor/api/panel/frontend_es5/709bc844.js new file mode 100644 index 000000000..f8c459dc6 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/709bc844.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[5510],{35510:function(e,t,r){r.r(t);r(51187);var i,n,o,a,s,c,l=r(37500),u=r(63550),p=r(47181),d=(r(9381),r(98762),r(39710)),f=r(41682),h=r(60538),m=r(26765),y=r(11654);r(94758);function v(e){return v="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},v(e)}function b(e,t,r,i,n,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(i,n)}function k(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){return w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=x(e);if(t){var n=x(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return E(this,r)}}function E(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function D(){D=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!A(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,n[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){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\n ","\n ",'\n ',""])),this._error):"",this.closeDialog,this._dialogParams.supervisor.localize("common.close"),this._creatingBackup,this._createBackup,this._dialogParams.supervisor.localize("backup.create")):(0,l.dy)(i||(i=k([""])))}},{kind:"method",key:"_createBackup",value:(r=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("running"===this._dialogParams.supervisor.info.state){e.next=3;break}return(0,m.Ys)(this,{title:this._dialogParams.supervisor.localize("backup.could_not_create"),text:this._dialogParams.supervisor.localize("backup.create_blocked_not_running","state",this._dialogParams.supervisor.info.state)}),e.abrupt("return");case 3:if(t=this._backupContent.backupDetails(),this._creatingBackup=!0,this._error="",!t.password||t.password.length){e.next=10;break}return this._error=this._dialogParams.supervisor.localize("backup.enter_password"),this._creatingBackup=!1,e.abrupt("return");case 10:if(!t.password||t.password===t.confirm_password){e.next=14;break}return this._error=this._dialogParams.supervisor.localize("backup.passwords_not_matching"),this._creatingBackup=!1,e.abrupt("return");case 14:if(delete t.confirm_password,e.prev=15,"full"!==this._backupContent.backupType){e.next=21;break}return e.next=19,(0,h.vU)(this.hass,t);case 19:e.next=23;break;case 21:return e.next=23,(0,h.zU)(this.hass,t);case 23:this._dialogParams.onCreate(),this.closeDialog(),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(15),this._error=(0,f.js)(e.t0);case 30:this._creatingBackup=!1;case 31:case"end":return e.stop()}}),e,this,[[15,27]])})),v=function(){var e=this,t=arguments;return new Promise((function(i,n){var o=r.apply(e,t);function a(e){b(o,i,n,a,s,"next",e)}function s(e){b(o,i,n,a,s,"throw",e)}a(void 0)}))},function(){return v.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[y.Qx,y.yu,(0,l.iv)(c||(c=k(["\n ha-circular-progress {\n display: block;\n text-align: center;\n }\n "])))]}}]}}),l.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/709bc844.js.gz b/supervisor/api/panel/frontend_es5/709bc844.js.gz new file mode 100644 index 000000000..23ada72a3 Binary files /dev/null and b/supervisor/api/panel/frontend_es5/709bc844.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/72c04451.js b/supervisor/api/panel/frontend_es5/72c04451.js deleted file mode 100644 index 9c1c67350..000000000 --- a/supervisor/api/panel/frontend_es5/72c04451.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[251],{98251:function(e,t){function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=new WeakMap,o=new WeakMap;function i(e){var t=r.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function l(e){null==e.passiveListener?e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener)}function u(e,t){r.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var n=Object.keys(t),o=0;o0){for(var e=new Array(arguments.length),t=0;t\n ',"\n ","\n ","\n ","\n ","\n \n ","\n "])),(0,s.$)(o),this.renderRipple(),this.outlined?this.renderOutline():this.renderLabel(),this.renderInput(),this.renderCharCounter(e),this.renderLineRipple(),this.renderHelperText(i,n))}},{key:"renderInput",value:function(){var t=this.label?"label":void 0,e=-1===this.minLength?void 0:this.minLength,n=-1===this.maxLength?void 0:this.maxLength,r=this.autocapitalize?this.autocapitalize:void 0;return(0,a.dy)(i||(i=p(["\n \n '])),(0,l.o)(t),(0,f.a)(this.value),this.rows,this.cols,this.disabled,this.placeholder,this.required,this.readOnly,(0,l.o)(e),(0,l.o)(n),(0,l.o)(""===this.name?void 0:this.name),(0,l.o)(this.inputMode),(0,l.o)(r),this.handleInputChange,this.onInputBlur)}}])&&y(e.prototype,n),o&&y(e,o),c}(u.P);(0,o.__decorate)([(0,c.IO)("textarea")],_.prototype,"formElement",void 0),(0,o.__decorate)([(0,c.Cb)({type:Number})],_.prototype,"rows",void 0),(0,o.__decorate)([(0,c.Cb)({type:Number})],_.prototype,"cols",void 0),(0,o.__decorate)([(0,c.Cb)({converter:{fromAttribute:function(t){return null!==t&&(""===t||t)},toAttribute:function(t){return"boolean"==typeof t?t?"":null:t}}})],_.prototype,"charCounter",void 0)},96791:function(t,e,n){var r;n.d(e,{W:function(){return u}});var i,o,u=(0,n(37500).iv)(r||(i=[".mdc-text-field{height:100%}.mdc-text-field__input{resize:none}"],o||(o=i.slice(0)),r=Object.freeze(Object.defineProperties(i,{raw:{value:Object.freeze(o)}}))))},31157:function(t,e,n){n.d(e,{e:function(){return k}});var r=n(73418);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);u=!0);}catch(c){a=!0,i=c}finally{try{u||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t,e)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&ithis._$Cft);s++){var l=c(s);if("object"===p(l))return l.v}return r.Jb}},{key:"disconnected",value:function(){this._$CG.disconnect(),this._$CK.pause()}},{key:"reconnected",value:function(){this._$CG.reconnect(this),this._$CK.resume()}}],n&&y(e.prototype,n),i&&y(e,i),u}(u.s),O=(0,i.XM)(S)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/75658738.js.LICENSE.txt b/supervisor/api/panel/frontend_es5/75658738.js.LICENSE.txt new file mode 100644 index 000000000..8e8cd9c2a --- /dev/null +++ b/supervisor/api/panel/frontend_es5/75658738.js.LICENSE.txt @@ -0,0 +1,23 @@ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */ + +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ diff --git a/supervisor/api/panel/frontend_es5/75658738.js.gz b/supervisor/api/panel/frontend_es5/75658738.js.gz new file mode 100644 index 000000000..f39ad882e Binary files /dev/null and b/supervisor/api/panel/frontend_es5/75658738.js.gz differ diff --git a/supervisor/api/panel/frontend_es5/766322c2.js b/supervisor/api/panel/frontend_es5/766322c2.js deleted file mode 100644 index ff62a9261..000000000 --- a/supervisor/api/panel/frontend_es5/766322c2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[510],{35510:function(e,t,r){r.r(t);r(51187);var i,n,o,a,s,c,l=r(37500),u=r(63550),p=r(47181),d=(r(9381),r(98762),r(39710)),f=r(41682),h=r(60538),m=r(26765),y=r(11654);r(94758);function v(e){return v="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},v(e)}function b(e,t,r,i,n,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(i,n)}function k(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){return w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=x(e);if(t){var n=x(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return E(this,r)}}function E(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return P(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function D(){D=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var o="static"===n?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var i=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!A(e))return r.push(e);var t=this.decorateElement(e,n);r.push(t.element),r.push.apply(r,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:r,finishers:i};var o=this.decorateConstructor(r,t);return i.push.apply(i,o.finishers),o.finishers=i,o},addElementPlacement:function(e,t,r){var i=t[e.placement];if(!r&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var r=[],i=[],n=e.decorators,o=n.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,n[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.push(c.finisher);var l=c.extras;if(l){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\n ","\n ",'\n ',""])),this._error):"",this.closeDialog,this._dialogParams.supervisor.localize("common.close"),this._creatingBackup,this._createBackup,this._dialogParams.supervisor.localize("backup.create")):(0,l.dy)(i||(i=k([""])))}},{kind:"method",key:"_createBackup",value:(r=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("running"===this._dialogParams.supervisor.info.state){e.next=3;break}return(0,m.Ys)(this,{title:this._dialogParams.supervisor.localize("backup.could_not_create"),text:this._dialogParams.supervisor.localize("backup.create_blocked_not_running","state",this._dialogParams.supervisor.info.state)}),e.abrupt("return");case 3:if(t=this._backupContent.backupDetails(),this._creatingBackup=!0,this._error="",!t.password||t.password.length){e.next=10;break}return this._error=this._dialogParams.supervisor.localize("backup.enter_password"),this._creatingBackup=!1,e.abrupt("return");case 10:if(!t.password||t.password===t.confirm_password){e.next=14;break}return this._error=this._dialogParams.supervisor.localize("backup.passwords_not_matching"),this._creatingBackup=!1,e.abrupt("return");case 14:if(delete t.confirm_password,e.prev=15,"full"!==this._backupContent.backupType){e.next=21;break}return e.next=19,(0,h.vU)(this.hass,t);case 19:e.next=23;break;case 21:return e.next=23,(0,h.zU)(this.hass,t);case 23:this._dialogParams.onCreate(),this.closeDialog(),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(15),this._error=(0,f.js)(e.t0);case 30:this._creatingBackup=!1;case 31:case"end":return e.stop()}}),e,this,[[15,27]])})),v=function(){var e=this,t=arguments;return new Promise((function(i,n){var o=r.apply(e,t);function a(e){b(o,i,n,a,s,"next",e)}function s(e){b(o,i,n,a,s,"throw",e)}a(void 0)}))},function(){return v.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[y.Qx,y.yu,(0,l.iv)(c||(c=k(["\n ha-circular-progress {\n display: block;\n text-align: center;\n }\n "])))]}}]}}),l.oi)}}]); \ No newline at end of file diff --git a/supervisor/api/panel/frontend_es5/766322c2.js.gz b/supervisor/api/panel/frontend_es5/766322c2.js.gz deleted file mode 100644 index e67079a0c..000000000 Binary files a/supervisor/api/panel/frontend_es5/766322c2.js.gz and /dev/null differ diff --git a/supervisor/api/panel/frontend_es5/7aee9199.js b/supervisor/api/panel/frontend_es5/7aee9199.js new file mode 100644 index 000000000..e2403c249 --- /dev/null +++ b/supervisor/api/panel/frontend_es5/7aee9199.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4042],{75254:function(t,e,n){n.d(e,{ys:function(){return mt}});var r=n(74075),i=n(91643);function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2),f="-10000px",d=function(){function t(e,n,r){u(this,t),this.facet=n,this.createTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter((function(t){return t})),this.tooltipViews=this.tooltips.map(r)}return h(t,[{key:"update",value:function(t){var e=t.state.facet(this.facet),n=e.filter((function(t){return t}));if(e===this.input){var r,i=o(this.tooltipViews);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.update&&a.update(t)}}catch(g){i.e(g)}finally{i.f()}return!1}for(var s=[],u=0;ur.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&r.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),null===(n=e.dom.ownerDocument.defaultView)||void 0===n||n.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return h(t,[{key:"createContainer",value:function(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var t,e=o(this.manager.tooltipViews);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.intersectionObserver.observe(n.dom)}}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var t=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout((function(){t.measureTimeout=-1,t.maybeMeasure()}),50))}},{key:"update",value:function(t){t.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(t);e&&this.observeIntersection();var n=e||t.geometryChanged,r=t.state.facet(p);if(r.position!=this.position){this.position=r.position;var i,a=o(this.manager.tooltipViews);try{for(a.s();!(i=a.n()).done;){i.value.dom.style.position=this.position}}catch(h){a.e(h)}finally{a.f()}n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var s,u=o(this.manager.tooltipViews);try{for(u.s();!(s=u.n()).done;){var l=s.value;this.container.appendChild(l.dom)}}catch(h){u.e(h)}finally{u.f()}n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}},{key:"createTooltip",value:function(t){var e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector("cm-tooltip > cm-tooltip-arrow")){var n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=f,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var t,e;null===(t=this.view.dom.ownerDocument.defaultView)||void 0===t||t.removeEventListener("resize",this.measureSoon);var n,r=o(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){n.value.dom.remove()}}catch(i){r.e(i)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var t=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map((function(e){return t.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((function(t){return t.dom.getBoundingClientRect()})),space:this.view.state.facet(p).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(t){for(var e=t.editor,n=t.space,r=[],a=0;a=Math.min(e.bottom,n.bottom)||h.right<=Math.max(e.left,n.left)||h.left>=Math.min(e.right,n.right))l.style.top=f;else{var d=s.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,v=d?7:0,p=c.right-c.left,m=c.bottom-c.top,g=u.offset||y,k=this.view.textDirection==i.Nm.LTR,b=c.width>n.right-n.left?k?n.left:n.right-c.width:k?Math.min(h.left-(d?14:0)+g.x,n.right-p):Math.max(n.left,h.left-p+(d?14:0)-g.x),w=!!s.above;!s.strictSide&&(w?h.top-(c.bottom-c.top)-g.yn.bottom)&&w==n.bottom-h.bottom>h.top-n.top&&(w=!w);var x=w?h.top-m-v-g.y:h.bottom+v+g.y,S=b+p;if(!0!==u.overlap){var A,C=o(r);try{for(C.s();!(A=C.n()).done;){var M=A.value;M.leftb&&M.topx&&(x=w?M.top-m-2-v:M.bottom+v+2)}}catch(O){C.e(O)}finally{C.f()}}"absolute"==this.position?(l.style.top=x-t.parent.top+"px",l.style.left=b-t.parent.left+"px"):(l.style.top=x+"px",l.style.left=b+"px"),d&&(d.style.left="".concat(h.left+(k?g.x:-g.x)-(b+14-7),"px")),!0!==u.overlap&&r.push({left:b,top:x,right:S,bottom:x+m}),l.classList.toggle("cm-tooltip-above",w),l.classList.toggle("cm-tooltip-below",!w),u.positioned&&u.positioned()}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var t,e=o(this.manager.tooltipViews);try{for(e.s();!(t=e.n()).done;){t.value.dom.style.top=f}}catch(n){e.e(n)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),g=i.tk.baseTheme({".cm-tooltip":{zIndex:100},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),y={x:0,y:0},k=r.r$.define({enables:[m,g]});function b(t,e){var n=t.plugin(m);if(!n)return null;var r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}var w=n(25070),x=n(51686);function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}function C(t,e){return C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},C(t,e)}function M(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=T(t);if(e){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return O(this,n)}}function O(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}function D(t){return function(t){if(Array.isArray(t))return B(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||P(t)||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 E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||P(t,e)||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 R(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function P(t,e){if(t){if("string"==typeof t)return B(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=48&&C<=57||C>=97&&C<=122?2:C>=65&&C<=90?1:0:(M=(0,x.bg)(C))!=M.toLowerCase()?1:M!=M.toUpperCase()?2:0;(!w||1==O&&k||0==A&&0!=O)&&(e[v]==C||n[v]==C&&(p=!0)?o[v++]=w:o.length&&(b=!1)),A=O,w+=(0,x.nZ)(C)}return v==u&&0==o[0]&&b?this.result((p?-200:0)-100,o,t):m==u&&0==g?[-200-t.length,0,y]:s>-1?[-700-t.length,s,s+this.pattern.length]:m==u?[-900-t.length,g,y]:v==u?this.result((p?-200:0)-100-700+(b?0:-1100),o,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}},{key:"result",value:function(t,e,n){var r,i=[t-n.length],o=1,a=R(e);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=s+(this.astral?(0,x.nZ)((0,x.gm)(n,s)):1);o>1&&i[o-1]==s?i[o-1]=u:(i[o++]=s,i[o++]=u)}}catch(l){a.e(l)}finally{a.f()}return i}}]),t}(),G=r.r$.define({combine:function(t){return(0,r.BO)(t,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:function(t,e){return t&&e},icons:function(t,e){return t&&e},optionClass:function(t,e){return function(n){return function(t,e){return t?e?t+" "+e:t:e}(t(n),e(n))}},addToOptions:function(t,e){return t.concat(e)}})}});function J(t,e,n){if(t<=n)return{from:0,to:t};if(e<=t>>1){var r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}var i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}var X=function(){function t(e,n){var r=this;L(this,t),this.view=e,this.stateField=n,this.info=null,this.placeInfo={read:function(){return r.measureInfo()},write:function(t){return r.positionInfo(t)},key:this};var i=e.state.field(n),o=i.open,a=o.options,s=o.selected,u=e.state.facet(G);this.optionContent=function(t){var e=t.addToOptions.slice();return t.icons&&e.push({render:function(t){var e,n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&(e=n.classList).add.apply(e,D(t.type.split(/\s+/g).map((function(t){return"cm-completionIcon-"+t})))),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render:function(t,e,n){var r=document.createElement("span");r.className="cm-completionLabel";for(var i=t.label,o=0,a=1;ao&&r.appendChild(document.createTextNode(i.slice(o,s)));var l=r.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(i.slice(s,u))),l.className="cm-completionMatchedText",o=u}return o=this.range.to)&&(this.range=J(n.options.length,n.selected,this.view.state.facet(G).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,e.id,this.range)),this.list.addEventListener("scroll",(function(){t.info&&t.view.requestMeasure(t.placeInfo)}))),this.updateSelectedOption(n.selected)){this.info&&(this.info.remove(),this.info=null);var r=n.options[n.selected];r.completion.info&&(this.info=this.dom.appendChild(function(t,e){var n=document.createElement("div");n.className="cm-tooltip cm-completionInfo";var r=t.completion.info;if("string"==typeof r)n.textContent=r;else{var o=r(t.completion);o.then?o.then((function(t){return n.appendChild(t)}),(function(t){return(0,i.OO)(e.state,t,"completion info")})):n.appendChild(o)}return n}(r,this.view)),this.view.requestMeasure(this.placeInfo))}}},{key:"updateSelectedOption",value:function(t){for(var e=null,n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)r==t?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),e=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return e&&function(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.topn.bottom&&(t.scrollTop+=r.bottom-n.bottom)}(this.list,e),e}},{key:"measureInfo",value:function(){var t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;var e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,et(n,e),this.tooltip,this.timestamp,e)}},{key:"map",value:function(e){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(e,n,r,i,o){var a=function(t,e){var n,r=[],i=0,o=R(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.hasResult())if(!1===a.result.filter){var s,u=R(a.result.options);try{for(u.s();!(s=u.n()).done;){var l=s.value;r.push(new z(l,a,[1e9-i++]))}}catch(b){u.e(b)}finally{u.f()}}else{var h,c=new K(e.sliceDoc(a.from,a.to)),f=void 0,d=R(a.result.options);try{for(d.s();!(h=d.n()).done;){var v=h.value;(f=c.match(v.label))&&(null!=v.boost&&(f[0]+=v.boost),r.push(new z(v,a,f)))}}catch(b){d.e(b)}finally{d.f()}}}}catch(b){o.e(b)}finally{o.f()}r.sort(rt);var p,m=[],g=null,y=R(r.sort(rt));try{for(y.s();!(p=y.n()).done;){var k=p.value;if(300==m.length)break;g&&g.label==k.completion.label&&g.detail==k.completion.detail&&g.type==k.completion.type&&g.apply==k.completion.apply?Q(k.completion)>Q(g)&&(m[m.length-1]=k):m.push(k),g=k.completion}}catch(b){y.e(b)}finally{y.f()}return m}(e,n);if(!a.length)return null;var s,u=0;if(i&&i.selected)for(var l=i.options[i.selected].completion,h=0;h2&&void 0!==arguments[2]?arguments[2]:-1;L(this,t),this.source=e,this.state=n,this.explicitPos=r}return N(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(e,n){var r=it(e),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&0!=i.state&&(i=new t(i.source,0));var o,a=R(e.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(st))i=new t(i.source,1,s.value?_(e.state):-1);else if(s.is(ut))i=new t(i.source,0);else if(s.is(lt)){var u,l=R(s.value);try{for(l.s();!(u=l.n()).done;){var h=u.value;h.source==i.source&&(i=h)}}catch(c){l.e(c)}finally{l.f()}}}}catch(c){a.e(c)}finally{a.f()}return i}},{key:"handleUserEvent",value:function(e,n,r){return"delete"!=n&&r.activateOnTyping?new t(this.source,1):this.map(e.changes)}},{key:"handleChange",value:function(e){return e.changes.touchesRange(_(e.startState))?new t(this.source,0):this.map(e.changes)}},{key:"map",value:function(e){return e.empty||this.explicitPos<0?this:new t(this.source,this.state,e.mapPos(this.explicitPos))}}]),t}(),at=function(t){A(n,t);var e=M(n);function n(t,r,i,o,a,s){var u;return L(this,n),(u=e.call(this,t,2,r)).result=i,u.from=o,u.to=a,u.span=s,u}return N(n,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(t,e,r){var i=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),a=_(t.state);if((this.explicitPos>-1?ao)return new ot(this.source,"input"==e&&r.activateOnTyping?1:0);var s=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return this.span&&(i==o||this.span.test(t.state.sliceDoc(i,o)))?new n(this.source,s,this.result,i,o,this.span):new ot(this.source,1,s)}},{key:"handleChange",value:function(t){return t.changes.touchesRange(this.from,this.to)?new ot(this.source,0):this.map(t.changes)}},{key:"map",value:function(t){return t.empty?this:new n(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1),this.span)}}]),n}(ot),st=r.Py.define(),ut=r.Py.define(),lt=r.Py.define({map:function(t,e){return t.map((function(t){return t.map(e)}))}}),ht=r.Py.define(),ct=r.QQ.define({create:function(){return Z.start()},update:function(t,e){return t.update(e)},provide:function(t){return[k.from(t,(function(t){return t.tooltip})),i.tk.contentAttributes.from(t,(function(t){return t.attrs}))]}});function ft(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(n){var r=n.state.field(ct,!1);if(!r||!r.open||Date.now()-r.open.timestamp<75)return!1;var i,o=1;"page"==e&&(i=b(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));var a=r.open.selected+o*(t?1:-1),s=r.open.options.length;return a<0?a="page"==e?0:s-1:a>=s&&(a="page"==e?s-1:0),n.dispatch({effects:ht.of(a)}),!0}}var dt=function t(e,n){L(this,t),this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0},vt=i.lg.fromClass(function(){function t(e){L(this,t),this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var n,r=R(e.state.field(ct).active);try{for(r.s();!(n=r.n()).done;){var i=n.value;1==i.state&&this.startQuery(i)}}catch(o){r.e(o)}finally{r.f()}}return N(t,[{key:"update",value:function(t){var e=this,n=t.state.field(ct);if(t.selectionSet||t.docChanged||t.startState.field(ct)!=n){for(var r=t.transactions.some((function(t){return(t.selection||t.docChanged)&&!it(t)})),o=0;o50&&a.time-Date.now()>1e3){var s,u=R(a.context.abortListeners);try{for(u.s();!(s=u.n()).done;){var l=s.value;try{l()}catch(v){(0,i.OO)(this.view.state,v)}}}catch(p){u.e(p)}finally{u.f()}a.context.abortListeners=null,this.running.splice(o--,1)}else{var h;(h=a.updates).push.apply(h,D(t.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some((function(t){return 1==t.state&&!e.running.some((function(e){return e.active.source==t.source}))}))?setTimeout((function(){return e.startUpdate()}),50):-1,0!=this.composing){var c,f=R(t.transactions);try{for(f.s();!(c=f.n()).done;){var d=c.value;"input"==it(d)?this.composing=2:2==this.composing&&d.selection&&(this.composing=3)}}catch(p){f.e(p)}finally{f.f()}}}}},{key:"startUpdate",value:function(){var t=this;this.debounceUpdate=-1;var e,n=R(this.view.state.field(ct).active);try{var r=function(){var n=e.value;1!=n.state||t.running.some((function(t){return t.active.source==n.source}))||t.startQuery(n)};for(n.s();!(e=n.n()).done;)r()}catch(i){n.e(i)}finally{n.f()}}},{key:"startQuery",value:function(t){var e=this,n=this.view.state,r=_(n),o=new j(n,r,t.explicitPos==r),a=new dt(t,o);this.running.push(a),Promise.resolve(t.source(o)).then((function(t){a.context.aborted||(a.done=t||null,e.scheduleAccept())}),(function(t){e.view.dispatch({effects:ut.of(null)}),(0,i.OO)(e.view.state,t)}))}},{key:"scheduleAccept",value:function(){var t=this;this.running.every((function(t){return void 0!==t.done}))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((function(){return t.accept()}),50))}},{key:"accept",value:function(){var t,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var n=[],r=this.view.state.facet(G),i=function(i){var a=e.running[i];if(void 0===a.done)return o=i,"continue";if(e.running.splice(i--,1),a.done){var s,u=new at(a.active.source,a.active.explicitPos,a.done,a.done.from,null!==(t=a.done.to)&&void 0!==t?t:_(a.updates.length?a.updates[0].startState:e.view.state),a.done.span&&!1!==a.done.filter?W(a.done.span,!0):null),l=R(a.updates);try{for(l.s();!(s=l.n()).done;){var h=s.value;u=u.update(h,r)}}catch(m){l.e(m)}finally{l.f()}if(u.hasResult())return n.push(u),o=i,"continue"}var c=e.view.state.field(ct).active.find((function(t){return t.source==a.active.source}));if(c&&1==c.state)if(null==a.done){var f,d=new ot(a.active.source,0),v=R(a.updates);try{for(v.s();!(f=v.n()).done;){var p=f.value;d=d.update(p,r)}}catch(m){v.e(m)}finally{v.f()}1!=d.state&&n.push(d)}else e.startQuery(c);o=i},o=0;o ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[ct,G.of(t),vt,yt,pt]}var gt=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(ct,!1)&&(t.dispatch({effects:st.of(!0)}),!0)}},{key:"Escape",run:function(t){var e=t.state.field(ct,!1);return!(!e||!e.active.some((function(t){return 0!=t.state})))&&(t.dispatch({effects:ut.of(null)}),!0)}},{key:"ArrowDown",run:ft(!0)},{key:"ArrowUp",run:ft(!1)},{key:"PageDown",run:ft(!0,"page")},{key:"PageUp",run:ft(!1,"page")},{key:"Enter",run:function(t){var e=t.state.field(ct,!1);return!(t.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<75)&&(F(t,e.open.options[e.open.selected]),!0)}}],yt=r.Wl.highest(i.$f.computeN([G],(function(t){return t.facet(G).defaultKeymap?[gt]:[]})))},80508:function(t,e,n){n.d(e,{wQ:function(){return pt},xi:function(){return vt},at:function(){return dt}});var r=n(74075),i=n(51686),o=n(91643),a=n(25070),s=n(97248);var u=1e4,l="()[]{}";function h(t,e,n){var r=t.prop(e<0?s.md.openedBy:s.md.closedBy);if(r)return r;if(1==t.name.length){var i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function c(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i.maxScanDistance||u,s=i.brackets||l,c=(0,a.qz)(t),v=c.resolve(e,n);return(r=h(v.type,n,s))?f(t,e,n,v,r,s):d(t,e,n,c,v.type,o,s)}function f(t,e,n,r,i,o){var a=r.parent,s={from:r.from,to:r.to},u=0,l=null==a?void 0:a.cursor;if(l&&(n<0?l.childBefore(r.from):l.childAfter(r.to)))do{if(n<0?l.to<=r.from:l.from>=r.to){if(0==u&&i.indexOf(l.type.name)>-1)return{start:s,end:{from:l.from,to:l.to},matched:!0};if(h(l.type,n,o))u++;else if(h(l.type,-n,o)&&0==--u)return{start:s,end:{from:l.from,to:l.to},matched:!1}}}while(n<0?l.prevSibling():l.nextSibling());return{start:s,matched:!1}}function d(t,e,n,r,i,o,a){var s=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),u=a.indexOf(s);if(u<0||u%2==0!=n>0)return null;for(var l={from:n<0?e-1:e,to:n>0?e+1:e},h=t.doc.iterRange(e,n>0?t.doc.length:0),c=0,f=0;!h.next().done&&f<=o;){var d=h.value;n<0&&(f+=d.length);for(var v=e+f*n,p=n>0?0:d.length-1,m=n>0?d.length:-1;p!=m;p+=n){var g=a.indexOf(d[p]);if(!(g<0||r.resolve(v+p,1).type!=i))if(g%2==0==n>0)c++;else{if(1==c)return{start:l,end:{from:v+p,to:v+p+1},matched:g>>1==u>>1};c--}}n>0&&(f+=d.length)}return h.done?{start:l,matched:!1}:null}function v(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function C(t,e,n){for(var i=(0,a.qz)(t).resolveInner(e.head),o=n?s.md.closedBy:s.md.openedBy,u=e.head;;){var l=n?i.childAfter(u):i.childBefore(u);if(!l)break;A(t,l,o)?i=l:u=n?l.to:l.from}var h,f;return f=i.type.prop(o)&&(h=n?c(t,i.from,1):c(t,i.to,-1))&&h.matched?n?h.end.to:h.end.from:n?i.to:i.from,r.jT.cursor(f,n?-1:1)}function M(t,e){return y(t,(function(n){if(!n.empty)return k(n,e);var r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)}))}var O=function(t){return M(t,!1)},T=function(t){return M(t,!0)};function D(t,e){var n=t.state,r=m(n.selection,(function(n){return n.empty?t.moveVertically(n,e,t.dom.clientHeight):k(n,e)}));if(r.eq(n.selection))return!1;var i=t.coordsAtPos(n.selection.main.head),a=t.scrollDOM.getBoundingClientRect();return t.dispatch(g(n,r),{effects:i&&i.top>a.top&&i.bottom0&&c(t,e.head-1,1)||e.headn&&(o="delete.forward"),n=Math.min(n,a),i=Math.max(i,a)}return n==i?{range:t}:{changes:{from:n,to:i},range:r.jT.cursor(n)}}));return!a.changes.empty&&(i(n.update(a,{scrollIntoView:!0,userEvent:o})),!0)}function tt(t,e,n){if(t instanceof o.tk){var r,i=v(t.pluginField(o.BF.atomicRanges));try{for(i.s();!(r=i.n()).done;){r.value.between(e,e,(function(t,r){te&&(e=n?r:t)}))}}catch(a){i.e(a)}finally{i.f()}}return e}var et=function(t,e){return Z(t,(function(n){var r,o,s=t.state,u=s.doc.lineAt(n);if(!e&&n>u.from&&n=a.number){var u=n[n.length-1];u.to=s.to,u.ranges.push(o)}else n.push({from:a.from,to:s.to,ranges:[o]});r=s.number+1}}catch(l){i.e(l)}finally{i.f()}return n}function ut(t,e,n){if(t.readOnly)return!1;var i,o=[],a=[],s=v(st(t));try{for(s.s();!(i=s.n()).done;){var u=i.value;if(n?u.to!=t.doc.length:0!=u.from){var l=t.doc.lineAt(n?u.to+1:u.from-1),h=l.length+1;if(n){o.push({from:u.to,to:l.to},{from:u.from,insert:l.text+t.lineBreak});var c,f=v(u.ranges);try{for(f.s();!(c=f.n()).done;){var d=c.value;a.push(r.jT.range(Math.min(t.doc.length,d.anchor+h),Math.min(t.doc.length,d.head+h)))}}catch(y){f.e(y)}finally{f.f()}}else{o.push({from:l.from,to:u.from},{from:u.to,insert:t.lineBreak+l.text});var p,m=v(u.ranges);try{for(m.s();!(p=m.n()).done;){var g=p.value;a.push(r.jT.range(g.anchor-h,g.head-h))}}catch(y){m.e(y)}finally{m.f()}}}}}catch(y){s.e(y)}finally{s.f()}return!!o.length&&(e(t.update({changes:o,scrollIntoView:!0,selection:r.jT.create(a,t.selection.mainIndex),userEvent:"move.line"})),!0)}function lt(t,e,n){if(t.readOnly)return!1;var r,i=[],o=v(st(t));try{for(o.s();!(r=o.n()).done;){var a=r.value;n?i.push({from:a.from,insert:t.doc.slice(a.from,a.to)+t.lineBreak}):i.push({from:a.to,insert:t.lineBreak+t.doc.slice(a.from,a.to)})}}catch(s){o.e(s)}finally{o.f()}return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var ht=ct(!1);function ct(t){return function(e){var n=e.state,o=e.dispatch;if(n.readOnly)return!1;var u=n.changeByRange((function(e){var o=e.from,u=e.to,l=n.doc.lineAt(o),h=!t&&o==u&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};var n,r=(0,a.qz)(t).resolveInner(e),i=r.childBefore(e),o=r.childAfter(e);return i&&o&&i.to<=e&&o.from>=e&&(n=i.type.prop(s.md.closedBy))&&n.indexOf(o.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(o.from).from?{from:i.to,to:o.from}:null}(n,o);t&&(o=u=(u<=l.to?l:n.doc.lineAt(u)).to);var c=new a.Gn(n,{simulateBreak:o,simulateDoubleBreak:!!h}),f=(0,a.K0)(c,o);for(null==f&&(f=/^\s*/.exec(n.doc.lineAt(o).text)[0].length);ul.from&&on&&(i.empty||i.to>s.from)&&(e(s,o,i),n=s.number),a=s.to+1}var u=t.changes(o);return{changes:o,range:r.jT.range(u.mapPos(i.anchor,1),u.mapPos(i.head,1))}}))}var dt=function(t){var e=t.state,n=t.dispatch;return!e.readOnly&&(n(e.update(ft(e,(function(t,n){n.push({from:t.from,insert:e.facet(a.c)})})),{userEvent:"input.indent"})),!0)},vt=function(t){var e=t.state,n=t.dispatch;return!e.readOnly&&(n(e.update(ft(e,(function(t,n){var r=/^\s*/.exec(t.text)[0];if(r){for(var o=(0,i.IS)(r,e.tabSize),s=0,u=(0,a.SS)(e,Math.max(0,o-(0,a.y1)(e)));s1?o=r.jT.create([i.main]):i.main.empty||(o=r.jT.create([r.jT.cursor(i.main.head)])),!!o&&(n(g(e,o)),!0)}},{key:"Mod-Enter",run:ct(!0)},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var e=t.state,n=t.dispatch,i=st(e).map((function(t){var n=t.from,i=t.to;return r.jT.range(n,Math.min(i+1,e.doc.length))}));return n(e.update({selection:r.jT.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var e=t.state,n=t.dispatch,i=m(e.selection,(function(t){for(var n,i=(0,a.qz)(e).resolveInner(t.head,1);!(i.from=t.to||i.to>t.to&&i.from<=t.from)&&(null===(n=i.parent)||void 0===n?void 0:n.parent);)i=i.parent;return r.jT.range(i.to,i.from)}));return n(g(e,i)),!0},preventDefault:!0},{key:"Mod-[",run:vt},{key:"Mod-]",run:dt},{key:"Mod-Alt-\\",run:function(t){var e=t.state,n=t.dispatch;if(e.readOnly)return!1;var r=Object.create(null),i=new a.Gn(e,{overrideIndentation:function(t){var e=r[t];return null==e?-1:e}}),o=ft(e,(function(t,n,o){var s=(0,a.K0)(i,t.from);if(null!=s){/\S/.test(t.text)||(s=0);var u=/^\s*/.exec(t.text)[0],l=(0,a.SS)(e,s);(u!=l||o.from0?n--:rn?n:Math.max(0,e-1),!1)}))}},{mac:"Mod-Delete",run:at}].concat([{key:"Ctrl-b",run:w,shift:V,preventDefault:!0},{key:"Ctrl-f",run:x,shift:H},{key:"Ctrl-p",run:O,shift:W},{key:"Ctrl-n",run:T,shift:q},{key:"Ctrl-a",run:function(t){return y(t,(function(e){return r.jT.cursor(t.lineBlockAt(e.head).from,1)}))},shift:function(t){return N(t,(function(e){return r.jT.cursor(t.lineBlockAt(e.head).from)}))}},{key:"Ctrl-e",run:function(t){return y(t,(function(e){return r.jT.cursor(t.lineBlockAt(e.head).to,-1)}))},shift:function(t){return N(t,(function(e){return r.jT.cursor(t.lineBlockAt(e.head).to)}))}},{key:"Ctrl-d",run:rt},{key:"Ctrl-h",run:nt},{key:"Ctrl-k",run:at},{key:"Ctrl-Alt-h",run:ot},{key:"Ctrl-o",run:function(t){var e=t.state,n=t.dispatch;if(e.readOnly)return!1;var o=e.changeByRange((function(t){return{changes:{from:t.from,to:t.to,insert:i.xv.of(["",""])},range:r.jT.cursor(t.from)}}));return n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:function(t){var e=t.state,n=t.dispatch;if(e.readOnly)return!1;var o=e.changeByRange((function(t){if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};var n=t.from,o=e.doc.lineAt(n),a=n==o.from?n-1:(0,i.cp)(o.text,n-o.from,!1)+o.from,s=n==o.to?n+1:(0,i.cp)(o.text,n-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:e.doc.slice(n,s).append(e.doc.slice(a,n))},range:r.jT.cursor(s)}}));return!o.changes.empty&&(n(e.update(o,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:R}].map((function(t){return{mac:t.key,run:t.run,shift:t.shift}}))))},55987:function(t,e,n){n.d(e,{Eu:function(){return L}});var r=n(91643),i=n(67037),o=n(74075);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nthis.i;){var e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}]),t}(),O=function(){function t(e,n){var r=this;l(this,t),this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var i=function(t){r.dom.addEventListener(t,(function(r){var i=e.lineBlockAtHeight(r.clientY-e.documentTop);n.domEventHandlers[t](e,i,r)&&r.preventDefault()}))};for(var o in n.domEventHandlers)i(o);this.markers=A(n.markers(e)),n.initialSpacer&&(this.spacer=new T(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return c(t,[{key:"update",value:function(t){var e=this.markers;if(this.markers=A(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){var n=this.config.updateSpacer(this.spacer.markers[0],t);n!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[n])}var r=t.view.viewport;return!i.Xs.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}},{key:"destroy",value:function(){var t,e=s(this.elements);try{for(e.s();!(t=e.n()).done;){t.value.destroy()}}catch(n){e.e(n)}finally{e.f()}}}]),t}(),T=function(){function t(e,n,r,i){l(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.update(e,n,r,i)}return c(t,[{key:"update",value:function(t,e,n,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(t,e){if(t.length!=e.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return[E.of(t),x(),B]}function I(t){for(var e=9;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1?e:g.get(e.base||e,e.modified.concat(t).sort((function(t,e){return t.id-e.id})))}}}]),t}(),m=0,g=function(){function t(){c(this,t),this.instances=[],this.id=m++}return d(t,null,[{key:"get",value:function(e,n){if(!n.length)return e;var r=n[0].instances.find((function(t){return t.base==e&&(r=n,i=t.modified,r.length==i.length&&r.every((function(t,e){return t==i[e]})));var r,i}));if(r)return r;var i,o=[],a=new p(o,e,n),s=l(n);try{for(s.s();!(i=s.n()).done;){i.value.instances.push(a)}}catch(g){s.e(g)}finally{s.f()}var u,h=y(n),c=l(e.set);try{for(c.s();!(u=c.n()).done;){var f,d=u.value,v=l(h);try{for(v.s();!(f=v.n()).done;){var m=f.value;o.push(t.get(d,m))}}catch(g){v.e(g)}finally{v.f()}}}catch(g){c.e(g)}finally{c.f()}return a}}]),t}();function y(t){for(var e=[t],n=0;n0&&c+3==a.length){u=1;break}var f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(h);if(!f)throw new RangeError("Invalid path: "+a);if(s.push("*"==f[0]?null:'"'==f[0][0]?JSON.parse(f[0]):f[0]),(c+=f[0].length)==a.length)break;var d=a[c++];if(c==a.length&&"!"==d){u=0;break}if("/"!=d)throw new RangeError("Invalid path: "+a);h=a.slice(c)}var v=s.length-1,p=s[v];if(!p)throw new RangeError("Invalid path: "+a);var m=new A(r,u,v>0?s.slice(0,v):null);e[p]=m.sort(e[p])}}}catch(g){o.e(g)}finally{o.f()}}return b.add(e)}var b=new r.md,w=a.r$.define({combine:function(t){return t.length?C.combinedMatch(t):null}}),x=a.r$.define({combine:function(t){return t.length?t[0].match:null}});function S(t){return t.facet(w)||t.facet(x)}var A=function(){function t(e,n,r,i){c(this,t),this.tags=e,this.mode=n,this.context=r,this.next=i}return d(t,[{key:"sort",value:function(t){return!t||t.depththis.at&&(this.at=t),this.class=e)}},{key:"flush",value:function(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}},{key:"highlightRange",value:function(t,e,n,i,o,a){var s=t.type,u=t.from,h=t.to;if(!(u>=n||h<=e)){T[o]=s.name,s.isTop&&(a=s);for(var c=i,f=s.prop(b),d=!1;f;){if(!f.context||R(f.context,T,o)){var v,p=l(f.tags);try{for(p.s();!(v=p.n()).done;){var m=v.value,g=this.style(m,a);g&&(c&&(c+=" "),c+=g,1==f.mode?i+=(i?" ":"")+g:0==f.mode&&(d=!0))}}catch(D){p.e(D)}finally{p.f()}break}f=f.next}if(this.startSpan(t.from,c),!d){var y=t.tree&&t.tree.prop(r.md.mounted);if(y&&y.overlay){for(var k=t.node.enter(y.overlay[0].from+u,1),w=t.firstChild(),x=0,S=u;;x++){var A=x=C)&&t.nextSibling()););if(!A||C>n)break;(S=A.to+u)>e&&(this.highlightRange(k.cursor,Math.max(e,A.from+u),Math.min(n,S),i,o,y.tree.type),this.startSpan(S,c))}w&&t.parent()}else if(t.firstChild()){do{if(!(t.to<=e)){if(t.from>=n)break;this.highlightRange(t,e,n,i,o+1,a),this.startSpan(Math.min(n,t.to),c)}}while(t.nextSibling());t.parent()}}}}}]),t}();function E(t,e,n,r,i){var o=new D(e,r,i);o.highlightRange(t.cursor(),e,n,"",0,t.type),o.flush(n)}function R(t,e,n){if(t.length>n-1)return!1;for(var r=n-1,i=t.length-1;i>=0;i--,r--){var o=t[i];if(o&&o!=e[r])return!1}return!0}var P=p.define,B=P(),L=P(),I=P(L),N=P(L),j=P(),V=P(j),H=P(j),z=P(),_=P(z),W=P(),q=P(),F=P(),$=P(F),U=P(),K={comment:B,lineComment:P(B),blockComment:P(B),docComment:P(B),name:L,variableName:P(L),typeName:I,tagName:P(I),propertyName:N,attributeName:P(N),className:P(L),labelName:P(L),namespace:P(L),macroName:P(L),literal:j,string:V,docString:P(V),character:P(V),attributeValue:P(V),number:H,integer:P(H),float:P(H),bool:P(j),regexp:P(j),escape:P(j),color:P(j),url:P(j),keyword:W,self:P(W),null:P(W),atom:P(W),unit:P(W),modifier:P(W),operatorKeyword:P(W),controlKeyword:P(W),definitionKeyword:P(W),moduleKeyword:P(W),operator:q,derefOperator:P(q),arithmeticOperator:P(q),logicOperator:P(q),bitwiseOperator:P(q),compareOperator:P(q),updateOperator:P(q),definitionOperator:P(q),typeOperator:P(q),controlOperator:P(q),punctuation:F,separator:P(F),bracket:$,angleBracket:P($),squareBracket:P($),paren:P($),brace:P($),content:z,heading:_,heading1:P(_),heading2:P(_),heading3:P(_),heading4:P(_),heading5:P(_),heading6:P(_),contentSeparator:P(z),list:P(z),quote:P(z),emphasis:P(z),strong:P(z),link:P(z),monospace:P(z),strikethrough:P(z),inserted:P(),deleted:P(),changed:P(),invalid:P(),meta:U,documentMeta:P(U),annotation:P(U),processingInstruction:P(U),definition:p.defineModifier(),constant:p.defineModifier(),function:p.defineModifier(),standard:p.defineModifier(),local:p.defineModifier(),special:p.defineModifier()};K.link,K.heading,K.emphasis,K.strong,K.strikethrough,K.keyword,K.atom,K.bool,K.url,K.contentSeparator,K.labelName,K.literal,K.inserted,K.string,K.deleted,K.regexp,K.escape,K.string,K.variableName,K.variableName,K.typeName,K.namespace,K.className,K.variableName,K.macroName,K.propertyName,K.comment,K.meta,K.invalid,K.link,K.heading,K.emphasis,K.strong,K.keyword,K.atom,K.bool,K.url,K.labelName,K.inserted,K.deleted,K.literal,K.string,K.number,K.regexp,K.escape,K.string,K.variableName,K.variableName,K.variableName,K.variableName,K.propertyName,K.typeName,K.namespace,K.className,K.macroName,K.propertyName,K.operator,K.comment,K.meta,K.invalid,K.punctuation},74506:function(t,e,n){n.d(e,{m8:function(){return p},f$:function(){return R}});var r=n(74075),i=n(91643);function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};return[v,d.of(t),i.tk.domEventHandlers({beforeinput:function(t,e){var n="historyUndo"==t.inputType?g:"historyRedo"==t.inputType?y:null;return!!n&&(t.preventDefault(),n(e))}})]}function m(t,e){return function(n){var r=n.state,i=n.dispatch;if(!e&&r.readOnly)return!1;var o=r.field(v,!1);if(!o)return!1;var a=o.pop(t,r,e);return!!a&&(i(a),!0)}}var g=m(0,!1),y=m(1,!1),k=m(0,!0),b=m(1,!0);var w=function(){function t(e,n,r,i,o){s(this,t),this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}return l(t,[{key:"setSelAfter",value:function(e){return new t(this.changes,this.effects,this.mapped,this.startSelection,e)}},{key:"toJSON",value:function(){var t,e,n;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((function(t){return t.toJSON()}))}}}],[{key:"fromJSON",value:function(e){return new t(e.changes&&r.as.fromJSON(e.changes),[],e.mapped&&r.n0.fromJSON(e.mapped),e.startSelection&&r.jT.fromJSON(e.startSelection),e.selectionsAfter.map(r.jT.fromJSON))}},{key:"fromTransaction",value:function(e,n){var r,i=A,a=o(e.startState.facet(f));try{for(a.s();!(r=a.n()).done;){var s=(0,r.value)(e);s.length&&(i=i.concat(s))}}catch(u){a.e(u)}finally{a.f()}return!i.length&&e.changes.empty?null:new t(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,A)}},{key:"selection",value:function(e){return new t(void 0,A,void 0,void 0,e)}}]),t}();function x(t,e,n,r){var i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function S(t,e){return t.length?e.length?t.concat(e):t:e}var A=[];function C(t,e){if(t.length){var n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),x(t,t.length-1,1e9,n.setSelAfter(r)))}return[w.selection([e])]}function M(t){var e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function O(t,e){if(!t.length)return t;for(var n=t.length,r=A;n;){var i=T(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){var o=t.slice(0,n);return o[n-1]=i,o}e=i.mapped,n--,r=i.selectionsAfter}return r.length?[w.selection(r)]:A}function T(t,e,n){var i=S(t.selectionsAfter.length?t.selectionsAfter.map((function(t){return t.map(e)})):A,n);if(!t.changes)return w.selection(i);var o=t.changes.map(e),a=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(a):a;return new w(o,r.Py.mapEffects(t.effects,e),s,t.startSelection.map(a),i)}var D=/^(input\.type|delete)($|\.)/,E=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;s(this,t),this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}return l(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(e,n,r,i,o){var a=this.done,s=a[a.length-1];return a=s&&s.changes&&!s.changes.empty&&e.changes&&(!r||D.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime=s&&i<=u&&(r=!0)}})),r}(s.changes,e.changes)||"input.type.compose"==r)?x(a,a.length-1,o,new w(e.changes.compose(s.changes),S(e.effects,s.effects),s.mapped,s.startSelection,A)):x(a,a.length,o,e),new t(a,A,n,r)}},{key:"addSelection",value:function(e,n,r,i){var o,a,s=this.done.length?this.done[this.done.length-1].selectionsAfter:A;return s.length>0&&n-this.prevTime=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:[];p(this,t),this.data=e,this.topNode=r,i.yy.prototype.hasOwnProperty("tree")||Object.defineProperty(i.yy.prototype,"tree",{get:function(){return x(this)}}),this.parser=n,this.extension=[R.of(this),i.yy.languageData.of((function(t,e,n){return t.facet(w(t,e,n))}))].concat(o)}return g(t,[{key:"isActiveAt",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return w(t,e,n)==this.data}},{key:"findRegions",value:function(t){var e=this,n=t.facet(R);if((null==n?void 0:n.data)==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];var i=[];return function t(n,o){if(n.prop(y)!=e.data){var a=n.prop(r.md.mounted);if(a){if(a.tree.prop(y)==e.data){if(a.overlay){var s,u=d(a.overlay);try{for(u.s();!(s=u.n()).done;){var l=s.value;i.push({from:l.from+o,to:l.to+o})}}catch(v){u.e(v)}finally{u.f()}}else i.push({from:o,to:o+n.length});return}if(a.overlay){var h=i.length;if(t(a.tree,a.overlay[0].from+o),i.length>h)return}}for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:e.length;p(this,t),this.doc=e,this.length=n,this.cursorPos=0,this.string="",this.cursor=e.iter()}return g(t,[{key:"syncTo",value:function(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}},{key:"chunk",value:function(t){return this.syncTo(t),this.string}},{key:"lineChunks",get:function(){return!0}},{key:"read",value:function(t,e){var n=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}]),t}(),A=null,C=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0;p(this,t),this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}return g(t,[{key:"startParse",value:function(){return this.parser.startParse(new S(this.state.doc),this.fragments)}},{key:"work",value:function(t,e){var n=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=r.mp.empty&&(null==e?this.treeLen==this.state.doc.length:this.treeLen>=e)?(this.takeTree(),!0):this.withContext((function(){var i;n.parse||(n.parse=n.startParse()),null!=e&&(null==n.parse.stoppedAt||n.parse.stoppedAt>e)&&eo)return!1}}))}},{key:"takeTree",value:function(){var t,e,n=this;this.parse&&(t=this.parse.parsedPos)>this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((function(){for(;!(e=n.parse.advance()););})),this.tree=e,this.fragments=this.withoutTempSkipped(r.i9.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(t){var e=A;A=this;try{return t()}finally{A=e}}},{key:"withoutTempSkipped",value:function(t){for(var e;e=this.tempSkipped.pop();)t=M(t,e.from,e.to);return t}},{key:"changes",value:function(e,n){var i=this.fragments,o=this.tree,a=this.treeLen,s=this.viewport,u=this.skipped;if(this.takeTree(),!e.empty){var l=[];if(e.iterChangedRanges((function(t,e,n,r){return l.push({fromA:t,toA:e,fromB:n,toB:r})})),i=r.i9.applyChanges(i,l),o=r.mp.empty,a=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){u=[];var h,c=d(this.skipped);try{for(c.s();!(h=c.n()).done;){var f=h.value,v=e.mapPos(f.from,1),p=e.mapPos(f.to,-1);vt.from&&(this.fragments=M(this.fragments,i,o),this.skipped.splice(n--,1))}return this.skipped.length=t}}],[{key:"getSkippingParser",value:function(t){return new(function(e){u(i,e);var n=h(i);function i(){return p(this,i),n.apply(this,arguments)}return g(i,[{key:"createParse",value:function(e,n,i){var o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance:function(){var e=A;if(e){var n,s=d(i);try{for(s.s();!(n=s.n()).done;){var u=n.value;e.tempSkipped.push(u)}}catch(l){s.e(l)}finally{s.f()}t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=a,new r.mp(r.Jq.none,[],[],a-o)},stoppedAt:null,stopAt:function(){}}}}]),i}(r._b))}},{key:"get",value:function(){return A}}]),t}();function M(t,e,n){return r.i9.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}var O=function(){function t(e){p(this,t),this.context=e,this.tree=e.tree}return g(t,[{key:"apply",value:function(e){if(!e.docChanged)return this;var n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(25,r)||n.takeTree(),new t(n)}}],[{key:"init",value:function(e){var n=new C(e.facet(R).parser,e,[],r.mp.empty,0,{from:0,to:e.doc.length},[],null);return n.work(25)||n.takeTree(),new t(n)}}]),t}();b.state=i.QQ.define({create:O.init,update:function(t,e){var n,r=d(e.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(b.setState))return i.value}}catch(o){r.e(o)}finally{r.f()}return e.startState.facet(R)!=e.state.facet(R)?O.init(e.state):t.apply(e)}});var T="undefined"!=typeof window&&window.requestIdleCallback||function(t,e){var n=e.timeout;return setTimeout(t,n)},D="undefined"!=typeof window&&window.cancelIdleCallback||clearTimeout,E=o.lg.fromClass(function(){function t(e){p(this,t),this.view=e,this.working=-1,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return g(t,[{key:"update",value:function(t){var e=this.view.state.field(b.state).context;t.viewportChanged&&(e.updateViewport(t.view.viewport)&&e.reset(),this.view.viewport.to>e.treeLen&&this.scheduleWork()),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!(this.working>-1)){var t=this.view.state,e=t.field(b.state),n=e.context.fragments;e.tree==e.context.tree&&e.context.treeLen>=t.doc.length&&n.length&&0==n[0].from&&n[0].to>=t.doc.length||(this.working=T(this.work,{timeout:500}))}}},{key:"work",value:function(t){this.working=-1;var e=Date.now();if(this.chunkEnd=i+1e6)){var a=Math.min(this.chunkBudget,t?Math.max(25,t.timeRemaining()):100),s=o.context.work(a,i+1e6);this.chunkBudget-=Date.now()-e,(s||this.chunkBudget<=0||o.context.movedPast(i))&&(o.context.takeTree(),this.view.dispatch({effects:b.setState.of(new O(o.context))})),!s&&this.chunkBudget>0&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}}}},{key:"checkAsyncSchedule",value:function(t){var e=this;t.scheduleOn&&(t.scheduleOn.then((function(){return e.scheduleWork()})),t.scheduleOn=null)}},{key:"destroy",value:function(){this.working>=0&&D(this.working)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),R=i.r$.define({combine:function(t){return t.length?t[0]:null},enables:[b.state,E]}),P=i.r$.define(),B=i.r$.define({combine:function(t){if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function L(t){var e=t.facet(B);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function I(t,e){var n="",r=t.tabSize;if(9==t.facet(B).charCodeAt(0))for(;e>=r;)n+="\t",e-=r;for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};p(this,t),this.state=e,this.options=n,this.unit=L(e)}return g(t,[{key:"lineAt",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.state.doc.lineAt(t),r=this.options.simulateBreak;return null!=r&&r>=n.from&&r<=n.to?(e<0?r1&&void 0!==arguments[1]?arguments[1]:1;if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";var n=this.lineAt(t,e),r=n.text,i=n.from;return r.slice(t-i,Math.min(r.length,t+100-i))}},{key:"column",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(t,e),r=n.text,i=n.from,o=this.countColumn(r,t-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}},{key:"countColumn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.length;return(0,a.IS)(t,this.state.tabSize,e)}},{key:"lineIndent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(t,e),r=n.text,i=n.from,o=this.options.overrideIndentation;if(o){var a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),V=new r.md;function H(t){var e=t.type.prop(V);if(e)return e;var n,i=t.firstChild;if(i&&(n=i.type.prop(r.md.closedBy))){var o=t.lastChild,a=o&&n.indexOf(o.name)>-1;return function(t){return F(t,!0,1,void 0,a&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?o.from:void 0)}}return null==t.parent?_:null}function z(t,e,n){for(;t;t=t.parent){var r=H(t);if(r)return r(new W(n,e,t))}return null}function _(){return 0}var W=function(t){u(n,t);var e=h(n);function n(t,r,i){var o;return p(this,n),(o=e.call(this,t.state,t.options)).base=t,o.pos=r,o.node=i,o}return g(n,[{key:"textAfter",get:function(){return this.textAfterPos(this.pos)}},{key:"baseIndent",get:function(){for(var t=this.state.doc.lineAt(this.node.from);;){for(var e=this.node.resolve(t.from);e.parent&&e.parent.from==e.from;)e=e.parent;if(q(e,this.node))break;t=this.state.doc.lineAt(e.from)}return this.lineIndent(t.from)}},{key:"continue",value:function(){var t=this.node.parent;return t?z(t,this.pos,this.base):0}}]),n}(j);function q(t,e){for(var n=e;n;n=n.parent)if(t==n)return!0;return!1}function F(t,e,n,r,i){var o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,u=e?function(t){var e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;for(var i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=null==i||i<=o.from?o.to:Math.min(o.to,i),s=n.to;;){var u=e.childAfter(s);if(!u||u==r)return null;if(!u.type.isSkipped)return u.from!?|~^]/,o=/^[:\[\(\{]/,a=["true","false"],s=/^(\d[+\-\*\/])?\d+(\.\d+)?/;function u(t,e){var n=t.peek();if(e.incomment)return t.skipTo("#}")?(t.eatWhile(/\#|}/),e.incomment=!1):t.skipToEnd(),"comment";if(e.intag){if(e.operator){if(e.operator=!1,t.match(a))return"atom";if(t.match(s))return"number"}if(e.sign){if(e.sign=!1,t.match(a))return"atom";if(t.match(s))return"number"}if(e.instring)return n==e.instring&&(e.instring=!1),t.next(),"string";if("'"==n||'"'==n)return e.instring=n,t.next(),"string";if(t.match(e.intag+"}")||t.eat("-")&&t.match(e.intag+"}"))return e.intag=!1,"tag";if(t.match(i))return e.operator=!0,"operator";if(t.match(o))e.sign=!0;else if(t.eat(" ")||t.sol()){if(t.match(r))return"keyword";if(t.match(a))return"atom";if(t.match(s))return"number";t.sol()&&t.next()}else t.next();return"variable"}if(t.eat("{")){if(t.eat("#"))return e.incomment=!0,t.skipTo("#}")?(t.eatWhile(/\#|}/),e.incomment=!1):t.skipToEnd(),"comment";if(n=t.eat(/\{|%/))return e.intag=n,"{"==n&&(e.intag="}"),t.eat("-"),"tag"}t.next()}r=new RegExp("(("+r.join(")|(")+"))\\b"),a=new RegExp("(("+a.join(")|(")+"))\\b");var l={startState:function(){return{tokenize:u}},token:function(t,e){return e.tokenize(t,e)},languageData:{commentTokens:{block:{open:"{#",close:"#}"}}}}},76697:function(t,e,n){n.d(e,{r:function(){return i}});var r=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i"),i={token:function(t,e){var n=t.peek(),i=e.escaped;if(e.escaped=!1,"#"==n&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&t.indentation()>e.keyCol)return t.skipToEnd(),"string";if(e.literal&&(e.literal=!1),t.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,t.match("---"))return"def";if(t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==n?e.inlinePairs++:"}"==n?e.inlinePairs--:"["==n?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&","==n)return t.next(),"meta";if(e.inlinePairs>0&&!i&&","==n)return e.keyCol=0,e.pair=!1,e.pairStart=!1,t.next(),"meta";if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(0==e.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(r))return"keyword"}return!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=t.indentation(),"atom"):e.pair&&t.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped="\\"==n,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}}},67037:function(t,e,n){n.d(e,{Xs:function(){return d},f_:function(){return p},uU:function(){return l}});var r=n(74075);function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:t;return new h(t,e,this)}}]),t}();l.prototype.startSide=l.prototype.endSide=0,l.prototype.point=!1,l.prototype.mapMode=r.gc.TrackDel;var h=function t(e,n,r){a(this,t),this.from=e,this.to=n,this.value=r};function c(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}var f=function(){function t(e,n,r,i){a(this,t),this.from=e,this.to=n,this.value=r,this.maxPoint=i}return u(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n?this.to:this.from,o=r,a=i.length;;){if(o==a)return o;var s=o+a>>1,u=i[s]-t||(n?this.value[s].endSide:this.value[s].startSide)-e;if(s==o)return u>=0?o:a;u>=0?a=s:o=s+1}}},{key:"between",value:function(t,e,n,r){for(var i=this.findIndex(e,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i(d=n.mapPos(c,l.endSide))||f==d&&l.startSide>0&&l.endSide<=0)continue;(d-f||l.endSide-l.startSide)<0||(a<0&&(a=f),l.point&&(s=Math.max(s,d-f)),r.push(l),i.push(f-a),o.push(d-a))}return{mapped:r.length?new t(i,o,r,s):null,pos:a}}}]),t}(),d=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.empty,i=arguments.length>3?arguments[3]:void 0;a(this,t),this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}return u(t,[{key:"length",get:function(){var t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var t,e=this.nextLayer.size,n=i(this.chunk);try{for(n.s();!(t=n.n()).done;){e+=t.value.value.length}}catch(r){n.e(r)}finally{n.f()}return e}},{key:"chunkEnd",value:function(t){return this.chunkPos[t]+this.chunk[t].length}},{key:"update",value:function(e){var n=e.add,r=void 0===n?[]:n,i=e.sort,o=void 0!==i&&i,a=e.filterFrom,s=void 0===a?0:a,u=e.filterTo,l=void 0===u?this.length:u,f=e.filter;if(0==r.length&&!f)return this;if(o&&r.slice().sort(c),this.isEmpty)return r.length?t.of(r):this;for(var d=new g(this,null,-1).goto(0),v=0,m=[],y=new p;d.value||v=0){var k=r[v++];y.addInner(k.from,k.to,k.value)||m.push(k)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||ld.to||l=i&&t<=i+o.length&&!1===o.between(i,t-i,e-i,n))return}this.nextLayer.between(t,e,n)}}},{key:"iter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return y.from([this]).goto(t)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"iter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return y.from(t).goto(e)}},{key:"compare",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=t.filter((function(t){return t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i})),a=e.filter((function(t){return t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i})),s=m(o,a,n),u=new b(o,s,i),l=new b(a,s,i);n.iterGaps((function(t,e,n){return w(u,t,l,e,n,r)})),n.empty&&0==n.length&&w(u,0,l,0,0,r)}},{key:"eq",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=1e9);var i=t.filter((function(t){return!t.isEmpty&&e.indexOf(t)<0})),o=e.filter((function(e){return!e.isEmpty&&t.indexOf(e)<0}));if(i.length!=o.length)return!1;if(!i.length)return!0;for(var a=m(i,o),s=new b(i,a,0).goto(n),u=new b(o,a,0).goto(n);;){if(s.to!=u.to||!x(s.active,u.active)||s.point&&(!u.point||!s.point.eq(u.point)))return!1;if(s.to>r)return!0;s.next(),u.next()}}},{key:"spans",value:function(t,e,n,r){for(var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=new b(t,null,o,null===(i=r.filterPoint)||void 0===i?void 0:i.bind(r)).goto(e),s=e,u=a.openStart;;){var l=Math.min(a.to,n);if(a.point?(r.point(s,l,a.point,a.activeForPoint(a.to),u),u=a.openEnd(l)+(a.to>l?1:0)):l>s&&(r.span(s,l,a.active,u),u=a.openEnd(l)),a.to>n)break;s=a.to,a.next()}return u}},{key:"of",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new p,o=i(t instanceof h?[t]:n?v(t):t);try{for(o.s();!(e=o.n()).done;){var a=e.value;r.add(a.from,a.to,a.value)}}catch(s){o.e(s)}finally{o.f()}return r.finish()}}]),t}();function v(t){if(t.length>1)for(var e=t[0],n=1;n0)return t.slice().sort(c);e=r}return t}d.empty=new d([],[],null,-1),d.empty.nextLayer=d.empty;var p=function(){function t(){a(this,t),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return u(t,[{key:"finishChunk",value:function(t){this.chunks.push(new f(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new t)).add(e,n,r)}},{key:"addInner",value:function(t,e,n){var r=t-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}},{key:"addChunk",value:function(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);var n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}},{key:"finish",value:function(){return this.finishInner(d.empty)}},{key:"finishInner",value:function(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;var e=new d(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}]),t}();function m(t,e,n){var r,o=new Map,a=i(t);try{for(a.s();!(r=a.n()).done;)for(var s=r.value,u=0;u3&&void 0!==arguments[3]?arguments[3]:0;a(this,t),this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}return u(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}},{key:"gotoInner",value:function(t,e,n){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=i(this.heap);try{for(r.s();!(e=r.n()).done;){var o=e.value;o.goto(t,n)}}catch(s){r.e(s)}finally{r.f()}for(var a=this.heap.length>>1;a>=0;a--)k(this.heap,a);return this.next(),this}},{key:"forward",value:function(t,e){var n,r=i(this.heap);try{for(r.s();!(n=r.n()).done;){n.value.forward(t,e)}}catch(a){r.e(a)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)k(this.heap,o);(this.to-t||this.value.endSide-e)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),k(this.heap,0)}}}],[{key:"from",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=0;o=r&&i.push(new g(a,n,r,o));return 1==i.length?i[0]:new t(i)}}]),t}();function k(t,e){for(var n=t[e];;){var r=1+(e<<1);if(r>=t.length)break;var i=t[r];if(r+1=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}var b=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};a(this,t),this.minPoint=r,this.filterPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=y.from(e,n,r)}return u(t,[{key:"goto",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}},{key:"removeActive",value:function(t){S(this.active,t),S(this.activeTo,t),S(this.activeRank,t),this.minActive=C(this.active,this.activeTo)}},{key:"addActive",value:function(t){for(var e=0,n=this.cursor,r=n.value,i=n.to,o=n.rank;e-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&S(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point)if(e&&this.cursor.to==this.to&&this.cursor.fromt&&this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}if(n){for(var a=0;a=0&&!(this.activeRank[n]t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}},{key:"openEnd",value:function(t){for(var e=0,n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}]),t}();function w(t,e,n,r,i,o){t.goto(e),n.goto(r);for(var a=r+i,s=r,u=r-e;;){var l=t.to+u-n.to||t.endSide-n.endSide,h=l<0?t.to+u:n.to,c=Math.min(h,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&x(t.activeForPoint(t.to+u),n.activeForPoint(n.to))||o.comparePoint(s,c,t.point,n.point):c>s&&!x(t.active,n.active)&&o.compareRange(s,c,t.active,n.active),h>a)break;s=h,l<=0&&t.next(),l>=0&&n.next()}}function x(t,e){if(t.length!=e.length)return!1;for(var n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function C(t,e){for(var n=-1,r=1e9,i=0;ia?-1:i==r.length?function(t,e){var n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):(0,o.IS)(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function u(t,e){var n=s(t,e),i=t.state.selection;return n?{update:function(t){if(t.docChanged){var e=t.changes.mapPos(t.startState.doc.line(n.line).from),r=t.state.doc.lineAt(e);n={line:r.number,col:n.col,off:Math.min(n.off,r.length)},i=i.map(t.changes)}},get:function(e,u,l){var h=s(t,e);if(!h)return i;var c=function(t,e,n){var i=Math.min(e.line,n.line),s=Math.max(e.line,n.line),u=[];if(e.off>a||n.off>a||e.col<0||n.col<0)for(var l=Math.min(e.off,n.off),h=Math.max(e.off,n.off),c=i;c<=s;c++){var f=t.doc.line(c);f.length<=h&&u.push(r.jT.range(f.from+l,f.to+h))}else for(var d=Math.min(e.col,n.col),v=Math.max(e.col,n.col),p=i;p<=s;p++){var m=t.doc.line(p),g=(0,o.Gz)(m.text,d,t.tabSize,!0);if(g>-1){var y=(0,o.Gz)(m.text,v,t.tabSize);u.push(r.jT.range(m.from+g,m.from+y))}}return u}(t.state,n,h);return c.length?l?r.jT.create(c.concat(i.ranges)):r.jT.create(c):i}}:null}function l(t){var e=(null==t?void 0:t.eventFilter)||function(t){return t.altKey&&0==t.button};return i.tk.mouseSelectionStyle.of((function(t,n){return e(n)?u(t,n):null}))}},86315:function(t,e,n){n.d(e,{sW:function(){return X},Lp:function(){return St}});var r=n(91643),i=n(74075);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1?n.panels[r]:null}var f=r.lg.fromClass(function(){function t(e){o(this,t),this.input=e.state.facet(m),this.specs=this.input.filter((function(t){return t})),this.panels=this.specs.map((function(t){return t(e)}));var n=e.state.facet(h);this.top=new d(e,!0,n.topContainer),this.bottom=new d(e,!1,n.bottomContainer),this.top.sync(this.panels.filter((function(t){return t.top}))),this.bottom.sync(this.panels.filter((function(t){return!t.top})));var r,i=u(this.panels);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.dom.classList.add("cm-panel"),a.mount&&a.mount()}}catch(s){i.e(s)}finally{i.f()}}return s(t,[{key:"update",value:function(t){var e=t.state.facet(h);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new d(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new d(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var n=t.state.facet(m);if(n!=this.input){var r,i=n.filter((function(t){return t})),o=[],a=[],s=[],l=[],c=u(i);try{for(c.s();!(r=c.n()).done;){var f=r.value,v=this.specs.indexOf(f),p=void 0;v<0?(p=f(t.view),l.push(p)):(p=this.panels[v]).update&&p.update(t),o.push(p),(p.top?a:s).push(p)}}catch(S){c.e(S)}finally{c.f()}this.specs=i,this.panels=o,this.top.sync(a),this.bottom.sync(s);for(var g=0,y=l;g=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||R(t,e)||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 R(t,e){if(t){if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(t,e):void 0}}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,o=arguments.length>4?arguments[4]:void 0;B(this,t),this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?function(t){return o(N(t))}:N,this.query=this.normalize(n)}return I(t,[{key:"peek",value:function(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,w.gm)(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var t=this.peek();if(t<0)return this.done=!0,this;var e=(0,w.bg)(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,w.nZ)(t);for(var r=this.normalize(e),i=0,o=n;;i++){var a=r.charCodeAt(i),s=this.match(a,o);if(s)return this.value=s,this;if(i==r.length-1)break;o==n&&i3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.length;if(B(this,t),this.to=o,this.curLine="",this.done=!1,this.value=V,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new q(e,n,r,i,o);this.re=new RegExp(n,H+((null==r?void 0:r.ignoreCase)?"i":"")),this.iter=e.iter();var a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=i,this.getLine(this.curLineStart)}return I(t,[{key:"getLine",value:function(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var n=this.curLineStart+e.index,r=n+e[0].length;if(this.matchPos=r+(n==r?1:0),n==this.curLine.length&&this.nextLine(),nthis.value.to)return this.value={from:n,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=r||i.to<=n){var o=new t(n,e.sliceString(n,r));return _.set(e,o),o}if(i.from==n&&i.to==r)return i;var a=i.text,s=i.from;return s>n&&(a=e.sliceString(n,s)+a,s=n),i.to=this.to?this.to:this.text.lineAt(t).to}},{key:"next",value:function(){for(;;){var t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e&&this.flat.tothis.flat.text.length-10&&(e=null),e){var n=this.flat.from+e.index,r=n+e[0].length;return this.value={from:n,to:r,match:e},this.matchPos=r+(n==r?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=W.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function F(t){var e=k("input",{class:"cm-textfield",name:"line"});function n(){var n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(n){var r=t.state,o=r.doc.lineAt(r.selection.main.head),a=E(n,5),s=a[1],u=a[2],l=a[3],h=a[4],c=l?+l.slice(1):0,f=u?+u:o.number;if(u&&h){var d=f/100;s&&(d=d*("-"==s?-1:1)+o.number/r.doc.lines),f=Math.round(r.doc.lines*d)}else u&&s&&(f=f*("-"==s?-1:1)+o.number);var v=r.doc.line(Math.max(1,Math.min(r.doc.lines,f)));t.dispatch({effects:$.of(!1),selection:i.jT.cursor(v.from+Math.max(0,Math.min(c,v.length))),scrollIntoView:!0}),t.focus()}}return{dom:k("form",{class:"cm-gotoLine",onkeydown:function(e){27==e.keyCode?(e.preventDefault(),t.dispatch({effects:$.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),n())},onsubmit:function(t){t.preventDefault(),n()}},k("label",t.state.phrase("Go to line"),": ",e)," ",k("button",{class:"cm-button",type:"submit"},t.state.phrase("go"))),pos:-10}}"undefined"!=typeof Symbol&&(z.prototype[Symbol.iterator]=q.prototype[Symbol.iterator]=function(){return this});var $=i.Py.define(),U=i.QQ.define({create:function(){return!0},update:function(t,e){var n,r=D(e.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is($)&&(t=i.value)}}catch(o){r.e(o)}finally{r.f()}return t},provide:function(t){return m.from(t,(function(t){return t?F:null}))}}),K=r.tk.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),G={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100},J=i.r$.define({combine:function(t){return(0,i.BO)(t,G,{highlightWordAroundCursor:function(t,e){return t||e},minSelectionLength:Math.min,maxMatches:Math.min})}});function X(t){var e=[tt,Z];return t&&e.push(J.of(t)),e}var Q=r.p.mark({class:"cm-selectionMatch"}),Y=r.p.mark({class:"cm-selectionMatch cm-selectionMatch-main"}),Z=r.lg.fromClass(function(){function t(e){B(this,t),this.decorations=this.getDeco(e)}return I(t,[{key:"update",value:function(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}},{key:"getDeco",value:function(t){var e=t.state.facet(J),n=t.state,o=n.selection;if(o.ranges.length>1)return r.p.none;var a,s=o.main,u=null;if(s.empty){if(!e.highlightWordAroundCursor)return r.p.none;var l=n.wordAt(s.head);if(!l)return r.p.none;u=n.charCategorizer(s.head),a=n.sliceDoc(l.from,l.to)}else{var h=s.to-s.from;if(h200)return r.p.none;if(!(a=n.sliceDoc(s.from,s.to).trim()))return r.p.none}var c,f=[],d=D(t.visibleRanges);try{for(d.s();!(c=d.n()).done;)for(var v=c.value,p=new j(n.doc,a,v.from,v.to);!p.next().done;){var m=p.value,g=m.from,y=m.to;if((!u||(0==g||u(n.sliceDoc(g-1,g))!=i.D0.Word)&&(y==n.doc.length||u(n.sliceDoc(y,y+1))!=i.D0.Word))&&(u&&g<=s.from&&y>=s.to?f.push(Y.range(g,y)):(g>=s.to||y<=s.from)&&f.push(Q.range(g,y)),f.length>e.maxMatches))return r.p.none}}catch(k){d.e(k)}finally{d.f()}return r.p.set(f)}}]),t}(),{decorations:function(t){return t.decorations}}),tt=r.tk.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});var et=i.r$.define({combine:function(t){var e;return{top:t.reduce((function(t,e){return null!=t?t:e.top}),void 0)||!1,caseSensitive:t.reduce((function(t,e){return null!=t?t:e.caseSensitive||e.matchCase}),void 0)||!1,createPanel:(null===(e=t.find((function(t){return t.createPanel})))||void 0===e?void 0:e.createPanel)||function(t){return new At(t)}}}});var nt=function(){function t(e){B(this,t),this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,H),!0}catch(e){return!1}}(this.search))}return I(t,[{key:"eq",value:function(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp}},{key:"create",value:function(){return this.regexp?new ot(this):new it(this)}}]),t}(),rt=function t(e){B(this,t),this.spec=e},it=function(t){S(n,t);var e=C(n);function n(t){var r;return B(this,n),(r=e.call(this,t)).unquoted=t.search.replace(/\\([nrt\\])/g,(function(t,e){return"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"})),r}return I(n,[{key:"cursor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length;return new j(t,this.unquoted,e,n,this.spec.caseSensitive?void 0:function(t){return t.toLowerCase()})}},{key:"nextMatch",value:function(t,e,n){var r=this.cursor(t,n).nextOverlapping();return r.done&&(r=this.cursor(t,0,e).nextOverlapping()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(t,e,n){for(var r=n;;){for(var i=Math.max(e,r-1e4-this.unquoted.length),o=this.cursor(t,i,r),a=null;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(i==e)return null;r-=1e4}}},{key:"prevMatch",value:function(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.length)}},{key:"getReplacement",value:function(t){return this.spec.replace}},{key:"matchAll",value:function(t,e){for(var n=this.cursor(t),r=[];!n.next().done;){if(r.length>=e)return null;r.push(n.value)}return r}},{key:"highlight",value:function(t,e,n,r){for(var i=this.cursor(t,Math.max(0,e-this.unquoted.length),Math.min(n+this.unquoted.length,t.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(rt),ot=function(t){S(n,t);var e=C(n);function n(){return B(this,n),e.apply(this,arguments)}return I(n,[{key:"cursor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length;return new z(t,this.spec.search,this.spec.caseSensitive?void 0:{ignoreCase:!0},e,n)}},{key:"nextMatch",value:function(t,e,n){var r=this.cursor(t,n).next();return r.done&&(r=this.cursor(t,0,e).next()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(t,e,n){for(var r=1;;r++){for(var i=Math.max(e,n-1e4*r),o=this.cursor(t,i,n),a=null;!o.next().done;)a=o.value;if(a&&(i==e||a.from>i+10))return a;if(i==e)return null}}},{key:"prevMatch",value:function(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.length)}},{key:"getReplacement",value:function(t){return this.spec.replace.replace(/\$([$&\d+])/g,(function(e,n){return"$"==n?"$":"&"==n?t.match[0]:"0"!=n&&+n=e)return null;r.push(n.value)}return r}},{key:"highlight",value:function(t,e,n,r){for(var i=this.cursor(t,Math.max(0,e-250),Math.min(n+250,t.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(rt),at=i.Py.define(),st=i.Py.define(),ut=i.QQ.define({create:function(t){return new lt(bt(t).create(),kt)},update:function(t,e){var n,r=D(e.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(at)?t=new lt(i.value.create(),t.panel):i.is(st)&&(t=new lt(t.query,i.value?kt:null))}}catch(o){r.e(o)}finally{r.f()}return t},provide:function(t){return m.from(t,(function(t){return t.panel}))}});var lt=function t(e,n){B(this,t),this.query=e,this.panel=n},ht=r.p.mark({class:"cm-searchMatch"}),ct=r.p.mark({class:"cm-searchMatch cm-searchMatch-selected"}),ft=r.lg.fromClass(function(){function t(e){B(this,t),this.view=e,this.decorations=this.highlight(e.state.field(ut))}return I(t,[{key:"update",value:function(t){var e=t.state.field(ut);(e!=t.startState.field(ut)||t.docChanged||t.selectionSet)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(t){var e=t.query;if(!t.panel||!e.spec.valid)return r.p.none;for(var n=this.view,i=new g.f_,o=0,a=n.visibleRanges,s=a.length;oa[o+1].from-500;)h=a[++o].to;e.highlight(n.state.doc,l,h,(function(t,e){var r=n.state.selection.ranges.some((function(n){return n.from==t&&n.to==e}));i.add(t,e,r?ct:ht)}))}return i.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function dt(t){return function(e){var n=e.state.field(ut,!1);return n&&n.query.spec.valid?t(e,n):wt(e)}}var vt=dt((function(t,e){var n=e.query,r=t.state.selection.main,i=r.from,o=r.to,a=n.nextMatch(t.state.doc,i,o);return!(!a||a.from==i&&a.to==o)&&(t.dispatch({selection:{anchor:a.from,head:a.to},scrollIntoView:!0,effects:Ot(t,a),userEvent:"select.search"}),!0)})),pt=dt((function(t,e){var n=e.query,r=t.state,i=r.selection.main,o=i.from,a=i.to,s=n.prevMatch(r.doc,o,a);return!!s&&(t.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:Ot(t,s),userEvent:"select.search"}),!0)})),mt=dt((function(t,e){var n=e.query.matchAll(t.state.doc,1e3);return!(!n||!n.length)&&(t.dispatch({selection:i.jT.create(n.map((function(t){return i.jT.range(t.from,t.to)}))),userEvent:"select.search.matches"}),!0)})),gt=dt((function(t,e){var n=e.query,r=t.state,i=r.selection.main,o=i.from,a=i.to;if(r.readOnly)return!1;var s=n.nextMatch(r.doc,o,o);if(!s)return!1;var u,l,h=[];if(s.from==o&&s.to==a&&(l=r.toText(n.getReplacement(s)),h.push({from:s.from,to:s.to,insert:l}),s=n.nextMatch(r.doc,s.from,s.to)),s){var c=0==h.length||h[0].from>=s.to?0:s.to-s.from-l.length;u={anchor:s.from-c,head:s.to-c}}return t.dispatch({changes:h,selection:u,scrollIntoView:!!u,effects:s?Ot(t,s):void 0,userEvent:"input.replace"}),!0})),yt=dt((function(t,e){var n=e.query;if(t.state.readOnly)return!1;var r=n.matchAll(t.state.doc,1e9).map((function(t){return{from:t.from,to:t.to,insert:n.getReplacement(t)}}));return!!r.length&&(t.dispatch({changes:r,userEvent:"input.replace.all"}),!0)}));function kt(t){return t.state.facet(et).createPanel(t)}function bt(t,e){var n,r=t.selection.main,i=r.empty||r.to>r.from+100?"":t.sliceDoc(r.from,r.to),o=null!==(n=null==e?void 0:e.caseSensitive)&&void 0!==n?n:t.facet(et).caseSensitive;return e&&!i?e:new nt({search:i.replace(/\n/g,"\\n"),caseSensitive:o})}var wt=function(t){var e=t.state.field(ut,!1);if(e&&e.panel){var n=c(t,kt);if(!n)return!1;var r=n.dom.querySelector("[name=search]");if(r!=t.root.activeElement){var o=bt(t.state,e.query.spec);o.valid&&t.dispatch({effects:at.of(o)}),r.focus(),r.select()}}else t.dispatch({effects:[st.of(!0),e?at.of(bt(t.state,e.query.spec)):i.Py.appendConfig.of(Dt)]});return!0},xt=function(t){var e=t.state.field(ut,!1);if(!e||!e.panel)return!1;var n=c(t,kt);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:st.of(!1)}),!0},St=[{key:"Mod-f",run:wt,scope:"editor search-panel"},{key:"F3",run:vt,shift:pt,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:vt,shift:pt,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:xt,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var e=t.state,n=t.dispatch,r=e.selection;if(r.ranges.length>1||r.main.empty)return!1;for(var o=r.main,a=o.from,s=o.to,u=[],l=0,h=new j(e.doc,e.sliceDoc(a,s));!h.next().done;){if(u.length>1e3)return!1;h.value.from==a&&(l=u.length),u.push(i.jT.range(h.value.from,h.value.to))}return n(e.update({selection:i.jT.create(u,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var e=c(t,F);if(!e){var n=[$.of(!0)];null==t.state.field(U,!1)&&n.push(i.Py.appendConfig.of([U,K])),t.dispatch({effects:n}),e=c(t,F)}return e&&e.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var e=t.state,n=t.dispatch,o=e.selection.ranges;if(o.some((function(t){return t.from===t.to})))return function(t){var e=t.state,n=t.dispatch,r=e.selection,o=i.jT.create(r.ranges.map((function(t){return e.wordAt(t.head)||i.jT.cursor(t.head)})),r.mainIndex);return!o.eq(r)&&(n(e.update({selection:o})),!0)}({state:e,dispatch:n});var a=e.sliceDoc(o[0].from,o[0].to);if(e.selection.ranges.some((function(t){return e.sliceDoc(t.from,t.to)!=a})))return!1;var s=function(t,e){for(var n=t.selection,r=n.main,i=n.ranges,o=t.wordAt(r.head),a=o&&o.from==r.from&&o.to==r.to,s=function(n,r){if(r.next(),!r.done){if(n&&i.some((function(t){return t.from==r.value.from})))return l=r,u=n,"continue";if(a){var o=t.wordAt(r.value.from);if(!o||o.from!=r.value.from||o.to!=r.value.to)return l=r,u=n,"continue"}return u=n,l=r,{v:r.value}}if(n)return l=r,u=n,{v:null};r=new j(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),u=n=!0,l=r},u=!1,l=new j(t.doc,e,i[i.length-1].to);;){var h=s(u,l);if("continue"!==h&&"object"===T(h))return h.v}}(e,a);return!!s&&(n(e.update({selection:e.selection.addRange(i.jT.range(s.from,s.to),!1),effects:r.tk.scrollIntoView(s.to)})),!0)},preventDefault:!0}],At=function(){function t(e){var n=this;B(this,t),this.view=e;var r=this.query=e.state.field(ut).query.spec;function i(t,e,n){return k("button",{class:"cm-button",name:t,onclick:e,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=k("input",{value:r.search,placeholder:Ct(e,"Find"),"aria-label":Ct(e,"Find"),class:"cm-textfield",name:"search",onchange:this.commit,onkeyup:this.commit}),this.replaceField=k("input",{value:r.replace,placeholder:Ct(e,"Replace"),"aria-label":Ct(e,"Replace"),class:"cm-textfield",name:"replace",onchange:this.commit,onkeyup:this.commit}),this.caseField=k("input",{type:"checkbox",name:"case",checked:r.caseSensitive,onchange:this.commit}),this.reField=k("input",{type:"checkbox",name:"re",checked:r.regexp,onchange:this.commit}),this.dom=k("div",{onkeydown:function(t){return n.keydown(t)},class:"cm-search"},[this.searchField,i("next",(function(){return vt(e)}),[Ct(e,"next")]),i("prev",(function(){return pt(e)}),[Ct(e,"previous")]),i("select",(function(){return mt(e)}),[Ct(e,"all")]),k("label",null,[this.caseField,Ct(e,"match case")]),k("label",null,[this.reField,Ct(e,"regexp")])].concat(x(e.state.readOnly?[]:[k("br"),this.replaceField,i("replace",(function(){return gt(e)}),[Ct(e,"replace")]),i("replaceAll",(function(){return yt(e)}),[Ct(e,"replace all")]),k("button",{name:"close",onclick:function(){return xt(e)},"aria-label":Ct(e,"close"),type:"button"},["×"])])))}return I(t,[{key:"commit",value:function(){var t=new nt({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:at.of(t)}))}},{key:"keydown",value:function(t){(0,r.$1)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?pt:vt)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),gt(this.view))}},{key:"update",value:function(t){var e,n=D(t.transactions);try{for(n.s();!(e=n.n()).done;){var r,i=D(e.value.effects);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.is(at)&&!o.value.eq(this.query)&&this.setQuery(o.value)}}catch(a){i.e(a)}finally{i.f()}}}catch(a){n.e(a)}finally{n.f()}}},{key:"setQuery",value:function(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(et).top}}]),t}();function Ct(t,e){return t.state.phrase(e)}var Mt=/[\s\.,:;?!]/;function Ot(t,e){var n=e.from,i=e.to,o=t.state.doc.lineAt(n).from,a=t.state.doc.lineAt(i).to,s=Math.max(o,n-30),u=Math.min(a,i+30),l=t.state.sliceDoc(s,u);if(s!=o)for(var h=0;h<30;h++)if(!Mt.test(l[h+1])&&Mt.test(l[h])){l=l.slice(h);break}if(u!=a)for(var c=l.length-1;c>l.length-30;c--)if(!Mt.test(l[c-1])&&Mt.test(l[c])){l=l.slice(0,c);break}return r.tk.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(t.state.doc.lineAt(n).number))}var Tt=r.tk.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Dt=[ut,i.Wl.lowest(ft),Tt]},74075:function(t,e,n){n.d(e,{q6:function(){return et},n0:function(){return m},as:function(){return g},D0:function(){return dt},F6:function(){return W},jT:function(){return C},yy:function(){return mt},r$:function(){return D},gc:function(){return p},Wl:function(){return z},Py:function(){return it},QQ:function(){return B},YW:function(){return ot},BO:function(){return gt}});var r=n(51686);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]&&arguments[1];b(this,t,e)}},{key:"invertedDesc",get:function(){for(var e=[],n=0;n1&&void 0!==arguments[1]&&arguments[1];return t.empty?this:w(this,t,e)}},{key:"mapPos",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.Simple,r=0,i=0,o=0;ot)return i+(t-r);i+=a}else{if(n!=p.Simple&&u>=t&&(n==p.TrackDel&&rt||n==p.TrackBefore&&rt))return null;if(u>t||u==t&&e<0&&!a)return t==r||e<0?i:i+s;i+=s}r=u}if(t>r)throw new RangeError("Position ".concat(t," is out of range for changeset of length ").concat(r));return i}},{key:"touchesRange",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=0,r=0;n=0&&r<=e&&a>=t)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var t="",e=0;e=0?":"+r:"")}return t}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(e){if(!Array.isArray(e)||e.length%2||e.some((function(t){return"number"!=typeof t})))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(e)}}]),t}(),g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(n,t);var e=u(n);function n(t,r){var i;return c(this,n),(i=e.call(this,t)).inserted=r,i}return d(n,[{key:"apply",value:function(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return b(this,(function(e,n,r,i,o){return t=t.replace(r,r+(n-e),o)}),!1),t}},{key:"mapDesc",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return w(this,t,e,!0)}},{key:"invert",value:function(t){for(var e=this.sections.slice(),i=[],o=0,a=0;o=0){e[o]=u,e[o+1]=s;for(var l=o>>1;i.length1&&void 0!==arguments[1]&&arguments[1];return t.empty?this:w(this,t,e,!0)}},{key:"iterChanges",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];b(this,t,e)}},{key:"desc",get:function(){return new m(this.sections)}},{key:"filter",value:function(t){var e=[],r=[],i=[],o=new S(this);t:for(var a=0,s=0;;){for(var u=a==t.length?1e9:t[a++];s0&&k(r,e,o.text),o.forward(l),s+=l}for(var c=t[a++];s>1].toJSON()))}return t}}],[{key:"of",value:function(t,e,i){var a=[],s=[],u=0,l=null;function h(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||a.length){ug||p<0||g>e)throw new RangeError("Invalid change range ".concat(p," to ").concat(g," (in doc of length ").concat(e,")"));var w=b?"string"==typeof b?r.xv.of(b.split(i||v)):b:r.xv.empty,x=w.length;if(p==g&&0==x)return;pu&&y(a,p-u,-1),y(a,g-p,x),k(s,a,w),u=g}}(t),h(!l),l}},{key:"empty",value:function(t){return new n(t?[t,-1]:[],[])}},{key:"fromJSON",value:function(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");for(var e=[],i=[],o=0;o3&&void 0!==arguments[3]&&arguments[3];if(!(0==e&&n<=0)){var i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:0==e&&0==t[i]?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}}function k(t,e,n){if(0!=n.length){var i=e.length-2>>1;if(i>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)u=t.sections[s++],l=t.sections[s++];e(o,h,a,c,f),o=h,a=c}}}function w(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],o=r?[]:null,a=new S(t),s=new S(e),u=0,l=0;;)if(-1==a.ins)u+=a.len,a.next();else if(-1==s.ins&&l=0&&(a.done||ll&&!a.done&&u+a.len=0)){if(a.done&&s.done)return o?new g(i,o):new m(i);throw new Error("Mismatched change set lengths")}for(var c=0,f=u+a.len;;)if(s.ins>=0&&l>u&&l+s.len2&&void 0!==arguments[2]&&arguments[2],r=[],i=n?[]:null,o=new S(t),a=new S(e),s=!1;;){if(o.done&&a.done)return i?new g(r,i):new m(r);if(0==o.ins)y(r,o.len,0,s),o.next();else if(0!=a.len||a.done){if(o.done||a.done)throw new Error("Mismatched change set lengths");var u=Math.min(o.len2,a.len),l=r.length;if(-1==o.ins){var h=-1==a.ins?-1:a.off?0:a.ins;y(r,u,h,s),i&&h&&k(i,r,a.text)}else-1==a.ins?(y(r,o.off?0:o.len,u,s),i&&k(i,r,o.textBit(u))):(y(r,o.off?0:o.len,a.off?0:a.ins,s),i&&!a.off&&k(i,r,a.text));s=(o.ins>u||a.ins>=0&&a.len>u)&&(s||r.length>l),o.forward2(u),a.forward(u)}else y(r,0,a.ins,s),i&&k(i,r,a.text),a.next()}}var S=function(){function t(e){c(this,t),this.set=e,this.i=0,this.next()}return d(t,[{key:"next",value:function(){var t=this.set.sections;this.i>1;return e>=t.length?r.xv.empty:t[e]}},{key:"textBit",value:function(t){var e=this.set.inserted,n=this.i-2>>1;return n>=e.length&&!t?r.xv.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}},{key:"forward",value:function(t){t==this.len?this.next():(this.len-=t,this.off+=t)}},{key:"forward2",value:function(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}]),t}(),A=function(){function t(e,n,r){c(this,t),this.from=e,this.to=n,this.flags=r}return d(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var t=3&this.flags;return 3==t?null:t}},{key:"goalColumn",get:function(){var t=this.flags>>5;return 33554431==t?void 0:t}},{key:"map",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=e.mapPos(this.from,n),i=e.mapPos(this.to,n);return r==this.from&&i==this.to?this:new t(r,i,this.flags)}},{key:"extend",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(t<=this.anchor&&e>=this.anchor)return C.range(t,e);var n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return C.range(this.anchor,n)}},{key:"eq",value:function(t){return this.anchor==t.anchor&&this.head==t.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return C.range(t.anchor,t.head)}}]),t}(),C=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;c(this,t),this.ranges=e,this.mainIndex=n}return d(t,[{key:"map",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e.empty?this:t.create(this.ranges.map((function(t){return t.map(e,n)})),this.mainIndex)}},{key:"eq",value:function(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([e].concat(this.ranges),n?0:this.mainIndex+1)}},{key:"replaceRange",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,r=this.ranges.slice();return r[n]=e,t.create(r,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map((function(t){return t.toJSON()})),main:this.mainIndex}}}],[{key:"fromJSON",value:function(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(e.ranges.map((function(t){return A.fromJSON(t)})),e.main)}},{key:"single",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new t([t.range(e,n)],0)}},{key:"create",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==e.length)throw new RangeError("A selection needs at least one range");for(var r=0,i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return new A(t,t,(0==e?0:e<0?4:8)|(null==n?3:Math.min(2,n))|(null!=r?r:33554431)<<5)}},{key:"range",value:function(t,e,n){var r=(null!=n?n:33554431)<<5;return e1&&void 0!==arguments[1]?arguments[1]:0,n=t[e];t.sort((function(t,e){return t.from-e.from})),e=t.indexOf(n);for(var r=1;ri.head?C.range(s,a):C.range(a,s))}}return new C(t,e)}function O(t,e){var n,r=o(t.ranges);try{for(r.s();!(n=r.n()).done;){if(n.value.to>e)throw new RangeError("Selection points outside of document")}}catch(i){r.e(i)}finally{r.f()}}var T=0,D=function(){function t(e,n,r,i,o){c(this,t),this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.extensions=o,this.id=T++,this.default=e([])}return d(t,[{key:"of",value:function(t){return new R([],this,0,t)}},{key:"compute",value:function(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new R(t,this,1,e)}},{key:"computeN",value:function(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new R(t,this,2,e)}},{key:"from",value:function(t,e){return e||(e=function(t){return t}),this.compute([t],(function(n){return e(n.field(t))}))}}],[{key:"define",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(e.combine||function(t){return t},e.compareInput||function(t,e){return t===e},e.compare||(e.combine?function(t,e){return t===e}:E),!!e.static,e.enables)}}]),t}();function E(t,e){return t==e||t.length==e.length&&t.every((function(t,n){return t===e[n]}))}var R=function(){function t(e,n,r,i){c(this,t),this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=T++}return d(t,[{key:"dynamicSlot",value:function(t){var e,n,r=this.value,i=this.facet.compareInput,a=t[this.id]>>1,s=2==this.type,u=!1,l=!1,h=[],c=o(this.dependencies);try{for(c.s();!(n=c.n()).done;){var f=n.value;"doc"==f?u=!0:"selection"==f?l=!0:0==(1&(null!==(e=t[f.id])&&void 0!==e?e:1))&&h.push(t[f.id])}}catch(d){c.e(d)}finally{c.f()}return function(t,e){var n=t.values[a];if(n===$)return t.values[a]=r(t),1;if(e&&(u&&e.docChanged||l&&(e.docChanged||e.selection)||h.some((function(e){return(1&U(t,e))>0})))){var o=r(t);if(s?!function(t,e,n){if(t.length!=e.length)return!1;for(var r=0;r>1;return function(t,r){var i=t.values[n];if(i===$)return t.values[n]=e.create(t),1;if(r){var o=e.updateF(i,r);if(!e.compareF(i,o))return t.values[n]=o,1}return 0}}},{key:"init",value:function(t){return[this,P.of({field:this,create:t})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(e){var n=new t(T++,e.create,e.update,e.compare||function(t,e){return t===e},e);return e.provide&&(n.provides=e.provide(n)),n}}]),t}(),L=4,I=3,N=2,j=1,V=0;function H(t){return function(e){return new _(e,t)}}var z={lowest:H(L),low:H(I),default:H(N),high:H(j),highest:H(V),fallback:H(L),extend:H(j),override:H(V)},_=function t(e,n){c(this,t),this.inner=e,this.prec=n},W=function(){function t(){c(this,t)}return d(t,[{key:"of",value:function(t){return new q(this,t)}},{key:"reconfigure",value:function(e){return t.reconfigure.of({compartment:this,extension:e})}},{key:"get",value:function(t){return t.config.compartments.get(this)}}]),t}(),q=function t(e,n){c(this,t),this.compartment=e,this.inner=n},F=function(){function t(e,n,r,i,o){for(c(this,t),this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(e,n,r){var i,a=[],s=Object.create(null),u=new Map,l=o(function(t,e,n){var r=[[],[],[],[],[]],i=new Map;function a(t,s){var u=i.get(t);if(null!=u){if(u>=s)return;var l=r[u].indexOf(t);l>-1&&r[u].splice(l,1),t instanceof q&&n.delete(t.compartment)}if(i.set(t,s),Array.isArray(t)){var h,c=o(t);try{for(c.s();!(h=c.n()).done;){a(h.value,s)}}catch(v){c.e(v)}finally{c.f()}}else if(t instanceof q){if(n.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");var f=e.get(t.compartment)||t.inner;n.set(t.compartment,f),a(f,s)}else if(t instanceof _)a(t.inner,t.prec);else if(t instanceof B)r[s].push(t),t.provides&&a(t.provides,s);else if(t instanceof R)r[s].push(t),t.facet.extensions&&a(t.facet.extensions,s);else{var d=t.extension;if(!d)throw new Error("Unrecognized extension value in extension set (".concat(t,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));a(d,s)}}return a(t,N),r.reduce((function(t,e){return t.concat(e)}))}(e,n,u));try{for(l.s();!(i=l.n()).done;){var h=i.value;h instanceof B?a.push(h):(s[h.facet.id]||(s[h.facet.id]=[])).push(h)}}catch(C){l.e(C)}finally{l.f()}for(var c=Object.create(null),f=[],d=[],v=[],p=function(){var t=g[m];c[t.id]=d.length<<1,d.push((function(e){return t.slot(e)})),v.push([])},m=0,g=a;m>1;return function(t,n){var u,l=t.values[s],h=l===$||!n,c=o(a);try{for(c.s();!(u=c.n()).done;)1&U(t,u.value)&&(h=!0)}catch(C){c.e(C)}finally{c.f()}if(!h)return 0;for(var f=[],d=0;d7)return!1;var i=c[e];if(!(1&i))return v[i>>1].every((function(e){return t(e,n+1)}));var o=r.config.address[e];return null!=o&&K(r,o)==f[i>>1]};for(var x in c){var S=c[x],A=r.config.address[x];null!=A&&0==(1&S)&&w(+x,0)&&(b[S>>1]=K(r,A))}}return{configuration:new t(e,u,d.map((function(t){return t(c)})),c,f),values:b}}}]),t}();var $={};function U(t,e){if(1&e)return 2;var n=e>>1,r=t.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[n]=4;var i=t.config.dynamicSlots[n](t,t.applying);return t.status[n]=2|i}function K(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}var G=D.define(),J=D.define({combine:function(t){return t.some((function(t){return t}))},static:!0}),X=D.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Q=D.define(),Y=D.define(),Z=D.define(),tt=D.define({combine:function(t){return!!t.length&&t[0]}}),et=function(){function t(e,n){c(this,t),this.type=e,this.value=n}return d(t,null,[{key:"define",value:function(){return new nt}}]),t}(),nt=function(){function t(){c(this,t)}return d(t,[{key:"of",value:function(t){return new et(this,t)}}]),t}(),rt=function(){function t(e){c(this,t),this.map=e}return d(t,[{key:"of",value:function(t){return new it(this,t)}}]),t}(),it=function(){function t(e,n){c(this,t),this.type=e,this.value=n}return d(t,[{key:"map",value:function(e){var n=this.type.map(this.value,e);return void 0===n?void 0:n==this.value?this:new t(this.type,n)}},{key:"is",value:function(t){return this.type==t}}],[{key:"define",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new rt(t.map||function(t){return t})}},{key:"mapEffects",value:function(t,e){if(!t.length)return t;var n,r=[],i=o(t);try{for(i.s();!(n=i.n()).done;){var a=n.value.map(e);a&&r.push(a)}}catch(s){i.e(s)}finally{i.f()}return r}}]),t}();it.reconfigure=it.define(),it.appendConfig=it.define();var ot=function(){function t(e,n,r,i,o,a){c(this,t),this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&O(r,n.newLength),o.some((function(e){return e.type==t.time}))||(this.annotations=o.concat(t.time.of(Date.now())))}return d(t,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(t){var e,n=o(this.annotations);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.type==t)return r.value}}catch(i){n.e(i)}finally{n.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(e){var n=this.annotation(t.userEvent);return!(!n||!(n==e||n.length>e.length&&n.slice(0,e.length)==e&&"."==n[e.length]))}}]),t}();function at(t,e){for(var n=[],r=0,i=0;;){var o=void 0,a=void 0;if(r=t[r]))o=t[r++],a=t[r++];else{if(!(i=0;i--){var o=n[i](t);o&&Object.keys(o).length&&(r=st(t,ut(e,o,t.changes.newLength),!0))}return r==t?t:new ot(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(t){var e,n=t.startState,r=!0,i=o(n.facet(Q));try{for(i.s();!(e=i.n()).done;){var a=(0,e.value)(t);if(!1===a){r=!1;break}Array.isArray(a)&&(r=!0===r?a:at(r,a))}}catch(d){i.e(d)}finally{i.f()}if(!0!==r){var s,u;if(!1===r)u=t.changes.invertedDesc,s=g.empty(n.doc.length);else{var l=t.changes.filter(r);s=l.changes,u=l.filtered.invertedDesc}t=new ot(n,s,t.selection&&t.selection.map(u),it.mapEffects(t.effects,u),t.annotations,t.scrollIntoView)}for(var h=n.facet(Y),c=h.length-1;c>=0;c--){var f=h[c](t);t=f instanceof ot?f:Array.isArray(f)&&1==f.length&&f[0]instanceof ot?f[0]:lt(n,ct(f),!1)}return t}(s):s)}ot.time=et.define(),ot.userEvent=et.define(),ot.addToHistory=et.define(),ot.remote=et.define();var ht=[];function ct(t){return null==t?ht:Array.isArray(t)?t:[t]}var ft,dt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(dt||(dt={})),vt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{ft=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(yt){}function pt(t){return function(e){if(!/\S/.test(e))return dt.Space;if(function(t){if(ft)return ft.test(t);for(var e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||vt.test(n)))return!0}return!1}(e))return dt.Word;for(var n=0;n-1)return dt.Word;return dt.Other}}var mt=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;c(this,t),this.config=e,this.doc=n,this.selection=r,this.values=i,this.applying=null,this.status=e.statusTemplate.slice(),this.applying=o,o&&(o._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],n=this.config.address[t.id];if(null!=n)return U(this,n),K(this,n);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return e instanceof g?e:g.of(e,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(e){return r.xv.of(e.split(this.facet(t.lineSeparator)||v))}},{key:"sliceDoc",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length;return this.doc.sliceString(t,e,this.lineBreak)}},{key:"facet",value:function(t){var e=this.config.address[t.id];return null==e?t.default:(U(this,e),K(this,e))}},{key:"toJSON",value:function(t){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(var n in t){var r=t[n];r instanceof B&&(e[n]=r.spec.toJSON(this.field(t[n]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(tt)}},{key:"phrase",value:function(e){var n,r=o(this.facet(t.phrases));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(Object.prototype.hasOwnProperty.call(i,e))return i[e]}}catch(a){r.e(a)}finally{r.f()}return e}},{key:"languageDataAt",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],a=o(this.facet(G));try{for(a.s();!(n=a.n()).done;){var s,u=n.value,l=o(u(this,e,r));try{for(l.s();!(s=l.n()).done;){var h=s.value;Object.prototype.hasOwnProperty.call(h,t)&&i.push(h[t])}}catch(c){l.e(c)}finally{l.f()}}}catch(c){a.e(c)}finally{a.f()}return i}},{key:"charCategorizer",value:function(t){return pt(this.languageDataAt("wordChars",t).join(""))}},{key:"wordAt",value:function(t){for(var e=this.doc.lineAt(t),n=e.text,i=e.from,o=e.length,a=this.charCategorizer(t),s=t-i,u=t-i;s>0;){var l=(0,r.cp)(n,s,!1);if(a(n.slice(l,s))!=dt.Word)break;s=l}for(;u1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");var i=[];if(r){var o=function(t){var n=r[t],o=e[t];i.push(n.init((function(t){return n.spec.fromJSON(o,t)})))};for(var a in r)o(a)}return t.create({doc:e.doc,selection:C.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=F.resolve(e.extensions||[],new Map),i=n.configuration,o=n.values,a=e.doc instanceof r.xv?e.doc:r.xv.of((e.doc||"").split(i.staticFacet(t.lineSeparator)||v)),s=e.selection?e.selection instanceof C?e.selection:C.single(e.selection.anchor,e.selection.head):C.single(0);return O(s,a.length),i.staticFacet(J)||(s=s.asSingle()),new t(i,a,s,o)}}]),t}();function gt(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={},a=o(t);try{for(a.s();!(n=a.n()).done;)for(var s=n.value,u=0,l=Object.keys(s);u=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=i,a=r;a=this.string.length}},{key:"sol",value:function(){return 0==this.pos}},{key:"peek",value:function(){return this.string.charAt(this.pos)||void 0}},{key:"next",value:function(){if(this.pose}},{key:"eatSpace",value:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}},{key:"skipToEnd",value:function(){this.pos=this.string.length}},{key:"skipTo",value:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}},{key:"backUp",value:function(t){this.pos-=t}},{key:"column",value:function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}},{key:"current",value:function(){return this.string.slice(this.start,this.pos)}}]),t}();function S(t){if("object"!=g(t))return t;var e={};for(var n in t){var r=t[n];e[n]=r instanceof Array?r.slice():r}return e}var A=function(t){c(n,t);var e=d(n);function n(t){var i;y(this,n);var a,s,u=(0,o.kU)(t.languageData),l={token:(s=t).token,blankLine:s.blankLine||function(){},startState:s.startState||function(){return!0},copyState:s.copyState||S,indent:s.indent||function(){return null},languageData:s.languageData||{},tokenTable:s.tokenTable||D},h=new(function(t){c(n,t);var e=d(n);function n(){return y(this,n),e.apply(this,arguments)}return b(n,[{key:"createParse",value:function(t,e,n){return new O(a,t,e,n)}}]),n}(r._b));return i=e.call(this,u,h,function(t){var e=r.Jq.define({id:E.length,name:"Document",props:[o.mi.add((function(){return t}))]});return E.push(e),e}(u),[o.tK.of((function(t,e){return i.getIndent(t,e)}))]),a=p(i),i.streamParser=l,i.stateAfter=new r.md({perNode:!0}),i.tokenTable=t.tokenTable?new H(l.tokenTable):z,i}return b(n,[{key:"getIndent",value:function(t,e){for(var n=(0,o.qz)(t.state),r=n.resolve(e);r&&r.type!=this.topNode;)r=r.parent;if(!r)return null;var i,a,s=C(this,n,0,r.from,e);if(s?(a=s.state,i=s.pos+1):(a=this.streamParser.startState(t.unit),i=0),e-i>1e4)return null;for(;i=i&&n+e.length<=o&&e.prop(t.stateAfter);if(a)return{state:t.streamParser.copyState(a),pos:n+e.length};for(var s=e.children.length-1;s>=0;s--){var u=e.children[s],l=n+e.positions[s],h=u instanceof r.mp&&l=e.length)return e;o||e.type!=t.topNode||(o=!0);for(var a=e.children.length-1;a>=0;a--){var s=e.positions[a],u=e.children[a],l=void 0;if(sn&&C(t,l.tree,0-l.offset,n,c),d=void 0;if(f&&(d=M(t,l.tree,n+l.offset,f.pos+l.offset,!1)))return{state:f.state,tree:d}}}catch(v){s.e(v)}finally{s.f()}return{state:t.streamParser.startState(i?(0,o.y1)(i):4),tree:r.mp.empty}}(e,i,l,null==s?void 0:s.state),c=h.state,f=h.tree;this.state=c,this.parsedPos=this.chunkStart=l+f.length;for(var d=0;d=e?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}},{key:"stopAt",value:function(t){this.stoppedAt=t}},{key:"lineAfter",value:function(t){var e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{var n=e.indexOf("\n");n>-1&&(e=e.slice(0,n))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}},{key:"nextLine",value:function(){for(var t=this.parsedPos,e=this.lineAfter(t),n=t+e.length,r=this.rangeIndex;;){var i=this.ranges[r].to;if(i>=n)break;if(e=e.slice(0,i-(n-e.length)),++r==this.ranges.length)break;var o=this.ranges[r].from,a=this.lineAfter(o);e+=a,n=o+a.length}return{line:e,end:n}}},{key:"skipGapsTo",value:function(t,e,n){for(;;){var r=this.ranges[this.rangeIndex].to,i=t+e;if(n>0?r>i:r>=i)break;e+=this.ranges[++this.rangeIndex].from-r}return e}},{key:"emitToken",value:function(t,e,n,r,i){if(this.ranges.length>1){e+=i=this.skipGapsTo(e,i,1);var o=this.chunk.length;n+=i=this.skipGapsTo(n,i,-1),r+=this.chunk.length-o}return this.chunk.push(t,e,n,r),i}},{key:"parseLine",value:function(t){var e=this.nextLine(),n=e.line,r=e.end,i=0,a=this.lang.streamParser,s=new x(n,t?t.state.tabSize:4,t?(0,o.y1)(t.state):2);if(s.eol())a.blankLine(this.state,s.indentUnit);else for(;!s.eol();){var u=T(a.token,s,this.state);if(u&&(i=this.emitToken(this.lang.tokenTable.resolve(u),this.parsedPos+s.start,this.parsedPos+s.pos,4,i)),s.start>1e4)break}this.parsedPos=r,this.parsedPose.start)return i}throw new Error("Stream parser failed to advance stream.")}for(var D=Object.create(null),E=[r.Jq.none],R=new r.Lj(E),P=[],B=Object.create(null),L=0,I=[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","typeName"],["attribute","propertyName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]];L-1||(P.push(t),console.warn(e))}function W(t,e){var n,o=null,s=u(e.split("."));try{for(s.s();!(n=s.n()).done;){var l=n.value,h=t[l]||i.pJ[l];h?"function"==typeof h?o?o=h(o):_(l,"Modifier ".concat(l," used at start of tag")):o?_(l,"Tag ".concat(l," used as modifier")):o=h:_(l,"Unknown highlighting tag ".concat(l))}}catch(d){s.e(d)}finally{s.f()}if(!o)return 0;var c=e.replace(/ /g,"_"),f=r.Jq.define({id:E.length,name:c,props:[(0,i.Gv)(a({},c,o))]});return E.push(f),f.id}},51686:function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||a(t,e)||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 o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt)return g[e-1]<=t;return!1}function b(t){return t>=127462&&t<=127487}function w(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return(n?x:S)(t,e,r)}function x(t,e,n){if(e==t.length)return e;e&&A(t.charCodeAt(e))&&C(t.charCodeAt(e-1))&&e--;var r=M(t,e);for(e+=T(r);e=0&&b(M(t,a));)o++,a-=2;if(o%2==0)break;e+=2}}return e}function S(t,e,n){for(;e>0;){var r=x(t,e-2,n);if(r=56320&&t<57344}function C(t){return t>=55296&&t<56320}function M(t,e){var n=t.charCodeAt(e);if(!C(n)||e+1==t.length)return n;var r=t.charCodeAt(e+1);return A(r)?r-56320+(n-55296<<10)+65536:n}function O(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function T(t){return t<65536?1:2}function D(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0;i=e)return i;if(i==t.length)break;o+=9==t.charCodeAt(i)?n-o%n:1,i=w(t,i)}return!0===r?-1:t.length}var R=function(){function t(){v(this,t)}return m(t,[{key:"lineAt",value:function(t){if(t<0||t>this.length)throw new RangeError("Invalid position ".concat(t," in document of length ").concat(this.length));return this.lineInner(t,!1,1,0)}},{key:"line",value:function(t){if(t<1||t>this.lines)throw new RangeError("Invalid line number ".concat(t," in ").concat(this.lines,"-line document"));return this.lineInner(t,!0,1,0)}},{key:"replace",value:function(t,e,n){var r=[];return this.decompose(0,t,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(e,this.length,r,1),B.from(r,this.length-(e-t)+n.length)}},{key:"append",value:function(t){return this.replace(this.length,this.length,t)}},{key:"slice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=[];return this.decompose(t,e,n,0),B.from(n,e-t)}},{key:"eq",value:function(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;for(var e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),r=new j(this),i=new j(t),o=e,a=e;;){if(r.next(o),i.next(o),o=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}},{key:"iter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new j(this,t)}},{key:"iterRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new V(this,t,e)}},{key:"iterLines",value:function(t,e){var n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(t).from;n=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new H(n)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var t=[];return this.flatten(t),t}}],[{key:"of",value:function(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new P(e):B.from(P.split(e,[])):t.empty}}]),t}(),P=function(t){l(n,t);var e=c(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L(t);return v(this,n),(r=e.call(this)).text=t,r.length=i,r}return m(n,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(t,e,n,r){for(var i=0;;i++){var o=this.text[i],a=r+o.length;if((e?n:a)>=t)return new z(r,a,n,o);r=a+1,n++}}},{key:"decompose",value:function(t,e,r,i){var o=t<=0&&e>=this.length?this:new n(N(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){var a=r.pop(),s=I(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new n(s,a.length+o.length));else{var u=s.length>>1;r.push(new n(s.slice(0,u)),new n(s.slice(u)))}}else r.push(o)}},{key:"replace",value:function(t,e,r){if(!(r instanceof n))return u(d(n.prototype),"replace",this).call(this,t,e,r);var i=I(this.text,I(r.text,N(this.text,0,t)),e),o=this.length+r.length-(e-t);return i.length<=32?new n(i,o):B.from(n.split(i,[]),o)}},{key:"sliceString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<=e&&ot&&o&&(r+=n),ti&&(r+=a.slice(Math.max(0,t-i),e-i)),i=s+1}return r}},{key:"flatten",value:function(t){var e,n=o(this.text);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(r)}}catch(i){n.e(i)}finally{n.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(t,e){var r,i=[],a=-1,s=o(t);try{for(s.s();!(r=s.n()).done;){var u=r.value;i.push(u),a+=u.length+1,32==i.length&&(e.push(new n(i,a)),i=[],a=-1)}}catch(l){s.e(l)}finally{s.f()}return a>-1&&e.push(new n(i,a)),e}}]),n}(R),B=function(t){l(n,t);var e=c(n);function n(t,r){var i;v(this,n),(i=e.call(this)).children=t,i.length=r,i.lines=0;var a,s=o(t);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.lines+=u.lines}}catch(l){s.e(l)}finally{s.f()}return i}return m(n,[{key:"lineInner",value:function(t,e,n,r){for(var i=0;;i++){var o=this.children[i],a=r+o.length,s=n+o.lines-1;if((e?s:a)>=t)return o.lineInner(t,e,n,r);r=a+1,n=s+1}}},{key:"decompose",value:function(t,e,n,r){for(var i=0,o=0;o<=e&&i=o){var u=r&((o<=t?1:0)|(s>=e?2:0));o>=t&&s<=e&&!u?n.push(a):a.decompose(t-o,e-o,n,u)}o=s+1}}},{key:"replace",value:function(t,e,r){if(r.lines=o&&e<=s){var l=a.replace(t-o,e-o,r),h=this.lines-a.lines+l.lines;if(l.lines>4&&l.lines>h>>6){var c=this.children.slice();return c[i]=l,new n(c,this.length-(e-t)+r.length)}return u(d(n.prototype),"replace",this).call(this,o,s,l)}o=s+1}return u(d(n.prototype),"replace",this).call(this,t,e,r)}},{key:"sliceString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;it&&i&&(r+=n),to&&(r+=a.sliceString(t-o,e-o,n)),o=s+1}return r}},{key:"flatten",value:function(t){var e,n=o(this.children);try{for(n.s();!(e=n.n()).done;){e.value.flatten(t)}}catch(r){n.e(r)}finally{n.f()}}},{key:"scanIdentical",value:function(t,e){if(!(t instanceof n))return 0;for(var r=0,o=i(e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1],4),a=o[0],s=o[1],u=o[2],l=o[3];;a+=e,s+=e){if(a==u||s==l)return r;var h=this.children[a],c=t.children[s];if(h!=c)return r+h.scanIdentical(c,e);r+=h.length+1}}}],[{key:"from",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.reduce((function(t,e){return t+e.length+1}),-1),i=0,a=o(t);try{for(a.s();!(e=a.n()).done;){var s=e.value;i+=s.lines}}catch(A){a.e(A)}finally{a.f()}if(i<32){var u,l=[],h=o(t);try{for(h.s();!(u=h.n()).done;){var c=u.value;c.flatten(l)}}catch(A){h.e(A)}finally{h.f()}return new P(l,r)}var f=Math.max(32,i>>5),d=f<<1,v=f>>1,p=[],m=0,g=-1,y=[];function k(t){var e;if(t.lines>d&&t instanceof n){var r,i=o(t.children);try{for(i.s();!(r=i.n()).done;){k(r.value)}}catch(A){i.e(A)}finally{i.f()}}else t.lines>v&&(m>v||!m)?(b(),p.push(t)):t instanceof P&&m&&(e=y[y.length-1])instanceof P&&t.lines+e.lines<=32?(m+=t.lines,g+=t.length+1,y[y.length-1]=new P(e.text.concat(t.text),e.length+1+t.length)):(m+t.lines>f&&b(),m+=t.lines,g+=t.length+1,y.push(t))}function b(){0!=m&&(p.push(1==y.length?y[0]:n.from(y,g)),g=-1,m=y.length=0)}var w,x=o(t);try{for(x.s();!(w=x.n()).done;){var S=w.value;k(S)}}catch(A){x.e(A)}finally{x.f()}return b(),1==p.length?p[0]:new n(p,r)}}]),n}(R);function L(t){var e,n=-1,r=o(t);try{for(r.s();!(e=r.n()).done;){n+=e.value.length+1}}catch(i){r.e(i)}finally{r.f()}return n}function I(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,i=0,o=0,a=!0;o=n&&(u>r&&(s=s.slice(0,r-i)),i1&&void 0!==arguments[1]?arguments[1]:1;v(this,t),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof P?e.text.length:e.children.length)<<1]}return m(t,[{key:"nextInner",value:function(t,e){for(this.done=this.lineBreak=!1;;){var n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof P?r.text.length:r.children.length;if(o==(e>0?a:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof P){var s=r.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{var u=r.children[o+(e<0?-1:0)];t>u.length?(t-=u.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(u),this.offsets.push(e>0?1:(u instanceof P?u.text.length:u.children.length)<<1))}}}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}]),t}(),V=function(){function t(e,n,r){v(this,t),this.value="",this.done=!1,this.cursor=new j(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}return m(t,[{key:"nextInner",value:function(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;var r=this.cursor.next(t).value;return this.pos+=(r.length+t)*e,this.value=r.length<=n?r:e<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),H=function(){function t(e){v(this,t),this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}return m(t,[{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.inner.next(t),n=e.done,r=e.lineBreak,i=e.value;return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),t}();"undefined"!=typeof Symbol&&(R.prototype[Symbol.iterator]=function(){return this.iter()},j.prototype[Symbol.iterator]=V.prototype[Symbol.iterator]=H.prototype[Symbol.iterator]=function(){return this});var z=function(){function t(e,n,r,i){v(this,t),this.from=e,this.to=n,this.number=r,this.text=i}return m(t,[{key:"length",get:function(){return this.to-this.from}}]),t}()},91643:function(t,e,n){n.d(e,{kH:function(){return Rt},p:function(){return Pt},Nm:function(){return pe},tk:function(){return vr},BF:function(){return re},lg:function(){return ae},l9:function(){return Et},Uw:function(){return Nr},ZO:function(){return $r},$f:function(){return Or},OO:function(){return te},$1:function(){return Er}});for(var r=n(74075),i=n(51686),o=n(28450),a=n(67037),s={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},u={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},l="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),h="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),c="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),f="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),d="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),v=l&&(f||+l[1]<57)||c&&f,p=0;p<10;p++)s[48+p]=s[96+p]=String(p);for(p=1;p<=24;p++)s[p+111]="F"+p;for(p=65;p<=90;p++)s[p]=String.fromCharCode(p+32),u[p]=String.fromCharCode(p);for(var m in s)u.hasOwnProperty(m)||(u[m]=s[m]);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function y(t,e,n){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}},y(t,e,n||t)}function k(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function w(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=A(t);if(e){var i=A(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return S(t)}function S(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function C(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||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 M(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function O(t,e){if(t){if("string"==typeof t)return T(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,e):void 0}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:e,r=q||(q=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function G(t,e,n){var r={key:e,code:e,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,t.dispatchEvent(i);var o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function J(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function X(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Q=function(){function t(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];D(this,t),this.node=e,this.offset=n,this.precise=r}return R(t,null,[{key:"before",value:function(e,n){return new t(e.parentNode,j(e),n)}},{key:"after",value:function(e,n){return new t(e.parentNode,j(e)+1,n)}}]),t}(),Y=[],Z=function(){function t(){D(this,t),this.parent=null,this.dom=null,this.dirty=2}return R(t,[{key:"editorView",get:function(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}},{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(t){var e,n=this.posAtStart,r=M(this.children);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i==t)return n;n+=i.length+i.breakAfter}}catch(o){r.e(o)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(t){return this.posBefore(t)+t.length}},{key:"coordsAt",value:function(t,e){return null}},{key:"sync",value:function(e){if(2&this.dirty){var n,r=this.dom,i=r.firstChild,o=M(this.children);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.dirty){if(!a.dom&&i){var s=t.get(i);s&&(s.parent||s.constructor!=a.constructor)||a.reuseDOM(i)}a.sync(e),a.dirty=0}if(e&&!e.written&&e.node==r&&i!=a.dom&&(e.written=!0),a.dom.parentNode==r){for(;i&&i!=a.dom;)i=tt(i);i=a.dom.nextSibling}else r.insertBefore(a.dom,i)}}catch(c){o.e(c)}finally{o.f()}for(i&&e&&e.node==r&&(e.written=!0);i;)i=tt(i)}else if(1&this.dirty){var u,l=M(this.children);try{for(l.s();!(u=l.n()).done;){var h=u.value;h.dirty&&(h.sync(e),h.dirty=0)}}catch(c){l.e(c)}finally{l.f()}}}},{key:"reuseDOM",value:function(t){}},{key:"localPosFromDOM",value:function(e,n){var r;if(e==this.dom)r=this.dom.childNodes[n];else{for(var i=0==H(e)?0:0==n?-1:1;;){var o=e.parentNode;if(o==this.dom)break;0==i&&o.firstChild!=o.lastChild&&(i=e==o.firstChild?-1:1),e=o}r=i<0?e:e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!t.get(r);)r=r.nextSibling;if(!r)return this.length;for(var a=0,s=0;;a++){var u=this.children[a];if(u.dom==r)return s;s+=u.length+u.breakAfter}}},{key:"domBoundsAround",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,i=-1,o=-1,a=-1,s=0,u=n,l=n;se)return h.domBoundsAround(t,e,u);if(c>=t&&-1==r&&(r=s,i=u),u>e&&h.dom.parentNode==this.dom){o=s,a=l;break}l=c,u=c+h.breakAfter}return{from:i,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}},{key:"markDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(t)}},{key:"markParentsDirty",value:function(t){for(var e=this.parent;e;e=e.parent){if(t&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,t=!1}}},{key:"setParent",value:function(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}},{key:"rootView",get:function(){for(var t=this;;){var e=t.parent;if(!e)return t;t=e}}},{key:"replaceChildren",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Y;this.markDirty();for(var i=t;i0&&void 0!==arguments[0]?arguments[0]:this.length;return new et(this.children,t,this.children.length)}},{key:"childPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(t,e)}},{key:"toString",value:function(){var t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"merge",value:function(t,e,n,r,i,o){return!1}},{key:"become",value:function(t){return!1}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(t){return t.cmView}}]),t}();function tt(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}Z.prototype.breakAfter=0;var et=function(){function t(e,n,r){D(this,t),this.children=e,this.pos=n,this.i=r,this.off=0}return R(t,[{key:"findPos",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;var n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}]),t}();function nt(t,e,n,r,i,o,a,s,u){var l=t.children,h=l.length?l[e]:null,c=o.length?o[o.length-1]:null,f=c?c.breakAfter:a;if(!(e==r&&h&&!a&&!f&&o.length<2&&h.merge(n,i,o.length?c:null,0==n,s,u))){if(r0&&(!a&&o.length&&h.merge(n,h.length,o[0],!1,s,0)?h.breakAfter=o.shift().breakAfter:(n2),mt={mac:pt||/Mac/.test(ot.platform),windows:/Win/.test(ot.platform),linux:/Linux|X11/.test(ot.platform),ie:ht,ie_version:ut?at.documentMode||6:lt?+lt[1]:st?+st[1]:0,gecko:ct,gecko_version:ct?+(/Firefox\/(\d+)/.exec(ot.userAgent)||[0,0])[1]:0,chrome:!!ft,chrome_version:ft?+ft[1]:0,ios:pt,android:/Android\b/.test(ot.userAgent),webkit:dt,safari:vt,webkit_version:dt?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=at.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},gt=function(t){k(n,t);var e=w(n);function n(t){var r;return D(this,n),(r=e.call(this)).text=t,r}return R(n,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(t){this.setDOM(t||document.createTextNode(this.text))}},{key:"sync",value:function(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(t){3==t.nodeType&&this.createDOM(t)}},{key:"merge",value:function(t,e,r){return(!r||r instanceof n&&!(this.length-(e-t)+r.length>256))&&(this.text=this.text.slice(0,t)+(r?r.text:"")+this.text.slice(e),this.markDirty(),!0)}},{key:"split",value:function(t){var e=new n(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e}},{key:"localPosFromDOM",value:function(t,e){return t==this.dom?e:e?this.text.length:0}},{key:"domAtPos",value:function(t){return new Q(this.dom,t)}},{key:"domBoundsAround",value:function(t,e,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(t,e){return kt(this.dom,t,e)}}]),n}(Z),yt=function(t){k(n,t);var e=w(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;D(this,n),(r=e.call(this)).mark=t,r.children=i,r.length=o;var a,s=M(i);try{for(s.s();!(a=s.n()).done;){var u=a.value;u.setParent(S(r))}}catch(l){s.e(l)}finally{s.f()}return r}return R(n,[{key:"setAttrs",value:function(t){if(X(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(var e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}},{key:"reuseDOM",value:function(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.dirty|=6)}},{key:"sync",value:function(t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),y(A(n.prototype),"sync",this).call(this,t)}},{key:"merge",value:function(t,e,r,i,o,a){return(!r||!(!(r instanceof n&&r.mark.eq(this.mark))||t&&o<=0||et&&r.push(i=t&&(o=a),i=l,a++}}catch(c){s.e(c)}finally{s.f()}var h=this.length-t;return this.length=t,o>-1&&(this.children.length=o,this.markDirty()),new n(this.mark,r,h)}},{key:"domAtPos",value:function(t){return At(this.dom,this.children,t)}},{key:"coordsAt",value:function(t,e){return Mt(this,t,e)}}]),n}(Z);function kt(t,e,n){var r=t.nodeValue.length;e>r&&(e=r);var i=e,o=e,a=0;0==e&&n<0||e==r&&n>=0?mt.chrome||mt.gecko||(e?(i--,a=1):(o++,a=-1)):n<0?i--:o++;var s=K(t,i,o).getClientRects();if(!s.length)return z;var u=s[(a?a<0:n>=0)?0:s.length-1];return mt.safari&&!a&&0==u.width&&(u=Array.prototype.find.call(s,(function(t){return t.width}))||u),a?_(u,a<0):u||null}var bt=function(t){k(n,t);var e=w(n);function n(t,r,i){var o;return D(this,n),(o=e.call(this)).widget=t,o.length=r,o.side=i,o}return R(n,[{key:"split",value:function(t){var e=n.create(this.widget,this.length-t,this.side);return this.length-=t,e}},{key:"sync",value:function(){this.dom&&this.widget.updateDOM(this.dom)||(this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(t,e,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||t>0&&o<=0||e0?n.length-1:0;r=n[i],!(t>0?0==i:i==n.length-1||r.top0?-1:1);return 0==t&&e>0||t==this.length&&e<=0?r:_(r,0==t)}},{key:"isEditable",get:function(){return!1}},{key:"destroy",value:function(){y(A(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(t,e,r){return new(t.customView||n)(t,e,r)}}]),n}(Z),wt=function(t){k(n,t);var e=w(n);function n(){return D(this,n),e.apply(this,arguments)}return R(n,[{key:"domAtPos",value:function(t){return new Q(this.widget.text,t)}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(t,e){return e?3==t.nodeType?Math.min(e,this.length):this.length:0}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(t,e){return kt(this.widget.text,t,e)}},{key:"isEditable",get:function(){return!0}}]),n}(bt),xt=mt.android?"​​":"​",St=function(t){k(n,t);var e=w(n);function n(t){var r;return D(this,n),(r=e.call(this)).side=t,r}return R(n,[{key:"length",get:function(){return 0}},{key:"merge",value:function(){return!1}},{key:"become",value:function(t){return t instanceof n&&t.side==this.side}},{key:"split",value:function(){return new n(this.side)}},{key:"sync",value:function(){this.dom?this.dirty&&this.dom.nodeValue!=xt&&(this.dom.nodeValue=xt):this.setDOM(document.createTextNode(xt))}},{key:"getSide",value:function(){return this.side}},{key:"domAtPos",value:function(t){return Q.before(this.dom)}},{key:"localPosFromDOM",value:function(){return 0}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(t){var e=I(this.dom);return e[e.length-1]||null}},{key:"overrideDOMText",get:function(){return i.xv.of([this.dom.nodeValue.replace(/\u200b/g,"")])}}]),n}(Z);function At(t,e,n){for(var r=0,i=0;ri&&n0;r--){var s=e[r-1].dom;if(s.parentNode==t)return Q.after(s)}return new Q(t,0)}function Ct(t,e,n){var r,i=t.children;n>0&&e instanceof yt&&i.length&&(r=i[i.length-1])instanceof yt&&r.mark.eq(e.mark)?Ct(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function Mt(t,e,n){for(var r=0,i=0;i0?a>=e:a>e)&&(e0)){var u=0;if(a==r){if(o.getSide()<=0)continue;u=n=-o.getSide()}var l=o.coordsAt(e-r,n);return u&&l?_(l,n<0):l}r=a}var h=t.dom.lastChild;if(!h)return t.dom.getBoundingClientRect();var c=I(h);return c[c.length-1]||null}function Ot(t,e){for(var n in t)"class"==n&&e.class?e.class+=" "+t.class:"style"==n&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}function Tt(t,e){if(t==e)return!0;if(!t||!e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(var i=0,o=n;i-1}}],[{key:"mark",value:function(t){return new Bt(t)}},{key:"widget",value:function(t){var e=t.side||0,n=!!t.block;return new It(t,e+=n?e>0?3e8:-4e8:e>0?1e8:-1e8,e,n,t.widget||null,!1)}},{key:"replace",value:function(t){var e=!!t.block,n=Nt(t,e),r=n.start,i=n.end;return new It(t,e?r?-3e8:-1:4e8,e?i?2e8:1:-5e8,e,t.widget||null,!0)}},{key:"line",value:function(t){return new Lt(t)}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.Xs.of(t,e)}}]),n}(a.uU);Pt.none=a.Xs.empty;var Bt=function(t){k(n,t);var e=w(n);function n(t){var r;D(this,n);var i=Nt(t),o=i.start,a=i.end;return(r=e.call(this,o?-1:4e8,a?1:-5e8,null,t)).tagName=t.tagName||"span",r.class=t.class||"",r.attrs=t.attributes||null,r}return R(n,[{key:"eq",value:function(t){return this==t||t instanceof n&&this.tagName==t.tagName&&this.class==t.class&&Tt(this.attrs,t.attrs)}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(t>=e)throw new RangeError("Mark decorations may not be empty");return y(A(n.prototype),"range",this).call(this,t,e)}}]),n}(Pt);Bt.prototype.point=!1;var Lt=function(t){k(n,t);var e=w(n);function n(t){return D(this,n),e.call(this,-2e8,-2e8,null,t)}return R(n,[{key:"eq",value:function(t){return t instanceof n&&Tt(this.spec.attributes,t.spec.attributes)}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return y(A(n.prototype),"range",this).call(this,t,e)}}]),n}(Pt);Lt.prototype.mapMode=r.gc.TrackBefore,Lt.prototype.point=!0;var It=function(t){k(n,t);var e=w(n);function n(t,i,o,a,s,u){var l;return D(this,n),(l=e.call(this,i,o,s,t)).block=a,l.isReplace=u,l.mapMode=a?i<=0?r.gc.TrackBefore:r.gc.TrackAfter:r.gc.TrackDel,l}return R(n,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(t){return t instanceof n&&(e=this.widget,r=t.widget,e==r||!!(e&&r&&e.compare(r)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,r}},{key:"range",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return y(A(n.prototype),"range",this).call(this,t,e)}}]),n}(Pt);function Nt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.inclusiveStart,r=t.inclusiveEnd;return null==n&&(n=t.inclusive),null==r&&(r=t.inclusive),{start:null!=n?n:e,end:null!=r?r:e}}function jt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}It.prototype.point=!0;var Vt=function(t){k(n,t);var e=w(n);function n(){var t;return D(this,n),(t=e.apply(this,arguments)).children=[],t.length=0,t.prevAttrs=void 0,t.attrs=null,t.breakAfter=0,t}return R(n,[{key:"merge",value:function(t,e,r,i,o,a){if(r){if(!(r instanceof n))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),rt(this,t,e,r?r.children:[],o,a),!0}},{key:"split",value:function(t){var e=new n;if(e.breakAfter=this.breakAfter,0==this.length)return e;var r=this.childPos(t),i=r.i,o=r.off;o&&(e.append(this.children[i].split(o),0),this.children[i].merge(o,this.children[i].length,null,!1,0,0),i++);for(var a=i;a0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}},{key:"transferDOM",value:function(t){this.dom&&(t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(t){Tt(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}},{key:"append",value:function(t,e){Ct(this,t,e)}},{key:"addLineDeco",value:function(t){var e=t.spec.attributes,n=t.spec.class;e&&(this.attrs=Ot(e,this.attrs||{})),n&&(this.attrs=Ot({class:n},this.attrs||{}))}},{key:"domAtPos",value:function(t){return At(this.dom,this.children,t)}},{key:"reuseDOM",value:function(t){"DIV"==t.nodeName&&(this.setDOM(t),this.dirty|=6)}},{key:"sync",value:function(t){var e;this.dom?4&this.dirty&&(X(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Dt(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),y(A(n.prototype),"sync",this).call(this,t);for(var r=this.dom.lastChild;r&&Z.get(r)instanceof yt;)r=r.lastChild;if(!r||"BR"!=r.nodeName&&0==(null===(e=Z.get(r))||void 0===e?void 0:e.isEditable)&&(!mt.ios||!this.children.some((function(t){return t instanceof gt})))){var i=document.createElement("BR");i.cmIgnore=!0,this.dom.appendChild(i)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var t,e=0,n=M(this.children);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(!(r instanceof gt))return null;var i=I(r.dom);if(1!=i.length)return null;e+=i[0].width}}catch(o){n.e(o)}finally{n.f()}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}}},{key:"coordsAt",value:function(t,e){return Mt(this,t,e)}},{key:"become",value:function(t){return!1}},{key:"type",get:function(){return Rt.Text}}],[{key:"find",value:function(t,e){for(var r=0,i=0;r=e){if(o instanceof n)return o;if(a>e)break}i=a+o.breakAfter}return null}}]),n}(Z),Ht=function(t){k(n,t);var e=w(n);function n(t,r,i){var o;return D(this,n),(o=e.call(this)).widget=t,o.length=r,o.type=i,o.breakAfter=0,o}return R(n,[{key:"merge",value:function(t,e,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||t>0&&o<=0||e0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),i=r.value,o=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,t--;continue}this.text=i,this.textOff=0}var s=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(0,n)),this.getLine().append(_t(new gt(this.text.slice(this.textOff,this.textOff+s)),e),n),this.atCursorPos=!0,this.textOff+=s,t-=s,n=0}}},{key:"span",value:function(t,e,n,r){this.buildText(e-t,n,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(t,e,n,r,i){var o=e-t;if(n instanceof It)if(n.block){var a=n.type;a!=Rt.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Ht(n.widget||new Wt("div"),o,a))}else{var s=bt.create(n.widget||new Wt("span"),o,n.startSide),u=this.atCursorPos&&!s.isEditable&&i<=r.length&&(t0),l=!s.isEditable&&(t=this.disallowBlockEffectsBelow||!(n instanceof It))return!0;if(n.block)throw new RangeError("Block decorations may not be specified via plugins");return e<=this.doc.lineAt(this.pos).to}}],[{key:"build",value:function(e,n,r,i,o){var s=new t(e,n,r,o);return s.openEnd=a.Xs.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function _t(t,e){var n,r=M(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t=new yt(i,[t],t.length)}}catch(o){r.e(o)}finally{r.f()}return t}var Wt=function(t){k(n,t);var e=w(n);function n(t){var r;return D(this,n),(r=e.call(this)).tag=t,r}return R(n,[{key:"eq",value:function(t){return t.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(t){return t.nodeName.toLowerCase()==this.tag}}]),n}(Et),qt=[],Ft=r.r$.define(),$t=r.r$.define(),Ut=r.r$.define(),Kt=r.r$.define(),Gt=r.r$.define(),Jt=r.r$.define(),Xt=r.Py.define({map:function(t,e){return t.map(e)}}),Qt=r.Py.define({map:function(t,e){return t.map(e)}}),Yt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;D(this,t),this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o}return R(t,[{key:"map",value:function(e){return e.empty?this:new t(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),Zt=r.Py.define({map:function(t,e){return t.map(e)}});function te(t,e,n){var r=t.facet(Kt);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}var ee=r.r$.define({combine:function(t){return!t.length||t[0]}}),ne=function t(e,n){D(this,t),this.field=e,this.get=n},re=function(){function t(){D(this,t)}return R(t,[{key:"from",value:function(t){return new ne(this,t)}}],[{key:"define",value:function(){return new t}}]),t}();re.decorations=re.define(),re.atomicRanges=re.define(),re.scrollMargins=re.define();var ie=0,oe=r.r$.define(),ae=function(){function t(e,n,r){D(this,t),this.id=e,this.create=n,this.fields=r,this.extension=oe.of(this)}return R(t,null,[{key:"define",value:function(e,n){var r=n||{},i=r.eventHandlers,o=r.provide,a=r.decorations,s=[];if(o){var u,l=M(Array.isArray(o)?o:[o]);try{for(l.s();!(u=l.n()).done;){var h=u.value;s.push(h)}}catch(c){l.e(c)}finally{l.f()}}return i&&s.push(se.from((function(t){return{plugin:t,handlers:i}}))),a&&s.push(re.decorations.from(a)),new t(ie++,e,s)}},{key:"fromClass",value:function(e,n){return t.define((function(t){return new e(t)}),n)}}]),t}(),se=re.define(),ue=function(){function t(e){D(this,t),this.spec=e,this.mustUpdate=null,this.value=null}return R(t,[{key:"takeField",value:function(t,e){if(this.spec){var n,r=M(this.spec.fields);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.field,a=i.get;o==t&&e.push(a(this.value))}}catch(s){r.e(s)}finally{r.f()}}}},{key:"update",value:function(t){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(n){if(te(e.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(r){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(n){te(t.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(n){te(t.state,n,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),le=r.r$.define(),he=r.r$.define(),ce=r.r$.define(),fe=r.r$.define(),de=function(){function t(e,n,r,i){D(this,t),this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}return R(t,[{key:"join",value:function(e){return new t(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}},{key:"addToSet",value:function(t){for(var e=t.length,n=this;e>0;e--){var r=t[e-1];if(!(r.fromA>n.toA)){if(r.toAh)break;o+=2}if(!u)return r;new t(u.fromA,u.toA,u.fromB,u.toB).addToSet(r),a=u.toA,s=u.toB}}}]),t}(),ve=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qt;D(this,t),this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=r.as.empty(this.startState.doc.length);var o,a=M(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.changes=this.changes.compose(s.changes)}}catch(h){a.e(h)}finally{a.f()}var u=[];this.changes.iterChangedRanges((function(t,e,n,r){return u.push(new de(t,e,n,r))})),this.changedRanges=u;var l=e.hasFocus;l!=e.inputState.notifiedFocused&&(e.inputState.notifiedFocused=l,this.flags|=1)}return R(t,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some((function(t){return t.selection}))}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}]),t}(),pe=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(pe||(pe={})),me=pe.LTR,ge=pe.RTL;function ye(t){for(var e=[],n=0;n=e){if(a.level==n)return o;(i<0||(0!=r?r<0?a.frome:t[i].level>a.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}]),t}(),Re=[];function Pe(t,e){var n=t.length,r=e==me?1:2,i=e==me?2:1;if(!t||1==r&&!De.test(t))return Be(n);for(var o=0,a=r,s=r;o=0;x-=3)if(xe[x+1]==-g){var S=xe[x+2],A=2&S?r:4&S?1&S?i:r:0;A&&(Re[k]=Re[xe[x]]=A),b=x;break}}else{if(189==xe.length)break;xe[b++]=k,xe[b++]=m,xe[b++]=w}else if(2==(y=Re[k])||1==y){var C=y==r;w=C?0:1;for(var M=b-3;M>=0;M-=3){var O=xe[M+2];if(2&O)break;if(C)xe[M+2]|=2;else{if(4&O)break;xe[M+2]|=4}}}for(var T=0;TI;){for(var V=j,H=2!=Re[--j];j>I&&H==(2!=Re[j-1]);)j--;B.push(new Ee(j,V,H?2:1))}else B.push(new Ee(I,L,0))}else for(var z=0;z0&&n.length&&(n.every((function(t){var n=t.fromA;return t.toAe.minWidthTo}))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Pt.none:(t.transactions.length||this.dirty)&&(this.compositionDeco=function(t,e){var n=We(t);if(!n)return Pt.none;var r=n.from,i=n.to,o=n.node,a=n.text,s=e.mapPos(r,1),u=Math.max(s,e.mapPos(i,-1)),l=t.state,h=3==o.nodeType?o.nodeValue:new Ne([],t).readRange(o.firstChild,null).text;if(u-s=0?t[r]:null;if(!i)break;var o=i.fromA,a=i.toA,s=i.fromB,u=i.toB,l=zt.build(this.view.state.doc,s,u,this.decorations,this.pluginDecorationLength),h=l.content,c=l.breakAtStart,f=l.openStart,d=l.openEnd,v=n.findPos(a,1),p=v.i,m=v.off,g=n.findPos(o,-1);nt(this,g.i,g.off,p,m,h,c,f,d)}}},{key:"updateSelection",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&this.view.observer.readSelectionRange(),!(!n&&!this.mayControlSelection()||mt.ios&&this.view.inputState.rapidCompositionStart)){var r=this.forceSelection;this.forceSelection=!1;var i=this.view.state.selection.main,o=this.domAtPos(i.anchor),a=i.empty?o:this.domAtPos(i.head);if(mt.gecko&&i.empty&&ze(o)){var s=document.createTextNode("");this.view.observer.ignore((function(){return o.node.insertBefore(s,o.node.childNodes[o.offset]||null)})),o=a=new Q(s,0),r=!0}var u=this.view.observer.selectionRange;!r&&u.focusNode&&N(o.node,o.offset,u.anchorNode,u.anchorOffset)&&N(a.node,a.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore((function(){mt.android&&mt.chrome&&t.dom.contains(u.focusNode)&&Ke(u.focusNode,t.dom)&&(t.dom.blur(),t.dom.focus({preventScroll:!0}));var e=P(t.root);if(i.empty){if(mt.gecko){var n=$e(o.node,o.offset);if(n&&3!=n){var r=Fe(o.node,o.offset,1==n?1:-1);r&&(o=new Q(r,1==n?0:r.nodeValue.length))}}e.collapse(o.node,o.offset),null!=i.bidiLevel&&null!=u.cursorBidiLevel&&(u.cursorBidiLevel=i.bidiLevel)}else if(e.extend)e.collapse(o.node,o.offset),e.extend(a.node,a.offset);else{var s=document.createRange();if(i.anchor>i.head){var l=[a,o];o=l[0],a=l[1]}s.setEnd(a.node,a.offset),s.setStart(o.node,o.offset),e.removeAllRanges(),e.addRange(s)}})),this.view.observer.setSelectionRange(o,a)),this.impreciseAnchor=o.precise?null:new Q(u.anchorNode,u.anchorOffset),this.impreciseHead=a.precise?null:new Q(u.focusNode,u.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var t=this.view.state.selection.main,e=P(this.root);if(t.empty&&t.assoc&&e.modify){var n=Vt.find(this,t.head);if(n){var r=n.posAtStart;if(t.head!=r&&t.head!=r+n.length){var i=this.coordsAt(t.head,-1),o=this.coordsAt(t.head,1);if(i&&o&&!(i.bottom>o.top)){var a=this.domAtPos(t.head+t.assoc);e.collapse(a.node,a.offset),e.modify("move",t.assoc<0?"forward":"backward","lineboundary")}}}}}}},{key:"mayControlSelection",value:function(){return this.view.state.facet(ee)?this.root.activeElement==this.dom:L(this.dom,this.view.observer.selectionRange)}},{key:"nearest",value:function(t){for(var e=t;e;){var n=Z.get(e);if(n&&n.rootView==this)return n;e=e.parentNode}return null}},{key:"posFromDOM",value:function(t,e){var n=this.nearest(t);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(t,e)+n.posAtStart}},{key:"domAtPos",value:function(t){for(var e=this.childCursor().findPos(t,-1),n=e.i,r=e.off;no||t==o&&i.type!=Rt.WidgetBefore&&i.type!=Rt.WidgetAfter&&(!r||2==e||this.children[r-1].breakAfter||this.children[r-1].type==Rt.WidgetBefore&&e>-2))return i.coordsAt(t-o,e);n=o}}},{key:"measureVisibleLineHeights",value:function(){for(var t=[],e=this.view.viewState.viewport,n=e.from,r=e.to,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=0,u=0;ur)break;if(s>=n){var c=l.dom.getBoundingClientRect();if(t.push(c.height),o){var f=l.dom.lastChild,d=f?I(f):[];if(d.length){var v=d[d.length-1],p=this.view.textDirection==pe.LTR?v.right-c.left:c.right-v.left;p>a&&(a=p,this.minWidth=i,this.minWidthFrom=s,this.minWidthTo=h)}}}s=h+l.breakAfter}return t}},{key:"measureTextSize",value:function(){var t,e=this,n=M(this.children);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r instanceof Vt){var i=r.measureTextSize();if(i)return i}}}catch(u){n.e(u)}finally{n.f()}var o,a,s=document.createElement("div");return s.className="cm-line",s.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((function(){e.dom.appendChild(s);var t=I(s.firstChild)[0];o=s.getBoundingClientRect().height,a=t?t.width/27:7,s.remove()})),{lineHeight:o,charWidth:a}}},{key:"childCursor",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,e=this.children.length;return e&&(t-=this.children[--e].length),new et(this.children,t,e)}},{key:"computeBlockGapDeco",value:function(){for(var t=[],e=this.view.viewState,n=0,r=0;;r++){var i=r==e.viewports.length?null:e.viewports[r],o=i?i.from-1:this.length;if(o>n){var a=e.lineBlockAt(o).bottom-e.lineBlockAt(n).top;t.push(Pt.replace({widget:new _e(a),block:!0,inclusive:!0}).range(n,o))}if(!i)break;n=i.to+1}return Pt.set(t)}},{key:"updateDeco",value:function(){var t=this.view.pluginField(re.decorations);return this.pluginDecorationLength=t.length,this.decorations=[].concat(C(t),C(this.view.state.facet(ce)),[this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco])}},{key:"scrollIntoView",value:function(t){var e,n=t.range,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(r){!n.empty&&(e=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});var i,o=0,a=0,s=0,u=0,l=M(this.view.pluginField(re.scrollMargins));try{for(l.s();!(i=l.n()).done;){var h=i.value;if(h){var c=h.left,f=h.right,d=h.top,v=h.bottom;null!=c&&(o=Math.max(o,c)),null!=f&&(a=Math.max(a,f)),null!=d&&(s=Math.max(s,d)),null!=v&&(u=Math.max(u,v))}}}catch(m){l.e(m)}finally{l.f()}var p={left:r.left-o,top:r.top-s,right:r.right+a,bottom:r.bottom+u};!function(t,e,n,r,i,o,a,s){for(var u=t.ownerDocument,l=u.defaultView,h=t;h;)if(1==h.nodeType){var c=void 0,f=h==u.body;if(f)c=W(l);else{if(h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.parentNode;continue}var d=h.getBoundingClientRect();c={left:d.left,right:d.left+h.clientWidth,top:d.top,bottom:d.top+h.clientHeight}}var v=0,p=0;if("nearest"==i)e.top0&&e.bottom>c.bottom+p&&(p=e.bottom-c.bottom+p+a)):e.bottom>c.bottom&&(p=e.bottom-c.bottom+a,n<0&&e.top-p0&&e.right>c.right+v&&(v=e.right-c.right+v+o)):e.right>c.right&&(v=e.right-c.right+o,n<0&&e.left0&&n<=0)e=H(t=t.childNodes[e-1]);else{if(!(1==t.nodeType&&e=0))return null;t=t.childNodes[e],e=0}}}function $e(t,e){return 1!=t.nodeType?0:(e&&"false"==t.childNodes[e-1].contentEditable?1:0)|(et?e.left-t:Math.max(0,t-e.right)}function Je(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Xe(t,e){return t.tope.top+1}function Qe(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Ze(t,e,n){for(var r,i,o,a,s,u,l,h,c=t.firstChild;c;c=c.nextSibling)for(var f=I(c),d=0;dm||a==m&&o>p)&&(r=c,i=v,o=p,a=m),0==p?n>v.bottom&&(!l||l.bottomv.top)&&(u=c,h=v):l&&Xe(l,v)?l=Ye(l,v.bottom):h&&Xe(h,v)&&(h=Qe(h,v.top))}if(l&&l.bottom>=n?(r=s,i=l):h&&h.top<=n&&(r=u,i=h),!r)return{node:t,offset:0};var g=Math.max(i.left,Math.min(i.right,e));return 3==r.nodeType?tn(r,g,n):o||"true"!=r.contentEditable?{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0)}:Ze(r,g,n)}function tn(t,e,n){for(var r=t.nodeValue.length,i=-1,o=1e9,a=0,s=0;sn?h.top-n:n-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,d=f;if(mt.chrome||mt.gecko)K(t,s).getBoundingClientRect().left==h.right&&(d=!f);if(c<=0)return{node:t,offset:s+(d?1:0)};i=s+(d?1:0),o=c}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function en(t,e,n){var r,i,o=e.x,a=e.y,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,u=t.contentDOM.getBoundingClientRect(),l=u.top+t.viewState.paddingTop,h=t.viewState.docHeight,c=a-l;if(c<0)return 0;if(c>h)return t.state.doc.length;for(var f=t.defaultLineHeight/2,d=!1;(i=t.elementAtHeight(c)).type!=Rt.Text;)for(;!((c=s>0?i.bottom+f:i.top-f)>=0&&c<=h);){if(d)return n?null:0;d=!0,s=-s}a=l+c;var v=i.from;if(vt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:nn(t,u,i,o,a);var p=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:p,g=m.elementFromPoint(o,a);g&&!t.contentDOM.contains(g)&&(g=null),g||(o=Math.max(u.left+1,Math.min(u.right-1,o)),(g=m.elementFromPoint(o,a))&&!t.contentDOM.contains(g)&&(g=null));var y,k=-1;if(g&&0!=(null===(r=t.docView.nearest(g))||void 0===r?void 0:r.isEditable))if(p.caretPositionFromPoint){var b=p.caretPositionFromPoint(o,a);b&&(y=b.offsetNode,k=b.offset)}else if(p.caretRangeFromPoint){var w=p.caretRangeFromPoint(o,a);w&&(y=w.startContainer,k=w.startOffset,mt.safari&&rn(y,k,o)&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var x=Vt.find(t.docView,v);if(!x)return c>i.top+i.height/2?i.to:i.from;var S=Ze(x.dom,o,a);y=S.node,k=S.offset}return t.docView.posFromDOM(y,k)}function nn(t,e,n,r,o){var a=Math.round((r-e.left)*t.defaultCharacterWidth);t.lineWrapping&&n.height>1.5*t.defaultLineHeight&&(a+=Math.floor((o-n.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(n.from,n.to);return n.from+(0,i.Gz)(s,a,t.state.tabSize)}function rn(t,e,n){var r;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(var i=t.nextSibling;i;i=i.nextSibling)if(1!=i.nodeType||"BR"!=i.nodeName)return!1;return K(t,r-1,r).getBoundingClientRect().left>n}function on(t,e,n,i){var o=t.state.doc.lineAt(e.head),a=i&&t.lineWrapping?t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head):null;if(a){var s=t.dom.getBoundingClientRect(),u=t.posAtCoords({x:n==(t.textDirection==pe.LTR)?s.right-1:s.left+1,y:(a.top+a.bottom)/2});if(null!=u)return r.jT.cursor(u,n?-1:1)}var l=Vt.find(t.docView,e.head),h=l?n?l.posAtEnd:l.posAtStart:n?o.to:o.from;return r.jT.cursor(h,n?-1:1)}function an(t,e,n,i){for(var o=t.state.doc.lineAt(e.head),a=t.bidiSpans(o),s=e,u=null;;){var l=Ie(o,a,t.textDirection,s,n),h=Le;if(!l){if(o.number==(n?t.state.doc.lines:1))return s;h="\n",o=t.state.doc.line(o.number+(n?1:-1)),a=t.bidiSpans(o),l=r.jT.cursor(n?o.from:o.to)}if(u){if(!u(h))return s}else{if(!i)return l;u=i(h)}s=l}}function sn(t,e,n){for(var i=t.pluginField(re.atomicRanges);;){var o,a=!1,s=M(i);try{for(s.s();!(o=s.n()).done;){o.value.between(n.from-1,n.from+1,(function(t,i,o){n.from>t&&n.fromn.from?r.jT.cursor(t,1):r.jT.cursor(i,-1),a=!0)}))}}catch(u){s.e(u)}finally{s.f()}if(!a)return n}}var un=function(){function t(e){var n=this;D(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;var r=function(t){var r=dn[t];e.contentDOM.addEventListener(t,(function(i){"keydown"==t&&n.keydown(e,i)||fn(e,i)&&!n.ignoreDuringComposition(i)&&(n.mustFlushObserver(i)&&e.observer.forceFlush(),n.runCustomHandlers(t,e,i)?i.preventDefault():r(e,i))})),n.registeredEvents.push(t)};for(var i in dn)r(i);this.notifiedFocused=e.hasFocus,this.ensureHandlers(e),mt.safari&&e.contentDOM.addEventListener("input",(function(){return null}))}return R(t,[{key:"setSelectionOrigin",value:function(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(t){var e,n=this,r=M(this.customHandlers=t.pluginField(se));try{for(r.s();!(e=r.n()).done;){var i=e.value,o=function(e){n.registeredEvents.indexOf(e)<0&&"scroll"!=e&&(n.registeredEvents.push(e),t.contentDOM.addEventListener(e,(function(r){fn(t,r)&&n.runCustomHandlers(e,t,r)&&r.preventDefault()})))};for(var a in i.handlers)o(a)}}catch(s){r.e(s)}finally{r.f()}}},{key:"runCustomHandlers",value:function(t,e,n){var r,i=M(this.customHandlers);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.handlers[t];if(a)try{if(a.call(o.plugin,n,e)||n.defaultPrevented)return!0}catch(s){te(e.state,s)}}}catch(u){i.e(u)}finally{i.f()}return!1}},{key:"runScrollHandlers",value:function(t,e){var n,r=M(this.customHandlers);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.handlers.scroll;if(o)try{o.call(i.plugin,e,t)}catch(a){te(t.state,a)}}}catch(s){r.e(s)}finally{r.f()}}},{key:"keydown",value:function(t,e){var n,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),!!this.screenKeyEvent(t,e)||(!mt.android||!mt.chrome||e.synthetic||13!=e.keyCode&&8!=e.keyCode?!(!mt.ios||!(n=ln.find((function(t){return t.keyCode==e.keyCode})))||e.ctrlKey||e.altKey||e.metaKey||e.synthetic)&&(this.pendingIOSKey=n,setTimeout((function(){return r.flushIOSKey(t)}),250),!0):(t.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(t){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,G(t.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(mt.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}},{key:"screenKeyEvent",value:function(t,e){var n=9==e.keyCode&&Date.now()=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}(e,n)||1!=Mn(n))&&null,!1===this.dragging&&(n.preventDefault(),this.select(n))}return R(t,[{key:"move",value:function(t){if(0==t.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=t)}},{key:"up",value:function(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}},{key:"destroy",value:function(){var t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"select",value:function(t){var e=this.style.get(t,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer",scrollIntoView:!0}),this.mustSelect=!1}},{key:"update",value:function(t){var e=this;t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout((function(){return e.select(e.lastEvent)}),20)}}]),t}();function fn(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(var n,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=Z.get(r))&&n.ignoreEvent(e))return!1;return!0}var dn=Object.create(null),vn=mt.ie&&mt.ie_version<15||mt.ios&&mt.webkit_version<604;function pn(t,e){var n,i=t.state,o=1,a=i.toText(e),s=a.lines==i.selection.ranges.length,u=null!=Tn&&i.selection.ranges.every((function(t){return t.empty}))&&Tn==a.toString();if(u){var l=-1;n=i.changeByRange((function(t){var n=i.doc.lineAt(t.from);if(n.from==l)return{range:t};l=n.from;var u=i.toText((s?a.line(o++).text:e)+i.lineBreak);return{changes:{from:n.from,insert:u},range:r.jT.cursor(t.from+u.length)}}))}else n=s?i.changeByRange((function(t){var e=a.line(o++);return{changes:{from:t.from,to:t.to,insert:e.text},range:r.jT.cursor(t.from+e.length)}})):i.replaceSelection(a);t.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}dn.keydown=function(t,e){t.inputState.setSelectionOrigin("select")};var mn=0;function gn(t,e,n,o){if(1==o)return r.jT.cursor(e,n);if(2==o)return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=t.charCategorizer(e),a=t.doc.lineAt(e),s=e-a.from;if(0==a.length)return r.jT.cursor(e);0==s?n=1:s==a.length&&(n=-1);var u=s,l=s;n<0?u=(0,i.cp)(a.text,s,!1):l=(0,i.cp)(a.text,s);for(var h=o(a.text.slice(u,l));u>0;){var c=(0,i.cp)(a.text,u,!1);if(o(a.text.slice(c,u))!=h)break;u=c}for(;lDate.now()-2e3&&1==Mn(e))){var n,i=null,o=M(t.state.facet(Ut));try{for(o.s();!(n=o.n()).done;){if(i=(0,n.value)(t,e))break}}catch(s){o.e(s)}finally{o.f()}if(i||0!=e.button||(i=function(t,e){var n=wn(t,e),i=Mn(e),o=t.state.selection,a=n,s=e;return{update:function(t){t.docChanged&&(n&&(n.pos=t.changes.mapPos(n.pos)),o=o.map(t.changes),s=null)},get:function(e,u,l){var h;if(s&&e.clientX==s.clientX&&e.clientY==s.clientY?h=a:(h=a=wn(t,e),s=e),!h||!n)return o;var c=gn(t,h.pos,h.bias,i);if(n.pos!=h.pos&&!u){var f=gn(t,n.pos,n.bias,i),d=Math.min(f.from,c.from),v=Math.max(f.to,c.to);c=d=e.top&&t<=e.bottom},kn=function(t,e,n){return yn(e,n)&&t>=n.left&&t<=n.right};function bn(t,e,n,r){var i=Vt.find(t.docView,e);if(!i)return 1;var o=e-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;var a=i.coordsAt(o,-1);if(a&&kn(n,r,a))return-1;var s=i.coordsAt(o,1);return s&&kn(n,r,s)?1:a&&yn(r,a)?-1:1}function wn(t,e){var n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:bn(t,n,e.clientX,e.clientY)}}var xn=mt.ie&&mt.ie_version<=11,Sn=null,An=0,Cn=0;function Mn(t){if(!xn)return t.detail;var e=Sn,n=Cn;return Sn=t,Cn=Date.now(),An=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(An+1)%3:1}function On(t,e,n,r){if(n){var i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();var o=t.inputState.mouseSelection,a=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,s={from:i,insert:n},u=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"})}}dn.dragstart=function(t,e){var n=t.state.selection.main,r=t.inputState.mouseSelection;r&&(r.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove")},dn.drop=function(t,e){if(e.dataTransfer){if(t.state.readOnly)return e.preventDefault();var n=e.dataTransfer.files;n&&n.length?function(){e.preventDefault();for(var r=Array(n.length),i=0,o=function(){++i==n.length&&On(t,e,r.filter((function(t){return null!=t})).join(t.state.lineBreak),!1)},a=function(t){var e=new FileReader;e.onerror=o,e.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),o()},e.readAsText(n[t])},s=0;su&&(n.push(c.text),r.push({from:c.from,to:Math.min(t.doc.length,c.to+1)})),u=c.number}}catch(f){l.e(f)}finally{l.f()}i=!0}return{text:n.join(t.lineBreak),ranges:r,linewise:i}}(t.state),r=n.text,i=n.ranges,o=n.linewise;if(r||o){Tn=o?r:null;var a=vn?null:e.clipboardData;a?(e.preventDefault(),a.clearData(),a.setData("text/plain",r)):function(t,e){var n=t.dom.parentNode;if(n){var r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout((function(){r.remove(),t.focus()}),50)}}(t,r),"cut"!=e.type||t.state.readOnly||t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})}},dn.focus=dn.blur=function(t){setTimeout((function(){t.hasFocus!=t.inputState.notifiedFocused&&t.update([])}),10)},dn.beforeprint=function(t){t.viewState.printing=!0,t.requestMeasure(),setTimeout((function(){t.viewState.printing=!1,t.requestMeasure()}),2e3)},dn.compositionstart=dn.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0,t.docView.compositionDeco.size&&(t.observer.flush(),Dn(t,!0)))},dn.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,setTimeout((function(){t.inputState.composing<0&&Dn(t,!1)}),50)},dn.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},dn.beforeinput=function(t,e){var n,r;if(mt.chrome&&mt.android&&(r=ln.find((function(t){return t.inputType==e.inputType})))&&(t.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){var i=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((function(){var e;((null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}};var En=["pre-wrap","normal","pre-line","break-spaces"],Rn=function(){function t(){D(this,t),this.doc=i.xv.empty,this.lineWrapping=!1,this.direction=pe.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return R(t,[{key:"heightForGap",value:function(t,e){var n=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(n+=Math.ceil((e-t-n*this.lineLength*.5)/this.lineLength)),this.lineHeight*n}},{key:"heightForLine",value:function(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(t){return this.doc=t,this}},{key:"mustRefreshForStyle",value:function(t,e){return En.indexOf(t)>-1!=this.lineWrapping||this.direction!=e}},{key:"mustRefreshForHeights",value:function(t){for(var e=!1,n=0;n-1,s=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a||this.direction!=e;if(this.lineWrapping=a,this.direction=e,this.lineHeight=n,this.charWidth=r,this.lineLength=i,s){this.heightSamples={};for(var u=0;u2&&void 0!==arguments[2]?arguments[2]:2;D(this,t),this.length=e,this.height=n,this.flags=r}return R(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(t){this.flags=(t?2:0)|-3&this.flags}},{key:"setHeight",value:function(t,e){this.height!=e&&(Math.abs(this.height-e)>In&&(t.heightChanged=!0),this.height=e)}},{key:"replace",value:function(e,n,r){return t.of(r)}},{key:"decomposeLeft",value:function(t,e){e.push(this)}},{key:"decomposeRight",value:function(t,e){e.push(this)}},{key:"applyChanges",value:function(t,e,n,r){for(var i=this,o=r.length-1;o>=0;o--){var a=r[o],s=a.fromA,u=a.toA,l=a.fromB,h=a.toB,c=i.lineAt(s,Ln.ByPosNoHeight,e,0,0),f=c.to>=u?c:i.lineAt(u,Ln.ByPosNoHeight,e,0,0);for(h+=f.to-u,u=f.to;o>0&&c.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s2*o){var a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else{if(!(o>2*i))break;var s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else if(i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>3?arguments[3]:void 0;return n&&n.from<=e&&n.more&&this.setHeight(t,n.heights[n.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),n}(Nn),Vn=function(t){k(n,t);var e=w(n);function n(t,r){var i;return D(this,n),(i=e.call(this,t,r,Rt.Text)).collapsed=0,i.widgetHeight=0,i}return R(n,[{key:"replace",value:function(t,e,r){var i=r[0];return 1==r.length&&(i instanceof n||i instanceof Hn&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof Hn?i=new n(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Nn.of(r)}},{key:"updateHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return r&&r.from<=e&&r.more?this.setHeight(t,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),n}(jn),Hn=function(t){k(n,t);var e=w(n);function n(t){return D(this,n),e.call(this,t,0)}return R(n,[{key:"lines",value:function(t,e){var n=t.lineAt(e).number,r=t.lineAt(e+this.length).number;return{firstLine:n,lastLine:r,lineHeight:this.height/(r-n+1)}}},{key:"blockAt",value:function(t,e,n,r){var i=this.lines(e,r),o=i.firstLine,a=i.lastLine,s=i.lineHeight,u=Math.max(0,Math.min(a-o,Math.floor((t-n)/s))),l=e.line(o+u),h=l.from,c=l.length;return new Bn(h,c,n+s*u,s,Rt.Text)}},{key:"lineAt",value:function(t,e,n,r,i){if(e==Ln.ByHeight)return this.blockAt(t,n,r,i);if(e==Ln.ByPosNoHeight){var o=n.lineAt(t),a=o.from,s=o.to;return new Bn(a,s-a,0,0,Rt.Text)}var u=this.lines(n,i),l=u.firstLine,h=u.lineHeight,c=n.lineAt(t),f=c.from,d=c.length,v=c.number;return new Bn(f,d,r+h*(v-l),h,Rt.Text)}},{key:"forEachLine",value:function(t,e,n,r,i,o){for(var a=this.lines(n,i),s=a.firstLine,u=a.lineHeight,l=Math.max(t,i),h=Math.min(i+this.length,e);l<=h;){var c=n.lineAt(l);l==t&&(r+=u*(c.number-s)),o(new Bn(c.from,c.length,r,u,Rt.Text)),r+=u,l=c.to+1}}},{key:"replace",value:function(t,e,r){var i=this.length-e;if(i>0){var o=r[r.length-1];o instanceof n?r[r.length-1]=new n(o.length+i):r.push(null,new n(i-1))}if(t>0){var a=r[0];a instanceof n?r[0]=new n(t+a.length):r.unshift(new n(t-1),null)}return Nn.of(r)}},{key:"decomposeLeft",value:function(t,e){e.push(new n(t-1),null)}},{key:"decomposeRight",value:function(t,e){e.push(null,new n(this.length-t-1))}},{key:"updateHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,o=e+this.length;if(i&&i.from<=e+this.length&&i.more){var a=[],s=Math.max(e,i.from),u=-1,l=t.heightChanged;for(i.from>e&&a.push(new n(i.from-e-1).updateHeight(t,e));s<=o&&i.more;){var h=t.doc.lineAt(s).length;a.length&&a.push(null);var c=i.heights[i.index++];-1==u?u=c:Math.abs(c-u)>=In&&(u=-2);var f=new Vn(h,c);f.outdated=!1,a.push(f),s+=h+1}s<=o&&a.push(null,new n(o-s).updateHeight(t,s));var d=Nn.of(a);return t.heightChanged=l||u<0||Math.abs(d.height-this.height)>=In||Math.abs(u-this.lines(t.doc,e).lineHeight)>=In,d}return(r||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),n}(Nn),zn=function(t){k(n,t);var e=w(n);function n(t,r,i){var o;return D(this,n),(o=e.call(this,t.length+r+i.length,t.height+i.height,r|(t.outdated||i.outdated?2:0))).left=t,o.right=i,o.size=t.size+i.size,o}return R(n,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(t,e,n,r){var i=n+this.left.height;return ta))return u;var l=e==Ln.ByPosNoHeight?Ln.ByPosNoHeight:Ln.ByPos;return s?u.join(this.right.lineAt(a,l,n,o,a)):this.left.lineAt(a,l,n,r,i).join(u)}},{key:"forEachLine",value:function(t,e,n,r,i,o){var a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)t=s&&this.right.forEachLine(t,e,n,a,s,o);else{var u=this.lineAt(s,Ln.ByPos,n,r,i);t=t&&u.from<=e&&o(u),e>u.to&&this.right.forEachLine(u.to+1,e,n,a,s,o)}}},{key:"replace",value:function(t,e,n){var r=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,n));var i=[];t>0&&this.decomposeLeft(t,i);var o,a=i.length,s=M(n);try{for(s.s();!(o=s.n()).done;){var u=o.value;i.push(u)}}catch(h){s.e(h)}finally{s.f()}if(t>0&&_n(i,a-1),e=++n&&e.push(null),t>n&&this.right.decomposeLeft(t-n,e)}},{key:"decomposeRight",value:function(t,e){var n=this.left.length,r=n+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t2*e.size||e.size>2*t.size?Nn.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}},{key:"updateHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=this.left,o=this.right,a=e+i.length+this.break,s=null;return r&&r.from<=e+i.length&&r.more?s=i=i.updateHeight(t,e,n,r):i.updateHeight(t,e,n),r&&r.from<=a+o.length&&r.more?s=o=o.updateHeight(t,a,n,r):o.updateHeight(t,a,n),s?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),n}(Nn);function _n(t,e){var n,r;null==t[e]&&(n=t[e-1])instanceof Hn&&(r=t[e+1])instanceof Hn&&t.splice(e-1,3,new Hn(n.length+1+r.length))}var Wn=function(){function t(e,n){D(this,t),this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}return R(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(t,e){if(this.lineStart>-1){var n=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Vn?r.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Vn(n-this.pos,-1)),this.writtenTo=n,e>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(t,e,n){if(t=5)&&this.addLineDeco(r,i)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)){var t=this.oracle.doc.lineAt(this.pos),e=t.from,n=t.to;this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Vn(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(t,e){var n=new Hn(e-t);return this.oracle.doc.lineAt(t).to==e&&(n.flags|=4),n}},{key:"ensureLine",value:function(){this.enterLine();var t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Vn)return t;var e=new Vn(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(t){this.enterLine(),t.type!=Rt.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=Rt.WidgetBefore&&(this.covering=t)}},{key:"addLineDeco",value:function(t,e){var n=this.ensureLine();n.length+=e,n.collapsed+=e,n.widgetHeight=Math.max(n.widgetHeight,t),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(t){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Vn||this.isCovered?(this.writtenTo=e&&i<=n}))){var o=t.lineBlockAt(i),a=o.from,s=o.to;e.push(new Gn(a,s))}},i=0;i<=1;i++)r(i);this.viewports=e.sort((function(t,e){return t.from-e.from})),this.scaler=this.heightMap.height<=7e6?Yn:new Zn(this.heightOracle.doc,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var t=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(function(e){t.viewportLines.push(1==t.scaler.scale?e:tr(e,t.scaler))}))}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.state;this.state=t.state;var i=this.state.facet(ce),o=t.changedRanges,a=de.extendWithRanges(o,qn(t.startState.facet(ce),i,t?t.changes:r.as.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(i,n.doc,this.heightOracle.setDoc(this.state.doc),a),this.heightMap.height!=s&&(t.flags|=2);var u=a.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.headu.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,e));var l=!t.changes.empty||2&t.flags||u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(t){var e=t.contentDOM,n=window.getComputedStyle(e),r=this.heightOracle,i=n.whiteSpace,o="rtl"==n.direction?pe.RTL:pe.LTR,a=this.heightOracle.mustRefreshForStyle(i,o),s=a||this.mustMeasureContent||this.contentDOMHeight!=e.clientHeight,u=0,l=0;if(s){this.mustMeasureContent=!1,this.contentDOMHeight=e.clientHeight;var h=parseInt(n.paddingTop)||0,c=parseInt(n.paddingBottom)||0;this.paddingTop==h&&this.paddingBottom==c||(u|=8,this.paddingTop=h,this.paddingBottom=c)}var f=this.printing?{top:-1e8,bottom:1e8,left:-1e8,right:1e8}:function(t,e){for(var n=t.getBoundingClientRect(),r=Math.max(0,n.left),i=Math.min(innerWidth,n.right),o=Math.max(0,n.top),a=Math.min(innerHeight,n.bottom),s=t.ownerDocument.body,u=t.parentNode;u&&u!=s;)if(1==u.nodeType){var l=u,h=window.getComputedStyle(l);if((l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)&&"visible"!=h.overflow){var c=l.getBoundingClientRect();r=Math.max(r,c.left),i=Math.min(i,c.right),o=Math.max(o,c.top),a=Math.min(a,c.bottom)}u="absolute"==h.position||"fixed"==h.position?l.offsetParent:l.parentNode}else{if(11!=u.nodeType)break;u=u.host}return{left:r-n.left,right:Math.max(r,i)-n.left,top:o-(n.top+e),bottom:Math.max(o,a)-(n.top+e)}}(e,this.paddingTop),d=f.top-this.pixelViewport.top,v=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var p=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(p!=this.inView&&(this.inView=p,p&&(s=!0)),!this.inView)return 0;var m=e.clientWidth;if(this.contentDOMWidth==m&&this.editorHeight==t.scrollDOM.clientHeight&&this.editorWidth==t.scrollDOM.clientWidth||(this.contentDOMWidth=m,this.editorHeight=t.scrollDOM.clientHeight,this.editorWidth=t.scrollDOM.clientWidth,u|=8),s){var g=t.docView.measureVisibleLineHeights();if(r.mustRefreshForHeights(g)&&(a=!0),a||r.lineWrapping&&Math.abs(m-this.contentDOMWidth)>r.charWidth){var y=t.docView.measureTextSize(),k=y.lineHeight,b=y.charWidth;(a=r.refresh(i,o,k,b,m/b,g))&&(t.docView.minWidth=0,u|=8)}d>0&&v>0?l=Math.max(d,v):d<0&&v<0&&(l=Math.min(d,v)),r.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(r,0,a,new Pn(this.viewport.from,g)),r.heightChanged&&(u|=2)}var w=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return w&&(this.viewport=this.getViewport(l,this.scrollTarget)),this.updateForViewport(),(2&u||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),u}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(t,e){var n=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,i=this.state.doc,o=this.visibleTop,a=this.visibleBottom,s=new Gn(r.lineAt(o-1e3*n,Ln.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-n),Ln.ByHeight,i,0,0).to);if(e){var u=e.range.head,l=this.editorHeight;if(us.to){var h,c=r.lineAt(u,Ln.ByPos,i,0,0);h="center"==e.y?(c.top+c.bottom)/2-l/2:"start"==e.y||"nearest"==e.y&&u1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var i=this.heightMap.lineAt(e,Ln.ByPos,this.state.doc,0,0),o=i.top,a=this.heightMap.lineAt(n,Ln.ByPos,this.state.doc,0,0),s=a.bottom,u=this.visibleTop,l=this.visibleBottom;return(0==e||o<=u-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&o>u-2e3&&si&&(r.push({from:i,to:t}),o+=t-i),i=e}},20),ii.from&&f.push({from:i.from,to:s}),u=i.from&&d.from<=i.to&&Qn(f,d.from-10,d.from+10),!d.empty&&d.to>=i.from&&d.to<=i.to&&Qn(f,d.to-10,d.to+10);for(var v=function(){var r=m[p],a=r.from,s=r.to;s-a>1e3&&n.push(function(t,e){var n,r=M(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e(i))return i}}catch(o){r.e(o)}finally{r.f()}return}(t,(function(t){return t.from>=i.from&&t.to<=i.to&&Math.abs(t.from-a)<1e3&&Math.abs(t.to-s)<1e3}))||new $n(a,s,e.gapSize(i,a,s,o)))},p=0,m=f;p=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((function(e){return e.from<=t&&e.to>=t}))||tr(this.heightMap.lineAt(t,Ln.ByPos,this.state.doc,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(t){return tr(this.heightMap.lineAt(this.scaler.fromDOM(t),Ln.ByHeight,this.state.doc,0,0),this.scaler)}},{key:"elementAtHeight",value:function(t){return tr(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),t}(),Gn=function t(e,n){D(this,t),this.from=e,this.to=n};function Jn(t,e){var n=t.total,r=t.ranges;if(e<=0)return r[0].from;if(e>=1)return r[r.length-1].to;for(var i=Math.floor(n*e),o=0;;o++){var a=r[o],s=a.from,u=a.to-s;if(i<=u)return s+i;i-=u}}function Xn(t,e){var n,r=0,i=M(t.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.from,s=o.to;if(e<=s){r+=e-a;break}r+=s-a}}catch(u){i.e(u)}finally{i.f()}return r/t.total}function Qn(t,e,n){for(var r=0;re){var o=[];i.fromn&&o.push({from:n,to:i.to}),t.splice.apply(t,[r,1].concat(o)),r+=o.length-1}}}var Yn={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},Zn=function(){function t(e,n,r){D(this,t);var i=0,o=0,a=0;this.viewports=r.map((function(t){var r=t.from,o=t.to,a=n.lineAt(r,Ln.ByPos,e,0,0).top,s=n.lineAt(o,Ln.ByPos,e,0,0).bottom;return i+=s-a,{from:r,to:o,top:a,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-i)/(n.height-i);var s,u=M(this.viewports);try{for(u.s();!(s=u.n()).done;){var l=s.value;l.domTop=a+(l.top-o)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),o=l.bottom}}catch(h){u.e(h)}finally{u.f()}}return R(t,[{key:"toDOM",value:function(t){for(var e=0,n=0,r=0;;e++){var i=e-1}}),rr=o.V.newName(),ir=o.V.newName(),or=o.V.newName(),ar={"&light":"."+ir,"&dark":"."+or};function sr(t,e,n){return new o.V(e,{finish:function(e){return/&/.test(e)?e.replace(/&\w*/,(function(e){if("&"==e)return t;if(!n||!n[e])throw new RangeError("Unsupported selector: ".concat(e));return n[e]})):t+" "+e}})}var ur=sr("."+rr,{"&.cm-editor":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor, .cm-dropCursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ar),lr={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},hr=mt.ie&&mt.ie_version<=11,cr=function(){function t(e,n,r){var i=this;D(this,t),this.view=e,this.onChange=n,this.onScrollChanged=r,this.active=!1,this.selectionRange=new F,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((function(t){var n,r=M(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;i.queue.push(o)}}catch(a){r.e(a)}finally{r.f()}(mt.ie&&mt.ie_version<=11||mt.ios&&e.composing)&&t.some((function(t){return"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length}))?i.flushSoon():i.flush()})),hr&&(this.onCharData=function(t){i.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),i.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver((function(){i.view.docView.lastUpdate0&&t[t.length-1].intersectionRatio>0!=i.intersecting&&(i.intersecting=!i.intersecting,i.intersecting!=i.view.inView&&i.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((function(t){t.length>0&&t[t.length-1].intersectionRatio>0&&i.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}return R(t,[{key:"onScroll",value:function(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}},{key:"updateGaps",value:function(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((function(e,n){return e!=t[n]})))){this.gapIntersection.disconnect();var e,n=M(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.gapIntersection.observe(r)}}catch(i){n.e(i)}finally{n.f()}this.gaps=t}}},{key:"onSelectionChange",value:function(t){if(this.readSelectionRange()&&!this.delayedAndroidKey){var e=this.view,n=this.selectionRange;if(e.state.facet(ee)?e.root.activeElement==this.dom:L(e.dom,n)){var r=n.anchorNode&&e.docView.nearest(n.anchorNode);r&&r.ignoreEvent(t)||((mt.ie&&mt.ie_version<=11||mt.android&&mt.chrome)&&!e.state.selection.main.empty&&n.focusNode&&N(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1))}}}},{key:"readSelectionRange",value:function(){var t=this.view.root,e=P(t),n=mt.safari&&11==t.nodeType&&function(){for(var t=document.activeElement;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}()==this.view.contentDOM&&function(t){var e=null;function n(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;var r=e.startContainer,i=e.startOffset,o=e.endContainer,a=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);if(N(s.node,s.offset,o,a)){var u=[o,a,r,i];r=u[0],i=u[1],o=u[2],a=u[3]}return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}}(this.view)||e;return!this.selectionRange.eq(n)&&(this.selectionRange.setRange(n),this.selectionChanged=!0)}},{key:"setSelectionRange",value:function(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}},{key:"listenForScroll",value:function(){this.parentCheck=-1;for(var t=0,e=null,n=this.dom;n;)if(1==n.nodeType)!e&&t=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}},{key:"processRecords",value:function(){var t,e=this.queue,n=M(this.observer.takeRecords());try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push(r)}}catch(c){n.e(c)}finally{n.f()}e.length&&(this.queue=[]);var i,o=-1,a=-1,s=!1,u=M(e);try{for(u.s();!(i=u.n()).done;){var l=i.value,h=this.readMutation(l);h&&(h.typeOver&&(s=!0),-1==o?(o=h.from,a=h.to):(o=Math.min(h.from,o),a=Math.max(h.to,a)))}}catch(c){u.e(c)}finally{u.f()}return{from:o,to:a,typeOver:s}}},{key:"flush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!(this.delayedFlush>=0||this.delayedAndroidKey)){t&&this.readSelectionRange();var e=this.processRecords(),n=e.from,r=e.to,i=e.typeOver,o=this.selectionChanged&&L(this.dom,this.selectionRange);if(!(n<0)||o){this.selectionChanged=!1;var a=this.view.state;this.onChange(n,r,i),this.view.state==a&&this.view.update([])}}}},{key:"readMutation",value:function(t){var e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.dirty|=4),"childList"==t.type){var n=fr(e,t.previousSibling||t.target.previousSibling,-1),r=fr(e,t.nextSibling||t.target.nextSibling,1);return{from:n?e.posAfter(n):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}},{key:"destroy",value:function(){var t,e,n;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(n=this.resize)||void 0===n||n.disconnect();var r,i=M(this.scrollTargets);try{for(i.s();!(r=i.n()).done;){r.value.removeEventListener("scroll",this.onScroll)}}catch(o){i.e(o)}finally{i.f()}window.removeEventListener("scroll",this.onScroll),this.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}]),t}();function fr(t,e,n){for(;e;){var r=Z.get(e);if(r&&r.parent==t)return r;var i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function dr(t,e,n,i){var o,a,s=t.state.selection.main;if(e>-1){var u=t.docView.domBoundsAround(e,n,0);if(!u||t.state.readOnly)return;var l=u.from,h=u.to,c=t.docView.impreciseHead||t.docView.impreciseAnchor?[]:function(t){var e=[];if(t.root.activeElement!=t.contentDOM)return e;var n=t.observer.selectionRange,r=n.anchorNode,i=n.anchorOffset,o=n.focusNode,a=n.focusOffset;r&&(e.push(new Ve(r,i)),o==r&&a==i||e.push(new Ve(o,a)));return e}(t),f=new Ne(c,t);f.readRange(u.startDOM,u.endDOM),a=function(t,e){if(0==t.length)return null;var n=t[0].pos,i=2==t.length?t[1].pos:n;return n>-1&&i>-1?r.jT.single(n+e,i+e):null}(c,l);var d=s.from,v=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||mt.android&&f.text.length0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,o-Math.min(a,s))-o}if(a=a?o-n:0)+(s-a),a=o}else if(s=s?o-n:0)+(a-s),s=o}return{from:o,toA:a,toB:s}}(t.state.sliceDoc(l,h),f.text,d-l,v);p&&(o={from:l+p.from,to:l+p.toA,insert:t.state.toText(f.text.slice(p.from,p.toB))})}else if(t.hasFocus||!t.state.facet(ee)){var m=t.observer.selectionRange,g=t.docView,y=g.impreciseHead,k=g.impreciseAnchor,b=y&&y.node==m.focusNode&&y.offset==m.focusOffset||!B(t.contentDOM,m.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(m.focusNode,m.focusOffset),w=k&&k.node==m.anchorNode&&k.offset==m.anchorOffset||!B(t.contentDOM,m.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(m.anchorNode,m.anchorOffset);b==s.head&&w==s.anchor||(a=r.jT.single(w,b))}if(o||a)if(!o&&i&&!s.empty&&a&&a.main.empty?o={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,s.to)}:o&&o.from>=s.from&&o.to<=s.to&&(o.from!=s.from||o.to!=s.to)&&s.to-s.from-(o.to-o.from)<=4&&(o={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,o.from).append(o.insert).append(t.state.doc.slice(o.to,s.to))}),o){var x=t.state;if(mt.ios&&t.inputState.flushIOSKey(t))return;if(mt.android&&(o.from==s.from&&o.to==s.to&&1==o.insert.length&&2==o.insert.lines&&G(t.contentDOM,"Enter",13)||o.from==s.from-1&&o.to==s.to&&0==o.insert.length&&G(t.contentDOM,"Backspace",8)||o.from==s.from&&o.to==s.to+1&&0==o.insert.length&&G(t.contentDOM,"Delete",46)))return;var S,A=o.insert.toString();if(t.state.facet(Jt).some((function(e){return e(t,o.from,o.to,A)})))return;if(t.inputState.composing>=0&&t.inputState.composing++,o.from>=s.from&&o.to<=s.to&&o.to-o.from>=(s.to-s.from)/3&&(!a||a.main.empty&&a.main.from==o.from+o.insert.length)&&t.inputState.composing<0){var C=s.fromo.to?x.sliceDoc(o.to,s.to):"";S=x.replaceSelection(t.state.toText(C+o.insert.sliceString(0,void 0,t.state.lineBreak)+M))}else{var O=x.changes(o),T=a&&!x.selection.main.eq(a.main)&&a.main.to<=O.newLength?a.main:void 0;if(x.selection.ranges.length>1&&t.inputState.composing>=0&&o.to<=s.to&&o.to>=s.to-10){var D=t.state.sliceDoc(o.from,o.to),E=We(t)||t.state.doc.lineAt(s.head),R=s.to-o.to,P=s.to-s.from;S=x.changeByRange((function(e){if(e.from==s.from&&e.to==s.to)return{changes:O,range:T||e.map(O)};var n=e.to-R,i=n-D.length;if(e.to-e.from!=P||t.state.sliceDoc(i,n)!=D||E&&e.to>=E.from&&e.from<=E.to)return{range:e};var a=x.changes({from:i,to:n,insert:o.insert}),u=e.to-s.to;return{changes:a,range:T?r.jT.range(Math.max(0,T.anchor+u),Math.max(0,T.head+u)):e.map(a)}}))}else S={changes:O,selection:T&&x.selection.replaceRange(T)}}var L="input.type";t.composing&&(L+=".compose",t.inputState.compositionFirstChange&&(L+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(S,{scrollIntoView:!0,userEvent:L})}else if(a&&!a.main.eq(s)){var I=!1,N="select";t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(I=!0),N=t.inputState.lastSelectionOrigin),t.dispatch({selection:a,scrollIntoView:I,userEvent:N})}}var vr=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=n.dispatch||function(t){return e.update([t])},this.dispatch=this.dispatch.bind(this),this.root=n.root||J(n.parent)||document,this.viewState=new Kn(n.state||r.yy.create()),this.plugins=this.state.facet(oe).map((function(t){return new ue(t)}));var i,o=M(this.plugins);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.update(this)}}catch(s){o.e(s)}finally{o.f()}this.observer=new cr(this,(function(t,n,r){dr(e,t,n,r)}),(function(t){e.inputState.runScrollHandlers(e,t),e.observer.intersecting&&e.measure()})),this.inputState=new un(this),this.docView=new He(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,yr(),this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}return R(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"dispatch",value:function(){var t;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof r.YW?arguments.length<=0?void 0:arguments[0]:(t=this.state).update.apply(t,arguments))}},{key:"update",value:function(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var e,n,i=!1,o=this.state,a=M(t);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=s.state}}catch(y){a.e(y)}finally{a.f()}if(this.destroyed)this.viewState.state=o;else{if(o.facet(r.yy.phrases)!=this.state.facet(r.yy.phrases))return this.setState(o);e=new ve(this,o,t);var u=this.viewState.scrollTarget;try{this.updateState=2;var l,h=M(t);try{for(h.s();!(l=h.n()).done;){var c=l.value;if(u&&(u=u.map(c.changes)),c.scrollIntoView){var f=c.state.selection.main;u=new Yt(f.empty?f:r.jT.cursor(f.head,f.head>f.anchor?-1:1))}var d,v=M(c.effects);try{for(v.s();!(d=v.n()).done;){var p=d.value;p.is(Xt)?u=new Yt(p.value):p.is(Qt)?u=new Yt(p.value,"center"):p.is(Zt)&&(u=p.value)}}catch(y){v.e(y)}finally{v.f()}}}catch(y){h.e(y)}finally{h.f()}this.viewState.update(e,u),this.bidiCache=wr.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(fe)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((function(t){return t.isUserEvent("select.pointer")})))}finally{this.updateState=0}if((i||u||this.viewState.mustEnforceCursorAssoc)&&this.requestMeasure(),!e.empty){var m,g=M(this.state.facet(Gt));try{for(g.s();!(m=g.n()).done;){(0,m.value)(e)}}catch(y){g.e(y)}finally{g.f()}}}}},{key:"setState",value:function(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=t;else{this.updateState=2;var e=this.hasFocus;try{var n,r=M(this.plugins);try{for(r.s();!(n=r.n()).done;){n.value.destroy(this)}}catch(a){r.e(a)}finally{r.f()}this.viewState=new Kn(t),this.plugins=t.facet(oe).map((function(t){return new ue(t)})),this.pluginMap.clear();var i,o=M(this.plugins);try{for(o.s();!(i=o.n()).done;){i.value.update(this)}}catch(a){o.e(a)}finally{o.f()}this.docView=new He(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(t){var e=t.startState.facet(oe),n=t.state.facet(oe);if(e!=n){var r,i=[],o=M(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=e.indexOf(a);if(s<0)i.push(new ue(a));else{var u=this.plugins[s];u.mustUpdate=t,i.push(u)}}}catch(p){o.e(p)}finally{o.f()}var l,h=M(this.plugins);try{for(h.s();!(l=h.n()).done;){var c=l.value;c.mustUpdate!=t&&c.destroy(this)}}catch(p){h.e(p)}finally{h.f()}this.plugins=i,this.pluginMap.clear(),this.inputState.ensureHandlers(this)}else{var f,d=M(this.plugins);try{for(d.s();!(f=d.n()).done;){f.value.mustUpdate=t}}catch(p){d.e(p)}finally{d.f()}}for(var v=0;v0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.flush();var n=null;try{for(var r=0;;r++){this.updateState=1;var i=this.viewport,o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(r>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var a=[];if(!(4&o)){var s=[a,this.measureRequests];this.measureRequests=s[0],a=s[1]}var u=a.map((function(e){try{return e.read(t)}catch(n){return te(t.state,n),br}})),l=new ve(this,this.state),h=!1,c=!1;l.flags|=o,n?n.flags|=o:n=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),h=this.docView.update(l));for(var f=0;f-1&&this.measure(!1)}},{key:"requestMeasure",value:function(t){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame((function(){return e.measure()}))),t){if(null!=t.key)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;return this.lineBlockAt(t).moveY(e+this.viewState.paddingTop)}},{key:"lineBlockAt",value:function(t){return this.viewState.lineBlockAt(t)}},{key:"contentHeight",get:function(){return this.viewState.contentHeight}},{key:"moveByChar",value:function(t,e,n){return sn(this,t,an(this,t,e,n))}},{key:"moveByGroup",value:function(t,e){var n=this;return sn(this,t,an(this,t,e,(function(e){return function(t,e,n){var i=t.state.charCategorizer(e),o=i(n);return function(t){var e=i(t);return o==r.D0.Space&&(o=e),o==e}}(n,t.head,e)})))}},{key:"moveToLineBoundary",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return on(this,t,e,n)}},{key:"moveVertically",value:function(t,e,n){return sn(this,t,function(t,e,n,i){var o=e.head,a=n?1:-1;if(o==(n?t.state.doc.length:0))return r.jT.cursor(o,e.assoc);var s,u=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(o),c=t.documentTop;if(h)null==u&&(u=h.left-l.left),s=a<0?h.top:h.bottom;else{var f=t.viewState.lineBlockAt(o-c);null==u&&(u=Math.min(l.right-l.left,t.defaultCharacterWidth*(o-f.from))),s=(a<0?f.top:f.bottom)+c}for(var d=l.left+u,v=null!=i?i:t.defaultLineHeight>>1,p=0;;p+=10){var m=s+(v+p)*a,g=en(t,{x:d,y:m},!1,a);if(ml.bottom||(a<0?go))return r.jT.cursor(g,e.assoc,void 0,u)}}(this,t,e,n))}},{key:"scrollPosIntoView",value:function(t){this.dispatch({effects:Xt.of(r.jT.cursor(t))})}},{key:"domAtPos",value:function(t){return this.docView.domAtPos(t)}},{key:"posAtDOM",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.posFromDOM(t,e)}},{key:"posAtCoords",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),en(this,t,e)}},{key:"coordsAtPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var n=this.docView.coordsAt(t,e);if(!n||n.left==n.right)return n;var r=this.state.doc.lineAt(t),i=this.bidiSpans(r),o=i[Ee.find(i,t-r.from,-1,e)];return _(n,o.dir==pe.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.heightOracle.direction}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(t){if(t.length>pr)return Be(t.length);var e,n=this.textDirection,r=M(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.from==t.from&&i.dir==n)return i.order}}catch(a){r.e(a)}finally{r.f()}var o=Pe(t.text,this.textDirection);return this.bidiCache.push(new wr(t.from,t.to,n,o)),o}},{key:"hasFocus",get:function(){var t;return(document.hasFocus()||mt.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var t=this;this.observer.ignore((function(){U(t.contentDOM),t.docView.updateSelection()}))}},{key:"destroy",value:function(){var t,e=M(this.plugins);try{for(e.s();!(t=e.n()).done;){t.value.destroy(this)}}catch(n){e.e(n)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Zt.of(new Yt("number"==typeof t?r.jT.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(t){return ae.define((function(){return{}}),{eventHandlers:t})}},{key:"theme",value:function(t,e){var n=o.V.newName(),r=[er.of(n),fe.of(sr(".".concat(n),t))];return e&&e.dark&&r.push(nr.of(!0)),r}},{key:"baseTheme",value:function(t){return r.Wl.lowest(fe.of(sr("."+rr,t,ar)))}}]),t}();vr.scrollTo=Xt,vr.centerOn=Qt,vr.styleModule=fe,vr.inputHandler=Jt,vr.exceptionSink=Kt,vr.updateListener=Gt,vr.editable=ee,vr.mouseSelectionStyle=Ut,vr.dragMovesSelection=$t,vr.clickAddsSelectionRange=Ft,vr.decorations=ce,vr.darkTheme=nr,vr.contentAttributes=he,vr.editorAttributes=le,vr.lineWrapping=vr.contentAttributes.of({class:"cm-lineWrapping"}),vr.announce=r.Py.define();var pr=4096;function mr(t,e){return(null==t?e.contentDOM.getBoundingClientRect().top:t)+e.viewState.paddingTop}var gr=-1;function yr(){window.addEventListener("resize",(function(){-1==gr&&(gr=setTimeout(kr,50))}))}function kr(){gr=-1;for(var t=document.querySelectorAll(".cm-content"),e=0;e=0;i--){var o=r[i],a="function"==typeof o?o(t):o;a&&Ot(a,n)}return n}var Sr=mt.mac?"mac":mt.windows?"win":mt.linux?"linux":"key";function Ar(t,e){var n,r,i,o,a=t.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:Sr,r=Object.create(null),i=Object.create(null),o=function(t,e){var n=i[t];if(null==n)i[t]=e;else if(n!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},a=function(t,e,i,a){for(var s=r[t]||(r[t]=Object.create(null)),u=e.split(/ (?!$)/).map((function(t){return Ar(t,n)})),l=function(e){var n=u.slice(0,e).join(" ");o(n,!0),s[n]||(s[n]={preventDefault:!0,commands:[function(e){var r=Rr={view:e,prefix:n,scope:t};return setTimeout((function(){Rr==r&&(Rr=null)}),Pr),!0}]})},h=1;h0&&void 0!==arguments[0]?arguments[0]:{};return[Ir.of(t),Vr,zr]}var jr=function(){function t(e,n,r,i,o){D(this,t),this.left=e,this.top=n,this.width=r,this.height=i,this.className=o}return R(t,[{key:"draw",value:function(){var t=document.createElement("div");return t.className=this.className,this.adjust(t),t}},{key:"adjust",value:function(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width>=0&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}},{key:"eq",value:function(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}}]),t}(),Vr=ae.fromClass(function(){function t(e){D(this,t),this.view=e,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=e.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=e.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),e.requestMeasure(this.measureReq),this.setBlinkRate()}return R(t,[{key:"setBlinkRate",value:function(){this.cursorLayer.style.animationDuration=this.view.state.facet(Ir).cursorBlinkRate+"ms"}},{key:"update",value:function(t){var e=t.startState.facet(Ir)!=t.state.facet(Ir);(e||t.selectionSet||t.geometryChanged||t.viewportChanged)&&this.view.requestMeasure(this.measureReq),t.transactions.some((function(t){return t.scrollIntoView}))&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}},{key:"readPos",value:function(){var t,e=this,n=this.view.state,r=n.facet(Ir),i=n.selection.ranges.map((function(t){return t.empty?[]:function(t,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];var n=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),i=t.textDirection==pe.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),s=_r(t),u=window.getComputedStyle(o.firstChild),l=a.left+parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)),h=a.right-parseInt(u.paddingRight),c=qr(t,n),f=qr(t,r),d=c.type==Rt.Text?c:null,v=f.type==Rt.Text?f:null;t.lineWrapping&&(d&&(d=Wr(t,n,d)),v&&(v=Wr(t,r,v)));if(d&&v&&d.from==v.from)return k(b(e.from,e.to,d));var p=d?b(e.from,null,d):w(c,!1),m=v?b(null,e.to,v):w(f,!0),g=[];return(d||c).to<(v||f).from-1?g.push(y(l,p.bottom,h,m.top)):p.bottomf&&p.from=g)break;S>m&&u(Math.max(x,m),null==e&&x<=f,Math.min(S,g),null==n&&S>=d,w.dir)}}catch(A){b.e(A)}finally{b.f()}if((m=k.to+1)>=g)break}}}catch(A){v.e(A)}finally{v.f()}return 0==s.length&&u(f,null==e,d,null==n,t.textDirection),{top:o,bottom:a,horizontal:s}}function w(t,e){var n=a.top+(e?t.top:t.bottom);return{top:n,bottom:n,horizontal:[]}}}(e.view,t)})).reduce((function(t,e){return t.concat(e)})),o=[],a=M(n.selection.ranges);try{for(a.s();!(t=a.n()).done;){var s=t.value,u=s==n.selection.main;if(s.empty?!u||Lr:r.drawRangeCursor){var l=Fr(this.view,s,u);l&&o.push(l)}}}catch(h){a.e(h)}finally{a.f()}return{rangePieces:i,cursors:o}}},{key:"drawSel",value:function(t){var e=this,n=t.rangePieces,r=t.cursors;if(n.length!=this.rangePieces.length||n.some((function(t,n){return!t.eq(e.rangePieces[n])}))){this.selectionLayer.textContent="";var i,o=M(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.selectionLayer.appendChild(a.draw())}}catch(c){o.e(c)}finally{o.f()}this.rangePieces=n}if(r.length!=this.cursors.length||r.some((function(t,n){return!t.eq(e.cursors[n])}))){var s=this.cursorLayer.children;if(s.length!==r.length){this.cursorLayer.textContent="";var u,l=M(r);try{for(l.s();!(u=l.n()).done;){var h=u.value;this.cursorLayer.appendChild(h.draw())}}catch(c){l.e(c)}finally{l.f()}}else r.forEach((function(t,e){return t.adjust(s[e])}));this.cursors=r}}},{key:"destroy",value:function(){this.selectionLayer.remove(),this.cursorLayer.remove()}}]),t}()),Hr={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Lr&&(Hr[".cm-line"].caretColor="transparent !important");var zr=r.Wl.highest(vr.theme(Hr));function _r(t){var e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==pe.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Wr(t,e,n){var i=r.jT.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:Rt.Text}}function qr(t,e){var n=t.lineBlockAt(e);if(Array.isArray(n.type)){var r,i=M(n.type);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.to>e||o.to==e&&(o.to==n.to||o.type==Rt.Text))return o}}catch(a){i.e(a)}finally{i.f()}}return n}function Fr(t,e,n){var r=t.coordsAtPos(e.head,e.assoc||1);if(!r)return null;var i=_r(t);return new jr(r.left-i.left,r.top-i.top,-1,r.bottom-r.top,n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}function $r(){return Kr}var Ur=Pt.line({class:"cm-activeLine"}),Kr=ae.fromClass(function(){function t(e){D(this,t),this.decorations=this.getDeco(e)}return R(t,[{key:"update",value:function(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}},{key:"getDeco",value:function(t){var e,n=-1,r=[],i=M(t.state.selection.ranges);try{for(i.s();!(e=i.n()).done;){var o=e.value;if(!o.empty)return Pt.none;var a=t.lineBlockAt(o.head);a.from>n&&(r.push(Ur.range(a.from)),n=a.from)}}catch(s){i.e(s)}finally{i.f()}return Pt.set(r)}}]),t}(),{decorations:function(t){return t.decorations}})},97248:function(t,e,n){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||o(t,e)||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 i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}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 a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};l(this,t),this.id=h++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return u(t,[{key:"add",value:function(t){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=v.match(t)),function(n){var r=t(n);return void 0===r?null:[e,r]}}}]),t}();f.closedBy=new f({deserialize:function(t){return t.split(" ")}}),f.openedBy=new f({deserialize:function(t){return t.split(" ")}}),f.group=new f({deserialize:function(t){return t.split(" ")}}),f.contextHash=new f({perNode:!0}),f.lookAhead=new f({perNode:!0}),f.mounted=new f({perNode:!0});var d=Object.create(null),v=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;l(this,t),this.name=e,this.props=n,this.id=r,this.flags=i}return u(t,[{key:"prop",value:function(t){return this.props[t.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(t){if("string"==typeof t){if(this.name==t)return!0;var e=this.prop(f.group);return!!e&&e.indexOf(t)>-1}return this.id==t}}],[{key:"define",value:function(e){var n=e.props&&e.props.length?Object.create(null):d,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),o=new t(e.name||"",n,e.id,r);if(e.props){var a,s=i(e.props);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(Array.isArray(u)||(u=u(o)),u){if(u[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[u[0].id]=u[1]}}}catch(l){s.e(l)}finally{s.f()}}return o}},{key:"match",value:function(t){var e=Object.create(null);for(var n in t){var r,o=i(n.split(" "));try{for(o.s();!(r=o.n()).done;){var a=r.value;e[a]=t[n]}}catch(s){o.e(s)}finally{o.f()}}return function(t){for(var n=t.prop(f.group),r=-1;r<(n?n.length:0);r++){var i=e[r<0?t.name:n[r]];if(i)return i}}}}]),t}();v.none=new v("",Object.create(null),0,8);var p=function(){function t(e){l(this,t),this.types=e;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=null!=t&&m.get(this)||this.topNode,r=new C(n);return null!=t&&(r.moveTo(t,e),m.set(this,r._tree)),r}},{key:"fullCursor",value:function(){return new C(this.topNode,1)}},{key:"topNode",get:function(){return new w(this,0,0,null)}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor(t,e).node}},{key:"resolveInner",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.topNode;;){var r=n.enter(t,e);if(!r)return n;n=r}}},{key:"iterate",value:function(t){for(var e=t.enter,n=t.leave,r=t.from,i=void 0===r?0:r,o=t.to,a=void 0===o?this.length:o,s=this.cursor(),u=function(){return s.node};;){var l=!1;if(s.from<=a&&s.to>=i&&(s.type.isAnonymous||!1!==e(s.type,s.from,s.to,u))){if(s.firstChild())continue;s.type.isAnonymous||(l=!0)}for(;l&&n&&n(s.type,s.from,s.to,u),l=s.type.isAnonymous,!s.nextSibling();){if(!s.parent())return;l=!0}}}},{key:"prop",value:function(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}},{key:"propValues",get:function(){var t=[];if(this.props)for(var e in this.props)t.push([+e,this.props[e]]);return t}},{key:"balance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.children.length<=8?this:E(this.type,this.children,this.positions,0,this.children.length,0,this.length,(function(n,r,i){return new t(e.type,n,r,i,e.propValues)}),n.makeTree||function(e,n,r){return new t(v.none,e,n,r)})}}],[{key:"build",value:function(t){return O(t)}}]),t}();g.empty=new g(v.none,[],[],0);var y=function(){function t(e,n){l(this,t),this.buffer=e,this.index=n}return u(t,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new t(this.buffer,this.index)}}]),t}(),k=function(){function t(e,n,r){l(this,t),this.buffer=e,this.length=n,this.set=r}return u(t,[{key:"type",get:function(){return v.none}},{key:"toString",value:function(){for(var t=[],e=0;e0));s=o[s+3]);return a}},{key:"slice",value:function(e,n,r,i){for(var o=this.buffer,a=new Uint16Array(n-e),s=e,u=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}var w=function(){function t(e,n,r,i){l(this,t),this.node=e,this._from=n,this.index=r,this._parent=i}return u(t,[{key:"type",get:function(){return this.node.type}},{key:"name",get:function(){return this.node.type.name}},{key:"from",get:function(){return this._from}},{key:"to",get:function(){return this._from+this.node.length}},{key:"nextChild",value:function(e,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=this;;){for(var s=a.node,u=s.children,l=s.positions,h=n>0?u.length:-1;e!=h;e+=n){var c=u[e],d=l[e]+a._from;if(b(i,r,d,d+c.length))if(c instanceof k){if(2&o)continue;var v=c.findChild(0,c.buffer.length,n,r-d,i);if(v>-1)return new A(new S(a,c,e,d),null,v)}else if(1&o||!c.type.isAnonymous||M(c)){var p=void 0;if(c.props&&(p=c.prop(f.mounted))&&!p.overlay)return new t(p.tree,d,e,a);var m=new t(c,d,e,a);return 1&o||!m.type.isAnonymous?m:m.nextChild(n<0?c.children.length-1:0,n,r,i)}}if(1&o||!a.type.isAnonymous)return null;if(e=a.index>=0?a.index+n:n<0?-1:a._parent.node.children.length,!(a=a._parent))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this.node.children.length-1,-1,0,4)}},{key:"childAfter",value:function(t){return this.nextChild(0,1,t,2)}},{key:"childBefore",value:function(t){return this.nextChild(this.node.children.length-1,-1,t,-2)}},{key:"enter",value:function(e,n){var r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(o&&(r=this.node.prop(f.mounted))&&r.overlay){var s,u=e-this.from,l=i(r.overlay);try{for(l.s();!(s=l.n()).done;){var h=s.value,c=h.from,d=h.to;if((n>0?c<=u:c=u:d>u))return new t(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(v){l.e(v)}finally{l.f()}}return this.nextChild(0,1,e,n,a?0:2)}},{key:"nextSignificantParent",value:function(){for(var t=this;t.type.isAnonymous&&t._parent;)t=t._parent;return t}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",get:function(){return new C(this)}},{key:"tree",get:function(){return this.node}},{key:"toTree",value:function(){return this.node}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor.moveTo(t,e).node}},{key:"getChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=x(this,t,e,n);return r.length?r[0]:null}},{key:"getChildren",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return x(this,t,e,n)}},{key:"toString",value:function(){return this.node.toString()}}]),t}();function x(t,e,n,r){var i=t.cursor,o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}var S=function t(e,n,r,i){l(this,t),this.parent=e,this.buffer=n,this.index=r,this.start=i},A=function(){function t(e,n,r){l(this,t),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}return u(t,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(e,n,r){var i=this.context.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(t){return this.child(1,t,2)}},{key:"childBefore",value:function(t){return this.child(-1,t,-2)}},{key:"enter",value:function(e,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!i)return null;var o=this.context.buffer,a=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return a<0?null:new t(this.context,this,a)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}},{key:"nextSibling",get:function(){var e=this.context.buffer,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new t(this.context,this._parent,n):this.externalSibling(1)}},{key:"prevSibling",get:function(){var e=this.context.buffer,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new t(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}},{key:"cursor",get:function(){return new C(this)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var t=[],e=[],n=this.context.buffer,r=this.index+4,i=n.buffer[this.index+3];if(i>r){var o=n.buffer[this.index+1],a=n.buffer[this.index+2];t.push(n.slice(r,i,o,a)),e.push(0)}return new g(this.type,t,e,this.to-this.from)}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor.moveTo(t,e).node}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=x(this,t,e,n);return r.length?r[0]:null}},{key:"getChildren",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return x(this,t,e,n)}}]),t}(),C=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(l(this,t),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof w)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(var r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}return u(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}},{key:"yieldBuf",value:function(t,e){this.index=t;var n=this.buffer,r=n.start,i=n.buffer;return this.type=e||i.set.types[i.buffer[t]],this.from=r+i.buffer[t+1],this.to=r+i.buffer[t+2],!0}},{key:"yield",value:function(t){return!!t&&(t instanceof w?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(t,e,n){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree.node.children.length-1:0,t,e,n,this.mode));var r=this.buffer.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(t){return this.enterChild(1,t,2)}},{key:"childBefore",value:function(t){return this.enterChild(-1,t,-2)}},{key:"enter",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.buffer?!!r&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,n,r))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var t=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}},{key:"sibling",value:function(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));var e=this.buffer.buffer,n=this.stack.length-1;if(t<0){var r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var i=e.buffer[this.index+3];if(i<(n<0?e.buffer.length:e.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(t){var e,n,r=this.buffer;if(r){if(t>0){if(this.index-1)for(var s=e+t,u=t<0?-1:n.node.children.length;s!=u;s+=t){var l=n.node.children[s];if(1&this.mode||l instanceof k||!l.type.isAnonymous||M(l))return!1}}return!0}},{key:"move",value:function(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}},{key:"next",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(1,t)}},{key:"prev",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(-1,t)}},{key:"moveTo",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(var o=t;o;o=o._parent)if(o.index==r){if(r==this.index)return o;e=o,n=i+1;break t}r=this.stack[--i]}for(var a=n;ac;){var f=n.size;if(n.id==e&&f>=0)u.size=r,u.start=i,u.skip=a,a+=4,r+=4,n.next();else{var d=n.pos-f;if(f<0||d=l?4:0,p=n.start;for(n.next();n.pos>d;){if(n.size<0){if(-3!=n.size)break t;v+=4}else n.id>=l&&(v+=4);n.next()}i=p,r+=f,a+=v}}(e<0||r==t)&&(u.size=r,u.start=i,u.skip=a);return u.size>4?u:void 0}(h.pos-e,a))){for(var R=new Uint16Array(O.size-O.skip),P=h.pos-O.size,B=R.length;h.pos>P;)B=w(O.start,R,B);M=new k(R,x-O.start,r),D=O.start-t}else{var L=h.pos-S;h.next();for(var I=[],N=[],j=u>=l?u:-1,V=0,H=x;h.pos>L;)j>=0&&h.id==j&&h.size>=0?(h.end<=H-o&&(m(I,N,y,V,h.end,H,j,A),V=I.length,H=h.end),h.next()):p(y,L,I,N,j);if(j>=0&&V>0&&V-1&&V>0){var z=function(t){return function(e,n,r){var i,o,a=0,s=e.length-1;if(s>=0&&(i=e[s])instanceof g){if(!s&&i.type==t&&i.length==r)return i;(o=i.prop(f.lookAhead))&&(a=n[s]+i.length+o)}return b(t,e,n,r,a)}}(T);M=E(T,I,N,0,I.length,0,x-y,z,z)}else M=b(T,I,N,x-y,A-x)}n.push(M),i.push(D)}function m(t,e,n,i,o,a,s,u){for(var l=[],h=[];t.length>i;)l.push(t.pop()),h.push(e.pop()+n-o);t.push(b(r.types[s],l,h,a-o,u-a)),e.push(o-n)}function b(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;if(d){var a=[f.contextHash,d];o=o?[a].concat(o):[a]}if(i>25){var s=[f.lookAhead,i];o=o?[s].concat(o):[s]}return new g(t,e,n,r,o)}function w(t,e,n){var r=h.id,i=h.start,o=h.end,a=h.size;if(h.next(),a>=0&&r4)for(var u=h.pos-(a-4);h.pos>u;)n=w(t,e,n);e[--n]=s,e[--n]=o-t,e[--n]=i-t,e[--n]=r}else-3==a?d=r:-4==a&&(v=r);return n}for(var x=[],S=[];h.pos>0;)p(t.start||0,t.bufferStart||0,x,S,-1);var A=null!==(e=t.length)&&void 0!==e?e:x.length?S[0]+x[0].length:0;return new g(c[t.topID],x.reverse(),S.reverse(),A)}var T=new WeakMap;function D(t,e){if(!t.isAnonymous||e instanceof k||e.type!=t)return 1;var n=T.get(e);return null==n&&(n=e.children.reduce((function(e,n){return e+D(t,n)}),1),T.set(e,n)),n}function E(t,e,n,r,i,o,a,s,u){for(var l=0,h=r;h=c)break;p+=m}if(l==h+1){if(p>c){var g=n[h];e(g.children,g.positions,0,g.children.length,r[h]+s);continue}f.push(n[h])}else{var y=r[l-1]+n[l-1].length-v;f.push(E(t,n,r,h,l,v,y,null,u))}d.push(v+s-o)}}(e,n,r,i,0),(s||u)(f,d,a)}var R=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];l(this,t),this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}return u(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[new t(0,e.length,e,0,!1,o)],s=i(r);try{for(s.s();!(n=s.n()).done;){var u=n.value;u.to>e.length&&a.push(u)}}catch(l){s.e(l)}finally{s.f()}return a}},{key:"applyChanges",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!n.length)return e;for(var i=[],o=1,a=e.length?e[0]:null,s=0,u=0,l=0;;s++){var h=s=r)for(;a&&a.from=f.from||c<=f.to||l){var d=Math.max(f.from,u)-l,v=Math.min(f.to,c)-l;f=d>=v?null:new t(d,v,f.tree,f.offset+l,s>0,!!h)}if(f&&i.push(f),a.to>c)break;a=o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,o),e)for(var s=0;s=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 d=0;d=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\n ',"\n ","\n ",'\n \n
    \n ',""])),this._error):"",this._inputDevices&&(0,n.dy)(w||(w=D(["\n ","\n "])),this.supervisor.localize("addon.configuration.audio.input"),this._setInputDevice,m.U,this._selectedInput,this._inputDevices.map((function(e){return(0,n.dy)(k||(k=D(["\n \n ","\n \n "])),e.device||"",e.name)}))),this._outputDevices&&(0,n.dy)(E||(E=D(["\n ","\n "])),this.supervisor.localize("addon.configuration.audio.output"),this._setOutputDevice,m.U,this._selectedOutput,this._outputDevices.map((function(e){return(0,n.dy)(_||(_=D(["\n ","\n "])),e.device||"",e.name)}))),this._saveSettings,this.supervisor.localize("common.save"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(C||(C=D(["\n :host,\n ha-card {\n display: block;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n ha-select {\n width: 100%;\n }\n ha-select:last-child {\n margin-top: 8px;\n }\n "])))]}},{kind:"method",key:"willUpdate",value:function(e){q(Q(a.prototype),"willUpdate",this).call(this,e),e.has("addon")&&this._addonChanged()}},{kind:"method",key:"_setInputDevice",value:function(e){var t=e.target.value;this._selectedInput=t}},{kind:"method",key:"_setOutputDevice",value:function(e){var t=e.target.value;this._selectedOutput=t}},{kind:"method",key:"_addonChanged",value:(o=S(regeneratorRuntime.mark((function e(){var t,r,n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._selectedInput=null===this.addon.audio_input?"default":this.addon.audio_input,this._selectedOutput=null===this.addon.audio_output?"default":this.addon.audio_output,!this._outputDevices){e.next=4;break}return e.abrupt("return");case 4:return t={device:"default",name:this.supervisor.localize("addon.configuration.audio.default")},e.prev=5,e.next=8,(0,v.G)(this.hass);case 8:r=e.sent,n=r.audio,i=Object.keys(n.input).map((function(e){return{device:e,name:n.input[e]}})),o=Object.keys(n.output).map((function(e){return{device:e,name:n.output[e]}})),this._inputDevices=[t].concat(A(i)),this._outputDevices=[t].concat(A(o)),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(5),this._error="Failed to fetch audio hardware",this._inputDevices=[t],this._outputDevices=[t];case 21:case"end":return e.stop()}}),e,this,[[5,16]])}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"_saveSettings",value:(r=S(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,this._error=void 0,n={audio_input:"default"===this._selectedInput?null:this._selectedInput,audio_output:"default"===this._selectedOutput?null:this._selectedOutput},e.prev=4,e.next=7,(0,l.d3)(this.hass,this.addon.slug,n);case 7:if("started"!==(null===(i=this.addon)||void 0===i?void 0:i.state)){e.next=10;break}return e.next=10,x(this,this.hass,this.supervisor,this.addon);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this._error="Failed to set addon audio device";case 15:r.progress=!1;case 16:case"end":return e.stop()}}),e,this,[[4,12]])}))),function(e){return r.apply(this,arguments)})}]}}),n.oi);var Y,W,K,G,J,X,ee,te=r(77426);r(81545),r(63727),r(83927),r(66255),r(4019),r(18900);function re(e){return re="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},re(e)}function ne(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ie(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){ne(o,n,i,a,s,"next",e)}function s(e){ne(o,n,i,a,s,"throw",e)}a(void 0)}))}}function oe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function se(e,t){return se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},se(e,t)}function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=we(e);if(t){var i=we(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return le(this,r)}}function le(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return de(e)}function de(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(){ue=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!he(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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",'\n \n
    \n

    \n ','\n

    \n
    \n \n \n \n ','\n \n \n
    \n
    \n\n
    \n ',"\n ","\n ","\n
    \n ",'\n
    \n ',""])),this._error):"",!this._yamlMode||this._canShowSchema&&this.addon.schema||this._valid?"":(0,n.dy)(J||(J=oe(['\n \n ',"\n \n "])),this.supervisor.localize("addon.configuration.options.invalid_yaml")),t?(0,n.dy)(X||(X=oe(['=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 d=0;d=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\n

    \n ',"\n

    \n ","\n\n \n
    \n ",'\n
    \n ',""])),this._error):"",this._config,this._configChanged,this._computeLabel,this._computeHelper,this._createSchema(this._config,this._showOptional,(null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced)||!1),r?(0,n.dy)(Ce||(Ce=Te(['=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 d=0;d=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"])));var e=this.addon.options&&Object.keys(this.addon.options).length||this.addon.schema&&Object.keys(this.addon.schema).length;return(0,n.dy)(Xe||(Xe=st(['\n
    \n ',"\n
    \n "])),e||this.addon.network||this.addon.audio?(0,n.dy)(et||(et=st(["\n ","\n ","\n ","\n "])),e?(0,n.dy)(tt||(tt=st(["\n \n "])),this.hass,this.addon,this.supervisor):"",this.addon.network?(0,n.dy)(rt||(rt=st(["\n \n "])),this.hass,this.addon,this.supervisor):"",this.addon.audio?(0,n.dy)(nt||(nt=st(["\n \n "])),this.hass,this.addon,this.supervisor):""):this.supervisor.localize("addon.configuration.no_configuration"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(it||(it=st(["\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n }\n "])))]}}]}}),n.oi),r(93546);function Ot(e){return Ot="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},Ot(e)}function St(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Dt(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function zt(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Dt(o,n,i,a,s,"next",e)}function s(e){Dt(o,n,i,a,s,"throw",e)}a(void 0)}))}}function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tt(e,t){return Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tt(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qt(e);if(t){var i=qt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Rt(this,r)}}function Rt(e,t){if(t&&("object"===Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vt(e)}function Vt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lt(){Lt=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ft(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n \n ','\n
    \n ',"\n
    \n
    \n
    \n "])),this._error?(0,n.dy)(Ct||(Ct=St(['',""])),this._error):"",this._content?(0,n.dy)(xt||(xt=St([""])),this._content):(0,n.dy)(Pt||(Pt=St([""])))):(0,n.dy)(Et||(Et=St([""])))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(At||(At=St(["\n ha-card {\n display: block;\n }\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n ha-markdown {\n padding: 16px;\n }\n "])))]}},{kind:"method",key:"_loadData",value:(r=zt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,(0,l.ii)(this.hass,this.addon.slug);case 4:this._content=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this._error=this.supervisor.localize("addon.documentation.get_documentation","error",(0,d.js)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return r.apply(this,arguments)})}]}}),n.oi);var Qt,Yt,Wt=r(8636),Kt=r(63864);function Gt(e){return Gt="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},Gt(e)}function Jt(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Xt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(e,t){return tr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},tr(e,t)}function rr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=or(e);if(t){var i=or(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nr(this,r)}}function nr(e,t){if(t&&("object"===Gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ir(e)}function ir(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function or(e){return or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},or(e)}function ar(){ar=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!lr(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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
    \n "])),this.progress,this._buttonTapped,this.disabled)}},{kind:"method",key:"_buttonTapped",value:(r=regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.progress=!0,t={method:this.method,path:this.path,data:this.data},e.prev=2,e.next=5,this.hass.callApi(this.method,this.path,this.data);case 5:r=e.sent,this.progress=!1,this._progressButton.actionSuccess(),t.success=!0,t.response=r,e.next=18;break;case 12:e.prev=12,e.t0=e.catch(2),this.progress=!1,this._progressButton.actionError(),t.success=!1,t.response=e.t0;case 18:(0,a.B)(this,"hass-api-called",t);case 19:case"end":return e.stop()}}),e,this,[[2,12]])})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Jt(o,n,i,a,s,"next",e)}function s(e){Jt(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Yt||(Yt=Xt(["\n :host([disabled]) {\n pointer-events: none;\n }\n "])))}}]}}),n.oi);customElements.define("ha-call-api-button",hr);r(88324),r(85124),r(14089),r(52039);var mr,vr,yr,br,gr,wr,kr,Er,_r,Cr,xr,Pr,Ar,Or,Sr,Dr,zr,jr,Tr,Hr,Rr,Vr,Lr,Mr,Ir,Fr,Br,Ur,Zr,Nr,$r,qr,Qr,Yr,Wr,Kr,Gr,Jr,Xr,en,tn,rn=r(70203),nn=(r(46586),r(63226),function(e,t){(0,a.B)(e,"show-dialog",{dialogTag:"dialog-hassio-markdown",dialogImport:function(){return r.e(884).then(r.bind(r,56884))},dialogParams:t})}),on=(r(23432),r(34450));function an(e){return an="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},an(e)}function sn(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function cn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){sn(o,n,i,a,s,"next",e)}function s(e){sn(o,n,i,a,s,"throw",e)}a(void 0)}))}}function ln(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function dn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t){return un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},un(e,t)}function pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cn(e);if(t){var i=Cn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hn(e)}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mn(){mn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!bn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=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 d=0;d=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\n
    \n
    \n ','\n
    \n ','\n
    \n
    \n
    \n ','\n
    \n\n \n ',"\n\n \n \n\n
    \n ',".
    \n ",'\n
    \n
    \n
    \n ',"\n ","\n
    \n
    \n ","\n
    \n
    \n ","\n ",'\n
    \n
    \n
    \n ',"\n
    \n
    \n ","\n
    \n
    \n \n\n ","\n "])),this.addon.update_available?(0,n.dy)(vr||(vr=ln(["\n \n "])),this.hass,this.narrow,this.supervisor,this.addon.slug,this._updateComplete):"","protected"in this.addon&&!this.addon.protected?(0,n.dy)(yr||(yr=ln(['\n \n (',")\n
    \n "])),this.addon.version,this._openChangelog,this.supervisor.localize("addon.dashboard.changelog")):(0,n.dy)(_r||(_r=ln(['\n \n \n \n \n \n \n \n \n \n \n ',"
    "])),this.addon.url,this.addon.name)),this.addon.logo?(0,n.dy)(Vr||(Vr=ln(['\n