iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 36.9 kB
JavaScript
/*! For license information please see chunk.560835c5bb23c91d00f8.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[3238],{83238:function(t,e,n){"use strict";function o(t){return(o="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)}function i(t,e,n,i){var r,s=arguments.length,c=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===("undefined"==typeof Reflect?"undefined":o(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(c=(s<3?r(c):s>3?r(e,n,c):r(e,n))||c);return s>3&&c&&Object.defineProperty(e,n,c),c}var r,s,c=n(15652),a=(n(54567),{ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"}),u={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},l={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(r||(r={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(s||(s={}));var f=function(t,e){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var d=function(){return(d=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function p(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var h=n(72774),m=function(t){function e(n){var o=t.call(this,d(d({},e.defaultAdapter),n))||this;return o.isSurfaceOpen=!1,o.isQuickOpen=!1,o.isHoistedElement=!1,o.isFixedPosition=!1,o.openAnimationEndTimerId=0,o.closeAnimationEndTimerId=0,o.animationRequestId=0,o.anchorCorner=s.TOP_START,o.originCorner=s.TOP_START,o.anchorMargin={top:0,right:0,bottom:0,left:0},o.position={x:0,y:0},o}return function(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,n=t.ROOT,o=t.OPEN;if(!this.adapter.hasClass(n))throw new Error(n+" class required in root element.");this.adapter.hasClass(o)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^r.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.setAbsolutePosition=function(t,e){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(e)?e:0},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){t.adapter.addClass(e.cssClasses.OPEN),t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.openAnimationEndTimerId=setTimeout((function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()}),l.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var n=this;void 0===t&&(t=!1),this.isSurfaceOpen&&(this.isQuickOpen?(this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose()):(this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){n.adapter.removeClass(e.cssClasses.OPEN),n.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout((function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()}),l.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()))},e.prototype.handleBodyClick=function(t){var e=t.target;this.adapter.isElementInContainer(e)||this.close()},e.prototype.handleKeydown=function(t){var e=t.keyCode;("Escape"===t.key||27===e)&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner(),o=this.getMenuSurfaceMaxHeight(n),i=this.hasBit(n,r.BOTTOM)?"bottom":"top",s=this.hasBit(n,r.RIGHT)?"right":"left",c=this.getHorizontalOriginOffset(n),a=this.getVerticalOriginOffset(n),u=this.measurements,f=u.anchorSize,d=u.surfaceSize,p=((t={})[s]=c,t[i]=a,t);f.width/d.width>l.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(s="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(p),this.adapter.setTransformOrigin(s+" "+i),this.adapter.setPosition(p),this.adapter.setMaxHeight(o?o+"px":""),this.hasBit(n,r.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),e=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),o=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:e,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:o}},e.prototype.getoriginCorner=function(){var t,n,o=this.originCorner,i=this.measurements,s=i.viewportDistance,c=i.anchorSize,a=i.surfaceSize,u=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,r.BOTTOM)?(t=s.top-u+c.height+this.anchorMargin.bottom,n=s.bottom-u-this.anchorMargin.bottom):(t=s.top-u+this.anchorMargin.top,n=s.bottom-u+c.height-this.anchorMargin.top),!(n-a.height>0)&&t>=n&&(o=this.setBit(o,r.BOTTOM));var l,f,d=this.adapter.isRtl(),p=this.hasBit(this.anchorCorner,r.FLIP_RTL),h=this.hasBit(this.anchorCorner,r.RIGHT),m=!1;(m=d&&p?!h:h)?(l=s.left+c.width+this.anchorMargin.right,f=s.right-this.anchorMargin.right):(l=s.left+this.anchorMargin.left,f=s.right+c.width-this.anchorMargin.left);var y=l-a.width>0,b=f-a.width>0,v=this.hasBit(o,r.FLIP_RTL)&&this.hasBit(o,r.RIGHT);return b&&v&&d||!y&&v?o=this.unsetBit(o,r.RIGHT):(y&&m&&d||y&&!m&&h||!b&&l>=f)&&(o=this.setBit(o,r.RIGHT)),o},e.prototype.getMenuSurfaceMaxHeight=function(t){var n=this.measurements.viewportDistance,o=0,i=this.hasBit(t,r.BOTTOM),s=this.hasBit(this.anchorCorner,r.BOTTOM),c=e.numbers.MARGIN_TO_EDGE;return i?(o=n.top+this.anchorMargin.top-c,s||(o+=this.measurements.anchorSize.height)):(o=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-c,s&&(o-=this.measurements.anchorSize.height)),o},e.prototype.getHorizontalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,r.RIGHT),o=this.hasBit(this.anchorCorner,r.RIGHT);if(n){var i=o?e.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?i-(this.measurements.viewportSize.width-this.measurements.bodySize.width):i}return o?e.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,r.BOTTOM),o=this.hasBit(this.anchorCorner,r.BOTTOM);return n?o?e.height-this.anchorMargin.top:-this.anchorMargin.bottom:o?e.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var e,n,o=this.measurements,i=o.windowScroll,r=o.viewportDistance,s=Object.keys(t);try{for(var c=p(s),a=c.next();!a.done;a=c.next()){var u=a.value,l=t[u]||0;l+=r[u],this.isFixedPosition||("top"===u?l+=i.y:"bottom"===u?l-=i.y:"left"===u?l+=i.x:l-=i.x),t[u]=l}}catch(f){e={error:f}}finally{try{a&&!a.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus=function(){var t=this.adapter.isFocused(),e=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(t||e)&&this.adapter.restoreFocus()},e.prototype.hasBit=function(t,e){return Boolean(t&e)},e.prototype.setBit=function(t,e){return t|e},e.prototype.unsetBit=function(t,e){return t^e},e.prototype.isFinite=function(t){return"number"==typeof t&&isFinite(t)},e}(h.K),y=m,b=n(78220),v=n(14114),O=n(82612),T=n(81471),g=n(79865);function E(t){return(E="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)}function _(t,e,n,o,i,r,s){try{var c=t[r](s),a=c.value}catch(u){return void n(u)}c.done?e(a):Promise.resolve(a).then(o,i)}function I(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n <div\n class="mdc-menu-surface ','"\n style="','"\n @keydown=',"\n @opened=","\n @closed=",">\n <slot></slot>\n </div>"]);return I=function(){return t},t}function C(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function w(t,e){return(w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=R(t);if(e){var i=R(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return A(this,n)}}function A(t,e){return!e||"object"!==E(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P={TOP_LEFT:s.TOP_LEFT,TOP_RIGHT:s.TOP_RIGHT,BOTTOM_LEFT:s.BOTTOM_LEFT,BOTTOM_RIGHT:s.BOTTOM_RIGHT,TOP_START:s.TOP_START,TOP_END:s.TOP_END,BOTTOM_START:s.BOTTOM_START,BOTTOM_END:s.BOTTOM_END},M=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&&w(t,e)}(r,t);var e,n,o,i=x(r);function r(){var t;return C(this,r),(t=i.apply(this,arguments)).mdcFoundationClass=y,t.absolute=!1,t.fullwidth=!1,t.fixed=!1,t.x=null,t.y=null,t.quick=!1,t.open=!1,t.bitwiseCorner=s.TOP_START,t.previousMenuCorner=null,t.menuCorner="START",t.corner="TOP_START",t.styleTop="",t.styleLeft="",t.styleRight="",t.styleBottom="",t.styleMaxHeight="",t.styleTransformOrigin="",t.anchor=null,t.previouslyFocused=null,t.previousAnchor=null,t.onBodyClickBound=function(){},t}return e=r,(n=[{key:"render",value:function(){var t={"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth},e={top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin};return(0,c.dy)(I(),(0,T.$)(t),(0,g.V)(e),this.onKeydown,this.registerBodyClick,this.deregisterBodyClick)}},{key:"createAdapter",value:function(){var t,e,n=this;return Object.assign(Object.assign({},(0,b.q)(this.mdcRoot)),{hasAnchor:function(){return!!n.anchor},notifyClose:function(){var t=new CustomEvent("closed",{bubbles:!0,composed:!0});n.open=!1,n.mdcRoot.dispatchEvent(t)},notifyOpen:function(){var t=new CustomEvent("opened",{bubbles:!0,composed:!0});n.open=!0,n.mdcRoot.dispatchEvent(t)},isElementInContainer:function(){return!1},isRtl:function(){return!!n.mdcRoot&&"rtl"===getComputedStyle(n.mdcRoot).direction},setTransformOrigin:function(t){n.mdcRoot&&(n.styleTransformOrigin=t)},isFocused:function(){return(0,O.WU)(n)},saveFocus:function(){var t=(0,O.Mh)(),e=t.length;e||(n.previouslyFocused=null),n.previouslyFocused=t[e-1]},restoreFocus:function(){n.previouslyFocused&&"focus"in n.previouslyFocused&&n.previouslyFocused.focus()},getInnerDimensions:function(){var t=n.mdcRoot;return t?{width:t.offsetWidth,height:t.offsetHeight}:{width:0,height:0}},getAnchorDimensions:function(){var t=n.anchor;return t?t.getBoundingClientRect():null},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){n.mdcRoot&&(n.styleLeft="left"in t?"".concat(t.left,"px"):"",n.styleRight="right"in t?"".concat(t.right,"px"):"",n.styleTop="top"in t?"".concat(t.top,"px"):"",n.styleBottom="bottom"in t?"".concat(t.bottom,"px"):"")},setMaxHeight:(t=regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.mdcRoot){t.next=3;break}return t.abrupt("return");case 3:return n.styleMaxHeight=e,t.next=6,n.updateComplete;case 6:n.styleMaxHeight="var(--mdc-menu-max-height, ".concat(e,")");case 7:case"end":return t.stop()}}),t)})),e=function(){var e=this,n=arguments;return new Promise((function(o,i){var r=t.apply(e,n);function s(t){_(r,o,i,s,c,"next",t)}function c(t){_(r,o,i,s,c,"throw",t)}s(void 0)}))},function(t){return e.apply(this,arguments)})})}},{key:"onKeydown",value:function(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}},{key:"onBodyClick",value:function(t){-1===t.composedPath().indexOf(this)&&this.close()}},{key:"registerBodyClick",value:function(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}},{key:"deregisterBodyClick",value:function(){document.body.removeEventListener("click",this.onBodyClickBound)}},{key:"close",value:function(){this.open=!1}},{key:"show",value:function(){this.open=!0}}])&&S(e.prototype,n),o&&S(e,o),r}(b.H);function F(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}([".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px))}"]);return F=function(){return t},t}i([(0,c.IO)(".mdc-menu-surface")],M.prototype,"mdcRoot",void 0),i([(0,c.IO)("slot")],M.prototype,"slotElement",void 0),i([(0,c.Cb)({type:Boolean}),(0,v.P)((function(t){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(t)}))],M.prototype,"absolute",void 0),i([(0,c.Cb)({type:Boolean})],M.prototype,"fullwidth",void 0),i([(0,c.Cb)({type:Boolean}),(0,v.P)((function(t){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setIsHoisted(t)}))],M.prototype,"fixed",void 0),i([(0,c.Cb)({type:Number}),(0,v.P)((function(t){this.mdcFoundation&&null!==this.y&&null!==t&&(this.mdcFoundation.setAbsolutePosition(t,this.y),this.mdcFoundation.setAnchorMargin({left:t,top:this.y,right:-t,bottom:this.y}))}))],M.prototype,"x",void 0),i([(0,c.Cb)({type:Number}),(0,v.P)((function(t){this.mdcFoundation&&null!==this.x&&null!==t&&(this.mdcFoundation.setAbsolutePosition(this.x,t),this.mdcFoundation.setAnchorMargin({left:this.x,top:t,right:-this.x,bottom:t}))}))],M.prototype,"y",void 0),i([(0,c.Cb)({type:Boolean}),(0,v.P)((function(t){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(t)}))],M.prototype,"quick",void 0),i([(0,c.Cb)({type:Boolean,reflect:!0}),(0,v.P)((function(t,e){this.mdcFoundation&&(t?this.mdcFoundation.open():void 0!==e&&this.mdcFoundation.close())}))],M.prototype,"open",void 0),i([(0,c.sz)(),(0,v.P)((function(t){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(t)}))],M.prototype,"bitwiseCorner",void 0),i([(0,c.Cb)({type:String}),(0,v.P)((function(t){if(this.mdcFoundation){var e="START"===t||"END"===t,n=null===this.previousMenuCorner,o=!n&&t!==this.previousMenuCorner;e&&(o||n&&"END"===t)&&(this.bitwiseCorner=this.bitwiseCorner^r.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=t)}}))],M.prototype,"menuCorner",void 0),i([(0,c.Cb)({type:String}),(0,v.P)((function(t){if(this.mdcFoundation&&t){var e=P[t];"END"===this.menuCorner&&(e^=r.RIGHT),this.bitwiseCorner=e}}))],M.prototype,"corner",void 0),i([(0,c.sz)()],M.prototype,"styleTop",void 0),i([(0,c.sz)()],M.prototype,"styleLeft",void 0),i([(0,c.sz)()],M.prototype,"styleRight",void 0),i([(0,c.sz)()],M.prototype,"styleBottom",void 0),i([(0,c.sz)()],M.prototype,"styleMaxHeight",void 0),i([(0,c.sz)()],M.prototype,"styleTransformOrigin",void 0);var B=(0,c.iv)(F());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})(t)}function k(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function D(t,e){return(D=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function L(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=H(t);if(e){var i=H(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return j(this,n)}}function j(t,e){return!e||"object"!==N(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function H(t){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var z=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&&D(t,e)}(n,t);var e=L(n);function n(){return k(this,n),e.apply(this,arguments)}return n}(M);z.styles=B,z=i([(0,c.Mo)("mwc-menu-surface")],z);var G,U={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},W={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},q={FOCUS_ROOT_INDEX:-1};!function(t){t[t.NONE=0]="NONE",t[t.LIST_ROOT=1]="LIST_ROOT",t[t.FIRST_ITEM=2]="FIRST_ITEM",t[t.LAST_ITEM=3]="LAST_ITEM"}(G||(G={}));var K=function(t,e){return(K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Q=function(){return(Q=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};var V=n(74015),X=function(t){function e(n){var o=t.call(this,Q(Q({},e.defaultAdapter),n))||this;return o.closeAnimationEndTimerId_=0,o.defaultFocusState_=G.LIST_ROOT,o}return function(t,e){function n(){this.constructor=t}K(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return U},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return W},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return q},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var e=t.key,n=t.keyCode;("Tab"===e||9===n)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var e=this,n=this.adapter.getElementIndex(t);n<0||(this.adapter.notifySelected({index:n}),this.adapter.closeSurface(),this.closeAnimationEndTimerId_=setTimeout((function(){var n=e.adapter.getElementIndex(t);n>=0&&e.adapter.isSelectableItemAtIndex(n)&&e.setSelectedIndex(n)}),m.numbers.TRANSITION_CLOSE_DURATION))},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case G.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case G.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case G.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState_=t},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex_(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter.getSelectedSiblingOfItemAtIndex(t);e>=0&&(this.adapter.removeAttributeFromElementAtIndex(e,W.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(e,U.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,U.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,W.ARIA_CHECKED_ATTR,"true")},e.prototype.setEnabled=function(t,e){this.validatedIndex_(t),e?(this.adapter.removeClassFromElementAtIndex(t,V.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,W.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,V.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,W.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex_=function(t){var e=this.adapter.getMenuItemCount();if(!(t>=0&&t<e))throw new Error("MDCMenuFoundation: No list item at specified index.")},e}(h.K);n(10333);function Y(t){return(Y="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)}function $(t,e,n,o,i,r,s){try{var c=t[r](s),a=c.value}catch(u){return void n(u)}c.done?e(a):Promise.resolve(a).then(o,i)}function J(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var r=t.apply(e,n);function s(t){$(r,o,i,s,c,"next",t)}function c(t){$(r,o,i,s,c,"throw",t)}s(void 0)}))}}function Z(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n <mwc-menu-surface\n ?hidden=","\n .anchor=","\n .open=","\n .quick=","\n .corner=","\n .x=","\n .y=","\n .absolute=","\n .fixed=","\n .fullwidth=","\n .menuCorner=",'\n class="mdc-menu mdc-menu-surface"\n @closed=',"\n @opened=","\n @keydown=",">\n <mwc-list\n rootTabbable\n .innerRole=","\n .multi=",'\n class="mdc-list"\n .itemRoles=',"\n .wrapFocus=","\n .activatable=","\n @action=",">\n <slot></slot>\n </mwc-list>\n </mwc-menu-surface>"]);return Z=function(){return t},t}function tt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function et(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function nt(t,e,n){return(nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=st(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function ot(t,e){return(ot=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function it(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=st(t);if(e){var i=st(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return rt(this,n)}}function rt(t,e){return!e||"object"!==Y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function st(t){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ct=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&&ot(t,e)}(a,t);var e,n,o,i,r,s=it(a);function a(){var t;return tt(this,a),(t=s.apply(this,arguments)).mdcFoundationClass=X,t.listElement_=null,t.anchor=null,t.open=!1,t.quick=!1,t.wrapFocus=!1,t.innerRole="menu",t.corner="TOP_START",t.x=null,t.y=null,t.absolute=!1,t.multi=!1,t.activatable=!1,t.fixed=!1,t.forceGroupSelection=!1,t.fullwidth=!1,t.menuCorner="START",t.defaultFocus="LIST_ROOT",t._listUpdateComplete=null,t}return e=a,(n=[{key:"render",value:function(){var t="menu"===this.innerRole?"menuitem":"option";return(0,c.dy)(Z(),!this.open,this.anchor,this.open,this.quick,this.corner,this.x,this.y,this.absolute,this.fixed,this.fullwidth,this.menuCorner,this.onClosed,this.onOpened,this.onKeydown,this.innerRole,this.multi,t,this.wrapFocus,this.activatable,this.onAction)}},{key:"createAdapter",value:function(){var t=this;return{addClassToElementAtIndex:function(e,n){var o=t.listElement;if(o){var i=o.items[e];i&&("mdc-menu-item--selected"===n?t.forceGroupSelection&&!i.selected&&o.toggle(e,!0):i.classList.add(n))}},removeClassFromElementAtIndex:function(e,n){var o=t.listElement;if(o){var i=o.items[e];i&&("mdc-menu-item--selected"===n?i.selected&&o.toggle(e,!1):i.classList.remove(n))}},addAttributeToElementAtIndex:function(e,n,o){var i=t.listElement;if(i){var r=i.items[e];r&&r.setAttribute(n,o)}},removeAttributeFromElementAtIndex:function(e,n){var o=t.listElement;if(o){var i=o.items[e];i&&i.removeAttribute(n)}},elementContainsClass:function(t,e){return t.classList.contains(e)},closeSurface:function(){t.open=!1},getElementIndex:function(e){var n=t.listElement;return n?n.items.indexOf(e):-1},notifySelected:function(){},getMenuItemCount:function(){var e=t.listElement;return e?e.items.length:0},focusItemAtIndex:function(e){var n=t.listElement;if(n){var o=n.items[e];o&&o.focus()}},focusListRoot:function(){t.listElement&&t.listElement.focus()},getSelectedSiblingOfItemAtIndex:function(e){var n=t.listElement;if(!n)return-1;var o=n.items[e];if(!o||!o.group)return-1;for(var i=0;i<n.items.length;i++)if(i!==e){var r=n.items[i];if(r.selected&&r.group===o.group)return i}return-1},isSelectableItemAtIndex:function(e){var n=t.listElement;if(!n)return!1;var o=n.items[e];return!!o&&o.hasAttribute("group")}}}},{key:"onKeydown",value:function(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}},{key:"onAction",value:function(t){var e=this.listElement;if(this.mdcFoundation&&e){var n=t.detail.index,o=e.items[n];o&&this.mdcFoundation.handleItemAction(o)}}},{key:"onOpened",value:function(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}},{key:"onClosed",value:function(){this.open=!1}},{key:"_getUpdateComplete",value:(r=J(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._listUpdateComplete;case 2:return t.next=4,nt(st(a.prototype),"_getUpdateComplete",this).call(this);case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"firstUpdated",value:(i=J(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(nt(st(a.prototype),"firstUpdated",this).call(this),!(e=this.listElement)){t.next=6;break}return this._listUpdateComplete=e.updateComplete,t.next=6,this._listUpdateComplete;case 6:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"select",value:function(t){var e=this.listElement;e&&e.select(t)}},{key:"close",value:function(){this.open=!1}},{key:"show",value:function(){this.open=!0}},{key:"getFocusedItemIndex",value:function(){var t=this.listElement;return t?t.getFocusedItemIndex():-1}},{key:"focusItemAtIndex",value:function(t){var e=this.listElement;e&&e.focusItemAtIndex(t)}},{key:"layout",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.listElement;e&&e.layout(t)}},{key:"listElement",get:function(){return this.listElement_||(this.listElement_=this.renderRoot.querySelector("mwc-list")),this.listElement_}},{key:"items",get:function(){var t=this.listElement;return t?t.items:[]}},{key:"index",get:function(){var t=this.listElement;return t?t.index:-1}},{key:"selected",get:function(){var t=this.listElement;return t?t.selected:null}}])&&et(e.prototype,n),o&&et(e,o),a}(b.H);function at(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["mwc-list ::slotted([mwc-list-item]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}mwc-list{max-width:var(--mdc-menu-max-width, auto);min-width:var(--mdc-menu-min-width, auto)}"]);return at=function(){return t},t}i([(0,c.IO)(".mdc-menu")],ct.prototype,"mdcRoot",void 0),i([(0,c.IO)("slot")],ct.prototype,"slotElement",void 0),i([(0,c.Cb)({type:Object})],ct.prototype,"anchor",void 0),i([(0,c.Cb)({type:Boolean,reflect:!0})],ct.prototype,"open",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"quick",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"wrapFocus",void 0),i([(0,c.Cb)({type:String})],ct.prototype,"innerRole",void 0),i([(0,c.Cb)({type:String})],ct.prototype,"corner",void 0),i([(0,c.Cb)({type:Number})],ct.prototype,"x",void 0),i([(0,c.Cb)({type:Number})],ct.prototype,"y",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"absolute",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"multi",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"activatable",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"fixed",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"forceGroupSelection",void 0),i([(0,c.Cb)({type:Boolean})],ct.prototype,"fullwidth",void 0),i([(0,c.Cb)({type:String})],ct.prototype,"menuCorner",void 0),i([(0,c.Cb)({type:String}),(0,v.P)((function(t){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(G[t])}))],ct.prototype,"defaultFocus",void 0);var ut=(0,c.iv)(at());function lt(t){return(lt="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)}function ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(t,e){return(dt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pt(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=mt(t);if(e){var i=mt(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ht(this,n)}}function ht(t,e){return!e||"object"!==lt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function mt(t){return(mt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yt=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&&dt(t,e)}(n,t);var e=pt(n);function n(){return ft(this,n),e.apply(this,arguments)}return n}(ct);yt.styles=ut,yt=i([(0,c.Mo)("mwc-menu")],yt)}}]);
//# sourceMappingURL=chunk.560835c5bb23c91d00f8.js.map