var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b=b.cfg.minLength?(b.timeout&&b.deleteTimeout(),(a=b.cfg.delay)&&0=this.cfg.selectLimit)return;a='\x3cli data-token-value\x3d"'+PrimeFaces.escapeHTML(b);a=a+'"class\x3d"ui-autocomplete-token ui-state-active ui-corner-all ui-helper-hidden'+ ((""===c?"":" "+c)+'" role\x3d"option" aria-label\x3d"')+(PrimeFaces.escapeHTML(d)+'" ');a=a+'aria-selected\x3d"true"\x3e\x3cspan class\x3d"ui-autocomplete-token-icon ui-icon ui-icon-close" aria-hidden\x3d"true"\x3e\x3c/span\x3e\x3cspan class\x3d"ui-autocomplete-token-label"\x3e'+(PrimeFaces.escapeHTML(d)+"\x3c/span\x3e\x3c/li\x3e");this.inputContainer.before(a);this.multiItemContainer.children(".ui-helper-hidden").fadeIn();this.input.val("");this.input.removeAttr("placeholder");this.hinput.append('\x3coption value\x3d"'+ PrimeFaces.escapeHTML(b)+'" selected\x3d"selected"\x3e\x3c/option\x3e');this.multiItemContainer.children("li.ui-autocomplete-token").length>=this.cfg.selectLimit&&(this.input.css("display","none").trigger("blur"),this.disableDropdown());this.invokeItemSelectBehavior(b)}}else this.input.val(a.attr("data-item-label")),this.currentText=this.input.val(),this.previousText=this.input.val(),this.cfg.pojo&&this.hinput.val(b),this.invokeItemSelectBehavior(b);this.cfg.onChange&&this.cfg.onChange.call(this); this.isTabPressed||this.input.trigger("focus")}}},removeItem:function(a){var b=this,c="";if(!b.input.hasClass("ui-state-disabled")&&!b.input.attr("readonly")&&(c="string"===typeof a||a instanceof String?a:a.attr("data-token-value"),a=this.multiItemContainer.children("li.ui-autocomplete-token[data-token-value\x3d'"+$.escapeSelector(c)+"']"),a.length)){var d=a.index();c&&-1!==d&&(this.hinput.children("option").eq(d).remove(),a.fadeOut("fast",function(){$(this).remove();b.invokeItemUnselectBehavior(c)}), this.placeholder&&0===this.hinput.children("option").length&&this.input.attr("placeholder",this.placeholder))}},removeAllItems:function(){var a=this;this.cfg.multiple&&!this.input.val().length&&this.multiItemContainer.find(".ui-autocomplete-token").each(function(b){a.removeItem($(this))})},setupForceSelection:function(){this.currentItems=[this.input.val()];var a=this;this.input.on("blur",function(b){b=null==b.relatedTarget||PrimeFaces.escapeClientId(b.relatedTarget.id)!==a.panelId;var c=$(this).val(), d=a.isValid(c,b);a.cfg.autoSelection&&d&&a.checkMatchedItem&&a.items&&!a.isTabPressed&&!a.itemSelectedWithEnter&&b&&(b=a.items.filter('[data-item-label\x3d"'+$.escapeSelector(c)+'"]'),b.length&&b.trigger("click"));a.checkMatchedItem=!1})},disable:function(){this.jq.addClass("ui-state-disabled");PrimeFaces.utils.disableInputWidget(this.input);this.dropdown.length&&this.disableDropdown()},enable:function(){this.jq.removeClass("ui-state-disabled");PrimeFaces.utils.enableInputWidget(this.input);this.dropdown.length&& this.enableDropdown()},close:function(){this.hide()},deactivate:function(){this.active=!1},activate:function(){this.active=!0},alignPanel:function(){var a=null;if(this.cfg.multiple)a=this.multiItemContainer.outerWidth();else{this.panel.is(":visible")?a=this.panel.children(".ui-autocomplete-items").outerWidth():(this.panel.css({visibility:"hidden",display:"block"}),a=this.panel.children(".ui-autocomplete-items").outerWidth(),this.panel.css({visibility:"visible",display:"none"}));var b=this.input.outerWidth(); athis.cfg.scrollHeight?this.panel.height(this.cfg.scrollHeight):this.panel.css("height","auto"));this.panel.css({left:"",top:"",width:a+"px","z-index":PrimeFaces.nextZindex(),"transform-origin":"center top"});this.panel.parent().is(this.jq)?this.panel.css({left:"0px",top:this.jq.innerHeight()+"px","transform-origin":"center top"}):this.panel.position({my:this.cfg.myPos,at:this.cfg.atPos, of:this.cfg.multiple?this.jq:this.input,collision:"flipfit",using:function(c,d){$(this).css("transform-origin","center "+d.vertical).css(c)}})},displayAriaStatus:function(a){this.status.html("\x3cdiv\x3e"+PrimeFaces.escapeHTML(a)+"\x3c/div\x3e")},changeAriaValue:function(a){a&&this.input.attr("aria-activedescendant",a.id)},highlightItem:function(a,b){b?a.addClass("ui-state-highlight"):a.removeClass("ui-state-highlight");a.attr("aria-selected",b)},groupItems:function(){var a=this;if(this.items.length){this.itemContainer= this.panel.children(".ui-autocomplete-items");var b=this.items.eq(0);if(!b.hasClass("ui-autocomplete-moretext")){this.currentGroup=b.data("item-group");var c=b.data("item-group-tooltip");b.before(this.getGroupItem(a.currentGroup,a.itemContainer,c))}this.items.filter(":not(.ui-autocomplete-moretext)").each(function(d){d=a.items.eq(d);var e=d.data("item-group"),f=d.data("item-group-tooltip");a.currentGroup!==e&&(a.currentGroup=e,d.before(a.getGroupItem(e,a.itemContainer,f)))})}},getGroupItem:function(a, b,c){b.is(".ui-autocomplete-table")?(this.colspan||(this.colspan=this.items.eq(0).children("td").length),a=$('\x3ctr class\x3d"ui-autocomplete-group ui-widget-header"\x3e\x3ctd colspan\x3d"'+this.colspan+'"\x3e'+a+"\x3c/td\x3e\x3c/tr\x3e")):a=$('\x3cli class\x3d"ui-autocomplete-group ui-autocomplete-list-item ui-widget-header"\x3e'+a+"\x3c/li\x3e");a&&a.attr("title",c);return a},deleteTimeout:function(){clearTimeout(this.timeout);this.timeout=null},fireClearEvent:function(){this.callBehavior("clear"); this.previousText=this.currentText;this.currentText=""},isValid:function(a,b){if(this.cfg.forceSelection){for(var c=!1,d=0;d=d.height()&&(b=(b=this.content[a].getBoundingClientRect().width)?"width: "+b+"px":"",e=this.content[a].cloneNode(!0), e.style.cssText="position: fixed; top: 0; left: 0; overflow: auto; visibility: hidden; pointer-events: none; height: unset; max-height: unset;"+b,document.body.append(e),f=$(e),b=f.outerHeight(),e=f.outerWidth(),f.remove());d.css({left:(c.width()-e)/2+"px",top:(c.height()-b)/2+"px","z-index":PrimeFaces.nextZindex()})}},hasContent:function(){return 0=this.numVisible; this.isVertical="vertical"===this.cfg.orientation;this.isAutoplay=this.totalIndicators&&this.cfg.autoplayInterval&&this.allowAutoplay;this.renderDeferred()},_render:function(){this.createStyle();this.cfg.circular&&this.cloneItems();this.calculatePosition();this.updatePage();this.bindEvents();this.cfg.responsiveOptions&&this.bindDocumentListeners()},refresh:function(a){this.stopAutoplay();this._super(a)},bindEvents:function(){var a=this;this.indicatorsContainer.off("click.indicator",".ui-carousel-indicator").on("click.indicator", ".ui-carousel-indicator",null,function(b){var c=$(this).index();a.onIndicatorClick(b,c)});this.prevNav.on("click",function(b){a.navBackward(b)});this.nextNav.on("click",function(b){a.navForward(b)});this.itemsContainer.on("transitionend",function(){a.onTransitionEnd()});PrimeFaces.env.isTouchable(this.cfg)&&(this.isVertical?this.itemsContent.swipe({swipeUp:function(b){a.navForward(b)},swipeDown:function(b){a.navBackward(b)},excludedElements:PrimeFaces.utils.excludedSwipeElements()}):this.itemsContent.swipe({swipeLeft:function(b){a.navForward(b)}, swipeRight:function(b){a.navBackward(b)},excludedElements:PrimeFaces.utils.excludedSwipeElements()}))},updatePage:function(){this.initPageState();this.updateNavigators();this.updateIndicators();this.styleActiveItems()},initPageState:function(){this.totalIndicators=this.getTotalIndicators();var a=!1,b=this.totalShiftedItems;this.cfg.autoplayInterval&&this.stopAutoplay();if(this.oldNumScroll!==this.numScroll||this.oldNumVisible!==this.numVisible){this.remainingItems=(this.itemsCount-this.numVisible)% this.numScroll;var c=this.page;0!==this.totalIndicators&&c>=this.totalIndicators&&(this.page=c=this.totalIndicators-1,a=!0);b=c*this.numScroll*-1;this.isCircular&&(b-=this.numVisible);c===this.totalIndicators-1&&0=a&&(b=d)}a=!1;this.numScroll!==b.numScroll&&(a=this.page,a=parseInt(a*this.numScroll/b.numScroll),this.totalShiftedItems=b.numScroll*a*-1,this.isCircular&&(this.totalShiftedItems-=b.numVisible),this.numScroll=b.numScroll,this.page=a,a=!0);this.numVisible!==b.numVisible&&(this.numVisible=b.numVisible,a=!0);a&&(this.updatePage(), this.cfg.circular&&this.cloneItems())}},navBackward:function(a,b){this.isAutoplay=!1;(this.circular||0!==this.page)&&this.step(1,b);a.cancelable&&a.preventDefault()},navForward:function(a,b){this.isAutoplay=!1;(this.circular||this.pagec?this.navForward(a,b):bf?1:0)});for(var c=0;c= d&&a.eq(d).addClass("ui-carousel-item-active"),b===d&&a.eq(d).addClass("ui-carousel-item-start"),c===d&&a.eq(d).addClass("ui-carousel-item-end")},renderIndicators:function(){var a="";if(this.cfg.paginator)for(var b=0;b=$(document).height()*a.cfg.buffer-$(window).height()&&a.shouldLoad()&&a.load()});else{this.itemHeight=0;if(this.cfg.virtualScroll){var b= this.list.children("li.ui-datascroller-item");b&&(this.itemHeight=b.outerHeight(),this.content.children("div").css("min-height",parseFloat(this.cfg.totalSize*this.itemHeight+"px")));if(this.cfg.startAtBottom){b=this.itemHeight*this.cfg.chunkSize;var c=parseFloat(this.cfg.totalSize*this.itemHeight),d=this.content.height(),e=Math.floor(c/b)||1;e=0==this.cfg.totalSize%this.cfg.chunkSize?e-2:e-1;this.list.css("top",(cthis.cfg.chunkSize?this.cfg.totalSize-this.cfg.chunkSize:this.cfg.totalSize,b="0",this.content.height()>this.list.height()&&(b=this.getInnerContentHeight()-this.list.outerHeight()-this.loaderContainer.outerHeight()),this.list.css("padding-top",b+"px"));this.content.on("scroll",function(){if(a.cfg.virtualScroll){var f=this;clearTimeout(a.scrollTimeout);a.scrollTimeout=setTimeout(function(){var l=a.content.outerHeight(), m=a.list.outerHeight()+Math.ceil(l-a.content.height()),n=a.itemHeight*a.cfg.chunkSize,p=parseFloat(a.cfg.totalSize*a.itemHeight)/n||1;if(f.scrollTop+l>parseFloat(a.list.css("top"))+m||f.scrollTopa.cfg.chunkSize: g>=h*a.cfg.buffer-k)&&a.load()}})}},loadRowsWithVirtualScroll:function(a,b){if(!this.virtualScrollActive){this.virtualScrollActive=!0;var c=this;a=(a-1)*this.cfg.chunkSize;a={source:this.id,process:this.id,update:this.id,formId:this.getParentFormId(),params:[{name:this.id+"_virtualScrolling",value:!0},{name:this.id+"_first",value:a}],onsuccess:function(d,e,f){PrimeFaces.ajax.Response.handle(d,e,f,{widget:c,handle:function(g){this.updateData(g);b();this.virtualScrollActive=!1}});return!0},oncomplete:function(d, e,f){"undefined"!==typeof f.totalSize&&(c.cfg.totalSize=f.totalSize)}};PrimeFaces.ajax.Request.handle(a)}},updateData:function(a,b,c){void 0===b||b?this.list.html(a):c?this.list.prepend(a):this.list.append(a)},bindManualLoader:function(){var a=this;this.loadTrigger.on("click.dataScroller",function(b){a.load();b.preventDefault()})},load:function(){this.loading=!0;this.cfg.offset+=this.cfg.chunkSize*(this.cfg.startAtBottom?-1:1);this.loadStatus.appendTo(this.loaderContainer);this.loadTrigger&&this.loadTrigger.hide(); var a=this,b={source:this.id,process:this.id,update:this.id,global:!1,ignoreAutoUpdate:!0,params:[{name:this.id+"_load",value:!0},{name:this.id+"_offset",value:this.cfg.offset}],onsuccess:function(c,d,e){PrimeFaces.ajax.Response.handle(c,d,e,{widget:a,handle:function(f){this.updateData(f,!1,a.cfg.startAtBottom)}});return!0},oncomplete:function(){0>a.cfg.offset&&(a.cfg.offset=0);a.loading=!1;a.allLoaded=a.cfg.startAtBottom?0==a.cfg.offset:a.cfg.offset+a.cfg.chunkSize>=a.cfg.totalSize;a.loadStatus.remove(); a.loadTrigger&&!a.allLoaded&&a.loadTrigger.show()}};this.hasBehavior("load")?this.callBehavior("load",b):PrimeFaces.ajax.Request.handle(b)},shouldLoad:function(){return!this.loading&&!this.allLoaded},getInnerContentHeight:function(){return this.content.innerHeight()-parseFloat(this.content.css("padding-top"))-parseFloat(this.content.css("padding-bottom"))}}); PrimeFaces.widget.DataTable=PrimeFaces.widget.DeferredWidget.extend({SORT_ORDER:{ASCENDING:1,DESCENDING:-1,UNSORTED:0},init:function(a){this._super(a);this.thead=this.getThead();this.tbody=this.getTbody();this.tfoot=this.getTfoot();this.cfg.paginator&&this.bindPaginator();this.cfg.sorting&&this.bindSortEvents();this.cfg.rowHover&&this.setupRowHover();this.cfg.selectionMode&&this.setupSelection();this.cfg.filter&&this.setupFiltering();this.cfg.expansion&&(this.expansionProcess=[],this.bindExpansionEvents()); this.cfg.editable&&this.bindEditEvents();this.cfg.draggableRows&&this.makeRowsDraggable();this.cfg.reflow&&this.initReflow();this.cfg.resizableColumns&&(this.resizableStateHolder=$(this.jqId+"_resizableColumnState"),this.resizableState=[],this.resizableStateHolder.attr("value")&&(this.resizableState=this.resizableStateHolder.val().split(",")));this.updateEmptyColspan();this.renderDeferred()},_render:function(){var a=this;this.isRTL=this.jq.hasClass("ui-datatable-rtl");this.cfg.partialUpdate=!1=== this.cfg.partialUpdate?!1:!0;this.cfg.scrollable&&this.setupScrolling();this.cfg.groupColumnIndexes&&(this.groupRows(),this.bindToggleRowGroupEvents());this.cfg.resizableColumns&&this.setupResizableColumns();this.cfg.draggableColumns&&this.setupDraggableColumns();this.cfg.stickyHeader&&setTimeout(function(){a.setupStickyHeader()},1);this.cfg.onRowClick&&this.bindRowClick();this.cfg.expansion&&(this.initRowExpansion(),this.updateExpandedRowsColspan());this.cfg.reflow&&this.jq.css("visibility","visible")}, getThead:function(){return $(this.jqId+"_head")},getTbody:function(){return $(this.jqId+"_data")},getTfoot:function(){return $(this.jqId+"_foot")},updateData:function(a,b){void 0===b||b?this.tbody.html(a):this.tbody.append(a);this.postUpdateData()},postUpdateData:function(){this.cfg.draggableRows&&this.makeRowsDraggable();this.cfg.reflow&&this.initReflow();this.cfg.groupColumnIndexes&&(this.groupRows(),this.bindToggleRowGroupEvents());this.cfg.expansion&&this.initRowExpansion()},refresh:function(a){this.ignoreRowHoverEvent= this.columnWidthsFixed=!1;this.unbindEvents();this._super(a)},unbindEvents:function(){this.sortableColumns&&this.sortableColumns.off();this.paginator&&this.paginator.unbindEvents();if(this.cfg.draggableColumns||this.cfg.draggableRows){var a=$.ui.ddmanager.current;a&&a.helper&&(a.currentItem||a.element).closest(".ui-datatable")[0]===this.jq[0]&&(document.body.style.cursor="default",a.cancel())}},bindPaginator:function(){var a=this;this.cfg.paginator.paginate=function(c){a.cfg.clientCache?a.loadDataWithCache(c): a.paginate(c)};this.paginator=new PrimeFaces.widget.Paginator(this.cfg.paginator);this.paginator.bindSwipeEvents(this.jq,this.cfg);if(this.cfg.clientCache){this.cacheRows=this.paginator.getRows();var b={first:this.paginator.getFirst(),rows:this.paginator.getRows(),page:this.paginator.getCurrentPage()};this.clearCacheMap();this.fetchNextPage(b)}},bindSortEvents:function(){var a=this,b=!1;this.cfg.tabindex=this.cfg.tabindex||"0";this.cfg.multiSort=this.cfg.multiSort||!1;this.cfg.allowUnsorting=this.cfg.allowUnsorting|| !1;this.headers=this.thead.find("\x3e tr \x3e th");this.sortableColumns=this.headers.filter(".ui-sortable-column");this.sortableColumns.attr("tabindex",this.cfg.tabindex);this.ascMessage=PrimeFaces.getAriaLabel("datatable.sort.ASC");this.descMessage=PrimeFaces.getAriaLabel("datatable.sort.DESC");this.otherMessage=this.cfg.allowUnsorting?PrimeFaces.getAriaLabel("datatable.sort.NONE"):PrimeFaces.getAriaLabel("datatable.sort.ASC");this.reflowDD=$(this.jqId+"_reflowDD");this.sortMeta=[];for(var c=0;c< this.sortableColumns.length;c++){var d=this.sortableColumns.eq(c),e=d.attr("id"),f=d.children("span.ui-sortable-column-icon"),g=null,h=null;h=d.attr("aria-label");d.hasClass("ui-state-active")?(f.hasClass("ui-icon-triangle-1-n")?(g=this.SORT_ORDER.ASCENDING,d.attr("aria-label",this.getSortMessage(h,this.descMessage)),b||(d.attr("aria-sort","ascending"),b=!0)):f.hasClass("ui-icon-triangle-1-s")?(g=this.SORT_ORDER.DESCENDING,d.attr("aria-label",this.getSortMessage(h,this.otherMessage)),b||(d.attr("aria-sort", "descending"),b=!0)):(g=this.SORT_ORDER.UNSORTED,d.attr("aria-label",this.getSortMessage(h,this.ascMessage)),b||(d.attr("aria-sort","other"),b=!0)),this.cfg.multiSort&&this.cfg.sortMetaOrder&&(h=$.inArray(e,this.cfg.sortMetaOrder),this.sortMeta[h]={col:e,order:g}),a.updateReflowDD(d,g)):(g=this.SORT_ORDER.UNSORTED,d.attr("aria-label",this.getSortMessage(h,this.ascMessage)),b||c!=this.sortableColumns.length-1||(this.sortableColumns.eq(0).attr("aria-sort","other"),b=!0));d.data("sortorder",g)}this.sortableColumns.on("mouseenter.dataTable", function(){$(this).addClass("ui-state-hover")}).on("mouseleave.dataTable",function(){$(this).removeClass("ui-state-hover")}).on("blur.dataTable",function(){$(this).removeClass("ui-state-focus")}).on("focus.dataTable",function(){$(this).addClass("ui-state-focus")}).on("keydown.dataTable",function(k){"Enter"===k.key&&$(k.target).is(":not(:input)")&&($(this).trigger("click.dataTable",k.metaKey||k.ctrlKey),k.preventDefault())}).on("click.dataTable",function(k,l){if(a.shouldSort(k,this)){PrimeFaces.clearSelection(); var m=$(this),n=m.data("sortorder");n=n===a.SORT_ORDER.UNSORTED?a.SORT_ORDER.ASCENDING:n===a.SORT_ORDER.ASCENDING?a.SORT_ORDER.DESCENDING:a.cfg.allowUnsorting?a.SORT_ORDER.UNSORTED:a.SORT_ORDER.ASCENDING;k=k.metaKey||k.ctrlKey||l;a.cfg.multiSort&&k||(a.sortMeta=[]);a.addSortMeta({col:m.attr("id"),order:n});a.sort(m,n,a.cfg.multiSort&&k);a.cfg.scrollable&&$(PrimeFaces.escapeClientId(m.attr("id")+"_clone")).trigger("focus");a.updateReflowDD(m,n)}});a.updateSortPriorityIndicators();this.reflowDD&&this.cfg.reflow&& (PrimeFaces.skinSelect(this.reflowDD),this.reflowDD.on("change",function(k){var l=$(this).find(":selected");k=l.data("columnkey");l=l.data("sortorder");k=a.jq.find(PrimeFaces.escapeClientId(k));k.data("sortorder",l);k.trigger("click.dataTable")}))},getSortMessage:function(a,b){return(a?a.split(":")[0]:"")+": "+b},shouldSort:function(a,b){if(this.isEmpty())return!1;a=$(a.target);return a.closest(".ui-column-customfilter",b).length?!1:a.is("th,span")},addSortMeta:function(a){this.sortMeta=$.grep(this.sortMeta, function(b){return b.col!==a.col});this.sortMeta.push(a)},setupFiltering:function(){var a=this,b=this.thead.find("\x3e tr \x3e th.ui-filter-column");this.cfg.filterEvent=this.cfg.filterEvent||"keyup";this.cfg.filterDelay=this.cfg.filterDelay||300;b.children(".ui-column-filter").each(function(){var c=$(this);c.is("input:text")?(PrimeFaces.skinInput(c),a.bindTextFilter(c)):(PrimeFaces.skinSelect(c),a.bindChangeFilter(c))})},bindTextFilter:function(a){"enter"===this.cfg.filterEvent?this.bindEnterKeyFilter(a): this.bindFilterEvent(a);if(PrimeFaces.env.isTouchable(this.cfg))a.on("touchstart",function(b){b.stopPropagation()})},bindChangeFilter:function(a){var b=this;a.off("change").on("change",function(){b.filter()})},bindEnterKeyFilter:function(a){var b=this;a.off("keydown").on("keydown",function(c){"Enter"===c.key&&(b.filter(),c.preventDefault(),c.stopPropagation())})},bindFilterEvent:function(a){var b=this;a.on(this.cfg.filterEvent+".dataTable",function(c){c.key&&PrimeFaces.utils.ignoreFilterKey(c)||("Enter"=== c.key?(c.preventDefault(),c.stopPropagation()):(b.filterTimeout&&clearTimeout(b.filterTimeout),b.filterTimeout=setTimeout(function(){b.filter();b.filterTimeout=null},b.cfg.filterDelay)))})},setupRowHover:function(){this.cfg.selectionMode&&"checkbox"!==this.cfg.selectionMode||this.bindRowHover("\x3e tr.ui-widget-content")},setupSelection:function(){this.selectionHolder=this.jqId+"_selection";this.cfg.rowSelectMode=this.cfg.rowSelectMode||"new";this.rowSelector="\x3e tr.ui-widget-content.ui-datatable-selectable"; this.cfg.disabledTextSelection=!1===this.cfg.disabledTextSelection?!1:!0;this.cfg.selectionPageOnly=!1!==this.cfg.selectionPageOnly;this.rowSelectorForRowClick=this.cfg.rowSelector||"td:not(.ui-column-unselectable):not(.ui-grouped-column),span:not(.ui-c)";var a=$(this.selectionHolder).val();this.selection=a?a.split(","):[];this.cursorIndex=this.originRowIndex=null;this.bindSelectionEvents()},bindSelectionEvents:function(){"radio"===this.cfg.selectionMode?(this.bindRadioEvents(),"none"!==this.cfg.rowSelectMode? this.bindRowEvents():this.jq.find("tr.ui-datatable-selectable").css("cursor","default")):"checkbox"===this.cfg.selectionMode?(this.bindCheckboxEvents(),this.updateHeaderCheckbox(),"none"!==this.cfg.rowSelectMode?this.bindRowEvents():this.jq.find("tr.ui-datatable-selectable").css("cursor","default")):this.bindRowEvents()},bindRowEvents:function(){var a=this;this.bindRowHover(this.rowSelector);this.tbody.off("click.dataTable mousedown.dataTable",this.rowSelector).on("mousedown.dataTable",this.rowSelector, null,function(b){a.mousedownOnRow=!0}).on("click.dataTable",this.rowSelector,null,function(b){a.onRowClick(b,this);a.mousedownOnRow=!1});if(this.hasBehavior("rowDblselect"))this.tbody.off("dblclick.dataTable",this.rowSelector).on("dblclick.dataTable",this.rowSelector,null,function(b){a.onRowDblclick(b,$(this))});this.bindSelectionKeyEvents()},bindSelectionKeyEvents:function(){var a=this;this.getFocusableTbody().on("focus",function(b){a.mousedownOnRow||(a.focusedRow=a.tbody.children("tr.ui-widget-content.ui-datatable-selectable.ui-state-highlight").eq(0), 0==a.focusedRow.length&&(a.focusedRow=a.tbody.children("tr.ui-widget-content.ui-datatable-selectable").eq(0)),a.highlightFocusedRow(),a.cfg.scrollable&&PrimeFaces.scrollInView(a.scrollBody,a.focusedRow))}).on("blur",function(){a.focusedRow&&(a.unhighlightFocusedRow(),a.focusedRow=null)}).on("keydown",function(b){if(!$(b.target).is(":input")&&a.focusedRow)switch(b.key){case "ArrowUp":case "ArrowDown":var c="ArrowUp"===b.key?a.focusedRow.prevAll("tr.ui-widget-content.ui-datatable-selectable").eq(0): a.focusedRow.nextAll("tr.ui-widget-content.ui-datatable-selectable").eq(0);c.length&&(a.unhighlightFocusedRow(),a.isCheckboxSelectionEnabled()?c.find("\x3e td.ui-selection-column .ui-chkbox input").trigger("focus"):a.focusedRow=c,a.highlightFocusedRow(),a.cfg.scrollable&&PrimeFaces.scrollInView(a.scrollBody,a.focusedRow));b.preventDefault();break;case "Enter":case " ":a.focusedRowWithCheckbox?a.focusedRow.find("\x3e td.ui-selection-column \x3e div.ui-chkbox \x3e div.ui-chkbox-box").trigger("click.dataTable"): (b.target=a.focusedRow.children().eq(0).get(0),a.onRowClick(b,a.focusedRow.get(0))),b.preventDefault()}})},highlightFocusedRow:function(){this.focusedRow.addClass("ui-state-hover")},unhighlightFocusedRow:function(){this.focusedRow.removeClass("ui-state-hover")},assignFocusedRow:function(a){this.focusedRow=a},bindRowHover:function(a){var b=this;this.tbody.off("mouseenter.dataTable mouseleave.dataTable",a).on("mouseenter.dataTable",a,null,function(){b.ignoreRowHoverEvent||$(this).addClass("ui-state-hover")}).on("mouseleave.dataTable", a,null,function(){b.ignoreRowHoverEvent||$(this).removeClass("ui-state-hover")});this.cfg.groupColumnIndexes&&(a+=" \x3e td",this.tbody.off("mouseenter.dataTable mouseleave.dataTable",a).on("mouseenter.dataTable",a,null,function(){var c=$(this).parent();$(this).hasClass("ui-grouped-column")?(c.removeClass("ui-state-hover"),b.ignoreRowHoverEvent=!0):c.addClass("ui-state-hover")}).on("mouseleave.dataTable",a,null,function(){$(this).hasClass("ui-grouped-column")||(b.ignoreRowHoverEvent=!1)}))},bindRadioEvents:function(){var a= this;if(this.cfg.nativeElements)this.tbody.off("click.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column :radio").on("click.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column :radio",null,function(b){b=$(this);b.prop("checked")||a.selectRowWithRadio(b)});else this.tbody.off("click.dataTable mouseenter.dataTable mouseleave.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column .ui-radiobutton .ui-radiobutton-box").on("mouseenter.dataTable", "\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column .ui-radiobutton .ui-radiobutton-box",null,function(){var b=$(this);b.hasClass("ui-state-disabled")||b.addClass("ui-state-hover")}).on("mouseleave.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column .ui-radiobutton .ui-radiobutton-box",null,function(){$(this).removeClass("ui-state-hover")}).on("click.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column .ui-radiobutton .ui-radiobutton-box", null,function(){var b=$(this),c=b.hasClass("ui-state-active");b.hasClass("ui-state-disabled")||(b.prev().children(":radio").trigger("focus.dataTable"),c||a.selectRowWithRadio(b))});this.tbody.off("focus.dataTable blur.dataTable change.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column :radio").on("focus.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column :radio",null,function(){$(this).parent().next().addClass("ui-state-focus")}).on("blur.dataTable", "\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column :radio",null,function(){$(this).parent().next().removeClass("ui-state-focus")}).on("change.dataTable","\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column :radio",null,function(){var b=a.tbody.find("\x3e tr.ui-widget-content:not(.ui-datatable-empty-message) \x3e td.ui-selection-column :radio").filter(":checked").parent().next();a.selectRowWithRadio(b)})},bindCheckboxEvents:function(){var a= this;if(this.cfg.nativeElements){var b="tr.ui-widget-content.ui-datatable-selectable \x3e td.ui-selection-column :checkbox";this.checkAllToggler=this.thead.find("\x3e tr \x3e th.ui-selection-column \x3e :checkbox");this.checkAllToggler.on("click",function(){a.toggleCheckAll()});this.jq.off("click.dataTable",b).on("click.dataTable",b,null,function(c){c=$(this);c.prop("checked")?a.selectRowWithCheckbox(c):a.unselectRowWithCheckbox(c)})}else b="tr.ui-widget-content.ui-datatable-selectable \x3e td.ui-selection-column \x3e div.ui-chkbox \x3e div.ui-chkbox-box", this.checkAllToggler=this.thead.find("\x3e tr \x3e th.ui-selection-column \x3e div.ui-chkbox.ui-chkbox-all \x3e div.ui-chkbox-box"),this.checkAllToggler.on("mouseenter",function(){var c=$(this);c.hasClass("ui-state-disabled")||c.addClass("ui-state-hover")}).on("mouseleave",function(){$(this).removeClass("ui-state-hover")}).on("click",function(){$(this).hasClass("ui-state-disabled")||a.toggleCheckAll()}).on("keydown",function(c){PrimeFaces.utils.isActionKey(c)&&($(this).hasClass("ui-state-disabled")|| a.toggleCheckAll())}),this.jq.off("mouseenter.dataTable mouseleave.dataTable click.dataTable",b).on("mouseenter.dataTable",b,null,function(){$(this).addClass("ui-state-hover")}).on("mouseleave.dataTable",b,null,function(){$(this).removeClass("ui-state-hover")}).on("click.dataTable",b,null,function(){var c=$(this);"true"===c.attr("aria-checked")?a.unselectRowWithCheckbox(c):a.selectRowWithCheckbox(c)});this.tbody.off("focus.dataTable blur.dataTable change.dataTable",b).on("focus.dataTable",b,null, function(){var c=$(this);c.addClass("ui-state-focus");a.focusedRow=c.closest(".ui-datatable-selectable");a.focusedRowWithCheckbox=!0}).on("blur.dataTable",b,null,function(){$(this).removeClass("ui-state-focus");a.unhighlightFocusedRow();a.focusedRow=null;a.focusedRowWithCheckbox=!1}).on("change.dataTable",b,null,function(c){c=$(this);"true"===c.attr("aria-checked")||c.prop("checked")?a.selectRowWithCheckbox(c):a.unselectRowWithCheckbox(c)});this.checkAllToggler.on("focus.dataTable",function(c){c= $(this);c.hasClass("ui-state-disabled")||c.addClass("ui-state-focus")}).on("blur.dataTable",function(c){$(this).removeClass("ui-state-focus")}).on("change.dataTable",function(c){c=$(this);c.hasClass("ui-state-disabled")||("true"===c.attr("aria-checked")||c.prop("checked")||c.addClass("ui-state-active"),a.toggleCheckAll(),("true"===c.attr("aria-checked")||c.prop("checked"))&&c.removeClass("ui-state-active"))})},toggleRow:function(a){a&&!this.isRowTogglerClicked&&(a=a.find("\x3e td \x3e div.ui-row-toggler"), this.toggleExpansion(a));this.isRowTogglerClicked=!1},bindExpansionEvents:function(){var a=this;this.tbody.off("click.datatable-expansion","\x3e tr \x3e td \x3e div.ui-row-toggler").on("click.datatable-expansion","\x3e tr \x3e td \x3e div.ui-row-toggler",null,function(){a.isRowTogglerClicked=!0;a.toggleExpansion($(this))}).on("keydown.datatable-expansion","\x3e tr \x3e td \x3e div.ui-row-toggler",null,function(b){"Enter"===b.key&&(a.toggleExpansion($(this)),b.preventDefault())})},bindContextMenu:function(a, b,c,d){var e=this;c+=" tbody.ui-datatable-data \x3e tr.ui-widget-content";var f=d.event+".datatable"+this.id;this.contextMenuWidget=a;$(document).off(f,c).on(f,c,null,function(g){var h=$(this);b.cfg.selectionMode&&h.hasClass("ui-datatable-selectable")?(h=b.onRowRightClick(g,this,d.selectionMode,function(){e.contextMenuWidget.show(g)}),b.updateContextMenuCell(g,b),h&&(g.preventDefault(),g.stopPropagation())):"cell"===b.cfg.editMode?(b.updateContextMenuCell(g,b),e.contextMenuWidget.show(g)):h.hasClass("ui-datatable-empty-message")&& !e.cfg.disableContextMenuIfEmpty&&e.contextMenuWidget.show(g)});this.addDestroyListener(function(){$(document).off(f)});if(this.cfg.scrollable&&this.scrollBody)this.scrollBody.off("scroll.dataTable-contextmenu").on("scroll.dataTable-contextmenu",function(){e.contextMenuWidget.jq.is(":visible")&&e.contextMenuWidget.hide()})},updateContextMenuCell:function(a,b){a=$(a.target);a=a.is("td.ui-editable-column")?a:a.parents("td.ui-editable-column:first");b.contextMenuCell&&b.contextMenuCell.removeClass("ui-state-highlight"); b.contextMenuCell=a;b.contextMenuCell.addClass("ui-state-highlight")},bindRowClick:function(){var a=this;this.tbody.off("click.dataTable-rowclick","\x3e tr.ui-widget-content:not(.ui-expanded-row-content)").on("click.dataTable-rowclick","\x3e tr.ui-widget-content:not(.ui-expanded-row-content)",null,function(b){b=$(b.target);b=b.is("tr.ui-widget-content")?b:b.closest("tr.ui-widget-content");a.cfg.onRowClick.call(this,b)})},initReflow:function(){for(var a=this.thead.find("\x3e tr \x3e th"),b=0;b=a.cfg.scrollLimit);this.restoreScrollState();if(this.cfg.virtualScroll&& (b=this.bodyTable.children("tbody").children("tr.ui-widget-content"))){c=b.eq(0).hasClass("ui-datatable-empty-message");var d=a.cfg.scrollLimit;c&&(d=1,a.bodyTable.css("top","0px"));this.rowHeight=b.outerHeight();this.scrollBody.children("div").css("height",parseFloat(d*this.rowHeight+1+"px"));c&&this.cfg.scrollHeight&&this.percentageScrollHeight&&setTimeout(function(){a.adjustScrollHeight()},10)}this.scrollBody.on("scroll.dataTable",function(){var e=a.scrollBody.scrollLeft();a.isRTL?(a.scrollHeaderBox.css("margin-right", e+"px"),a.scrollFooterBox.css("margin-right",e+"px")):(a.scrollHeaderBox.css("margin-left",-e+"px"),a.scrollFooterBox.css("margin-left",-e+"px"));if(!a.isEmpty()){if(a.cfg.virtualScroll){var f=this;clearTimeout(a.scrollTimeout);a.scrollTimeout=setTimeout(function(){var g=a.scrollBody.outerHeight(),h=a.bodyTable.outerHeight(),k=a.rowHeight*a.cfg.scrollStep,l=parseFloat(a.cfg.scrollLimit*a.rowHeight+"px")/k||1;if(f.scrollTop+g>parseFloat(a.bodyTable.css("top"))+h||f.scrollTop=this.scrollHeight*a.cfg.liveScrollBuffer-this.clientHeight&&a.shouldLoadLiveScroll()&&a.loadLiveRows();a.saveScrollState()}});this.scrollHeader.on("scroll.dataTable",function(){a.scrollHeader.scrollLeft(0)});this.scrollFooter.on("scroll.dataTable",function(){a.scrollFooter.scrollLeft(0)});PrimeFaces.utils.registerResizeHandler(this, "resize."+this.id+"_align",a.jq,function(){a.percentageScrollHeight&&a.adjustScrollHeight();a.percentageScrollWidth&&a.adjustScrollWidth()})},shouldLoadLiveScroll:function(){return!this.loadingLiveScroll&&!this.allLoadedLiveScroll},cloneTableHeader:function(a,b){a=a.clone();a.find("th").each(function(){var c=$(this);c.attr("id",c.attr("id")+"_clone");c.removeAttr("aria-label");c.children().not(".ui-column-title").remove();c.children(".ui-column-title").children().remove()});a.removeAttr("id").addClass("ui-datatable-scrollable-theadclone").height(0).prependTo(b); return a},cloneHead:function(){this.theadClone&&this.theadClone.remove();this.theadClone=this.cloneTableHeader(this.thead,this.bodyTable);if(this.cfg.sorting){this.sortableColumns.removeAttr("tabindex").off("blur.dataTable focus.dataTable keydown.dataTable");var a=this.theadClone.find("\x3e tr \x3e th"),b=a.filter(".ui-sortable-column");a.each(function(){var c=$(this),d=c.attr("id").split("_clone")[0];c.hasClass("ui-sortable-column")&&c.data("original",d);$(PrimeFaces.escapeClientId(d))[0].style.width= c[0].style.width});b.on("blur.dataTable",function(){$(PrimeFaces.escapeClientId($(this).data("original"))).removeClass("ui-state-focus")}).on("focus.dataTable",function(){$(PrimeFaces.escapeClientId($(this).data("original"))).addClass("ui-state-focus")}).on("keydown.dataTable",function(c){"Enter"===c.key&&$(c.target).is(":not(:input)")&&($(PrimeFaces.escapeClientId($(this).data("original"))).trigger("click.dataTable",c.metaKey||c.ctrlKey),c.preventDefault())})}},adjustScrollHeight:function(){var a= this.jq.parent().innerHeight()*(parseInt(this.cfg.scrollHeight)/100),b=this.jq.children(".ui-datatable-header"),c=this.jq.children(".ui-datatable-footer");b=0this.scrollBody.outerHeight()},restoreScrollState:function(){var a=this.scrollStateHolder.val().split(",");"-1"==a[0]&&(a[0]=this.scrollBody[0].scrollWidth);this.scrollBody.scrollLeft(a[0]);this.scrollBody.scrollTop(a[1])},saveScrollState:function(){var a=this.scrollBody.scrollLeft()+","+this.scrollBody.scrollTop();this.scrollStateHolder.val(a)},clearScrollState:function(){this.scrollStateHolder.val("0,0")}, fixColumnWidths:function(){var a=this;if(!this.columnWidthsFixed){if(this.cfg.scrollable)this.scrollHeader.find("\x3e .ui-datatable-scrollable-header-box \x3e table \x3e thead \x3e tr \x3e th").each(function(){var d=$(this),e=d.index(),f=a.getColumnWidthInfo(d,!0);a.applyWidthInfo(d,f);0this.cfg.scrollLimit)){this.liveScrollActive=!0;this.scrollOffset+=this.cfg.scrollStep;this.scrollOffset===this.cfg.scrollLimit&&(this.shouldLiveScroll=!1);var a=this,b={source:this.id,process:this.id,update:this.id,formId:this.getParentFormId(), params:[{name:this.id+"_scrolling",value:!0},{name:this.id+"_first",value:1},{name:this.id+"_skipChildren",value:!0},{name:this.id+"_scrollOffset",value:this.scrollOffset},{name:this.id+"_encodeFeature",value:!0}],onsuccess:function(c,d,e){PrimeFaces.ajax.Response.handle(c,d,e,{widget:a,handle:function(f){this.updateData(f,!1);this.liveScrollActive=!1}});return!0},oncomplete:function(c,d,e,f){"undefined"!==typeof e.totalRecords&&(a.cfg.scrollLimit=e.totalRecords);a.loadingLiveScroll=!1;a.allLoadedLiveScroll= a.scrollOffset+a.cfg.scrollStep>=a.cfg.scrollLimit;a.originRowIndex=null}};this.hasBehavior("liveScroll")?this.callBehavior("liveScroll",b):PrimeFaces.ajax.Request.handle(b)}},loadRowsWithVirtualScroll:function(a,b){if(!this.virtualScrollActive){this.virtualScrollActive=!0;var c=this;a=(a-1)*this.cfg.scrollStep;a={source:this.id,process:this.id,update:this.id,formId:this.getParentFormId(),params:[{name:this.id+"_scrolling",value:!0},{name:this.id+"_skipChildren",value:!0},{name:this.id+"_first",value:a}, {name:this.id+"_encodeFeature",value:!0}],onsuccess:function(d,e,f){PrimeFaces.ajax.Response.handle(d,e,f,{widget:c,handle:function(g){this.updateData(g);b();this.virtualScrollActive=!1}});return!0},oncomplete:function(d,e,f,g){"undefined"!==typeof f.totalRecords&&(c.cfg.scrollLimit=f.totalRecords);c.originRowIndex=null}};this.hasBehavior("virtualScroll")?this.callBehavior("virtualScroll",a):PrimeFaces.ajax.Request.handle(a)}},paginate:function(a){var b=this,c={source:this.id,update:this.id,process:this.id, formId:this.getParentFormId(),params:[{name:this.id+"_pagination",value:!0},{name:this.id+"_first",value:a.first},{name:this.id+"_rows",value:a.rows},{name:this.id+"_skipChildren",value:!0},{name:this.id+"_encodeFeature",value:!0}]};this.cfg.partialUpdate?(c.onsuccess=function(d,e,f){PrimeFaces.ajax.Response.handle(d,e,f,{widget:b,handle:function(g){this.updateData(g);this.checkAllToggler&&this.updateHeaderCheckbox();this.cfg.scrollable&&this.alignScrollBody();this.cfg.clientCache&&(this.cacheMap[a.first]= g)}});return!0},c.oncomplete=function(d,e,f,g){b.paginator.cfg.page=a.page;f&&"undefined"!==typeof f.totalRecords?b.paginator.updateTotalRecords(f.totalRecords):b.paginator.updateUI();b.updateColumnsView();b.originRowIndex=null}):(c.params.push({name:this.id+"_fullUpdate",value:!0}),c.onsuccess=function(d,e,f){PrimeFaces.ajax.Response.handle(d,e,f,{widget:b,handle:function(g){this.jq.replaceWith(g)}});return!0});this.hasBehavior("page")?this.callBehavior("page",c):PrimeFaces.ajax.Request.handle(c)}, fetchNextPage:function(a){var b=a.rows,c=a.first,d=this;PrimeFaces.ajax.Request.handle({source:this.id,process:this.id,update:this.id,global:!1,params:[{name:this.id+"_skipChildren",value:!0},{name:this.id+"_encodeFeature",value:!0},{name:this.id+"_first",value:c},{name:this.id+"_rows",value:b},{name:this.id+"_pagination",value:!0},{name:this.id+"_clientCache",value:!0}],onsuccess:function(e,f,g){PrimeFaces.ajax.Response.handle(e,f,g,{widget:d,handle:function(h){h.length&&(d.cacheMap[c+b]=h)}});return!0}})}, updatePageState:function(a){var b=this;PrimeFaces.ajax.Request.handle({source:this.id,process:this.id,update:this.id,global:!1,params:[{name:this.id+"_pagination",value:!0},{name:this.id+"_encodeFeature",value:!0},{name:this.id+"_pageState",value:!0},{name:this.id+"_first",value:a.first},{name:this.id+"_rows",value:a.rows}],onsuccess:function(c,d,e){PrimeFaces.ajax.Response.handle(c,d,e,{widget:b,handle:function(f){}});return!0}})},sort:function(a,b,c){var d=this,e={source:this.id,update:this.id, process:this.id,formId:this.getParentFormId(),params:[{name:this.id+"_sorting",value:!0},{name:this.id+"_skipChildren",value:!0},{name:this.id+"_encodeFeature",value:!0},{name:this.id+"_sortKey",value:d.joinSortMetaOption("col")},{name:this.id+"_sortDir",value:d.joinSortMetaOption("order")}]};this.cfg.partialUpdate?(e.onsuccess=function(f,g,h){PrimeFaces.ajax.Response.handle(f,g,h,{widget:d,handle:function(k){this.updateData(k);this.checkAllToggler&&this.updateHeaderCheckbox()}});return!0},e.oncomplete= function(f,g,h,k){f=d.getPaginator();if(h&&(h.totalRecords&&(d.cfg.scrollLimit=h.totalRecords,f&&f.cfg.rowCount!==h.totalRecords&&f.setTotalRecords(h.totalRecords)),!h.validationFailed)){f&&f.setPage(0,!0);h=d.sortableColumns.filter(".ui-state-active");h.length?h.removeAttr("aria-sort"):d.sortableColumns.eq(0).removeAttr("aria-sort");if(!c){for(f=0;f=d.cfg.scrollLimit);d.cfg.clientCache&&d.clearCacheMap();d.updateColumnsView();d.originRowIndex= null}):(e.params.push({name:this.id+"_fullUpdate",value:!0}),e.onsuccess=function(f,g,h){PrimeFaces.ajax.Response.handle(f,g,h,{widget:d,handle:function(k){this.jq.replaceWith(k)}});return!0});this.hasBehavior("sort")?this.callBehavior("sort",e):PrimeFaces.ajax.Request.handle(e)},updateSortPriorityIndicators:function(){this.sortableColumns.find(".ui-sortable-column-badge").text("").addClass("ui-helper-hidden");var a=this.sortMeta;a&&1=a.cfg.scrollLimit);a.updateColumnsView();a.updateEmptyColspan(); a.originRowIndex=null}):(b.params.push({name:this.id+"_fullUpdate",value:!0}),b.onsuccess=function(c,d,e){PrimeFaces.ajax.Response.handle(c,d,e,{widget:a,handle:function(f){this.jq.replaceWith(f)}});return!0});this.hasBehavior("filter")?this.callBehavior("filter",b):PrimeFaces.ajax.Request.handle(b)},onRowClick:function(a,b,c){if($(a.target).is(this.rowSelectorForRowClick)){b=$(b);var d=b.hasClass("ui-state-highlight"),e=a.metaKey||a.ctrlKey||PrimeFaces.env.isTouchable(this.cfg),f=a.shiftKey;this.assignFocusedRow(b); d&&e?this.unselectRow(b,c):((this.isSingleSelection()||this.isMultipleSelection()&&a&&!e&&!f&&"new"===this.cfg.rowSelectMode)&&this.unselectAllRows(),this.isMultipleSelection()&&a&&a.shiftKey&&null!==this.originRowIndex?this.selectRowsInRange(b):"add"===this.cfg.rowSelectMode&&d?this.unselectRow(b,c):(this.originRowIndex=b.index(),this.cursorIndex=null,this.selectRow(b,c)));this.cfg.disabledTextSelection&&PrimeFaces.clearSelection();this.cfg.onRowClick&&"keydown"===a.type&&this.cfg.onRowClick.call(this, b)}},onRowDblclick:function(a,b){this.cfg.disabledTextSelection&&PrimeFaces.clearSelection();$(a.target).is(this.rowSelectorForRowClick)&&(a=this.getRowMeta(b),this.fireRowSelectEvent(a.key,"rowDblselect"))},onRowRightClick:function(a,b,c,d){a=$(b);b=this.getRowMeta(a);var e=a.hasClass("ui-state-highlight");this.assignFocusedRow(a);"single"!==c&&e||this.unselectAllRows();this.selectRow(a,!0);this.fireRowSelectEvent(b.key,"contextMenu",d);this.cfg.disabledTextSelection&&PrimeFaces.clearSelection(); return this.hasBehavior("contextMenu")},findRow:function(a){var b=a;PrimeFaces.isNumber(a)&&(b=this.tbody.children("tr:eq("+a+")"));return b},selectRowsInRange:function(a){var b=this.tbody.children(),c=this.getRowMeta(a),d=this;if(null!==this.cursorIndex){var e=this.cursorIndex;(e>this.originRowIndex?b.slice(this.originRowIndex,e+1):b.slice(e,this.originRowIndex+1)).each(function(f,g){d.unselectRow($(g),!0)})}this.cursorIndex=a.index();(this.cursorIndex>this.originRowIndex?b.slice(this.originRowIndex, this.cursorIndex+1):b.slice(this.cursorIndex,this.originRowIndex+1)).each(function(f,g){d.selectRow($(g),!0)});this.fireRowSelectEvent(c.key,"rowSelect")},selectRow:function(a,b){a=this.findRow(a);if(a.hasClass("ui-datatable-selectable")){(this.isSingleSelection()||this.isRadioSelectionEnabled())&&this.unselectAllRows();var c=this.getRowMeta(a);this.highlightRow(a);this.isCheckboxSelectionEnabled()&&(this.cfg.nativeElements?a.children("td.ui-selection-column").find(":checkbox").prop("checked",!0): this.selectCheckbox(a.children("td.ui-selection-column").find("\x3e div.ui-chkbox \x3e div.ui-chkbox-box")),this.updateHeaderCheckbox());this.isRadioSelectionEnabled()&&(this.cfg.nativeElements?a.children("td.ui-selection-column").find(":radio").prop("checked",!0):this.selectRadio(a.children("td.ui-selection-column").find("\x3e div.ui-radiobutton \x3e div.ui-radiobutton-box")));this.addSelection(c.key);this.writeSelections();b||this.fireRowSelectEvent(c.key,"rowSelect")}},unselectRow:function(a,b){a= this.findRow(a);if(a.hasClass("ui-datatable-selectable")){var c=this.getRowMeta(a);this.unhighlightRow(a);this.isCheckboxSelectionEnabled()&&(this.cfg.nativeElements?a.children("td.ui-selection-column").find(":checkbox").prop("checked",!1):this.unselectCheckbox(a.children("td.ui-selection-column").find("\x3e div.ui-chkbox \x3e div.ui-chkbox-box")),this.updateHeaderCheckbox());this.isRadioSelectionEnabled()&&(this.cfg.nativeElements?a.children("td.ui-selection-column").find(":radio").prop("checked", !1):this.unselectRadio(a.children("td.ui-selection-column").find("\x3e div.ui-radiobutton \x3e div.ui-radiobutton-box")));this.removeSelection(c.key);this.writeSelections();b||this.fireRowUnselectEvent(c.key,"rowUnselect")}},highlightRow:function(a){a.addClass("ui-state-highlight").attr("aria-selected",!0)},unhighlightRow:function(a){a.removeClass("ui-state-highlight").attr("aria-selected",!1)},fireRowSelectEvent:function(a,b,c){this.hasBehavior(b)?this.callBehavior(b,{params:[{name:this.id+"_instantSelectedRowKey", value:a}],oncomplete:function(){"function"===typeof c&&c()}}):"function"===typeof c&&c()},fireRowUnselectEvent:function(a,b){this.hasBehavior(b)&&this.callBehavior(b,{params:[{name:this.id+"_instantUnselectedRowKey",value:a}]})},selectRowWithRadio:function(a){var b=a.closest("tr"),c=this.getRowMeta(b);this.unselectAllRows();this.cfg.nativeElements||this.selectRadio(a);this.highlightRow(b);this.addSelection(c.key);this.writeSelections();this.fireRowSelectEvent(c.key,"rowSelectRadio")},selectRowWithCheckbox:function(a, b){var c=a.closest("tr");if(c.hasClass("ui-datatable-selectable")){var d=this.getRowMeta(c);this.highlightRow(c);this.cfg.nativeElements||this.selectCheckbox(a);this.addSelection(d.key);this.writeSelections();b||(this.updateHeaderCheckbox(),this.fireRowSelectEvent(d.key,"rowSelectCheckbox"))}},unselectRowWithCheckbox:function(a,b){var c=a.closest("tr");if(c.hasClass("ui-datatable-selectable")){var d=this.getRowMeta(c);this.unhighlightRow(c);this.cfg.nativeElements||this.unselectCheckbox(a);this.removeSelection(d.key); this.uncheckHeaderCheckbox();this.writeSelections();b||this.fireRowUnselectEvent(d.key,"rowUnselectCheckbox")}},unselectAllRows:function(){for(var a=this.jq.find("tr.ui-state-highlight"),b=this.isCheckboxSelectionEnabled(),c=this.isRadioSelectionEnabled(),d=0;dl||l===e.length||m.parent().hasClass("ui-inputnumber")|| m.parent().hasClass("ui-helper-hidden-accessible")?b.tabCell(a,!k):e.eq(l).trigger("focus")):b.tabCell(a,!k),h.preventDefault()):"Escape"===l&&(b.doCellEditCancelRequest(a),h.preventDefault())}).on("focus.datatable-cell click.datatable-cell",function(h){b.currentCell=a}))}else this.currentCell=null},tabCell:function(a,b){var c=b?a.nextAll("td.ui-editable-column:first"):a.prevAll("td.ui-editable-column:first");0==c.length&&(c=b?a.parent().next():a.parent().prev(),c=b?c.children("td.ui-editable-column:first"): c.children("td.ui-editable-column:last"));a=c.children("div.ui-cell-editor").children("div.ui-cell-editor-input");if(a.length){a=a.find(":input[type!\x3dhidden]");var d=a.filter(":disabled");if(a.length===d.length){this.tabCell(c,b);return}}this.showCellEditor(c)},saveCell:function(a){if(a){var b=a.find("div.ui-cell-editor-input :input:enabled"),c=!1,d=a.data("valid");if(a.data("multi-edit"))for(var e=a.data("old-value"),f=0;fa&&e>a||f&&d>a)if(f?(g.width(g.width()+c),setTimeout(function(){k.width(d);h.updateResizableState(k,l,g,d,null)},1)):(k.width(d),l.width(e),this.updateResizableState(k,l,g,d,e)),this.cfg.scrollable){a=this.theadClone.parent();var m=k.index();f?(a.width(a.width()+c),this.footerTable.width(this.footerTable.width()+ c),setTimeout(function(){h.hasColumnGroup?(h.theadClone.find("\x3e tr:first").children("th").eq(m).width(d),h.footerTable.find("\x3e tfoot \x3e tr:first").children("th").eq(m).width(d)):(h.theadClone.find(PrimeFaces.escapeClientId(k.attr("id")+"_clone")).width(d),h.footerCols.eq(m).width(d))},1)):this.hasColumnGroup?(this.theadClone.find("\x3e tr:first").children("th").eq(m).width(d),this.theadClone.find("\x3e tr:first").children("th").eq(m+1).width(e),this.footerTable.find("\x3e tfoot \x3e tr:first").children("th").eq(m).width(d), this.footerTable.find("\x3e tfoot \x3e tr:first").children("th").eq(m+1).width(e)):(this.theadClone.find(PrimeFaces.escapeClientId(k.attr("id")+"_clone")).width(d),this.theadClone.find(PrimeFaces.escapeClientId(l.attr("id")+"_clone")).width(e),0= f.left+e.width()/2?(c=e.next(),e=1==c.length?c.offset().left-9:e.offset().left+e.innerWidth()-9,d.helper.data("drop-location",1)):(e=f.left-9,d.helper.data("drop-location",-1));a.dragIndicatorTop.offset({left:e,top:g-3}).show();a.dragIndicatorBottom.offset({left:e,top:h-3}).show()}},stop:function(c,d){a.dragIndicatorTop.css({left:"0px",top:"0px"}).hide();a.dragIndicatorBottom.css({left:"0px",top:"0px"}).hide()},helper:function(){var c=$(this),d=$('\x3cdiv class\x3d"ui-widget ui-state-default" style\x3d"padding:4px 10px;text-align:center;"\x3e\x3c/div\x3e'); d.width(c.width());d.height(c.height());d.html(c.html());return d.get(0)}}).droppable({hoverClass:"ui-state-highlight",tolerance:"pointer",scope:this.id,over:function(c,d){d.helper.data("droppable-column",$(this))},drop:function(c,d){c=d.draggable;var e=d.helper.data("drop-location");d=$(this);var f=null,g=null,h=a.tbody.find("\x3e tr:not(.ui-expanded-row-content) \x3e td:nth-child("+(c.index()+1)+")"),k=a.tbody.find("\x3e tr:not(.ui-expanded-row-content) \x3e td:nth-child("+(d.index()+1)+")");a.tfoot.length&& (g=a.tfoot.find("\x3e tr \x3e td"),f=g.eq(c.index()),g=g.eq(d.index()));0=toIndex)for(i=0;i<=toIndex;i++)d=d.next("tr"),(d.hasClass("ui-rowgroup-header")||d.hasClass("ui-expanded-row-content"))&&toIndex--;else d.prevAll("tr").each(function(){var e= $(this);(e.hasClass("ui-rowgroup-header")||e.hasClass("ui-expanded-row-content"))&&toIndex--});toIndex=Math.max(toIndex,0);a.syncRowParity();c={source:a.id,process:a.id,params:[{name:a.id+"_rowreorder",value:!0},{name:a.id+"_fromIndex",value:b},{name:a.id+"_toIndex",value:toIndex},{name:this.id+"_skipChildren",value:!0}]};a.hasBehavior("rowReorder")?a.callBehavior("rowReorder",c):PrimeFaces.ajax.Request.handle(c)},change:function(b,c){a.cfg.scrollable&&PrimeFaces.scrollInView(a.scrollBody,c.placeholder)}})}, syncRowParity:function(){for(var a=this.tbody.children("tr.ui-widget-content"),b=this.paginator?this.paginator.getFirst():0;bk.top?(c.stickyContainer.hasClass("ui-shadow ui-sticky")||c.stickyContainer.css({"z-index":PrimeFaces.utils.nextStickyZindex()}),c.stickyContainer.css({position:"fixed",top:f+ "px"}).addClass("ui-shadow ui-sticky"),c.cfg.resizableColumns&&(c.relativeHeight=h+f-k.top),h+f>=k.top+c.tbody.height()?c.stickyContainer.hide():c.stickyContainer.show()):(c.stickyContainer.css({position:"absolute",top:k.top+"px"}).removeClass("ui-shadow ui-sticky"),c.stickyContainer.is(":hidden")&&(c.stickyContainer.css({"z-index":PrimeFaces.utils.nextStickyZindex()}),c.stickyContainer.show()),c.cfg.resizableColumns&&(c.relativeHeight=0))});PrimeFaces.utils.registerResizeHandler(this,"resize.sticky-"+ this.id,null,function(h){h=h.data.delay||0;null!==h&&"number"===typeof h&&-1=a.cfg.scrollLimit);this.restoreScrollState();if(this.cfg.virtualScroll){if(b=this.scrollTbody.children("tr.ui-widget-content"))this.rowHeight=b.outerHeight(),this.scrollBody.children("div").css("height", parseFloat(this.cfg.scrollLimit*this.rowHeight+"px")),this.frozenBody.children("div").css("height",parseFloat(this.cfg.scrollLimit*this.rowHeight+"px"));this.cfg.scrollHeight||this.frozenBody.css("height",this.scrollBody.height())}this.scrollBody.on("scroll.datatable",function(){var d=a.scrollBody.scrollLeft();a.isRTL?(a.scrollHeaderBox.css("margin-right",d+"px"),a.scrollFooterBox.css("margin-right",d+"px")):(a.scrollHeaderBox.css("margin-left",-d+"px"),a.scrollFooterBox.css("margin-left",-d+"px")); a.frozenBody.scrollTop(a.scrollBody.scrollTop());if(a.cfg.virtualScroll){var e=this;clearTimeout(a.scrollTimeout);a.scrollTimeout=setTimeout(function(){var f=a.scrollBody.outerHeight(),g=a.scrollBodyTable.outerHeight(),h=a.rowHeight*a.cfg.scrollStep,k=parseFloat(a.cfg.scrollLimit*a.rowHeight+"px")/h||1;if(e.scrollTop+f>parseFloat(a.scrollBodyTable.css("top"))+g||e.scrollTop=this.scrollHeight*a.cfg.liveScrollBuffer-this.clientHeight&&a.shouldLoadLiveScroll()&&a.loadLiveRows();a.saveScrollState()});PrimeFaces.utils.registerResizeHandler(this,"resize."+this.id+"_align",a.jq,function(){a.resizeTimeout&&clearTimeout(a.resizeTimeout);a.resizeTimeout=setTimeout(function(){a.fixRowHeightsAll();a.percentageScrollHeight&&a.adjustScrollHeight();a.percentageScrollWidth&& a.adjustScrollWidth()},150)})},cloneHead:function(){this.frozenTheadClone&&this.frozenTheadClone.remove();this.frozenTheadClone=this.cloneTableHeader(this.frozenThead,this.frozenBodyTable);this.scrollTheadClone&&this.scrollTheadClone.remove();this.scrollTheadClone=this.cloneTableHeader(this.scrollThead,this.scrollBodyTable)},hasVerticalOverflow:function(){return this.scrollBodyTable.outerHeight()>this.scrollBody.outerHeight()},adjustScrollHeight:function(){var a=this.jq.parent().innerHeight()*(parseInt(this.cfg.scrollHeight)/ 100),b=this.jq.children(".ui-datatable-header"),c=this.jq.children(".ui-datatable-footer");b=0a||(l?e>a:e>a&&f>a)){var m=c.hasClass("ui-frozen-column"),n=m?this.frozenTheadClone:this.scrollTheadClone;a=m?this.frozenThead.parent():this.scrollThead.parent();b=n.parent(); var p=m?this.frozenFooterCols:this.scrollFooterCols,q=m?this.frozenFooterTable:this.scrollFooterTable,r=this;g?(l&&this.frozenLayout.width(this.frozenLayout.width()+d),f=a.width(),g=b.width(),h=q.width(),a.width(f+d),b.width(g+d),q.width(h+d),setTimeout(function(){c.width(e);r.hasColumnGroup?(n.find("\x3e tr:first").children("th").eq(k).width(e),q.find("\x3e tfoot \x3e tr:first").children("th").eq(k).width(e)):(n.find(PrimeFaces.escapeClientId(c.attr("id")+"_clone")).width(e),p.eq(k).width(e))},1)): (l&&this.frozenLayout.width(this.frozenLayout.width()+d),c.width(e),h.width(f),this.hasColumnGroup?(n.find("\x3e tr:first").children("th").eq(k).width(e),n.find("\x3e tr:first").children("th").eq(k+1).width(f),q.find("\x3e tfoot \x3e tr:first").children("th").eq(k).width(e),q.find("\x3e tfoot \x3e tr:first").children("th").eq(k+1).width(f)):(n.find(PrimeFaces.escapeClientId(c.attr("id")+"_clone")).width(e),n.find(PrimeFaces.escapeClientId(h.attr("id")+"_clone")).width(f),0=this.cfg.frozenColumns?this.groupRow(d-this.cfg.frozenColumns,a):this.groupRow(d,b)}a.children("td.ui-duplicated-column").remove();b.children("td.ui-duplicated-column").remove()},fixRowHeightsAll:function(){this.fixRowHeights(this.scrollThead.children(), this.frozenThead.children());this.fixRowHeights(this.scrollTbody.children(),this.frozenTbody.children());var a=this.frozenTfoot.children();if(0f?e:f)+1,d.innerHeight(e),c.innerHeight(e))})}}); PrimeFaces.widget.Dialog=PrimeFaces.widget.DynamicOverlayWidget.extend({init:function(a){this._super(a);this.content=this.jq.children(".ui-dialog-content");this.titlebar=this.jq.children(".ui-dialog-titlebar");this.footer=this.jq.find(".ui-dialog-footer");this.icons=this.titlebar.children(".ui-dialog-titlebar-icon");this.closeIcon=this.titlebar.children(".ui-dialog-titlebar-close");this.minimizeIcon=this.titlebar.children(".ui-dialog-titlebar-minimize");this.maximizeIcon=this.titlebar.children(".ui-dialog-titlebar-maximize"); this.cfg.absolutePositioned=this.jq.hasClass("ui-dialog-absolute");this.jqEl=this.jq[0];this.positionInitialized=!1;this.cfg.width=this.cfg.width||"auto";this.cfg.height=this.cfg.height||"auto";this.cfg.draggable=!1===this.cfg.draggable?!1:!0;this.cfg.resizable=!1===this.cfg.resizable?!1:!0;this.cfg.minWidth=this.cfg.minWidth||150;this.cfg.minHeight=this.cfg.minHeight||this.titlebar.outerHeight();this.cfg.my=this.cfg.my||"center";this.cfg.position=this.cfg.position||"center";this.cfg.cache=!1===this.cfg.cache? !1:!0;this.cfg.responsive=!1===this.cfg.responsive?!1:!0;this.parent=this.jq.parent();this.focusedElementBeforeDialogOpened=null;this.initSize();this.bindEvents();this.cfg.draggable&&this.setupDraggable();this.cfg.resizable&&this.setupResizable();0===$(document.body).children(".ui-dialog-docking-zone").length&&$(document.body).append('\x3cdiv class\x3d"ui-dialog-docking-zone"\x3e\x3c/div\x3e');this.applyARIA();this.cfg.visible&&this.show();this.cfg.responsive&&this.bindResizeListener()},refresh:function(a){this.loaded= this.positionInitialized=!1;$(document).off("keydown.dialog_"+a.id);if(this.minimized){var b=$(document.body).children(".ui-dialog-docking-zone");b.length&&b.children(this.jqId).length&&(this.removeMinimize(),b.children(this.jqId).remove())}this.maximized=this.minimized=!1;this._super(a)},initSize:function(){this.jq.css({width:String(this.cfg.width),height:"auto"});this.content.height(this.cfg.height);this.cfg.fitViewport&&this.fitViewport()},fitViewport:function(){var a=$(window).height(),b=this.jq.outerHeight(!0)- this.jq.outerHeight(),c=this.titlebar.outerHeight(!0),d=this.content.innerHeight()-this.content.height(),e=this.footer.outerHeight(!0)||0;a-=b+c+d+e;this.content.css("max-height",a+"px");this.cfg.hasIframe&&this.content.children("iframe").css("max-height",a+"px")},getModalTabbables:function(){return this.jq.find(":tabbable").add(this.footer.find(":tabbable"))},show:function(a){this.isVisible()||(this.focusedElementBeforeDialogOpened=document.activeElement,!this.loaded&&this.cfg.dynamic?this.loadContents(): (!1===this.positionInitialized&&(this.jqEl.style.visibility="hidden",this.jqEl.style.display="block",this.initPosition(),this.jqEl.style.display="none",this.jqEl.style.visibility="visible"),this._show(a),this.cfg.dynamic&&!this.cfg.cache&&(this.loaded=!1)))},_show:function(a){this.moveToTop();if(this.cfg.absolutePositioned){var b=$(window).scrollTop();this.jq.css("top",parseFloat(this.jq.css("top"))+(b-this.lastScrollTop)+"px");this.lastScrollTop=b}if(this.cfg.showEffect){var c=this;this.jq.show(this.cfg.showEffect, a,"normal",function(){c.postShow()})}else this.jq.show(a),this.postShow();this.cfg.modal&&this.enableModality()},postShow:function(){this.cfg.fitViewport&&this.fitViewport();this.callBehavior("open");PrimeFaces.invokeDeferredRenders(this.id);this.cfg.onShow&&this.cfg.onShow.call(this);this.jq.attr({"aria-hidden":!1,"aria-live":"polite"});this.applyFocus()},hide:function(a){if(this.isVisible())if(this.cfg.hideEffect){var b=this;this.jq.hide(this.cfg.hideEffect,a,"normal",function(){b.cfg.modal&&b.disableModality(); b.onHide()})}else this.jq.hide(),this.cfg.modal&&this.disableModality(),this.onHide(a)},applyFocus:function(){this.cfg.focus?PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.cfg.focus).trigger("focus"):PrimeFaces.focus(null,this.id)},returnFocus:function(){var a=this.focusedElementBeforeDialogOpened;a&&setTimeout(function(){a.focus({preventScroll:!0})},100)},bindEvents:function(){var a=this,b=this;this.jq.on("mousedown",function(c){$(c.target).data("primefaces-overlay-target")|| b.moveToTop()});this.icons.on("mouseover",function(){$(this).addClass("ui-state-hover")}).on("mouseout",function(){$(this).removeClass("ui-state-hover")}).on("focus",function(){$(this).addClass("ui-state-focus")}).on("blur",function(){$(this).removeClass("ui-state-focus")});this.closeIcon.on("click",function(c){b.hide();c.preventDefault()});this.maximizeIcon.on("click",function(c){b.toggleMaximize();c.preventDefault()});this.minimizeIcon.on("click",function(c){b.toggleMinimize();c.preventDefault()}); this.cfg.hasIframe&&!this.cfg.resizable&&this.cfg.resizeObserver&&(new ResizeObserver(function(c){c=a.content.children("iframe")[0];var d=$(c.contentWindow.document.body).outerHeight(!0)+8;$(c).height(d);a.cfg.resizeObserverCenter&&a.initPosition()})).observe(this.content.children("iframe")[0].contentWindow.document.body);this.cfg.closeOnEscape&&($(document).on("keydown.dialog_"+this.id,function(c){if(!c.isDefaultPrevented()&&"Escape"===c.key&&b.isVisible()){var d=parseInt(b.jq.css("z-index")),e= Math.max.apply(Math,$jscomp.arrayFromIterable($(".ui-dialog:visible").map(function(){return parseInt($(this).css("z-index"))||0}).get()));d===e&&(b.hide(),c.preventDefault(),c.stopPropagation())}}),this.addDestroyListener(function(){$(document).off("keydown.dialog_"+this.id)}))},setupDraggable:function(){var a=this;this.jq.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:a.cfg.absolutePositioned?"document":"window",stop:function(b,c){a.hasBehavior("move")&& a.callBehavior("move",{params:[{name:a.id+"_top",value:c.offset.top},{name:a.id+"_left",value:c.offset.left}]})}})},setupResizable:function(){var a=this;this.jq.resizable({handles:"n,s,e,w,ne,nw,se,sw",minWidth:this.cfg.minWidth,minHeight:this.cfg.minHeight,alsoResize:this.content,containment:"document",start:function(b,c){a.jq.data("offset",a.jq.offset());a.cfg.hasIframe&&(a.iframeFix=$('\x3cdiv style\x3d"position:absolute;background-color:transparent;width:100%;height:100%;top:0;left:0;"\x3e\x3c/div\x3e').appendTo(a.content)); a.hasBehavior("resizeStart")&&a.callBehavior("resizeStart",{params:[{name:a.id+"_width",value:c.size.width},{name:a.id+"_height",value:c.size.height}]})},stop:function(b,c){a.jq.css("position","fixed");a.cfg.hasIframe&&a.iframeFix.remove();a.hasBehavior("resizeStop")&&a.callBehavior("resizeStop",{params:[{name:a.id+"_width",value:c.size.width},{name:a.id+"_height",value:c.size.height}]})}});this.resizers=this.jq.children(".ui-resizable-handle")},resetPosition:function(){this.initPosition()},initPosition:function(){var a= this;this.jq.css({left:"0",top:"0"});if(/(center|left|top|right|bottom)/.test(this.cfg.position))this.cfg.position=this.cfg.position.replace(","," "),this.jq.position({my:this.cfg.my,at:this.cfg.position,collision:"fit",of:window,using:function(d){var e=0>d.left?0:d.left;d=0>d.top?0:d.top;var f=$(window).scrollTop();a.cfg.absolutePositioned&&(d+=f,a.lastScrollTop=f);$(this).css({left:e+"px",top:d+"px"})}});else{var b=this.cfg.position.split(","),c=PrimeFaces.trim(b[0]);b=PrimeFaces.trim(b[1]);this.jq.offset({left:c, top:b})}this.positionInitialized=!0},onHide:function(a,b){this.callBehavior("close");this.jq.attr({"aria-hidden":!0,"aria-live":"off"});this.cfg.onHide&&this.cfg.onHide.call(this,a,b);this.returnFocus()},moveToTop:function(){this.jq.css("z-index",PrimeFaces.nextZindex())},toggleMaximize:function(){this.minimized&&this.toggleMinimize();if(this.maximized)this.jq.removeClass("ui-dialog-maximized"),this.restoreState(),this.maximizeIcon.children(".ui-icon").removeClass("ui-icon-newwin").addClass("ui-icon-extlink"), this.maximized=!1,this.callBehavior("restoreMaximize");else{this.saveState();this.jq.addClass("ui-dialog-maximized").css({width:String($(window).width()-6),height:String($(window).height())}).offset({top:$(window).scrollTop(),left:$(window).scrollLeft()});var a=this.content.innerHeight()-this.content.height();this.content.css({width:"auto",height:String(this.jq.height()-this.titlebar.outerHeight()-a)});this.maximizeIcon.removeClass("ui-state-hover").children(".ui-icon").removeClass("ui-icon-extlink").addClass("ui-icon-newwin"); this.maximized=!0;this.callBehavior("maximize")}},toggleMinimize:function(){var a=!0,b=$(document.body).children(".ui-dialog-docking-zone");this.maximized&&(this.toggleMaximize(),a=!1);var c=this;this.minimized?(this.removeMinimize(),this.callBehavior("restoreMinimize")):(this.saveState(),a?this.jq.effect("transfer",{to:b,className:"ui-dialog-minimizing"},500,function(){c.dock(b);c.jq.addClass("ui-dialog-minimized")}):(this.dock(b),this.jq.addClass("ui-dialog-minimized")))},dock:function(a){a.css("z-index", this.jq.css("z-index"));this.jq.appendTo(a).css("position","static");this.jq.css({height:"auto",width:"auto","float":"left"});this.content.hide();this.footer.hide();this.minimizeIcon.removeClass("ui-state-hover").children(".ui-icon").removeClass("ui-icon-minus").addClass("ui-icon-plus");this.minimized=!0;this.cfg.resizable&&this.resizers.hide();this.callBehavior("minimize")},saveState:function(){this.state={width:this.jq.width(),height:this.jq.height(),contentWidth:parseInt(this.content[0].style.width)|| this.content.width(),contentHeight:this.content.height()};this.state.offset=this.jq.offset();this.state.windowScrollLeft=$(window).scrollLeft();this.state.windowScrollTop=$(window).scrollTop()},restoreState:function(){this.jq.width(this.state.width).height(this.state.height);this.content.width(this.state.contentWidth).height(this.state.contentHeight);this.jq.offset({top:this.state.offset.top+($(window).scrollTop()-this.state.windowScrollTop),left:this.state.offset.left+($(window).scrollLeft()-this.state.windowScrollLeft)})}, loadContents:function(){var a=this,b={source:this.id,process:this.id,update:this.id,ignoreAutoUpdate:!0,params:[{name:this.id+"_contentLoad",value:!0}],onsuccess:function(c,d,e){PrimeFaces.ajax.Response.handle(c,d,e,{widget:a,handle:function(f){this.content.html(f)}});return!0},oncomplete:function(){a.loaded=!0;a.show()}};this.hasBehavior("loadContent")?this.callBehavior("loadContent",b):PrimeFaces.ajax.Request.handle(b)},applyARIA:function(){this.jq.attr({role:this instanceof PrimeFaces.widget.ConfirmDialog? "alertdialog":"dialog","aria-describedby":this.id+"_content","aria-hidden":!this.cfg.visible,"aria-modal":this.cfg.modal});var a=this.id+"_title";$(PrimeFaces.escapeClientId(a)).length&&this.jq.attr("aria-labelledby",a);this.titlebar.children("a.ui-dialog-titlebar-icon").attr("role","button")},isVisible:function(){return this.jq.is(":visible")},bindResizeListener:function(){var a=this;PrimeFaces.utils.registerResizeHandler(this,"resize."+this.id+"_align",null,function(){a.cfg.fitViewport&&a.fitViewport(); a.isVisible()&&!a.cfg.absolutePositioned?a.initPosition():a.positionInitialized=!1});PrimeFaces.utils.registerScrollHandler(this,"scroll."+this.id+"_align",function(){a.isVisible()&&!a.cfg.absolutePositioned?a.initPosition():a.positionInitialized=!1})},removeMinimize:function(){this.jq.appendTo(this.parent).removeClass("ui-dialog-minimized").css({position:"fixed","float":"none"});this.restoreState();this.content.show();this.footer.show();this.minimizeIcon.removeClass("ui-state-hover").children(".ui-icon").removeClass("ui-icon-plus").addClass("ui-icon-minus"); this.minimized=!1;this.cfg.resizable&&this.resizers.show()}}); PrimeFaces.widget.ConfirmDialog=PrimeFaces.widget.Dialog.extend({init:function(a){a.draggable=!1;a.resizable=!1;a.modal=!0;!a.appendTo&&a.global&&(a.appendTo="@(body)");this._super(a);this.title=this.titlebar.children(".ui-dialog-title");this.message=this.content.children(".ui-confirm-dialog-message");this.icon=this.content.children(".ui-confirm-dialog-severity");this.cfg.global&&(PrimeFaces.confirmDialog=this,this.jq.on("click.ui-confirmdialog",".ui-confirmdialog-yes, .ui-confirmdialog-no",null, function(b){var c=$(this);if(c.hasClass("ui-confirmdialog-yes")&&PrimeFaces.confirmSource){c=PrimeFaces.confirmSource.get(0);var d=PrimeFaces.confirmSource.data("pfconfirmcommand");PrimeFaces.csp.executeEvent(c,d,b);PrimeFaces.confirmDialog.hide();PrimeFaces.confirmSource=null}else c.hasClass("ui-confirmdialog-no")&&(PrimeFaces.confirmDialog.hide(),PrimeFaces.confirmSource=null);b.preventDefault()}))},applyFocus:function(){this.jq.find(":button,:submit").filter(":visible:enabled").eq(0).trigger("focus")}, showMessage:function(a){a.beforeShow&&PrimeFaces.csp.eval(a.beforeShow);a.icon?(this.icon.removeClass().addClass("ui-icon ui-confirm-dialog-severity "+a.icon),this.icon.show()):this.icon.hide();a.header&&this.title.text(a.header);a.message&&(a.escape?this.message.text(a.message):this.message.html(a.message));this.cfg.global&&(this.positionInitialized=!1);this.show()}}); PrimeFaces.widget.DynamicDialog=PrimeFaces.widget.Dialog.extend({show:function(){this.jq.hasClass("ui-overlay-visible")||(!1===this.positionInitialized&&this.initPosition(),this._show())},_show:function(){this.jq.removeClass("ui-overlay-hidden").addClass("ui-overlay-visible").css({display:"none",visibility:"visible"});this.moveToTop();this.jq.show();"auto"!=this.cfg.height&&this.content.height(this.jq.outerHeight()-this.titlebar.outerHeight(!0));this.postShow();this.cfg.modal&&this.enableModality()}, initSize:function(){this.jq.css({width:String(this.cfg.width),height:String(this.cfg.height)});this.cfg.fitViewport&&this.fitViewport()}}); PrimeFaces.widget.Draggable=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jqTarget=$(PrimeFaces.escapeClientId(this.cfg.target));this.cfg.cancel=this.cfg.cancel||"input,textarea,button,select,option";this.cfg.appendTo&&(this.cfg.appendTo=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.cfg.appendTo));var b=this;this.cfg.start=function(c,d){b.cfg.onStart&&b.cfg.onStart.call(b,c,d)};this.cfg.stop=function(c,d){b.cfg.onStop&&b.cfg.onStop.call(b, c,d)};this.jqTarget.draggable(this.cfg);this.addDestroyListener(function(){b.jqTarget.length&&b.jqTarget.draggable("destroy")})}}); PrimeFaces.widget.Droppable=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jqTarget=$(PrimeFaces.escapeClientId(this.cfg.target));this.bindDropListener();this.jqTarget.droppable(this.cfg);var b=this;this.addDestroyListener(function(){b.jqTarget.length&&b.jqTarget.droppable("destroy")})},bindDropListener:function(){var a=this;this.cfg.drop=function(b,c){a.cfg.onDrop&&a.cfg.onDrop.call(a,b,c);a.cfg.behaviors&&(b=a.cfg.behaviors.drop)&&(c={params:[{name:a.id+"_dragId",value:c.draggable.attr("id")}, {name:a.id+"_dropId",value:a.cfg.target}]},b.call(a,c))}}});PrimeFaces.widget.Effect=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.source=$(PrimeFaces.escapeClientId(this.cfg.source));var b=this;this.runner=function(){b.timeoutId&&clearTimeout(b.timeoutId);b.timeoutId=setTimeout(b.cfg.fn,b.cfg.delay)};if("load"==this.cfg.event)this.runner.call();else this.source.on(this.cfg.event,this.runner)}}); PrimeFaces.widget.Fieldset=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.legend=this.jq.children(".ui-fieldset-legend");var b=this;this.cfg.toggleable&&(this.content=this.jq.children(".ui-fieldset-content"),this.toggler=this.legend.children(".ui-fieldset-toggler"),this.stateHolder=$(this.jqId+"_collapsed"),this.legend.on("click",function(c){b.toggle(c)}).on("mouseover",function(){b.legend.toggleClass("ui-state-hover")}).on("mouseout",function(){b.legend.toggleClass("ui-state-hover")}).on("mousedown", function(){b.legend.toggleClass("ui-state-active")}).on("mouseup",function(){b.legend.toggleClass("ui-state-active")}).on("focus",function(){b.legend.toggleClass("ui-state-focus")}).on("blur",function(){b.legend.toggleClass("ui-state-focus")}).on("keydown",function(c){"Enter"===c.key&&(b.toggle(c),c.preventDefault())}))},refresh:function(a){this._super(a);this.loaded=!1},toggle:function(a){var b=this;a=this.cfg.collapsed;!this.loaded&&this.cfg.dynamic&&a?this.loadContents():this.updateToggleState(a); this.content.slideToggle(this.cfg.toggleSpeed,"easeInOutCirc",function(){b.callBehavior("toggle")});PrimeFaces.invokeDeferredRenders(this.id)},updateToggleState:function(a){a?this.toggler.removeClass("ui-icon-plusthick").addClass("ui-icon-minusthick"):this.toggler.removeClass("ui-icon-minusthick").addClass("ui-icon-plusthick");this.cfg.collapsed=!a;this.stateHolder.val(!a)},loadContents:function(){var a=this;PrimeFaces.ajax.Request.handle({source:this.id,process:this.id,update:this.id,ignoreAutoUpdate:!0, params:[{name:this.id+"_contentLoad",value:!0}],onsuccess:function(b,c,d){PrimeFaces.ajax.Response.handle(b,c,d,{widget:a,handle:function(e){this.content.html(e);a.loaded=!0}});return!0},oncomplete:function(){a.updateToggleState(a.cfg.collapsed)}})}}); PrimeFaces.widget.InputText=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);PrimeFaces.skinInput(this.jq);if(this.cfg.counter&&(this.counter=this.cfg.counter?$(PrimeFaces.escapeClientId(this.cfg.counter)):null,this.cfg.counterTemplate=this.cfg.counterTemplate||"{0}",this.updateCounter(),this.counter)){var b=this;this.jq.on("input.inputtext-counter",function(c){b.updateCounter()})}},disable:function(){PrimeFaces.utils.disableInputWidget(this.jq)},enable:function(){PrimeFaces.utils.enableInputWidget(this.jq)}, updateCounter:function(){var a=this.normalizeNewlines(this.jq.val());a=this.cfg.countBytesAsChars?PrimeFaces.utils.countBytes(a):a.length;if(this.counter&&this.cfg.maxlength){var b=this.cfg.maxlength-a;0>b&&(b=0);a=this.cfg.counterTemplate.replace("{0}",b).replace("{1}",a).replace("{2}",this.cfg.maxlength);this.counter.text(a)}},normalizeNewlines:function(a){return a.replace(/(\r\n|\r|\n)/g,"\r\n")}}); PrimeFaces.widget.InputTextarea=PrimeFaces.widget.DeferredWidget.extend({init:function(a){this._super(a);this.cfg.autoResize?this.renderDeferred():this._render()},_render:function(){PrimeFaces.skinInput(this.jq);this.cfg.autoComplete&&this.setupAutoComplete();if(this.cfg.counter&&(this.counter=this.cfg.counter?$(PrimeFaces.escapeClientId(this.cfg.counter)):null,this.cfg.counterTemplate=this.cfg.counterTemplate||"{0}",this.updateCounter(),this.counter)){var a=this;this.jq.on("input.inputtextarea-counter", function(b){a.updateCounter()})}this.cfg.maxlength&&this.applyMaxlength();this.cfg.autoResize&&this.setupAutoResize()},refresh:function(a){a.autoComplete&&$(PrimeFaces.escapeClientId(a.id+"_panel")).remove();this._super(a)},setupAutoResize:function(){autosize(this.jq)},applyMaxlength:function(){var a=this;this.jq.on("keyup.inputtextarea-maxlength",function(b){b=a.jq.val();b.length>a.cfg.maxlength&&a.jq.val(b.slice(0,a.cfg.maxlength))})},updateCounter:function(){var a=this.jq.val();a=this.cfg.countBytesAsChars? PrimeFaces.utils.countBytes(a):a.length;if(this.counter){var b=this.cfg.maxlength-a;0>b&&(b=0);a=this.cfg.counterTemplate.replace("{0}",b).replace("{1}",a).replace("{2}",this.cfg.maxlength);this.counter.text(a)}},setupAutoComplete:function(){var a=this;this.panel=$('\x3cdiv id\x3d"'+this.id+'_panel" class\x3d"ui-autocomplete-panel ui-widget-content ui-corner-all ui-helper-hidden ui-shadow"\x3e\x3c/div\x3e').appendTo(document.body);this.jq.on("keyup",function(b){switch(b.key){case "ArrowUp":case "ArrowDown":case "ArrowLeft":case "ArrowRight":case "Enter":case "Tab":case " ":case "Shift":case "Control":case "Alt":case "Meta":case "Escape":break; default:var c=a.extractQuery();c&&c.length>=a.cfg.minQueryLength&&(a.timeout&&a.clearTimeout(a.timeout),a.timeout=setTimeout(function(){a.search(c)},a.cfg.queryDelay))}}).on("keydown",function(b){var c=a.panel.is(":visible");switch(b.key){case "ArrowUp":case "ArrowLeft":if(c){c=a.items.filter(".ui-state-highlight");var d=0==c.length?a.items.eq(0):c.prev();1==d.length&&(c.removeClass("ui-state-highlight"),d.addClass("ui-state-highlight"),a.cfg.scrollHeight&&PrimeFaces.scrollInView(a.panel,d));b.preventDefault()}else a.clearTimeout(); break;case "ArrowDown":case "ArrowRight":c?(c=a.items.filter(".ui-state-highlight"),d=0==c.length?a.items.eq(0):c.next(),1==d.length&&(c.removeClass("ui-state-highlight"),d.addClass("ui-state-highlight"),a.cfg.scrollHeight&&PrimeFaces.scrollInView(a.panel,d)),b.preventDefault()):a.clearTimeout();break;case "Enter":c?(a.items.filter(".ui-state-highlight").trigger("click"),b.preventDefault()):a.clearTimeout();break;case " ":case "Shift":case "Control":case "Alt":case "Meta":case "Backspace":case "Escape":a.clearTimeout(); c&&a.hide();break;case "Tab":a.clearTimeout(),c&&(a.items.filter(".ui-state-highlight").trigger("click"),a.hide())}});$(document.body).on("mousedown.ui-inputtextarea"+this.id,function(b){if(!a.panel.is(":hidden")){var c=a.panel.offset();b.target!==a.jq.get(0)&&(b.pageXc.left+a.panel.width()||b.pageYc.top+a.panel.height())&&a.hide()}});this.addDestroyListener(function(){$(document.body).off("mousedown.ui-inputtextarea"+this.id)});PrimeFaces.utils.registerResizeHandler(this, "resize."+this.id+"_align",a.panel,function(){a.hide()});this.setupDialogSupport();this.jq.hasClass("ui-state-disabled")||this.jq.data("primefaces-overlay-target",!0)},bindDynamicEvents:function(){var a=this;this.items.on("mouseover",function(){var b=$(this);b.hasClass("ui-state-highlight")||(a.items.filter(".ui-state-highlight").removeClass("ui-state-highlight"),b.addClass("ui-state-highlight"))}).on("click",function(b){var c=$(this).attr("data-item-value"),d=a.jq.getSelection().start,e=a.query.length; a.jq.trigger("focus");a.jq.setSelection(d-e,d);a.jq.replaceSelectedText(c);a.invokeItemSelectBehavior(b,c);a.hide()})},invokeItemSelectBehavior:function(a,b){this.hasBehavior("itemSelect")&&this.callBehavior("itemSelect",{params:[{name:this.id+"_itemSelect",value:b}]})},clearTimeout:function(){this.timeout&&clearTimeout(this.timeout);this.timeout=null},extractQuery:function(){var a=this.jq.getSelection().end;return(a=/\S+$/.exec(this.jq.get(0).value.slice(0,a)))?a[0]:null},search:function(a){this.query= a;var b=this;a={source:this.id,update:this.id,process:this.id,params:[{name:this.id+"_query",value:a}],onsuccess:function(c,d,e){PrimeFaces.ajax.Response.handle(c,d,e,{widget:b,handle:function(f){this.panel.html(f);this.items=b.panel.find(".ui-autocomplete-item");this.bindDynamicEvents();0this.cfg.scrollHeight&&this.panel.height(this.cfg.scrollHeight),this.panel.is(":hidden")?this.show(): this.alignPanel()):this.panel.hide()}});return!0}};this.hasBehavior("query")?this.callBehavior("query",a):PrimeFaces.ajax.Request.handle(a)},alignPanel:function(){var a=this.jq.getCaretPosition(),b=(0f)return a.panel.is(":hidden")?a.selectItem(h):(a.highlightItem(h), PrimeFaces.scrollInView(a.itemsWrapper,h)),!1})},b);a.searchTimer=setTimeout(function(){a.searchValue="";a.focusInput?a.focusInput.val(""):null},1E3)}}})},matchOptions:function(a){return a?this.options.filter(function(){var b=$(this);return b.is(":disabled")||0!==b.text().toLowerCase().indexOf(a.toLowerCase())?!1:!0}):!1},bindFilterEvents:function(){var a=this;this.filterInput.on("keyup.ui-selectonemenu",function(b){PrimeFaces.utils.ignoreFilterKey(b)||b.metaKey||b.ctrlKey||a.filter($(this).val())}).on("keydown.ui-selectonemenu", function(b){switch(b.key){case "ArrowUp":a.highlightPrev(b);break;case "ArrowDown":a.highlightNext(b);break;case "Enter":a.keyboardTarget.trigger("focus");a.keyboardTarget.trigger(jQuery.Event("keydown",{key:"Enter"}));break;case "Tab":a.keyboardTarget.trigger("focus");a.keyboardTarget.trigger(jQuery.Event("keydown",{key:"Tab"}));break;case "Escape":a.handleEscapeKey(b);break;case " ":a.handleSpaceKey(b)}}).on("paste.ui-selectonemenu",function(){setTimeout(function(){a.filter(a.filterInput.val())}, 2)})},highlightNext:function(a){var b=this.getActiveItem();b=this.panel.is(":hidden")?b.nextAll(":not(.ui-state-disabled,.ui-selectonemenu-item-group):first"):b.nextAll(":not(.ui-state-disabled,.ui-selectonemenu-item-group):visible:first");a.altKey?this.show():1===b.length&&(this.panel.is(":hidden")?this.selectItem(b):(this.highlightItem(b),PrimeFaces.scrollInView(this.itemsWrapper,b)),this.changeAriaValue(b));a.preventDefault()},highlightPrev:function(a){var b=this.getActiveItem();b=this.panel.is(":hidden")? b.prevAll(":not(.ui-state-disabled,.ui-selectonemenu-item-group):first"):b.prevAll(":not(.ui-state-disabled,.ui-selectonemenu-item-group):visible:first");1===b.length&&(this.panel.is(":hidden")?this.selectItem(b):(this.highlightItem(b),PrimeFaces.scrollInView(this.itemsWrapper,b)),this.changeAriaValue(b));a.preventDefault()},handleEnterKey:function(a){this.panel.is(":visible")&&(this.selectItem(this.getActiveItem()),a.stopPropagation());a.preventDefault()},handleSpaceKey:function(a){var b=$(a.target); b.is("input")&&b.hasClass("ui-selectonemenu-filter")||(this.panel.is(":hidden")?this.show():(this.hide(),this.revert(),this.changeAriaValue(this.getActiveItem())),a.preventDefault())},handleEscapeKey:function(a){this.panel.is(":visible")&&(this.revert(),this.hide(),a.preventDefault())},handleTabKey:function(a){(this.isTabbing=this.panel.is(":visible"))&&this.selectItem(this.getActiveItem())},handleLabelChange:function(a){this.customInput=!0;this.customInputVal=$(a.target).val();this.items.filter(".ui-state-active").removeClass("ui-state-active"); this.items.eq(0).addClass("ui-state-active")},show:function(){this.callHandleMethod(this._show,null)},_show:function(){var a=this;this.transition&&this.transition.show({onEnter:function(){a.panel.css("z-index",PrimeFaces.nextZindex());a.alignPanel()},onEntered:function(){a.bindPanelEvents();a.preShowValue=a.options.filter(":selected");a.keyboardTarget.attr("aria-expanded",!0);PrimeFaces.scrollInView(a.itemsWrapper,a.getActiveItem());a.cfg.filter&&a.focusFilter()}})},hide:function(){if(this.panel.is(":visible")&& this.transition){var a=this;this.searchValue="";this.transition.hide({onExit:function(){a.unbindPanelEvents()},onExited:function(){a.panel.css("z-index","");a.keyboardTarget.attr("aria-expanded",!1);if(!a.isTabbing){var b=$(document.activeElement);(a.jq.has(b).length||a.panel.has(b).length)&&a.keyboardTarget.trigger("focus.ui-selectonemenu")}a.isTabbing=!1}})}},focus:function(){this.keyboardTarget.trigger("focus")},focusFilter:function(a){if(a){var b=this;setTimeout(function(){b.focusFilter()},a)}else this.filterInput.trigger("focus")}, blur:function(){this.keyboardTarget.trigger("blur");this.searchValue="";this.callBehavior("blur")},disable:function(){this.disabled||(this.disabled=!0,this.jq.addClass("ui-state-disabled"),this.input.attr("disabled","disabled"),this.cfg.editable&&this.label.attr("disabled","disabled"),this.unbindEvents())},enable:function(){this.disabled&&(this.disabled=!1,this.jq.removeClass("ui-state-disabled"),this.input.removeAttr("disabled"),this.cfg.editable&&this.label.removeAttr("disabled"),this.bindEvents(), this.bindItemEvents())},alignPanel:function(){this.alignPanelWidth();this.panel.parent().is(this.jq)?this.panel.css({left:"0px",top:this.jq.innerHeight()+"px","transform-origin":"center top"}):this.panel.css({left:"0px",top:"0px","transform-origin":"center top"}).position({my:"left top",at:"left bottom",of:this.jq,collision:"flipfit",using:function(a,b){$(this).css("transform-origin","center "+b.vertical).css(a)}})},setLabel:function(a){var b=this.getLabelToDisplay(a),c="\x26nbsp;"===a||"\u00a0"=== a;if(this.cfg.editable)c?this.label.val(""):this.label.val(b),b=this.label[0].hasAttribute("placeholder"),this.updatePlaceholderClass(b&&c);else if(this.cfg.alwaysDisplayLabel&&this.cfg.label)this.label.text(this.cfg.label);else{var d=this.label.data("placeholder");if(null==d||""==d)d="\x26nbsp;";this.updatePlaceholderClass(c&&"\x26nbsp;"!==d);c?"\x26nbsp;"!=d?this.label.text(d):this.label.html(d):(this.label.removeClass("ui-state-disabled"),this.items?(c=this.items.filter('[data-label\x3d"'+$.escapeSelector(a)+ '"]'),c=this.options.eq(this.resolveItemIndex(c))):c=this.options.filter(":selected"),c&&!1===c.data("escape")?this.label.html(b):this.label.text(b))}},selectValue:function(a){this.items&&0!==this.items.length||this.callHandleMethod(null,null);a=this.options.filter('[value\x3d"'+$.escapeSelector(a)+'"]');this.selectItem(this.items.eq(a.index()),!0)},resetValue:function(a){this.items&&0!==this.items.length||this.callHandleMethod(null,null);var b=this.options.filter('[value\x3d""]');0===b.length&&(b= this.options.eq(0));this.selectItem(this.items.eq(b.index()),a)},getActiveItem:function(){return this.items.filter(".ui-state-highlight")},setupFilterMatcher:function(){this.cfg.filterMatchMode=this.cfg.filterMatchMode||"startsWith";this.filterMatchers={startsWith:this.startsWithFilter,contains:this.containsFilter,endsWith:this.endsWithFilter,custom:this.cfg.filterFunction};this.filterMatcher=this.filterMatchers[this.cfg.filterMatchMode]},startsWithFilter:function(a,b){return 0===a.indexOf(b)},containsFilter:function(a, b){return-1!==a.indexOf(b)},endsWithFilter:function(a,b){return-1!==a.indexOf(b,a.length-b.length)},filter:function(a){this.cfg.initialHeight=this.cfg.initialHeight||this.itemsWrapper.height();var b=!this.cfg.caseSensitive,c=this.cfg.filterNormalize,d=PrimeFaces.toSearchable(PrimeFaces.trim(a),b,c);if(""===d)this.items.filter(":hidden").show(),this.itemsContainer.children(".ui-selectonemenu-item-group").show();else{a=[];for(var e=[],f=0;fe?d+1:e+1;for(d=d>e?e:d;de?(c=a.cfg.weakLabel,d="0px -10px"):30<=e&&80>e?(c=a.cfg.goodLabel,d="0px -20px"):80<=e&&(c=a.cfg.strongLabel,d="0px -30px")}a.meter.css("background-position",d);a.infoText.text(c)});this.cfg.inline||(this.panel.appendTo("body"),this.transition=PrimeFaces.utils.registerCSSTransition(this.panel,"ui-connected-overlay"))},bindPanelEvents:function(){var a=this;this.resizeHandler=PrimeFaces.utils.registerResizeHandler(this,"resize."+ this.id+"_hide",this.panel,function(){!0===PrimeFaces.hideOverlaysOnViewportChange&&a.hide()});this.scrollHandler=PrimeFaces.utils.registerConnectedOverlayScrollHandler(this,"scroll."+this.id+"_hide",this.jq,function(){!0===PrimeFaces.hideOverlaysOnViewportChange&&a.hide()})},unbindPanelEvents:function(){this.resizeHandler&&this.resizeHandler.unbind();this.scrollHandler&&this.scrollHandler.unbind()},setupUnmasking:function(){var a=this;this.icon=$(PrimeFaces.escapeClientId(this.id+"_mask"));this.icon.off("click.password").on("click.password", function(){a.toggleMask()})},toggleMask:function(){this.cfg.unmaskable&&("password"===this.jq.attr("type")?this.jq.attr("type","text").parent().removeClass("ui-password-masked").addClass("ui-password-unmasked"):this.jq.attr("type","password").parent().removeClass("ui-password-unmasked").addClass("ui-password-masked"))},testStrength:function(a){var b=0;if(!a||8>a.length)return b;a={digits:/\d/.test(a),lower:/[a-z]/.test(a),upper:/[A-Z]/.test(a),nonWords:/\W/.test(a)};variationCount=0;for(var c in a)variationCount+= 1==a[c]?1:0;b+=28*variationCount;return parseInt(b)},normalize:function(a,b){return 0>=a-b?a/b:1+a/(a+b/4)*.5},align:function(){this.panel.css({left:"",top:"","min-width":this.jq.outerWidth(),"transform-origin":"center top"}).position({my:"left top",at:"left bottom",of:this.jq,collision:"flipfit",using:function(a,b){$(this).css("transform-origin","center "+b.vertical).css(a)}})},show:function(){if(this.cfg.inline)this.panel.css({width:this.jq.outerWidth()}),this.panel.slideDown();else{var a=this; this.transition&&this.transition.show({onEnter:function(){a.panel.css("z-index",PrimeFaces.nextZindex());a.align()},onEntered:function(){a.bindPanelEvents()}})}},hide:function(){if(this.cfg.inline)this.panel.slideUp();else if(this.transition){var a=this;this.transition.hide({onExit:function(){a.unbindPanelEvents()}})}},enable:function(){PrimeFaces.utils.enableInputWidget(this.jq)},disable:function(){PrimeFaces.utils.disableInputWidget(this.jq)}}); PrimeFaces.widget.DefaultCommand=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.jqTarget=$(PrimeFaces.escapeClientId(this.cfg.target));this.scope=this.cfg.scope?$(PrimeFaces.escapeClientId(this.cfg.scope)):null;var b=this;this.jqTarget.is(":not(:button):not(:input):not(a)")&&(this.jqTarget=this.jqTarget.find("button,a").filter(":visible").first());var c=this.jqTarget.closest("form");c.off("keydown."+this.id).on("keydown."+this.id,{scopeEnter:!1},function(d,e){e=e||d.data; if(b.scope&&e.scopeEnter&&e.scopeDefaultCommandId===b.id||!b.scope&&!e.scopeEnter&&"Enter"===d.key){if($(d.target).is('textarea,button,input[type\x3d"submit"],a,.ql-editor'))return!0;b.jqTarget.is(":disabled, .ui-state-disabled")||b.jqTarget.trigger(PrimeFaces.csp.clickEvent(b.jqTarget));d.preventDefault();d.stopImmediatePropagation()}});if(this.scope)this.scope.off("keydown."+this.id).on("keydown."+this.id,function(d){"Enter"===d.key&&(c.trigger(d,{scopeEnter:!0,scopeDefaultCommandId:b.id}),d.stopPropagation())})}}); PrimeFaces.widget.SplitButton=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.button=$(this.jqId+"_button");this.menuButton=$(this.jqId+"_menuButton");this.menuId=this.jqId+"_menu";this.menu=$(this.menuId);this.menuitemContainer=this.menu.find(".ui-menu-list");this.menuitems=this.menuitemContainer.children(".ui-menuitem:not(.ui-state-disabled)");this.cfg.disabled=this.button.is(":disabled");this.cfg.filterInputAutoFocus=void 0===this.cfg.filterInputAutoFocus?!0:this.cfg.filterInputAutoFocus; this.bindEvents();PrimeFaces.utils.registerDynamicOverlay(this,this.menu,this.id+"_menu");this.transition=PrimeFaces.utils.registerCSSTransition(this.menu,"ui-connected-overlay");this.button.data(PrimeFaces.CLIENT_ID_DATA,this.id);this.menuButton.data(PrimeFaces.CLIENT_ID_DATA,this.id)},refresh:function(a){this.menuButton.off("click.splitbutton");this.menuitems.off("mouseover.splitbutton mouseout.splitbutton click.splitbutton");this.menuButton.on("keydown.splitbutton keyup.splitbutton");$(document).off("pfAjaxSend."+ this.id+" pfAjaxComplete."+this.id);this._super(a)},disable:function(){this.cfg.disabled=!0;this.hide();PrimeFaces.utils.disableButton(this.button);PrimeFaces.utils.disableButton(this.menuButton)},enable:function(){this.cfg.disabled=!1;PrimeFaces.utils.enableButton(this.button);PrimeFaces.utils.enableButton(this.menuButton)},bindEvents:function(){var a=this;PrimeFaces.skinButton(this.button).skinButton(this.menuButton);this.button.data("primefaces-overlay-target",!0).find("*").data("primefaces-overlay-target", !0);this.menuButton.on("click.splitbutton",function(){!a.cfg.disabled&&a.menu.is(":hidden")?a.show():a.hide()});this.menuitems.on("mouseover.splitbutton",function(b){b=$(this);b.children(".ui-menuitem-link").hasClass("ui-state-disabled")||b.addClass("ui-state-hover")}).on("mouseout.splitbutton",function(b){$(this).removeClass("ui-state-hover")}).on("click.splitbutton",function(){a.hide()});this.menuButton.on("keydown.splitbutton",function(b){if(!a.cfg.disabled)switch(b.key){case "ArrowUp":a.highlightPrev(b); break;case "ArrowDown":a.highlightNext(b);break;case "Enter":case " ":a.handleEnterKey(b);break;case "Escape":case "Tab":a.handleEscapeKey()}}).on("keyup.splitbutton",function(b){" "===b.key&&b.preventDefault()});a.ajaxCount=0;$(document).on("pfAjaxSend."+this.id,function(b,c,d){a.isXhrSource(d)&&(a.ajaxCount++,1(new Date).getTime()-c&&b.show(),c=(new Date).getTime()):b.show()}).on("mouseover", function(){$(this).toggleClass("ui-state-highlight")}).on("mouseout",function(){$(this).toggleClass("ui-state-highlight")});if(0<=this.display.attr("tabindex"))this.display.on("keydown",function(f){PrimeFaces.utils.isActionKey(f)&&(b.display.trigger(b.cfg.event),f.preventDefault())}).on("focus",function(){$(this).toggleClass("ui-state-focus")}).on("blur",function(){$(this).toggleClass("ui-state-focus")})}else this.display.css("cursor","default");if(this.cfg.editor){this.cfg.formId=this.jq.parents("form:first").attr("id"); this.editor=$(this.jqId+"_editor");a=this.editor.children(".ui-inplace-save");var e=this.editor.children(".ui-inplace-cancel");PrimeFaces.skinButton(a).skinButton(e);a.on("click",function(f){b.save(f)});e.on("click",function(f){b.cancel(f)})}this.content.find("input:text,textarea").on("keydown.inplace-text",function(f){" "===f.key&&f.stopPropagation()})}},show:function(){this.toggle(this.content,this.display)},hide:function(){this.toggle(this.display,this.content)},toggle:function(a,b){var c=this; "fade"===this.cfg.effect?b.fadeOut(this.cfg.effectSpeed,function(){a.fadeIn(c.cfg.effectSpeed);c.postShow()}):"slide"===this.cfg.effect?b.slideUp(this.cfg.effectSpeed,function(){a.slideDown(c.cfg.effectSpeed);c.postShow()}):"none"===this.cfg.effect&&(b.hide(),a.show(),c.postShow())},postShow:function(){this.content.find("input:text,textarea").filter(":visible:enabled:first").trigger("focus").trigger("select");PrimeFaces.invokeDeferredRenders(this.id)},getDisplay:function(){return this.display},getContent:function(){return this.content}, save:function(a){a={source:this.id,update:this.id,process:this.id,formId:this.cfg.formId};this.hasBehavior("save")?this.callBehavior("save",a):PrimeFaces.ajax.Request.handle(a)},cancel:function(a){a={source:this.id,update:this.id,process:this.id,formId:this.cfg.formId};a.params=[{name:this.id+"_cancel",value:!0}];this.hasBehavior("cancel")?this.callBehavior("cancel",a):PrimeFaces.ajax.Request.handle(a)}}); PrimeFaces.widget.Menu=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.cfg.overlay&&this.initOverlay();this.keyboardTarget=this.jq.children(".ui-helper-hidden-accessible")},initOverlay:function(){var a=this;this.jq.addClass("ui-menu-overlay");this.cfg.trigger=this.cfg.trigger.replace(/\\\\:/g,"\\:");this.trigger=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.cfg.trigger);this.trigger.data("primefaces-overlay-target",!0).find("*").data("primefaces-overlay-target", !0);this.cfg.appendTo||(this.cfg.appendTo="@(body)");PrimeFaces.utils.registerDynamicOverlay(this,this.jq,this.id);this.transition=PrimeFaces.utils.registerCSSTransition(this.jq,"ui-connected-overlay");this.cfg.pos={my:this.cfg.my,at:this.cfg.at,of:this.trigger,collision:this.cfg.collision||"flip",using:function(b,c){$(this).css("transform-origin","center "+c.vertical).css(b)}};this.trigger.off(this.cfg.triggerEvent+".ui-menu").on(this.cfg.triggerEvent+".ui-menu",function(b){var c=$(this);a.jq.is(":visible")? a.hide():(a.show(),c.is(":button")&&c.addClass("ui-state-focus"),b.preventDefault())});this.setupDialogSupport()},bindPanelEvents:function(){var a=this;this.itemMouseDown=!1;this.hideOverlayHandler=PrimeFaces.utils.registerHideOverlayHandler(this,"mousedown."+this.id+"_hide",this.jq,function(){return a.trigger},function(c,d){d.is(".ui-menuitem-link:not(.ui-submenu-link, .ui-state-disabled)")||d.closest(".ui-menuitem-link:not(.ui-submenu-link, .ui-state-disabled)").length?a.itemMouseDown=!0:a.jq.is(d)|| 0c.width()+c.scrollLeft()&&(d-=f);e+g>c.height()+c.scrollTop()&&(e-=g);0>e&&(e=a.pageY);b.jq.css({left:d+"px",top:e+"px","z-index":PrimeFaces.nextZindex(),"transform-origin":"center top"})},onEntered:function(){b.bindPanelEvents()}}),a.preventDefault(),a.stopPropagation()))},hide:function(){if(this.transition){var a=this; this.transition.hide({onExit:function(){a.unbindPanelEvents()},onExited:function(){a.jq.find("li.ui-menuitem-active").each(function(){a.deactivate($(this),!0)})}})}},isVisible:function(){return this.jq.is(":visible")},getTarget:function(){return this.jqTarget}}); PrimeFaces.widget.MegaMenu=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.cfg.vertical=this.jq.hasClass("ui-megamenu-vertical");this.rootList=this.jq.children("ul.ui-menu-list");this.rootLinks=this.rootList.find("\x3e li.ui-menuitem \x3e a.ui-menuitem-link:not(.ui-state-disabled)");this.subLinks=this.jq.find(".ui-menu-child a.ui-menuitem-link:not(.ui-state-disabled)");this.keyboardTarget=this.jq.children(".ui-helper-hidden-accessible");void 0!==this.cfg.activeIndex&&this.rootLinks.eq(this.cfg.activeIndex).addClass("ui-state-hover").closest("li.ui-menuitem").addClass("ui-menuitem-active"); this.bindEvents();this.bindKeyEvents()},bindEvents:function(){var a=this;this.rootLinks.on("mouseenter",function(c){c=$(this).parent();var d=c.siblings(".ui-menuitem-active");0=b&&c<=b+a||d>=b&&d<=b+a)return!0}}); PrimeFaces.widget.OverlayPanel=PrimeFaces.widget.DynamicOverlayWidget.extend({init:function(a){a.target&&(this.target=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(a.target),this.target.hasClass("ui-splitbutton")&&(this.target=this.target.find(".ui-splitbutton-menubutton")));this._super(a,null,null,this.target);this.content=this.jq.children("div.ui-overlaypanel-content");this.cfg.my=this.cfg.my||"left top";this.cfg.at=this.cfg.at||"left bottom";this.cfg.collision=this.cfg.collision|| "flip";this.cfg.showEvent=this.cfg.showEvent||"click.ui-overlaypanel";this.cfg.hideEvent=this.cfg.hideEvent||"click.ui-overlaypanel";this.cfg.dismissable=!1===this.cfg.dismissable?!1:!0;this.cfg.showDelay=PrimeFaces.utils.defaultNumeric(this.cfg.showDelay,0);this.cfg.autoHide=void 0===this.cfg.autoHide?!0:this.cfg.autoHide;this.cfg.cache=!1===this.cfg.cache?!1:!0;this.allowHide=!0;this.cfg.showCloseIcon&&(this.closerIcon=$('\x3ca href\x3d"#" class\x3d"ui-overlaypanel-close ui-state-default"\x3e\x3cspan class\x3d"ui-icon ui-icon-closethick"\x3e\x3c/span\x3e\x3c/a\x3e').attr("aria-label", PrimeFaces.getAriaLabel("overlaypanel.CLOSE")).appendTo(this.jq));this.bindCommonEvents();this.target&&(this.bindTargetEvents(),this.target.attr({"aria-expanded":!1,"aria-controls":this.id}));this.transition=PrimeFaces.utils.registerCSSTransition(this.jq,"ui-connected-overlay")},refresh:function(a){this._cleanup();this._super(a)},destroy:function(){this._super();this._cleanup()},_cleanup:function(){this.loaded=!1;this.cfg.appendTo||PrimeFaces.utils.removeDynamicOverlay(this,this.jq,this.id,$(document.body)); this.jq.remove()},bindTargetEvents:function(){var a=this;this.target.data("primefaces-overlay-target",this.id).find("*").data("primefaces-overlay-target",this.id);if(this.cfg.showEvent===this.cfg.hideEvent)this.target.on(this.cfg.showEvent,function(d){a.toggle()});else{var b=this.cfg.showEvent+".ui-overlaypanel",c=this.cfg.hideEvent+".ui-overlaypanel";this.target.off(b+" "+c).on(b,function(d){a.isVisible()||(a.show(),"contextmenu.ui-overlaypanel"===b&&d.preventDefault())}).on(c,function(d){clearTimeout(a.showTimeout); a.isVisible()&&(!a.isAutoHide()&&$(d.relatedTarget).is("div.ui-overlaypanel-content")?a.allowHide=!1:a.hide())})}a.target.off("keydown.ui-overlaypanel keyup.ui-overlaypanel").on("keydown.ui-overlaypanel",PrimeFaces.utils.blockEnterKey).on("keyup.ui-overlaypanel",function(d){"Enter"===d.key&&(a.toggle(),d.preventDefault())});this.bindAutoHide()},bindAutoHide:function(){if(!this.isAutoHide()){var a=this;this.jq.off("mouseenter.tooltip mouseleave.tooltip").on("mouseenter.tooltip",function(b){a.allowHide= !1}).on("mouseleave.tooltip",function(b){$(b.relatedTarget).is(a.target)||(a.allowHide=!0,a.hide())})}},bindCommonEvents:function(){var a=this;if(this.cfg.showCloseIcon)this.closerIcon.on("mouseover.ui-overlaypanel",function(){$(this).addClass("ui-state-hover")}).on("mouseout.ui-overlaypanel",function(){$(this).removeClass("ui-state-hover")}).on("click.ui-overlaypanel",function(b){a.hide();b.preventDefault()}).on("focus.ui-overlaypanel",function(){$(this).addClass("ui-state-focus")}).on("blur.ui-overlaypanel", function(){$(this).removeClass("ui-state-focus")})},bindPanelEvents:function(){var a=this;this.cfg.dismissable&&!this.cfg.modal&&(this.hideOverlayHandler=PrimeFaces.utils.registerHideOverlayHandler(this,"keyup."+this.id+"_hide mousedown."+this.id+"_hide",this.jq,function(){return a.target},function(b,c){a.jq.is(c)||0a.cfg.pageCount||1>b?$(this).val(a.cfg.page+1):a.setPage(b-1))});this.firstLink.on("click",function(b){PrimeFaces.clearSelection();$(this).hasClass("ui-state-disabled")||a.setPage(0);b.preventDefault()});this.prevLink.on("click",function(b){PrimeFaces.clearSelection();$(this).hasClass("ui-state-disabled")||a.setPage(a.cfg.page-1);b.preventDefault()});this.nextLink.on("click",function(b){PrimeFaces.clearSelection();$(this).hasClass("ui-state-disabled")||a.setPage(a.cfg.page+ 1);b.preventDefault()});this.endLink.on("click",function(b){PrimeFaces.clearSelection();$(this).hasClass("ui-state-disabled")||a.setPage(a.cfg.pageCount-1);b.preventDefault()})},bindPageLinkEvents:function(){var a=this,b=this.pagesContainer.children(".ui-paginator-page");b.each(function(){var c=$(this),d=parseInt(c.text());c.attr("aria-label",a.cfg.ariaPageLabel.replace("{0}",d));c.hasClass("ui-state-active")&&c.attr("aria-current","page")});b.on("click.paginator",function(c){var d=$(this),e=parseInt(d.text()); d.hasClass("ui-state-disabled")||d.hasClass("ui-state-active")||a.setPage(e-1);c.preventDefault()}).on("mouseover.paginator",function(){var c=$(this);c.hasClass("ui-state-disabled")||c.hasClass("ui-state-active")||c.addClass("ui-state-hover")}).on("mouseout.paginator",function(){$(this).removeClass("ui-state-hover")}).on("focus.paginator",function(){$(this).addClass("ui-state-focus")}).on("blur.paginator",function(){$(this).removeClass("ui-state-focus")}).on("keydown.paginator",function(c){"Enter"=== c.key&&($(this).trigger("click"),c.preventDefault())})},bindSwipeEvents:function(a,b){if(PrimeFaces.env.isTouchable(b)){var c=this;a.swipe({swipeLeft:function(d){c.prev()},swipeRight:function(d){c.next()},excludedElements:PrimeFaces.utils.excludedSwipeElements()})}},unbindEvents:function(){var a=this.jq.children("a.ui-state-default");0this.cfg.rowCount&&(b=this.cfg.rowCount);a=this.cfg.currentPageTemplate.replace("{currentPage}",this.cfg.page+1).replace("{totalPages}", this.cfg.pageCount).replace("{totalRecords}",this.cfg.rowCount).replace("{startRecord}",a).replace("{endRecord}",b);this.currentReport.text(a);this.cfg.prevRows!==this.cfg.rows&&(this.rppSelect.filter(":not(.ui-state-focus)").children("option").filter('option[value\x3d"'+$.escapeSelector(this.cfg.rows)+'"]').prop("selected",!0),this.cfg.prevRows=this.cfg.rows);if(0f?e+1:f+1;for(e=e>f?f:e;e=a){if(0==a)this.jqValue.hide().css("width","0%").removeClass("ui-corner-right"),this.jqLabel.hide();else if(this.jqValue.show().animate({width:a+"%"},this.cfg.animationDuration, "easeInOutCirc"),this.cfg.labelTemplate){var b=this.cfg.labelTemplate.replace(/{value}/gi,a);this.jqLabel.text(b).show()}this.value=a;this.jq.attr("aria-valuenow",a)}},getValue:function(){return this.value},start:function(){var a=this;this.cfg.ajax&&(this.progressPoll=setInterval(function(){var b={source:a.id,process:a.id,formId:a.getParentFormId(),global:a.cfg.global,async:!0,oncomplete:function(c,d,e,f){c=e[a.id+"_value"];a.setValue(c);100===c&&a.fireCompleteEvent()}};PrimeFaces.ajax.Request.handle(b)}, this.cfg.interval))},fireCompleteEvent:function(){clearInterval(this.progressPoll);this.callBehavior("complete")},cancel:function(){clearInterval(this.progressPoll);this.setValue(0)},enableARIA:function(){this.jq.attr("role","progressbar").attr("aria-valuemin",0).attr("aria-valuenow",this.value).attr("aria-valuemax",100)}}); PrimeFaces.widget.Rating=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.input=$(this.jqId+"_input");this.value=this.getValue();this.stars=this.jq.children(".ui-rating-star");this.cancel=this.jq.children(".ui-rating-cancel");this.tabindex=this.jq.attr("tabindex");this.cfg.disabled||this.cfg.readonly?this.jq.attr("tabindex",-1):this.bindEvents();this.cfg.readonly&&this.jq.children().css("cursor","default")},bindEvents:function(){this.jq.attr("tabindex",this.tabindex);var a= this;this.input.on("keydown.rating",function(b){var c=a.getValue()||0;b=b.key;("ArrowLeft"===b||"ArrowDown"===b)&&0=a)this.reset();else{a>this.stars.length&&(a=this.stars.length);this.input.attr("value",a);this.stars.removeClass("ui-rating-star-on"); for(var b=0;ba.cfg.min){if("-"===b&&-1!==c.indexOf("-"))return!1; e="-"}return!b.match(new RegExp("[^0-9"+d+e+"]","g"))}}).on("keyup.slider",function(b){a.setValue(a.input.val())})},bindTouchEvents:function(){var a={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"};this.jq.children(".ui-slider-handle").on("touchstart touchmove touchend",function(b){var c=b.originalEvent.changedTouches[0],d=document.createEvent("MouseEvent");d.initMouseEvent(a[b.originalEvent.type],!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null);c.target.dispatchEvent(d); b.preventDefault()})},onSlide:function(a,b){this.cfg.onSlide&&this.cfg.onSlide.call(this,a,b);!0===this.cfg.range?(this.setInputValue(this.input.eq(0),b.values[0]),this.setInputValue(this.input.eq(1),b.values[1]),this.output&&this.output.text(this.cfg.displayTemplate.replace("{min}",b.values[0]).replace("{max}",b.values[1]))):(this.setInputValue(this.input,b.value),this.output&&this.output.text(this.cfg.displayTemplate.replace("{value}",b.value)))},setInputValue:function(a,b){a.parent().hasClass("ui-inputnumber")|| !0===this.cfg.range&&a.hasClass("ui-inputnumber")?(a=a.closest(".ui-inputnumber").attr("id"),PrimeFaces.getWidgetById(a).setValue(b)):a.hasClass("ui-spinner-input")?(a=a.closest(".ui-spinner").attr("id"),PrimeFaces.getWidgetById(a).setValue(b)):a.val(b)},triggerOnchange:function(a){a.parent().hasClass("ui-inputnumber")?a.trigger("change"):a.hasClass("ui-spinner-input")&&a.trigger("change")},onSlideEnd:function(a,b){this.cfg.onSlideEnd&&this.cfg.onSlideEnd.call(this,a,b);!0===this.cfg.range?(this.triggerOnchange(this.input.eq(0)), this.triggerOnchange(this.input.eq(1))):this.triggerOnchange(this.input);this.hasBehavior("slideEnd")&&this.callBehavior("slideEnd",{params:[{name:this.id+"_slideValue",value:b.value}]})},getValue:function(){return this.jq.slider("value")},setValue:function(a){this.jq.slider("value",a)},getValues:function(){return this.jq.slider("values")},setValues:function(a){this.jq.slider("values",a)},enable:function(){this.jq.slider("enable")},disable:function(){this.jq.slider("disable")}}); PrimeFaces.widget.Spinner=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.input=this.jq.children(".ui-spinner-input");this.upButton=this.jq.children("button.ui-spinner-up");this.downButton=this.jq.children("button.ui-spinner-down");this.cfg.step=this.cfg.step||1;void 0==this.cfg.thousandSeparator&&(this.cfg.thousandSeparator="");void 0==this.cfg.decimalSeparator&&(this.cfg.decimalSeparator=".");this.cfg.modifyValueOnWheel=!1!==this.cfg.modifyValueOnWheel;a=this.input.val(); this.cfg.precision=0;var b=parseInt(this.cfg.decimalPlaces,10);if(0this.cfg.maxlength&&(d=c);this.value= d;this.format();this.input.attr("aria-valuenow",this.getValue())},updateValue:function(){var a=this.input.val();if(this.cfg.prefix&&0===a.indexOf(this.cfg.prefix))a=a.substring(this.cfg.prefix.length,a.length);else{var b=a.indexOf(this.cfg.suffix);this.cfg.suffix&&-1c&&(b=a)):(b>c&&(b=c),ba||this.panels[1].dataset&&parseFloat(this.panels[1].dataset.minsize)>b?!1:!0},isStateful:function(){return null!=this.cfg.stateKey},saveState:function(){this.getStorage().setItem(this.cfg.stateKey,JSON.stringify(this.panelSizes))},restoreState:function(){var a=this.getStorage().getItem(this.cfg.stateKey),b=this;return a?(this.panelSizes=JSON.parse(a), this.panels.each(function(c,d){d.style.flexBasis="calc("+b.panelSizes[c]+"% - "+(b.panels.length-1)*b.cfg.gutterSize+"px)"}),!0):!1},getStorage:function(){switch(this.cfg.stateStorage){case "local":return window.localStorage;case "session":return window.sessionStorage;default:throw Error(this.cfg.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".');}}}); PrimeFaces.widget.Spotlight=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.target=PrimeFaces.expressions.SearchExpressionFacade.resolveComponentsAsSelector(this.cfg.target);$(document.body).children(".ui-spotlight").length||this.createMasks();this.cfg.active&&this.show()},createMasks:function(){$(document.body).append('\x3cdiv class\x3d"ui-widget-overlay ui-spotlight ui-spotlight-top ui-helper-hidden"\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-widget-overlay ui-spotlight ui-spotlight-bottom ui-helper-hidden"\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-widget-overlay ui-spotlight ui-spotlight-left ui-helper-hidden"\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-widget-overlay ui-spotlight ui-spotlight-right ui-helper-hidden"\x3e\x3c/div\x3e')}, show:function(){this.calculatePositions();this.target.attr({role:"dialog","aria-modal":!0});$(document.body).children("div.ui-spotlight").show();this.bindEvents()},calculatePositions:function(){var a=$(document),b=$(document.body),c=PrimeFaces.utils.calculateRelativeOffset(this.target),d=PrimeFaces.nextZindex();b.children("div.ui-spotlight-top").css({left:"0px",top:"0px",width:b.width()+"px",height:c.top+"px","z-index":d});var e=c.top+this.target.outerHeight();b.children("div.ui-spotlight-bottom").css({left:"0px", top:e+"px",width:b.width()+"px",height:a.height()-e+"px","z-index":d});b.children("div.ui-spotlight-left").css({left:"0px",top:c.top+"px",width:c.left+"px",height:this.target.outerHeight()+"px","z-index":d});a=c.left+this.target.outerWidth();b.children("div.ui-spotlight-right").css({left:a+"px",top:c.top+"px",width:b.width()-a+"px",height:this.target.outerHeight()+"px","z-index":d})},bindEvents:function(){var a=this;this.target.data("zindex",this.target.zIndex()).css("z-index",PrimeFaces.nextZindex()); this.cfg.blockScroll&&PrimeFaces.utils.preventScrolling();PrimeFaces.utils.preventTabbing(this.id,a.target.zIndex(),function(){return a.target.find(":tabbable")});var b=".spotlight"+this.id;$(window).on("resize"+b+" scroll"+b,function(){a.calculatePositions()})},unbindEvents:function(){PrimeFaces.utils.enableTabbing(this.id);this.cfg.blockScroll&&PrimeFaces.utils.enableScrolling();var a=".spotlight"+this.id;$(window).off(a)},hide:function(){$(document.body).children(".ui-spotlight").hide();this.unbindEvents(); this.target.css("z-index",String(this.target.zIndex()));this.target.attr({role:"","aria-modal":!1})}}); PrimeFaces.widget.SpeedDial=PrimeFaces.widget.DeferredWidget.extend({init:function(a){this._super(a);this.mask=this.jq.children(".ui-speeddial-mask");this.container=this.jq.children(".ui-speeddial");this.badge=this.container.children(".ui-overlay-badge");this.button=(0===this.badge.length?this.container:this.badge).children(".ui-speeddial-button");this.buttonIcon=this.button.children(".ui-icon");this.itemContainer=this.container.children(".ui-speeddial-list");this.items=this.itemContainer.children(".ui-speeddial-item"); this.itemsCount=this.items.length;this.cfg.visible=this.cfg.visible||!1;this.cfg.direction=this.cfg.direction||"up";this.cfg.transitionDelay=this.cfg.transitionDelay||30;this.cfg.type=this.cfg.type||"linear";this.cfg.radius=this.cfg.radius||0;this.cfg.mask=this.cfg.mask||!1;this.cfg.hideOnClickOutside=this.cfg.hideOnClickOutside||!0;this.cfg.keepOpen=this.cfg.keepOpen||!1;this.visible=this.cfg.visible;this.renderDeferred()},_render:function(){this.createItemContainerStyle();this.updateItemStyles(); this.cfg.hideOnClickOutside&&this.bindDocumentClickListener();this.bindEvents()},createItemContainerStyle:function(){if("linear"!==this.cfg.type){var a=this.button.get(0),b=this.items.get(0);if(a&&b){var c=Math.abs(a.offsetWidth-b.offsetWidth);a=Math.abs(a.offsetHeight-b.offsetHeight);this.itemContainer.get(0).style.setProperty("--item-diff-x",c/2+"px");this.itemContainer.get(0).style.setProperty("--item-diff-y",a/2+"px")}}},updateItemStyles:function(){for(var a=0;aa.initialState.top-a.cfg.margin?a.fix():a.restore()});PrimeFaces.utils.registerResizeHandler(this,"resize."+this.id+"_align",null,function(){a.fixed&&a.target.width(a.ghost.outerWidth()-(a.target.outerWidth()-a.target.width()))})},fix:function(a){if(!this.fixed||a)a=$(window).scrollTop(),this.target.css({position:"fixed",top:this.cfg.margin+"px","z-index":PrimeFaces.utils.nextStickyZindex()}).addClass("ui-shadow ui-sticky"),this.ghost=$('\x3cdiv class\x3d"ui-sticky-ghost"\x3e\x3c/div\x3e').height(this.target.outerHeight()).insertBefore(this.target), this.target.width(this.ghost.outerWidth()-(this.target.outerWidth()-this.target.width())),this.fixed=!0,$(window).scrollTop(a)},restore:function(){this.fixed&&(this.target.css({position:"static",top:"auto",width:"auto"}).removeClass("ui-shadow ui-sticky"),this.ghost.remove(),this.fixed=!1)}}); PrimeFaces.widget.TabView=PrimeFaces.widget.DeferredWidget.extend({init:function(a){this._super(a);this.panelContainer=this.jq.children(".ui-tabs-panels");this.stateHolder=$(this.jqId+"_activeIndex");this.cfg.selected=parseInt(this.stateHolder.val());this.focusedTabHeader=null;this.tabindex=this.cfg.tabindex||0;this.cfg.focusOnError=this.cfg.focusOnError||!1;this.cfg.focusOnLastActiveTab=this.cfg.focusOnLastActiveTab||!1;this.cfg.scrollable?(this.navscroller=this.jq.children(".ui-tabs-navscroller"), this.navcrollerLeft=this.navscroller.children(".ui-tabs-navscroller-btn-left"),this.navcrollerRight=this.navscroller.children(".ui-tabs-navscroller-btn-right"),this.navContainer=this.navscroller.children(".ui-tabs-nav"),this.firstTab=this.navContainer.children("li.ui-tabs-header:first-child"),this.lastTab=this.navContainer.children("li.ui-tabs-header:last-child"),this.scrollStateHolder=$(this.jqId+"_scrollState")):this.navContainer=this.jq.children(".ui-tabs-nav");this.headerContainer=this.navContainer.children("li.ui-tabs-header"); this.bindEvents();this.cfg.dynamic&&this.cfg.cache&&this.markAsLoaded(this.panelContainer.children().eq(this.cfg.selected));this.renderDeferred()},renderDeferred:function(){if(this.jq.is(":visible"))this._render();else if(this.jq.parent()[0]){var a=this.jq.parent()[0].closest(".ui-hidden-container");if(a&&(a=$(a),a.length)){var b=this;this.addDeferredRender(this.id,a,function(){return b.render()})}}},_render:function(){if(this.cfg.scrollable){this.initScrolling();var a=this;PrimeFaces.utils.registerResizeHandler(this, "resize."+this.id+"_align",this.jq,function(){a.initScrolling()})}},destroy:function(){this._super();PrimeFaces.env.isTouchable(this.cfg)&&this.jq.swipe("destroy")},bindEvents:function(){var a=this;this.headerContainer.on("mouseover.tabview",function(b){b=$(this);b.hasClass("ui-state-disabled")||b.addClass("ui-state-hover")}).on("mouseout.tabview",function(b){b=$(this);b.hasClass("ui-state-disabled")||b.removeClass("ui-state-hover")}).on("click.tabview",function(b){var c=$(this);if($(b.target).is(":not(.ui-icon-close)")){var d= a.headerContainer.index(c);c.hasClass("ui-state-disabled")||d===a.cfg.selected||(a.select(d),c.trigger("focus.tabview"))}b.preventDefault()});this.navContainer.find("li .ui-icon-close").on("click.tabview",function(b){var c=$(this).parent().index();a.cfg.onTabClose?!1!==a.cfg.onTabClose.call(a,c)&&a.remove(c):a.remove(c);b.preventDefault()});this.cfg.scrollable&&(this.navscroller.children(".ui-tabs-navscroller-btn").on("mouseover.tabview",function(){$(this).hasClass("ui-state-disabled")||$(this).addClass("ui-state-hover")}).on("mouseout.tabview", function(){$(this).hasClass("ui-state-disabled")||$(this).removeClass("ui-state-hover ui-state-active")}).on("mousedown.tabview",function(){$(this).hasClass("ui-state-disabled")||$(this).removeClass("ui-state-hover").addClass("ui-state-active")}).on("mouseup.tabview",function(){$(this).hasClass("ui-state-disabled")||$(this).addClass("ui-state-hover").removeClass("ui-state-active")}).on("focus.tabview",function(){$(this).addClass("ui-state-focus")}).on("blur.tabview",function(){$(this).removeClass("ui-state-focus")}), this.navcrollerLeft.on("click.tabview",function(b){a.scroll(100);b.preventDefault()}),this.navcrollerRight.on("click.tabview",function(b){a.scroll(-100);b.preventDefault()}));this.bindSwipeEvents();this.bindKeyEvents();this.bindRefreshListener()},bindSwipeEvents:function(){if(PrimeFaces.env.isTouchable(this.cfg)){var a=this;this.jq.swipe({swipeLeft:function(b){b=a.getActiveIndex();ba.navcrollerRight.position().left?a.navcrollerRight.trigger("click.tabview"):a.navcrollerLeft.is(":visible")&&c.position().leftb&&(b=$(this).data("index"))):$(this).removeClass("ui-state-error")});if(0>b||!a.cfg.focusOnError)b=a.cfg.selected;(a.cfg.focusOnError||a.cfg.focusOnLastActiveTab)&&0<=b&&setTimeout(function(){a.select(b,!0)},10)})}, initScrolling:function(){this.headerContainer.length&&(this.lastTab.position().left+this.lastTab.width()-this.firstTab.position().left>this.navscroller.innerWidth()?(this.navscroller.removeClass("ui-tabs-navscroller-btn-hidden"),this.navcrollerLeft.attr("tabindex",this.tabindex),this.navcrollerRight.attr("tabindex",this.tabindex),this.restoreScrollState()):(this.navscroller.addClass("ui-tabs-navscroller-btn-hidden"),this.navcrollerLeft.attr("tabindex",this.tabindex),this.navcrollerRight.attr("tabindex", this.tabindex)))},scroll:function(a){if(!this.navContainer.is(":animated")){var b=parseInt(this.navContainer.css("margin-left"))+a,c=this.navscroller.innerWidth(),d=this;if(0>a){var e=this.lastTab.position().left+parseInt(this.lastTab.innerWidth());e>c&&this.navContainer.animate({"margin-left":b+"px"},"fast","easeInOutCirc",function(){d.saveScrollState(b);e+a= b&&this.navContainer.animate({"margin-left":b+"px"},"fast","easeInOutCirc",function(){d.saveScrollState(b);0===b&&d.disableScrollerButton(d.navcrollerLeft);d.navcrollerRight.hasClass("ui-state-disabled")&&d.enableScrollerButton(d.navcrollerRight)})}},disableScrollerButton:function(a){a.addClass("ui-state-disabled").removeClass("ui-state-hover ui-state-active ui-state-focus").attr("tabindex",-1)},enableScrollerButton:function(a){a.removeClass("ui-state-disabled").attr("tabindex",this.tabindex)},saveScrollState:function(a){this.scrollStateHolder.val(a)}, restoreScrollState:function(){0===parseInt(this.scrollStateHolder.val())&&this.disableScrollerButton(this.navcrollerLeft);this.navContainer.css("margin-left",this.scrollStateHolder.val()+"px")},select:function(a,b){if(this.cfg.onTabChange&&!b&&!1===this.cfg.onTabChange.call(this,a))return!1;var c=this.panelContainer.children().eq(a),d=this.cfg.dynamic&&!this.isLoaded(c);this.stateHolder.val(c.data("index"));this.cfg.selected=a;d?this.loadDynamicTab(c):(this.show(c),b||(this.hasBehavior("tabChange")? this.fireTabChangeEvent(c):this.cfg.multiViewState&&(a={source:this.id,partialSubmit:!0,partialSubmitFilter:PrimeFaces.escapeClientId(this.id+"_activeIndex"),process:this.id,ignoreAutoUpdate:!0,global:!1,params:[{name:this.id+"_skipChildren",value:!0}]},PrimeFaces.ajax.Request.handle(a))));return!0},show:function(a){var b=this.panelContainer.children(".ui-tabs-panel:visible");a&&0!==a.length||(a=b);var c=this.headerContainer,d=c.filter(".ui-state-active"),e=d.next(".ui-tabs-actions:not(.ui-tabs-actions-global)"), f=e.length,g=c.eq(a.index()),h=g.next(".ui-tabs-actions:not(.ui-tabs-actions-global)"),k=h.length;c=this.navContainer.children(".ui-tabs-actions.ui-tabs-actions-global");var l=this;c.hide();k||(h=c,k=h.length);b.attr("aria-hidden",!0);b.addClass("ui-helper-hidden");d.attr("aria-expanded",!1);d.attr("aria-selected",!1);f&&e.attr("aria-hidden",!0);a.attr("aria-hidden",!1);a.removeClass("ui-helper-hidden");g.attr("aria-expanded",!0);g.attr("aria-selected",!0);k&&h.attr("aria-hidden",!1);this.cfg.effect&& b.length?b.hide(this.cfg.effect,null,this.cfg.effectDuration,function(){d.removeClass("ui-tabs-selected ui-state-active");f&&e.hide(l.cfg.effect,null,l.cfg.effectDuration);g.addClass("ui-tabs-selected ui-state-active");a.show(l.cfg.effect,null,l.cfg.effectDuration,function(){l.postTabShow(a)});k&&h.show(l.cfg.effect,null,l.cfg.effectDuration)}):(d.removeClass("ui-tabs-selected ui-state-active"),b.hide(),f&&e.hide(),g.addClass("ui-tabs-selected ui-state-active"),a.show(),k&&h.show(),this.postTabShow(a))}, loadDynamicTab:function(a){var b=this,c=a.data("index");a={source:this.id,process:this.id,update:this.id,ignoreAutoUpdate:!0,params:[{name:this.id+"_contentLoad",value:!0},{name:this.id+"_newTab",value:a.attr("id")},{name:this.id+"_tabindex",value:c}],onsuccess:function(d,e,f){PrimeFaces.ajax.Response.handle(d,e,f,{widget:b,handle:function(g){var h=b.panelContainer.children().eq(c);b.cfg.effect&&h.hide();h.html(g);b.cfg.cache&&b.markAsLoaded(h)}});return!0},oncomplete:function(){var d=b.panelContainer.children().eq(c); b.show(d)}};this.hasBehavior("tabChange")?this.callBehavior("tabChange",a):PrimeFaces.ajax.Request.handle(a)},remove:function(a){var b=this.headerContainer.eq(a),c=this.panelContainer.children().eq(a);b.remove();c.remove();this.headerContainer=this.navContainer.children("li.ui-tabs-header");this.panelContainer=this.jq.children(".ui-tabs-panels");b=this.getLength();0f?e+1:f+1;for(e=e>f?f:e;ee.length&&0===c.indexOf(e+"_")&&(a[b]=-1)}return a.filter(function(f){return-1!==f})},initDropScrollers:function(){var a=this,b=this.cfg.dragdropScope||this.id;this.jq.prepend('\x3cdiv class\x3d"ui-tree-scroller ui-tree-scrollertop"\x3e\x3c/div\x3e').append('\x3cdiv class\x3d"ui-tree-scroller ui-tree-scrollerbottom"\x3e\x3c/div\x3e'); this.jq.children("div.ui-tree-scroller").droppable({accept:".ui-treenode-content",tolerance:"pointer",scope:b,over:function(){var c=$(this).hasClass("ui-tree-scrollertop")?-10:10;a.scrollInterval=setInterval(function(){a.scroll(c)},100)},out:function(){clearInterval(a.scrollInterval)}})},scroll:function(a){this.container.scrollTop(this.container.scrollTop()+a)},updateDragDropBindings:function(a){a.after('\x3cli class\x3d"ui-tree-droppoint ui-droppable"\x3e\x3c/li\x3e');this.makeDropPoints(a.next("li.ui-tree-droppoint")); var b=a.find("li.ui-tree-droppoint");!b.hasClass("ui-droppable")||this.shiftKey||this.cfg.dropCopyNode||b.droppable("destroy");this.makeDropPoints(b);a=a.find(".ui-treenode-content");!a.hasClass("ui-droppable")||this.shiftKey||this.cfg.dropCopyNode||a.droppable("destroy");this.makeDropNodes(a);this.cfg.draggable&&a.data({dragsourceid:this.jqId,dragmode:this.cfg.dragMode})},findTargetDragNode:function(a,b){var c=null;"self"===b?c=a:"parent"===b?c=a.parent().closest("li.ui-treenode"):"ancestor"===b&& (c=a.parent().parents("li.ui-treenode:last"));0===c.length&&(c=a);return c},findNodes:function(a){for(var b=[],c=0;cf.top?(d.stickyContainer.css({position:"fixed",top:"0px"}).addClass("ui-shadow ui-sticky"),d.cfg.resizableColumns&&(d.relativeHeight=e-f.top),e>=f.top+d.tbody.height()?d.stickyContainer.hide():d.stickyContainer.show()):(d.stickyContainer.css({position:"absolute",top:f.top+"px"}).removeClass("ui-shadow ui-sticky"),d.stickyContainer.is(":hidden")&&d.stickyContainer.show(),d.cfg.resizableColumns&&(d.relativeHeight=0))});PrimeFaces.utils.registerResizeHandler(this, "resize.sticky-"+this.id,null,function(e){e=e.data.delay||0;null!==e&&"number"===typeof e&&-1c?c:b;b=b>c?b+1:c+1;for(c=this.tbody.children();athis.scrollBody.outerHeight()},setScrollWidth:function(a){var b=this;this.jq.children(".ui-widget-header").each(function(){b.setOuterWidth($(this),a)});this.scrollHeader.width(a);this.scrollBody.css("padding-right","0px").width(a);this.scrollFooter.width(a)},alignScrollBody:function(){this.cfg.scrollWidth||(this.hasVerticalOverflow()?this.scrollBody.css("padding-right", "0px"):this.scrollBody.css("padding-right",this.getScrollbarWidth()+"px"))},getScrollbarWidth:function(){return $.browser.webkit?"15":PrimeFaces.calculateScrollbarWidth()},restoreScrollState:function(){var a=(this.scrollStateVal||this.scrollStateHolder.val()).split(",");this.scrollBody.scrollLeft(a[0]);this.scrollBody.scrollTop(a[1]);this.scrollStateVal=null},saveScrollState:function(){var a=this.scrollBody.scrollLeft()+","+this.scrollBody.scrollTop();this.scrollStateHolder.val(a)},setupResizableColumns:function(){this.fixColumnWidths(); this.cfg.liveResize||(this.resizerHelper=$('\x3cdiv class\x3d"ui-column-resizer-helper ui-state-highlight"\x3e\x3c/div\x3e').appendTo(this.jq));this.thead.find("\x3e tr \x3e th.ui-resizable-column:not(:last-child)").prepend('\x3cspan class\x3d"ui-column-resizer"\x3e\x26nbsp;\x3c/span\x3e');var a=this;this.thead.find("\x3e tr \x3e th \x3e span.ui-column-resizer").draggable({axis:"x",start:function(){if(a.cfg.liveResize)a.jq.css("cursor","col-resize");else{var b=a.cfg.stickyHeader?a.clone:a.thead;b= a.cfg.scrollable?a.scrollBody.height():b.parent().height()-b.height()-1;a.cfg.stickyHeader&&(b-=a.relativeHeight);a.resizerHelper.height(b);a.resizerHelper.show()}},drag:function(b,c){a.cfg.liveResize?a.resize(b,c):a.resizerHelper.offset({left:c.helper.offset().left+c.helper.width()/2,top:a.thead.offset().top+a.thead.height()})},stop:function(b,c){var d=c.helper.parent();c.helper.css("left","");a.cfg.liveResize?a.jq.css("cursor","default"):(a.resize(b,c),a.resizerHelper.hide());b={source:a.id,process:a.id, params:[{name:a.id+"_colResize",value:!0},{name:a.id+"_columnId",value:d.attr("id")},{name:a.id+"_width",value:parseInt(d.width())},{name:a.id+"_height",value:parseInt(d.height())}]};a.hasBehavior("colResize")&&a.callBehavior("colResize",b);a.cfg.stickyHeader&&a.reclone()},containment:this.jq})},resize:function(a,b){var c=b.helper.parent(),d=c.next(),e=this.thead.parent();this.cfg.liveResize?(b=c.outerWidth()-(a.pageX-c.offset().left),a=c.width()-b,b=d.width()+b):(b=b.position.left-b.originalPosition.left, a=c.width()+b,b=d.width()-b);15k||k===e.length?b.tabCell(a,!h):e.eq(k).trigger("focus")): b.tabCell(a,!h),g.preventDefault()):"Escape"===k&&(b.doCellEditCancelRequest(a),g.preventDefault())}).on("focus.treetable-cell click.treetable-cell",function(g){b.currentCell=a}))},tabCell:function(a,b){var c=b?a.nextAll("td.ui-editable-column:first"):a.prevAll("td.ui-editable-column:first");0==c.length&&(a=b?a.parent().next():a.parent().prev(),c=b?a.children("td.ui-editable-column:first"):a.children("td.ui-editable-column:last"));this.showCellEditor(c)},saveCell:function(a){var b=a.find("div.ui-cell-editor-input :input:enabled"), c=!1;if(a.data("multi-edit"))for(var d=a.data("old-value"),e=0;ethis.hinput.children("option").length)){var e=PrimeFaces.escapeHTML(d);if(this.cfg.unique){var f=!1;this.hinput.children("option").each(function(){if(this.value===e)return f=!0,!1});if(f){this.refocus(b);continue}}d='\x3cli class\x3d"ui-chips-token ui-state-active ui-corner-all"\x3e';d+='\x3cspan class\x3d"ui-chips-token-icon ui-icon ui-icon-close"\x3e\x3c/span\x3e'; d+='\x3cspan class\x3d"ui-chips-token-label"\x3e'+e+"\x3c/span\x3e\x3c/li\x3e";this.inputContainer.before(d);this.refocus(b);this.hinput.append('\x3coption value\x3d"'+e+'" selected\x3d"selected"\x3e\x3c/option\x3e');this.invokeItemSelectBehavior(e)}}this.updateFloatLabel()}},refocus:function(a){this.input.val("");this.input.removeAttr("placeholder");a&&this.input.trigger("focus")},removeItem:function(a,b){var c=this.itemContainer.children("li.ui-chips-token").index(a),d=a.find("span.ui-chips-token-label").html(), e=this;this.hinput.children("option").eq(c).remove();b?a.remove():a.fadeOut("fast",function(){$(this).remove();e.invokeItemUnselectBehavior(d)});this.placeholder&&0===this.hinput.children("option").length&&this.input.attr("placeholder",this.placeholder);e.updateFloatLabel()},toggleEditor:function(){var a=this,b=this.itemContainer.children("li.ui-chips-token");if(b.length){var c="";b.each(function(){var d=$(this),e=d.find("span.ui-chips-token-label").html();c=c+e+(void 0!==a.cfg.separator?a.cfg.separator: "");a.removeItem(d,!0)});c&&(c=c.slice(0,-1),this.input.val(c))}else a.addItem(this.input.val(),!0)},invokeItemSelectBehavior:function(a){this.hasBehavior("itemSelect")&&this.callBehavior("itemSelect",{params:[{name:this.id+"_itemSelect",value:a}]})},invokeItemUnselectBehavior:function(a){this.hasBehavior("itemUnselect")&&this.callBehavior("itemUnselect",{params:[{name:this.id+"_itemUnselect",value:a}]})},disable:function(){PrimeFaces.utils.disableInputWidget(this.jq,this.input)},enable:function(){PrimeFaces.utils.enableInputWidget(this.jq, this.input)}}); PrimeFaces.widget.ScrollTop=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.scrollElement="window"===this.cfg.target?$(window):this.jq.parent();this.bindEvents()},bindEvents:function(){var a=this,b="scroll.scrollTop"+this.id,c=a.jq.css("zIndex");this.jq.on("click.scrollTop",function(d){a.scrollElement.get(0).scroll({top:0,behavior:a.cfg.behavior});d.preventDefault()});this.scrollElement.off(b).on(b,function(){a.cfg.threshold