!functione(t,n,i){functions(o,r){if(!n[o]){if(!t[o]){varl="function"==typeofrequire&&require;if(!r&&l)returnl(o,!0);if(a)returna(o,!0);vard=newError("Cannot find module '"+o+"'");throwd.code="MODULE_NOT_FOUND",d}varc=n[o]={exports:{}};t[o][0].call(c.exports,function(e){varn=t[o][1][e];returns(n?n:e)},c,c.exports,e,t,n,i)}returnn[o].exports}for(vara="function"==typeofrequire&&require,o=0;o<i.length;o++)s(i[o]);returns}({1:[function(e,t,n){"use strict";e("../legacy/LeftAndMain.Layout.js"),e("../legacy/LeftAndMain.js"),e("../legacy/LeftAndMain.ActionTabSet.js"),e("../legacy/LeftAndMain.Panel.js"),e("../legacy/LeftAndMain.Tree.js"),e("../legacy/LeftAndMain.Content.js"),e("../legacy/LeftAndMain.EditForm.js"),e("../legacy/LeftAndMain.Menu.js"),e("../legacy/LeftAndMain.Preview.js"),e("../legacy/LeftAndMain.BatchActions.js"),e("../legacy/LeftAndMain.FieldHelp.js"),e("../legacy/LeftAndMain.FieldDescriptionToggle.js"),e("../legacy/LeftAndMain.TreeDropdownField.js"),e("../legacy/AddToCampaignForm.js")},{"../legacy/AddToCampaignForm.js":2,"../legacy/LeftAndMain.ActionTabSet.js":3,"../legacy/LeftAndMain.BatchActions.js":4,"../legacy/LeftAndMain.Content.js":5,"../legacy/LeftAndMain.EditForm.js":6,"../legacy/LeftAndMain.FieldDescriptionToggle.js":7,"../legacy/LeftAndMain.FieldHelp.js":8,"../legacy/LeftAndMain.Layout.js":9,"../legacy/LeftAndMain.Menu.js":10,"../legacy/LeftAndMain.Panel.js":11,"../legacy/LeftAndMain.Preview.js":12,"../legacy/LeftAndMain.Tree.js":13,"../legacy/LeftAndMain.TreeDropdownField.js":14,"../legacy/LeftAndMain.js":15}],2:[function(e,t,n){"use strict";functioni(e){returne&&e.__esModule?e:{"default":e}}vars=e("jQuery"),a=i(s),o=e("i18n");i(o);a["default"].entwine("ss",function(e){e(".add-to-campaign-action, #add-to-campaign__action").entwine({onclick:function(){vart=e("#add-to-campaign__dialog");t.length?t.open():(t=e('<div id="add-to-campaign__dialog" class="add-to-campaign__dialog" />'),e("body").append(t)),0==t.children().length&&t.addClass("loading");varn=this.closest("form"),i=this,s=n.serializeArray();returns.push({name:i.attr("name"),value:"1"}),e.ajax({url:n.attr("action"),data:s,type:"POST",global:!1,complete:function(){t.removeClass("loading")},success:function(n,i,s){if(0===s.getResponseHeader("Content-Type").indexOf("text/plain")){vara=e('<div class="add-to-campaign__response add-to-campaign__response--good"><span></span></div>');a.find("span").text(n),t.append(a)}elset.html(n)},error:functiona(n,i){vara=n.responseText||"Something went wrong. Please try again in a few minutes.",s=e('<div class="add-to-campaign__response add-to-campaign__response--error"><span></span></div>');s.find("span").text(a),t.append(s)}}),!1}}),e("#add-to-campaign__dialog").entwine({onadd:function(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,minHeight:200,maxHeight:200,minWidth:200,maxWidth:500}),this._super()},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},onssdialogclose:function(){this.empty()},"onchosen:showing_dropdown":function(){this.css({overflow:"visible"})},"onchosen:hiding_dropdown":function(){this.css({overflow:""})}})})},{i18n:"i18n",jQuery:"jQuery"}],3:[function(e,t,n){"use strict";functioni(e){returne&&e.__esModule?e:{"default":e}}vars=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){vart=e(".cms-container").find("iframe");t.each(function(t,n){try{e(n).contents().off("click.ss-ui-action-tabset")}catch(i){console.warn("Unable to access iframe, possible https mis-match")}}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){vari,s=this,a=e(".cms-container").find("iframe");i=function(t){varn,a;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(s).length||n.length||(s.tabs("option","active",!1),a=e(".cms-con
this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;i.entwine(".ss").previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}returnn!==!1&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){vart=this.getSizes();returnthis.setCurrentSizeName(e),this.removeClass("auto desktop tablet mobile").addClass(e),this.find(".preview-device-outer").width(t[e].width).height(t[e].height),this.find(".preview-device-inner").width(t[e].width),this.saveState("size",e),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));vart=this.getCurrentStateName();t&&this.find(".cms-preview-states").changeVisibleState(t);varn=e(".cms-container").entwine(".ss").getLayoutOptions();n&&e(".preview-mode-selector").changeVisibleMode(n.mode);vari=this.getCurrentSizeName();returni&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(e,t){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+e,t)},loadState:function(e){returnthis._supportsLocalStorage()?window.localStorage.getItem("cms-preview-state-"+e):void0},disablePreview:function(){returnthis.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){returnthis.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),e.browser.msie&&e.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){vart=e("#FontFixStyleElement");returnt.length||(t=e('<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>').appendTo("head")),t},onadd:function(){vart=this,n=(this.parent(),this.find("iframe"));n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),e.browser.msie&&8===parseInt(e.browser.version,10)&&n.bind("readystatechange",function(e){"interactive"==n[0].readyState&&(t.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){t.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this.append('<div class="cms-preview-overlay ui-widget-overlay-light"></div>'),this.find(".cms-preview-overlay").hide(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){vare,t,n=newDate;try{return(e=window.localStorage).setItem(n,n),t=e.getItem(n)==n,e.removeItem(n),t&&e}catch(i){console.warn("localStorge is not available due to current browser / system settings.")}},onenable:function(){vart=e(".preview-mode-selector");t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){vart=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){returnthis.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function(){returnthis.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){vart,n;returne(".cms-previewable").length?(t=this.loadState("mode"),n=this.loadState("size"),this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw(),t&&this.changeMode(t),n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){vare=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){returnthis.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){vart=e.map(this.getAllowedStates(),function(t){varn=e(".cms-preview-states .state-name[data-name="+t+"]");returnn.length?{name:t,url:n.attr("data-link"),active:n.is(":radio"
onclick:function(e){e.preventDefault();vart=$(this).parents("form");t.clearForm(),t.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),t.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));vare=this,t=this.data("url");if(!t)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeofwindow._panelDeferredCache[t]?(this.addClass("loading"),$.ajax({url:t,complete:function(){e.removeClass("loading")},success:function(t,n,i){e.html(t)}})):this.html(window._panelDeferredCache[t]))}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();vare=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("uiTabs")||this.tabs({active:-1!=e.index()?e.index():0,beforeLoad:function(e,t){return!1},activate:function(e,t){varn=$(this).closest("form").find(".Actions");$(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}})},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){vare=$(this).attr("href").match(/#.*/);e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){vare=this,t=$(".cms-content-filters").first(),n=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),t[n?"slideDown":"slideUp"]({complete:function(){e.data("collapsed",!n),e.data("animating",!1)}}))},onclick:function(){this.showHide()}})});varstatusMessage=function(e,t){e=jQuery("<div/>").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})},errorMessage=function(e){jQuery.noticeAdd({text:e,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{jQuery:"jQuery","lib/Config":16,"lib/Router":"lib/Router"}],16:[function(e,t,n){"use strict";functioni(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});vars=function(){functione(){i(this,e)}returne.getSection=function(e){returnwindow.ss.config.sections[e]},e.getTopLevelRoutes=function(){vare=[];returnObject.keys(window.ss.config.sections).forEach(function(t){varn=window.ss.config.sections[t].route,i=n.match(/^admin\/[^\/]+(\/?)$/);if(i){n=n.replace(/\/$/,"");vars=-1===e.indexOf(n);s&&e.push(n)}}),e},e}();n["default"]=s},{}]},{},[1]);