text: define(["../polymer/polymer-legacy.js","../iron-a11y-keys-behavior/iron-a11y-keys-behavior.js","../iron-behaviors/iron-control-state.js","../iron-overlay-behavior/iron-overlay-behavior.js","../neon-animation/neon-animation-runner-behavior.js","../polymer/lib/legacy/polymer-fn.js","../polymer/lib/legacy/polymer.dom.js","../polymer/lib/utils/html-tag.js"],function(_polymerLegacy,_ironA11yKeysBehavior,_ironControlState,_ironOverlayBehavior,_neonAnimationRunnerBehavior,_polymerFn,_polymerDom,_htmlTag){"use strict";function _templateObject_e0bcf98056d311e99e8143b72aec9f54(){var data=babelHelpers.taggedTemplateLiteral(["\n    <style>\n      :host {\n        position: fixed;\n      }\n\n      #contentWrapper ::slotted(*) {\n        overflow: auto;\n      }\n\n      #contentWrapper.animating ::slotted(*) {\n        overflow: hidden;\n        pointer-events: none;\n      }\n    </style>\n\n    <div id=\"contentWrapper\">\n      <slot id=\"content\" name=\"dropdown-content\"></slot>\n    </div>\n"]);_templateObject_e0bcf98056d311e99e8143b72aec9f54=function(){return data};return data}(0,_polymerFn.Polymer)({_template:(0,_htmlTag.html)(_templateObject_e0bcf98056d311e99e8143b72aec9f54()),is:"iron-dropdown",behaviors:[_ironControlState.IronControlState,_ironA11yKeysBehavior.IronA11yKeysBehavior,_ironOverlayBehavior.IronOverlayBehavior,_neonAnimationRunnerBehavior.NeonAnimationRunnerBehavior],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var nodes=(0,_polymerDom.dom)(this.$.content).getDistributedNodes(),i=0,l=nodes.length;i<l;i++){if(nodes[i].nodeType===Node.ELEMENT_NODE){return nodes[i]}}},ready:function ready(){if(!this.scrollAction){this.scrollAction=this.allowOutsideScroll?"refit":"lock"}this._readied=!0},attached:function attached(){if(!this.sizingTarget||this.sizingTarget===this){this.sizingTarget=this.containedElement||this}},detached:function detached(){this.cancelAnimation()},_openedChanged:function _openedChanged(){if(this.opened&&this.disabled){this.cancel()}else{this.cancelAnimation();this._updateAnimationConfig();_ironOverlayBehavior.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments)}},_renderOpened:function _renderOpened(){if(!this.noAnimations&&this.animationConfig.open){this.$.contentWrapper.classList.add("animating");this.playAnimation("open")}else{_ironOverlayBehavior.IronOverlayBehaviorImpl._renderOpened.apply(this,arguments)}},_renderClosed:function _renderClosed(){if(!this.noAnimations&&this.animationConfig.close){this.$.contentWrapper.classList.add("animating");this.playAnimation("close")}else{_ironOverlayBehavior.IronOverlayBehaviorImpl._renderClosed.apply(this,arguments)}},_onNeonAnimationFinish:function _onNeonAnimationFinish(){this.$.contentWrapper.classList.remove("animating");if(this.opened){this._finishRenderOpened()}else{this._finishRenderClosed()}},_updateAnimationConfig:function _updateAnimationConfig(){for(var animationNode=this.containedElement,animations=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),i=0;i<animations.length;i++){animations[i].node=animationNode}this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},_updateOverlayPosition:function _updateOverlayPosition(){if(this.isAttached){this.notifyResize()}},_allowOutsideScrollChanged:function _allowOutsideScrollChanged(allowOutsideScroll){if(!this._readied){return}if(!allowOutsideScroll){this.scrollAction="lock"}else if(!this.scrollAction||"lock"===this.scrollAction){this.scrollAction="refit"}},_applyFocus:function _applyFocus(){var focusTarget=this.focusTarget||this.containedElement;if(focusTarget&&this.opened&&!this.noAutoFocus){focusTarget.focus()}else{_ironOverlayBehavior.IronOverlayBehaviorImpl._applyFocus.apply(this,arguments)}}})});