PrimeFacesExt={changeTheme:function(a){var c=PrimeFaces.getThemeLink();c&&0!==c.length?PrimeFaces.changeTheme(a):(c=PrimeFacesExt.getResourceUrlExtension(),a=PrimeFaces.settings.contextPath+"/javax.faces.resource/theme.css."+c+"?ln\x3dprimefaces-"+a+"\x26"+PrimeFacesExt.VERSION,$("body").append('\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+a+'" /\x3e'))},getResourceUrlExtension:function(){if(!PrimeFacesExt.RESOURCE_URL_EXTENSION){var a=PrimeFacesExt.getResourceScriptURI(),c=PrimeFacesExt.getResourceScriptName(a);
PrimeFacesExt.RESOURCE_URL_EXTENSION=RegExp(c+".([^?]*)").exec(a)[1]}return PrimeFacesExt.RESOURCE_URL_EXTENSION},getResourceScriptName:function(a){PrimeFacesExt.SCRIPT_NAME||(PrimeFacesExt.SCRIPT_NAME=(new RegExp("/?"+PrimeFaces.RESOURCE_IDENTIFIER+"(/|\x3d)(.*?).js")).exec(a)[2]+".js");return PrimeFacesExt.SCRIPT_NAME},getResourceScriptURI:function(){PrimeFacesExt.SCRIPT_URI||(PrimeFacesExt.SCRIPT_URI=$('script[src*\x3d"/'+PrimeFaces.RESOURCE_IDENTIFIER+'/"]').first().attr("src"),PrimeFacesExt.SCRIPT_URI||
(PrimeFacesExt.SCRIPT_URI=$('script[src*\x3d"'+PrimeFaces.RESOURCE_IDENTIFIER+'\x3d"]').first().attr("src")));return PrimeFacesExt.SCRIPT_URI},configureLocale:function(a,c){if(PrimeFacesExt.locales&&PrimeFacesExt.locales[a]&&c.locale&&(a=PrimeFacesExt.locales[a][c.locale]))for(var b in a)a.hasOwnProperty(b)&&(c[b]=a[b]);return c},RESOURCE_LIBRARY:"primefaces-extensions",VERSION:"11.0.0",behavior:{},widget:{},locales:{}};PrimeFacesExt.locales.TimeAgo={};PrimeFacesExt.locales.TimePicker={};
PrimeFacesExt.behavior.Javascript=function(a,c){var b=null;c&&(b=c.params);return a.execute.call(this,a.source,a.event,b,c)};
PrimeFaces.widget.ExtDynaForm=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);a.isPostback||(this.toggledExtended=!1);if(a.autoSubmit&&!PF(a.widgetVar))this.submitForm();else if(a.isPostback&&this.toggledExtended&&this.uuid==a.uuid){var c=this.jq.find("tr.pe-dynaform-extendedrow");0<c.length&&(this.openExtended?c.show():c.hide())}this.uuid=a.uuid},toggleExtended:function(){var a=this.jq.find("tr.pe-dynaform-extendedrow");0<a.length&&(a.toggle(),this.toggledExtended=!0,this.openExtended=
"none"!=$(a[0]).css("display"))},submitForm:function(){this.jq.find(":submit").trigger("click")}});
PrimeFaces.widget.ExtImageRotateAndResize=PrimeFaces.widget.BaseWidget.extend({init:function(a){this.id=a.id;this.cfg=a;this.initialized=!1;this.removeScriptElement(this.id)},initializeLazy:function(){this.initialized||(this.target=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.cfg.target)[0],this.imageSrc=this.target.src,this.imageWidth=this.target.width,this.imageHeight=this.target.height,this.degree=0,this.newImageWidth=this.target.width,this.newImageHeight=this.target.height,
this.initialized=!0)},reload:function(){this.initialized=!1;this.initializeLazy()},rotateLeft:function(a){this.initializeLazy();this.degree=0>=this.degree-a?360- -1*(this.degree-a):this.degree-a;this.redrawImage(!1,!0)},rotateRight:function(a){this.initializeLazy();this.degree=360<=this.degree+a?this.degree+a-360:this.degree+a;this.redrawImage(!1,!0)},resize:function(a,c){this.initializeLazy();this.newImageWidth=a;this.newImageHeight=c;this.redrawImage(!0,!1)},scale:function(a){this.initializeLazy();
this.newImageWidth*=a;this.newImageHeight*=a;this.redrawImage(!0,!1)},restoreDefaults:function(){this.initializeLazy();this.newImageWidth=this.imageWidth;this.newImageHeight=this.imageHeight;this.degree=0;this.redrawImage(!0,!0)},redrawImage:function(a,c){var b=0<=this.degree?Math.PI*this.degree/180:Math.PI*(360+this.degree)/180;var d=Math.cos(b),h=Math.sin(b),f=document.createElement("canvas"),e=new Image;e.onload=$.proxy(function(){f.style.width=f.width=Math.abs(d*e.width)+Math.abs(h*e.height);
f.style.height=f.height=Math.abs(d*e.height)+Math.abs(h*e.width);var g=f.getContext("2d");g.save();b<=Math.PI/2?g.translate(h*e.height,0):b<=Math.PI?g.translate(f.width,-1*d*e.height):b<=1.5*Math.PI?g.translate(-1*d*e.width,f.height):g.translate(0,-1*h*e.width);g.rotate(b);g.drawImage(e,0,0,e.width,e.height);g.restore();f.id=this.target.id;f.src=this.target.src;this.target.parentNode.replaceChild(f,this.target);this.target=f;a&&this.fireResizeEvent();c&&this.fireRotateEvent()},this);e.src=this.imageSrc;
e.width=this.newImageWidth;e.height=this.newImageHeight},fireRotateEvent:function(){this.callBehavior("rotate",{params:[{name:this.id+"_degree",value:this.degree}]})},fireResizeEvent:function(){this.callBehavior("resize",{params:[{name:this.id+"_width",value:this.newImageWidth},{name:this.id+"_height",value:this.newImageHeight}]})}});
PrimeFaces.widget.ExtTriStateManyCheckbox=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.outputs=this.jq.find(".ui-chkbox-box:not(.ui-state-disabled)");this.inputs=this.jq.find(":text:not(:disabled)");this.labels=this.jq.find("label:not(.ui-state-disabled)");this.fixedMod=function(b,d){return(b%d+d)%d};var c=this;this.outputs.mouseover(function(){$(this).addClass("ui-state-hover")}).mouseout(function(){$(this).removeClass("ui-state-hover")}).click(function(b){c.toggle($(this),
1);b.preventDefault?b.preventDefault():b.returnValue=!1});this.labels.click(function(b){var d=$(this);$(PrimeFaces.escapeClientId(d.attr("for"))).parent().next().click();b.preventDefault?b.preventDefault():b.returnValue=!1});this.outputs.on("keydown",function(b){switch(b.keyCode){case 38:c.toggle($(this),1);b.preventDefault?b.preventDefault():b.returnValue=!1;break;case 40:c.toggle($(this),-1);b.preventDefault?b.preventDefault():b.returnValue=!1;break;case 39:c.toggle($(this),1);b.preventDefault?
b.preventDefault():b.returnValue=!1;break;case 37:c.toggle($(this),-1);b.preventDefault?b.preventDefault():b.returnValue=!1;break;case 32:c.toggle($(this),1),b.preventDefault?b.preventDefault():b.returnValue=!1}});this.cfg.behaviors&&PrimeFaces.attachBehaviors(this.inputs,this.cfg.behaviors);this.inputs.data(PrimeFaces.CLIENT_ID_DATA,this.id)},toggle:function(a,c){var b=a.prev().find(":input");if(!a.hasClass("ui-state-disabled")){var d=parseInt(b.val());c=this.fixedMod(d+c,3);b.val(c);0==c?a.removeClass("ui-state-active"):
a.addClass("ui-state-active");var h=a.data("iconstates");a.children().removeClass(h[d]).addClass(h[c]);d=a.data("titlestates");null!=d&&0<d.length&&a.attr("title",d[c]);b.change()}},disable:function(){PrimeFaces.utils.disableInputWidget(this.inputs)},enable:function(){PrimeFaces.utils.enableInputWidget(this.inputs)}});
PrimeFaces.widget.ExtGChart=PrimeFaces.widget.BaseWidget.extend({init:function(a){var c=this;this._super(a);this.chart=a.chart?JSON.parse(a.chart):{data:[],options:{},type:""};this.data=this.chart.data;this.type=this.chart.type;this.height=a.height;this.width=a.width;this.title=a.title;this.apiKey=a.apiKey;this.language=a.language;this.options=this.chart.options;this.input=jQuery(this.jqId+"_hidden");google.charts.load("current",{packages:["corechart","geochart","orgchart","gantt"],language:this.language,
mapsApiKey:this.apiKey});jQuery(document).ready(function(){google.charts.setOnLoadCallback(function(){c.draw()})});(a=this.cfg.extender)&&("function"===typeof a?a.call(this):PrimeFaces.error("Extender value is not a javascript function!"))},draw:function(){var a=google.visualization.arrayToDataTable(this.data),c=this;this.options.title=this.title;this.options.width=parseInt(this.width,10);this.options.height=parseInt(this.height,10);this.wrapper=new google.visualization.ChartWrapper({chartType:this.type,
dataTable:a,options:this.options,containerId:this.id});this.cfg.behaviors&&this.cfg.behaviors.select&&google.visualization.events.addListener(this.wrapper,"select",function(b){jQuery(c.jqId+"_hidden").val(JSON.stringify(c.wrapper.getChart().getSelection()));c.cfg.behaviors.select.call(jQuery(c.jqId+"_hidden"))});this.wrapper.draw()}});