silverstripe-framework/admin/client/dist/js/bundle-legacy.js
2016-09-14 14:12:04 +12:00

6 lines
104 KiB
JavaScript

!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";require("../legacy/LeftAndMain.Layout.js"),require("../legacy/LeftAndMain.js"),require("../legacy/LeftAndMain.ActionTabSet.js"),require("../legacy/LeftAndMain.Panel.js"),require("../legacy/LeftAndMain.Tree.js"),require("../legacy/LeftAndMain.Content.js"),require("../legacy/LeftAndMain.EditForm.js"),require("../legacy/LeftAndMain.Menu.js"),require("../legacy/LeftAndMain.Preview.js"),require("../legacy/LeftAndMain.BatchActions.js"),require("../legacy/LeftAndMain.FieldHelp.js"),require("../legacy/LeftAndMain.FieldDescriptionToggle.js"),require("../legacy/LeftAndMain.TreeDropdownField.js"),require("../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(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_reactRedux=require("react-redux"),_FormBuilderModal=require("components/FormBuilderModal/FormBuilderModal"),_FormBuilderModal2=_interopRequireDefault(_FormBuilderModal);_jQuery2["default"].entwine("ss",function($){$(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick:function(){var dialog=$("#add-to-campaign__dialog-wrapper");return dialog.length||(dialog=$('<div id="add-to-campaign__dialog-wrapper" />'),$("body").append(dialog)),dialog.open(),!1}}),$("#add-to-campaign__dialog-wrapper").entwine({open:function(){this._renderModal()},close:function(){this._clearModal()},_renderModal:function(){var _this=this,handleHide=function(){return _this._clearModal()},handleSubmit=function(){return _this._handleSubmitModal.apply(_this,arguments)},id=$("form.cms-edit-form :input[name=ID]").val(),store=window.ss.store,sectionConfig=store.getState().config.sections["SilverStripe\\CMS\\Controllers\\CMSPageEditController"],modalSchemaUrl=sectionConfig.form.AddToCampaignForm.schemaUrl+"/"+id;_reactDom2["default"].render(_react2["default"].createElement(_reactRedux.Provider,{store:store},_react2["default"].createElement(_FormBuilderModal2["default"],{show:!0,handleSubmit:handleSubmit,handleHide:handleHide,schemaUrl:modalSchemaUrl,bodyClassName:"add-to-campaign__dialog",responseClassBad:"add-to-campaign__response add-to-campaign__response--error",responseClassGood:"add-to-campaign__response add-to-campaign__response--good"})),this[0])},_clearModal:function(){_reactDom2["default"].unmountComponentAtNode(this[0])},_handleSubmitModal:function(event,fieldValues,submitFn){return event.preventDefault(),fieldValues.Campaign?submitFn():(alert(_i18n2["default"]._t("AddToCampaigns.ErrorCampaignNotSelected","There was no campaign selected to be added to")),null)}})})},{"components/FormBuilderModal/FormBuilderModal":"components/FormBuilderModal/FormBuilderModal",i18n:"i18n",jQuery:"jQuery",react:"react","react-dom":"react-dom","react-redux":19}],3:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){var frame=$(".cms-container").find("iframe");frame.each(function(index,iframe){try{$(iframe).contents().off("click.ss-ui-action-tabset")}catch(e){console.warn("Unable to access iframe, possible https mis-match")}}),$(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(event,ui){this.riseUp(event,ui)},onclick:function(event,ui){this.attachCloseHandler(event,ui)},attachCloseHandler:function(event,ui){var _closeHandler,that=this,frame=$(".cms-container").find("iframe");_closeHandler=function(event){var panel,frame;panel=$(event.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),$(event.target).closest(that).length||panel.length||(that.tabs("option","active",!1),frame=$(".cms-container").find("iframe"),frame.each(function(index,iframe){$(iframe).contents().off("click.ss-ui-action-tabset",_closeHandler)}),$(document).off("click.ss-ui-action-tabset",_closeHandler))},$(document).on("click.ss-ui-action-tabset",_closeHandler),frame.length>0&&frame.each(function(index,iframe){$(iframe).contents().on("click.ss-ui-action-tabset",_closeHandler)})},riseUp:function(event,ui){var elHeight,trigger,endOfWindow,elPos,activePanel,activeTab,topPosition,containerSouth,padding;return elHeight=$(this).find(".ui-tabs-panel").outerHeight(),trigger=$(this).find(".ui-tabs-nav").outerHeight(),endOfWindow=$(window).height()+$(document).scrollTop()-trigger,elPos=$(this).find(".ui-tabs-nav").offset().top,activePanel=ui.newPanel,activeTab=ui.newTab,elPos+elHeight>=endOfWindow&&elPos-elHeight>0?(this.addClass("rise-up"),null!==activeTab.position()&&(topPosition=-activePanel.outerHeight(),containerSouth=activePanel.parents(".toolbar--south"),containerSouth&&(padding=activeTab.offset().top-containerSouth.offset().top,topPosition-=padding),$(activePanel).css("top",topPosition+"px"))):(this.removeClass("rise-up"),null!==activeTab.position()&&$(activePanel).css("bottom","100%")),!1}}),$(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(ui.newPanel).length>0&&$(ui.newPanel).css("left",ui.newTab.position().left+"px")}}),$(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),$(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(ui.newPanel).length>0&&($(ui.newTab).hasClass("last")?($(ui.newPanel).css({left:"auto",right:"0px"}),$(ui.newPanel).parent().addClass("tabset-open-last")):($(ui.newPanel).css("left",ui.newTab.position().left+"px"),$(ui.newTab).hasClass("first")&&($(ui.newPanel).css("left","0px"),$(ui.newPanel).parent().addClass("tabset-open"))))}}),$(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(e){$(e.target).parent().find("li .active").removeClass("active"),$(e.target).find("a").addClass("active")}},ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(ui.newPanel).css({left:"auto",right:"auto"}),$(ui.newPanel).length>0&&$(ui.newPanel).parent().addClass("tabset-open")}})})},{jQuery:"jQuery"}],4:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);_jQuery2["default"].entwine("ss.tree",function($){$("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return $(".cms-tree")},fromTree:{oncheck_node:function(e,data){this.serializeFromTree()},onuncheck_node:function(e,data){this.serializeFromTree()}},onmatch:function(){var self=this;self.getTree().bind("load_node.jstree",function(e,data){self.refreshSelected()})},onunmatch:function(){var self=this;self.getTree().unbind("load_node.jstree")},registerDefault:function(){this.register(ss.config.adminUrl+"pages/batchactions/publish",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/unpublish",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/delete",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete?"),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/archive",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_ARCHIVE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to archive these pages?\n\nThese pages and all of their children pages will be unpublished and sent to the archive."),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/restore",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_RESTORE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/deletefromlive",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_DELETELIVE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete these pages from live?"),{num:ids.length}));return confirmed?ids:!1})},onadd:function(){this.registerDefault(),this._super()},register:function(type,callback){this.trigger("register",{type:type,callback:callback});var actions=this.getActions();actions[type]=callback,this.setActions(actions)},unregister:function(type){this.trigger("unregister",{type:type});var actions=this.getActions();actions[type]&&delete actions[type],this.setActions(actions)},refreshSelected:function(rootNode){var self=this,st=this.getTree(),ids=this.getIDs(),allIds=[],viewMode=$(".cms-content-batchactions-button"),actionUrl=this.find(":input[name=Action]").val();null==rootNode&&(rootNode=st);for(var idx in ids)$($(st).getNodeByID(idx)).addClass("selected").attr("selected","selected");if(!actionUrl||-1==actionUrl||!viewMode.hasClass("active"))return void $(rootNode).find("li").each(function(){$(this).setEnabled(!0)});$(rootNode).find("li").each(function(){allIds.push($(this).data("id")),$(this).addClass("treeloading").setEnabled(!1)});var actionUrlParts=$.path.parseUrl(actionUrl),applicablePagesUrl=actionUrlParts.hrefNoSearch+"/applicablepages/";applicablePagesUrl=$.path.addSearchParams(applicablePagesUrl,actionUrlParts.search),applicablePagesUrl=$.path.addSearchParams(applicablePagesUrl,{csvIDs:allIds.join(",")}),jQuery.getJSON(applicablePagesUrl,function(applicableIDs){jQuery(rootNode).find("li").each(function(){$(this).removeClass("treeloading");var id=$(this).data("id");0==id||$.inArray(id,applicableIDs)>=0?$(this).setEnabled(!0):($(this).removeClass("selected").setEnabled(!1),$(this).prop("selected",!1))}),self.serializeFromTree()})},serializeFromTree:function(){var tree=this.getTree(),ids=tree.getSelectedIDs();return this.setIDs(ids),!0},setIDs:function(ids){this.find(":input[name=csvIDs]").val(ids?ids.join(","):null)},getIDs:function(){var value=this.find(":input[name=csvIDs]").val();return value?value.split(","):[]},onsubmit:function(e){var self=this,ids=this.getIDs(),tree=this.getTree(),actions=this.getActions();if(!ids||!ids.length)return alert(_i18n2["default"]._t("CMSMAIN.SELECTONEPAGE","Please select at least one page")),e.preventDefault(),!1;var type=this.find(":input[name=Action]").val();if(actions[type]&&(ids=this.getActions()[type].apply(this,[ids])),!ids||!ids.length)return e.preventDefault(),!1;this.setIDs(ids),tree.find("li").removeClass("failed");var button=this.find(":submit:first");return button.addClass("loading"),jQuery.ajax({url:type,type:"POST",data:this.serializeArray(),complete:function(xmlhttp,status){button.removeClass("loading"),tree.jstree("refresh",-1),self.setIDs([]),self.find(":input[name=Action]").val("").change();var msg=xmlhttp.getResponseHeader("X-Status");msg&&statusMessage(decodeURIComponent(msg),"success"==status?"good":"bad")},success:function(data,status){var id,node;if(data.modified){var modifiedNodes=[];for(id in data.modified)node=tree.getNodeByID(id),tree.jstree("set_text",node,data.modified[id].TreeTitle),modifiedNodes.push(node);$(modifiedNodes).effect("highlight")}if(data.deleted)for(id in data.deleted)node=tree.getNodeByID(id),node.length&&tree.jstree("delete_node",node);if(data.error)for(id in data.error)node=tree.getNodeByID(id),$(node).addClass("failed")},dataType:"json"}),e.preventDefault(),!1}}),$(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var tree=$(".cms-tree"),form=$("#Form_BatchActionsForm");this._super(),this.data("active")?(tree.addClass("multiple"),tree.removeClass("draggable"),form.serializeFromTree()):(tree.removeClass("multiple"),tree.addClass("draggable")),$("#Form_BatchActionsForm").refreshSelected()}}),$("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(e){var form=$(e.target.form),btn=form.find(":submit"),selected=$(e.target).val();selected&&-1!=selected?btn.removeAttr("disabled").button("refresh"):btn.attr("disabled","disabled").button("refresh"),$("#Form_BatchActionsForm").refreshSelected(),this.trigger("chosen:updated"),this._super(e)}})})},{i18n:"i18n",jQuery:"jQuery"}],5:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".cms-content").entwine({onadd:function(){this.find(".cms-tabset").redrawTabs(),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw(),this.find(".cms-content-actions").redraw()}}),$(".cms-content .cms-tree").entwine({onadd:function(){var self=this;this._super(),this.bind("select_node.jstree",function(e,data){var node=data.rslt.obj,loadedNodeID=self.find(":input[name=ID]").val(),origEvent=data.args[2],container=$(".cms-container");if(!origEvent)return!1;if($(node).hasClass("disabled"))return!1;if($(node).data("id")!=loadedNodeID){var url=$(node).find("a:first").attr("href");url&&"#"!=url?(url=url.split("?")[0],self.jstree("deselect_all"),self.jstree("uncheck_all"),$.path.isExternal($(node).find("a:first"))&&(url=url=$.path.makeUrlAbsolute(url,$("base").attr("href"))),document.location.search&&(url=$.path.addSearchParams(url,document.location.search.replace(/^\?/,""))),container.loadPanel(url)):self.removeForm()}})}}),$(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms-content .cms-content-header, .cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto"),this.height(this.innerHeight()-this.css("padding-top")-this.css("padding-bottom"))}})})},{jQuery:"jQuery"}],6:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);window.onbeforeunload=function(e){var form=(0,_jQuery2["default"])(".cms-edit-form");return form.trigger("beforesubmitform"),form.is(".changed")&&!form.is(".discardchanges")?_i18n2["default"]._t("LeftAndMain.CONFIRMUNSAVEDSHORT"):void 0},_jQuery2["default"].entwine("ss",function($){$(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},ValidationErrorShown:!1,onadd:function(){this.attr("autocomplete","off"),this._setupChangeTracker();for(var overrideAttr in{action:!0,method:!0,enctype:!0,name:!0}){var el=this.find(":input[name=_form_"+overrideAttr+"]");el&&(this.attr(overrideAttr,el.val()),el.remove())}this.setValidationErrorShown(!1),this._super()},"from .cms-tabset":{onafterredrawtabs:function(){if(this.hasClass("validationerror")){var tabError=this.find(".message.validation, .message.required").first().closest(".tab");$(".cms-container").clearCurrentTabState();var $tabSet=tabError.closest(".ss-tabset");$tabSet.length||($tabSet=tabError.closest(".cms-tabset")),$tabSet.length?$tabSet.tabs("option","active",tabError.index(".tab")):this.getValidationErrorShown()||(this.setValidationErrorShown(!0),errorMessage(ss.i18n._t("ModelAdmin.VALIDATIONERROR","Validation Error")))}}},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function(){if(this.trigger("beforesubmitform"),!this.is(".changed")||this.is(".discardchanges"))return!0;var confirmed=confirm(_i18n2["default"]._t("LeftAndMain.CONFIRMUNSAVED"));return confirmed&&this.addClass("discardchanges"),confirmed},onsubmit:function(e,button){return"_blank"!=this.prop("target")?(button&&this.closest(".cms-container").submitForm(this,button),!1):void 0},validate:function(){var isValid=!0;return this.trigger("validate",{isValid:isValid}),isValid},"from .htmleditor":{oneditorinit:function(e){var self=this,field=$(e.target).closest(".field.htmleditor"),editor=field.find("textarea.htmleditor").getEditor().getInstance();editor.onClick.add(function(e){self.saveFieldFocus(field.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(e){this.saveFieldFocus($(e.target).attr("id"))},onfocus:function(e){this.saveFieldFocus($(e.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(e){var field=$(e.target).closest(".field.treedropdown");this.saveFieldFocus(field.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function(e){var field=$(e.target).closest(".field.dropdown");this.saveFieldFocus(field.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(selected){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var id=$(this).attr("id"),focusElements=[];if(focusElements.push({id:id,selected:selected}),focusElements)try{window.sessionStorage.setItem(id,JSON.stringify(focusElements))}catch(err){if(err.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw err}}},restoreFieldFocus:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var elementID,activeTab,elementTab,toggleComposite,scrollY,self=this,hasSessionStorage="undefined"!=typeof window.sessionStorage&&window.sessionStorage,sessionData=hasSessionStorage?window.sessionStorage.getItem(this.attr("id")):null,sessionStates=sessionData?JSON.parse(sessionData):!1,tabbed=0!==this.find(".ss-tabset").length;if(hasSessionStorage&&sessionStates.length>0){if($.each(sessionStates,function(i,sessionState){self.is("#"+sessionState.id)&&(elementID=$("#"+sessionState.selected))}),$(elementID).length<1)return void this.focusFirstInput();if(activeTab=$(elementID).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),elementTab="tab-"+$(elementID).closest(".ss-tabset .ui-tabs-panel").attr("id"),tabbed&&elementTab!==activeTab)return;toggleComposite=$(elementID).closest(".togglecomposite"),toggleComposite.length>0&&toggleComposite.accordion("activate",toggleComposite.find(".ui-accordion-header")),scrollY=$(elementID).position().top,$(elementID).is(":visible")||(elementID="#"+$(elementID).closest(".field").attr("id"),scrollY=$(elementID).position().top),$(elementID).focus(),scrollY>$(window).height()/2&&self.find(".cms-content-fields").scrollTop(scrollY)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),$(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function(e){return this.hasClass("gridfield-button-delete")&&!confirm(_i18n2["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?(e.preventDefault(),!1):(this.is(":disabled")||this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),$(".cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel").entwine({onclick:function(e){window.history.length>1?window.history.back():this.parents("form").trigger("submit",[this]),e.preventDefault()}}),$(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var tabs=this.find("> ul:first");1==tabs.children("li").length&&tabs.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}})});var errorMessage=function(text){jQuery.noticeAdd({text:text,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{i18n:"i18n",jQuery:"jQuery"}],7:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".cms-description-toggle").entwine({onadd:function(){var shown=!1,fieldId=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),$trigger=this.find(".cms-description-trigger"),$description=this.find(".description");this.hasClass("description-toggle-enabled")||(0===$trigger.length&&($trigger=this.find(".middleColumn").first().after('<label class="right" for="'+fieldId+'"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>').next()),this.addClass("description-toggle-enabled"),$trigger.on("click",function(){$description[shown?"hide":"show"](),shown=!shown}),$description.hide())}})})},{jQuery:"jQuery"}],8:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var descriptionEl=this.find(".description");descriptionEl.length&&(this.attr("title",descriptionEl.text()).tooltip({content:descriptionEl.html()}),descriptionEl.remove())}}),$(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},{jQuery:"jQuery"}],9:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].fn.layout.defaults.resize=!1,jLayout="undefined"==typeof jLayout?{}:jLayout,jLayout.threeColumnCompressor=function(spec,options){function typeLayout(type){var func=type+"Size";return function(container){var menuSize=menu[func](),contentSize=content[func](),previewSize=preview[func](),insets=container.insets();return width=menuSize.width+contentSize.width+previewSize.width,height=Math.max(menuSize.height,contentSize.height,previewSize.height),{width:insets.left+insets.right+width,height:insets.top+insets.bottom+height}}}if("undefined"==typeof spec.menu||"undefined"==typeof spec.content||"undefined"==typeof spec.preview)throw'Spec is invalid. Please provide "menu", "content" and "preview" elements.';if("undefined"==typeof options.minContentWidth||"undefined"==typeof options.minPreviewWidth||"undefined"==typeof options.mode)throw'Spec is invalid. Please provide "minContentWidth", "minPreviewWidth", "mode"';if("split"!==options.mode&&"content"!==options.mode&&"preview"!==options.mode)throw'Spec is invalid. "mode" should be either "split", "content" or "preview"';var obj={options:options},menu=_jQuery2["default"].jLayoutWrap(spec.menu),content=_jQuery2["default"].jLayoutWrap(spec.content),preview=_jQuery2["default"].jLayoutWrap(spec.preview);return obj.layout=function(container){var size=container.bounds(),insets=container.insets(),top=insets.top,bottom=size.height-insets.bottom,left=insets.left,right=size.width-insets.right,menuWidth=spec.menu.width(),contentWidth=0,previewWidth=0;"preview"===this.options.mode?(contentWidth=0,previewWidth=right-left-menuWidth):"content"===this.options.mode?(contentWidth=right-left-menuWidth,previewWidth=0):(contentWidth=(right-left-menuWidth)/2,previewWidth=right-left-(menuWidth+contentWidth),contentWidth<this.options.minContentWidth?(contentWidth=this.options.minContentWidth,previewWidth=right-left-(menuWidth+contentWidth)):previewWidth<this.options.minPreviewWidth&&(previewWidth=this.options.minPreviewWidth,contentWidth=right-left-(menuWidth+previewWidth)),(contentWidth<this.options.minContentWidth||previewWidth<this.options.minPreviewWidth)&&(contentWidth=right-left-menuWidth,previewWidth=0));var prehidden={content:spec.content.hasClass("column-hidden"),preview:spec.preview.hasClass("column-hidden")},posthidden={content:0===contentWidth,preview:0===previewWidth};return spec.content.toggleClass("column-hidden",posthidden.content),spec.preview.toggleClass("column-hidden",posthidden.preview),menu.bounds({x:left,y:top,height:bottom-top,width:menuWidth}),menu.doLayout(),left+=menuWidth,content.bounds({x:left,y:top,height:bottom-top,width:contentWidth}),posthidden.content||content.doLayout(),left+=contentWidth,preview.bounds({x:left,y:top,height:bottom-top,width:previewWidth}),posthidden.preview||preview.doLayout(),posthidden.content!==prehidden.content&&spec.content.trigger("columnvisibilitychanged"),posthidden.preview!==prehidden.preview&&spec.preview.trigger("columnvisibilitychanged"),contentWidth+previewWidth<options.minContentWidth+options.minPreviewWidth?spec.preview.trigger("disable"):spec.preview.trigger("enable"),container},obj.preferred=typeLayout("preferred"),obj.minimum=typeLayout("minimum"),obj.maximum=typeLayout("maximum"),obj}},{jQuery:"jQuery"}],10:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".cms-panel.cms-menu").entwine({togglePanel:function(doExpand,silent,doSaveState){$(".cms-menu-list").children("li").each(function(){doExpand?$(this).children("ul").each(function(){$(this).removeClass("collapsed-flyout"),$(this).data("collapse")&&($(this).removeData("collapse"),$(this).addClass("collapse"))}):$(this).children("ul").each(function(){$(this).addClass("collapsed-flyout"),$(this).hasClass("collapse"),$(this).removeClass("collapse"),$(this).data("collapse",!0)})}),this.toggleFlyoutState(doExpand),this._super(doExpand,silent,doSaveState)},toggleFlyoutState:function(bool){if(bool)$(".collapsed").find("li").show(),$(".cms-menu-list").find(".child-flyout-indicator").hide();else{$(".collapsed-flyout").find("li").each(function(){$(this).hide()});var par=$(".cms-menu-list ul.collapsed-flyout").parent();0===par.children(".child-flyout-indicator").length&&par.append('<span class="child-flyout-indicator"></span>').fadeIn(),par.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return $("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var persistedState,cookieValue;return void 0!==$.cookie&&(cookieValue=$.cookie("cms-menu-sticky"),void 0!==cookieValue&&null!==cookieValue&&(persistedState="true"===cookieValue)),persistedState},setPersistedStickyState:function(isSticky){void 0!==$.cookie&&$.cookie("cms-menu-sticky",isSticky,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var shouldCollapse,manualState=this.getPersistedCollapsedState(),menuIsSticky=$(".cms-menu").getPersistedStickyState(),automaticState=this.siteTreePresent();return shouldCollapse=void 0===manualState?automaticState:manualState!==automaticState&&menuIsSticky?manualState:automaticState},onadd:function(){var self=this;setTimeout(function(){self.togglePanel(!self.getEvaluatedCollapsedState(),!1,!1)},0),$(window).on("ajaxComplete",function(e){setTimeout(function(){self.togglePanel(!self.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),$(".cms-menu-list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(xhr){var controller=xhr.getResponseHeader("X-Controller");if(controller){var item=this.find("li#Menu-"+controller.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));item.hasClass("current")||item.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,data){this.updateMenuFromResponse(data.xhr)},onaftersubmitform:function(e,data){this.updateMenuFromResponse(data.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,data){this.updateMenuFromResponse(data.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(e){this.toggleClass("collapsed",$(e.target).hasClass("collapsed")),$(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||$(".toggle-children.opened").closest("li").addClass("opened")}},updateItems:function(){var editPageItem=this.find("#Menu-CMSMain");editPageItem[editPageItem.is(".current")?"show":"hide"]();var currentID=$(".cms-content input[name=ID]").val();currentID&&this.find("li").each(function(){$.isFunction($(this).setRecordID)&&$(this).setRecordID(currentID)})}}),$(".cms-menu-list li").entwine({toggleFlyout:function(bool){var fly=$(this);if(fly.children("ul").first().hasClass("collapsed-flyout"))if(bool){if(!fly.children("ul").first().children("li").first().hasClass("clone")){var li=fly.clone();li.addClass("clone").css({}),li.children("ul").first().remove(),li.find("span").not(".text").remove(),li.find("a").first().unbind("click"),fly.children("ul").prepend(li)}$(".collapsed-flyout").show(),fly.addClass("opened"),fly.children("ul").find("li").fadeIn("fast")}else li&&li.remove(),$(".collapsed-flyout").hide(),fly.removeClass("opened"),fly.find("toggle-children").removeClass("opened"),fly.children("ul").find("li").hide()}}),$(".cms-menu-list li").hoverIntent(function(){$(this).toggleFlyout(!0)},function(){$(this).toggleFlyout(!1);
}),$(".cms-menu-list .toggle").entwine({onclick:function(e){e.preventDefault(),$(this).toogleFlyout(!0)}}),$(".cms-menu-list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>'),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var parent=this.getMenuItem();parent&&parent.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened")},select:function(){var parent=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),parent){var parentSiblings=parent.siblings();parent.addClass("current"),parentSiblings.removeClass("current").close(),parentSiblings.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),$(".cms-menu-list *").entwine({getMenu:function(){return this.parents(".cms-menu-list:first")}}),$(".cms-menu-list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),$(".cms-menu-list li a").entwine({onclick:function(e){var isExternal=$.path.isExternal(this.attr("href"));if(!(e.which>1||isExternal)&&"_blank"!=this.attr("target")){e.preventDefault();var item=this.getMenuItem(),url=this.attr("href");isExternal||(url=$("base").attr("href")+url);var children=item.find("li");children.length?children.first().find("a").click():document.location.href=url,item.select()}}}),$(".cms-menu-list li .toggle-children").entwine({onclick:function(e){var li=this.closest("li");return li.toggle(),!1}}),$(".cms .profile-link").entwine({onclick:function(){return $(".cms-container").loadPanel(this.attr("href")),$(".cms-menu-list li").removeClass("current").close(),!1}}),$(".cms-menu .sticky-toggle").entwine({onadd:function(){var isSticky=!!$(".cms-menu").getPersistedStickyState();this.toggleCSS(isSticky),this.toggleIndicator(isSticky),this._super()},toggleCSS:function(isSticky){this[isSticky?"addClass":"removeClass"]("active")},toggleIndicator:function(isSticky){this.next(".sticky-status-indicator").text(isSticky?"fixed":"auto")},onclick:function(){var $menu=this.closest(".cms-menu"),persistedCollapsedState=$menu.getPersistedCollapsedState(),persistedStickyState=$menu.getPersistedStickyState(),newStickyState=void 0===persistedStickyState?!this.hasClass("active"):!persistedStickyState;void 0===persistedCollapsedState?$menu.setPersistedCollapsedState($menu.hasClass("collapsed")):void 0!==persistedCollapsedState&&newStickyState===!1&&$menu.clearPersistedCollapsedState(),$menu.setPersistedStickyState(newStickyState),this.toggleCSS(newStickyState),this.toggleIndicator(newStickyState),this._super()}})})},{jQuery:"jQuery"}],11:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$.entwine.warningLevel=$.entwine.WARN_LEVEL_BESTPRACTISE,$(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==$.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var isCollapsed,cookieValue;return this.canSetCookie()&&(cookieValue=$.cookie("cms-panel-collapsed-"+this.attr("id")),void 0!==cookieValue&&null!==cookieValue&&(isCollapsed="true"===cookieValue)),isCollapsed},setPersistedCollapsedState:function(newState){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),newState,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var isCollapsed=this.getPersistedCollapsedState();return void 0===isCollapsed&&(isCollapsed=this.hasClass("collapsed")),isCollapsed},onadd:function(){var collapsedContent,container;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(container=$("<div class='cms-panel-toggle south'></div>").append('<a class="toggle-expand" href="#"><span>&raquo;</span></a>').append('<a class="toggle-collapse" href="#"><span>&laquo;</span></a>'),this.append(container)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),collapsedContent=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(collapsedContent.length?collapsedContent.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(doExpand,silent,doSaveState){var newWidth,collapsedContent;silent||(this.trigger("beforetoggle.sspanel",doExpand),this.trigger(doExpand?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!doExpand),newWidth=doExpand?this.getWidthExpanded():this.getWidthCollapsed(),this.width(newWidth),collapsedContent=this.find(".cms-panel-content-collapsed"),collapsedContent.length&&(this.find(".cms-panel-content")[doExpand?"show":"hide"](),this.find(".cms-panel-content-collapsed")[doExpand?"hide":"show"]()),doSaveState!==!1&&this.setPersistedCollapsedState(!doExpand),this.trigger("toggle",doExpand),this.trigger(doExpand?"expand":"collapse")},expandPanel:function(force){(force||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(force){!force&&this.hasClass("collapsed")||this.togglePanel(!1)}}),$(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),$(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),$(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),$(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),$(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},{jQuery:"jQuery"}],12:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);_jQuery2["default"].entwine("ss.preview",function($){$(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function(stateName,save){var self=this,states=this._getNavigatorStates();return save!==!1&&$.each(states,function(index,state){self.saveState("state",stateName)}),this.setCurrentStateName(stateName),this._loadCurrentState(),this.redraw(),this},changeMode:function(modeName,save){var container=$(".cms-container");if("split"==modeName)container.entwine(".ss").splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==modeName)container.entwine(".ss").contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=modeName)throw"Invalid mode: "+modeName;container.entwine(".ss").previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return save!==!1&&this.saveState("mode",modeName),this.redraw(),this},changeSize:function(sizeName){var sizes=this.getSizes();return this.setCurrentSizeName(sizeName),this.removeClass("auto desktop tablet mobile").addClass(sizeName),this.find(".preview-device-outer").width(sizes[sizeName].width).height(sizes[sizeName].height),this.find(".preview-device-inner").width(sizes[sizeName].width),this.saveState("size",sizeName),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var currentStateName=this.getCurrentStateName();currentStateName&&this.find(".cms-preview-states").changeVisibleState(currentStateName);var layoutOptions=$(".cms-container").entwine(".ss").getLayoutOptions();layoutOptions&&$(".preview-mode-selector").changeVisibleMode(layoutOptions.mode);var currentSizeName=this.getCurrentSizeName();return currentSizeName&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(name,value){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+name,value)},loadState:function(name){return this._supportsLocalStorage()?window.localStorage.getItem("cms-preview-state-"+name):void 0},disablePreview:function(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),$.browser.msie&&$.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){var style=$("#FontFixStyleElement");return style.length||(style=$('<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>').appendTo("head")),style},onadd:function(){var self=this,iframe=(this.parent(),this.find("iframe"));iframe.addClass("center"),iframe.bind("load",function(){self._adjustIframeForPreview(),self._loadCurrentPage(),$(this).removeClass("loading")}),$.browser.msie&&8===parseInt($.browser.version,10)&&iframe.bind("readystatechange",function(e){"interactive"==iframe[0].readyState&&(self.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){self.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(){var storage,result,uid=new Date;try{return(storage=window.localStorage).setItem(uid,uid),result=storage.getItem(uid)==uid,storage.removeItem(uid),result&&storage}catch(exception){console.warn("localStorge is not available due to current browser / system settings.")}},onenable:function(){var $viewModeSelector=$(".preview-mode-selector");$viewModeSelector.removeClass("split-disabled"),$viewModeSelector.find(".disabled-tooltip").hide()},ondisable:function(){var $viewModeSelector=$(".preview-mode-selector");$viewModeSelector.addClass("split-disabled"),$viewModeSelector.find(".disabled-tooltip").show()},_block:function(){return this.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var mode,size;return $(".cms-previewable").length?(mode=this.loadState("mode"),size=this.loadState("size"),this._moveNavigator(),mode&&"content"==mode||(this.enablePreview(),this._loadCurrentState()),this.redraw(),mode&&this.changeMode(mode),size&&this.changeSize(size)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,data){data.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var url=this.getPendingURL();url&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(url),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(url){return this.find("iframe").addClass("loading").attr("src",url),this},_getNavigatorStates:function(){var urlMap=$.map(this.getAllowedStates(),function(name){var stateLink=$(".cms-preview-states .state-name[data-name="+name+"]");return stateLink.length?{name:name,url:stateLink.attr("href"),active:stateLink.hasClass("active")}:null});return urlMap},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var states=this._getNavigatorStates(),currentStateName=this.getCurrentStateName(),currentState=null;states&&(currentState=$.grep(states,function(state,index){return currentStateName===state.name||!currentStateName&&state.active}));var url=null;return currentState[0]?url=currentState[0].url:states.length?(this.setCurrentStateName(states[0].name),url=states[0].url):this.setCurrentStateName(null),url&&(url+=(-1===url.indexOf("?")?"?":"&")+"CMSPreview=1"),this.is(".column-hidden")?(this.setPendingURL(url),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),url?(this._loadUrl(url),this._unblock()):this._block()),this},_moveNavigator:function(){var previewEl=$(".cms-preview .cms-preview-controls"),navigatorEl=$(".cms-edit-form .cms-navigator");navigatorEl.length&&previewEl.length?previewEl.html($(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var doc;$(".cms-container");try{doc=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(doc){var id=$(doc).find("meta[name=x-page-id]").attr("content"),editLink=$(doc).find("meta[name=x-cms-edit-link]").attr("content"),contentPanel=$(".cms-content");id&&contentPanel.find(":input[name=ID]").val()!=id&&$(".cms-container").entwine(".ss").loadPanel(editLink)}}},_adjustIframeForPreview:function(){var doc,iframe=this.find("iframe")[0];if(iframe){try{doc=iframe.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(doc){for(var links=doc.getElementsByTagName("A"),i=0;i<links.length;i++){var href=links[i].getAttribute("href");href&&href.match(/^http:\/\//)&&links[i].setAttribute("target","_blank")}var navi=doc.getElementById("SilverStripeNavigator");navi&&(navi.style.display="none");var naviMsg=doc.getElementById("SilverStripeNavigatorMessage");naviMsg&&(naviMsg.style.display="none"),this.trigger("afterIframeAdjustedForPreview",[doc])}}}}),$(".cms-edit-form").entwine({onadd:function(){this._super(),$(".cms-preview")._initialiseFromContent()}}),$(".cms-preview-states").entwine({changeVisibleState:function(state){this.find('[data-name="'+state+'"]').addClass("active").siblings().removeClass("active")}}),$(".cms-preview-states .state-name").entwine({onclick:function(e){if(1==e.which){var targetStateName=$(this).attr("data-name");this.addClass("active").siblings().removeClass("active"),$(".cms-preview").changeState(targetStateName),e.preventDefault()}}}),$(".preview-mode-selector").entwine({changeVisibleMode:function(mode){this.find("select").val(mode).trigger("chosen:updated")._addIcon()}}),$(".preview-mode-selector select").entwine({onchange:function(e){this._super(e),e.preventDefault();var targetStateName=$(this).val();$(".cms-preview").changeMode(targetStateName)}}),$(".cms-preview.column-hidden").entwine({onmatch:function(){$("#preview-mode-dropdown-in-content").show(),$(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(_i18n2["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),this._super()},onunmatch:function(){$("#preview-mode-dropdown-in-content").hide(),this._super()}}),$("#preview-mode-dropdown-in-content").entwine({onmatch:function(){$(".cms-preview").is(".column-hidden")?this.show():this.hide(),this._super()},onunmatch:function(){this._super()}}),$(".preview-size-selector").entwine({changeVisibleSize:function(size){this.find("select").val(size).trigger("chosen:updated")._addIcon()}}),$(".preview-size-selector select").entwine({onchange:function(e){e.preventDefault();var targetSizeName=$(this).val();$(".cms-preview").changeSize(targetSizeName)}}),$(".preview-selector select.preview-dropdown").entwine({"onchosen:ready":function(){this._super(),this._addIcon()},_addIcon:function(){var selected=this.find(":selected"),iconClass=selected.attr("data-icon"),target=this.parent().find(".chosen-container a.chosen-single"),oldIcon=target.attr("data-icon");return"undefined"!=typeof oldIcon&&target.removeClass(oldIcon),target.addClass(iconClass),target.attr("data-icon",iconClass),this}}),$(".preview-mode-selector .chosen-drop li:last-child").entwine({onmatch:function(){$(".preview-mode-selector").hasClass("split-disabled")?this.parent().append('<div class="disabled-tooltip"></div>'):this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>')}}),$(".preview-device-outer").entwine({onclick:function(){this.toggleClass("rotate")}})})},{i18n:"i18n",jQuery:"jQuery"}],13:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss.tree",function($){$(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function(){if(this._super(),!$.isNumeric(this.data("jstree_instance_id"))){var hints=this.attr("data-hints");hints&&this.setHints($.parseJSON(hints));var self=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(e,data){self.setIsLoaded(!0),data.inst._set_settings({html_data:{ajax:{url:self.data("urlTree"),data:function(node){var params=self.data("searchparams")||[];return params=$.grep(params,function(n,i){return"ID"!=n.name&&"value"!=n.name}),params.push({name:"ID",value:$(node).data("id")?$(node).data("id"):0}),params.push({name:"ajax",value:1}),params}}}}),self.updateFromEditForm(),self.css("visibility","visible"),data.inst.hide_checkboxes()}).bind("before.jstree",function(e,data){if("start_drag"==data.func&&(!self.hasClass("draggable")||self.hasClass("multiselect")))return e.stopImmediatePropagation(),!1;if($.inArray(data.func,["check_node","uncheck_node"])){var node=$(data.args[0]).parents("li:first"),allowedChildren=node.find("li:not(.disabled)");if(node.hasClass("disabled")&&0==allowedChildren)return e.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(e,data){if(!self.getIsUpdatingTree()){var movedNode=data.rslt.o,newParentNode=data.rslt.np,newParentID=(data.inst._get_parent(movedNode),$(newParentNode).data("id")||0),nodeID=$(movedNode).data("id"),siblingIDs=$.map($(movedNode).siblings().andSelf(),function(el){return $(el).data("id")});$.ajax({url:$.path.addSearchParams(self.data("urlSavetreenode"),self.data("extraParams")),type:"POST",data:{ID:nodeID,ParentID:newParentID,SiblingIDs:siblingIDs},success:function(){$(".cms-edit-form :input[name=ID]").val()==nodeID&&$(".cms-edit-form :input[name=ParentID]").val(newParentID),self.updateNodesFromServer([nodeID])},statusCode:{403:function(){$.jstree.rollback(data.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(e,data){$(document).triggerHandler(e,data)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(e){var id=$(".cms-edit-form :input[name=ID]").val();this.updateNodesFromServer([id])}},getTreeConfig:function(){var self=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function(data){var movedNode=$(data.o),newParent=$(data.np),isMovedOntoContainer=data.ot.get_container()[0]==data.np[0],movedNodeClass=movedNode.getClassname(),newParentClass=newParent.getClassname(),hints=self.getHints(),disallowedChildren=[],hintKey=newParentClass?newParentClass:"Root",hint=hints&&"undefined"!=typeof hints[hintKey]?hints[hintKey]:null;hint&&movedNode.attr("class").match(/VirtualPage-([^\s]*)/)&&(movedNodeClass=RegExp.$1),hint&&(disallowedChildren="undefined"!=typeof hint.disallowedChildren?hint.disallowedChildren:[]);var isAllowed=!(0===movedNode.data("id")||movedNode.hasClass("status-archived")||isMovedOntoContainer&&"inside"!=data.p||newParent.hasClass("nochildren")||disallowedChildren.length&&-1!=$.inArray(movedNodeClass,disallowedChildren));return isAllowed}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:$("body").data("frameworkpath")+"/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(params,callback){params?this.data("searchparams",params):this.removeData("searchparams"),this.jstree("refresh",-1,callback)},getNodeByID:function(id){return this.find("*[data-id="+id+"]")},createNode:function(html,data,callback){var self=this,parentNode=void 0!==data.ParentID?self.getNodeByID(data.ParentID):!1,newNode=$(html),properties={data:""};newNode.hasClass("jstree-open")?properties.state="open":newNode.hasClass("jstree-closed")&&(properties.state="closed"),this.jstree("create_node",parentNode.length?parentNode:-1,"last",properties,function(node){for(var origClasses=node.attr("class"),i=0;i<newNode[0].attributes.length;i++){var attr=newNode[0].attributes[i];node.attr(attr.name,attr.value)}node.addClass(origClasses).html(newNode.html()),callback(node)})},updateNode:function(node,html,data){var newNode=$(html),nextNode=data.NextID?this.getNodeByID(data.NextID):!1,prevNode=data.PrevID?this.getNodeByID(data.PrevID):!1,parentNode=data.ParentID?this.getNodeByID(data.ParentID):!1;$.each(["id","style","class","data-pagetype"],function(i,attrName){node.attr(attrName,newNode.attr(attrName))});var origChildren=node.children("ul").detach();node.html(newNode.html()).append(origChildren),nextNode&&nextNode.length?this.jstree("move_node",node,nextNode,"before"):prevNode&&prevNode.length?this.jstree("move_node",node,prevNode,"after"):this.jstree("move_node",node,parentNode.length?parentNode:-1)},updateFromEditForm:function(){var node,id=$(".cms-edit-form :input[name=ID]").val();id?(node=this.getNodeByID(id),node.length?(this.jstree("deselect_all"),this.jstree("select_node",node)):this.updateNodesFromServer([id])):this.jstree("deselect_all")},updateNodesFromServer:function(ids){if(!this.getIsUpdatingTree()&&this.getIsLoaded()){var self=this,includesNewNode=!1;this.setIsUpdatingTree(!0),self.jstree("save_selected");var correctStateFn=function(node){self.getNodeByID(node.data("id")).not(node).remove(),self.jstree("deselect_all"),self.jstree("select_node",node)};self.jstree("open_node",this.getNodeByID(0)),self.jstree("save_opened"),self.jstree("save_selected"),$.ajax({url:$.path.addSearchParams(this.data("urlUpdatetreenodes"),"ids="+ids.join(",")),dataType:"json",success:function(data,xhr){$.each(data,function(nodeId,nodeData){var node=self.getNodeByID(nodeId);return nodeData?void(node.length?(self.updateNode(node,nodeData.html,nodeData),setTimeout(function(){correctStateFn(node)},500)):(includesNewNode=!0,nodeData.ParentID&&!self.find("li[data-id="+nodeData.ParentID+"]").length?self.jstree("load_node",-1,function(){newNode=self.find("li[data-id="+nodeId+"]"),correctStateFn(newNode)}):self.createNode(nodeData.html,nodeData,function(newNode){correctStateFn(newNode)}))):void self.jstree("delete_node",node)}),includesNewNode||(self.jstree("deselect_all"),self.jstree("reselect"),self.jstree("reopen"))},complete:function(){self.setIsUpdatingTree(!1)}})}}}),$(".cms-tree.multiple").entwine({onmatch:function(){this._super(),this.jstree("show_checkboxes")},onunmatch:function(){this._super(),this.jstree("uncheck_all"),this.jstree("hide_checkboxes")},getSelectedIDs:function(){return $(this).jstree("get_checked").not(".disabled").map(function(){return $(this).data("id")}).get()}}),$(".cms-tree li").entwine({setEnabled:function(bool){this.toggleClass("disabled",!bool)},getClassname:function(){var matches=this.attr("class").match(/class-([^\s]*)/i);return matches?matches[1]:""},getID:function(){return this.data("id")}})})},{jQuery:"jQuery"}],14:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})})},{jQuery:"jQuery"}],15:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj},_jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),windowWidth,windowHeight;_jQuery2["default"].noConflict(),window.ss=window.ss||{},window.ss.debounce=function(func,wait,immediate){var timeout,context,args,later=function(){timeout=null,immediate||func.apply(context,args)};return function(){var callNow=immediate&&!timeout;context=this,args=arguments,clearTimeout(timeout),timeout=setTimeout(later,wait),callNow&&func.apply(context,args)}},(0,_jQuery2["default"])(window).bind("resize.leftandmain",function(e){(0,_jQuery2["default"])(".cms-container").trigger("windowresize")}),_jQuery2["default"].entwine.warningLevel=_jQuery2["default"].entwine.WARN_LEVEL_BESTPRACTISE,_jQuery2["default"].entwine("ss",function($){$(window).on("message",function(e){var target,event=e.originalEvent,data="object"===_typeof(event.data)?event.data:JSON.parse(event.data);if($.path.parseUrl(window.location.href).domain===$.path.parseUrl(event.origin).domain)switch(target=$("undefined"==typeof data.target?window:data.target),data.type){case"event":target.trigger(data.event,data.data);break;case"callback":target[data.callback].call(target,data.data)}});var positionLoadingSpinner=function(){var offset=120,spinner=$(".ss-loading-screen .loading-animation"),top=($(window).height()-spinner.height())/2;spinner.css("top",top+offset),spinner.show()},applyChosen=function applyChosen(el){el.is(":visible")?el.addClass("has-chosen").chosen({allow_single_deselect:!0,disable_search_threshold:20,display_disabled_options:!0}):setTimeout(function(){el.show(),applyChosen(el)},500)},isSameUrl=function(url1,url2){var baseUrl=$("base").attr("href");url1=$.path.isAbsoluteUrl(url1)?url1:$.path.makeUrlAbsolute(url1,baseUrl),url2=$.path.isAbsoluteUrl(url2)?url2:$.path.makeUrlAbsolute(url2,baseUrl);var url1parts=$.path.parseUrl(url1),url2parts=$.path.parseUrl(url2);return url1parts.pathname.replace(/\/*$/,"")==url2parts.pathname.replace(/\/*$/,"")&&url1parts.search==url2parts.search},ajaxCompleteEvent=window.ss.debounce(function(){$(window).trigger("ajaxComplete")},1e3,!0);$(window).bind("resize",positionLoadingSpinner).trigger("resize"),$(document).ajaxComplete(function(e,xhr,settings){var origUrl=document.URL,url=xhr.getResponseHeader("X-ControllerURL"),destUrl=settings.url,msg=null!==xhr.getResponseHeader("X-Status")?xhr.getResponseHeader("X-Status"):xhr.statusText,msgType=xhr.status<200||xhr.status>399?"bad":"good",ignoredMessages=["OK","success","HTTP/2.0 200"];return null===url||isSameUrl(origUrl,url)&&isSameUrl(destUrl,url)||window.ss.router.show(url,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:xhr.getResponseHeader("X-Pjax")?xhr.getResponseHeader("X-Pjax"):settings.headers["X-Pjax"]}),xhr.getResponseHeader("X-Reauthenticate")?void $(".cms-container").showLoginDialog():(0!==xhr.status&&msg&&-1===$.inArray(msg,ignoredMessages)&&statusMessage(decodeURIComponent(msg),msgType),void ajaxCompleteEvent(this))}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){return $.browser.msie&&parseInt($.browser.version,10)<8?($(".ss-loading-screen").append('<p class="ss-loading-incompat-warning"><span class="notice">Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.</span></p>').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super()):(this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),void this._super())},onwindowresize:function(){this.redraw()},"from .cms-panel":{ontoggle:function(){this.redraw()}},"from .cms-container":{onaftersubmitform:function(){this.redraw()}},updateLayoutOptions:function(newSpec){var spec=this.getLayoutOptions(),dirty=!1;for(var k in newSpec)spec[k]!==newSpec[k]&&(spec[k]=newSpec[k],dirty=!0);dirty&&this.redraw()},splitViewMode:function(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function(){this.updateLayoutOptions({mode:"content"})},previewMode:function(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.data("jlayout",jLayout.threeColumnCompressor({menu:this.children(".cms-menu"),content:this.children(".cms-content"),preview:this.children(".cms-preview")},this.getLayoutOptions())),this.layout(),this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw())},checkCanNavigate:function(selectors){var contentEls=this._findFragments(selectors||["Content"]),trackedEls=contentEls.find(":data(changetracker)").add(contentEls.filter(":data(changetracker)")),safe=!0;return trackedEls.length?(trackedEls.each(function(){$(this).confirmUnsavedChanges()||(safe=!1)}),safe):!0},loadPanel:function(url){var data=(arguments.length<=1||void 0===arguments[1]?"":arguments[1],arguments.length<=2||void 0===arguments[2]?{}:arguments[2]),forceReload=arguments[3],forceReferer=arguments.length<=4||void 0===arguments[4]?document.URL:arguments[4];this.checkCanNavigate(data.pjax?data.pjax.split(","):["Content"])&&(this.saveTabState(),data.__forceReferer=forceReferer,forceReload&&(data.__forceReload=1+Math.random()),window.ss.router.show(url,data))},reloadCurrentPanel:function(){this.loadPanel(document.URL,null,null,!0)},submitForm:function(form,button,callback,ajaxOptions){var self=this;button||(button=this.find(".btn-toolbar :submit[name=action_save]")),button||(button=this.find(".btn-toolbar :submit:first")),form.trigger("beforesubmitform"),this.trigger("submitform",{form:form,button:button}),$(button).addClass("loading");var validationResult=form.validate();if("undefined"!=typeof validationResult&&!validationResult)return statusMessage("Validation failed.","bad"),$(button).removeClass("loading"),!1;var formData=form.serializeArray();return formData.push({name:$(button).attr("name"),value:"1"}),formData.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:form.attr("action"),data:formData,type:"POST",complete:function(){$(button).removeClass("loading")},success:function(data,status,xhr){form.removeClass("changed"),callback&&callback(data,status,xhr);var newContentEls=self.handleAjaxResponse(data,status,xhr);newContentEls&&newContentEls.filter("form").trigger("aftersubmitform",{status:status,xhr:xhr,formData:formData})}},ajaxOptions)),!1},LastState:null,PauseState:!1,handleStateChange:function(event){var historyState=arguments.length<=1||void 0===arguments[1]?window.history.state:arguments[1];if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var self=this,fragments=historyState.pjax||"Content",headers={},fragmentsArr=fragments.split(","),contentEls=this._findFragments(fragmentsArr);
if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate()){var lastState=this.getLastState();return this.setPauseState(!0),lastState&&lastState.path?window.ss.router.show(lastState.path):window.ss.router.back(),void this.setPauseState(!1)}if(this.setLastState(historyState),contentEls.length<fragmentsArr.length&&(fragments="Content",fragmentsArr=["Content"],contentEls=this._findFragments(fragmentsArr)),this.trigger("beforestatechange",{state:historyState,element:contentEls}),headers["X-Pjax"]=fragments,"undefined"!=typeof historyState.__forceReferer){var url=historyState.__forceReferer;try{url=decodeURI(url)}catch(e){}finally{headers["X-Backurl"]=encodeURI(url)}}contentEls.addClass("loading");var promise=$.ajax({headers:headers,url:historyState.path||document.URL}).done(function(data,status,xhr){var els=self.handleAjaxResponse(data,status,xhr,historyState);self.trigger("afterstatechange",{data:data,status:status,xhr:xhr,element:els,state:historyState})}).always(function(){self.setStateChangeXHR(null),contentEls.removeClass("loading")});return this.setStateChangeXHR(promise),promise}},loadFragment:function(url,pjaxFragments){var xhr,self=this,headers={},baseUrl=$("base").attr("href"),fragmentXHR=this.getFragmentXHR();return"undefined"!=typeof fragmentXHR[pjaxFragments]&&null!==fragmentXHR[pjaxFragments]&&(fragmentXHR[pjaxFragments].abort(),fragmentXHR[pjaxFragments]=null),url=$.path.isAbsoluteUrl(url)?url:$.path.makeUrlAbsolute(url,baseUrl),headers["X-Pjax"]=pjaxFragments,xhr=$.ajax({headers:headers,url:url,success:function(data,status,xhr){var elements=self.handleAjaxResponse(data,status,xhr,null);self.trigger("afterloadfragment",{data:data,status:status,xhr:xhr,elements:elements})},error:function(xhr,status,_error){self.trigger("loadfragmenterror",{xhr:xhr,status:status,error:_error})},complete:function(){var fragmentXHR=self.getFragmentXHR();"undefined"!=typeof fragmentXHR[pjaxFragments]&&null!==fragmentXHR[pjaxFragments]&&(fragmentXHR[pjaxFragments]=null)}}),fragmentXHR[pjaxFragments]=xhr,xhr},handleAjaxResponse:function(data,status,xhr,state){var url,guessFragment,fragment,$data;if(xhr.getResponseHeader("X-Reload")&&xhr.getResponseHeader("X-ControllerURL")){var baseUrl=$("base").attr("href"),rawURL=xhr.getResponseHeader("X-ControllerURL"),url=$.path.isAbsoluteUrl(rawURL)?rawURL:$.path.makeUrlAbsolute(rawURL,baseUrl);return void(document.location.href=url)}if(data){var title=xhr.getResponseHeader("X-Title");title&&(document.title=decodeURIComponent(title.replace(/\+/g," ")));var newContentEls,newFragments={};xhr.getResponseHeader("Content-Type").match(/^((text)|(application))\/json[ \t]*;?/i)?newFragments=data:(fragment=document.createDocumentFragment(),jQuery.clean([data],document,fragment,[]),$data=$(jQuery.merge([],fragment.childNodes)),guessFragment="Content",$data.is("form")&&!$data.is("[data-pjax-fragment~=Content]")&&(guessFragment="CurrentForm"),newFragments[guessFragment]=$data),this.setRedrawSuppression(!0);try{$.each(newFragments,function(newFragment,html){var contentEl=$("[data-pjax-fragment]").filter(function(){return-1!=$.inArray(newFragment,$(this).data("pjaxFragment").split(" "))}),newContentEl=$(html);if(newContentEls?newContentEls.add(newContentEl):newContentEls=newContentEl,newContentEl.find(".cms-container").length)throw'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';var origStyle=contentEl.attr("style"),origParent=contentEl.parent(),origParentLayoutApplied="undefined"!=typeof origParent.data("jlayout"),layoutClasses=["east","west","center","north","south","column-hidden"],elemClasses=contentEl.attr("class"),origLayoutClasses=[];elemClasses&&(origLayoutClasses=$.grep(elemClasses.split(" "),function(val){return $.inArray(val,layoutClasses)>=0})),newContentEl.removeClass(layoutClasses.join(" ")).addClass(origLayoutClasses.join(" ")),origStyle&&newContentEl.attr("style",origStyle);var styles=newContentEl.find("style").detach();styles.length&&$(document).find("head").append(styles),contentEl.replaceWith(newContentEl),!origParent.is(".cms-container")&&origParentLayoutApplied&&origParent.layout()});var newForm=newContentEls.filter("form");newForm.hasClass("cms-tabset")&&newForm.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(state&&"undefined"!=typeof state.tabState?state.tabState:null),newContentEls}},_findFragments:function(fragments){return $("[data-pjax-fragment]").filter(function(){var i,nodeFragments=$(this).data("pjaxFragment").split(" ");for(i in fragments)if(-1!=$.inArray(fragments[i],nodeFragments))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var selectedTabs=[],url=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(i,el){var id=$(el).attr("id");id&&$(el).data("tabs")&&($(el).data("ignoreTabState")||$(el).getIgnoreTabState()||selectedTabs.push({id:id,selected:$(el).tabs("option","selected")}))}),selectedTabs){var tabsUrl="tabs-"+url;try{window.sessionStorage.setItem(tabsUrl,JSON.stringify(selectedTabs))}catch(err){if(err.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw err}}}},restoreTabState:function(overrideStates){var self=this,url=this._tabStateUrl(),hasSessionStorage="undefined"!=typeof window.sessionStorage&&window.sessionStorage,sessionData=hasSessionStorage?window.sessionStorage.getItem("tabs-"+url):null,sessionStates=sessionData?JSON.parse(sessionData):!1;this.find(".cms-tabset, .ss-tabset").each(function(){var index,tab,tabset=$(this),tabsetId=tabset.attr("id"),forcedTab=tabset.children("ul").children("li.ss-tabs-force-active");tabset.data("tabs")&&(tabset.tabs("refresh"),forcedTab.length?index=forcedTab.first().index():overrideStates&&overrideStates[tabsetId]?(tab=tabset.find(overrideStates[tabsetId].tabSelector),tab.length&&(index=tab.index())):sessionStates&&$.each(sessionStates,function(i,state){tabsetId==state.id&&(index=state.selected)}),null!==index&&(tabset.tabs("option","active",index),self.trigger("tabstaterestored")))})},clearTabState:function(url){if("undefined"!=typeof window.sessionStorage){var s=window.sessionStorage;if(url)s.removeItem("tabs-"+url);else for(var i=0;i<s.length;i++)s.key(i).match(/^tabs-/)&&s.removeItem(s.key(i))}},clearCurrentTabState:function(){this.clearTabState(this._tabStateUrl())},_tabStateUrl:function(){return window.location.href.replace(/\?.*/,"").replace(/#.*/,"").replace($("base").attr("href"),"")},showLoginDialog:function(){var tempid=$("body").data("member-tempid"),dialog=$(".leftandmain-logindialog"),url="CMSSecurity/login";dialog.length&&dialog.remove(),url=$.path.addSearchParams(url,{tempid:tempid,BackURL:window.location.href}),dialog=$('<div class="leftandmain-logindialog"></div>'),dialog.attr("id",(new Date).getTime()),dialog.data("url",url),$("body").append(dialog)}}),$(".leftandmain-logindialog").entwine({onmatch:function(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500,minHeight:370,maxHeight:400,closeOnEscape:!1,open:function(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay")}})},onunmatch:function(){this._super()},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(bool){this.is(":visible")?this.close():this.open()},reauthenticate:function(data){"undefined"!=typeof data.SecurityID&&$(":input[name=SecurityID]").val(data.SecurityID),"undefined"!=typeof data.TempID&&$("body").data("member-tempid",data.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({onmatch:function(){this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>'),this._super()},onunmatch:function(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super()},onremove:function(){this.data("button")&&this.button("destroy"),this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var href=this.attr("href"),url=href&&!href.match(/^#/)?href:this.data("href"),data={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(url,null,data),e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$("<span></span>").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href?href:this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{"undefined"!=typeof msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(){this._super();var id="ss-ui-dialog-"+this.getUUID(),dialog=$("#"+id);dialog.length||(dialog=$('<div class="ss-ui-dialog" id="'+id+'" />'),$("body").append(dialog));var extraClass=this.data("popupclass")?this.data("popupclass"):"";return dialog.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:extraClass}),!1}}),$(".cms-content .btn-toolbar").entwine({onmatch:function(){this.find(".ss-ui-button").click(function(){var form=this.form;form&&(form.clickedButton=this,setTimeout(function(){form.clickedButton=null},10))}),this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeValue)}).remove(),this.find(".ss-ui-button").each(function(){$(this).data("button")||$(this).button()}),this.find(".ss-ui-buttonset").buttonset()}}),$(".cms .field.date input.text").entwine({onmatch:function(){var holder=$(this).parents(".field.date:first"),config=holder.data();return config.showcalendar?(config.showOn="button",config.locale&&$.datepicker.regional[config.locale]&&(config=$.extend(config,$.datepicker.regional[config.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(config),void this._super()):void this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){return this.is(".no-chosen")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),void this._super())},onunmatch:function(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .grid-field").entwine({showDetailView:function(url){var params=window.location.search.replace(/^\?/,"");params&&(url=$.path.addSearchParams(url,params)),$(".cms-container").loadPanel(url)}}),$(".cms-search-form").entwine({onsubmit:function(e){var nonEmptyInputs,url;nonEmptyInputs=this.find(":input:not(:submit)").filter(function(){var vals=$.grep($(this).fieldValue(),function(val){return val});return vals.length}),url=this.attr("action"),nonEmptyInputs.length&&(url=$.path.addSearchParams(url,nonEmptyInputs.serialize().replace("+","%20")));var container=this.closest(".cms-container");return container.find(".cms-edit-form").tabs("select",0),container.loadPanel(url,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var form=$(this).parents("form");form.clearForm(),form.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),form.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));var self=this,url=this.data("url");if(!url)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeof window._panelDeferredCache[url]?(this.addClass("loading"),$.ajax({url:url,complete:function(){self.removeClass("loading")},success:function(data,status,xhr){self.html(data)}})):this.html(window._panelDeferredCache[url]))}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var activeTab=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("uiTabs")||this.tabs({active:-1!=activeTab.index()?activeTab.index():0,beforeLoad:function(e,ui){return!1},activate:function(e,ui){var actions=$(this).closest("form").find(".btn-toolbar");$(ui.newTab).closest("li").hasClass("readonly")?actions.fadeOut():actions.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var matches=$(this).attr("href").match(/#.*/);matches&&$(this).attr("href",document.location.href.replace(/#.*/,"")+matches[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var self=this,$filters=$(".cms-content-filters").first(),collapsed=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),$filters[collapsed?"slideDown":"slideUp"]({complete:function(){self.data("collapsed",!collapsed),self.data("animating",!1)}}))},onclick:function(){this.showHide()}})});var statusMessage=function(text,type){text=jQuery("<div/>").text(text).html(),jQuery.noticeAdd({text:text,type:type,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{jQuery:"jQuery"}],16:[function(require,module,exports){function cleanUpNextTick(){draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue()}function drainQueue(){if(!draining){var timeout=setTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,clearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var currentQueue,process=module.exports={},queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||setTimeout(drainQueue,0)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],17:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}exports.__esModule=!0,exports["default"]=void 0;var _react=require("react"),_storeShape=require("../utils/storeShape"),_storeShape2=_interopRequireDefault(_storeShape),Provider=function(_Component){function Provider(props,context){_classCallCheck(this,Provider);var _this=_possibleConstructorReturn(this,_Component.call(this,props,context));return _this.store=props.store,_this}return _inherits(Provider,_Component),Provider.prototype.getChildContext=function(){return{store:this.store}},Provider.prototype.render=function(){var children=this.props.children;return _react.Children.only(children)},Provider}(_react.Component);exports["default"]=Provider,Provider.propTypes={store:_storeShape2["default"].isRequired,children:_react.PropTypes.element.isRequired},Provider.childContextTypes={store:_storeShape2["default"].isRequired}},{"../utils/storeShape":21,react:"react"}],18:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function getDisplayName(WrappedComponent){return WrappedComponent.displayName||WrappedComponent.name||"Component"}function checkStateShape(stateProps,dispatch){return(0,_invariant2["default"])((0,_isPlainObject2["default"])(stateProps),"`%sToProps` must return an object. Instead received %s.",dispatch?"mapDispatch":"mapState",stateProps),stateProps}function connect(mapStateToProps,mapDispatchToProps,mergeProps){function computeMergedProps(stateProps,dispatchProps,parentProps){var mergedProps=finalMergeProps(stateProps,dispatchProps,parentProps);return(0,_invariant2["default"])((0,_isPlainObject2["default"])(mergedProps),"`mergeProps` must return an object. Instead received %s.",mergedProps),mergedProps}var options=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],shouldSubscribe=Boolean(mapStateToProps),mapState=mapStateToProps||defaultMapStateToProps,mapDispatch=(0,_isPlainObject2["default"])(mapDispatchToProps)?(0,_wrapActionCreators2["default"])(mapDispatchToProps):mapDispatchToProps||defaultMapDispatchToProps,finalMergeProps=mergeProps||defaultMergeProps,checkMergedEquals=finalMergeProps!==defaultMergeProps,_options$pure=options.pure,pure=void 0===_options$pure?!0:_options$pure,_options$withRef=options.withRef,withRef=void 0===_options$withRef?!1:_options$withRef,version=nextVersion++;return function(WrappedComponent){var Connect=function(_Component){function Connect(props,context){_classCallCheck(this,Connect);var _this=_possibleConstructorReturn(this,_Component.call(this,props,context));_this.version=version,_this.store=props.store||context.store,(0,_invariant2["default"])(_this.store,'Could not find "store" in either the context or '+('props of "'+_this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+_this.constructor.displayName+'".'));var storeState=_this.store.getState();return _this.state={storeState:storeState},_this.clearCache(),_this}return _inherits(Connect,_Component),Connect.prototype.shouldComponentUpdate=function(){return!pure||this.haveOwnPropsChanged||this.hasStoreStateChanged},Connect.prototype.computeStateProps=function(store,props){if(!this.finalMapStateToProps)return this.configureFinalMapState(store,props);var state=store.getState(),stateProps=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(state,props):this.finalMapStateToProps(state);return checkStateShape(stateProps)},Connect.prototype.configureFinalMapState=function(store,props){var mappedState=mapState(store.getState(),props),isFactory="function"==typeof mappedState;return this.finalMapStateToProps=isFactory?mappedState:mapState,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,isFactory?this.computeStateProps(store,props):checkStateShape(mappedState)},Connect.prototype.computeDispatchProps=function(store,props){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(store,props);var dispatch=store.dispatch,dispatchProps=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(dispatch,props):this.finalMapDispatchToProps(dispatch);return checkStateShape(dispatchProps,!0)},Connect.prototype.configureFinalMapDispatch=function(store,props){var mappedDispatch=mapDispatch(store.dispatch,props),isFactory="function"==typeof mappedDispatch;return this.finalMapDispatchToProps=isFactory?mappedDispatch:mapDispatch,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,isFactory?this.computeDispatchProps(store,props):checkStateShape(mappedDispatch,!0)},Connect.prototype.updateStatePropsIfNeeded=function(){var nextStateProps=this.computeStateProps(this.store,this.props);return this.stateProps&&(0,_shallowEqual2["default"])(nextStateProps,this.stateProps)?!1:(this.stateProps=nextStateProps,!0)},Connect.prototype.updateDispatchPropsIfNeeded=function(){var nextDispatchProps=this.computeDispatchProps(this.store,this.props);return this.dispatchProps&&(0,_shallowEqual2["default"])(nextDispatchProps,this.dispatchProps)?!1:(this.dispatchProps=nextDispatchProps,!0)},Connect.prototype.updateMergedPropsIfNeeded=function(){var nextMergedProps=computeMergedProps(this.stateProps,this.dispatchProps,this.props);return this.mergedProps&&checkMergedEquals&&(0,_shallowEqual2["default"])(nextMergedProps,this.mergedProps)?!1:(this.mergedProps=nextMergedProps,!0)},Connect.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},Connect.prototype.trySubscribe=function(){shouldSubscribe&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},Connect.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},Connect.prototype.componentDidMount=function(){this.trySubscribe()},Connect.prototype.componentWillReceiveProps=function(nextProps){pure&&(0,_shallowEqual2["default"])(nextProps,this.props)||(this.haveOwnPropsChanged=!0)},Connect.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},Connect.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},Connect.prototype.handleChange=function(){if(this.unsubscribe){var prevStoreState=this.state.storeState,storeState=this.store.getState();pure&&prevStoreState===storeState||(this.hasStoreStateChanged=!0,this.setState({storeState:storeState}))}},Connect.prototype.getWrappedInstance=function(){return(0,_invariant2["default"])(withRef,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},Connect.prototype.render=function(){var haveOwnPropsChanged=this.haveOwnPropsChanged,hasStoreStateChanged=this.hasStoreStateChanged,renderedElement=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var shouldUpdateStateProps=!0,shouldUpdateDispatchProps=!0;pure&&renderedElement&&(shouldUpdateStateProps=hasStoreStateChanged||haveOwnPropsChanged&&this.doStatePropsDependOnOwnProps,shouldUpdateDispatchProps=haveOwnPropsChanged&&this.doDispatchPropsDependOnOwnProps);var haveStatePropsChanged=!1,haveDispatchPropsChanged=!1;shouldUpdateStateProps&&(haveStatePropsChanged=this.updateStatePropsIfNeeded()),shouldUpdateDispatchProps&&(haveDispatchPropsChanged=this.updateDispatchPropsIfNeeded());var haveMergedPropsChanged=!0;return haveMergedPropsChanged=haveStatePropsChanged||haveDispatchPropsChanged||haveOwnPropsChanged?this.updateMergedPropsIfNeeded():!1,!haveMergedPropsChanged&&renderedElement?renderedElement:(withRef?this.renderedElement=(0,_react.createElement)(WrappedComponent,_extends({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,_react.createElement)(WrappedComponent,this.mergedProps),this.renderedElement)},Connect}(_react.Component);return Connect.displayName="Connect("+getDisplayName(WrappedComponent)+")",Connect.WrappedComponent=WrappedComponent,Connect.contextTypes={store:_storeShape2["default"]},Connect.propTypes={store:_storeShape2["default"]},(0,_hoistNonReactStatics2["default"])(Connect,WrappedComponent)}}var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};exports.__esModule=!0,exports["default"]=connect;var _react=require("react"),_storeShape=require("../utils/storeShape"),_storeShape2=_interopRequireDefault(_storeShape),_shallowEqual=require("../utils/shallowEqual"),_shallowEqual2=_interopRequireDefault(_shallowEqual),_wrapActionCreators=require("../utils/wrapActionCreators"),_wrapActionCreators2=_interopRequireDefault(_wrapActionCreators),_isPlainObject=require("lodash/isPlainObject"),_isPlainObject2=_interopRequireDefault(_isPlainObject),_hoistNonReactStatics=require("hoist-non-react-statics"),_hoistNonReactStatics2=_interopRequireDefault(_hoistNonReactStatics),_invariant=require("invariant"),_invariant2=_interopRequireDefault(_invariant),defaultMapStateToProps=function(state){return{}},defaultMapDispatchToProps=function(dispatch){return{dispatch:dispatch}},defaultMergeProps=function(stateProps,dispatchProps,parentProps){return _extends({},parentProps,stateProps,dispatchProps)},nextVersion=0},{"../utils/shallowEqual":20,"../utils/storeShape":21,"../utils/wrapActionCreators":22,"hoist-non-react-statics":23,invariant:24,"lodash/isPlainObject":28,react:"react"}],19:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.__esModule=!0,exports.connect=exports.Provider=void 0;var _Provider=require("./components/Provider"),_Provider2=_interopRequireDefault(_Provider),_connect=require("./components/connect"),_connect2=_interopRequireDefault(_connect);exports.Provider=_Provider2["default"],exports.connect=_connect2["default"]},{"./components/Provider":17,"./components/connect":18}],20:[function(require,module,exports){"use strict";function shallowEqual(objA,objB){if(objA===objB)return!0;var keysA=Object.keys(objA),keysB=Object.keys(objB);if(keysA.length!==keysB.length)return!1;for(var hasOwn=Object.prototype.hasOwnProperty,i=0;i<keysA.length;i++)if(!hasOwn.call(objB,keysA[i])||objA[keysA[i]]!==objB[keysA[i]])return!1;return!0}exports.__esModule=!0,exports["default"]=shallowEqual},{}],21:[function(require,module,exports){"use strict";exports.__esModule=!0;var _react=require("react");exports["default"]=_react.PropTypes.shape({subscribe:_react.PropTypes.func.isRequired,dispatch:_react.PropTypes.func.isRequired,getState:_react.PropTypes.func.isRequired})},{react:"react"}],22:[function(require,module,exports){"use strict";function wrapActionCreators(actionCreators){return function(dispatch){return(0,_redux.bindActionCreators)(actionCreators,dispatch)}}exports.__esModule=!0,exports["default"]=wrapActionCreators;var _redux=require("redux")},{redux:30}],23:[function(require,module,exports){"use strict";var REACT_STATICS={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};module.exports=function(targetComponent,sourceComponent){for(var keys=Object.getOwnPropertyNames(sourceComponent),i=0;i<keys.length;++i)if(!REACT_STATICS[keys[i]]&&!KNOWN_STATICS[keys[i]])try{targetComponent[keys[i]]=sourceComponent[keys[i]]}catch(error){}return targetComponent}},{}],24:[function(require,module,exports){"use strict";var invariant=function(condition,format,a,b,c,d,e,f){if(!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]})),error.name="Invariant Violation"}throw error.framesToPop=1,error}};module.exports=invariant},{}],25:[function(require,module,exports){function getPrototype(value){return nativeGetPrototype(Object(value))}var nativeGetPrototype=Object.getPrototypeOf;module.exports=getPrototype},{}],26:[function(require,module,exports){function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}module.exports=isHostObject},{}],27:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}module.exports=isObjectLike},{}],28:[function(require,module,exports){function isPlainObject(value){if(!isObjectLike(value)||objectToString.call(value)!=objectTag||isHostObject(value))return!1;var proto=getPrototype(value);if(null===proto)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}var getPrototype=require("./_getPrototype"),isHostObject=require("./_isHostObject"),isObjectLike=require("./isObjectLike"),objectTag="[object Object]",objectProto=Object.prototype,funcToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object),objectToString=objectProto.toString;module.exports=isPlainObject},{"./_getPrototype":25,"./_isHostObject":26,"./isObjectLike":27}],29:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function createStore(reducer,initialState){function getState(){return currentState}function subscribe(listener){listeners.push(listener);var isSubscribed=!0;return function(){if(isSubscribed){isSubscribed=!1;
var index=listeners.indexOf(listener);listeners.splice(index,1)}}}function dispatch(action){if(!_utilsIsPlainObject2["default"](action))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof action.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(isDispatching)throw new Error("Reducers may not dispatch actions.");try{isDispatching=!0,currentState=currentReducer(currentState,action)}finally{isDispatching=!1}return listeners.slice().forEach(function(listener){return listener()}),action}function replaceReducer(nextReducer){currentReducer=nextReducer,dispatch({type:ActionTypes.INIT})}if("function"!=typeof reducer)throw new Error("Expected the reducer to be a function.");var currentReducer=reducer,currentState=initialState,listeners=[],isDispatching=!1;return dispatch({type:ActionTypes.INIT}),{dispatch:dispatch,subscribe:subscribe,getState:getState,replaceReducer:replaceReducer}}exports.__esModule=!0,exports["default"]=createStore;var _utilsIsPlainObject=require("./utils/isPlainObject"),_utilsIsPlainObject2=_interopRequireDefault(_utilsIsPlainObject),ActionTypes={INIT:"@@redux/INIT"};exports.ActionTypes=ActionTypes},{"./utils/isPlainObject":35}],30:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.__esModule=!0;var _createStore=require("./createStore"),_createStore2=_interopRequireDefault(_createStore),_utilsCombineReducers=require("./utils/combineReducers"),_utilsCombineReducers2=_interopRequireDefault(_utilsCombineReducers),_utilsBindActionCreators=require("./utils/bindActionCreators"),_utilsBindActionCreators2=_interopRequireDefault(_utilsBindActionCreators),_utilsApplyMiddleware=require("./utils/applyMiddleware"),_utilsApplyMiddleware2=_interopRequireDefault(_utilsApplyMiddleware),_utilsCompose=require("./utils/compose"),_utilsCompose2=_interopRequireDefault(_utilsCompose);exports.createStore=_createStore2["default"],exports.combineReducers=_utilsCombineReducers2["default"],exports.bindActionCreators=_utilsBindActionCreators2["default"],exports.applyMiddleware=_utilsApplyMiddleware2["default"],exports.compose=_utilsCompose2["default"]},{"./createStore":29,"./utils/applyMiddleware":31,"./utils/bindActionCreators":32,"./utils/combineReducers":33,"./utils/compose":34}],31:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function applyMiddleware(){for(var _len=arguments.length,middlewares=Array(_len),_key=0;_len>_key;_key++)middlewares[_key]=arguments[_key];return function(next){return function(reducer,initialState){var store=next(reducer,initialState),_dispatch=store.dispatch,chain=[],middlewareAPI={getState:store.getState,dispatch:function(action){return _dispatch(action)}};return chain=middlewares.map(function(middleware){return middleware(middlewareAPI)}),_dispatch=_compose2["default"].apply(void 0,chain)(store.dispatch),_extends({},store,{dispatch:_dispatch})}}}exports.__esModule=!0;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};exports["default"]=applyMiddleware;var _compose=require("./compose"),_compose2=_interopRequireDefault(_compose);module.exports=exports["default"]},{"./compose":34}],32:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function bindActionCreator(actionCreator,dispatch){return function(){return dispatch(actionCreator.apply(void 0,arguments))}}function bindActionCreators(actionCreators,dispatch){if("function"==typeof actionCreators)return bindActionCreator(actionCreators,dispatch);if("object"!=typeof actionCreators||null===actionCreators||void 0===actionCreators)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===actionCreators?"null":typeof actionCreators)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return _mapValues2["default"](actionCreators,function(actionCreator){return bindActionCreator(actionCreator,dispatch)})}exports.__esModule=!0,exports["default"]=bindActionCreators;var _mapValues=require("./mapValues"),_mapValues2=_interopRequireDefault(_mapValues);module.exports=exports["default"]},{"./mapValues":36}],33:[function(require,module,exports){(function(process){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function getUndefinedStateErrorMessage(key,action){var actionType=action&&action.type,actionName=actionType&&'"'+actionType.toString()+'"'||"an action";return'Reducer "'+key+'" returned undefined handling '+actionName+". To ignore an action, you must explicitly return the previous state."}function getUnexpectedStateKeyWarningMessage(inputState,outputState,action){var reducerKeys=Object.keys(outputState),argumentName=action&&action.type===_createStore.ActionTypes.INIT?"initialState argument passed to createStore":"previous state received by the reducer";if(0===reducerKeys.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!_isPlainObject2["default"](inputState))return"The "+argumentName+' has unexpected type of "'+{}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1]+'". Expected argument to be an object with the following '+('keys: "'+reducerKeys.join('", "')+'"');var unexpectedKeys=Object.keys(inputState).filter(function(key){return reducerKeys.indexOf(key)<0});return unexpectedKeys.length>0?"Unexpected "+(unexpectedKeys.length>1?"keys":"key")+" "+('"'+unexpectedKeys.join('", "')+'" found in '+argumentName+". ")+"Expected to find one of the known reducer keys instead: "+('"'+reducerKeys.join('", "')+'". Unexpected keys will be ignored.'):void 0}function assertReducerSanity(reducers){Object.keys(reducers).forEach(function(key){var reducer=reducers[key],initialState=reducer(void 0,{type:_createStore.ActionTypes.INIT});if("undefined"==typeof initialState)throw new Error('Reducer "'+key+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var type="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof reducer(void 0,{type:type}))throw new Error('Reducer "'+key+'" returned undefined when probed with a random type. '+("Don't try to handle "+_createStore.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function combineReducers(reducers){var sanityError,finalReducers=_pick2["default"](reducers,function(val){return"function"==typeof val});try{assertReducerSanity(finalReducers)}catch(e){sanityError=e}var defaultState=_mapValues2["default"](finalReducers,function(){});return function(state,action){if(void 0===state&&(state=defaultState),sanityError)throw sanityError;var hasChanged=!1,finalState=_mapValues2["default"](finalReducers,function(reducer,key){var previousStateForKey=state[key],nextStateForKey=reducer(previousStateForKey,action);if("undefined"==typeof nextStateForKey){var errorMessage=getUndefinedStateErrorMessage(key,action);throw new Error(errorMessage)}return hasChanged=hasChanged||nextStateForKey!==previousStateForKey,nextStateForKey});if("production"!==process.env.NODE_ENV){var warningMessage=getUnexpectedStateKeyWarningMessage(state,finalState,action);warningMessage&&console.error(warningMessage)}return hasChanged?finalState:state}}exports.__esModule=!0,exports["default"]=combineReducers;var _createStore=require("../createStore"),_isPlainObject=require("./isPlainObject"),_isPlainObject2=_interopRequireDefault(_isPlainObject),_mapValues=require("./mapValues"),_mapValues2=_interopRequireDefault(_mapValues),_pick=require("./pick"),_pick2=_interopRequireDefault(_pick);module.exports=exports["default"]}).call(this,require("_process"))},{"../createStore":29,"./isPlainObject":35,"./mapValues":36,"./pick":37,_process:16}],34:[function(require,module,exports){"use strict";function compose(){for(var _len=arguments.length,funcs=Array(_len),_key=0;_len>_key;_key++)funcs[_key]=arguments[_key];return function(arg){return funcs.reduceRight(function(composed,f){return f(composed)},arg)}}exports.__esModule=!0,exports["default"]=compose,module.exports=exports["default"]},{}],35:[function(require,module,exports){"use strict";function isPlainObject(obj){if(!obj||"object"!=typeof obj)return!1;var proto="function"==typeof obj.constructor?Object.getPrototypeOf(obj):Object.prototype;if(null===proto)return!0;var constructor=proto.constructor;return"function"==typeof constructor&&constructor instanceof constructor&&fnToString(constructor)===objStringValue}exports.__esModule=!0,exports["default"]=isPlainObject;var fnToString=function(fn){return Function.prototype.toString.call(fn)},objStringValue=fnToString(Object);module.exports=exports["default"]},{}],36:[function(require,module,exports){"use strict";function mapValues(obj,fn){return Object.keys(obj).reduce(function(result,key){return result[key]=fn(obj[key],key),result},{})}exports.__esModule=!0,exports["default"]=mapValues,module.exports=exports["default"]},{}],37:[function(require,module,exports){"use strict";function pick(obj,fn){return Object.keys(obj).reduce(function(result,key){return fn(obj[key])&&(result[key]=obj[key]),result},{})}exports.__esModule=!0,exports["default"]=pick,module.exports=exports["default"]},{}]},{},[1]);
//# sourceMappingURL=bundle-legacy.js.map