var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(c,d,a){if(null==c)throw new TypeError("The 'this' value for String.prototype."+a+" must not be null or undefined");if(d instanceof RegExp)throw new TypeError("First argument to String.prototype."+a+" must not be a regular expression");return c+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,a){c!=Array.prototype&&c!=Object.prototype&&(c[d]=a.value)};$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(c,d,a,b){if(d){a=$jscomp.global;c=c.split(".");for(b=0;b<c.length-1;b++){var e=c[b];e in a||(a[e]={});a=a[e]}c=c[c.length-1];b=a[c];d=d(b);d!=b&&null!=d&&$jscomp.defineProperty(a,c,{configurable:!0,writable:!0,value:d})}};
$jscomp.polyfill("String.prototype.startsWith",function(c){return c?c:function(c,a){var b=$jscomp.checkStringArgs(this,c,"startsWith");c+="";var e=b.length,d=c.length;a=Math.max(0,Math.min(a|0,b.length));for(var f=0;f<d&&a<e;)if(b[a++]!=c[f++])return!1;return f>=d}},"es6","es3");
(function(){function c(a){zWatch.listen({onSize:a});var b;if(b=a._upload)a._uplder=new zul.Upload(a,null,b)}function d(a){var b;if(b=a._uplder)zWatch.unlisten({onSize:a}),a._uplder=null,b.destroy()}zul.wgt.Toolbarbutton=zk.$extends(zul.LabelImageWidget,{_orient:"horizontal",_dir:"normal",_mode:"default",_checked:!1,$define:{mode:function(a){this.rerender()},checked:function(a){if(this.desktop&&"toggle"==this._mode)jq(this.$n())[a?"addClass":"removeClass"](this.$s("checked"))},disabled:[function(a,
b){b&&b.adbs?this._adbs=!0:b&&void 0!==b.adbs||(this._adbs=!1);if(!a)if(this._adbs)this._adbs=!1;else if(b&&!1===b.adbs)return this._disabled;return a},function(a,b){var e=this;b=function(){e.desktop&&(jq(e.$n()).attr("disabled",a),e._upload&&(a?d(e):c(e)))};"submit"==this._type?setTimeout(b,50):b()}],href:null,target:null,dir:_zkf=function(){this.updateDomContent_()},orient:_zkf,autodisable:null,upload:function(a){this.$n()&&(d(this),a&&"false"!=a&&!this._disabled&&c(this))}},getTextNode:function(){return this.$n("cnt")},
bind_:function(){this.$supers(zul.wgt.Toolbarbutton,"bind_",arguments);if(!this._disabled){var a=this.$n();this.domListen_(a,"onFocus","doFocus_").domListen_(a,"onBlur","doBlur_")}!this._disabled&&this._upload&&c(this)},unbind_:function(){d(this);var a=this.$n();this.domUnlisten_(a,"onFocus","doFocus_").domUnlisten_(a,"onBlur","doBlur_");this.$supers(zul.wgt.Toolbarbutton,"unbind_",arguments)},domContent_:function(){var a=zUtl.encodeXML(this.getLabel()),b=this.getImage(),c=this.domIcon_();if(!b&&
!c)return a;b=b?'<img src="'+b+'" align="absmiddle" />'+(c?" "+c:""):c;c=a?"vertical"==this.getOrient()?"<br/>":"&nbsp;":"";return"reverse"==this.getDir()?a+c+b:b+c+a},domClass_:function(a){var b=this.$supers("domClass_",arguments),c=this.getZclass(),d=!a||!a.zclass;"toggle"==this._mode&&this._checked&&d&&c&&(b+=" "+this.$s("checked"));return b},domAttrs_:function(a){var b=this.$supers("domAttrs_",arguments);this._disabled&&(b+=' disabled="disabled"');return b},onSize:function(){this._uplder&&this._uplder.sync()},
doClick_:function(a){if(!this._disabled&&(this._upload?(!zk.ie||10<zk.ie)&&this._uplder.openFileDialog():zul.wgt.ADBS.autodisable(this),this.fireX(a),!a.stopped)){var b=this._href,c=b?b.toLowerCase().startsWith("mailto:"):!1;b&&(c?(b=jq.newFrame("mailtoFrame",b,null),jq(b).remove()):zUtl.go(b,{target:this._target||(a.data.ctrlKey?"_blank":"")}));this.$super("doClick_",a,!0);"toggle"==this._mode&&(this.setChecked(!this.isChecked()),this.fire("onCheck",this.isChecked()))}},focus_:function(a){if(void 0!=
this._tabindex||this._href||this._upload){var b=this,c=this.$n();zk.afterAnimate(function(){try{c.focus(),zk.currentFocus=b,zjq.fixInput(c)}catch(g){zk.debugLog(g.message||g)}},a);return!0}return!1}})})();
