text: /*!
   * OpenUI5
   * (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(['sap/ui/thirdparty/jquery','./library','sap/ui/core/Control','./RadioButtonRenderer','sap/ui/core/library','sap/ui/Device',"sap/ui/dom/jquery/Selectors"],function(q,l,C,R,c,D){"use strict";var T=c.TextDirection;var V=c.ValueState;var a=C.extend("sap.ui.commons.RadioButton",{metadata:{interfaces:["sap.ui.core.IFormContent"],library:"sap.ui.commons",properties:{text:{type:"string",group:"Data",defaultValue:null},enabled:{type:"boolean",group:"Behavior",defaultValue:true},editable:{type:"boolean",group:"Behavior",defaultValue:true},selected:{type:"boolean",group:"Data",defaultValue:false},valueState:{type:"sap.ui.core.ValueState",group:"Data",defaultValue:V.None},width:{type:"sap.ui.core.CSSSize",group:"Dimension",defaultValue:null},textDirection:{type:"sap.ui.core.TextDirection",group:"Appearance",defaultValue:T.Inherit},groupName:{type:"string",group:"Behavior",defaultValue:'sapUiRbDefaultGroup'},key:{type:"string",group:"Data",defaultValue:null}},associations:{ariaDescribedBy:{type:"sap.ui.core.Control",multiple:true,singularName:"ariaDescribedBy"},ariaLabelledBy:{type:"sap.ui.core.Control",multiple:true,singularName:"ariaLabelledBy"}},events:{select:{}}}});a.prototype.init=function(){this._changeGroupName(this.getGroupName());};a.prototype.exit=function(){var g=this.getGroupName(),G=this._groupNames[g];G.splice(G.indexOf(this),1);};a.prototype.onclick=function(e){if(this.getEnabled()&&e.target.id==(this.getId()+"-RB")){this.focus();}if(D.browser.msie&&(!this.getEnabled())){this.$().attr("tabindex",0).toggleClass("sapUiRbFoc");}this.userSelect(e);};a.prototype._groupNames={};a.prototype.onsapspace=function(e){if(this.getEnabled()&&e.target.id==(this.getId()+"-RB")){this.focus();}this.userSelect(e);};a.prototype.onsaptabnext=function(e){if(D.browser.msie){this.bTabPressed=true;var t=this;window.setTimeout(function(){t.bTabPressed=false;},100);}};a.prototype.onfocusin=function(e){if(this.getEnabled()&&e.target.id==(this.getId()+"-RB")){if(this.bTabPressed){var f=q(":sapFocusable"),F=false;for(var i=0;i<f.length;i++){if(F&&f[i].parentNode!=e.target&&f[i].tabIndex!="-1"){f[i].focus();e.preventDefault();break;}if(e.target==f[i]){F=true;}}}else{this.focus();}}};a.prototype.onfocusout=function(e){if(D.browser.msie&&(!this.getEnabled())){this.$().attr("tabindex",-1).toggleClass("sapUiRbFoc");}};a.prototype.userSelect=function(e){if(this.getEnabled()&&this.getEditable()){var s=this.getSelected();if(!s){this.setSelected(true);this.fireSelect({});}}else{e.preventDefault();}};a.prototype.setSelected=function(s){var o,S=this.getSelected(),g=this.getGroupName(),b=this._groupNames[g],L=b&&b.length;this.setProperty("selected",s,true);if(s&&g&&g!==""){for(var i=0;i<L;i++){o=b[i];if(o instanceof a&&o!==this&&o.getSelected()){o.setSelected(false);}}}if((S!=s)&&this.getDomRef()&&this.getRenderer().setSelected){this.getRenderer().setSelected(this,s);}return this;};a.prototype.setGroupName=function(g){g=this.validateProperty("groupName",g);this._changeGroupName(g,this.getGroupName());return this.setProperty("groupName",g,false);};a.prototype.getTooltipDomRefs=function(){return this.getDomRef().children;};a.prototype._changeGroupName=function(n,o){var N=this._groupNames[n],O=this._groupNames[o];if(!N){N=this._groupNames[n]=[];}if(N.indexOf(this)===-1){N.push(this);}if(O&&O.indexOf(this)!==-1){O.splice(O.indexOf(this),1);}};return a;});
  