PrimeFacesExt={isExtensionMapping:function(){if(!PrimeFacesExt.IS_EXTENSION_MAPPING){var a=PrimeFacesExt.getResourceScriptURI(),b=PrimeFacesExt.getResourceScriptName(a);PrimeFacesExt.IS_EXTENSION_MAPPING="."===a.charAt(a.indexOf(b)+b.length)}return PrimeFacesExt.IS_EXTENSION_MAPPING},getResourceUrlExtension:function(){if(!PrimeFacesExt.RESOURCE_URL_EXTENSION){var a=PrimeFacesExt.getResourceScriptURI(),b=PrimeFacesExt.getResourceScriptName(a);PrimeFacesExt.RESOURCE_URL_EXTENSION=RegExp(b+".([^?]*)").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,b){if(PrimeFacesExt.locales&&PrimeFacesExt.locales[a]&&b.locale&&(a=PrimeFacesExt.locales[a][b.locale]))for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},getScript:function(a,b){$.ajax({type:"GET",url:a,success:b,dataType:"script",cache:!0,async:!0,scriptAttrs:{nonce:PrimeFaces.csp.NONCE_VALUE}})},changeTheme:function(a){$(document).trigger("PrimeFacesExt.themeChanged",a)},getTheme:function(){var a=$('link[href*\x3d"'+PrimeFaces.RESOURCE_IDENTIFIER+
'/theme.css"]');0===a.length&&(a=$('link[href*\x3d"'+PrimeFaces.RESOURCE_IDENTIFIER+'\x3dtheme.css"]'));return 0===a.length?"":a.attr("href").split("\x26")[0].split("ln\x3dprimefaces-")[1]},isPrimeIconTheme:function(a){a=PrimeFacesExt.getTheme();switch(a){case "nova-light":case "nova-dark":case "nova-colored":case "luna-blue":case "luna-amber":case "luna-green":case "luna-pink":return!0;default:return!1}},RESOURCE_LIBRARY:"primefaces-extensions",VERSION:"8.0",behavior:{},widget:{},locales:{}};
PrimeFacesExt.locales.TimeAgo={};PrimeFacesExt.locales.TimePicker={};PrimeFacesExt.behavior.Javascript=function(a,b){var c=null;b&&(c=b.params);return a.execute.call(this,a.source,a.event,c,b)};(function(a){var b=PrimeFaces.changeTheme;PrimeFaces.changeTheme=function(a){b(a);PrimeFacesExt.changeTheme(a)}})(window);
CKEDITOR_GETURL=function(a){PrimeFaces.env.isIE()&&!String.prototype.startsWith&&(String.prototype.startsWith=function(a,b){b=b||0;return this.indexOf(a,b)===b});if(-1!==a.indexOf("?resolve\x3dfalse"))a=a.replace("?resolve\x3dfalse","");else{var b="v\x3d"+PrimeFacesExt.VERSION,c=a.indexOf(b);if(-1!==c){if(b=a.substring(c+b.length),0<b.length){a=a.substring(0,a.length-b.length);b.startsWith("\x26")&&(b=b.replace(/&\w+=\d+(?:\.\d+)*/,""));c=a.indexOf(PrimeFaces.RESOURCE_IDENTIFIER);if(PrimeFacesExt.isExtensionMapping()){var d=
"."+PrimeFacesExt.getResourceUrlExtension();d=a.lastIndexOf(d);-1===d&&(d=a.lastIndexOf(".xhtml"),-1===d&&(d=a.lastIndexOf(".jsf")));-1===d&&console.error("Could not find .jsf or .xhtml extension!");a=a.substring(c+PrimeFaces.RESOURCE_IDENTIFIER.length,d)}else d=a.indexOf("?"),a=a.substring(c+PrimeFaces.RESOURCE_IDENTIFIER.length,d);a=PrimeFaces.resources.getFacesResource(a+b,PrimeFacesExt.RESOURCE_LIBRARY,PrimeFacesExt.VERSION)}}else a=-1===a.indexOf(PrimeFaces.RESOURCE_IDENTIFIER)?PrimeFaces.resources.getFacesResource("ckeditor/"+
a,PrimeFacesExt.RESOURCE_LIBRARY,PrimeFacesExt.VERSION):a}return a};
PrimeFaces.widget.ExtCKEditor=PrimeFaces.widget.DeferredWidget.extend({init:function(a){this._super(a);this.instance=null;this.initializing=!1;this.editorState=this.editorState||{scrollTop:0,scrollLeft:0,mode:"wysiwyg"};this.options={};this.options.widgetVar=this.cfg.widgetVar;this.cfg.skin&&(this.options.skin=this.cfg.skin);this.cfg.width&&(this.options.width=this.cfg.width);this.cfg.height&&(this.options.height=this.cfg.height);this.cfg.theme&&(this.options.theme=this.cfg.theme);this.cfg.toolbar&&
(this.options.toolbar=this.cfg.toolbar instanceof Array?this.cfg.toolbar:PrimeFaces.csp.evalResult(this.cfg.toolbar));this.cfg.readOnly&&(this.options.readOnly=this.cfg.readOnly);this.cfg.interfaceColor&&(this.options.uiColor=this.cfg.interfaceColor);this.cfg.language&&(this.options.language=this.cfg.language);this.cfg.defaultLanguage&&(this.options.defaultLanguage=this.cfg.defaultLanguage);this.cfg.contentsCss&&(this.options.contentsCss=this.cfg.contentsCss);this.cfg.customConfig&&(this.options.customConfig=
this.cfg.customConfig+"?resolve\x3dfalse");if($.fn.ckeditor)this.renderDeferred();else{a=PrimeFaces.resources.getFacesResource("/ckeditor/ckeditor.js",PrimeFacesExt.RESOURCE_LIBRARY,PrimeFacesExt.VERSION);var b=PrimeFaces.resources.getFacesResource("/ckeditor/adapters/jquery.js",PrimeFacesExt.RESOURCE_LIBRARY,PrimeFacesExt.VERSION);PrimeFacesExt.getScript(a,$.proxy(function(a,d){PrimeFacesExt.getScript(b,$.proxy(function(a,b){this.renderDeferred()},this))},this),!0)}},_render:function(){if(!this.instance&&
!1===this.initializing){this.initializing=!0;PrimeFaces.info("Rendering CKEditor: "+this.id);this.overwriteSaveButton();var a=CKEDITOR.instances[this.id];if(a)try{this.destroyOnUpdate(a)}catch(b){window.console&&console.log&&console.log("CKEditor threw an error while destroying the old instance: "+b)}this.jq.ckeditor($.proxy(function(){this.initialized()},this),this.options);CKEDITOR.instances[this.id]&&(a=CKEDITOR.instances[this.id].config,a.allowedContent=!this.cfg.advancedContentFilter,a.readOnly=
this.cfg.readOnly);PrimeFaces.info("Finished Rendering CKEditor: "+this.id)}},overwriteSaveButton:function(){CKEDITOR.plugins.registered.save={init:function(a){var b=PF(a.config.widgetVar);a.addCommand("save",{modes:{wysiwyg:1,source:1},exec:function(a){b.callBehavior("save")}});a.ui.addButton("Save",{label:a.lang.save.toolbar,command:"save",title:a.lang.save.toolbar})}}},initialized:function(){PrimeFaces.info("Initialized: "+this.id);this.instance=this.jq.ckeditorGet();this.fireEvent("initialize");
this.restoreMode();this.restoreScrollPosition();this.bindEditableEvents();this.instance.on("blur",$.proxy(function(){this.fireEvent("blur")},this));this.instance.on("focus",$.proxy(function(){this.fireEvent("focus")},this));this.instance.on("contentDom",$.proxy(function(){this.bindEditableEvents();this.fireEvent("wysiwygMode")},this));this.instance.on("mode",$.proxy(function(a){this.saveMode();this.saveScrollPosition();"source"==this.instance.mode&&(this.bindEditableEvents(),this.fireEvent("sourceMode"))},
this));this.isDirtyEventDefined=this.hasBehavior("dirty");this.isChangeEventDefined=this.hasBehavior("change");this.instance.on("blur",$.proxy(function(){this.instance.dirtyFired=!1},this));this.initializing=!1},destroyOnUpdate:function(a){a&&(a.fire("beforeDestroy"),a.filter&&(a.filter.destroy(),delete a.filter),delete a.activeFilter,a.status="destroyed",a.fire("destroy"),a.removeAllListeners(),CKEDITOR.remove(a),CKEDITOR.fire("instanceDestroyed",null,a))},checkDirty:function(){this.isDirtyEventDefined&&
!this.instance.dirtyFired&&this.instance.checkDirty()&&(this.fireEvent("dirty"),this.instance.dirtyFired=!0)},checkChange:function(){this.isChangeEventDefined&&this.fireEvent("change")},fireEvent:function(a){this.callBehavior(a)},destroy:function(){if(this.instance){try{this.instance.destroy(!0)}catch(a){window.console&&console.log&&console.log("CKEditor threw an error while destroying the old instance: "+a)}this.instance=null}this.jq.show()},saveScrollPosition:function(){if(this.instance)if("source"===
this.instance.mode){var a=this.instance.editable();a&&a.$&&(this.editorState.scrollTop=a.$.scrollTop,this.editorState.scrollLeft=a.$.scrollLeft)}else this.instance.document&&this.instance.document.$&&this.instance.document.$.documentElement&&(this.editorState.scrollTop=this.instance.document.$.documentElement.scrollTop,this.editorState.scrollLeft=this.instance.document.$.documentElement.scrollLeft)},restoreScrollPosition:function(){if(this.instance)if("source"===this.instance.mode){var a=this.instance.editable();
a&&a.$&&("number"===typeof this.editorState.scrollTop&&(a.$.scrollTop=this.editorState.scrollTop),"number"===typeof this.editorState.scrollLeft&&(a.$.scrollLeft=this.editorState.scrollLeft))}else this.instance.document&&this.instance.document.$&&this.instance.document.$.documentElement&&("number"===typeof this.editorState.scrollTop&&(this.instance.document.$.documentElement.scrollTop=this.editorState.scrollTop),"number"===typeof this.editorState.scrollLeft&&(this.instance.document.$.documentElement.scrollLeft=
this.editorState.scrollLeft))},saveMode:function(){this.instance&&(this.editorState.mode="source"===this.instance.mode?"source":"wysiwyg")},restoreMode:function(){this.instance&&"source"===this.editorState.mode&&this.instance.setMode("source")},bindEditableEvents:function(){if(this.instance&&this.instance.editable()){var a=this.instance.editable();a.attachListener(a,"cut",$.proxy(function(a){this.checkChange();this.checkDirty()},this));a.attachListener(a,"paste",$.proxy(function(a){this.checkChange();
this.checkDirty()},this));a.attachListener(a,"keyup",$.proxy(function(a){!a.data.$.ctrlKey&&!a.data.$.metaKey&&(a=a.data.$.keyCode,8==a||13==a||32==a||46<=a&&90>=a||96<=a&&111>=a||186<=a&&222>=a)&&(this.checkChange(),this.checkDirty())},this));this.scrollListener&&(this.scrollListener.removeListener(),this.scrollListener=void 0);"source"===this.instance.mode?this.scrollListener=a.attachListener(a,"scroll",$.proxy(function(){this.saveScrollPosition()},this)):a.getDocument()&&(this.scrollListener=a.attachListener(a.getDocument(),
"scroll",$.proxy(function(){this.saveScrollPosition()},this)))}},isDirty:function(){return this.instance?this.instance.checkDirty():!1},setReadOnly:function(a){this.instance.setReadOnly(!1!==a)},isReadOnly:function(){return this.instance.readOnly},hasFocus:function(){return this.instance.focusManager.hasFocus},getEditorInstance:function(){return this.instance}});
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 b=this.jq.find("tr.pe-dynaform-extendedrow");0<b.length&&(this.openExtended?b.show():b.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,b){this.initializeLazy();this.newImageWidth=a;this.newImageHeight=b;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,b){var c=0<=this.degree?Math.PI*this.degree/180:Math.PI*(360+this.degree)/180;var d=Math.cos(c),h=Math.sin(c),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();c<=Math.PI/2?g.translate(h*e.height,0):c<=Math.PI?g.translate(f.width,-1*d*e.height):c<=1.5*Math.PI?g.translate(-1*d*e.width,f.height):g.translate(0,-1*h*e.width);g.rotate(c);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();b&&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(a,b){return(a%b+b)%b};var b=this;this.outputs.mouseover(function(){$(this).addClass("ui-state-hover")}).mouseout(function(){$(this).removeClass("ui-state-hover")}).click(function(a){b.toggle($(this),
1);a.preventDefault?a.preventDefault():a.returnValue=!1});this.labels.click(function(a){var b=$(this);$(PrimeFaces.escapeClientId(b.attr("for"))).parent().next().click();a.preventDefault?a.preventDefault():a.returnValue=!1});this.outputs.on("keydown",function(a){switch(a.keyCode){case 38:b.toggle($(this),1);a.preventDefault?a.preventDefault():a.returnValue=!1;break;case 40:b.toggle($(this),-1);a.preventDefault?a.preventDefault():a.returnValue=!1;break;case 39:b.toggle($(this),1);a.preventDefault?
a.preventDefault():a.returnValue=!1;break;case 37:b.toggle($(this),-1);a.preventDefault?a.preventDefault():a.returnValue=!1;break;case 32:b.toggle($(this),1),a.preventDefault?a.preventDefault():a.returnValue=!1}});this.cfg.behaviors&&PrimeFaces.attachBehaviors(this.inputs,this.cfg.behaviors);this.inputs.data(PrimeFaces.CLIENT_ID_DATA,this.id)},toggle:function(a,b){var c=a.prev().find(":input");if(!a.hasClass("ui-state-disabled")){var d=parseInt(c.val());b=this.fixedMod(d+b,3);c.val(b);0==b?a.removeClass("ui-state-active"):
a.addClass("ui-state-active");var h=a.data("iconstates");a.children().removeClass(h[d]).addClass(h[b]);d=a.data("titlestates");null!=d&&0<d.length&&a.attr("title",d[b]);c.change()}}});
PrimeFaces.widget.ExtGChart=PrimeFaces.widget.BaseWidget.extend({init:function(a){var b=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(){b.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),b=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(a){jQuery(b.jqId+"_hidden").val(JSON.stringify(b.wrapper.getChart().getSelection()));b.cfg.behaviors.select.call(jQuery(b.jqId+"_hidden"))});this.wrapper.draw()}});