functionProcessPageListInit(){if(ProcessWire.config.ProcessPageList){$("#"+ProcessWire.config.ProcessPageList.containerID).ProcessPageList(ProcessWire.config.ProcessPageList)}}$(document).ready(function(){ProcessPageListInit()});(function($){$.fn.ProcessPageList=function(customOptions){varoptions={mode:"",limit:35,rootPageID:0,showRootPage:true,selectedPageID:0,adminPageID:2,trashPageID:7,langID:0,selectAllowUnselect:false,selectShowPageHeader:true,selectShowPath:true,selectMultiple:false,selectStartLabel:"Change",selectCancelLabel:"Cancel",selectSelectLabel:"Select",selectUnselectLabel:"Unselect",moreLabel:"More",trashLabel:"Trash",moveInstructionLabel:"Click and drag to move",selectSelectHref:"#",selectUnselectHref:"#",ajaxURL:ProcessWire.config.urls.admin+"page/list/",ajaxMoveURL:ProcessWire.config.urls.admin+"page/sort/",paginationClass:"PageListPagination",paginationCurrentClass:"PageListPaginationCurrent",paginationLinkClass:"ui-state-default",paginationLinkCurrentClass:"ui-state-active",paginationHoverClass:"ui-state-hover",paginationDisabledClass:"ui-priority-secondary",openPagination:0,openPageIDs:[],openPageData:{},speed:200,useHoverActions:false,hoverActionDelay:250,hoverActionFade:150,useNarrowActions:$("body").hasClass("pw-narrow-width"),spinnerMarkup:"<span class='PageListLoading'><i class='ui-priority-secondary fa fa-fw fa-spin fa-spinner'></i></span>",labelName:"",qtyType:""};varcurrentOpenPageIDs=[];varignoreClicks=false;varisModal=$("body").hasClass("modal")||$("body").hasClass("pw-iframe");if(typeofProcessWire.config.ProcessPageList!="undefined"){$.extend(options,ProcessWire.config.ProcessPageList)}$.extend(options,customOptions);returnthis.each(function(index){var$container=$(this);var$outer;var$root;var$loading=$(options.spinnerMarkup);varfirstPagination=0;varcurPagination=0;functioninit(){$root=$("<div class='PageListRoot'></div>");if($container.is(":input")){options.selectedPageID=$container.val();if(!options.selectedPageID.length)options.selectedPageID=0;options.mode="select";$container.before($root);$outer=$container.closest(".InputfieldContent");setupSelectMode()}else{options.mode="actions";$container.append($root);$outer=$container;loadChildren(options.rootPageID>0?options.rootPageID:1,$root,0,true)}$(document).on("pageListRefresh",function(e,pageID){refreshList(pageID)});if(options.useHoverActions){$root.addClass("PageListUseHoverActions");setupHoverActions()}}functionsetupHoverActions(){varhoverTimeout=null;varhoverOutTimeout=null;var$hoveredItem=null;functionshowItem($item){var$actions=$item.find(".PageListActions");if(!$actions.is(":visible")||$item.hasClass("PageListItemOpen")){$item.addClass("PageListItemHover");$actions.css("display","inline").css("opacity",0).animate({opacity:1},options.hoverActionFade)}}functionhideItem($item){var$actions=$item.find(".PageListActions");$item.removeClass("PageListItemHover");if($actions.is(":visible")){$actions.animate({opacity:0},options.hoverActionFade,function(){$actions.hide()})}}$outer.on("keydown",".PageListItem",function(e){e=e||window.event;if(e.keyCode==0||e.keyCode==32){var$actions=$(this).find(".PageListActions");if($actions.is(":visible")){$actions.css("display","none")}else{$actions.css("display","inline-block")}returnfalse}});$outer.on("mouseover",".PageListItem",function(e){if($root.is(".PageListSorting")||$root.is(".PageListSortSaving"))return;if(!$(this).children("a:first").is(":hover"))return;$hoveredItem=$(this);if($hoveredItem.hasClass("PageListItemHover"))return;var$item=$(this);if(hoverTimeout)clearTimeout(hoverTimeout);vardelay=options.hoverActionDelay;hoverTimeout=setTimeout(function(){if($hoveredItem.attr("class")==$item.attr("class")){if(!$hoveredItem.children("a:first").is(":hover"))return;var$hideItems=$outer.find(".PageListItemHover");showItem($hoveredItem);$hideItems.each(function(){hideItem($(this))})}},delay)}).on("mouseout",".PageListItem",function(e){if($root.is(".PageListSorting")||$root.is(".PageListSortSaving"))return;var$item=$(this);if($item.hasClass("PageListItemOpen"))return;if(!$item