varwpNavMenu;!function(a){varb;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:void0,targetList:void0,menusChanged:!1,isRTL:!("undefined"==typeofisRtl||!isRtl),negateIfRTL:"undefined"!=typeofisRtl&&isRtl?-1:1,init:function(){b.menuList=a("#menu-to-edit"),b.targetList=b.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.setupInputWithDefaultTitle(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),b.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&a("#posttype-page").addSelectedToMenu(b.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){a.fn.extend({menuItemDepth:function(){vara=this.eq(0).css(b.isRTL?"margin-right":"margin-left");returnb.pxToDepth(a&&-1!=a.indexOf("px")?a.slice(0,-2):0)},updateDepthClass:function(b,c){returnthis.each(function(){vard=a(this);c=c||d.menuItemDepth(),a(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+b)})},shiftDepthClass:function(b){returnthis.each(function(){varc=a(this),d=c.menuItemDepth();a(this).removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+(d+b))})},childMenuItems:function(){varb=a();returnthis.each(function(){for(varc=a(this),d=c.menuItemDepth(),e=c.next();e.length&&e.menuItemDepth()>d;)b=b.add(e),e=e.next()}),b},shiftHorizontally:function(b){returnthis.each(function(){varc=a(this),d=c.menuItemDepth(),e=d+b;c.moveHorizontally(e,d)})},moveHorizontally:function(b,c){returnthis.each(function(){vard=a(this),e=d.childMenuItems(),f=b-c,g=d.find(".is-submenu");d.updateDepthClass(b,c).updateParentMenuItemDBId(),e&&e.each(function(){varb=a(this),c=b.menuItemDepth(),d=c+f;b.updateDepthClass(d,c).updateParentMenuItemDBId()}),0===b?g.hide():g.show()})},updateParentMenuItemDBId:function(){returnthis.each(function(){varb=a(this),c=b.find(".menu-item-data-parent-id"),d=parseInt(b.menuItemDepth(),10),e=d-1,f=b.prevAll(".menu-item-depth-"+e).first();c.val(0===d?0:f.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){returnthis.each(function(){varb=a(this);a(".hide-column-tog").not(":checked").each(function(){b.find(".field-"+a(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return0===a("#menu-to-edit").length?!1:this.each(function(){vard=a(this),e={},f=d.find(menus.oneThemeLocationNoMenus&&0===d.find(".tabs-panel-active .categorychecklist li input:checked").length?'#page-all li input[type="checkbox"]':".tabs-panel-active .categorychecklist li input:checked"),g=/menu-item\[([^\]]*)/;returnc=c||b.addMenuItemToBottom,f.length?(d.find(".spinner").show(),a(f).each(function(){vard=a(this),f=g.exec(d.attr("name")),h="undefined"==typeoff[1]?0:parseInt(f[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(c=b.addMenuItemToTop),e[h]=d.closest("li").getItemData("add-menu-item",h)}),voidb.addItemToMenu(e,c,function(){f.removeAttr("checked"),d.find(".spinner").hide()})):!1})},getItemData:function(a,b){a=a||"menu-item";varc,d={},e=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];returnb||"menu-item"!=a||(b=this.find(".menu-item-data-db-id").val()),b?(this.find("input").each(function(){varf;for(c=e.length;c--;)"menu-item"==a?f=e[c]+"["+b+"]":"add-menu-item"==a&&(f="menu-item["+b+"]["+e[c]+"]"),this.name&&f==this.name&&(d[e[c]]=this.value)}),d):d},setItemData:function(b,c,d){returnc=c||"menu-item",d||"menu-item"!=c||(d=a(".menu-item-data-db-id",this).val()),d?(this.find("input").each(function(){vare,f=a(this);a.each(b,function(a,b){"menu-item"==c?e=a+"["+d+"]":"add-menu-item"==c&&(e="menu-item["+d+"]["+a+"]"),e==f.attr("name")&&f.val(b)})}),this):this}})},countMenuItems:function(b){returna(".menu-item-depth-"+b).length},moveMenuItem:func