varc,f=0,u=Array.prototype.slice;x.cleanData=(c=x.cleanData,function(t){for(vare,i,n=0;null!=(i=t[n]);n++)try{(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove")}catch(t){}c(t)}),x.widget=function(t,i,e){varn,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);returne||(e=i,i=x.Widget),x.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr[":"][a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this._createWidget)returnnewo(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=newi).options=x.widget.extend({},s.options),x.each(e,function(e,n){functiono(){returni.prototype[e].apply(this,arguments)}functions(t){returni.prototype[e].apply(this,t)}x.isFunction(n)?r[e]=function(){vart,e=this._super,i=this._superApply;returnthis._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=n}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){vari=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),deleten._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(vare,i,n=u.call(arguments,1),o=0,s=n.length;o<s;o++)for(einn[o])i=n[o][e],n[o].hasOwnProperty(e)&&void0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);returnt},x.widget.bridge=function(s,e){varr=e.prototype.widgetFullName||s;x.fn[s]=function(i){vart="string"==typeofi,n=u.call(arguments,1),o=this;returnt?this.length||"instance"!==i?this.each(function(){vart,e=x.data(this,r);return"instance"===i?(o=e,!1):e?x.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,n))!==e&&void0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void0:x.error("no such method '"+i+"' for "+s+" widget instance"):x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){vart=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,newe(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=f++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){vari=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){returnthis.element},option:function(t,e){vari,n,o,s=t;if(0===arguments.length)returnx.widget.extend({},this.options);if("string"==typeoft)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)returnvoid0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)returnvoid0===this.options[t]?null:this.options[t];s[t]=e}returnthis._setOptions(s),t