text: /*!
   * eMAG Apps UI KIT v1.0.0 * Copyright 2001-2018 eMAG HX Team
   * Licensed under the ISC license
   */
  !function(a){a.fn.inputlimiter=function(b){var c=a.extend({},a.fn.inputlimiter.defaults,b),d=a(this),e=d.parents(c.parentElem);c.boxAttach&&!a("#"+c.boxId).length&&(a("<div/>").appendTo(e).attr({id:c.boxId,"class":c.boxClass}).css({position:"absolute"}).hide(),a.fn.bgiframe&&a("#"+c.boxId).bgiframe());var f=function(b){var d=a(this),f=i(d.val());!c.allowExceed&&f>c.limit&&d.val(j(d.val())),c.boxAttach&&a("#"+c.boxId).css({width:"100%",left:0,top:"100%","z-index":10});var g=c.limit-f>0?c.limit-f:0,h=c.remTextFilter(c,g),k=c.limitTextFilter(c);if(c.limitTextShow){a("#"+c.boxId).html(h+" "+k);var l=a("<span/>").appendTo(e).attr({id:"19cc9195583bfae1fad88e19d443be7a","class":c.boxClass}).html(h+" "+k).innerWidth();a("#19cc9195583bfae1fad88e19d443be7a").remove(),l>a("#"+c.boxId).innerWidth()&&a("#"+c.boxId).html(h+"<br />"+k),a("#"+c.boxId).show()}else a("#"+c.boxId).html(h).show()},g=function(b){var d=i(a(this).val());if(!c.allowExceed&&d>c.limit){var e=b.ctrlKey||b.altKey||b.metaKey;if(!e&&b.which>=32&&b.which<=122&&this.selectionStart===this.selectionEnd)return!1}},h=function(){var b=a(this);if(count=i(b.val()),!c.allowExceed&&count>c.limit&&b.val(j(b.val())),c.boxAttach)a("#"+c.boxId).fadeOut("fast");else if(c.remTextHideOnBlur){var d=c.limitText;d=d.replace(/\%n/g,c.limit),d=d.replace(/\%s/g,1===c.limit?"":"s"),a("#"+c.boxId).html(d)}},i=function(b){if("words"===c.limitBy.toLowerCase())return b.length>0?a.trim(b).replace(/\ +(?= )/g,"").split(" ").length:0;var d=b.length,e=b.match(/\n/g);return e&&c.lineReturnCount>1&&(d+=e.length*(c.lineReturnCount-1)),d},j=function(b){return"words"===c.limitBy.toLowerCase()?a.trim(b).replace(/\ +(?= )/g,"").split(" ").splice(0,c.limit).join(" ")+" ":b.substring(0,c.limit)};a(this).each(function(d){var e=a(this);(!b||!b.limit)&&c.useMaxlength&&parseInt(e.attr("maxlength"))>0&&parseInt(e.attr("maxlength"))!=c.limit?e.inputlimiter(a.extend({},c,{limit:parseInt(e.attr("maxlength"))})):(!c.allowExceed&&c.useMaxlength&&"characters"===c.limitBy.toLowerCase()&&e.attr("maxlength",c.limit),e.unbind(".inputlimiter"),e.bind("keyup.inputlimiter",f),e.bind("keypress.inputlimiter",g),e.bind("blur.inputlimiter",h))})},a.fn.inputlimiter.remtextfilter=function(a,b){var c=a.remText;return 0===b&&null!==a.remFullText&&(c=a.remFullText),c=c.replace(/\%n/g,b),c=c.replace(/\%s/g,a.zeroPlural?1===b?"":"s":b<=1?"":"s")},a.fn.inputlimiter.limittextfilter=function(a){var b=a.limitText;return b=b.replace(/\%n/g,a.limit),b=b.replace(/\%s/g,a.limit<=1?"":"s")},a.fn.inputlimiter.defaults={limit:255,boxAttach:!0,parentElem:".form-limited-input",boxId:"limiterBox",boxClass:"limiterBox",remText:"%n character%s remaining.",remTextFilter:a.fn.inputlimiter.remtextfilter,remTextHideOnBlur:!0,remFullText:null,limitTextShow:!0,limitText:"Field limited to %n character%s.",limitTextFilter:a.fn.inputlimiter.limittextfilter,zeroPlural:!0,allowExceed:!1,useMaxlength:!0,limitBy:"characters",lineReturnCount:1}}(jQuery);