YUI.add("button-core",function(o,e){var t=o.ClassNameManager.getClassName,n=o.AttributeCore;function r(e){this.initializer(e)}o.mix(r.prototype={TEMPLATE:"<button/>",constructor:r,initializer:function(e){this._initNode(e),this._initAttributes(e),this._renderUI(e)},_initNode:function(e){e.host?this._host=o.one(e.host):this._host=o.Node.create(this.TEMPLATE)},_initAttributes:function(e){n.call(this,r.ATTRS,e)},_renderUI:function(){var e=this.getNode(),t=e.get("nodeName").toLowerCase();e.addClass(r.CLASS_NAMES.BUTTON),"button"!==t&&"input"!==t&&e.set("role","button")},enable:function(){this.set("disabled",!1)},disable:function(){this.set("disabled",!0)},getNode:function(){return this._host||(this._host=this.get("boundingBox")),this._host},_getLabel:function(){var e=this.getNode();return r._getTextLabelFromNode(e)},_getLabelHTML:function(){var e=this.getNode();return r._getHTMLFromNode(e)},_setLabel:function(e,t,n){e=o.Escape.html(e);return n&&"internal"===n.src||this.set("labelHTML",e,{src:"internal"}),e},_setLabelHTML:function(e,t,n){var o=this.getNode(),a=r._getLabelNodeFromParent(o);return"input"===o.get("nodeName").toLowerCase()?a.set("value",e):a.setHTML(e),n&&"internal"===n.src||this.set("label",e,{src:"internal"}),e},_setDisabled:function(e){var t=this.getNode();return t.getDOMNode().disabled=e,t.toggleClass(r.CLASS_NAMES.DISABLED,e),e}},n.prototype),r.ATTRS={label:{setter:"_setLabel",getter:"_getLabel",lazyAdd:!1},labelHTML:{setter:"_setLabelHTML",getter:"_getLabelHTML",lazyAdd:!1},disabled:{value:!1,setter:"_setDisabled",lazyAdd:!1}},r.NAME="button",r.CLASS_NAMES={BUTTON:t("button"),DISABLED:t("button","disabled"),SELECTED:t("button","selected"),LABEL:t("button","label")},r.ARIA_STATES={PRESSED:"aria-pressed",CHECKED:"aria-checked"},r.ARIA_ROLES={BUTTON:"button",CHECKBOX:"checkbox",TOGGLE:"toggle"},r._getLabelNodeFromParent=function(e){return e.one("."+r.CLASS_NAMES.LABEL)||e},r._getTextLabelFromNode=function(e){var e=r._getLabelNodeFromParent(e),t=e.get("nodeName").toLowerCase();return e.get("input"===t?"value":"text")},r._getHTMLFromNode=function(e){return r._getLabelNodeFromParent(e).getHTML()},r._getDisabledFromNode=function(e){return e.get("disabled")},o.ButtonCore=r},"patched-v3.18.4",{requires:["attribute-core","classnamemanager","node-base","escape"]});