!function(h){h.jqx.jqxWidget("jqxPasswordInput","",{}),h.extend(h.jqx._jqxPasswordInput.prototype,{defineInstance:function(){var e={width:null,height:null,disabled:!1,rtl:!1,placeHolder:null,showStrength:!1,showStrengthPosition:"right",maxLength:null,minLength:null,showPasswordIcon:!0,strengthTypeRenderer:null,passwordStrength:null,changeType:null,hint:!0,localization:{passwordStrengthString:"Password strength",tooShort:"Too short",weak:"Weak",fair:"Fair",good:"Good",strong:"Strong",showPasswordString:"Show Password"},strengthColors:{tooShort:"rgb(170, 0, 51)",weak:"rgb(170, 0, 51)",fair:"rgb(255, 204, 51)",good:"rgb(45, 152, 243)",strong:"rgb(118, 194, 97)"}};return this===h.jqx._jqxPasswordInput.prototype||h.extend(!0,this,e),e},createInstance:function(){var e=this;e._inDOM=document.body.contains(e.element),e.render()},render:function(){var t=this,e=h.jqx.browser.browser,i=h.jqx.browser.version;this._browserCheck="msie"!=e||"7.0"!=i&&"8.0"!=i,this.widgetID=t.element.id;var s,n,o,r,l;if("password"!=this.element.getAttribute("type"))throw"Invalid input type. Please set the type attribute of the input element to password.";this.input=this.element,t.isMaterialized()&&((s=h("
")).addClass(t.toThemeProperty("jqx-input-group")),this.host.after(s),n=this.element,o=this.host.data(),s.append(n),r=h(""),s.append(l),l.addClass(t.toThemeProperty("jqx-input-bar")),s[0].id=this.element.id,this.element.removeAttribute("id"),s[0].style.cssText=this.element.style.cssText,t.input=t.element,this.element.style.cssText="",this.bar=l,this.label=r,this.host=s,this.element=s[0],this.host.data(o),(t=this).template&&(t.bar.addClass(t.toThemeProperty("jqx-"+t.template)),t.label.addClass(t.toThemeProperty("jqx-"+t.template)))),t._hidden=!0,t._setTheme(),t._setAttributes(),t._showPassword(),t._showStrength(),h.jqx.utilities.resize(this.host,function(){if(!t._inDOM){var e=t.element.parentNode;return t.element.nextSibling?e.insertBefore(t.icon,t.element.nextSibling):e.appendChild(t.icon),void(t._inDOM=!0)}t.element!==document.activeElement&&!t.isMaterialized()||(t._positionIcon(),t.showStrength&&t.host.jqxTooltip("close"))})},refresh:function(e){var t=this;e||(t.removeHandler(t.host,"change.passwordinput"+t.widgetID),t.removeHandler(t.host,"focus.passwordinput"+t.widgetID),t.removeHandler(t.host,"blur.passwordinput"+t.widgetID),t.removeHandler(t.host,"click.passwordinput"+t.widgetID),t.removeHandler(t.host,"keyup.passwordinput"+t.widgetID),t.removeHandler(t.icon,"mousedown.passwordinput"+t.widgetID),t.removeHandler(h(document),"mouseup.passwordinput"+t.widgetID),t.removeHandler(h(document),"mousedown.passwordinput"+t.widgetID),t._setAttributes(),t._setTheme(),t._showPassword(),t._showStrength())},val:function(e){var t=this,i=t.input.value,s="placeholder"in t.input;if(h.isEmptyObject(e)&&""!==e)return s||i!==t.placeHolder||(i=""),i;if(!s||e!==i){if(!s){if(""===e)return void(i!==t.placeHolder&&(t.input.value=t.placeHolder,t.input.setAttribute("type","text")));t.input.setAttribute("type","password")}t.input.value=e,s&&t.isMaterialized()&&t._refreshPlaceHolder(),!0===t.showStrength&&t._evaluateStrength()}},propertyChangedHandler:function(e,t,i,s){"theme"!==t?"disabled"!=t?"placeHolder"==t?this._browserCheck&&("placeholder"in this.element?e.element.setAttribute("placeholder",e.placeHolder):""===e.input.value?(e.input.setAttribute("type","text"),e.input.value=s):e.input.value==i&&(e.input.value=s)):this.refresh():e.disabled?(e.element.setAttribute("disabled","disabled"),e.element.className+=" "+e.toThemeProperty("jqx-fill-state-disabled")):(e.host.removeAttr("disabled"),e.host.removeClass(e.toThemeProperty("jqx-fill-state-disabled"))):h.jqx.utilities.setTheme(i,s,e.host)},resize:function(e,t){this.width=e,this.height=t,null!=this.width&&-1!=this.width.toString().indexOf("px")?this.element.style.width=this.width:null==this.width||isNaN(this.width)||(this.element.style.width=this.width+"px"),null!=this.height&&-1!=this.height.toString().indexOf("px")?this.element.style.height=this.height:null==this.height||isNaN(this.height)||(this.element.style.height=this.height+"px")},_setAttributes:function(){var t=this,e=t.element;null!=this.width&&-1!=this.width.toString().indexOf("px")?this.element.style.width=this.width:null==this.width||isNaN(this.width)||(this.element.style.width=this.width+"px"),null!=this.height&&-1!=this.height.toString().indexOf("px")?this.element.style.height=this.height:null==this.height||isNaN(this.height)||(this.element.style.height=this.height+"px"),null!=this.height&&-1!=this.height.toString().indexOf("%")&&(this.element.style.height=this.height),null!=this.width&&-1!=this.width.toString().indexOf("%")&&(this.element.style.width=this.width),t.maxLength&&e.setAttribute("maxlength",t.maxLength),t.minLength&&e.setAttribute("minLength",t.minLength),t.placeHolder&&t._browserCheck&&("placeholder"in t.element?e.setAttribute("placeholder",t.placeHolder):""===e.value&&(e.setAttribute("type","text"),e.value=t.placeHolder)),t.disabled?(e.setAttribute("disabled","disabled"),e.className+=" "+this.toThemeProperty("jqx-fill-state-disabled")):(e.removeAttribute("disabled"),t.host.removeClass(t.toThemeProperty("jqx-fill-state-disabled")));var i=!1;t.addHandler(e,"change.passwordinput"+t.widgetID,function(e){i||(e.preventDefault(),e.stopPropagation(),i=!0,t._raiseEvent(),i=!1),t._refreshPlaceHolder()}),t.addHandler(e,"click.passwordinput"+t.widgetID,function(){t.showPasswordIcon&&t.icon&&(t.icon.style.display="inline",t._positionIcon())}),t.interval=null,t.addHandler(e,"keydown.passwordinput"+t.widgetID,function(){var e;t.changeType="keyboard",t.showPasswordIcon&&t.icon&&(t.interval&&clearInterval(t.interval),e=0,t.interval=setInterval(function(){"none"!=t.icon.style.display?(t._positionIcon(),5<++e&&clearInterval(t.interval)):clearInterval(t.interval)},100))}),t.addHandler(e,"focus.passwordinput"+t.widgetID,function(){t._focused=!0,e.className+=" "+t.toThemeProperty("jqx-fill-state-focus"),!t.placeHolder||!t._browserCheck||"placeholder"in t.element||e.value!=t.placeHolder||(e.value="",t._hidden&&e.setAttribute("type","password")),0