(function(a){if(a.PrimeFaces){a.PrimeFaces.debug("PrimeFaces already loaded, ignoring duplicate execution.");return}var b={escapeClientId:function(c){return"#"+c.replace(/:/g,"\\:")},cleanWatermarks:function(){$.watermark.hideAll()},showWatermarks:function(){$.watermark.showAll()},getWidgetById:function(e){for(var d in b.widgets){var c=b.widgets[d];if(c&&c.id===e){return c}}return null},addSubmitParam:function(d,f){var e=$(this.escapeClientId(d));for(var c in f){e.append('')}return this},submit:function(e,d){var c=$(this.escapeClientId(e));if(d){c.attr("target",d)}c.submit().children("input.ui-submit-param").remove()},attachBehaviors:function(d,c){$.each(c,function(f,e){d.bind(f,function(g){e.call(d,g)})})},getCookie:function(c){return $.cookie(c)},setCookie:function(d,e,c){$.cookie(d,e,c)},deleteCookie:function(d,c){$.removeCookie(d,c)},cookiesEnabled:function(){var c=(navigator.cookieEnabled)?true:false;if(typeof navigator.cookieEnabled==="undefined"&&!c){document.cookie="testcookie";c=(document.cookie.indexOf("testcookie")!==-1)?true:false}return(c)},skinInput:function(c){c.hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")});c.attr("role","textbox").attr("aria-disabled",c.is(":disabled")).attr("aria-readonly",c.prop("readonly"));if(c.is("textarea")){c.attr("aria-multiline",true)}return this},skinButton:function(c){c.mouseover(function(){var e=$(this);if(!c.prop("disabled")){e.addClass("ui-state-hover")}}).mouseout(function(){$(this).removeClass("ui-state-active ui-state-hover")}).mousedown(function(){var e=$(this);if(!c.prop("disabled")){e.addClass("ui-state-active").removeClass("ui-state-hover")}}).mouseup(function(){$(this).removeClass("ui-state-active").addClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus ui-state-active")}).keydown(function(f){if(f.which===$.ui.keyCode.SPACE||f.which===$.ui.keyCode.ENTER||f.which===$.ui.keyCode.NUMPAD_ENTER){$(this).addClass("ui-state-active")}}).keyup(function(){$(this).removeClass("ui-state-active")});var d=c.attr("role");if(!d){c.attr("role","button")}c.attr("aria-disabled",c.prop("disabled"));return this},skinSelect:function(c){c.mouseover(function(){var d=$(this);if(!d.hasClass("ui-state-focus")){d.addClass("ui-state-hover")}}).mouseout(function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus").removeClass("ui-state-hover")}).blur(function(){$(this).removeClass("ui-state-focus ui-state-hover")});return this},isIE:function(c){return b.env.isIE(c)},info:function(c){if(this.logger){this.logger.info(c)}},debug:function(c){if(this.logger){this.logger.debug(c)}},warn:function(c){if(this.logger){this.logger.warn(c)}if(b.isDevelopmentProjectStage()&&a.console){console.log(c)}},error:function(c){if(this.logger){this.logger.error(c)}if(b.isDevelopmentProjectStage()&&a.console){console.log(c)}},isDevelopmentProjectStage:function(){return b.settings.projectStage==="Development"},setCaretToEnd:function(d){if(d){d.focus();var e=d.value.length;if(e>0){if(d.setSelectionRange){d.setSelectionRange(0,e)}else{if(d.createTextRange){var c=d.createTextRange();c.collapse(true);c.moveEnd("character",1);c.moveStart("character",1);c.select()}}}}},changeTheme:function(g){if(g&&g!==""){var h=$('link[href*="'+b.RESOURCE_IDENTIFIER+'/theme.css"]');if(h.length===0){h=$('link[href*="'+b.RESOURCE_IDENTIFIER+'=theme.css"]')}var f=h.attr("href"),e=f.split("&")[0],d=e.split("ln=")[1],c=f.replace(d,"primefaces-"+g);h.attr("href",c)}},escapeRegExp:function(c){return this.escapeHTML(c.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"))},escapeHTML:function(c){return c.replace(/&/g,"&").replace(//g,">")},clearSelection:function(){if(a.getSelection){if(a.getSelection().empty){a.getSelection().empty()}else{if(a.getSelection().removeAllRanges){a.getSelection().removeAllRanges()}}}else{if(document.selection&&document.selection.empty){try{document.selection.empty()}catch(c){}}}},getSelection:function(){var c="";if(a.getSelection){c=a.getSelection()}else{if(document.getSelection){c=document.getSelection()}else{if(document.selection){c=document.selection.createRange().text}}}return c},hasSelection:function(){return this.getSelection().length>0},cw:function(d,e,c){this.createWidget(d,e,c)},createWidget:function(d,f,c){c.widgetVar=f;if(this.widget[d]){var e=this.widgets[f];if(e&&(e.constructor===this.widget[d])){e.refresh(c)}else{this.widgets[f]=new this.widget[d](c);if(this.settings.legacyWidgetNamespace){a[f]=this.widgets[f]}}}else{b.error("Widget not available: "+d)}},getFacesResource:function(f,e,c){if(f.indexOf("/")===0){f=f.substring(1,f.length)}var d=$('script[src*="/'+b.RESOURCE_IDENTIFIER+'/core.js"]').attr("src");if(!d){d=$('script[src*="'+b.RESOURCE_IDENTIFIER+'=core.js"]').attr("src")}d=d.replace("core.js",f);d=d.replace("ln=primefaces","ln="+e);if(c){var h=new RegExp("[?&]v=([^&]*)").exec(d)[1];d=d.replace("v="+h,"v="+c)}var g=a.location.protocol+"//"+a.location.host;return d.indexOf(g)>=0?d:g+d},inArray:function(c,e){for(var d=0;de){d.scrollTop(c+h-e+i)}}},calculateScrollbarWidth:function(){if(!this.scrollbarWidth){if(b.env.browser.msie){var e=$('').css({position:"absolute",top:-1000,left:-1000}).appendTo("body"),d=$('').css({position:"absolute",top:-1000,left:-1000}).appendTo("body");this.scrollbarWidth=e.width()-d.width();e.add(d).remove()}else{var c=$("
").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:-1000}).prependTo("body").append("
").find("div").css({width:"100%",height:200});this.scrollbarWidth=100-c.width();c.parent().remove()}}return this.scrollbarWidth},bcn:function(d,e,g){if(g){for(var c=0;c=0;d--){var c=this.deferredRenders[d];if(c.widget===e){this.deferredRenders.splice(d,1)}}},invokeDeferredRenders:function(c){var g=[];for(var f=0;f=0&&/(rv)(?::| )([\w.]+)/.exec(h)||h.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(h)||[];var f=/(ipad)/.exec(h)||/(iphone)/.exec(h)||/(android)/.exec(h)||/(windows phone)/.exec(h)||/(win)/.exec(h)||/(mac)/.exec(h)||/(linux)/.exec(h)||/(cros)/i.exec(h)||[];return{browser:g[3]||g[1]||"",version:g[2]||"0",platform:f[0]||""}};a=jQuery.uaMatch(window.navigator.userAgent);d={};if(a.browser){d[a.browser]=true;d.version=a.version;d.versionNumber=parseInt(a.version)}if(a.platform){d[a.platform]=true}if(d.android||d.ipad||d.iphone||d["windows phone"]){d.mobile=true}if(d.cros||d.mac||d.linux||d.win){d.desktop=true}if(d.chrome||d.opr||d.safari){d.webkit=true}if(d.rv){var e="msie";a.browser=e;d[e]=true}if(d.opr){var c="opera";a.browser=c;d[c]=true}if(d.safari&&d.android){var b="android";a.browser=b;d[b]=true}d.name=a.browser;d.platform=a.platform;this.browser=d;$.browser=d}},isIE:function(a){return(a===undefined)?this.browser.msie:(this.browser.msie&&parseInt(this.browser.version,10)===a)},isLtIE:function(a){return(this.browser.msie)?parseInt(this.browser.version,10)')}},loadScripts:function(b){var a=function(){var c=b.shift();if(c){PrimeFaces.getScript(c,a)}};a()},getContent:function(c){var b="";for(var a=0;a0){f.val(e)}else{c.append('')}}}},updateHead:function(d){var b=$.ajaxSetup()["cache"];$.ajaxSetup()["cache"]=true;var a=new RegExp("]*>","gi").exec(d)[0];var c=d.indexOf(a)+a.length;$("head").html(d.substring(c,d.lastIndexOf("")));$.ajaxSetup()["cache"]=b},updateBody:function(b){var c=new RegExp("]*>","gi").exec(b)[0];var a=b.indexOf(c)+c.length;$("body").html(b.substring(a,b.lastIndexOf("")))},updateElement:function(d,b,c){if(d.indexOf(PrimeFaces.VIEW_STATE)!==-1){PrimeFaces.ajax.Utils.updateFormStateInput(PrimeFaces.VIEW_STATE,b,c)}else{if(d.indexOf(PrimeFaces.CLIENT_WINDOW)!==-1){PrimeFaces.ajax.Utils.updateFormStateInput(PrimeFaces.CLIENT_WINDOW,b,c)}else{if(d===PrimeFaces.VIEW_ROOT){var a=PrimeFaces.ajax.Utils;window.PrimeFaces=null;a.updateHead(b);a.updateBody(b)}else{if(d===PrimeFaces.ajax.VIEW_HEAD){PrimeFaces.ajax.Utils.updateHead(b)}else{if(d===PrimeFaces.ajax.VIEW_BODY){PrimeFaces.ajax.Utils.updateBody(b)}else{if(d===$("head")[0].id){PrimeFaces.ajax.Utils.updateHead(b)}else{$(PrimeFaces.escapeClientId(d)).replaceWith(b)}}}}}}}},Queue:{delays:{},requests:new Array(),xhrs:new Array(),offer:function(a){if(a.delay){var b=null,d=this,b=(typeof(a.source)==="string")?a.source:$(a.source).attr("id"),c=function(){return setTimeout(function(){d.requests.push(a);if(d.requests.length===1){PrimeFaces.ajax.Request.send(a)}},a.delay)};if(this.delays[b]){clearTimeout(this.delays[b].timeout);this.delays[b].timeout=c()}else{this.delays[b]={timeout:c()}}}else{this.requests.push(a);if(this.requests.length===1){PrimeFaces.ajax.Request.send(a)}}},poll:function(){if(this.isEmpty()){return null}var b=this.requests.shift(),a=this.peek();if(a){PrimeFaces.ajax.Request.send(a)}return b},peek:function(){if(this.isEmpty()){return null}return this.requests[0]},isEmpty:function(){return this.requests.length===0},addXHR:function(a){this.xhrs.push(a)},removeXHR:function(b){var a=$.inArray(b,this.xhrs);if(a>-1){this.xhrs.splice(a,1)}},abortAll:function(){for(var a=0;a0){n='form[action="'+v+'"]';v=t.val()}PrimeFaces.debug("URL to post "+v+".");var m=PrimeFaces.ajax.Request.extractParameterNamespace(b);PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_REQUEST_PARAM,true,m);PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_SOURCE_PARAM,f,m);if(e.resetValues){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.RESET_VALUES_PARAM,true,m)}if(e.ignoreAutoUpdate){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.IGNORE_AUTO_UPDATE_PARAM,true,m)}if(e.skipChildren===false){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.SKIP_CHILDREN_PARAM,false,m)}var s=PrimeFaces.ajax.Request.resolveComponentsForAjaxCall(e,"process");if(e.fragmentId){s.push(e.fragmentId)}var a="@none";if(s.length>0){a=s.join(" ")}else{var j=PrimeFaces.ajax.Request.resolveComponentsForAjaxCall(e,"process");j=$.trim(j);if(j===""){a="@all"}}if(a!=="@none"){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_PROCESS_PARAM,a,m)}var d=PrimeFaces.ajax.Request.resolveComponentsForAjaxCall(e,"update");if(e.fragmentId&&e.fragmentUpdate){d.push(e.fragmentId)}if(d.length>0){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_UPDATE_PARAM,d.join(" "),m)}if(e.event){PrimeFaces.ajax.Request.addParam(g,PrimeFaces.BEHAVIOR_EVENT_PARAM,e.event,m);var l=e.event;if(e.event==="valueChange"){l="change"}else{if(e.event==="action"){l="click"}}PrimeFaces.ajax.Request.addParam(g,PrimeFaces.PARTIAL_EVENT_PARAM,l,m)}else{PrimeFaces.ajax.Request.addParam(g,f,f,m)}if(e.params){PrimeFaces.ajax.Request.addParams(g,e.params,m)}if(e.ext&&e.ext.params){PrimeFaces.ajax.Request.addParams(g,e.ext.params,m)}if(e.partialSubmit&&a.indexOf("@all")===-1){var p=false,h=e.partialSubmitFilter||":input";if(a.indexOf("@none")===-1){for(var q=0;q0){var d=a.val();PrimeFaces.ajax.Request.addParam(f,b,d,e)}},extractParameterNamespace:function(c){var a=c.children("input[name*='"+PrimeFaces.VIEW_STATE+"']");if(a&&a.length>0){var b=a[0].name;if(b.length>PrimeFaces.VIEW_STATE.length){return b.substring(0,b.indexOf(PrimeFaces.VIEW_STATE))}}return null}},Response:{handle:function(h,e,m,b){var n=h.getElementsByTagName("partial-response")[0];for(var g=0;g0&&c.is("input")&&$.isFunction($.fn.getSelection)){f=c.getSelection()}for(var d=0;d0){if(g=="@none"||g=="@all"){continue}if(g.indexOf("@")==-1){e=e.add($(document.getElementById(g)))}else{if(g.indexOf("@widgetVar(")==0){var f=g.substring(11,g.length-1);var d=PrimeFaces.widgets[f];if(d){e=e.add($(document.getElementById(d.id)))}else{PrimeFaces.error('Widget for widgetVar "'+f+'" not avaiable')}}else{if(g.indexOf("@(")==0){e=e.add($(g.substring(2,g.length-1)))}}}}}}return e},resolveComponents:function(l){var k=PrimeFaces.expressions.SearchExpressionFacade.splitExpressions(l),c=[];if(k){for(var g=0;g0){if(m.indexOf("@")==-1||m=="@none"||m=="@all"){if(!PrimeFaces.inArray(c,m)){c.push(m)}}else{if(m.indexOf("@widgetVar(")==0){var d=m.substring(11,m.length-1),h=PrimeFaces.widgets[d];if(h){if(!PrimeFaces.inArray(c,h.id)){c.push(h.id)}}else{PrimeFaces.error('Widget for widgetVar "'+d+'" not avaiable')}}else{if(m.indexOf("@(")==0){var b=$(m.substring(2,m.length-1));for(var e=0;e