var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(c,e,a){if(null==c)throw new TypeError("The 'this' value for String.prototype."+a+" must not be null or undefined");if(e 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.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,e,a){if(c==Array.prototype||c==Object.prototype)return c;c[e]=a.value;return c};
$jscomp.getGlobal=function(c){c=["object"==typeof globalThis&&globalThis,c,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<c.length;++e){var a=c[e];if(a&&a.Math==Math)return a}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(c,e){var a=$jscomp.propertyToPolyfillSymbol[e];if(null==a)return c[e];a=c[a];return void 0!==a?a:c[e]};$jscomp.polyfill=function(c,e,a,b){e&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(c,e,a,b):$jscomp.polyfillUnisolated(c,e,a,b))};
$jscomp.polyfillUnisolated=function(c,e,a,b){a=$jscomp.global;c=c.split(".");for(b=0;b<c.length-1;b++){var d=c[b];if(!(d in a))return;a=a[d]}c=c[c.length-1];b=a[c];e=e(b);e!=b&&null!=e&&$jscomp.defineProperty(a,c,{configurable:!0,writable:!0,value:e})};
$jscomp.polyfillIsolated=function(c,e,a,b){var d=c.split(".");c=1===d.length;b=d[0];b=!c&&b in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<d.length-1;f++){var g=d[f];if(!(g in b))return;b=b[g]}d=d[d.length-1];a=$jscomp.IS_SYMBOL_NATIVE&&"es6"===a?b[d]:null;e=e(a);null!=e&&(c?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:e}):e!==a&&(void 0===$jscomp.propertyToPolyfillSymbol[d]&&(a=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+a+"$"+d),$jscomp.defineProperty(b,$jscomp.propertyToPolyfillSymbol[d],{configurable:!0,writable:!0,value:e})))};$jscomp.polyfill("String.prototype.startsWith",function(c){return c?c:function(e,a){var b=$jscomp.checkStringArgs(this,e,"startsWith");e+="";var d=b.length,f=e.length;a=Math.max(0,Math.min(a|0,b.length));for(var g=0;g<f&&a<d;)if(b[a++]!=e[g++])return!1;return g>=f}},"es6","es3");
(function(){function c(a){zWatch.listen({onShow:a});var b;if(b=a._upload)a._uplder=new zul.Upload(a,a._getUploadRef(),b)}function e(a){var b;if(b=a._uplder)zWatch.unlisten({onShow:a}),a._uplder=null,b.destroy()}(zul.menu.Menuitem=zk.$extends(zul.LabelImageWidget,{_value:"",$define:{checkmark:_zkf=function(){this.rerender()},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){this.rerender(b&&b.skip?-1:0)}],href:_zkf,value:null,checked:function(a){a&&(this._checkmark=a);var b=this.$n();!b||this.isTopmost()||this.getImage()||(b=jq(b),b[a?"addClass":"removeClass"](this.$s("checked")),this._checkmark&&b.addClass(this.$s("checkable")))},autocheck:null,target:function(a){if(a=this.$n("a"))this.isTopmost()&&(a=a.parentNode),a.target=this._target},autodisable:null,upload:function(a){this.$n()&&(e(this),a&&"false"!=a&&c(this))}},isTopmost:function(){return this._topmost},beforeParentChanged_:function(a){this._topmost=
a&&!a.$instanceof(zul.menu.Menupopup);this.$supers("beforeParentChanged_",arguments)},domClass_:function(a){var b=this.$supers("domClass_",arguments);if(!a||!a.zclass){var d=this.isDisabled()?this.$s("disabled"):"";d&&(b+=(b?" ":"")+d);(d=!this.getImage()&&this.isCheckmark()?this.$s("checkable")+(this.isChecked()?" "+this.$s("checked"):""):"")&&(b+=(b?" ":"")+d)}return b},domContent_:function(){var a='<span class="'+this.$s("text")+'">'+zUtl.encodeXML(this.getLabel())+"</span>",b='<i class="'+this.$s("icon")+
' z-icon-check" aria-hidden="true"></i>',d=this.getImage(),f=this.domIcon_();d=d?'<img src="'+d+'" class="'+this.$s("image")+'" align="absmiddle" alt="" aria-hidden="true" />'+(f?" "+f:""):f?f:"<img "+(this.isTopmost()?'style="display:none"':"")+' src="data:image/png;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="'+this.$s("image")+'" align="absmiddle" alt="" aria-hidden="true" />';return d+(this.isAutocheck()||this.isCheckmark()?b:"")+a},getMenubar:function(){for(var a=
this.parent;a;a=a.parent)if(a.$instanceof(zul.menu.Menubar))return a;return null},_getRootMenu:function(){for(var a=this.parent;a;a=a.parent)if(a.$instanceof(zul.menu.Menu)&&a.isTopmost())return a;return null},bind_:function(){this.$supers(zul.menu.Menuitem,"bind_",arguments);if(!this.isDisabled()){var a=this.$n("a");this.isTopmost()&&this.domListen_(a,"onFocus","doFocus_").domListen_(a,"onBlur","doBlur_");this.domListen_(a,"onMouseEnter").domListen_(a,"onMouseLeave");this._upload&&c(this)}},unbind_:function(){if(!this.isDisabled()){this._upload&&
e(this);var a=this.$n("a");this.isTopmost()&&this.domUnlisten_(a,"onFocus","doFocus_").domUnlisten_(a,"onBlur","doBlur_");this.domUnlisten_(a,"onMouseEnter").domUnlisten_(a,"onMouseLeave")}this.$supers(zul.menu.Menuitem,"unbind_",arguments)},doClick_:function(a){if(this._disabled)a.stop();else if(this._canActivate(a)){if(!this._upload)zul.wgt.ADBS.autodisable(this);else if(!zk.ie||10<zk.ie)zk.chrome&&"file"==a.domTarget.type||this._uplder.openFileDialog();var b=this.isTopmost(),d=this.$n("a");d.href.startsWith("javascript:")?
(this.isAutocheck()&&(this.setChecked(!this.isChecked()),this.fire("onCheck",this.isChecked())),this.fireX(a),this._upload||a.stop()):d.href.toLowerCase().startsWith("mailto:")?(d=jq.newFrame("mailtoFrame",d.href,null),jq(d).remove(),a.stop()):(11>zk.ie&&b&&this.$n().id!=d.id&&zUtl.go(d.href,{target:d.target}),zk.gecko&&b&&this.$n().id!=d.id&&(zUtl.go(d.href,{target:d.target}),a.stop()));if(!b){var f=null;for(b=this.parent;b;b=b.parent)if(b.$instanceof(zul.menu.Menupopup)){if(!b.isOpen()||this._uplder||
b._keepOpen)break;this._updateHoverImage();f=b._fakeParent;b.close({sendOnOpen:!0})}else if(b.$instanceof(zul.menu.Menu))b._updateHoverImage();else break;this.isRealVisible()||((b=this._getRootMenu())?b.focus():f&&(zk.ff?setTimeout(function(){var h=zk.currentFocus;h&&h.isRealVisible()||f.focus()},200):f.focus()))}var g;zk.webkit&&(g=this.getMenubar())&&g._autodrop&&(g._noFloatUp=!0);this.$super("doClick_",a,!0)}},doKeyDown_:function(a){if(this.isTopmost()&&!this._disabled){var b=a.key;if(" "==b||
"Enter"==b)a.stop(),this.doClick_(new zk.Event(this,"onClick",{}))}this.$super("doKeyDown_",a)},_canActivate:function(a){return!this.isDisabled()&&(11>!zk.ie||!this.isTopmost()||this._uplder||jq.isAncestor(this.$n("a"),a.domTarget))},_getUploadRef:function(){return this.$n("a")},_doMouseEnter:function(a){a=this.isTopmost();(zul.menu._nOpen||a)&&zWatch.fire("onFloatUp",this);a||this._disabled||(this.parent&&this.parent.removeActive_(),this.$class._addActive(this))},_doMouseLeave:function(a){this.isTopmost()||
this._disabled||this.$class._rmActive(this)},deferRedrawHTML_:function(a){var b=this.isTopmost()?"td":"li";a.push("<",b,this.domAttrs_({domClass:1}),' class="z-renderdefer"></',b,">")},getImageNode:function(){!this._eimg&&(this._image||this._hoverImage)&&this.$n()&&(this._eimg=this.$n("a").firstChild);return this._eimg},getAnchor_:function(){return this.$n("a")},focus_:function(a){return zk(this.getAnchor_()).focus(a)?!0:this.$supers("focus_",arguments)}},{_isActive:function(a){return jq(a.$n()).hasClass(a.$s("hover"))},
_addActive:function(a){var b=a.isTopmost();jq(a.$n()).addClass(a.$s("hover"));b||((b=a.parent)&&b.addActive_(a),b.parent.$instanceof(zul.menu.Menu)&&this._addActive(b.parent))},_rmActive:function(a){return jq(a.$n()).removeClass(a.$s("hover"))}})).prototype.onShow=function(){this._uplder&&this._uplder.sync()}})();
