text: define(["exports","../../../@polymer/polymer/polymer-element.js","../../../@polymer/polymer/lib/legacy/class.js","./material-progress-behavior.js"],function(_exports,_polymerElement,_class,_materialProgressBehavior){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.MaterialProgressBars=void 0;function _templateObject_8a8001c0679e11eaa25e79cdef13391f(){var data=babelHelpers.taggedTemplateLiteral(["\n      <style>\n        #barsContainer {\n          overflow: hidden;\n          background-color: var(\n            --material-progress-bars-background-color,\n            #e0e0e0\n          );\n          border-radius: calc(var(--material-progress-bar-height) / 2);\n          min-width: var(--material-progress-bar-height);\n          height: var(--material-progress-bar-height);\n          @apply --layout;\n          @apply --material-progress-bars-style;\n        }\n        :host > #barsContainer > ::content > .bar {\n          margin-left: calc(-var(--material-progress-bar-height) / 2);\n          border-radius: 0 calc(var(--material-progress-bar-height) / 2)\n            calc(var(--material-progress-bar-height) / 2) 0;\n        }\n        :host([animated]) > #barsContainer > ::content > .entry {\n          -webkit-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          -ms-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          -moz-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          -o-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n        }\n        :host > #barsContainer > ::content > * > span {\n          margin: 0 calc(var(--material-progress-bar-height) * 1 / 3) 0\n            calc(var(--material-progress-bar-height) * 5 / 6);\n        }\n      </style>\n      <div id=\"barsContainer\">\n        <slot id=\"content\" name=\".bar[data-value]\"></slot>\n      </div>\n      <div class=\"legend\" hidden$=\"[[_legendNeeded]]\">\n        <template is=\"dom-repeat\" items=\"[[_legendItems]]\" as=\"l\">\n          <span style$=\"color: [[l.color]];\">[[l.label]]</span>\n        </template>\n      </div>\n    "],["\n      <style>\n        #barsContainer {\n          overflow: hidden;\n          background-color: var(\n            --material-progress-bars-background-color,\n            #e0e0e0\n          );\n          border-radius: calc(var(--material-progress-bar-height) / 2);\n          min-width: var(--material-progress-bar-height);\n          height: var(--material-progress-bar-height);\n          @apply --layout;\n          @apply --material-progress-bars-style;\n        }\n        :host > #barsContainer > ::content > .bar {\n          margin-left: calc(-var(--material-progress-bar-height) / 2);\n          border-radius: 0 calc(var(--material-progress-bar-height) / 2)\n            calc(var(--material-progress-bar-height) / 2) 0;\n        }\n        :host([animated]) > #barsContainer > ::content > .entry {\n          -webkit-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          -ms-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          -moz-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          -o-transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n          transition: width 850ms cubic-bezier(0.4, 0, 0.2, 1);\n        }\n        :host > #barsContainer > ::content > * > span {\n          margin: 0 calc(var(--material-progress-bar-height) * 1 / 3) 0\n            calc(var(--material-progress-bar-height) * 5 / 6);\n        }\n      </style>\n      <div id=\"barsContainer\">\n        <slot id=\"content\" name=\".bar[data-value]\"></slot>\n      </div>\n      <div class=\"legend\" hidden\\$=\"[[_legendNeeded]]\">\n        <template is=\"dom-repeat\" items=\"[[_legendItems]]\" as=\"l\">\n          <span style\\$=\"color: [[l.color]];\">[[l.label]]</span>\n        </template>\n      </div>\n    "]);_templateObject_8a8001c0679e11eaa25e79cdef13391f=function _templateObject_8a8001c0679e11eaa25e79cdef13391f(){return data};return data}var MaterialProgressBars=/*#__PURE__*/function(_mixinBehaviors){babelHelpers.inherits(MaterialProgressBars,_mixinBehaviors);function MaterialProgressBars(){babelHelpers.classCallCheck(this,MaterialProgressBars);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(MaterialProgressBars).apply(this,arguments))}babelHelpers.createClass(MaterialProgressBars,[{key:"_getWidthForBar",value:function _getWidthForBar(barValue,barValuesSum,maxBarValue,barHeight){var realMax=Math.max(barValuesSum,this.max),width=(0<realMax?Math.floor(1e4*(barValue/realMax))/100:"0")+"%",negativeMargin=barHeight/2;return"calc("+width+" + "+negativeMargin+"px"+")"}}],[{key:"template",get:function get(){return(0,_polymerElement.html)(_templateObject_8a8001c0679e11eaa25e79cdef13391f())}},{key:"tag",get:function get(){return"material-progress-bars"}},{key:"properties",get:function get(){return{/**
         * Maximum value represented by all progress bars.
         * Bars will be scaled according to their `data-value` attribute
         * and this maximum.
         * Note that, if the sum of all the bars' values are superior to this
         * `max`
         * @customElement max, it will override it.
         */max:{type:Number,value:100,observer:"_refresh"}}}}]);return MaterialProgressBars}((0,_class.mixinBehaviors)([MaterialProgressBehaviorImpl],_polymerElement.PolymerElement));_exports.MaterialProgressBars=MaterialProgressBars;window.customElements.define(MaterialProgressBars.tag,MaterialProgressBars)});