diff --git a/client/dist/js/LeftAndMain.Ping.js b/client/dist/js/LeftAndMain.Ping.js
index 6c9d19a74..1c6fdf9d2 100644
--- a/client/dist/js/LeftAndMain.Ping.js
+++ b/client/dist/js/LeftAndMain.Ping.js
@@ -1 +1 @@
-webpackJsonp([7],{"./client/src/legacy/LeftAndMain.Ping.js":function(n,e,t){"use strict";var i=t(1);(function(n){return n&&n.__esModule?n:{default:n}})(i).default.entwine("ss.ping",function(n){n(".cms-container").entwine({PingIntervalSeconds:300,onadd:function(){this._setupPinging(),this._super()},_setupPinging:function(){var e=null,t=null,i=function(n,i){n.status<400&&0!=n.responseText||(t&&!t.closed||(t=window.open("Security/login"))||(alert("Please enable pop-ups for this site"),clearInterval(e)),t&&t.focus())};e=setInterval(function(){n.ajax({url:"Security/ping",global:!1,type:"POST",complete:i})},1e3*this.getPingIntervalSeconds())}})})}},["./client/src/legacy/LeftAndMain.Ping.js"]);
\ No newline at end of file
+webpackJsonp([7],{"./client/src/legacy/LeftAndMain.Ping.js":function(n,e,t){"use strict";var i=t(2);(function(n){return n&&n.__esModule?n:{default:n}})(i).default.entwine("ss.ping",function(n){n(".cms-container").entwine({PingIntervalSeconds:300,onadd:function(){this._setupPinging(),this._super()},_setupPinging:function(){var e=null,t=null,i=function(n,i){n.status<400&&0!=n.responseText||(t&&!t.closed||(t=window.open("Security/login"))||(alert("Please enable pop-ups for this site"),clearInterval(e)),t&&t.focus())};e=setInterval(function(){n.ajax({url:"Security/ping",global:!1,type:"POST",complete:i})},1e3*this.getPingIntervalSeconds())}})})}},["./client/src/legacy/LeftAndMain.Ping.js"]);
\ No newline at end of file
diff --git a/client/dist/js/MemberImportForm.js b/client/dist/js/MemberImportForm.js
index 0c4f75c7a..dceb7276f 100644
--- a/client/dist/js/MemberImportForm.js
+++ b/client/dist/js/MemberImportForm.js
@@ -1 +1 @@
-webpackJsonp([6],{"./client/src/legacy/MemberImportForm.js":function(e,n,t){"use strict";var o=t(1);(function(e){return e&&e.__esModule?e:{default:e}})(o).default.entwine("ss",function(e){e(".import-form .advanced").entwine({onmatch:function(){this._super(),this.hide()},onunmatch:function(){this._super()}}),e(".import-form a.toggle-advanced").entwine({onclick:function(e){return this.parents("form:eq(0)").find(".advanced").toggle(),!1}})})}},["./client/src/legacy/MemberImportForm.js"]);
\ No newline at end of file
+webpackJsonp([6],{"./client/src/legacy/MemberImportForm.js":function(e,n,t){"use strict";var o=t(2);(function(e){return e&&e.__esModule?e:{default:e}})(o).default.entwine("ss",function(e){e(".import-form .advanced").entwine({onmatch:function(){this._super(),this.hide()},onunmatch:function(){this._super()}}),e(".import-form a.toggle-advanced").entwine({onclick:function(e){return this.parents("form:eq(0)").find(".advanced").toggle(),!1}})})}},["./client/src/legacy/MemberImportForm.js"]);
\ No newline at end of file
diff --git a/client/dist/js/TinyMCE_sslink-email.js b/client/dist/js/TinyMCE_sslink-email.js
index ebe60aeae..e7d8d57c7 100644
--- a/client/dist/js/TinyMCE_sslink-email.js
+++ b/client/dist/js/TinyMCE_sslink-email.js
@@ -1 +1 @@
-webpackJsonp([2],{"./client/src/legacy/TinyMCE_sslink-email.js":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(2),r=n(a),l=i(13),o=n(l),s=i(0),d=n(s),c=i(7),u=n(c),m=i(1),p=n(m),f=i(19),g=i(6);o.default.addAction("sslink",{text:r.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:function(e){return e.execCommand("sslinkemail")},priority:51}).addCommandWithUrlTest("sslinkemail",/^mailto:/);var k={init:function(e){e.addCommand("sslinkemail",function(){window.jQuery("#"+e.id).entwine("ss").openLinkEmailDialog()})}},_="insert-link__dialog-wrapper--email",h=(0,g.loadComponent)((0,f.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkEmailDialog:function(){var t=e("#"+_);t.length||(t=e('
'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+_).entwine({renderModal:function(e){var t=this,i=function(){return t.close()},n=function(){return t.handleInsert.apply(t,arguments)},a=this.getOriginalAttributes(),l=tinymce.activeEditor.selection,o=l.getContent()||"",s=l.getNode().tagName,c="A"!==s&&""===o.trim();u.default.render(d.default.createElement(h,{isOpen:e,onInsert:n,onClosed:i,title:r.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:a,identifier:"Admin.InsertLinkEmailModal",requireLinkText:c}),this[0])},getOriginalAttributes:function(){var t=this.getElement().getEditor(),i=e(t.getSelectedNode()),n=(i.attr("href")||"").split("?"),a=n[0].replace(/^mailto:/,"").split("?")[0];a.match(/.+@.+\..+/)||(a="");var r=n[1]?n[1].match(/subject=([^&]+)/):"";return{Link:a,Subject:r?decodeURIComponent(r[1]):"",Description:i.attr("title")}},buildAttributes:function(e){var t=this._super(e),i="",n=t.href.replace(/^mailto:/,"").split("?")[0];return n.match(/.+@.+\..+/)||(n=""),n&&(i="mailto:"+n),i&&e.Subject&&(i=i+"?subject="+encodeURIComponent(e.Subject)),t.href=i,delete t.target,t}})}),tinymce.PluginManager.add("sslinkemail",function(e){return k.init(e)}),t.default=k},13:function(e,t){e.exports=TinyMCEActionRegistrar},19:function(e,t){e.exports=InsertLinkModal},2:function(e,t){e.exports=i18n},6:function(e,t){e.exports=Injector}},["./client/src/legacy/TinyMCE_sslink-email.js"]);
\ No newline at end of file
+webpackJsonp([2],{"./client/src/legacy/TinyMCE_sslink-email.js":function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(3),r=n(a),l=i(14),o=n(l),s=i(0),d=n(s),c=i(8),u=n(c),m=i(2),p=n(m),f=i(20),g=i(7);o.default.addAction("sslink",{text:r.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:function(e){return e.execCommand("sslinkemail")},priority:51}).addCommandWithUrlTest("sslinkemail",/^mailto:/);var k={init:function(e){e.addCommand("sslinkemail",function(){window.jQuery("#"+e.id).entwine("ss").openLinkEmailDialog()})}},_="insert-link__dialog-wrapper--email",h=(0,g.loadComponent)((0,f.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkEmailDialog:function(){var t=e("#"+_);t.length||(t=e(''),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+_).entwine({renderModal:function(e){var t=this,i=function(){return t.close()},n=function(){return t.handleInsert.apply(t,arguments)},a=this.getOriginalAttributes(),l=tinymce.activeEditor.selection,o=l.getContent()||"",s=l.getNode().tagName,c="A"!==s&&""===o.trim();u.default.render(d.default.createElement(h,{isOpen:e,onInsert:n,onClosed:i,title:r.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:a,identifier:"Admin.InsertLinkEmailModal",requireLinkText:c}),this[0])},getOriginalAttributes:function(){var t=this.getElement().getEditor(),i=e(t.getSelectedNode()),n=(i.attr("href")||"").split("?"),a=n[0].replace(/^mailto:/,"").split("?")[0];a.match(/.+@.+\..+/)||(a="");var r=n[1]?n[1].match(/subject=([^&]+)/):"";return{Link:a,Subject:r?decodeURIComponent(r[1]):"",Description:i.attr("title")}},buildAttributes:function(e){var t=this._super(e),i="",n=t.href.replace(/^mailto:/,"").split("?")[0];return n.match(/.+@.+\..+/)||(n=""),n&&(i="mailto:"+n),i&&e.Subject&&(i=i+"?subject="+encodeURIComponent(e.Subject)),t.href=i,delete t.target,t}})}),tinymce.PluginManager.add("sslinkemail",function(e){return k.init(e)}),t.default=k},14:function(e,t){e.exports=TinyMCEActionRegistrar},20:function(e,t){e.exports=InsertLinkModal},3:function(e,t){e.exports=i18n},7:function(e,t){e.exports=Injector}},["./client/src/legacy/TinyMCE_sslink-email.js"]);
\ No newline at end of file
diff --git a/client/dist/js/TinyMCE_sslink-external.js b/client/dist/js/TinyMCE_sslink-external.js
index 6c73809ed..1adebfa80 100644
--- a/client/dist/js/TinyMCE_sslink-external.js
+++ b/client/dist/js/TinyMCE_sslink-external.js
@@ -1 +1 @@
-webpackJsonp([1],{"./client/src/legacy/TinyMCE_sslink-external.js":function(e,n,t){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=t(2),a=i(r),l=t(13),o=i(l),s=t(0),d=i(s),c=t(7),u=i(c),f=t(1),p=i(f),m=t(19),x=t(6);o.default.addAction("sslink",{text:a.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onclick:function(e){return e.execCommand("sslinkexternal")},priority:52});var k={init:function(e){e.addCommand("sslinkexternal",function(){window.jQuery("#"+e.id).entwine("ss").openLinkExternalDialog()})}},_="insert-link__dialog-wrapper--external",g=(0,x.loadComponent)((0,m.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkExternalDialog:function(){var n=e("#"+_);n.length||(n=e(''),e("body").append(n)),n.addClass("insert-link__dialog-wrapper"),n.setElement(this),n.open()}}),e("#"+_).entwine({renderModal:function(e){var n=this,t=function(){return n.close()},i=function(){return n.handleInsert.apply(n,arguments)},r=this.getOriginalAttributes(),l=tinymce.activeEditor.selection,o=l.getContent()||"",s=l.getNode().tagName,c="A"!==s&&""===o.trim();u.default.render(d.default.createElement(g,{isOpen:e,onInsert:i,onClosed:t,title:a.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:r,identifier:"Admin.InsertLinkExternalModal",requireLinkText:c}),this[0])},buildAttributes:function(e){var n=this._super(e),t=n.href;return t.match(/:\/\//)||(t=window.location.protocol+"//"+t),t=t.replace(/.*:\/\/(#.*)$/,"$1"),t.match(/:\/\/$/)&&(t=""),n.href=t,n}})}),tinymce.PluginManager.add("sslinkexternal",function(e){return k.init(e)}),n.default=k},13:function(e,n){e.exports=TinyMCEActionRegistrar},19:function(e,n){e.exports=InsertLinkModal},2:function(e,n){e.exports=i18n},6:function(e,n){e.exports=Injector}},["./client/src/legacy/TinyMCE_sslink-external.js"]);
\ No newline at end of file
+webpackJsonp([1],{"./client/src/legacy/TinyMCE_sslink-external.js":function(e,n,t){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=t(3),a=i(r),l=t(14),o=i(l),s=t(0),d=i(s),c=t(8),u=i(c),f=t(2),p=i(f),m=t(20),x=t(7);o.default.addAction("sslink",{text:a.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onclick:function(e){return e.execCommand("sslinkexternal")},priority:52});var k={init:function(e){e.addCommand("sslinkexternal",function(){window.jQuery("#"+e.id).entwine("ss").openLinkExternalDialog()})}},_="insert-link__dialog-wrapper--external",g=(0,x.loadComponent)((0,m.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkExternalDialog:function(){var n=e("#"+_);n.length||(n=e(''),e("body").append(n)),n.addClass("insert-link__dialog-wrapper"),n.setElement(this),n.open()}}),e("#"+_).entwine({renderModal:function(e){var n=this,t=function(){return n.close()},i=function(){return n.handleInsert.apply(n,arguments)},r=this.getOriginalAttributes(),l=tinymce.activeEditor.selection,o=l.getContent()||"",s=l.getNode().tagName,c="A"!==s&&""===o.trim();u.default.render(d.default.createElement(g,{isOpen:e,onInsert:i,onClosed:t,title:a.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:r,identifier:"Admin.InsertLinkExternalModal",requireLinkText:c}),this[0])},buildAttributes:function(e){var n=this._super(e),t=n.href;return t.match(/:\/\//)||(t=window.location.protocol+"//"+t),t=t.replace(/.*:\/\/(#.*)$/,"$1"),t.match(/:\/\/$/)&&(t=""),n.href=t,n}})}),tinymce.PluginManager.add("sslinkexternal",function(e){return k.init(e)}),n.default=k},14:function(e,n){e.exports=TinyMCEActionRegistrar},20:function(e,n){e.exports=InsertLinkModal},3:function(e,n){e.exports=i18n},7:function(e,n){e.exports=Injector}},["./client/src/legacy/TinyMCE_sslink-external.js"]);
\ No newline at end of file
diff --git a/client/dist/js/TinyMCE_sslink.js b/client/dist/js/TinyMCE_sslink.js
index 4653dddc4..7f4f4ebe4 100644
--- a/client/dist/js/TinyMCE_sslink.js
+++ b/client/dist/js/TinyMCE_sslink.js
@@ -1 +1 @@
-webpackJsonp([3],{"./client/src/components/TinymceInlineToolbar/TinymceInlineToolbar.js":function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,n){var o=Array.isArray(n)?n:[n||""];return Boolean(t&&o.map(function(t){return String(t)}).map(function(t){return t.toLowerCase()}).includes((t.tagName||"").toLowerCase())&&e)}function r(t,e){function n(){i(l,s,o)&&(r.hide(),clearTimeout(a),a=setTimeout(function(){r.show(),r.reposition(l)},300))}var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["a"],r=new c(t,e),l=null,a=null,s=!1;return r.hide().renderTo(window.document.body),t.on("remove",function(){r.remove()}),t.on("focus",function(){s=!0}),t.on("blur hide",function(){r.hide(),s=!1}),t.on("nodechange",function(e){var n={element:e.element,parents:e.parents,collapsed:t.selection.isCollapsed()};l=n.selection||n.element,i(l,s,o)?(r.show(),r.reposition(l)):r.hide()}),window.addEventListener("scroll",function(e){e.target.contains(document.querySelector("#"+t.id))&&n()},!0),t.contentDocument.addEventListener("scroll",n),r}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n=k||b>=k?this.hide():(this.bottom?b>=d?(y=" mce-arrow-up",w=s.bottom+r.top+n+10):p>=d&&(y=" mce-arrow-down",w=s.top+r.top+n-a-8):p>=d?(y=" mce-arrow-down",w=s.top+r.top+n-a-8):b>=d&&k/2>s.bottom+r.top-h&&(y=" mce-arrow-up",w=s.bottom+r.top+n+10),void 0===w&&(w=n+h+5),v=u-c/2+r.left+e,s.left<0||s.right>r.width?v=r.left+e+(r.width-c)/2:c>=o?(y+=" mce-arrow-full",v=0):v<0&&s.left+c>o||v+c>o&&s.right-c<0?v=(o-c)/2:vr.width+r.left+e&&(y+=" mce-arrow-right",v=s.right-c+r.left+e),l.className=l.className.replace(/ ?mce-arrow-[\w]+/g,"")+y,this.setStyles({left:v,top:w}),this)}}]),t}();e.default=c,e.setupTinyMceInlineToolbar=r,e.shouldShowToolbar=i},"./client/src/legacy/TinyMCE_sslink.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(13),r=o(i),l=n(7),c=o(l),a=n(1),s=o(a),u=n("./client/src/components/TinymceInlineToolbar/TinymceInlineToolbar.js"),d={init:function(t){function e(){var e=tinymce.activeEditor.selection.getNode(),n=e.getAttribute("href");n&&t.execCommand(r.default.getEditorCommandFromUrl(n))}var n=r.default.getSortedActions("sslink").map(function(e){return Object.assign({},e,{onclick:function(){return e.onclick(t)}})}),o=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl";t.addButton("sslink",{icon:"link",title:"Insert Link ["+o+" + k]",type:"menubutton",menu:n}),t.addMenuItem("sslink",{icon:"link",text:"Insert Link",menu:n}),t.addShortcut("Meta+k","Open link menu",function(){(0,s.default)('[aria-label^="Insert Link"] > button',t.container).first().click()}),t.on("preinit",function(){(0,u.setupTinyMceInlineToolbar)(t,[{type:"button",onClick:e,text:"Edit link"},{type:"button",onClick:function(){return t.execCommand("unlink")},text:"Remove link"}])})}};s.default.entwine("ss",function(t){t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch:function(){this._clearModal()},_clearModal:function(){c.default.unmountComponentAtNode(this[0])},open:function(){var t=this.getElement().getEditor().getInstance();this.setBookmark(t.selection.getBookmark(2,!0)),this.renderModal(!0)},close:function(){this.setData({}),this.renderModal(!1)},renderModal:function(){},handleInsert:function(t){this.getElement().getEditor().getInstance().selection.moveToBookmark(this.getBookmark());var e=this.buildAttributes(t);return this.insertLinkInEditor(e,t.Text),this.close(),Promise.resolve()},buildAttributes:function(t){var e=t.Anchor&&t.Anchor.length?"#"+t.Anchor:"";return{href:""+t.Link+e,target:t.TargetBlank?"_blank":"",title:t.Description}},insertLinkInEditor:function(t,e){var n=this.getElement().getEditor();n.insertLink(t,null,e),n.addUndo(),n.repaint();var o=n.getInstance(),i=o.selection;setTimeout(function(){return i&&i.collapse()},0)},getOriginalAttributes:function(){var e=this.getElement().getEditor(),n=t(e.getSelectedNode()),o=(n.attr("href")||"").split("#");return{Link:o[0]||"",Anchor:o[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}}})}),tinymce.PluginManager.add("sslink",function(t){return d.init(t)}),e.default=d},13:function(t,e){t.exports=TinyMCEActionRegistrar}},["./client/src/legacy/TinyMCE_sslink.js"]);
\ No newline at end of file
+webpackJsonp([3],{"./client/src/components/TinymceInlineToolbar/TinymceInlineToolbar.js":function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,n){var o=Array.isArray(n)?n:[n||""];return Boolean(t&&o.map(function(t){return String(t)}).map(function(t){return t.toLowerCase()}).includes((t.tagName||"").toLowerCase())&&e)}function r(t,e){function n(){i(l,s,o)&&(r.hide(),clearTimeout(a),a=setTimeout(function(){r.show(),r.reposition(l)},300))}var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["a"],r=new c(t,e),l=null,a=null,s=!1;return r.hide().renderTo(window.document.body),t.on("remove",function(){r.remove()}),t.on("focus",function(){s=!0}),t.on("blur hide",function(){r.hide(),s=!1}),t.on("nodechange",function(e){var n={element:e.element,parents:e.parents,collapsed:t.selection.isCollapsed()};l=n.selection||n.element,i(l,s,o)?(r.show(),r.reposition(l)):r.hide()}),window.addEventListener("scroll",function(e){e.target.contains(document.querySelector("#"+t.id))&&n()},!0),t.contentDocument.addEventListener("scroll",n),r}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n=k||b>=k?this.hide():(this.bottom?b>=d?(y=" mce-arrow-up",w=s.bottom+r.top+n+10):p>=d&&(y=" mce-arrow-down",w=s.top+r.top+n-a-8):p>=d?(y=" mce-arrow-down",w=s.top+r.top+n-a-8):b>=d&&k/2>s.bottom+r.top-h&&(y=" mce-arrow-up",w=s.bottom+r.top+n+10),void 0===w&&(w=n+h+5),v=u-c/2+r.left+e,s.left<0||s.right>r.width?v=r.left+e+(r.width-c)/2:c>=o?(y+=" mce-arrow-full",v=0):v<0&&s.left+c>o||v+c>o&&s.right-c<0?v=(o-c)/2:vr.width+r.left+e&&(y+=" mce-arrow-right",v=s.right-c+r.left+e),l.className=l.className.replace(/ ?mce-arrow-[\w]+/g,"")+y,this.setStyles({left:v,top:w}),this)}}]),t}();e.default=c,e.setupTinyMceInlineToolbar=r,e.shouldShowToolbar=i},"./client/src/legacy/TinyMCE_sslink.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(14),r=o(i),l=n(8),c=o(l),a=n(2),s=o(a),u=n("./client/src/components/TinymceInlineToolbar/TinymceInlineToolbar.js"),d={init:function(t){function e(){var e=tinymce.activeEditor.selection.getNode(),n=e.getAttribute("href");n&&t.execCommand(r.default.getEditorCommandFromUrl(n))}var n=r.default.getSortedActions("sslink").map(function(e){return Object.assign({},e,{onclick:function(){return e.onclick(t)}})}),o=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl";t.addButton("sslink",{icon:"link",title:"Insert Link ["+o+" + k]",type:"menubutton",menu:n}),t.addMenuItem("sslink",{icon:"link",text:"Insert Link",menu:n}),t.addShortcut("Meta+k","Open link menu",function(){(0,s.default)('[aria-label^="Insert Link"] > button',t.container).first().click()}),t.on("preinit",function(){(0,u.setupTinyMceInlineToolbar)(t,[{type:"button",onClick:e,text:"Edit link"},{type:"button",onClick:function(){return t.execCommand("unlink")},text:"Remove link"}])})}};s.default.entwine("ss",function(t){t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch:function(){this._clearModal()},_clearModal:function(){c.default.unmountComponentAtNode(this[0])},open:function(){var t=this.getElement().getEditor().getInstance();this.setBookmark(t.selection.getBookmark(2,!0)),this.renderModal(!0)},close:function(){this.setData({}),this.renderModal(!1)},renderModal:function(){},handleInsert:function(t){this.getElement().getEditor().getInstance().selection.moveToBookmark(this.getBookmark());var e=this.buildAttributes(t);return this.insertLinkInEditor(e,t.Text),this.close(),Promise.resolve()},buildAttributes:function(t){var e=t.Anchor&&t.Anchor.length?"#"+t.Anchor:"";return{href:""+t.Link+e,target:t.TargetBlank?"_blank":"",title:t.Description}},insertLinkInEditor:function(t,e){var n=this.getElement().getEditor();n.insertLink(t,null,e),n.addUndo(),n.repaint();var o=n.getInstance(),i=o.selection;setTimeout(function(){return i&&i.collapse()},0)},getOriginalAttributes:function(){var e=this.getElement().getEditor(),n=t(e.getSelectedNode()),o=(n.attr("href")||"").split("#");return{Link:o[0]||"",Anchor:o[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}}})}),tinymce.PluginManager.add("sslink",function(t){return d.init(t)}),e.default=d},14:function(t,e){t.exports=TinyMCEActionRegistrar}},["./client/src/legacy/TinyMCE_sslink.js"]);
\ No newline at end of file
diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js
index e074ca2f9..7804dfd2c 100644
--- a/client/dist/js/bundle.js
+++ b/client/dist/js/bundle.js
@@ -1 +1 @@
-webpackJsonp([0],{"./client/src/boot/BootRoutes.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0}},{key:"handleBeforeUnload",value:function(){if(this.shouldConfirmBeforeUnload())return S.default._t("Admin.CONFIRMUNSAVEDSHORT","WARNING: Your changes have not been saved.")}},{key:"handleBeforeRoute",value:function(){if(this.shouldConfirmBeforeUnload())return S.default._t("Admin.CONFIRMUNSAVED","Are you sure you want to navigate away\n from this page?\n\nWARNING: Your changes have not been saved.\n\n\n Press OK to continue, or Cancel to stay on the current page.")}}]),e}();t.default=M},"./client/src/boot/apollo/buildCache.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./node_modules/apollo-cache-inmemory/lib/index.js"),o=n("./client/src/boot/apollo/dataIdFromObject.js"),i=function(e){return e&&e.__esModule?e:{default:e}}(o),s=function(e){return new r.InMemoryCache({fragmentMatcher:e?new r.IntrospectionFragmentMatcher({introspectionQueryResultData:e}):null,dataIdFromObject:i.default,addTypename:!0})};t.default=s},"./client/src/boot/apollo/buildClient.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0&&e.__typename?e.__typename+":"+t:null};t.default=r},"./client/src/boot/apollo/getGraphqlFragments.js":function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var s=t[o](i),a=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(a).then(function(e){r("next",e)},function(e){r("throw",e)});e(a)}return r("next")})}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),i=function(e){return e&&e.__esModule?e:{default:e}}(o),s=function(e){var t=e.data;return t.__schema.types=t.__schema.types.filter(function(e){return null!==e.possibleTypes}),t},a=function(e){if(!e.ok)throw new Error("The types.graphql file could not be loaded. You probably need to run a ?flush to generate it.\n Alternatively, you can use the IntrospectionProvider extension to generate the file dynamically.\n More information: https://github.com/silverstripe/silverstripe-graphql/#schema-introspection");return e},l=function(){var e=r(regeneratorRuntime.mark(function e(t){var n,o,l,c,u,d,p=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[t+"assets/admin.types.graphql",t+"admin/graphql/types"],p||n.reverse(),o=n[0],l=n[1],c={method:"GET",headers:{"Content-Type":"application/json"},uri:""+t,credentials:"same-origin"},u=function(){var e=r(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.default)(t,c).then(a).then(function(e){return e.json()}).then(s));case 1:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}(),d=void 0,e.prev=6,e.next=9,u(o);case 9:d=e.sent,e.next=23;break;case 12:return e.prev=12,e.t0=e.catch(6),e.prev=14,e.next=17,u(l);case 17:d=e.sent,e.next=23;break;case 20:return e.prev=20,e.t1=e.catch(14),e.abrupt("return",Promise.reject(e.t1));case 23:return e.abrupt("return",Promise.resolve(d));case 24:case"end":return e.stop()}},e,void 0,[[6,12],[14,20]])}));return function(t){return e.apply(this,arguments)}}();t.default=l},"./client/src/boot/applyDevtools.js":function(e,t,n){"use strict";function r(e){var t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,n=window.__REDUX_DEVTOOLS_EXTENSION__||window.devToolsExtension;return"function"==typeof t?t(e):"function"==typeof n?(0,o.compose)(e,n()):e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(8)},"./client/src/boot/applyTransforms.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=e.extraClass?e.extraClass.split(" ").reduce(function(e,t){return i({},e,o({},t,!0))},{}):{};"string"==typeof e.data.pristineClass&&(n[e.data.pristineClass]=t),"string"==typeof e.data.dirtyClass&&(n[e.data.dirtyClass]=!t);var r=t?e.data.pristineTitle:e.data.dirtyTitle,s=t?e.data.pristineIcon:e.data.dirtyIcon;return i({},e,{title:r||e.title,icon:s||e.icon,extraClass:(0,d.default)(n)})},y=function(){a.default.transform("field-holders",function(e){["FieldGroup"].forEach(function(t){return e.component("FieldGroup",h.default,t+"Holder")})}),a.default.transform("form-action-changed",function(e){e.form.alterSchema("*",function(e){return e.mutateField("action_save",function(t){var n=e.isPristine();return m(t,n)}),e.mutateField("action_publish",function(t){var n=t.data.isPublished&&!t.data.isModified&&e.isPristine();return m(t,n)}),e.getState()})}),a.default.transform("schema-validation",function(e){e.form.addValidation("*",function(e,t,n){var r=new c.default(e),s=Object.keys(e).reduce(function(e,t){var s=(0,p.findField)(n.fields,t),a=r.validateFieldSchema(s),l=a.valid,c=a.errors;return l?e:i({},e,o({},t,c))},{});return t.addErrors(s),t.getState()})})};t.default=y},"./client/src/boot/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var s=t[o](i),a=s.value}catch(e){return void n(e)}if(!s.done)return Promise.resolve(a).then(function(e){r("next",e)},function(e){r("throw",e)});e(a)}return r("next")})}}var i=function(){var e=o(regeneratorRuntime.mark(function e(){var t,n,r,o,i,s,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.default.get("absoluteBaseUrl"),e.next=3,(0,y.default)(t);case 3:n=e.sent,(0,v.default)(),(0,j.default)(),r=[p.default],o=h.default.get("debugging"),i=u.applyMiddleware.apply(void 0,r),o&&(i=(0,T.default)(i)),s=i(u.createStore),window.ss.apolloClient=n,l=new a.default(null,n),(0,P.default)(),c.default.ready(function(){var e=(0,u.combineReducers)(c.default.reducer.getAll()),t=s(e,{});t.dispatch((0,b.setConfig)(h.default.getAll())),c.default.reducer.setStore(t),window.ss.store=t,l.setStore(t),l.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")}),window.setTimeout(function(){return c.default.load()},0);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),s=n("./client/src/boot/BootRoutes.js"),a=r(s),l=n(6),c=r(l),u=n(8),d=n(49),p=r(d),f=n(22),h=r(f),m=n("./client/src/boot/apollo/buildClient.js"),y=r(m),b=n("./client/src/state/config/ConfigActions.js"),g=n("./client/src/boot/registerComponents.js"),v=r(g),_=n("./client/src/boot/registerReducers.js"),j=r(_),w=n("./client/src/boot/applyDevtools.js"),T=r(w),O=n("./client/src/boot/applyTransforms.js"),P=r(O);window.ss=window.ss||{},window.onload=i},"./client/src/boot/registerComponents.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),i=n(6),s=r(i),a=n("./client/src/components/ActionMenu/ActionMenu.js"),l=r(a),c=n(35),u=r(c),d=n("./client/src/components/TextField/TextField.js"),p=r(d),f=n("./client/src/components/HiddenField/HiddenField.js"),h=r(f),m=n("./client/src/components/DateField/DateField.js"),y=r(m),b=n("./client/src/components/TimeField/TimeField.js"),g=r(b),v=n("./client/src/components/DatetimeField/DatetimeField.js"),_=r(v),j=n("./client/src/components/CheckboxField/CheckboxField.js"),w=r(j),T=n("./client/src/components/CheckboxSetField/CheckboxSetField.js"),O=r(T),P=n("./client/src/components/OptionsetField/OptionsetField.js"),E=r(P),C=n(40),x=r(C),S=n("./client/src/components/GridFieldActions/GridFieldActions.js"),k=r(S),F=n("./client/src/components/SingleSelectField/SingleSelectField.js"),D=r(F),M=n("./client/src/components/PopoverField/PopoverField.js"),A=r(M),R=n("./client/src/components/HeaderField/HeaderField.js"),I=r(R),N=n(41),L=r(N),B=n("./client/src/components/HtmlReadonlyField/HtmlReadonlyField.js"),U=r(B),H=n("./client/src/components/LookupField/LookupField.js"),V=r(H),G=n("./client/src/components/CompositeField/CompositeField.js"),q=r(G),z=n("./client/src/components/LabelField/LabelField.js"),$=r(z),W=n("./client/src/components/Tabs/Tabs.js"),K=r(W),X=n("./client/src/components/Tabs/TabItem.js"),Y=r(X),Q=n(37),J=r(Q),Z=n("./client/src/components/FieldGroup/FieldGroup.js"),ee=r(Z),te=n(33),ne=r(te),re=n(30),oe=r(re),ie=n("./client/src/components/NotFoundComponent/NotFoundComponent.js"),se=r(ie),ae=n("./client/src/components/Form/Form.js"),le=r(ae),ce=n(20),ue=r(ce),de=n(44),pe=r(de),fe=n("./client/src/containers/Form/Form.js"),he=r(fe),me=n("./client/src/components/UsedOnTable/UsedOnTable.js"),ye=r(me),be=n(42),ge=r(be),ve=n(54),_e=r(ve),je=n(24),we=r(je),Te=n(25),Oe=r(Te),Pe=n(32),Ee=r(Pe),Ce=n(28),xe=r(Ce),Se=n(51),ke=r(Se),Fe=n(52),De=r(Fe),Me=n("./client/src/components/HtmlEditorField/HtmlEditorField.js"),Ae=r(Me);t.default=function(){s.default.component.registerMany({ActionMenu:l.default,Badge:u.default,TextField:p.default,HiddenField:h.default,DateField:y.default,TimeField:g.default,DatetimeField:_.default,CheckboxField:w.default,CheckboxSetField:O.default,OptionsetField:E.default,GridField:x.default,GridFieldActions:k.default,FieldGroup:ee.default,SingleSelectField:D.default,PopoverField:A.default,HeaderField:I.default,LiteralField:L.default,HtmlReadonlyField:U.default,LookupField:V.default,CompositeField:q.default,Tabs:K.default,TabItem:Y.default,FormAction:J.default,LabelField:$.default,TreeDropdownField:ne.default,Preview:pe.default,ReduxForm:he.default,ReduxFormField:o.Field,Form:le.default,FormAlert:ue.default,FormBuilderModal:oe.default,NotFoundComponent:se.default,UsedOnTable:ye.default,Loading:ge.default,ViewModeToggle:_e.default,ResizeAware:we.default,Tag:Oe.default,TagList:Ee.default,CompactTagList:xe.default,Search:ke.default,SearchToggle:De.default,HtmlEditorField:Ae.default})}},"./client/src/boot/registerReducers.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.combineReducers)({formState:l.reducer,formSchemas:f.default});s.default.reducer.registerMany(o({config:d.default,form:t,records:m.default,breadcrumbs:b.default,routing:c.routerReducer,treeDropdownField:v.default,mobileMenu:j.default,unsavedForms:T.default,usedOn:P.default,viewMode:S.default},e)),s.default.transform("admin",function(e){e.reducer("form",C.default)})}},"./client/src/bundles/bundle.js":function(e,t,n){"use strict";n("./client/src/i18n.js"),n("./node_modules/expose-loader/index.js?SilverStripeComponent!./client/src/lib/SilverStripeComponent.js-exposed"),n("./node_modules/expose-loader/index.js?Backend!./client/src/lib/Backend.js-exposed"),n("./node_modules/expose-loader/index.js?schemaFieldValues!./client/src/lib/schemaFieldValues.js-exposed"),n("./node_modules/expose-loader/index.js?FormAlert!./client/src/components/FormAlert/FormAlert.js-exposed"),n("./node_modules/expose-loader/index.js?Injector!./client/src/lib/Injector.js-exposed"),n("./node_modules/expose-loader/index.js?reduxFieldReducer!./client/src/lib/reduxFieldReducer.js-exposed"),n("./node_modules/expose-loader/index.js?getFormState!./client/src/lib/getFormState.js-exposed"),n("./node_modules/expose-loader/index.js?PopoverField!./client/src/components/PopoverField/PopoverField.js-exposed"),n("./node_modules/expose-loader/index.js?FieldHolder!./client/src/components/FieldHolder/FieldHolder.js-exposed"),n("./node_modules/expose-loader/index.js?Form!./client/src/components/Form/Form.js-exposed"),n("./node_modules/expose-loader/index.js?FormConstants!./client/src/components/Form/FormConstants.js-exposed"),n("./node_modules/expose-loader/index.js?FormAction!./client/src/components/FormAction/FormAction.js-exposed"),n("./node_modules/expose-loader/index.js?SchemaActions!./client/src/state/schema/SchemaActions.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilder!./client/src/components/FormBuilder/FormBuilder.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderLoader!./client/src/containers/FormBuilderLoader/FormBuilderLoader.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderModal!./client/src/components/FormBuilderModal/FormBuilderModal.js-exposed"),n("./node_modules/expose-loader/index.js?FileSchemaModalHandler!./client/src/containers/InsertLinkModal/fileSchemaModalHandler.js-exposed"),n("./node_modules/expose-loader/index.js?InsertLinkModal!./client/src/containers/InsertLinkModal/InsertLinkModal.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActions!./client/src/state/records/RecordsActions.js-exposed"),n("./node_modules/expose-loader/index.js?GridField!./client/src/components/GridField/GridField.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldCell!./client/src/components/GridField/GridFieldCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeader!./client/src/components/GridField/GridFieldHeader.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeaderCell!./client/src/components/GridField/GridFieldHeaderCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldRow!./client/src/components/GridField/GridFieldRow.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldTable!./client/src/components/GridField/GridFieldTable.js-exposed"),n("./node_modules/expose-loader/index.js?Accordion!./client/src/components/Accordion/Accordion.js-exposed"),n("./node_modules/expose-loader/index.js?AccordionBlock!./client/src/components/Accordion/AccordionBlock.js-exposed"),n("./node_modules/expose-loader/index.js?HiddenField!./client/src/components/HiddenField/HiddenField.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroup!./client/src/components/ListGroup/ListGroup.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroupItem!./client/src/components/ListGroup/ListGroupItem.js-exposed"),n("./node_modules/expose-loader/index.js?Loading!./client/src/components/Loading/Loading.js-exposed"),n("./node_modules/expose-loader/index.js?TextField!./client/src/components/TextField/TextField.js-exposed"),n("./node_modules/expose-loader/index.js?LiteralField!./client/src/components/LiteralField/LiteralField.js-exposed"),n("./node_modules/expose-loader/index.js?Toolbar!./client/src/components/Toolbar/Toolbar.js-exposed"),n("./node_modules/expose-loader/index.js?Breadcrumb!./client/src/components/Breadcrumb/Breadcrumb.js-exposed"),n("./node_modules/expose-loader/index.js?ResizeAware!./client/src/components/ResizeAware/ResizeAware.js-exposed"),n("./node_modules/expose-loader/index.js?Tag!./client/src/components/Tag/Tag.js-exposed"),n("./node_modules/expose-loader/index.js?TagList!./client/src/components/Tag/TagList.js-exposed"),n("./node_modules/expose-loader/index.js?CompactTagList!./client/src/components/Tag/CompactTagList.js-exposed"),n("./node_modules/expose-loader/index.js?Search!./client/src/components/Search/Search.js-exposed"),n("./node_modules/expose-loader/index.js?SearchToggle!./client/src/components/Search/SearchToggle.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldNode!./client/src/components/TreeDropdownField/TreeDropdownFieldNode.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldMenu!./client/src/components/TreeDropdownField/TreeDropdownFieldMenu.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownField!./client/src/components/TreeDropdownField/TreeDropdownField.js-exposed"),n("./node_modules/expose-loader/index.js?BreadcrumbsActions!./client/src/state/breadcrumbs/BreadcrumbsActions.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActionTypes!./client/src/state/records/RecordsActionTypes.js-exposed"),n("./node_modules/expose-loader/index.js?UnsavedFormsActions!./client/src/state/unsavedForms/UnsavedFormsActions.js-exposed"),n("./node_modules/expose-loader/index.js?Badge!./client/src/components/Badge/Badge.js-exposed"),n("./node_modules/expose-loader/index.js?CheckboxSetField!./client/src/components/CheckboxSetField/CheckboxSetField.js-exposed"),n("./node_modules/expose-loader/index.js?Preview!./client/src/components/Preview/Preview.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeStates!./client/src/state/viewMode/ViewModeStates.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeActions!./client/src/state/viewMode/ViewModeActions.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeToggle!./client/src/components/ViewModeToggle/ViewModeToggle.js-exposed"),n("./node_modules/expose-loader/index.js?Focusedzone!./client/src/components/Focusedzone/Focusedzone.js-exposed"),n("./node_modules/expose-loader/index.js?Config!./client/src/lib/Config.js-exposed"),n("./node_modules/expose-loader/index.js?DataFormat!./client/src/lib/DataFormat.js-exposed"),n("./node_modules/expose-loader/index.js?ReactRouteRegister!./client/src/lib/ReactRouteRegister.js-exposed"),n("./node_modules/expose-loader/index.js?Router!./client/src/lib/Router.js-exposed"),n("./node_modules/expose-loader/index.js?TinyMCEActionRegistrar!./client/src/lib/TinyMCEActionRegistrar.js-exposed"),n("./node_modules/expose-loader/index.js?ShortcodeSerialiser!./client/src/lib/ShortcodeSerialiser.js-exposed"),n("./node_modules/expose-loader/index.js?formatWrittenNumber!./client/src/lib/formatWrittenNumber.js-exposed"),n("./client/src/legacy/sspath.js"),n("./client/src/legacy/ssui.core.js"),n("./client/src/legacy/LeftAndMain.js"),n("./client/src/legacy/LeftAndMain.ActionTabSet.js"),n("./client/src/legacy/LeftAndMain.Panel.js"),n("./client/src/legacy/LeftAndMain.Tree.js"),n("./client/src/legacy/LeftAndMain.Content.js"),n("./client/src/legacy/LeftAndMain.EditForm.js"),n("./client/src/legacy/LeftAndMain.Menu.js"),n("./client/src/legacy/LeftAndMain.MobileMenuToggle.js"),n("./client/src/legacy/LeftAndMain.Preview.js"),n("./client/src/legacy/LeftAndMain.BatchActions.js"),n("./client/src/legacy/LeftAndMain.FieldHelp.js"),n("./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js"),n("./client/src/legacy/LeftAndMain.TreeDropdownField.js"),n("./client/src/legacy/AddToCampaignForm.js"),n("./client/src/legacy/SecurityAdmin.js"),n("./client/src/legacy/ModelAdmin.js"),n("./client/src/legacy/ConfirmedPasswordField.js"),n("./client/src/legacy/SelectionGroup.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/ToggleCompositeField.js"),n("./client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js"),n("./client/src/legacy/UsedOnTable/UsedOnTableEntwine.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/DatetimeField.js"),n("./client/src/legacy/HtmlEditorField.js"),n("./client/src/legacy/TabSet.js"),n("./client/src/legacy/GridField.js"),n("./client/src/boot/index.js")},"./client/src/components/ActionMenu/ActionMenu.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t-1,title:e.title,type:"checkbox"}}},{key:"handleChange",value:function(e,t){var n=this;if("function"==typeof this.props.onChange){var r=this.getValues(),o=this.props.source.filter(function(e,o){return n.getItemKey(e,o)===t.id?1===t.value:r.indexOf(""+e.value)>-1}).map(function(e){return""+e.value});this.props.onChange(e,{id:this.props.id,value:o})}}},{key:"render",value:function(){var e=this;return this.props.source?u.default.createElement("div",null,this.props.source.map(function(t,n){return u.default.createElement(p.default,a({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);m.propTypes={className:u.default.PropTypes.string,extraClass:u.default.PropTypes.string,itemClass:u.default.PropTypes.string,id:u.default.PropTypes.string,name:u.default.PropTypes.string.isRequired,source:u.default.PropTypes.arrayOf(u.default.PropTypes.shape({value:u.default.PropTypes.oneOfType([u.default.PropTypes.string,u.default.PropTypes.number]),title:u.default.PropTypes.any,disabled:u.default.PropTypes.bool})),onChange:u.default.PropTypes.func,value:u.default.PropTypes.any,readOnly:u.default.PropTypes.bool,disabled:u.default.PropTypes.bool},m.defaultProps={extraClass:"",className:"",value:[]},t.Component=m,t.default=(0,h.default)(m)},"./client/src/components/CompositeField/CompositeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?this.renderMultipleActions(e):1===e.length?this.renderSingleAction(e[0]):null}}]),t}(l.PureComponent),g=p.default.propTypes;g.group=c.default.PropTypes.string,b.propTypes=c.default.PropTypes.arrayOf(c.default.PropTypes.shape(g)).isRequired,t.default=b},"./client/src/components/GridFieldActions/GridFieldDropdownAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return e&&Object.keys(e).length>0}function u(e,t){var n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};var r=n.name,o=(0,x.default)((0,D.default)(e),r),i=o&&o.values||{},s=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:i,formIsDirty:(0,P.isDirty)(r,D.default)(e),schemaName:r,tagData:s}}function d(e){return{actions:{schema:(0,j.bindActionCreators)(T,e),reduxForm:(0,j.bindActionCreators)({reset:O.reset,initialize:O.initialize,change:E.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],n={};return!t&&this.state.searchText&&(n[this.props.name]=this.state.searchText.trim()),Object.keys(this.props.formData).forEach(function(t){var r=e.props.formData[t];r&&(n[t]=r)}),n}},{key:"handleChange",value:function(e){var t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});var n=this.props,r=n.schemaName,o=n.formData,i=n.name,s=n.actions;void 0!==o[i]&&s.reduxForm.change(r,i,t)}},{key:"focusInput",value:function(){if(this.state.display!==H.NONE){var e=_.default.findDOMNode(this);if(e){var t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}}}},{key:"focusFirstFormField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input, textarea, select, button";if(this.state.display===H.EXPANDED){var t=_.default.findDOMNode(this);if(t){var n=t.querySelector(".search-form");if(n){var r=n.querySelector(e);r&&(r.focus(),r.select&&r.select())}}}}},{key:"clearFormData",value:function(e){""!==this.state.searchText&&this.setState({searchText:""});var t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){var n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,null),this.props.actions.reduxForm.initialize(n,{},Object.keys(this.props.formData)),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=i({},e,void 0);Array.isArray(t.linkedFields)&&t.linkedFields.forEach(function(e){n[e]=void 0}),this.doSearch(n)}},{key:"focusFormFilter",value:function(e){var t=this,n=this.props.tagData[e],r=n.focusSelector||"[name="+e+"]";this.expand(),setTimeout(function(){return t.focusFirstFormField(r)},50)}},{key:"open",value:function(){this.show(),this.focusInput()}},{key:"hide",value:function(){this.props.onHide?this.props.onHide():this.state.display!==H.NONE&&this.setState({display:H.NONE})}},{key:"show",value:function(){this.state.display!==H.VISIBLE&&this.setState({display:H.VISIBLE});var e=this.props,t=e.schemaName,n=e.formData,r=e.name,o=e.actions;void 0!==n[r]&&o.reduxForm.change(t,r,this.state.searchText)}},{key:"expand",value:function(){this.state.display!==H.EXPANDED&&this.setState({display:H.EXPANDED})}},{key:"toggle",value:function(){switch(this.state.display){case H.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case H.EXPANDED:this.show()}}},{key:"searchTermIsDirty",value:function(){var e=this.state,t=e.searchText,n=e.initialSearchText;return t.trim()!==n.trim()}},{key:"doSearch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.getData(),e),n=t[this.props.name]||"",r=Object.assign({},this.getData(!0),e);this.state.display===H.VISIBLE&&this.state.initialSearchText===n&&this.state.searchText===n||this.setState({display:H.VISIBLE,initialSearchText:n,searchText:n}),this.props.actions.schema.setSchemaStateOverrides(this.props.schemaUrl,null),this.props.actions.reduxForm.initialize(this.props.schemaName,r),this.props.onSearch(t)}},{key:"clearFilters",value:function(){this.clearFormData(),this.focusFirstFormField()}},{key:"clearSearchBox",value:function(){this.clearFormData(),this.focusInput()}},{key:"formatTagData",value:function(){var e=this.props,t=e.tagData,n=e.name;return t&&t[n]&&delete t[n],t?Object.values(t).map(function(e){return{key:e.key,label:e.label,value:e.value}}):[]}},{key:"render",value:function(){var e=this.props,t=e.formSchemaUrl,n=e.forceFilters,r=e.id,i=e.displayBehavior,s=e.identifier,a=e.formIsDirty,l=(e.tagData,o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData"]));if(this.state.display===H.NONE)return i===V.TOGGLABLE?b.default.createElement(L.default,{onToggle:this.show}):b.default.createElement("div",null);var c=r+"_ExtraFields",u=this.state.searchText,d=this.state.display===H.EXPANDED,f=[V.HIDEABLE,V.TOGGLABLE].includes(i),h=a||this.searchTermIsDirty(),m=this.getData(),y=Object.keys(m).length>0;return b.default.createElement(k.default,{onClickOut:this.show,className:"search"},b.default.createElement(A.default,p({},l,{onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:u,hideable:f,expanded:d,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:h,clearable:y,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),b.default.createElement(I.default,{id:c,identifier:s,expanded:d,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:y})))}}]),t}(y.Component);G.propTypes={onSearch:y.PropTypes.func,onHide:y.PropTypes.func,id:y.PropTypes.string.isRequired,display:y.PropTypes.oneOf(Object.values(H)),formSchemaUrl:y.PropTypes.string,filters:y.PropTypes.object,formData:y.PropTypes.object,placeholder:y.PropTypes.string,displayBehavior:y.PropTypes.oneOf(Object.values(V)),term:y.PropTypes.string,name:y.PropTypes.string,forceFilters:y.PropTypes.bool,formIsDirty:y.PropTypes.bool,identifier:y.PropTypes.string,schemaName:y.PropTypes.string,tagHandlers:y.PropTypes.object,borders:y.PropTypes.shape({top:y.PropTypes.bool,right:y.PropTypes.bool,bottom:y.PropTypes.bool,left:y.PropTypes.bool})},G.defaultProps={placeholder:m.default._t("Admin.SEARCH","Search"),display:H.VISIBLE,displayBehavior:V.NONE,filters:{},formData:{},term:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=G,t.hasFilters=c,t.default=(0,g.connect)(u,d)(G)},"./client/src/components/Search/SearchBox.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n576?55:20;return this.state.tagWidth+e}},{key:"calculateSpaceForTags",value:function(){var e=this.state.width;e-=150,e=e-55-52;var t=this.props,n=t.hideable,r=t.showFilters;return n&&(e-=52),r&&(e-=52),e=Math.max(e,0)}},{key:"handleKeyDown",value:function(e){"Enter"===e.key?(e.preventDefault(),this.props.onSearch()):0===e.target.selectionStart&&("ArrowLeft"===e.key||"Backspace"===e.key&&e.target.selectionEnd-e.target.selectionStart==0)&&(e.preventDefault(),this.focusOnLastTag())}},{key:"handleFocus",value:function(){this.state.hasFocus||this.setState({hasFocus:!0}),this.props.onHideFilter&&this.props.onHideFilter()}},{key:"handleBlur",value:function(){this.state.hasFocus&&this.setState({hasFocus:!1})}},{key:"focusOnLastTag",value:function(){var e=T.default.findDOMNode(this);if(e){var t=e.querySelector(".compact-tag-list__visible .tag:last-child");t&&t.focus()}}},{key:"focusOnInput",value:function(){var e=T.default.findDOMNode(this);if(e){var t=e.querySelector("input");t&&t.focus()}}},{key:"renderInput",value:function(){var e,n=this.props,r=n.id,i=n.searchText,s=n.onChange,a=n.placeholder,l=n.name,c=n.borders,u={paddingLeft:this.calculateInputLeftPadding()+"px"},d=Object.assign({},t.defaultProps.borders,c),f="search-box__content-field",h=(0,m.default)("form-control",f,(e={},o(e,f+"--top-border",d.top),o(e,f+"--right-border",d.right),o(e,f+"--bottom-border",d.bottom),o(e,f+"--left-border",d.left),e));return p.default.createElement("input",{"aria-labelledby":r+"_label",type:"search",name:l,placeholder:a,className:h,onKeyDown:this.handleKeyDown,onChange:s,onFocus:this.handleFocus,onBlur:this.handleBlur,value:i,id:r,autoFocus:!0,style:u})}},{key:"renderTags",value:function(){var e=this.props,t=e.tagData,n=e.onTagDelete,r=e.onTagClick,o=e.onToggleFilter;return p.default.createElement("div",{className:"search-box__tags"},p.default.createElement(j.default,{onResize:this.onTagListResize},p.default.createElement(v.default,{onTagDelete:n,onTagClick:r,onHolderFocus:this.focusOnInput,tags:t,onSummary:o,maxSize:this.calculateSpaceForTags(),deletable:!0})))}},{key:"renderEnterHint",value:function(){var e=this;return p.default.createElement("div",{role:"presentation",className:"search-box__enter",onClick:function(t){t.stopPropagation(),t.preventDefault(),e.props.onSearch()}},u.default._t("Admin.ENTER","Enter")," ↵")}},{key:"renderFilterButton",value:function(){var e=this.props,t=e.expanded,n=e.onToggleFilter,r=e.formId,o=(0,m.default)("btn--icon","btn--no-text","font-icon-caret-down-two","search-box__filter-trigger",{collapsed:!t});return p.default.createElement(f.Button,{"aria-expanded":t,"aria-controls":r,"aria-label":u.default._t("Admin.ADVANCED","Advanced"),onClick:n,className:o,title:u.default._t("Admin.ADVANCED","Advanced")})}},{key:"renderHideButton",value:function(){var e=this.props,t=e.id,n=e.onHide;return p.default.createElement(f.Button,{onClick:n,title:u.default._t("Admin.CLOSE","Close"),"aria-label":u.default._t("Admin.CLOSE","Close"),className:"font-icon-cancel btn--no-text btn--icon-lg search-box__cancel","aria-controls":t,"aria-expanded":"true"})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.id,r=e.hideable,o=e.expanded,i=e.showFilters,s=e.dirty,a=e.clearable,l=(0,m.default)("search-box",{"search-box--hideable":r,"search-box--not-hideable":!r,"search-box--has-focus":this.state.hasFocus,"search-box--has-not-focus":!this.state.hasFocus,"search-box--has-filters":i,"search-box--has-not-filters":!i,"search-box--compact":this.state.width<576,"search-box--expanded":o}),c=(s||!a)&&this.state.hasFocus;return p.default.createElement("div",{className:l},p.default.createElement(j.default,{onResize:this.onResize},p.default.createElement("div",{className:"search-box__group"},p.default.createElement(f.Label,{for:n,id:n+"_label",hidden:!0},u.default._t("Admin.SEARCH","Search")),this.renderTags(),this.renderInput(),c&&this.renderEnterHint(),t,p.default.createElement("div",{className:"icon font-icon-search"}),i&&this.renderFilterButton(),r&&this.renderHideButton())))}}]),t}(d.Component);O.propTypes={onSearch:d.PropTypes.func,onToggleFilter:d.PropTypes.func,onHideFilter:d.PropTypes.func,onChange:d.PropTypes.func,onHide:d.PropTypes.func,onTagDelete:d.PropTypes.func,onTagClick:d.PropTypes.func,placeholder:d.PropTypes.string,expanded:d.PropTypes.bool,formId:d.PropTypes.string,id:d.PropTypes.string,searchText:d.PropTypes.string,hideable:d.PropTypes.bool,showFilters:d.PropTypes.bool,name:d.PropTypes.string,dirty:d.PropTypes.bool,clearable:d.PropTypes.bool,tagData:d.PropTypes.arrayOf(b.default)},O.defaultProps={placeholder:u.default._t("Admin.SEARCH","Search"),tagData:[],filters:{},formData:{},term:"",borders:{top:!1,right:!1,bottom:!0,left:!0}},t.Component=O,t.default=O},"./client/src/components/Search/SearchForm.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var a=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=n("./client/src/components/Search/utilities/genericDateTagHandler.js"),i=function(e){return e&&e.__esModule?e:{default:e}}(o),s=function(e,t,n){if(!Array.isArray(t)||0===t.length)return!1;var r=n.state.fields.find(function(t){return t.name===e});return!(!r||!r.source)&&(t.map(function(e){var t=r.source.find(function(t){return t.value.toString()===e.toString()});return t&&t.title?t.title:e}).join(", ")||!1)},a={Date:(0,i.default)("ll"),Time:(0,i.default)("LT"),Datetime:(0,i.default)("lll"),Hidden:function(){return!1},SingleSelect:function(e,t,n){if(void 0===e.value)return!1;var r=s(e.key,[e.value],n);return!!r&&Object.assign({},e,{value:r})},Boolean:function(e){return!!e.value&&(e.value,r(e,["value"]))},MultiSelect:function(e,t,n){var r=s(e.key,e.value,n);return!!r&&Object.assign({},e,{value:r})},default:function(e){return!!e.value&&e}};t.default=a},"./client/src/components/Search/utilities/genericDateTagHandler.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=function(e){return function(t,n){var r=n.lang;if(!t.value)return!1;if(t.value&&r){o.default.locale(r);var i=(0,o.default)(t.value);if(i.isValid())return Object.assign({},t,{value:i.format(e)})}return t}};t.default=i},"./client/src/components/Search/utilities/mapFormSchemaToTags.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./client/src/components/Search/utilities/defaultTagHandlers.js"),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=function(e,t){var n=t.key,r=t.value;return""+e+(t.label.toLowerCase()||n)+" "+(r||"")+" "},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.metadata.loading)return{};var r=void 0,s=function(n){var o={key:n.name,label:n.title,value:t[n.name]};return("function"==typeof r["#"+o.key]?r["#"+o.key]:"function"==typeof r[n.schemaType]?r[n.schemaType]:r.default)(o,n,e,t)},a=function(e,t){var n=t.children;if(!Array.isArray(n)||0===n.length)return!1;var r=n.map(s).filter(function(e){return!1!==e}).reduce(i,"").trim(),o=n.map(function(e){return e.name}),a="[name="+n[0].name+"]";return!!r&&Object.assign({},e,{value:r,linkedFields:o,focusSelector:a})};r=Object.assign({},o.default,{Structural:a},n);var l=e.schema.fields,c=l.map(s).filter(function(e){return!1!==e}),u={};return c.forEach(function(e){u[e.key]=e}),u};t.default=s},"./client/src/components/SingleSelectField/SingleSelectField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t1}},{key:"handleChange",value:function(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{id:this.props.id,value:e.target.value})}},{key:"render",value:function(){return c.default.createElement(p.Input,this.getInputProps())}}]),t}(l.Component);f.propTypes={extraClass:c.default.PropTypes.string,id:c.default.PropTypes.string,name:c.default.PropTypes.string.isRequired,onChange:c.default.PropTypes.func,value:c.default.PropTypes.oneOfType([c.default.PropTypes.string,c.default.PropTypes.number]),readOnly:c.default.PropTypes.bool,disabled:c.default.PropTypes.bool,placeholder:c.default.PropTypes.string,type:c.default.PropTypes.string,autoFocus:c.default.PropTypes.bool,attributes:c.default.PropTypes.oneOfType([c.default.PropTypes.object,c.default.PropTypes.array])},f.defaultProps={value:"",extraClass:"",className:"",type:"text",attributes:{}},t.Component=f,t.default=(0,d.default)(f)},"./client/src/components/TimeField/TimeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.data.readUsageEndpoint||{},n=t.method,r=t.url;e.loadUsedOn(e.identifier,n,r)}},{key:"render",value:function(){return l.default.createElement(e,this.props)}}]),n}(a.Component);t.propTypes={identifier:a.PropTypes.string,loading:a.PropTypes.bool,data:a.PropTypes.oneOfType([a.PropTypes.array,a.PropTypes.shape({recordClass:a.PropTypes.string,recordId:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number]),readUsageEndpoint:a.PropTypes.shape({url:a.PropTypes.string,method:a.PropTypes.string})})]),usedOn:a.PropTypes.array};var n=function(e,t){var n=t.data,r=n.recordClass,o=n.recordId,i=r&&o?r+"#"+o:"",s=e.usedOn;return{identifier:i,loading:s.loading.includes(i),usedOn:s.usedOn[i]||null,error:s.errors[i]||null}},d=(0,c.connect)(n,{loadUsedOn:u.loadUsedOn})(t);return d.Component=t,d};t.default=d},"./client/src/containers/App/App.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=n(6),s=function(e){return o.default.createElement("div",{className:"app"},e.children)};t.default=(0,i.provideInjector)(s)},"./client/src/containers/Form/Form.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r'),e("body").append(t)),t.open(),!1}}),e(".add-to-campaign-modal .add-to-campaign-modal__nav-link").entwine({onclick:function(t){t.preventDefault();var n=e(t.target);window.location=n.attr("href")}}),e("#add-to-campaign__dialog-wrapper").entwine({onunmatch:function(){this._clearModal()},open:function(){this._renderModal(!0)},close:function(){this._renderModal(!1)},_renderModal:function(t){var n=this,r=function(){return n.close()},o=function(){return n._handleSubmitModal.apply(n,arguments)},s=e("form.cms-edit-form :input[name=ID]").val(),a=window.ss.store,l=a.getState().config.sections.find(function(e){return"SilverStripe\\CMS\\Controllers\\CMSPageEditController"===e.name}),u=l.form.AddToCampaignForm.schemaUrl+"/"+s,p=i.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign");d.default.render(c.default.createElement(f,{title:p,isOpen:t,onSubmit:o,onClosed:r,schemaUrl:u,bodyClassName:"modal__dialog",className:"add-to-campaign-modal",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good",identifier:"Admin.AddToCampaign"}),this[0])},_clearModal:function(){d.default.unmountComponentAtNode(this[0])},_handleSubmitModal:function(e,t,n){return n()}})})},"./client/src/legacy/ConfirmedPasswordField.js":function(e,t,n){"use strict";var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r);(0,o.default)(document).on("click",".confirmedpassword .showOnClick a",function(){var e=(0,o.default)(".showOnClickContainer",(0,o.default)(this).parent());return e.toggle("fast",function(){e.toggleClass("d-none").find('input[type="hidden"]').val(e.hasClass("d-none")?0:1)}),!1})},"./client/src/legacy/DateField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),i=r(o),s=n(2),a=r(s),l=n(14),c=r(l),u=n(18),d=r(u);n("./thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),i.default.entwine("ss",function(e){e("input[type=date]").entwine({onadd:function(){if(!d.default.inputtypes.date&&!(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))){var t=e("",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L"))}this.val(r);var i=a.default.inject(a.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L")});this.attr("placeholder",i),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e)for(var n=["L","YYYY-MM-DD"],r=0;r",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L LT"))}this.val(r);var i=a.default.inject(a.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L LT")});this.attr("placeholder",i),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e){var n=(0,c.default)(e,["L LT",c.default.ISO_8601]);n.isValid()&&(t=n.format("YYYY-MM-DDTHH:mm:ss"))}this.parent().find("input[type=hidden]").val(t)}})})},"./client/src/legacy/GridField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=Object.assign||function(e){for(var t=1;t'),this.find("tbody tr").each(function(){e(this).find("td:last").attr("colspan",2)});var n=e('
');e(".grid-field__filter-header th:last .action").each(function(){e(this).detach(),n.append(e(this))}),e(".grid-field__filter-header").append(n)},injectSearchButton:function(e){var t=this.find(".grid-field__filter-header").length>0,n=void 0;e?(n='',this.addClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden"),t||this.find(":button[name=showFilter]").hide()):(n='',this.removeClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").addClass("grid-field__search-holder--hidden")),t&&this.find(".sortable-header th:last").html(n)}}),e(".grid-field *").entwine({getGridField:function(){return this.closest(".grid-field")}}),e(".gridfield-actionmenu__container").entwine({Timer:null,Component:null,Actions:null,onmatch:function(){this._super();var t=[];e(".action-menu--handled",this.parent()).each(function(){var n=e(this).detach();t.push(n)}),this.setActions(t);var n=this.closest(".cms-content").attr("id"),r=n?{context:n}:{},o=(0,m.loadComponent)("GridFieldActions",r);this.setComponent(o),this.refresh()},onunmatch:function(){this._super();var t=this[0];t&&f.default.unmountComponentAtNode(t);var n=this.getActions(),r=this.parent();n&&e(n).each(function(){e(this).appendTo(r)})},refresh:function(){var e=this.data("schema"),t=this.getComponent();f.default.render(d.default.createElement(t,{schema:e}),this[0])}}),e(".grid-field :button[name=showFilter]").entwine({onclick:function(e){this.closest(".grid-field").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden").find(":input:first").focus(),this.closest(".grid-field").addClass("show-filter"),this.parent().html(''),e.preventDefault()}}),e(".grid-field .ss-gridfield-item").entwine({onclick:function(t){if(t.target.classList.contains("action-menu__toggle"))return this._super(t),!1;if(e(t.target).closest(".action").length)return this._super(t),!1;var n=this.find(".edit-link, .view-link");n.length&&this.getGridField().showDetailView(n.prop("href"))},onmouseover:function(){this.find(".edit-link, .view-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".grid-field .action.action_import:button").entwine({onclick:function(e){e.preventDefault(),this.openmodal()},onmatch:function(){this._super(),"open"===this.data("state")&&this.openmodal()},onunmatch:function(){this._super()},openmodal:function(){function t(){o.removeClass("show"),n.removeClass("show"),setTimeout(function(){o.remove()},150)}var n=e(this.data("target")),r=e(this.data("modal"));n.length<1?(n=r,n.appendTo(document.body)):n.innerHTML=r.innerHTML;var o=e(".modal-backdrop");o.length<1&&(o=e(''),o.appendTo(document.body)),n.find("[data-dismiss]").add(".modal-backdrop").on("click",function(){t()}),e(document).on("keydown",function(e){27===e.keyCode&&t()}),setTimeout(function(){o.addClass("show"),n.addClass("show")},0)}}),e(".grid-field .action:button").entwine({onclick:function(t){var n="show",r=!0;if(this.is(":disabled"))return void t.preventDefault();!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(n="hidden"),(this.hasClass("ss-gridfield-pagination-action")||this.hasClass("grid-field__sort"))&&(r=!1);var o=function(t,n,r){var o=r.getResponseHeader("X-Message-Text"),i=r.getResponseHeader("X-Message-Type");o&&i&&(e("#Form_EditForm_error").addClass(i),e("#Form_EditForm_error").html(o),e("#Form_EditForm_error").show())};this.getGridField().reload({data:[{name:this.attr("name"),value:this.val(),filter:n,triggerChange:r}]},o),t.preventDefault()},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),r=this.closest("form"),o=r.find(":input.gridstate").serialize(),i=r.find('input[name="SecurityID"]').val();o+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),i&&(o+="&SecurityID="+encodeURIComponent(i)),window.location.search&&(o=window.location.search.replace(/^\?/,"")+"&"+o);var s=-1==n.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(n.data("url")+s+o,e("base").attr("href"))}}),e(".grid-field .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),n=""!==t.val(),r=e.is(":disabled");(n&&r||!n&&!r)&&e.attr("disabled",!r)}}),e(".grid-field .grid-field__col-compact .action--delete, .grid-field .grid-field__col-compact .action--archive, .cms-edit-form .btn-toolbar .action--delete, .cms-edit-form .btn-toolbar .action--archive").entwine({onclick:function(t){var n=e(this).hasClass("action--archive")?c.default._t("Admin.ARCHIVECONFIRMMESSAGE"):c.default._t("Admin.DELETECONFIRMMESSAGE");if(!confirm(n))return t.preventDefault(),!1;this._super(t)}}),e(".grid-field .grid-print-button.action:button").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var t=this.actionurl();return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus(),(this.contentWindow||this).print()})},onunmatch:function(){this._super()}}),e(".grid-field .action.no-ajax, .grid-field .no-ajax .action:button").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".grid-field[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".grid-field[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".js-injector-boot .grid-field .grid-field__search-holder").entwine({Component:null,onmatch:function(){this._super(),this.prependTo(this.parent());var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,m.loadComponent)("Search",t);this.setComponent(n),this.refresh()},onunmatch:function(){this._super();var e=this[0];e&&f.default.unmountComponentAtNode(e)},close:function(){var e=this.data("schema"),t=[{name:e.clearAction,value:"",filter:"hidden",triggerChange:!1}];this.getGridField().reload({data:t})},search:function(e){var t=this.data("schema"),n=[{name:t.searchAction,value:"",filter:"show",triggerChange:!1}],r=!0,o=!1,s=void 0;try{for(var a,l=Object.entries(e)[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var c=a.value,u=i(c,2),d=u[0],p=u[1];if(p){var f="filter["+t.gridfield+"]["+d+"]";n.push({name:f,value:p})}}}catch(e){o=!0,s=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw s}}this.getGridField().reload({data:n})},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},i=function(t){return e.search(t)};f.default.render(d.default.createElement(n,o({id:t.gridfield+"Search",identifier:t.gridfield+"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",onHide:r,onSearch:i},t)),this[0])}}),e(".js-injector-boot .grid-field .search-box__content-field").entwine({onkeydown:function(e){"Enter"===e.key&&e.preventDefault()}}),e(".grid-field .grid-field__filter-header :input").entwine({onmatch:function(){var e=this.closest(".extra").find(".ss-gridfield-button-filter"),t=this.closest(".extra").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(e){if(!this.closest(".ss-gridfield-button-reset").length){var t=this.closest(".extra").find(".ss-gridfield-button-filter"),n=this.closest(".extra").find(".ss-gridfield-button-reset");if("13"==e.keyCode){var r=this.closest(".grid-field__filter-header").find(".ss-gridfield-button-filter"),o="show";return!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(o="hidden"),this.getGridField().reload({data:[{name:r.attr("name"),value:r.val(),filter:o,triggerChange:!1}]}),!1}t.addClass("hover-alike"),n.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,n){var r=e(this.element);e(this.element).closest("form"),e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(r).data("searchUrl"),data:encodeURIComponent(r.attr("name"))+"="+encodeURIComponent(r.val()),success:n,error:function(e){alert(c.default._t("Admin.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,n){var r=e('');r.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(r),e(this).closest(".grid-field").find(".action_gridfield_relationadd").removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){t.preventDefault();var n=parseInt(e(this).val(),10),r=e(this).getGridField();return r.setState("GridFieldPaginator",{currentPage:n}),r.reload(),!1}}})})},"./client/src/legacy/HtmlEditorField.js":function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _jquery=__webpack_require__(1),_jquery2=_interopRequireDefault(_jquery),ss=void 0!==window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(e){editorID=e,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var e="#"+editorID,t=(0,_jquery2.default)(e).data("config"),n=this;return t.selector=e,t.setup=function(e){e.on("change",function(){n.save()})},t},save:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getInstance();t.save(),e.silent||(0,_jquery2.default)(t.getElement()).trigger("change")},create:function(){var e=this.getConfig();void 0!==e.baseURL&&(tinymce.EditorManager.baseURL=e.baseURL),tinymce.init(e)},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().setContent(e,t)},insertContent:function(e,t){this.getInstance().insertContent(e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t,n){if(n){var r=this.getInstance().dom.create("a",e,n);this.getInstance().selection.setNode(r)}else this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback,cu=tinyMCE.settings.convert_urls;return cb&&(href=eval(cb+"(href, node, true);")),cu&&href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers.default=ss.editorWrappers.tinyMCE,_jquery2.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),t.init(this.attr("id")),this._super()},onmatch:function(){this.getEditor()||this.onadd(),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save({silent:!0}),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openEmbedDialog:function(){this.openDialog("embed")},openDialog:function(t){if("media"===t&&window.InsertMediaModal){var n=e("#insert-media-react__dialog-wrapper");return n.length||(n=e(''),e("body").append(n)),n.setElement(this),void n.open()}if("embed"===t&&window.InsertEmbedModal){var r=e("#insert-embed-react__dialog-wrapper");return r.length||(r=e(''),e("body").append(r)),r.setElement(this),void r.open()}throw new Error("Dialog named "+t+" is not available.")}})})},"./client/src/legacy/LeftAndMain.ActionTabSet.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){e(".cms-container").find("iframe").each(function(t,n){try{e(n).contents().off("click.ss-ui-action-tabset")}catch(e){console.warn("Unable to access iframe, possible https mis-match")}}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){var r,o=this,i=e(".cms-container").find("iframe");r=function(t){var n,i;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(o).length||n.length||(o.tabs("option","active",!1),i=e(".cms-container").find("iframe"),i.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",r)}),e(document).off("click.ss-ui-action-tabset",r))},e(document).on("click.ss-ui-action-tabset",r),i.length>0&&i.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",r)})},riseUp:function(t,n){var r,o,i,s,a,l,c,u,d;return r=e(this).find(".ui-tabs-panel").outerHeight(),o=e(this).find(".ui-tabs-nav").outerHeight(),i=e(window).height()+e(document).scrollTop()-o,s=e(this).find(".ui-tabs-nav").offset().top,a=n.newPanel,l=n.newTab,s+r>=i&&s-r>0?(this.addClass("rise-up"),null!==l.position()&&(c=-a.outerHeight(),u=a.parents(".toolbar--south"),u&&(d=l.offset().top-u.offset().top,c-=d),e(a).css("top",c+"px"))):(this.removeClass("rise-up"),null!==l.position()&&e(a).css("bottom","100%")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")}},ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},"./client/src/legacy/LeftAndMain.BatchActions.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),o=t(r),i=n(2),s=t(i);o.default.entwine("ss.tree",function(t){t("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return t(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},onmatch:function(){var e=this;e.getTree().bind("load_node.jstree",function(t,n){e.refreshSelected()})},onunmatch:function(){this.getTree().unbind("load_node.jstree")},registerDefault:function(){this.register("publish",function(e){return!!confirm(s.default.inject(s.default._t("Admin.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:e.length}))&&e}),this.register("unpublish",function(e){return!!confirm(s.default.inject(s.default._t("Admin.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:e.length}))&&e}),this.register("delete",function(e){return!!confirm(s.default.inject(s.default._t("Admin.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to delete these pages?\n\nThese pages and all of their children pages will be deleted and sent to the archive."),{num:e.length}))&&e}),this.register("restore",function(e){return!!confirm(s.default.inject(s.default._t("Admin.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:e.length}))&&e})},onadd:function(){this.registerDefault(),this._super()},register:function(e,t){this.trigger("register",{type:e,callback:t});var n=this.getActions();n[e]=t,this.setActions(n)},unregister:function(e){this.trigger("unregister",{type:e});var t=this.getActions();t[e]&&delete t[e],this.setActions(t)},refreshSelected:function(n){var r=this,o=this.getTree(),i=this.getIDs(),s=[],a=t(".cms-content-batchactions-button"),l=this.find(":input[name=Action]").val();null==n&&(n=o);for(var c in i)t(t(o).getNodeByID(c)).addClass("selected").attr("selected","selected");if(!l||-1==l||!a.hasClass("active"))return void t(n).find("li").each(function(){t(this).setEnabled(!0)});t(n).find("li").each(function(){s.push(t(this).data("id")),t(this).addClass("treeloading").setEnabled(!1)});var u=t.path.parseUrl(l),d=u.hrefNoSearch+"/applicablepages/";d=t.path.addSearchParams(d,u.search),d=t.path.addSearchParams(d,{csvIDs:s.join(",")}),e.getJSON(d,function(o){e(n).find("li").each(function(){t(this).removeClass("treeloading");var e=t(this).data("id");0==e||t.inArray(e,o)>=0?t(this).setEnabled(!0):(t(this).removeClass("selected").setEnabled(!1),t(this).prop("selected",!1))}),r.serializeFromTree()})},serializeFromTree:function(){var e=this.getTree(),t=e.getSelectedIDs();return this.setIDs(t),!0},setIDs:function(e){this.find(":input[name=csvIDs]").val(e?e.join(","):null)},getIDs:function(){var e=this.find(":input[name=csvIDs]").val();return e?e.split(","):[]},onsubmit:function(n){var r=this,o=this.getIDs(),i=this.getTree(),a=this.getActions();if(!o||!o.length)return alert(s.default._t("Admin.SELECTONEPAGE","Please select at least one page")),n.preventDefault(),!1;var l=this.find(":input[name=Action]").val();if(!l)return n.preventDefault(),!1;var c=l.split("/").filter(function(e){return!!e}).pop();if(a[c]&&(o=a[c].apply(this,[o])),!o||!o.length)return n.preventDefault(),!1;this.setIDs(o),i.find("li").removeClass("failed");var u=this.find(":submit:first");return u.addClass("loading"),e.ajax({url:l,type:"POST",data:this.serializeArray(),complete:function(e,t){u.removeClass("loading"),i.jstree("refresh",-1),r.setIDs([]),r.find(":input[name=Action]").val("").change();var n=e.getResponseHeader("X-Status");n&&statusMessage(decodeURIComponent(n),"success"==t?"good":"bad")},success:function(e,n){var r,o;if(e.modified){var s=[];for(r in e.modified)o=i.getNodeByID(r),i.jstree("set_text",o,e.modified[r].TreeTitle),s.push(o);t(s).effect("highlight")}if(e.deleted)for(r in e.deleted)o=i.getNodeByID(r),o.length&&i.jstree("delete_node",o);if(e.error)for(r in e.error)o=i.getNodeByID(r),t(o).addClass("failed")},dataType:"json"}),n.preventDefault(),!1}}),t(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var e=t(".cms-tree"),n=t("#Form_BatchActionsForm");this._super(),this.data("active")?(e.addClass("multiple"),e.removeClass("draggable"),n.serializeFromTree()):(e.removeClass("multiple"),e.addClass("draggable")),t("#Form_BatchActionsForm").refreshSelected()}}),t("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(e){t(e.target.form).find(":submit"),t(e.target).val(),t("#Form_BatchActionsForm").refreshSelected(),this.trigger("chosen:updated"),this._super(e)}})})}).call(t,n(1))},"./client/src/legacy/LeftAndMain.Content.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".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()}}),e(".cms-content .cms-tree").entwine({onadd:function(){var t=this;this._super(),this.bind("select_node.jstree",function(n,r){var o=r.rslt.obj,i=t.find(":input[name=ID]").val(),s=r.args[2],a=e(".cms-container");if(!s)return!1;if(e(o).hasClass("disabled"))return!1;if(e(o).data("id")!=i){var l=e(o).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(o).find("a:first"))&&(l=l=e.path.makeUrlAbsolute(l,e("base").attr("href"))),document.location.search&&(l=e.path.addSearchParams(l,document.location.search.replace(/^\?/,""))),a.loadPanel(l)):t.removeForm()}})}}),e(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),e(".cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto");var e=parseInt(this.css("padding-top"),10),t=parseInt(this.css("padding-bottom"),10);this.height(this.innerHeight()-e-t)}})})},"./client/src/legacy/LeftAndMain.EditForm.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),o=t(r),i=n(2),s=t(i),a=window.onbeforeunload;window.onbeforeunload=function(e){var t=(0,o.default)(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")&&!t.is(".discardchanges")?s.default._t("Admin.CONFIRMUNSAVEDSHORT"):"function"==typeof a?a():void 0},o.default.entwine("ss",function(e){e(".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 e in{action:!0,method:!0,enctype:!0,name:!0}){var t=this.find(":input[name=_form_"+e+"]");t&&(this.attr(e,t.val()),t.remove())}this.setValidationErrorShown(!1),this._super()},"from .cms-tabset":{onafterredrawtabs:function(){if(this.hasClass("validationerror")){var t=this.find(".message.validation, .message.required").first().closest(".tab");e(".cms-container").clearCurrentTabState();var n=t.closest(".ss-tabset");n.length||(n=t.closest(".cms-tabset")),n.length?n.tabs("option","active",t.index(".tab")):this.getValidationErrorShown()||(this.setValidationErrorShown(!0),l(ss.i18n._t("Admin.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;if(this.find(".btn-toolbar :submit.btn--loading.loading").length>0)return!0;var e=confirm(s.default._t("Admin.CONFIRMUNSAVED"));return e&&this.addClass("discardchanges"),e},onsubmit:function(e,t){if("_blank"!=this.prop("target"))return t&&this.closest(".cms-container").submitForm(this,t),!1},validate:function(){return this.trigger("validate",{isValid:!0}),!0},"from .htmleditor":{oneditorinit:function(t){var n=this,r=e(t.target).closest(".field.htmleditor");r.find("textarea.htmleditor").getEditor().getInstance().onClick.add(function(e){n.saveFieldFocus(r.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(t){this.saveFieldFocus(e(t.target).attr("id"))},onfocus:function(t){this.saveFieldFocus(e(t.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(t){var n=e(t.target).closest(".field.treedropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function(t){var n=e(t.target).closest(".field.dropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(t){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var n=e(this).attr("id"),r=[];if(r.push({id:n,selected:t}),r)try{window.sessionStorage.setItem(n,JSON.stringify(r))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw e}}},restoreFieldFocus:function(){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var t,n,r,o,i,s=this,a=void 0!==window.sessionStorage&&window.sessionStorage,l=a?window.sessionStorage.getItem(this.attr("id")):null,c=!!l&&JSON.parse(l),u=0!==this.find(".ss-tabset").length;if(a&&c.length>0){if(e.each(c,function(n,r){s.is("#"+r.id)&&(t=e("#"+r.selected))}),e(t).length<1)return void this.focusFirstInput();if(n=e(t).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),r="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),u&&r!==n)return;o=e(t).closest(".togglecomposite"),o.length>0&&o.accordion("activate",o.find(".ui-accordion-header")),i=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),i=e(t).position().top),e(t).focus(),i>e(window).height()/2&&s.find(".cms-content-fields").scrollTop(i)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),e(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function(e){return this.is(":disabled")?(e.preventDefault(),!1):!1===this._super(e)||e.defaultPrevented||e.isDefaultPrevented()?void 0:(this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),e(".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()}}),e(".cms-edit-form .btn-toolbar button[name=action_doUnpublish].btn.action").entwine({onclick:function(e){var t=this.data("owners");if(t&&parseInt(t)>0){var n=[s.default.inject(s.default._t("Admin.OWNED_WARNING_1","You are unpublishing content that is being used in {count} other published section(s)."),{count:t}),s.default._t("Admin.OWNED_WARNING_2","This could cause a published page to have missing components on the live site."),s.default._t("Admin.OWNED_WARNING_3","Do you want to unpublish anyway?")];window.confirm(n.join("\n\n"))?this._super():e.preventDefault()}else this._super()}}),e(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var e=this.find("> ul:first");1==e.children("li").length&&e.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}}),e('.cms-edit-form [name="CanViewType"], .cms-edit-form [name="CanEditType"], .cms-edit-form [name="CanCreateTopLevelType"]').entwine({onmatch:function(){"OnlyTheseUsers"===this.val()&&(this.is(":checked")?this.showList(!0):this.hideList(!0))},onchange:function(e){"OnlyTheseUsers"===e.target.value?this.showList():this.hideList()},showList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");t.addClass("field--merge-below"),e?n.show().css("overflow","visible"):n.slideDown(function(){n.css("overflow","visible")})},hideList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");n.css("overflow","hidden"),e?(n.hide().css("display","none"),t.removeClass("field--merge-below")):n.slideUp(function(){t.removeClass("field--merge-below")})}})});var l=function(t){e.noticeAdd({text:t,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(t,n(1))},"./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-description-toggle").entwine({onadd:function(){var e=!1,t=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),n=this.find(".cms-description-trigger"),r=this.find(".description");this.hasClass("description-toggle-enabled")||(0===n.length&&(n=this.find(".middleColumn").first().after('').next()),this.addClass("description-toggle-enabled"),n.on("click",function(){r[e?"hide":"show"](),e=!e}),r.hide())}})})},"./client/src/legacy/LeftAndMain.FieldHelp.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var e=this.find(".description");e.length&&(this.attr("title",e.text()).tooltip({content:e.html()}),e.remove())}}),e(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},"./client/src/legacy/LeftAndMain.Menu.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,r){e(".cms-menu__list").children("li").each(function(){t?e(this).children("ul").each(function(){e(this).removeClass("collapsed-flyout"),e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))}):e(this).children("ul").each(function(){e(this).addClass("collapsed-flyout"),e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)})}),this.toggleFlyoutState(t),this._super(t,n,r)},toggleFlyoutState:function(t){if(t)e(".collapsed").find("li").show(),e(".cms-menu__list").find(".child-flyout-indicator").hide();else{e(".collapsed-flyout").find("li").each(function(){e(this).hide()});var n=e(".cms-menu__list ul.collapsed-flyout").parent();0===n.children(".child-flyout-indicator").length&&n.append('').fadeIn(),n.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&void 0!==(n=e.cookie("cms-menu-sticky"))&&null!==n&&(t="true"===n),t},setPersistedStickyState:function(t){void 0!==e.cookie&&e.cookie("cms-menu-sticky",t,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var t=this.getPersistedCollapsedState(),n=e(".cms-menu").getPersistedStickyState(),r=this.siteTreePresent();return void 0===t?r:t!==r&&n?t:r},onadd:function(){var t=this;setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),e(".cms-menu__list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(e){var t=e.getResponseHeader("X-Controller");if(t){var n=this.find("li#Menu-"+t.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function(e,t){this.updateMenuFromResponse(t.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,t){this.updateMenuFromResponse(t.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(t){this.toggleClass("collapsed",e(t.target).hasClass("collapsed")),e(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||e(".toggle-children.opened").closest("li").addClass("opened")}},updateItems:function(){var t=this.find("#Menu-CMSMain");t[t.is(".current")?"show":"hide"]();var n=e(".cms-content input[name=ID]").val();n&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).setRecordID(n)})}}),e(".cms-menu__list li").entwine({toggleFlyout:function(t){var n=e(this);if(n.children("ul").first().hasClass("collapsed-flyout"))if(t){if(!n.children("ul").first().children("li").first().hasClass("clone")){var r=n.clone();r.addClass("clone").css({}),r.children("ul").first().remove(),r.find("span").not(".text").remove(),r.find("a").first().unbind("click"),n.children("ul").prepend(r)}e(".collapsed-flyout").show(),n.addClass("opened"),n.children("ul").find("li").fadeIn("fast")}else r&&r.remove(),e(".collapsed-flyout").hide(),n.removeClass("opened"),n.find("toggle-children").removeClass("opened"),n.children("ul").find("li").hide()}}),e(".cms-menu__list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu__list .toggle").entwine({onclick:function(t){t.preventDefault(),e(this).toogleFlyout(!0)}}),e(".cms-menu__list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append(''),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var e=this.getMenuItem();e&&e.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 e=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),e){var t=e.siblings();e.addClass("current"),t.removeClass("current").close(),t.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),e(".cms-menu__list *").entwine({getMenu:function(){return this.parents(".cms-menu__list:first")}}),e(".cms-menu__list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),e(".cms-menu__list li a").entwine({onclick:function(t){var n=e.path.isExternal(this.attr("href"));if(!(t.which>1||n)&&"_blank"!=this.attr("target")){t.preventDefault();var r=this.getMenuItem(),o=this.attr("href");n||(o=e("base").attr("href")+o);var i=r.find("li");i.length?i.first().find("a").click():document.location.href=o,r.select()}}}),e(".cms-menu__list li .toggle-children").entwine({onclick:function(e){return this.closest("li").toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu__list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle").entwine({onadd:function(){var t=!!e(".cms-menu").getPersistedStickyState();this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function(e){this.next(".sticky-status-indicator").text(e?"fixed":"auto")},onclick:function(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),r=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&!1===r&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(r),this.toggleCSS(r),this.toggleIndicator(r),this._super()}})})},"./client/src/legacy/LeftAndMain.MobileMenuToggle.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),i=r(o),s=n("./client/src/components/MobileMenuToggle/MobileMenuToggleContainer.js"),a=r(s),l=n("./client/src/state/mobileMenu/MobileMenuActions.js"),c=n(7),u=r(c);i.default.entwine("ss",function(e){e(".js-react-boot").entwine({onmatch:function(){var t=e(".cms-mobile-menu-toggle-wrapper");t.length>0&&u.default.render(React.createElement(a.default,{store:window.ss.store,controls:"cms-menu"}),t[0]);var n=window.ss.store,r=e(".cms-menu"),o=e(".cms-menu-mobile-overlay");n.subscribe(function(){var e=n.getState(),t=e.mobileMenu.isOpen;r.toggleClass("cms-menu--open",t).attr("aria-expanded",t),o.attr("aria-expanded",t)})}}),e(".cms-menu-mobile-overlay").entwine({onclick:function(){window.ss.store.dispatch((0,l.closeMobileMenu)())}})})},"./client/src/legacy/LeftAndMain.Panel.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e.entwine.warningLevel=e.entwine.WARN_LEVEL_BESTPRACTISE,e(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==e.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var t,n;return this.canSetCookie()&&void 0!==(n=e.cookie("cms-panel-collapsed-"+this.attr("id")))&&null!==n&&(t="true"===n),t},setPersistedCollapsedState:function(t){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),t,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var e=this.getPersistedCollapsedState();return void 0===e&&(e=this.hasClass("collapsed")),e},onadd:function(){var t,n;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(n=e("").append('»').append('«'),this.append(n)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),t=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(t.length?t.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(e,t,n){var r,o;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),r=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(r),o=this.find(".cms-panel-content-collapsed"),o.length&&(this.find(".cms-panel-content")[e?"show":"hide"](),this.find(".cms-panel-content-collapsed")[e?"hide":"show"]()),!1!==n&&this.setPersistedCollapsedState(!e),this.trigger("toggle",e),this.trigger(e?"expand":"collapse")},expandPanel:function(e){(e||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(e){!e&&this.hasClass("collapsed")||this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),e(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},"./client/src/legacy/LeftAndMain.Preview.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),i=r(o),s=n(2),a=r(s);i.default.entwine("ss.preview",function(e){e(".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(t,n){var r=this,o=this._getNavigatorStates();return!1!==n&&e.each(o,function(e,n){r.saveState("state",t)}),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var r=e(".cms-container").entwine(".ss");if("split"==t)r.splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)r.contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;r.previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return!1!==n&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){return this.getSizes(),this.setCurrentSizeName(e),this.removeClass("auto desktop tablet mobile").addClass(e),this.saveState("size",e),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.getCurrentStateName();t&&this.find(".cms-preview-states").changeVisibleState(t);var n=e(".cms-container").entwine(".ss").getLayoutOptions();return n&&e(".preview-mode-selector").changeVisibleMode(n.mode),this.getCurrentSizeName()&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(e,t){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+e,t)},loadState:function(e){if(this._supportsLocalStorage())return window.localStorage.getItem("cms-preview-state-"+e)},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),e.browser.msie&&e.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){var t=e("#FontFixStyleElement");return t.length||(t=e('').appendTo("head")),t},onadd:function(){var t=this,n=this.find("iframe");n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),e.browser.msie&&8===parseInt(e.browser.version,10)&&n.bind("readystatechange",function(e){"interactive"==n[0].readyState&&(t.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){t.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this._unblock(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var e,t,n=new Date;try{return(e=window.localStorage).setItem(n,n),t=e.getItem(n)==n,e.removeItem(n),t&&e}catch(e){console.warn("localStorge is not available due to current browser / system settings.")}},onforcecontent:function(){this.changeMode("content",!1)},onenable:function(){var t=e(".preview-mode-selector");t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){var t=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){return this.find(".preview-note").show(),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.find(".preview-note").hide(),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var t,n;return e(".cms-previewable").length?(t=this.loadState("mode"),n=this.loadState("size"),this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw(),t&&this.changeMode(t),n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var e=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){return e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]");return n.length?{name:t,url:n.attr("href"),active:n.hasClass("active")}:null})},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var t=this._getNavigatorStates(),n=this.getCurrentStateName(),r=null;t&&(r=e.grep(t,function(e,t){return n===e.name||!n&&e.active}));var o=null;if(r[0]?o=r[0].url:t.length?(this.setCurrentStateName(t[0].name),o=t[0].url):this.setCurrentStateName(null),o){var i=o.split("#"),s=i.shift().split(/[?&]/),a=s.shift();s.push("CMSPreview=1"),i=i.length?"#"+i.join("#"):"",o=a+"?"+s.join("&")+i}return this.is(".column-hidden")?(this.setPendingURL(o),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),o?(this._loadUrl(o),this._unblock()):this._block()),this},_moveNavigator:function(){var t=e(".cms-preview .cms-preview-controls");e(".cms-edit-form .cms-navigator").length&&t.length?t.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var t;e(".cms-container");try{t=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(t){var n=e(t).find("meta[name=x-page-id]").attr("content"),r=e(t).find("meta[name=x-cms-edit-link]").attr("content"),o=e(".cms-content");n&&o.find(":input[name=ID]").val()!=n&&e(".cms-container").entwine(".ss").loadPanel(r)}}},_adjustIframeForPreview:function(){var e,t=this.find("iframe")[0];if(t){try{e=t.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(e){for(var n=e.getElementsByTagName("A"),r=0;r'):this.parent().append('')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})})},"./client/src/legacy/LeftAndMain.Tree.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss.tree",function(e){e(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function(){if(this._super(),!e.isNumeric(this.data("jstree_instance_id"))){var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));var n=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(t,r){n.setIsLoaded(!0),r.inst._set_settings({html_data:{ajax:{url:n.data("urlTree"),data:function(t){var r=n.data("searchparams")||[];return r=e.grep(r,function(e,t){return"ID"!=e.name&&"value"!=e.name}),r.push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),r.push({name:"ajax",value:1}),r}}}}),n.updateFromEditForm(),n.css("visibility","visible"),r.inst.hide_checkboxes()}).bind("before.jstree",function(t,r){if("start_drag"==r.func&&(!n.hasClass("draggable")||n.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(r.func,["check_node","uncheck_node"])){var o=e(r.args[0]).parents("li:first"),i=o.find("li:not(.disabled)");if(o.hasClass("disabled")&&0==i)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(t,r){if(!n.getIsUpdatingTree()){var o=r.rslt.o,i=r.rslt.np,s=(r.inst._get_parent(o),e(i).data("id")||0),a=e(o).data("id"),l=e.map(e(o).siblings().andSelf(),function(t){return e(t).data("id")});e.ajax({url:e.path.addSearchParams(n.data("urlSavetreenode"),n.data("extraParams")),type:"POST",data:{ID:a,ParentID:s,SiblingIDs:l},success:function(){e(".cms-edit-form :input[name=ID]").val()==a&&e(".cms-edit-form :input[name=ParentID]").val(s),n.updateNodesFromServer([a])},statusCode:{403:function(){e.jstree.rollback(r.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(t){var n=this,r=e(".cms-edit-form :input[name=ID]").val(),o=this.find("[data-id="+r+"]"),i=[+r];o.find("li").each(function(){i.push(e(this).data("id"))});for(var s=[];i.length;){var a=i.slice(0,50);s.push(a),i=i.slice(50)}s.map(function(e){return n.updateNodesFromServer(e,!1)}).reduce(function(e,t){return e.then(t)},Promise.resolve())}},getTreeConfig:function(){var t=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(n){var r=e(n.o),o=e(n.np),i=n.ot.get_container()[0]==n.np[0],s=r.getClassname(),a=o.getClassname(),l=t.getHints(),c=[],u=a||"Root",d=l&&void 0!==l[u]?l[u]:null;return d&&r.attr("class").match(/VirtualPage-([^\s]*)/)&&(s=RegExp.$1),d&&(c=void 0!==d.disallowedChildren?d.disallowedChildren:[]),!(0===r.data("id")||r.hasClass("status-archived")||i&&"inside"!=n.p||o.hasClass("nochildren")||c.length&&-1!=e.inArray(s,c))}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:e("body").data("frameworkpath")+"/admin/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(e,t){e?this.data("searchparams",e):this.removeData("searchparams"),this.jstree("refresh",-1,t)},getNodeByID:function(e){return this.find("*[data-id="+e+"]")},createNode:function(t,n,r){var o=this,i=void 0!==n.ParentID&&o.getNodeByID(n.ParentID),s=e(t),a={data:""};s.hasClass("jstree-open")?a.state="open":s.hasClass("jstree-closed")&&(a.state="closed"),this.jstree("create_node",i.length?i:-1,"last",a,function(e){for(var t=e.attr("class"),n=0;n/g,"");var o=e(n),i=!!r.NextID&&this.getNodeByID(r.NextID),s=!!r.PrevID&&this.getNodeByID(r.PrevID),a=!!r.ParentID&&this.getNodeByID(r.ParentID);e.each(["id","style","class","data-pagetype"],function(e,n){t.attr(n,o.attr(n))});var l=t.children("ul").detach();t.html(o.html()).append(l),i&&i.length?this.jstree("move_node",t,i,"before"):s&&s.length?this.jstree("move_node",t,s,"after"):this.jstree("move_node",t,a.length?a:-1)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.getIsLoaded()&&(!r||!this.getIsUpdatingTree())){var o=this,i=!1;this.setIsUpdatingTree(!0),o.jstree("save_selected");var s=function(e){o.getNodeByID(e.data("id")).not(e).remove(),o.jstree("deselect_all"),o.jstree("select_node",e)};return o.jstree("open_node",this.getNodeByID(0)),o.jstree("save_opened"),o.jstree("save_selected"),new Promise(function(r){e.ajax({url:e.path.addSearchParams(n.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(t,n){r(t),e.each(t,function(e,t){var n=o.getNodeByID(e);if(!t)return void o.jstree("delete_node",n);n.length?(o.updateNode(n,t.html,t),setTimeout(function(){s(n)},500)):(i=!0,t.ParentID&&!o.find("li[data-id="+t.ParentID+"]").length?o.jstree("load_node",-1,function(){newNode=o.find("li[data-id="+e+"]"),s(newNode)}):o.createNode(t.html,t,function(e){s(e)}))}),i||(o.jstree("deselect_all"),o.jstree("reselect"),o.jstree("reopen"))},complete:function(){o.setIsUpdatingTree(!1)}})})}}}),e(".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 e(this).jstree("get_checked").not(".disabled").map(function(){return e(this).data("id")}).get()}}),e(".cms-tree li").entwine({setEnabled:function(e){this.toggleClass("disabled",!e)},getClassname:function(){var e=this.attr("class").match(/class-([^\s]*)/i);return e?e[1]:""},getID:function(){return this.data("id")}})})},"./client/src/legacy/LeftAndMain.TreeDropdownField.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})})},"./client/src/legacy/LeftAndMain.js":function(module,exports,__webpack_require__){"use strict";(function(jQuery){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _extends=Object.assign||function(e){for(var t=1;t399?"bad":"good",l=["OK","success","HTTP/2.0 200"];if(null===o||isSameUrl(r,o)&&isSameUrl(i,o)||window.ss.router.show(o,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:t.getResponseHeader("X-Pjax")?t.getResponseHeader("X-Pjax"):n.headers["X-Pjax"]}),t.getResponseHeader("X-Reauthenticate"))return void $(".cms-container").showLoginDialog();0!==t.status&&s&&-1===$.inArray(s,l)&&statusMessage(decodeURIComponent(s),a),ajaxCompleteEvent(this)}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){if($.browser.msie&&parseInt($.browser.version,10)<8)return $(".ss-loading-screen").append('
Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.
')),$(t).css($(t).outerWidth()+"px"));var i=e.validate(),s=function(){$(t).removeClass("btn--loading loading"),$(t).find(".btn__loading-icon").remove(),$(t).css("width","auto"),$(t).text($(t).data("original-text"))};void 0===i||i||(statusMessage("Validation failed.","bad"),s());var a=e.serializeArray();return a.push({name:$(t).attr("name"),value:"1"}),a.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:e.attr("action"),data:a,type:"POST",complete:function(){s()},success:function(t,r,i){s(),e.removeClass("changed"),n&&n(t,r,i);var l=o.handleAjaxResponse(t,r,i);l&&l.filter("form").trigger("aftersubmitform",{status:r,xhr:i,formData:a})}},r)),!1},LastState:null,PauseState:!1,handleStateChange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.history.state;if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var n=this,r=t.pjax||"Content",o={},i=r.split(","),s=this._findFragments(i);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate()){var a=this.getLastState();return this.setPauseState(!0),a&&a.path?window.ss.router.show(a.path):window.ss.router.back(),void this.setPauseState(!1)}if(this.setLastState(t),s.length=0})),r.removeClass(i.join(" ")).addClass(a.join(" ")),o&&r.attr("style",o);var l=r.find("style").detach();l.length&&$(document).find("head").append(l),n.replaceWith(r)});var f=d.filter("form");f.hasClass("cms-tabset")&&f.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(r&&void 0!==r.tabState?r.tabState:null),d}},_findFragments:function(e){return $("[data-pjax-fragment]").filter(function(){var t,n=$(this).data("pjaxFragment").split(" ");for(t in e)if(-1!=$.inArray(e[t],n))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var e=[],t=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(t,n){var r=$(n).attr("id");r&&$(n).data("tabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||e.push({id:r,selected:$(n).tabs("option","selected")}))}),e){var n="tabs-"+t;try{window.sessionStorage.setItem(n,JSON.stringify(e))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw e}}}},restoreTabState:function(e){var t=this,n=this._tabStateUrl(),r=void 0!==window.sessionStorage&&window.sessionStorage,o=r?window.sessionStorage.getItem("tabs-"+n):null,i=!!o&&JSON.parse(o);this.find(".cms-tabset, .ss-tabset").each(function(){var n,r,o=$(this),s=o.attr("id"),a=o.children("ul").children("li.ss-tabs-force-active");o.data("tabs")&&(o.tabs("refresh"),a.length?n=a.first().index():e&&e[s]?(r=o.find(e[s].tabSelector),r.length&&(n=r.index())):i&&$.each(i,function(e,t){s==t.id&&(n=t.selected)}),null!==n&&(o.tabs("option","active",n),t.trigger("tabstaterestored")))})},clearTabState:function(e){if(void 0!==window.sessionStorage){var t=window.sessionStorage;if(e)t.removeItem("tabs-"+e);else for(var n=0;n'),$("body").append(e),e.open()}}),$(".leftandmain__login-dialog").entwine({destroy:function(){this.close(),this.remove()},close:function(){this.renderModal(!1)},open:function(){this.renderModal(!0)},renderModal:function(e){var t=$("body").data("member-tempid"),n=$.path.addSearchParams("CMSSecurity/login",{tempid:t,BackURL:window.location.href});_reactDom2.default.render(_react2.default.createElement(_IframeDialog2.default,{title:i18n._t("Admin.CMS_LOGIN_TITLE","Login"),className:"login-dialog",bodyClassName:"login-dialog__body",iframeId:"login-dialog-iframe",iframeClassName:"login-dialog__body__iframe",isOpen:e,url:n}),this[0])},reauthenticate:function(e){void 0!==e.SecurityID&&$(":input[name=SecurityID]").val(e.SecurityID),void 0!==e.TempID&&$("body").data("member-tempid",e.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({onmatch:function(){this.append(''),this._super()},onunmatch:function(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var t=this.attr("href"),n=t&&!t.match(/^#/)?t:this.data("href"),r={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(n,null,r),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=$("").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=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{void 0!==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 e="ss-ui-dialog-"+this.getUUID(),t=$("#"+e);t.length||(t=$(''),$("body").append(t));var n=this.data("popupclass")?this.data("popupclass"):"";return t.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:n}),!1}}),$(".cms .field.date input.text").entwine({onmatch:function(){var e=$(this).parents(".field.date:first"),t=e.data();if(!t.showcalendar)return void this._super();t.showOn="button",t.locale&&$.datepicker.regional[t.locale]&&(t=$.extend(t,$.datepicker.regional[t.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(t),this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){if(this.is(".no-chosen"))return void this._super();this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),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:not([cms-loading-ignore-url-params])").entwine({showDetailView:function(e){var t=window.location.search.replace(/^\?/,"");t&&(e=$.path.addSearchParams(e,t)),$(".cms-container").loadPanel(e)}}),$(".cms-search-form").entwine({onsubmit:function(e){var t,n;return t=this.find(":input:not(:submit)").filter(function(){return $.grep($(this).fieldValue(),function(e){return e}).length}),n=this.attr("action"),t.length&&(n=$.path.addSearchParams(n,t.serialize().replace("+","%20"))),this.closest(".cms-container").loadPanel(n,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var t=$(this).parents("form");t.clearForm(),t.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),t.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var e=this,t=this.data("url");if(!t)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.data("deferredNoCache")||void 0===window._panelDeferredCache[t]?(this.addClass("loading"),$.ajax({url:t,complete:function(){e.removeClass("loading")},success:function(t,n,r){e.html(t)}})):this.html(window._panelDeferredCache[t])}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var e=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("tabs")||this.tabs({active:-1!=e.index()?e.index():0,beforeLoad:function(e,t){return!1},beforeActivate:function(e,t){var n=t.oldTab.find(".cms-panel-link");if(n&&1===n.length)return!1},activate:function(e,t){var n=$(this).closest("form").find(".btn-toolbar");$(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").match(/#.*/);e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed");n?(this.addClass("active"),t.removeClass("cms-content-filters--hidden")):(this.removeClass("active"),t.addClass("cms-content-filters--hidden")),e.data("collapsed",!n)},onclick:function(){this.showHide()}}),$(".js-injector-boot .search-holder").entwine({Component:null,onmatch:function(){this._super();var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,_Injector.loadComponent)("Search",t);this.setComponent(n),this.refresh(),this.data("schema")},onunmatch:function(){this._super();var e=this[0];e&&_reactDom2.default.unmountComponentAtNode(e)},onfocusin:function(){this.css("z-index","100")},onfocusout:function(){this.css("z-index","")},close:function(){if($("#filters-button").showHide(),this.data("schema").filters){var e=$(".cms-search-form").attr("action");this.closest(".cms-container").loadPanel(e,"",{},!0)}},search:function(e){this._super();var t=$(".cms-search-form").attr("action");if(t&&e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=Object.entries(e)[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var l=s.value,c=_slicedToArray(l,2),u=c[0],d=c[1];d&&(n["q["+u+"]"]=d)}}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}0===Object.keys(n).length&&(n["q["+this.data("schema").name+"]"]=""),t=$.path.addSearchParams(t,n),$(".cms-panel-deferred.cms-content-view").data("deferredNoCache",!0),this.closest(".cms-container").loadPanel(t,"",{},!0)}},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},o=function(t){return e.search(t)},i="cms-content-tools-CMSMain"===this.closest(".cms-content-tools").attr("id");_reactDom2.default.render(_react2.default.createElement(n,_extends({id:"Search",identifier:"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",onHide:r,onSearch:o,borders:{left:!i}},t)),this[0])}})});var statusMessage=function(e,t){e=jQuery("").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(exports,__webpack_require__(1))},"./client/src/legacy/ModelAdmin.js":function(e,t,n){"use strict";var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./client/src/legacy/LeftAndMain.js"),o.default.entwine("ss",function(e){e(".cms-content-tools #Form_SearchForm").entwine({onsubmit:function(e){this.trigger("beforeSubmit")}}),e(".importSpec").entwine({onmatch:function(){this.find("div.details").hide(),this.find("a.detailsLink").click(function(){return e("#"+e(this).attr("href").replace(/.*#/,"")).slideToggle(),!1}),this._super()},onunmatch:function(){this._super()}}),e(".cms .btn.clear-search").entwine({onclick:function(e){e.preventDefault(),this.parents(".cms-container").loadPanel(this.attr("href"),"",{},!0,!1)}})})},"./client/src/legacy/PermissionCheckboxSetField.js":function(e,t,n){"use strict";var r=n(1);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".permissioncheckboxset .valADMIN input").entwine({onmatch:function(){this._super()},onunmatch:function(){this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=e(this).parents(".field:eq(0)").find(".checkbox").not(this);e(this).is(":checked")?t.each(function(){e(this).data("SecurityAdmin.oldChecked",e(this).attr("checked")),e(this).data("SecurityAdmin.oldDisabled",e(this).attr("disabled")),e(this).attr("disabled","disabled"),e(this).attr("checked","checked")}):t.each(function(){var t=e(this).data("SecurityAdmin.oldChecked"),n=e(this).data("SecurityAdmin.oldDisabled");null!==t&&e(this).attr("checked",t),null!==n&&e(this).attr("disabled",n)})}}),e(".permissioncheckboxset .valCMS_ACCESS_LeftAndMain input").entwine({getCheckboxesExceptThisOne:function(){return e(this).parents(".field:eq(0)").find("li").filter(function(t){var n=e(this).attr("class");return!!n&&n.match(/CMS_ACCESS_/)}).find(".checkbox").not(this)},onmatch:function(){this.toggleCheckboxes(),this._super()},onunmatch:function(){this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=this.getCheckboxesExceptThisOne();e(this).is(":checked")?t.each(function(){e(this).data("PermissionCheckboxSetField.oldChecked",e(this).is(":checked")),e(this).data("PermissionCheckboxSetField.oldDisabled",e(this).is(":disabled")),e(this).prop("disabled","disabled"),e(this).prop("checked","checked")}):t.each(function(){e(this).prop("checked",e(this).data("PermissionCheckboxSetField.oldChecked")),e(this).prop("disabled",e(this).data("PermissionCheckboxSetField.oldDisabled"))})}})})},"./client/src/legacy/SecurityAdmin.js":function(e,t,n){"use strict";var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./client/src/legacy/LeftAndMain.js"),n("./client/src/legacy/PermissionCheckboxSetField.js");var i=function(e){var t=(0,o.default)((0,o.default)(this).contents()).find(".message");if(t&&t.html()){var n=(0,o.default)(window.parent.document).find("#Form_EditForm_Members").get(0);n&&n.refresh();var r=(0,o.default)(window.parent.document).find(".cms-tree").get(0);r&&r.reload()}};(0,o.default)("#MemberImportFormIframe, #GroupImportFormIframe").entwine({onadd:function(){this._super(),(0,o.default)(this).bind("load",i)}}),o.default.entwine("ss",function(e){e(".permissioncheckboxset .checkbox[value=ADMIN]").entwine({onmatch:function(){this.toggleCheckboxes(),this._super()},onunmatch:function(){this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=this.parents(".field:eq(0)").find(".checkbox").not(this);this.is(":checked")?t.each(function(){e(this).data("SecurityAdmin.oldChecked",e(this).is(":checked")),e(this).data("SecurityAdmin.oldDisabled",e(this).is(":disabled")),e(this).prop("disabled",!0),e(this).prop("checked",!0)}):t.each(function(){e(this).prop("checked",e(this).data("SecurityAdmin.oldChecked")),e(this).prop("disabled",e(this).data("SecurityAdmin.oldDisabled"))})}})})},"./client/src/legacy/SelectionGroup.js":function(e,t,n){"use strict";var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r);(0,o.default)(document).ready(function(){(0,o.default)("ul.SelectionGroup input.selector, ul.selection-group input.selector").live("click",function(){var e=(0,o.default)(this).closest("li");e.addClass("selected");var t=e.prevAll("li.selected");t.length&&t.removeClass("selected");var n=e.nextAll("li.selected");n.length&&n.removeClass("selected"),(0,o.default)(this).focus()})})},"./client/src/legacy/TabSet.js":function(e,t,n){"use strict";var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./thirdparty/jquery-ui/jquery-ui.js"),n("./thirdparty/jquery-cookie/jquery.cookie.js"),n("./thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),o.default.entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){var e=window.location.hash;this.redrawTabs(),""!==e&&this.openTabFromURL(e),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks(),this.tabs()},openTabFromURL:function(t){var n;e.each(this.find(".ui-tabs-anchor"),function(){if(-1!==this.href.indexOf(t)&&1===e(t).length)return n=e(this),!1}),void 0!==n&&e(document).ready("ajaxComplete",function(){n.click()})},rewriteHashlinks:function(){e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr("href").match(/#.*/);t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}}),e(".ui-tabs-active .ui-tabs-anchor").entwine({onmatch:function(){this.addClass("nav-link active")},onunmatch:function(){this.removeClass("active")}})})},"./client/src/legacy/ToggleCompositeField.js":function(e,t,n){"use strict";var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./thirdparty/jquery-ui/jquery-ui.js"),o.default.entwine("ss",function(e){e(".ss-toggle").entwine({onadd:function(){this._super(),this.accordion({heightStyle:"content",collapsible:!0,active:!this.hasClass("ss-toggle-start-closed")&&0})},onremove:function(){this.data("accordion")&&this.accordion("destroy"),this._super()},getTabSet:function(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function(){this.accordion("resize")}}})})},"./client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=Object.assign||function(e){for(var t=1;t');t.bind("load",function(n){"about:blank"!=(0,r.default)(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){r.default.ui.dialog.prototype.open.call(this);var e=this,t=this.element.children("iframe");!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,r.default)(window).bind("resize.ssdialog",function(){e._resizeIframe()})},close:function(){r.default.ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,r.default)(window).unbind("resize.ssdialog")},_resizeIframe:function(){var t,n,o={},i=this.element.children("iframe");this.options.widthRatio&&(t=(0,r.default)(window).width()*this.options.widthRatio,this.options.minWidth&&tthis.options.maxWidth?o.width=this.options.maxWidth:o.width=t),this.options.heightRatio&&(n=(0,r.default)(window).height()*this.options.heightRatio,this.options.minHeight&&nthis.options.maxHeight?o.height=this.options.maxHeight:o.height=n),e.isEmptyObject(o)||(this._setOptions(o),i.attr("width",o.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),i.attr("height",o.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),r.default.widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var e=this.options,t=e.title||this.originalTitle||" ",n=r.default.ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var o=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var i=(0,r.default)('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(o);(this.uiDialogTitlebarCloseText=(0,r.default)("")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(i)}(0,r.default)("").addClass("ui-dialog-title").attr("id",n).html(t).prependTo(o),o.find("*").add(o).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),r.default.extend(r.default.ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)}})}).call(t,n(1))},"./client/src/lib/Injector.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlTemplates=t.loadComponent=t.injectGraphql=t.inject=t.withInjector=t.provideContext=t.provideInjector=void 0;var o=n("./client/src/lib/dependency-injection/provideInjector.js"),i=r(o),s=n("./client/src/lib/dependency-injection/provideContext.js"),a=r(s),l=n("./client/src/lib/dependency-injection/withInjector.js"),c=r(l),u=n("./client/src/lib/dependency-injection/inject.js"),d=r(u),p=n("./client/src/lib/dependency-injection/injectGraphql.js"),f=r(p),h=n("./client/src/lib/dependency-injection/graphql/templates.js"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(h),y=n("./client/src/lib/dependency-injection/loadComponent.js"),b=r(y),g=n("./client/src/lib/dependency-injection/Container.js"),v=r(g);t.provideInjector=i.default,t.provideContext=a.default,t.withInjector=c.default,t.inject=d.default,t.injectGraphql=f.default,t.loadComponent=b.default,t.graphqlTemplates=m,t.default=v.default},"./client/src/lib/Validator.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(t&&void 0!==t.react)return l.default.createElement(e,n,t.react);if(t&&void 0!==t.html){if(null!==t.html){var r={__html:t.html};return l.default.createElement(e,s({},n,{dangerouslySetInnerHTML:r}))}return null}var o=null;if((o=t&&void 0!==t.text?t.text:t)&&"object"===(void 0===o?"undefined":i(o)))throw new Error("Unsupported string value "+JSON.stringify(o));return null!==o&&void 0!==o?l.default.createElement(e,n,o):null}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=this.config.params;return this.config.params=[].concat(r(t),r(e)),this}},{key:"addField",value:function(e){return this.addFields([e])}},{key:"addFields",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.config.fields;return this.config.fields=[].concat(r(t),r(e)),this}},{key:"useFragment",value:function(e){return this.config.fragments=[].concat(r(this.config.fragments),[e]),this}},{key:"useTemplate",value:function(e){if(!Object.keys(this.templates).includes(e))throw new Error("\nTried to use template '"+e+"', which could not be found. Please make sure that it is registered with your Injector.\n ");return this.config.templateName=e,this}},{key:"addTempFragment",value:function(e,t){return this.fragments=l({},this.fragments,o({},e,t)),this.useFragment(e)}},{key:"setTemplate",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2])||arguments[2];return this.mutateField(e,function(e){var r=(0,d.default)(e.extraClass);return r[t]=n,s({},e,{extraClass:(0,c.default)(r)})})}},{key:"addFieldClass",value:function(e,t){return this.setFieldClass(e,t,!0)}},{key:"removeFieldClass",value:function(e,t){return this.setFieldClass(e,t,!1)}},{key:"getValues",value:function(){return(0,h.getFormValues)(this.schema.name,y)(this.mockGlobalState)||{}}},{key:"getValue",value:function(e){return this.getValues()[e]}},{key:"isDirty",value:function(){return(0,h.isDirty)(this.schema.name,y)(this.mockGlobalState)}},{key:"isPristine",value:function(){return(0,h.isPristine)(this.schema.name,y)(this.mockGlobalState)}},{key:"isValid",value:function(){return(0,h.isValid)(this.schema.name,y)(this.mockGlobalState)}},{key:"isInvalid",value:function(){return(0,h.isInvalid)(this.schema.name,y)(this.mockGlobalState)}},{key:"getState",value:function(){return this.schema}}]),e}();t.default=b},"./client/src/lib/dependency-injection/FormValidationManager.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1)throw new Error("\n Key "+n+" on "+e.name+' should only specify one key \n if using the "*" wildcard\n ');if(t)throw new Error("\n Cannot specify a "+n+" rule on "+e.name+" if a wildcard \n has been specified\n ");t=n}}),t},d=function(){function e(){r(this,e),this._middlewares=[],this._contextCache={}}return i(e,[{key:"sort",value:function(){var e=this,t=["__HEAD__","__TAIL__"],n=[t],r=[];return this._middlewares.forEach(function(e){var t=e.name,r=u(e);"after"===r?n.push(["__TAIL__",t]):"before"===r?n.push([t,"__HEAD__"]):(n.push([t,"__TAIL__"]),n.push(["__HEAD__",t]),e.before.forEach(function(e){n.push([t,e])}),e.after.forEach(function(e){n.push([e,t])}))}),(0,a.default)(n).filter(function(e){return!t.includes(e)}).forEach(function(t){r=r.concat(e._middlewares.filter(function(e){return e.name===t}))}),this._middlewares=r,this}},{key:"add",value:function(e,t,n){c(e),this._contextCache={};var r=n;r&&r.length?Array.isArray(r)||(r=[r]):r=["__GLOBAL__"];var i=o({},e,{factory:t,context:r});return l.forEach(function(t){Array.isArray(e[t])?i[t]=e[t]:i[t]=e[t]?[e[t]]:[]}),l.every(function(e){return!i[e].length})&&(i.after=["__HEAD__"],i.before=["__TAIL__"]),this._middlewares.push(i),this}},{key:"getMatchesForContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__GLOBAL__";if(!this._contextCache[e]){var t=e.split(".");this._contextCache[e]=this._middlewares.filter(function(e){return"__GLOBAL__"===e.context[0]||e.context.every(function(e,n){return"*"===e||t[n]===e})})}return this._contextCache[e]}}]),e}();t.GLOBAL_CONTEXT="__GLOBAL__",t.default=d},"./client/src/lib/dependency-injection/applyFormMiddleware.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:(0,l.default)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s({},e,{templates:s({},t),fragments:s({},n),scaffold:function(e,t,n){throw n.force,new Error("This API endpoint is not available yet")},register:function(t,n){var r,o=n.templateName;if(!o||!this.templates[o])throw new Error("\nTried to register a new query '"+t+"' without a defined template '"+o+"'. Please ensure the\ntemplateName config is defined and that you have registered the template before registering a query.\n ");for(var s=arguments.length,a=Array(s>2?s-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:{},i=r.force;return e.isProtected.call(this),function(e){for(var r=arguments.length,a=Array(r>1?r-1:0),l=1;l2&&void 0!==arguments[2]?arguments[2]:{},i=r.force;if(e.isProtected.call(this),this.fragments[t]&&!i)throw new Error("\nTried to register fragment '"+t+"' more than once. This practice is discouraged. Consider\nadding a new fragment or using Injector.update() to enhance the template you're working with.\nOtherwise, invoke the registerFragment() function with '{ force: true }' as the third argument.\n ");this.fragments=s({},this.fragments,o({},t,n))},getTemplates:function(){return s({},this.templates)},getFragments:function(){return s({},this.fragments)},getProcessedManager:function(e,t){var n=t.map(function(e){return e.factory}).reverse(),r=this.services[e],o=new u.default(r,s({},this.templates),s({},this.fragments));return n.forEach(function(e){e(o)},r),o},getFactory:function(e,t){return this.getProcessedManager(e,t).getContainer()}})};t.default=d},"./client/src/lib/dependency-injection/buildApolloGraphqlScaffoldingContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var i,s=n("./client/src/lib/dependency-injection/buildBaseContainer.js"),a=r(s),l=n("./client/src/lib/dependency-injection/buildApolloGraphqlContainer.js"),c=r(l),u=n("./client/src/lib/dependency-injection/graphql/buildCreateMutation.js"),d=r(u),p=n("./client/src/lib/dependency-injection/graphql/buildReadQuery.js"),f=r(p),h=n("./client/src/lib/dependency-injection/graphql/buildReadOneQuery.js"),m=r(h),y=n("./client/src/lib/dependency-injection/graphql/buildUpdateMutation.js"),b=r(y),g=n("./client/src/lib/dependency-injection/graphql/buildDeleteMutation.js"),v=r(g),_=n("./client/src/lib/dependency-injection/graphql/buildBaseQuery.js"),j=r(_),w=n("./client/src/lib/dependency-injection/graphql/templates.js"),T=n("./client/src/lib/dependency-injection/graphql/tags.js"),O=(i={},o(i,w.CREATE,(0,d.default)(T.captureTag)),o(i,w.READ,(0,f.default)(T.captureTag)),o(i,w.READ_ONE,(0,m.default)(T.captureTag)),o(i,w.UPDATE,(0,b.default)(T.captureTag)),o(i,w.DELETE,(0,v.default)(T.captureTag)),o(i,w.QUERY,(0,j.default)(T.captureTag)),i),P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)();return(0,c.default)(e,O)};t.default=P},"./client/src/lib/dependency-injection/buildBaseContainer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:a.GLOBAL_CONTEXT,o=n+"__"+t;if(!e.factoryCache[o]){var i=r.getMatchesForContext(t);e.factoryCache[o]=e.getFactory(n,i)}return e.factoryCache[o]}))):s({},t,o({},n,function(){return e.getFactory(n,[])}))},{}),this.initialised=!0},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.force;if(this.isProtected(),this.services[e]&&!0!==r)throw new Error("\n Tried to register service '"+e+"' more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ");this.services=s({},this.services,o({},e,t))},registerMany:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.force;this.isProtected();var r=Object.keys(e),o=Object.keys(this.services).filter(function(e){return r.includes(e)});if(o.length&&!0!==n){var i=o.join(", ");throw new Error("\n Tried to register services ("+i+") more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ")}this.services=s({},this.services,e)},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isProtected(),t(this.createTransformer(e,n))},createTransformer:function(e,t){var n=this;return function(r,o){n.customise(s({name:e},t),r,o)}},getFactory:function(e,t){var n=this.services[e],o=t.map(function(e){return e.factory});return c.compose.apply(void 0,r(o))(n)}}};t.default=u},"./client/src/lib/dependency-injection/buildComponentContainer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:(0,s.default)();return o({},e,{get:function(t,n){for(var o,i=arguments.length,s=Array(i>2?i-2:0),a=2;a0&&void 0!==arguments[0]?arguments[0]:(0,l.default)();return s({},t,{services:(e={},i(e,"FormSchemaMiddleware",function(e){return e}),i(e,"FormValidationMiddleware",function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}),e),register:function(){throw new Error("\n Attempted to register a service on Injector.form. This container accepts only two\n services by design (FormSchemaMiddleware and FormValidationMiddleware) \n for updating form schema and adding validation, respectively. Consider using a more\n generic container, e.g. Injector.reducer.\n ")},registerMany:function(){this.register()},getSchema:function(e){for(var n,r=arguments.length,i=Array(r>1?r-1:0),s=1;s1?r-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:{},r=n.force;if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");if(this.services[e]&&!0!==r)throw new Error("\n Tried to register service "+e+" more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ");if(void 0!==this[e]&&!this.services[e])throw new Error("\n Tried to register service "+e+" which is a reserved keyword. This would affect the behaviour\n of this API class, so it is forbidden to register with Injector.\n ");var o=["load","createTransformer","get","register"];if(!o.every(function(e){return"function"==typeof t[e]}))throw new Error("\n Tried to register service "+e+" that is not a valid object, Injector requires an object\n which contains the following methods: "+o.join(", ")+"\n ");this.services[e]=t,this[e]=t},load:function(){if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");Object.values(this.services).forEach(function(e){return e.load()}),this.initialised=!0,this.callbacks.forEach(function(e){e()}),this.callbacks=[]},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");t(Object.entries(this.services).reduce(function(t,r){var a=s(r,2),l=a[0],c=a[1];return i({},t,o({},l,c.createTransformer(e,n)))},{}))},ready:function(e){if("function"!=typeof e)throw new Error("Callback provided is not a function");if(this.initialised)return void e();this.callbacks=[].concat(r(this.callbacks),[e])}}};t.default=a},"./client/src/lib/dependency-injection/buildReducerContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:(0,l.default)();return s({},e,{store:null,setStore:function(e){this.store=e},customise:function(e,t,n){var r=this;this.isProtected();var i=this.middlewareRegistries[t];i||(i=new u.default,this.middlewareRegistries=s({},this.middlewareRegistries,o({},t,i)));var a=function(e){var t=r.store&&r.store.getState;return n(e)(t)};i.add(e,a)},getAll:function(){return this.initialised?Object.entries(this.factories).reduce(function(e,t){var n=i(t,2),r=n[0],a=n[1];return s({},e,o({},r,a()))},{}):Object.entries(this.services).reduce(function(e,t){var n=i(t,2),r=n[0],a=n[1];return s({},e,o({},r,a))},{})}})};t.default=d},"./client/src/lib/dependency-injection/graphql/buildBaseQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([""," ",""," {\n ","(",") {\n ","\n }\n }\n ",""],[""," ",""," {\n ","(",") {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),i=n("./client/src/lib/dependency-injection/graphql/helpers.js"),s=function(e){var t=e.operationName,n=e.queryName;return t||""+n.charAt(0).toUpperCase()+n.slice(1)},a=function(e){return e.queryName},l=function(e){return e.queryType},c=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,l,s,i.getVariables,a,i.getParams,i.getFields,i.getFragments)};t.default=c},"./client/src/lib/dependency-injection/graphql/buildCreateMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Create","(\n $Input:","CreateInputType!\n ) {\n create","(\n Input: $Input\n ) {\n ","\n }\n }\n ",""],["mutation Create","(\n $Input:","CreateInputType!\n ) {\n create","(\n Input: $Input\n ) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),i=n("./client/src/lib/dependency-injection/graphql/helpers.js"),s=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,i.getSingularName,i.getSingularName,i.getSingularName,i.getFields,i.getFragments)};t.default=s},"./client/src/lib/dependency-injection/graphql/buildDeleteMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Delete","($IDs:[ID]!) {\n delete","(IDs: $IDs)\n }"],["mutation Delete","($IDs:[ID]!) {\n delete","(IDs: $IDs)\n }"]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),i=n("./client/src/lib/dependency-injection/graphql/helpers.js"),s=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,i.getSingularName,i.getSingularName)};t.default=s},"./client/src/lib/dependency-injection/graphql/buildReadOneQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["query ReadOne","($ID: ID!) {\n readOne","(ID: $ID) {\n ","\n }\n }\n ",""],["query ReadOne","($ID: ID!) {\n readOne","(ID: $ID) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),i=n("./client/src/lib/dependency-injection/graphql/helpers.js"),s=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,i.getSingularName,i.getSingularName,i.getFields,i.getFragments)};t.default=s},"./client/src/lib/dependency-injection/graphql/buildReadQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["query Read",""," {\n read",""," {\n ","\n }\n }\n ",""],["query Read",""," {\n read",""," {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),i=n("./client/src/lib/dependency-injection/graphql/helpers.js"),s=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,i.getPluralName,i.getVariables,i.getPluralName,i.getParams,i.getFields,i.getFragments)};t.default=s},"./client/src/lib/dependency-injection/graphql/buildUpdateMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Update","(\n $Input:","UpdateInputType!\n ","\n ) {\n update","(\n Input: $Input\n ","\n ) {\n ","\n }\n }\n ",""],["mutation Update","(\n $Input:","UpdateInputType!\n ","\n ) {\n update","(\n Input: $Input\n ","\n ) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),i=n("./client/src/lib/dependency-injection/graphql/helpers.js"),s=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,i.getSingularName,i.getSingularName,i.getVariables,i.getSingularName,i.getParams,i.getFields,i.getFragments)};t.default=s},"./client/src/lib/dependency-injection/graphql/helpers.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r1?t-1:0),r=1;r1?n-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:m;return function(r){if(e&&!Array.isArray(e))throw new Error("\n withInjector() passed an argument for dependencies that is "+("undefined"==typeof deps?"undefined":u(deps))+". \n Must be an array of named dependencies.\n ");if(t&&"function"!=typeof t)throw new Error("\n Second parameter of inject() [mapDependenciesToProps] must be a function, taking the resolved\n dependencies as enumerated arguments, and returning a map of prop names to dependencies.\n ");if("function"!=typeof n)throw new Error("\n Third parameter of inject() [getContext] must be a function, taking the component's props\n and current inject context as parameters, and returning a string representing the Injector\n context to use throughout the component.\n ");var f=function(d){function f(e,t){i(this,f);var r=s(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,e,t));return r.state={context:n(e,t.injector.context)},r}return a(f,d),c(f,[{key:"getChildContext",value:function(){return{injector:l({},this.context.injector,{context:this.state.context})}}},{key:"componentWillReceiveProps",value:function(e,t){var r=n(e,t.injector.context);r!==this.state.context&&this.setState({context:r})}},{key:"render",value:function(){var n=this,i={};if(e){var s=this.context.injector.get,a=e.map(function(e){return s(e,n.state.context)});if(t?i=t.apply(void 0,o(a)):e.forEach(function(e,t){i[e]=a[t]}),!i||"object"!==(void 0===i?"undefined":u(i)))throw new Error("\n mapDepedenciesToProps parameter passed to inject()\n should return an object that maps prop names to dependencies\n ")}var c=l({},i,this.props);return p.default.createElement(r,c)}}]),f}(d.Component);return f.contextTypes=h.default,f.childContextTypes=h.default,f}};t.default=y},"./client/src/lib/dependency-injection/injectGraphql.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],r=function(n){function r(e){o(this,r);var t=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.state={target:null,error:!1},t}return s(r,n),l(r,[{key:"getChildContext",value:function(){var e=t&&t.context;return e?{injector:a({},this.context.injector,{context:e})}:this.context}},{key:"componentWillMount",value:function(){var n=this;g.default.ready(function(){if("string"==typeof e){var r=!0,o=null;try{o=n.context.injector.get(e,t&&t.context),r=!1}catch(e){throw n.setState({target:o,error:r}),e}return void n.setState({target:o,error:r})}n.setState({target:e})})}},{key:"render",value:function(){var n=this.state.target;if(this.state.error){var r=_.default;try{r=this.context.injector.get("NotFoundComponent")}catch(e){}return u.default.createElement(r,a({},this.props,{itemName:e}))}if(n){if(t){var o=a({},window.ss,t),i=o.store,s=o.apolloClient;return u.default.createElement(p.ApolloProvider,{client:s},u.default.createElement(d.Provider,{store:i},u.default.createElement(n,this.props)))}return u.default.createElement(n,this.props)}return null}}]),r}(c.Component);return r.childContextTypes=w.default,(n||h.default)((0,y.default)(r))};t.default=T},"./client/src/lib/dependency-injection/provideContext.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:p.default,n=function(n){function r(){return o(this,r),i(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return s(r,n),l(r,[{key:"getChildContext",value:function(){var e=t.component,n=t.form,r=t.query;return{injector:{query:r.get.bind(r),get:e.get.bind(e),validate:n.getValidation.bind(n)}}}},{key:"render",value:function(){return u.default.createElement(e,this.props)}}]),r}(c.Component);return n.childContextTypes=h.default,n}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case l.default.SET_BREADCRUMBS:return(0,s.default)(Object.assign([],t.payload.breadcrumbs));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),s=r(i),a=n("./client/src/state/breadcrumbs/BreadcrumbsActionTypes.js"),l=r(a),c=(0,s.default)([]);t.default=o},"./client/src/state/config/ConfigActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SET_CONFIG:"SET_CONFIG"}},"./client/src/state/config/ConfigActions.js":function(e,t,n){"use strict";function r(e){return{type:i.default.SET_CONFIG,payload:{config:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=r;var o=n("./client/src/state/config/ConfigActionTypes.js"),i=function(e){return e&&e.__esModule?e:{default:e}}(o)},"./client/src/state/config/ConfigReducer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];switch(t.type){case l.default.SET_CONFIG:return(0,s.default)(Object.assign({},e,t.payload.config));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),s=r(i),a=n("./client/src/state/config/ConfigActionTypes.js"),l=r(a);t.default=o},"./client/src/state/mobileMenu/MobileMenuActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TOGGLE_MENU:"TOGGLE_MENU",OPEN_MENU:"OPEN_MENU",CLOSE_MENU:"CLOSE_MENU"}},"./client/src/state/mobileMenu/MobileMenuActions.js":function(e,t,n){"use strict";function r(){return{type:a.default.TOGGLE_MENU,payload:null}}function o(){return{type:a.default.OPEN_MENU,payload:null}}function i(){return{type:a.default.CLOSE_MENU,payload:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleMobileMenu=r,t.openMobileMenu=o,t.closeMobileMenu=i;var s=n("./client/src/state/mobileMenu/MobileMenuActionTypes.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(s)},"./client/src/state/mobileMenu/MobileMenuReducer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;switch(arguments[1].type){case c.default.TOGGLE_MENU:return(0,a.default)(i({},e,{isOpen:!e.isOpen}));case c.default.OPEN_MENU:return(0,a.default)(i({},e,{isOpen:!0}));case c.default.CLOSE_MENU:return(0,a.default)(i({},e,{isOpen:!1}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:p,t=arguments[1];switch(t.type){case d.default.FETCH_RECORDS_SUCCESS:var n=t.payload.recordType;if(!n)throw new Error("Undefined record type");var r=t.payload.data._embedded[n]||[];return(0,c.default)(a({},e,i({},n,r)));case d.default.FETCH_RECORD_SUCCESS:var s=t.payload.recordType,l=t.payload.data;if(!s)throw new Error("Undefined record type");if(!l)throw new Error("Undefined record data given");var u=e[s]||[];return u.find(function(e){return e.ID===l.ID})?(0,c.default)(a({},e,i({},s,u.map(function(e){return e.ID===l.ID?l:e})))):(0,c.default)(a({},e,i({},s,[].concat(o(u),[l]))));case d.default.DELETE_RECORD_SUCCESS:var f=t.payload.recordType;if(!f)throw new Error("Undefined record type");var h=e[f].filter(function(e){return e.ID!==t.payload.id});return(0,c.default)(a({},e,i({},f,h)));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(t.type){case u.default.SET_SCHEMA:var n=e[t.payload.id]||{};return(0,l.default)(s({},e,o({},t.payload.id,s({},n,t.payload))));case u.default.SET_SCHEMA_STATE_OVERRIDES:var r=e[t.payload.id]||{},i=t.payload.stateOverride;return i&&i.fields?(0,l.default)(s({},e,o({},t.payload.id,s({},r,{stateOverride:i})))):e;case u.default.SET_SCHEMA_LOADING:var a=e[t.payload.id]||{},c=a.metadata||{};return(0,l.default)(s({},e,o({},t.payload.id,s({},a,{metadata:s({},c,{loading:t.payload.loading})}))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,f.default)(e,t,b),r=function(e,t){return e.filter(function(e){return e!==t})},i=function(e,t){return e.find(function(e){return e===t})?e:[].concat(o(e),[t]).sort()};switch(t.type){case m.default.TREEFIELD_SET_VISIBLE:return n(function(){return{visible:t.payload.path}});case m.default.TREEFIELD_UPDATING_TREE:return n(function(e){return{loading:i(e.loading,a(t.payload.path)),failed:r(e.failed,a(t.payload.path))}});case m.default.TREEFIELD_UPDATED_TREE:return n(function(e){return{tree:s(e.tree,t.payload.path,t.payload.tree),loading:r(e.loading,a(t.payload.path)),failed:r(e.failed,a(t.payload.path))}});case m.default.TREEFIELD_UPDATE_FAILED:return n(function(e){return{loading:r(e.loading,a(t.payload.path)),failed:i(e.failed,a(t.payload.path))}});case m.default.TREEFIELD_SET_SEARCH:return n(function(e){return c({},e,{search:t.payload.search})});case m.default.TREEFIELD_ADD_SELECTED_VALUES:var l=t.payload.values||[];return n(function(e){return c({},e,{selectedValues:[].concat(o(e.selectedValues.filter(function(e){return!l.find(function(t){return t.id===e.id})})),o(l)).sort(function(e,t){return e.id-t.id})})});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=t.meta&&t.meta.form;switch(t.type){case u.default.ADD_FORM_CHANGED:case l.actionTypes.CHANGE:return(0,a.default)([].concat(o(e.filter(function(e){return e.name!==n})),[{name:n}]));case u.default.REMOVE_FORM_CHANGED:case l.actionTypes.STOP_SUBMIT:return(0,a.default)([].concat(o(e.filter(function(e){return e.name!==n}))));case l.actionTypes.DESTROY:return(0,a.default)([].concat(o(e.filter(function(e){return!n.includes(e.name)}))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=n(11),a=r(s),l=n(10),c=n("./client/src/state/unsavedForms/UnsavedFormsActionTypes.js"),u=r(c);t.default=i},"./client/src/state/usedOn/usedOnActions.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return{type:u.default.SAVE_USED_ON,payload:{identifier:e,usedOn:t}}}function i(e,t){return{type:u.default.LOAD_USED_ON_FAILED,payload:{identifier:e,error:t.message}}}function s(e,t,n){var r={method:t,headers:{Accept:"application/json"},credentials:"same-origin"};return function(s){if(!e||!t||!n){var a=l.default._t("Admin.NOT_AVAILABLE_USED_DATA","The usage data is currently unavailable.");return Promise.resolve(s(i(e,a)))}return s({type:u.default.LOAD_USED_ON,payload:{identifier:e}}),(0,p.default)(n,r).then(function(e){return e.json()}).then(function(t){s(o(e,t))}).catch(function(t){s(i(e,t))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.saveUsedOn=o,t.loadUsedOnFailed=i,t.loadUsedOn=s;var a=n(2),l=r(a),c=n("./client/src/state/usedOn/usedOnTypes.js"),u=r(c),d=n(15),p=r(d)},"./client/src/state/usedOn/usedOnReducer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1],n=t&&t.payload&&t.payload.identifier;if(!n)return e;switch(t.type){case c.default.SAVE_USED_ON:var i=t.payload.usedOn;return a({},e,{loading:e.loading.filter(function(e){return e!==n}),usedOn:a({},e.usedOn,o({},n,i.usage))});case c.default.LOAD_USED_ON:return e.loading.includes(n)?e:a({},e,{loading:[].concat(r(e.loading),[n]),errors:Object.entries(e.errors).reduce(function(e,t){var r=s(t,2),i=r[0],l=r[1];return i===n?e:a({},e,o({},i,l))},{})});case c.default.LOAD_USED_ON_FAILED:var l=t.payload.error;return a({},e,{loading:e.loading.filter(function(e){return e!==n}),errors:a({},e.errors,o({},n,l))});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case s.default.SELECT_EDIT:return o({},e,{activeState:l.VIEW_MODE_STATES.EDIT});case s.default.SELECT_PREVIEW:return o({},e,{activeState:l.VIEW_MODE_STATES.PREVIEW});case s.default.SELECT_SPLIT:return o({},e,{activeState:l.VIEW_MODE_STATES.SPLIT});case s.default.SPLIT_AVAILABLE:var n=t.payload.panelWidth>a.SPLITMODE_BREAKPOINT,r=e.activeState;return r!==l.VIEW_MODE_STATES.SPLIT||n||(r=l.VIEW_MODE_STATES.EDIT),o({},e,{splitAvailable:n,activeState:r});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1&&c.default.createElement("div",{className:"breadcrumb__list-container"},c.default.createElement("ol",{className:"breadcrumb"},this.renderBreadcrumbs())),this.renderLastCrumb())}}]),t}(l.Component);d.propTypes={crumbs:l.PropTypes.arrayOf(l.PropTypes.shape({onClick:l.PropTypes.func,text:l.PropTypes.string,icon:l.PropTypes.shape({className:l.PropTypes.string,onClick:l.PropTypes.func,action:function(e){if(e.action)throw new Error("action: no longer used")}})}))},t.Component=d,t.default=(0,u.connect)(s)(d)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/CheckboxSetField/CheckboxSetField.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var a=Object.assign||function(e){for(var t=1;t-1,title:e.title,type:"checkbox"}}},{key:"handleChange",value:function(e,t){var n=this;if("function"==typeof this.props.onChange){var r=this.getValues(),o=this.props.source.filter(function(e,o){return n.getItemKey(e,o)===t.id?1===t.value:r.indexOf(""+e.value)>-1}).map(function(e){return""+e.value});this.props.onChange(e,{id:this.props.id,value:o})}}},{key:"render",value:function(){var e=this;return this.props.source?u.default.createElement("div",null,this.props.source.map(function(t,n){return u.default.createElement(p.default,a({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);m.propTypes={className:u.default.PropTypes.string,extraClass:u.default.PropTypes.string,itemClass:u.default.PropTypes.string,id:u.default.PropTypes.string,name:u.default.PropTypes.string.isRequired,source:u.default.PropTypes.arrayOf(u.default.PropTypes.shape({value:u.default.PropTypes.oneOfType([u.default.PropTypes.string,u.default.PropTypes.number]),title:u.default.PropTypes.any,disabled:u.default.PropTypes.bool})),onChange:u.default.PropTypes.func,value:u.default.PropTypes.any,readOnly:u.default.PropTypes.bool,disabled:u.default.PropTypes.bool},m.defaultProps={extraClass:"",className:"",value:[]},t.Component=m,t.default=(0,h.default)(m)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/FieldHolder/FieldHolder.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=function(t){function n(){return i(this,n),s(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return a(n,t),u(n,[{key:"getMessage",value:function(){var e=null;this.props.message&&this.props.message.value&&(e=this.props.message);var t=this.props.meta;return t&&t.error&&t.touched&&(!e||t.dirty)&&(e=t.error),e}},{key:"getHolderProps",value:function(){var e;return{className:(0,b.default)((e={field:!0},o(e,this.props.extraClass,!0),o(e,"readonly",this.props.readOnly),e)),id:this.props.holderId}}},{key:"renderDescription",value:function(){return null===this.props.description?null:(0,m.default)("div",this.props.description,{className:"form__field-description"})}},{key:"renderMessage",value:function(){var e=this.getMessage();if(!e)return null;var t=(0,b.default)(["form__field-message","form__field-message--"+e.type]),n=(0,m.default)("div",e.value);return p.default.createElement("div",{className:t},n)}},{key:"renderLeftTitle",value:function(){var e=null!==this.props.leftTitle?this.props.leftTitle:this.props.title;return!e||this.props.hideLabels?null:(0,m.default)(f.Label,e,{className:"form__field-label",for:this.props.id})}},{key:"renderRightTitle",value:function(){return!this.props.rightTitle||this.props.hideLabels?null:(0,m.default)(f.Label,this.props.rightTitle,{className:"form__field-label",for:this.props.id})}},{key:"renderField",value:function(){var t=Boolean(this.getMessage()),n=c({},this.props,{extraClass:(0,b.default)(this.props.extraClass,{"is-invalid":t})}),r=p.default.createElement(e,n),o=this.props.data.prefix,i=this.props.data.suffix;return o||i?p.default.createElement(f.InputGroup,null,o&&p.default.createElement(f.InputGroupAddon,{addonType:"prepend"},o),r,i&&p.default.createElement(f.InputGroupAddon,{addonType:"append"},i)):r}},{key:"render",value:function(){return this.props.noHolder?this.renderField():p.default.createElement(f.FormGroup,this.getHolderProps(),this.renderLeftTitle(),p.default.createElement("div",{className:"form__field-holder"},this.renderField(),this.renderMessage(),this.renderDescription()),this.renderRightTitle())}}]),n}(d.Component);return t.propTypes={leftTitle:d.PropTypes.any,rightTitle:d.PropTypes.any,title:d.PropTypes.any,extraClass:d.PropTypes.string,holderId:d.PropTypes.string,id:d.PropTypes.string,name:d.PropTypes.string,description:d.PropTypes.any,hideLabels:d.PropTypes.bool,message:d.PropTypes.shape({extraClass:d.PropTypes.string,value:d.PropTypes.any,type:d.PropTypes.string}),data:d.PropTypes.oneOfType([d.PropTypes.array,d.PropTypes.shape({prefix:d.PropTypes.string,suffix:d.PropTypes.string})])},t.defaultProps={className:"",extraClass:"",leftTitle:null,rightTitle:null,title:"",description:null,hideLabels:!1,noHolder:!1,message:null,data:{}},t}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t-1})?null:this.isPrimary()?"primary":"secondary"}},{key:"getIcon",value:function(){return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function(){return this.props.loading?u.default.createElement("div",{className:"btn__loading-icon"},u.default.createElement("span",{className:"btn__circle btn__circle--1"}),u.default.createElement("span",{className:"btn__circle btn__circle--2"}),u.default.createElement("span",{className:"btn__circle btn__circle--3"})):null}},{key:"isDisabled",value:function(){var e=this.props,t=e.disabled,n=e.readOnly;return t||n}},{key:"isPrimary",value:function(){var e=this.props,t=e.extraClass,n=e.name,r=t.split(" ");return"action_save"===n||!!r.find(function(e){return"ss-ui-action-constructive"===e})}},{key:"handleClick",value:function(e){"function"==typeof this.props.onClick&&this.props.onClick(e,this.props.name||this.props.id)}},{key:"render",value:function(){var e=this.props.title;return u.default.createElement("button",this.getButtonProps(),this.getLoadingIcon(),(0,p.default)("span",e,{className:"btn__title"}))}}]),t}(c.Component);m.propTypes={id:u.default.PropTypes.string,name:u.default.PropTypes.string,onClick:u.default.PropTypes.func,title:u.default.PropTypes.string,type:u.default.PropTypes.string,loading:u.default.PropTypes.bool,icon:u.default.PropTypes.string,disabled:u.default.PropTypes.bool,readOnly:u.default.PropTypes.bool,data:u.default.PropTypes.oneOfType([u.default.PropTypes.array,u.default.PropTypes.shape({buttonStyle:u.default.PropTypes.string})]),extraClass:u.default.PropTypes.string,attributes:u.default.PropTypes.object},m.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1,readOnly:!1},t.default=m},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/FormAlert/FormAlert.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return e&&Object.keys(e).length>0}function u(e,t){var n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};var r=n.name,o=(0,x.default)((0,D.default)(e),r),i=o&&o.values||{},s=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:i,formIsDirty:(0,P.isDirty)(r,D.default)(e),schemaName:r,tagData:s}}function d(e){return{actions:{schema:(0,j.bindActionCreators)(T,e),reduxForm:(0,j.bindActionCreators)({reset:O.reset,initialize:O.initialize,change:E.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],n={};return!t&&this.state.searchText&&(n[this.props.name]=this.state.searchText.trim()),Object.keys(this.props.formData).forEach(function(t){var r=e.props.formData[t];r&&(n[t]=r)}),n}},{key:"handleChange",value:function(e){var t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});var n=this.props,r=n.schemaName,o=n.formData,i=n.name,s=n.actions;void 0!==o[i]&&s.reduxForm.change(r,i,t)}},{key:"focusInput",value:function(){if(this.state.display!==H.NONE){var e=_.default.findDOMNode(this);if(e){var t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}}}},{key:"focusFirstFormField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input, textarea, select, button";if(this.state.display===H.EXPANDED){var t=_.default.findDOMNode(this);if(t){var n=t.querySelector(".search-form");if(n){var r=n.querySelector(e);r&&(r.focus(),r.select&&r.select())}}}}},{key:"clearFormData",value:function(e){""!==this.state.searchText&&this.setState({searchText:""});var t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){var n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,null),this.props.actions.reduxForm.initialize(n,{},Object.keys(this.props.formData)),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=i({},e,void 0);Array.isArray(t.linkedFields)&&t.linkedFields.forEach(function(e){n[e]=void 0}),this.doSearch(n)}},{key:"focusFormFilter",value:function(e){var t=this,n=this.props.tagData[e],r=n.focusSelector||"[name="+e+"]";this.expand(),setTimeout(function(){return t.focusFirstFormField(r)},50)}},{key:"open",value:function(){this.show(),this.focusInput()}},{key:"hide",value:function(){this.props.onHide?this.props.onHide():this.state.display!==H.NONE&&this.setState({display:H.NONE})}},{key:"show",value:function(){this.state.display!==H.VISIBLE&&this.setState({display:H.VISIBLE});var e=this.props,t=e.schemaName,n=e.formData,r=e.name,o=e.actions;void 0!==n[r]&&o.reduxForm.change(t,r,this.state.searchText)}},{key:"expand",value:function(){this.state.display!==H.EXPANDED&&this.setState({display:H.EXPANDED})}},{key:"toggle",value:function(){switch(this.state.display){case H.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case H.EXPANDED:this.show()}}},{key:"searchTermIsDirty",value:function(){var e=this.state,t=e.searchText,n=e.initialSearchText;return t.trim()!==n.trim()}},{key:"doSearch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.getData(),e),n=t[this.props.name]||"",r=Object.assign({},this.getData(!0),e);this.state.display===H.VISIBLE&&this.state.initialSearchText===n&&this.state.searchText===n||this.setState({display:H.VISIBLE,initialSearchText:n,searchText:n}),this.props.actions.schema.setSchemaStateOverrides(this.props.schemaUrl,null),this.props.actions.reduxForm.initialize(this.props.schemaName,r),this.props.onSearch(t)}},{key:"clearFilters",value:function(){this.clearFormData(),this.focusFirstFormField()}},{key:"clearSearchBox",value:function(){this.clearFormData(),this.focusInput()}},{key:"formatTagData",value:function(){var e=this.props,t=e.tagData,n=e.name;return t&&t[n]&&delete t[n],t?Object.values(t).map(function(e){return{key:e.key,label:e.label,value:e.value}}):[]}},{key:"render",value:function(){var e=this.props,t=e.formSchemaUrl,n=e.forceFilters,r=e.id,i=e.displayBehavior,s=e.identifier,a=e.formIsDirty,l=(e.tagData,o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData"]));if(this.state.display===H.NONE)return i===V.TOGGLABLE?b.default.createElement(L.default,{onToggle:this.show}):b.default.createElement("div",null);var c=r+"_ExtraFields",u=this.state.searchText,d=this.state.display===H.EXPANDED,f=[V.HIDEABLE,V.TOGGLABLE].includes(i),h=a||this.searchTermIsDirty(),m=this.getData(),y=Object.keys(m).length>0;return b.default.createElement(k.default,{onClickOut:this.show,className:"search"},b.default.createElement(A.default,p({},l,{onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:u,hideable:f,expanded:d,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:h,clearable:y,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),b.default.createElement(I.default,{id:c,identifier:s,expanded:d,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:y})))}}]),t}(y.Component);G.propTypes={onSearch:y.PropTypes.func,onHide:y.PropTypes.func,id:y.PropTypes.string.isRequired,display:y.PropTypes.oneOf(Object.values(H)),formSchemaUrl:y.PropTypes.string,filters:y.PropTypes.object,formData:y.PropTypes.object,placeholder:y.PropTypes.string,displayBehavior:y.PropTypes.oneOf(Object.values(V)),term:y.PropTypes.string,name:y.PropTypes.string,forceFilters:y.PropTypes.bool,formIsDirty:y.PropTypes.bool,identifier:y.PropTypes.string,schemaName:y.PropTypes.string,tagHandlers:y.PropTypes.object,borders:y.PropTypes.shape({top:y.PropTypes.bool,right:y.PropTypes.bool,bottom:y.PropTypes.bool,left:y.PropTypes.bool})},G.defaultProps={placeholder:m.default._t("Admin.SEARCH","Search"),display:H.VISIBLE,displayBehavior:V.NONE,filters:{},formData:{},term:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=G,t.hasFilters=c,t.default=(0,g.connect)(u,d)(G)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Search/SearchToggle.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(2),i=r(o),s=n(0),a=r(s),l=n(4),c=n(3),u=r(c),d=i.default._t("Admin.SHOW_SEARCH","Show search"),p=function(e){return(0,u.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e})},f=function(e){var t=e.onToggle,n=e.toggled;return a.default.createElement(l.Button,{title:d,onClick:t,className:p(n)},a.default.createElement("span",{className:"sr-only"},d))};f.propTypes={onToggle:s.PropTypes.func,toggled:s.PropTypes.bool},t.Component=f,t.default=f},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Tag/CompactTagList.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t1}},{key:"handleChange",value:function(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{id:this.props.id,value:e.target.value})}},{key:"render",value:function(){return c.default.createElement(p.Input,this.getInputProps())}}]),t}(l.Component);f.propTypes={extraClass:c.default.PropTypes.string,id:c.default.PropTypes.string,name:c.default.PropTypes.string.isRequired,onChange:c.default.PropTypes.func,value:c.default.PropTypes.oneOfType([c.default.PropTypes.string,c.default.PropTypes.number]),readOnly:c.default.PropTypes.bool,disabled:c.default.PropTypes.bool,placeholder:c.default.PropTypes.string,type:c.default.PropTypes.string,autoFocus:c.default.PropTypes.bool,attributes:c.default.PropTypes.oneOfType([c.default.PropTypes.object,c.default.PropTypes.array])},f.defaultProps={value:"",extraClass:"",className:"",type:"text",attributes:{}},t.Component=f,t.default=(0,d.default)(f)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Toolbar/Toolbar.js':function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.props.visible,t=[];if(!e)return t;var n=this.props.tree,r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var l=s.value;if("break"===function(e){return n.children&&(n=n.children.find(function(t){return t.id===e}))?void t.push(n):"break"}(l))break}}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return t}},{key:"getDropdownOptions",value:function(){var e=this.props.value,t=this.getVisibleTree(),n=t?[].concat(o(t.children)):[],r=this.props.selectedValues.filter(function(t){return t.id===e||Array.isArray(e)&&e.find(function(e){return e===t.id})});return!this.state.opened&&this.props.data.showSelectedPath?n=r.map(function(e){return u({},e,{title:e.titlePath||e.title})}):r.length&&(n=[].concat(o(r.filter(function(e){return!n.find(function(t){return t.id===e.id})})),o(n))),n.unshift({id:this.props.data.multiple?"":A,title:this.props.data.hasEmptyDefault?this.props.data.emptyString:null,disabled:!n.length||!this.props.data.hasEmptyDefault}),n}},{key:"getPath",value:function(e){var t=this.props.findTreePath(this.props.tree,e);return this.getBreadcrumbs(t).reduce(function(e,t){return""+e+(t.contextString||"")+t.title+"/"},"")}},{key:"initialise",value:function(){var e=this;return this.loadTree([],this.props.search).then(function(t){var n=[];!e.props.data.multiple&&e.props.value&&(n=e.props.findTreePath(t,e.props.value),n?n.pop():n=[]),e.props.actions.treeDropdownField.setVisible(e.props.id,n)})}},{key:"callFetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props,r=S.default.parse(n.data.urlTree,!0);n.data.showSearch&&t.length&&(r.query.search=t,r.query.flatList="1"),e.length?r.query.ID=e[e.length-1]:!n.data.multiple&&n.value&&(r.query.forceValue=n.value),r.query.format="json",r.search=null;var o=S.default.format(r);return(0,v.default)(o,{credentials:"same-origin"}).then(function(e){return e.json()})}},{key:"lazyLoad",value:function(e){var t=this;if(e.find(function(e){return t.props.loading.indexOf(e)>-1||t.props.failed.indexOf(e)>-1}))return Promise.resolve({});var n=this.props.findTreeByPath(this.props.tree,e);return n&&(0===n.count||n.children.length)?Promise.resolve({}):this.loadTree(e)}},{key:"loadTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props;return n.actions.treeDropdownField.beginTreeUpdating(n.id,e),this.callFetch(e,t,n).then(function(t){return n.actions.treeDropdownField.updateTree(n.id,e,t),t}).catch(function(t){if(n.actions.treeDropdownField.updateTreeFailed(n.id,e),"function"==typeof n.onLoadingError)return n.onLoadingError({errors:[{value:t.message,type:"error"}]});throw t})}},{key:"hasSearch",value:function(){return this.props.data.showSearch&&Boolean(this.props.search)}},{key:"filterOptions",value:function(e){var t=this,n=this.getVisibleTree();return e.filter(function(e){if((e.id===A||""===e.id)&&(!t.props.data.hasEmptyDefault||t.props.visible.length||t.hasSearch()))return!1;var r=e.title&&e.title.toLocaleLowerCase(),o=t.props.search.toLocaleLowerCase();return o?r&&r.includes(o):!n||!e.id||n.children.find(function(t){return t.id===e.id})})}},{key:"handleOpen",value:function(){this.setState({opened:!0}),this.handleSearchReset()}},{key:"handleClose",value:function(){this.setState({opened:!1})}},{key:"handleSearchReset",value:function(){clearTimeout(this.searchTimer),this.props.actions.treeDropdownField.setSearch(this.props.id,"")}},{key:"handleSearchChange",value:function(e){var t=this;clearTimeout(this.searchTimer),this.searchTimer=setTimeout(function(){t.props.actions.treeDropdownField.setSearch(t.props.id,e)},500)}},{key:"handleChange",value:function(e){var t=null;if(this.handleSearchReset(),this.props.data.multiple){if(t=M,e&&e.length){var n=e&&e.filter(function(t,n){return e.findIndex(function(e){return e.id===t.id})===n});t=n.map(function(e){return e.id}),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,n)}}else{var r=e?e.id:null,o=this.getVisibleTree()||this.props.tree,i=o.children.find(function(e){return e.id===r});i&&(this.props.data.showSelectedPath&&(i=u({},i,{titlePath:this.getPath(r)})),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,[i])),t=r||A}"function"==typeof this.props.onChange&&this.props.onChange(t)}},{key:"handleNavigate",value:function(e,t){if(e.stopPropagation(),e.preventDefault(),!this.hasSearch()){var n=this.props.findTreePath(this.props.tree,t);n||(n=this.props.visible.slice(0),n.push(t)),this.lazyLoad(n),this.props.actions.treeDropdownField.setVisible(this.props.id,n)}}},{key:"handleKeyDown",value:function(e){if(this.hasSearch())return void(27===e.keyCode&&this.handleSearchReset(e));var t=this.selectField.getFocusedOption();if(t)switch(e.keyCode){case 37:this.handleBack(e);break;case 39:t.count&&this.handleNavigate(e,t.id)}}},{key:"handleBack",value:function(e){if(e.stopPropagation(),e.preventDefault(),!this.hasSearch()){var t=this.props.visible;t.length&&(t=t.slice(0,t.length-1)),this.lazyLoad(t),this.props.actions.treeDropdownField.setVisible(this.props.id,t)}}},{key:"renderMenu",value:function(e){var t=this.getVisibleTree()||{},n=this.props.loading.indexOf(t.id||0)>-1,r=this.props.failed.indexOf(t.id||0)>-1,o=this.getBreadcrumbs();return f.default.createElement(P.default,{loading:n,failed:r,tree:t,breadcrumbs:o,renderMenuOptions:e,onBack:this.handleBack,search:this.hasSearch(),value:this.props.value})}},{key:"renderOption",value:function(e){var t=this,n=null;if(e.count&&!this.hasSearch()){var r=function(n){return t.handleNavigate(n,e.id)};n=f.default.createElement("button",{className:"treedropdownfield__option-button fill-width",onClick:r,onMouseDown:r,onTouchStart:r},f.default.createElement("span",{className:"treedropdownfield__option-count-icon font-icon-right-open-big"}))}var o=function(e){var t=e.children;return f.default.createElement("span",{className:"treedropdownfield__option-title--highlighted"},t)},i=this.props.search.length?(0,F.mapHighlight)(e.title,this.props.search,o):e.title,s=null;return this.hasSearch()&&((s=e.contextString)||!this.props.data.hasEmptyDefault||this.props.visible.length||(s=this.props.data.emptyString)),f.default.createElement("div",{className:"treedropdownfield__option fill-width"},f.default.createElement("div",{className:"treedropdownfield__option-title-box flexbox-area-grow fill-height"},f.default.createElement("span",{className:"treedropdownfield__option-title"},i),s&&f.default.createElement("span",{className:"treedropdownfield__option-context"},s)),n)}},{key:"renderReadOnly",value:function(){var e=this,t={id:this.props.id,readOnly:this.props.readOnly,disabled:this.props.disabled},n=this.props.extraClass?"treedropdownfield "+this.props.extraClass:"treedropdownfield",r=this.props.data.hasEmptyDefault?this.props.data.emptyString:"",o=this.props.selectedValues;if(this.props.data.multiple)r=this.props.value.map(function(e){return o.find(function(t){return t.id===e})||e}).map(function(e){return e.title}).join(", ");else{var i=o.find(function(t){return t.id===e.props.value});r=this.props.value,i&&"string"==typeof i.title&&(r=i.title)}return f.default.createElement("div",{className:n},f.default.createElement("span",{className:"treedropdownfield__title"},r),f.default.createElement(k.Input,u({type:"hidden",name:this.props.name,value:this.props.value},t)))}},{key:"render",value:function(){var e=this;if(this.props.readOnly||this.props.disabled)return this.renderReadOnly();var t={id:this.props.id},n=this.props.extraClass?"treedropdownfield "+this.props.extraClass:"treedropdownfield",r=this.getDropdownOptions(),o=this.props.value;this.props.data.multiple&&(o=this.props.value?this.props.selectedValues.filter(function(e){return o.includes(e.id)}):[]);var i=this.props.data.hasEmptyDefault&&!this.props.visible.length?"":null,s=void 0!==this.props.data.showSearch&&this.props.data.showSearch;return f.default.createElement(j.default,{searchable:s,multi:this.props.data.multiple,className:n,name:this.props.name,options:r,inputProps:t,menuRenderer:this.renderMenu,filterOptions:this.filterOptions,optionRenderer:this.renderOption,onChange:this.handleChange,onOpen:this.handleOpen,onClose:this.handleClose,onBlurResetsInput:!0,onInputKeyDown:this.handleKeyDown,onInputChange:this.handleSearchChange,isLoading:Boolean(this.props.loading.length),value:o,resetValue:i,joinValues:!0,ref:function(t){e.selectField=t},placeholder:this.props.data.emptyString,labelKey:"title",valueKey:"id"})}}]),t}(p.Component);R.propTypes={extraClass:p.PropTypes.string,id:p.PropTypes.string,name:p.PropTypes.string.isRequired,onChange:p.PropTypes.func,value:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.number,p.PropTypes.array]),readOnly:p.PropTypes.bool,disabled:p.PropTypes.bool,tree:p.PropTypes.shape(C.default.propTypes),findTreeByPath:p.PropTypes.func,findTreePath:p.PropTypes.func,visible:p.PropTypes.array,loading:p.PropTypes.array,failed:p.PropTypes.array,selectedValues:p.PropTypes.array,data:p.PropTypes.shape({cacheKey:p.PropTypes.string,urlTree:p.PropTypes.string.isRequired,emptyString:p.PropTypes.string,valueObject:p.PropTypes.shape(C.default.propTypes),valueObjects:p.PropTypes.arrayOf(p.PropTypes.shape(C.default.propTypes)),hasEmptyDefault:p.PropTypes.bool,showSearch:p.PropTypes.bool,multiple:p.PropTypes.bool,showSelectedPath:p.PropTypes.bool}),onLoadingError:p.PropTypes.func,search:p.PropTypes.string,actions:p.PropTypes.shape({treeDropdownField:p.PropTypes.object})},R.defaultProps={value:"",extraClass:"",className:"",tree:{},visible:[],loading:[],failed:[],findTreeByPath:D.findTreeByPath,findTreePath:D.findTreePath};var I=(0,h.connect)(l,c)(R);t.Component=R,t.ConnectedTreeDropdownField=I,t.MULTI_EMPTY_VALUE=M,t.SINGLE_EMPTY_VALUE=A,t.findTreePath=D.findTreePath,t.findTreeByID=D.findTreeByID,t.findTreeByPath=D.findTreeByPath,t.default=(0,b.default)(I)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/TreeDropdownField/TreeDropdownFieldMenu.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.props)}},{key:"handleSubmit",value:function(e,t,n){var r=this,o=null,i=function(){return n().then(function(e){var t=e;if(t){var n=void 0!==t.state;if(t=r.reduceSchemaErrors(t),r.props.actions.schema.setSchema(r.props.schemaUrl,t,r.getIdentifier()),n){var o=t.schema||r.props.schema.schema,i=(0,O.default)(o,t.state);r.props.actions.reduxForm.initialize(r.getIdentifier(),i)}}return t})};if(!(o="function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,i):i()))throw new Error("Promise was not returned for submitting");return o.then(function(e){if(!e||!e.state)return e;var t=r.getMessages(e.state);if(Object.keys(t).length)throw new w.SubmissionError(t);return e})}},{key:"reduceSchemaErrors",value:function(e){if(!e.errors)return e;var t=u({},e);return t.state||(t=u({},t,{state:this.props.schema.state})),t=u({},t,{state:u({},t.state,{fields:t.state.fields.map(function(t){var n=e.errors.find(function(e){return e.field===t.name});return n&&(n=(0,P.createErrorHtml)([n.value])),u({},t,{message:n})})}),messages:e.errors.filter(function(e){return!e.field})}),delete t.errors,(0,j.default)(t)}},{key:"overrideStateData",value:function(e){if(!this.props.stateOverrides||!e)return e;var t=this.props.stateOverrides.fields,n=e.fields;return t&&n&&(n=n.map(function(e){var n=t.find(function(t){return t.name===e.name});return n?S.default.recursive(!0,e,n):e})),Object.assign({},e,this.props.stateOverrides,{fields:n})}},{key:"callFetch",value:function(e){return(0,v.default)(this.props.schemaUrl,{headers:{"X-FormSchema-Request":e.join(","),Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.status>=200&&e.status<300?e.json():new Promise(function(t,n){return e.json().then(function(t){n({status:e.status,statusText:e.statusText,json:t})}).catch(function(){n({status:e.status,statusText:e.statusText,json:{}})})})})}},{key:"fetch",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.props.loading)return Promise.resolve({});var o=["auto",e&&"schema",n&&"state",r&&"errors"].filter(function(e){return e});return this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!0),"function"==typeof this.props.onFetchingSchema&&this.props.onFetchingSchema(),this.callFetch(o).then(function(e){if(t.props.actions.schema.setSchemaLoading(t.props.schemaUrl,!1),e.errors?"function"==typeof t.props.onLoadingError&&t.props.onLoadingError(e):"function"==typeof t.props.onLoadingSuccess&&t.props.onLoadingSuccess(),void 0!==e.id&&e.state){var n=Object.assign({},e,{state:t.overrideStateData(e.state)});t.props.actions.schema.setSchema(t.props.schemaUrl,n,a(u({},t.props,{schema:u({},t.props.schema,n)})));var r=e.schema||t.props.schema.schema,o=(0,O.default)(r,n.state);return t.props.actions.reduxForm.initialize(t.getIdentifier(),o,!1,{keepSubmitSucceeded:!0}),n}return e}).catch(function(e){if(t.props.actions.schema.setSchemaLoading(t.props.schemaUrl,!1),"function"==typeof t.props.onLoadingError)return t.props.onLoadingError(t.normaliseError(e));throw e})}},{key:"normaliseError",value:function(e){return e.json&&e.json.errors?e.json:e.status&&e.statusText?{errors:[{code:e.status,value:e.statusText,type:"error"}]}:{errors:[{value:e.message||f.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred."),type:"error"}]}}},{key:"handleAutofill",value:function(e,t){this.props.actions.reduxForm.autofill(this.getIdentifier(),e,t)}},{key:"render",value:function(){var e=this.props.loadingComponent;if(!this.props.schema||!this.props.schema.schema||this.props.loading)return m.default.createElement(e,{containerClass:"loading--form flexbox-area-grow"});var t=Object.assign({},this.props,{form:this.getIdentifier(),onSubmitSuccess:this.props.onSubmitSuccess,onSubmit:this.handleSubmit,onAutofill:this.handleAutofill,autoFocus:this.props.autoFocus});return m.default.createElement(F.default,t)}}]),t}(h.Component);N.propTypes=Object.assign({},k.basePropTypes,{actions:h.PropTypes.shape({schema:h.PropTypes.object,reduxFrom:h.PropTypes.object}),autoFocus:h.PropTypes.bool,identifier:h.PropTypes.string.isRequired,schemaUrl:h.PropTypes.string.isRequired,schema:k.schemaPropType,form:h.PropTypes.string,submitting:h.PropTypes.bool,onFetchingSchema:h.PropTypes.func,loadingComponent:h.PropTypes.oneOfType([h.PropTypes.func,h.PropTypes.node]).isRequired}),t.Component=N,t.default=(0,b.compose)((0,A.inject)(["ReduxForm","ReduxFormField","Loading"],function(e,t,n){return{loadingComponent:n,baseFormComponent:e,baseFieldComponent:t}},function(e){return e.identifier}),(0,y.connect)(l,c))(N)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/containers/InsertLinkModal/InsertLinkModal.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return{actions:{schema:(0,d.bindActionCreators)(g,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createInsertLinkModal=t.InsertLinkModal=void 0;var l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;if(e){if(e.schemaUrl){var t=Object.assign({},e.fileAttributes);delete t.ID;var n={fields:Object.entries(t).map(function(e){var t=c(e,2);return{name:t[0],value:t[1]}})};this.props.actions.schema.setSchemaStateOverrides(e.schemaUrl,n)}}else{var r=this.props.schemaUrl;r&&this.props.actions.schema.setSchemaStateOverrides(r,null)}}},{key:"render",value:function(){var e=this.props.Component,t=Object.assign({},this.props);return delete t.Component,p.default.createElement(e,l({setOverrides:this.setOverrides},t))}}]),t}(d.Component);b.propTypes={fileAttributes:d.PropTypes.object,Component:d.PropTypes.oneOfType([d.PropTypes.element,d.PropTypes.func]),schemaUrl:d.PropTypes.string,actions:d.PropTypes.object};var g=(0,y.connect)(function(){return{}},s())(b);t.FileSchemaHandler=b,t.ConnectedFileSchemaHandler=g,t.default=a},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Backend.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=null;if(!(e.status>=200&&e.status<300))throw t=new Error(e.statusText),t.response=e,t;return e}function a(e){var t=null;if(e instanceof FormData||"string"==typeof e)t=e;else{if(!e||"object"!==(void 0===e?"undefined":m(e)))throw new Error("Invalid body type");t=JSON.stringify(e)}return t}function l(e,t){switch(e){case"application/x-www-form-urlencoded":return j.default.stringify(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t);default:throw new Error("Can't encode format: "+e)}}function c(e,t){switch(e){case"application/x-www-form-urlencoded":return j.default.parse(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t);default:throw new Error("Can't decode format: "+e)}}function u(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function d(e){return e.text().then(function(t){return c(e.headers.get("Content-Type"),t)})}function p(e,t){return Object.keys(t).reduce(function(n,r){var o=e[r];return!o||!0!==o.remove&&!0!==o.querystring?Object.assign(n,i({},r,t[r])):n},{})}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{setFromData:!1},o=t;return o=u(o,l("application/x-www-form-urlencoded",Object.keys(n).reduce(function(t,o){var s=e[o],a=!0===r.setFromData&&!(s&&!0===s.remove),l=s&&!0===s.querystring&&!0!==s.remove;return a||l?Object.assign(t,i({},o,n[o])):t},{}))),o=Object.keys(e).reduce(function(t,r){var o=e[r].urlReplacement;return o?t.replace(o,n[r]):t},o)}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Object.assign({},r,{Accept:n.responseFormat,"Content-Type":n.payloadFormat}),i=T.default.recursive({},n.defaultData,e),s=f(n.payloadSchema,n.url,i,{setFromData:"get"===n.method.toLowerCase()}),a="get"!==n.method.toLowerCase()?l(n.payloadFormat,p(n.payloadSchema,i)):"",c="get"===n.method.toLowerCase()?[s,o]:[s,a,o];return t[n.method.toLowerCase()].apply(t,c).then(d)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(s)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",credentials:"same-origin",body:a(t),headers:Object.assign({},r,n)}).then(s)}},{key:"put",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,{method:"put",credentials:"same-origin",body:a(t),headers:n}).then(s)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,{method:"delete",credentials:"same-origin",body:a(t),headers:n}).then(s)}}]),e}(),P=new O;t.default=P},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Config.js':function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[],n=this.findChildRoute(t),r=Object.assign({},{childRoutes:[]},e),o=r.childRoutes[r.childRoutes.length-1];o&&"**"===o.path||(o={path:"**"},r.childRoutes.push(o));var i=n.findIndex(function(t){return t.path===e.path});i>=0?n[i]=r:n.unshift(r)}},{key:"findChildRoute",value:function(e){var t=this.childRoutes;return e&&e.forEach(function(e){var n=t.find(function(t){return t.path===e});if(!n)throw new Error("Parent path "+e+" could not be found.");t=n.childRoutes}),t}},{key:"getRootRoute",value:function(){return this.rootRoute}},{key:"getChildRoutes",value:function(){return this.childRoutes}},{key:"remove",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.findChildRoute(t),r=n.findIndex(function(t){return t.path===e});return r<0?null:n.splice(r,1)[0]}}]),e}();window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new i,t.default=window.ss.routeRegister},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Router.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=c.default.getAbsoluteBase(),n=d.default.resolve(t,e);return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function i(e){return new c.default.Route(e).match(c.default.current,{})}function s(){return c.default.absoluteBaseURL}function a(e){c.default.absoluteBaseURL=e;var t=document.createElement("a");t.href=e;var n=t.pathname;n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n="/"+n),c.default.base(n)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(43),c=r(l),u=n("./node_modules/url/url.js"),d=r(u);c.default.oldshow||(c.default.oldshow=c.default.show),c.default.setAbsoluteBase=a.bind(c.default),c.default.getAbsoluteBase=s.bind(c.default),c.default.resolveURLToBase=o.bind(c.default),c.default.show=function(e){return function(t,n,r,o){return e(c.default.resolveURLToBase(t),n,r,o)}}(c.default.oldshow),c.default.routeAppliesToCurrentLocation=i,window.ss=window.ss||{},window.ss.router=window.ss.router||c.default,t.default=window.ss.router},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/ShortcodeSerialiser.js':function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(o),s=function(e){return e.toString().slice(1,-1)},a=s(/((?:[,\s]+(?:[a-z0-9\-_]+)=(?:(?:[a-z0-9\-_]+)|(?:\d+\.\d+)|(?:'[^']*')|(?:"[^"]*")))*)/),l=/[,\s]+([a-z0-9\-_]+)=(?:([a-z0-9\-_]+)|(\d+\.\d+)|(?:'([^']*)')|(?:"([^"]*)"))/,c=s(/\[%s/),u=s(/\[\s*\/\s*%s\s*]/),d=s(/((?:.|\n|)*?)/),p=s(/\s*/),f={match:function(e,t,n){var r=i.default.sprintf(c,e),o=""+r+a+p+"\\]";t&&(o=""+o+d+i.default.sprintf(u,e));var s=new RegExp(o,"i"),l=s.exec(n);return l?{name:e,wrapped:t,properties:this.parseProperties(l[1]),original:l[0],content:t?l[2]:null}:null},parseProperties:function(e){for(var t=e,n={},r=t.match(l);r;){var o=r[1]||"",i=r[2]||r[3]||r[4]||r[5]||"";o&&(n[o]=i);var s=t.indexOf(r[0]);t=t.substr(s+r[0].length),r=t.match(l)}return n},serialise:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?{sep:",",quote:"",replacer:/[^a-z0-9\-_.]/gi}:{sep:" ",quote:'"',replacer:/"/g},o=Object.entries(e.properties).map(function(e){var t=r(e,2),o=t[0],i=t[1];return i?""+n.sep+o+"="+n.quote+(""+i).replace(n.replacer,"")+n.quote:null}).filter(function(e){return null!==e}).join("");return e.wrapped?"["+e.name+o+"]"+e.content+"[/"+e.name+"]":"["+e.name+o+"]"}};t.default=f},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/SilverStripeComponent.js':function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;nt.text.toLocaleLowerCase()})}},{key:"addCommandWithUrlTest",value:function(e,t){return this.editorCommandsToUrlTestsMap[e]=t,this}},{key:"setDefaultCommand",value:function(e){return this.defaultCommand=e,this}},{key:"getDefaultCommand",value:function(){return this.defaultCommand}},{key:"getEditorCommandFromUrl",value:function(e){var t=this,n=this.getDefaultCommand(),r=Object.keys(this.editorCommandsToUrlTestsMap),o=r.find(function(n){return t.editorCommandsToUrlTestsMap[n]&&t.editorCommandsToUrlTestsMap[n].test(e)});return o&&(n=o),n}}]),e}();window.ss=window.ss||{},window.ss.tinymceactions=window.ss.tinymceactions||new s,t.default=window.ss.tinymceactions},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/formatWrittenNumber.js':function(e,t,n){"use strict";function r(e){var t=Number(e);return null!==e&&t>=0&&t<10?[i.default._t("Admin.WRITTEN_NUMBER_ZERO","zero"),i.default._t("Admin.WRITTEN_NUMBER_ONE","one"),i.default._t("Admin.WRITTEN_NUMBER_TWO","two"),i.default._t("Admin.WRITTEN_NUMBER_THREE","three"),i.default._t("Admin.WRITTEN_NUMBER_FOUR","four"),i.default._t("Admin.WRITTEN_NUMBER_FIVE","five"),i.default._t("Admin.WRITTEN_NUMBER_SIX","six"),i.default._t("Admin.WRITTEN_NUMBER_SEVEN","seven"),i.default._t("Admin.WRITTEN_NUMBER_EIGHT","eight"),i.default._t("Admin.WRITTEN_NUMBER_NINE","nine")][t]:t?String(t):null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(o)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/getFormState.js':function(e,t,n){"use strict";function r(e){return e.form&&e.form.formState||{}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/reduxFieldReducer.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(o){if(!t.payload.fieldId)throw new Error("Invalid fieldId");var i=e.fields||{},a=i[t.payload.fieldId]?e.fields[t.payload.fieldId]:n;return(0,s.default)(Object.assign({},e,{fields:Object.assign({},i,r({},t.payload.fieldId,Object.assign({},a,o(a))))}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(11),s=function(e){return e&&e.__esModule?e:{default:e}}(i)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/schemaFieldValues.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return void 0===t?e:l.default.recursive(!0,e,t)}function i(e,t){return e?e.reduce(function(e,n){return e||i(n.children,t)},e.find(function(e){return e.name===t})):null}function s(e,t){return t?t.fields.reduce(function(t,n){var o=i(e.fields,n.name);return o?"Structural"===o.type||!0===o.readOnly?t:Object.assign({},t,r({},o.name,n.value)):t},{}):{}}Object.defineProperty(t,"__esModule",{value:!0}),t.schemaMerge=o,t.findField=i,t.default=s;var a=n(21),l=function(e){return e&&e.__esModule?e:{default:e}}(a)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/breadcrumbs/BreadcrumbsActions.js':function(e,t,n){"use strict";function r(e){return{type:i.default.SET_BREADCRUMBS,payload:{breadcrumbs:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setBreadcrumbs=r;var o=n("./client/src/state/breadcrumbs/BreadcrumbsActionTypes.js"),i=function(e){return e&&e.__esModule?e:{default:e}}(o)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/records/RecordsActionTypes.js':function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/records/RecordsActions.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return Object.keys(t).reduce(function(e,n){return e.replace(":"+n,t[n])},e)}function i(e,t,n){var r={recordType:e},i={Accept:"application/json"},s=t.toLowerCase();return function(t){t({type:d.default.FETCH_RECORDS_REQUEST,payload:r});var a="get"===s?[o(n,r),i]:[o(n,r),{},i];return c.default[s].apply(c.default,a).then(function(e){return e.json()}).then(function(n){t({type:d.default.FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:n}})}).catch(function(n){throw t({type:d.default.FETCH_RECORDS_FAILURE,payload:{error:n,recordType:e}}),n})}}function s(e,t,n){var r={recordType:e},i={Accept:"application/json"},s=t.toLowerCase();return function(t){t({type:d.default.FETCH_RECORD_REQUEST,payload:r});var a="get"===s?[o(n,r),i]:[o(n,r),{},i];return c.default[s].apply(c.default,a).then(function(e){return e.json()}).then(function(n){t({type:d.default.FETCH_RECORD_SUCCESS,payload:{recordType:e,data:n}})}).catch(function(n){throw t({type:d.default.FETCH_RECORD_FAILURE,payload:{error:n,recordType:e}}),n})}}function a(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s={recordType:e,id:t},a=n.toLowerCase(),l="get"===a?[o(r,s),i]:[o(r,s),{},i];return function(n){return n({type:d.default.DELETE_RECORD_REQUEST,payload:s}),c.default[a].apply(c.default,l).then(function(){n({type:d.default.DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})}).catch(function(r){throw n({type:d.default.DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}}),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetchRecords=i,t.fetchRecord=s,t.deleteRecord=a;var l=n(27),c=r(l),u=n("./client/src/state/records/RecordsActionTypes.js"),d=r(u)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/schema/SchemaActions.js':function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:l.default.SET_SCHEMA,payload:s({},t,{id:e,name:n})}}function o(e,t){return{type:l.default.SET_SCHEMA_STATE_OVERRIDES,payload:{id:e,stateOverride:t}}}function i(e,t){return{type:l.default.SET_SCHEMA_LOADING,payload:{id:e,loading:t}}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0}},{key:"handleBeforeUnload",value:function(){if(this.shouldConfirmBeforeUnload())return k.default._t("Admin.CONFIRMUNSAVEDSHORT","WARNING: Your changes have not been saved.")}},{key:"handleBeforeRoute",value:function(){if(this.shouldConfirmBeforeUnload())return k.default._t("Admin.CONFIRMUNSAVED","Are you sure you want to navigate away\n from this page?\n\nWARNING: Your changes have not been saved.\n\n\n Press OK to continue, or Cancel to stay on the current page.")}}]),e}();t.default=M},"./client/src/boot/apollo/buildCache.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./node_modules/apollo-cache-inmemory/lib/index.js"),o=n("./client/src/boot/apollo/dataIdFromObject.js"),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a=function(e){return new r.InMemoryCache({fragmentMatcher:e?new r.IntrospectionFragmentMatcher({introspectionQueryResultData:e}):null,dataIdFromObject:i.default,addTypename:!0})};t.default=a},"./client/src/boot/apollo/buildClient.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0&&e.__typename?e.__typename+":"+t:null};t.default=r},"./client/src/boot/apollo/getGraphqlFragments.js":function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(16),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a=function(e){var t=e.data;return t.__schema.types=t.__schema.types.filter(function(e){return null!==e.possibleTypes}),t},s=function(e){if(!e.ok)throw new Error("The types.graphql file could not be loaded. You probably need to run a ?flush to generate it.\n Alternatively, you can use the IntrospectionProvider extension to generate the file dynamically.\n More information: https://github.com/silverstripe/silverstripe-graphql/#schema-introspection");return e},l=function(){var e=r(regeneratorRuntime.mark(function e(t){var n,o,l,c,u,d,f=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[t+"assets/admin.types.graphql",t+"admin/graphql/types"],f||n.reverse(),o=n[0],l=n[1],c={method:"GET",headers:{"Content-Type":"application/json"},uri:""+t,credentials:"same-origin"},u=function(){var e=r(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.default)(t,c).then(s).then(function(e){return e.json()}).then(a));case 1:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}(),d=void 0,e.prev=6,e.next=9,u(o);case 9:d=e.sent,e.next=23;break;case 12:return e.prev=12,e.t0=e.catch(6),e.prev=14,e.next=17,u(l);case 17:d=e.sent,e.next=23;break;case 20:return e.prev=20,e.t1=e.catch(14),e.abrupt("return",Promise.reject(e.t1));case 23:return e.abrupt("return",Promise.resolve(d));case 24:case"end":return e.stop()}},e,void 0,[[6,12],[14,20]])}));return function(t){return e.apply(this,arguments)}}();t.default=l},"./client/src/boot/applyDevtools.js":function(e,t,n){"use strict";function r(e){var t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,n=window.__REDUX_DEVTOOLS_EXTENSION__||window.devToolsExtension;return"function"==typeof t?t(e):"function"==typeof n?(0,o.compose)(e,n()):e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(9)},"./client/src/boot/applyTransforms.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=e.extraClass?e.extraClass.split(" ").reduce(function(e,t){return i({},e,o({},t,!0))},{}):{};"string"==typeof e.data.pristineClass&&(n[e.data.pristineClass]=t),"string"==typeof e.data.dirtyClass&&(n[e.data.dirtyClass]=!t);var r=t?e.data.pristineTitle:e.data.dirtyTitle,a=t?e.data.pristineIcon:e.data.dirtyIcon;return i({},e,{title:r||e.title,icon:a||e.icon,extraClass:(0,d.default)(n)})},b=function(){s.default.transform("field-holders",function(e){["FieldGroup"].forEach(function(t){return e.component("FieldGroup",h.default,t+"Holder")})}),s.default.transform("form-action-changed",function(e){e.form.alterSchema("*",function(e){return e.mutateField("action_save",function(t){var n=e.isPristine();return m(t,n)}),e.mutateField("action_publish",function(t){var n=t.data.isPublished&&!t.data.isModified&&e.isPristine();return m(t,n)}),e.getState()})}),s.default.transform("schema-validation",function(e){e.form.addValidation("*",function(e,t,n){var r=new c.default(e),a=Object.keys(e).reduce(function(e,t){var a=(0,f.findField)(n.fields,t),s=r.validateFieldSchema(a),l=s.valid,c=s.errors;return l?e:i({},e,o({},t,c))},{});return t.addErrors(a),t.getState()})})};t.default=b},"./client/src/boot/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var i=function(){var e=o(regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.default.get("absoluteBaseUrl"),e.next=3,(0,b.default)(t);case 3:n=e.sent,(0,y.default)(),(0,j.default)(),r=[f.default],o=h.default.get("debugging"),i=u.applyMiddleware.apply(void 0,r),o&&(i=(0,O.default)(i)),a=i(u.createStore),window.ss.apolloClient=n,l=new s.default(null,n),(0,C.default)(),c.default.ready(function(){var e=(0,u.combineReducers)(c.default.reducer.getAll()),t=a(e,{});t.dispatch((0,g.setConfig)(h.default.getAll())),c.default.reducer.setStore(t),window.ss.store=t,l.setStore(t),l.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")}),window.setTimeout(function(){return c.default.load()},0);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),a=n("./client/src/boot/BootRoutes.js"),s=r(a),l=n(7),c=r(l),u=n(9),d=n(50),f=r(d),p=n(23),h=r(p),m=n("./client/src/boot/apollo/buildClient.js"),b=r(m),g=n("./client/src/state/config/ConfigActions.js"),v=n("./client/src/boot/registerComponents.js"),y=r(v),_=n("./client/src/boot/registerReducers.js"),j=r(_),w=n("./client/src/boot/applyDevtools.js"),O=r(w),E=n("./client/src/boot/applyTransforms.js"),C=r(E);window.ss=window.ss||{},window.onload=i},"./client/src/boot/registerComponents.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),i=n(7),a=r(i),s=n("./client/src/components/ActionMenu/ActionMenu.js"),l=r(s),c=n(36),u=r(c),d=n("./client/src/components/TextField/TextField.js"),f=r(d),p=n("./client/src/components/HiddenField/HiddenField.js"),h=r(p),m=n("./client/src/components/DateField/DateField.js"),b=r(m),g=n("./client/src/components/TimeField/TimeField.js"),v=r(g),y=n("./client/src/components/DatetimeField/DatetimeField.js"),_=r(y),j=n("./client/src/components/CheckboxField/CheckboxField.js"),w=r(j),O=n("./client/src/components/CheckboxSetField/CheckboxSetField.js"),E=r(O),C=n("./client/src/components/OptionsetField/OptionsetField.js"),T=r(C),x=n(41),S=r(x),k=n("./client/src/components/GridFieldActions/GridFieldActions.js"),F=r(k),P=n("./client/src/components/SingleSelectField/SingleSelectField.js"),D=r(P),M=n("./client/src/components/PopoverField/PopoverField.js"),A=r(M),R=n("./client/src/components/HeaderField/HeaderField.js"),I=r(R),N=n(42),L=r(N),B=n("./client/src/components/HtmlReadonlyField/HtmlReadonlyField.js"),U=r(B),H=n("./client/src/components/LookupField/LookupField.js"),V=r(H),G=n("./client/src/components/CompositeField/CompositeField.js"),q=r(G),z=n("./client/src/components/LabelField/LabelField.js"),$=r(z),W=n("./client/src/components/Tabs/Tabs.js"),K=r(W),X=n("./client/src/components/Tabs/TabItem.js"),Y=r(X),Q=n(38),J=r(Q),Z=n("./client/src/components/FieldGroup/FieldGroup.js"),ee=r(Z),te=n(34),ne=r(te),re=n(31),oe=r(re),ie=n("./client/src/components/NotFoundComponent/NotFoundComponent.js"),ae=r(ie),se=n("./client/src/components/Form/Form.js"),le=r(se),ce=n(21),ue=r(ce),de=n(45),fe=r(de),pe=n("./client/src/containers/Form/Form.js"),he=r(pe),me=n("./client/src/components/UsedOnTable/UsedOnTable.js"),be=r(me),ge=n(43),ve=r(ge),ye=n(55),_e=r(ye),je=n(25),we=r(je),Oe=n(26),Ee=r(Oe),Ce=n(33),Te=r(Ce),xe=n(29),Se=r(xe),ke=n(52),Fe=r(ke),Pe=n(53),De=r(Pe),Me=n("./client/src/components/HtmlEditorField/HtmlEditorField.js"),Ae=r(Me);t.default=function(){a.default.component.registerMany({ActionMenu:l.default,Badge:u.default,TextField:f.default,HiddenField:h.default,DateField:b.default,TimeField:v.default,DatetimeField:_.default,CheckboxField:w.default,CheckboxSetField:E.default,OptionsetField:T.default,GridField:S.default,GridFieldActions:F.default,FieldGroup:ee.default,SingleSelectField:D.default,PopoverField:A.default,HeaderField:I.default,LiteralField:L.default,HtmlReadonlyField:U.default,LookupField:V.default,CompositeField:q.default,Tabs:K.default,TabItem:Y.default,FormAction:J.default,LabelField:$.default,TreeDropdownField:ne.default,Preview:fe.default,ReduxForm:he.default,ReduxFormField:o.Field,Form:le.default,FormAlert:ue.default,FormBuilderModal:oe.default,NotFoundComponent:ae.default,UsedOnTable:be.default,Loading:ve.default,ViewModeToggle:_e.default,ResizeAware:we.default,Tag:Ee.default,TagList:Te.default,CompactTagList:Se.default,Search:Fe.default,SearchToggle:De.default,HtmlEditorField:Ae.default})}},"./client/src/boot/registerReducers.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=(0,s.combineReducers)({formState:l.reducer,formSchemas:p.default});a.default.reducer.registerMany(o({config:d.default,form:t,records:m.default,breadcrumbs:g.default,routing:c.routerReducer,treeDropdownField:y.default,mobileMenu:j.default,unsavedForms:O.default,usedOn:C.default,viewMode:k.default},e)),a.default.transform("admin",function(e){e.reducer("form",x.default)})}},"./client/src/bundles/bundle.js":function(e,t,n){"use strict";n("./client/src/i18n.js"),n("./node_modules/expose-loader/index.js?SilverStripeComponent!./client/src/lib/SilverStripeComponent.js-exposed"),n("./node_modules/expose-loader/index.js?Backend!./client/src/lib/Backend.js-exposed"),n("./node_modules/expose-loader/index.js?schemaFieldValues!./client/src/lib/schemaFieldValues.js-exposed"),n("./node_modules/expose-loader/index.js?FormAlert!./client/src/components/FormAlert/FormAlert.js-exposed"),n("./node_modules/expose-loader/index.js?Injector!./client/src/lib/Injector.js-exposed"),n("./node_modules/expose-loader/index.js?reduxFieldReducer!./client/src/lib/reduxFieldReducer.js-exposed"),n("./node_modules/expose-loader/index.js?getFormState!./client/src/lib/getFormState.js-exposed"),n("./node_modules/expose-loader/index.js?PopoverField!./client/src/components/PopoverField/PopoverField.js-exposed"),n("./node_modules/expose-loader/index.js?FieldHolder!./client/src/components/FieldHolder/FieldHolder.js-exposed"),n("./node_modules/expose-loader/index.js?Form!./client/src/components/Form/Form.js-exposed"),n("./node_modules/expose-loader/index.js?FormConstants!./client/src/components/Form/FormConstants.js-exposed"),n("./node_modules/expose-loader/index.js?FormAction!./client/src/components/FormAction/FormAction.js-exposed"),n("./node_modules/expose-loader/index.js?SchemaActions!./client/src/state/schema/SchemaActions.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilder!./client/src/components/FormBuilder/FormBuilder.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderLoader!./client/src/containers/FormBuilderLoader/FormBuilderLoader.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderModal!./client/src/components/FormBuilderModal/FormBuilderModal.js-exposed"),n("./node_modules/expose-loader/index.js?FileSchemaModalHandler!./client/src/containers/InsertLinkModal/fileSchemaModalHandler.js-exposed"),n("./node_modules/expose-loader/index.js?InsertLinkModal!./client/src/containers/InsertLinkModal/InsertLinkModal.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActions!./client/src/state/records/RecordsActions.js-exposed"),n("./node_modules/expose-loader/index.js?GridField!./client/src/components/GridField/GridField.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldCell!./client/src/components/GridField/GridFieldCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeader!./client/src/components/GridField/GridFieldHeader.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeaderCell!./client/src/components/GridField/GridFieldHeaderCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldRow!./client/src/components/GridField/GridFieldRow.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldTable!./client/src/components/GridField/GridFieldTable.js-exposed"),n("./node_modules/expose-loader/index.js?Accordion!./client/src/components/Accordion/Accordion.js-exposed"),n("./node_modules/expose-loader/index.js?AccordionBlock!./client/src/components/Accordion/AccordionBlock.js-exposed"),n("./node_modules/expose-loader/index.js?HiddenField!./client/src/components/HiddenField/HiddenField.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroup!./client/src/components/ListGroup/ListGroup.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroupItem!./client/src/components/ListGroup/ListGroupItem.js-exposed"),n("./node_modules/expose-loader/index.js?Loading!./client/src/components/Loading/Loading.js-exposed"),n("./node_modules/expose-loader/index.js?TextField!./client/src/components/TextField/TextField.js-exposed"),n("./node_modules/expose-loader/index.js?LiteralField!./client/src/components/LiteralField/LiteralField.js-exposed"),n("./node_modules/expose-loader/index.js?Toolbar!./client/src/components/Toolbar/Toolbar.js-exposed"),n("./node_modules/expose-loader/index.js?Breadcrumb!./client/src/components/Breadcrumb/Breadcrumb.js-exposed"),n("./node_modules/expose-loader/index.js?ResizeAware!./client/src/components/ResizeAware/ResizeAware.js-exposed"),n("./node_modules/expose-loader/index.js?Tag!./client/src/components/Tag/Tag.js-exposed"),n("./node_modules/expose-loader/index.js?TagList!./client/src/components/Tag/TagList.js-exposed"),n("./node_modules/expose-loader/index.js?CompactTagList!./client/src/components/Tag/CompactTagList.js-exposed"),n("./node_modules/expose-loader/index.js?Search!./client/src/components/Search/Search.js-exposed"),n("./node_modules/expose-loader/index.js?SearchToggle!./client/src/components/Search/SearchToggle.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldNode!./client/src/components/TreeDropdownField/TreeDropdownFieldNode.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldMenu!./client/src/components/TreeDropdownField/TreeDropdownFieldMenu.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownField!./client/src/components/TreeDropdownField/TreeDropdownField.js-exposed"),n("./node_modules/expose-loader/index.js?BreadcrumbsActions!./client/src/state/breadcrumbs/BreadcrumbsActions.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActionTypes!./client/src/state/records/RecordsActionTypes.js-exposed"),n("./node_modules/expose-loader/index.js?UnsavedFormsActions!./client/src/state/unsavedForms/UnsavedFormsActions.js-exposed"),n("./node_modules/expose-loader/index.js?Badge!./client/src/components/Badge/Badge.js-exposed"),n("./node_modules/expose-loader/index.js?CheckboxSetField!./client/src/components/CheckboxSetField/CheckboxSetField.js-exposed"),n("./node_modules/expose-loader/index.js?Preview!./client/src/components/Preview/Preview.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeStates!./client/src/state/viewMode/ViewModeStates.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeActions!./client/src/state/viewMode/ViewModeActions.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeToggle!./client/src/components/ViewModeToggle/ViewModeToggle.js-exposed"),n("./node_modules/expose-loader/index.js?Focusedzone!./client/src/components/Focusedzone/Focusedzone.js-exposed"),n("./node_modules/expose-loader/index.js?Config!./client/src/lib/Config.js-exposed"),n("./node_modules/expose-loader/index.js?DataFormat!./client/src/lib/DataFormat.js-exposed"),n("./node_modules/expose-loader/index.js?ReactRouteRegister!./client/src/lib/ReactRouteRegister.js-exposed"),n("./node_modules/expose-loader/index.js?Router!./client/src/lib/Router.js-exposed"),n("./node_modules/expose-loader/index.js?TinyMCEActionRegistrar!./client/src/lib/TinyMCEActionRegistrar.js-exposed"),n("./node_modules/expose-loader/index.js?ShortcodeSerialiser!./client/src/lib/ShortcodeSerialiser.js-exposed"),n("./node_modules/expose-loader/index.js?formatWrittenNumber!./client/src/lib/formatWrittenNumber.js-exposed"),n("./client/src/legacy/sspath.js"),n("./client/src/legacy/ssui.core.js"),n("./client/src/legacy/LeftAndMain.js"),n("./client/src/legacy/LeftAndMain.ActionTabSet.js"),n("./client/src/legacy/LeftAndMain.Panel.js"),n("./client/src/legacy/LeftAndMain.Tree.js"),n("./client/src/legacy/LeftAndMain.Content.js"),n("./client/src/legacy/LeftAndMain.EditForm.js"),n("./client/src/legacy/LeftAndMain.Menu.js"),n("./client/src/legacy/LeftAndMain.MobileMenuToggle.js"),n("./client/src/legacy/LeftAndMain.Preview.js"),n("./client/src/legacy/LeftAndMain.BatchActions.js"),n("./client/src/legacy/LeftAndMain.FieldHelp.js"),n("./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js"),n("./client/src/legacy/LeftAndMain.TreeDropdownField.js"),n("./client/src/legacy/AddToCampaignForm.js"),n("./client/src/legacy/SecurityAdmin.js"),n("./client/src/legacy/ModelAdmin.js"),n("./client/src/legacy/ConfirmedPasswordField.js"),n("./client/src/legacy/SelectionGroup.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/ToggleCompositeField.js"),n("./client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js"),n("./client/src/legacy/UsedOnTable/UsedOnTableEntwine.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/DatetimeField.js"),n("./client/src/legacy/HtmlEditorField.js"),n("./client/src/legacy/TabSet.js"),n("./client/src/legacy/GridField.js"),n("./client/src/boot/index.js")},"./client/src/components/ActionMenu/ActionMenu.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t-1,title:e.title,type:"checkbox"}}},{key:"handleChange",value:function(e,t){var n=this;if("function"==typeof this.props.onChange){var r=this.getValues(),o=this.props.source.filter(function(e,o){return n.getItemKey(e,o)===t.id?1===t.value:r.indexOf(""+e.value)>-1}).map(function(e){return""+e.value});this.props.onChange(e,{id:this.props.id,value:o})}}},{key:"render",value:function(){var e=this;return this.props.source?u.default.createElement("div",null,this.props.source.map(function(t,n){return u.default.createElement(f.default,s({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);g.propTypes={className:b.default.string,extraClass:b.default.string,itemClass:b.default.string,id:b.default.string,name:b.default.string.isRequired,source:b.default.arrayOf(b.default.shape({value:b.default.oneOfType([b.default.string,b.default.number]),title:b.default.any,disabled:b.default.bool})),onChange:b.default.func,value:b.default.any,readOnly:b.default.bool,disabled:b.default.bool},g.defaultProps={extraClass:"",className:"",value:[]},t.Component=g,t.default=(0,h.default)(g)},"./client/src/components/CompositeField/CompositeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?this.renderMultipleActions(e):1===e.length?this.renderSingleAction(e[0]):null}}]),t}(l.PureComponent),_=f.default.propTypes;_.group=v.default.string,y.propTypes=v.default.arrayOf(v.default.shape(_)).isRequired,t.default=y},"./client/src/components/GridFieldActions/GridFieldDropdownAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return e&&Object.keys(e).length>0}function u(e,t){var n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};var r=n.name,o=(0,S.default)((0,D.default)(e),r),i=o&&o.values||{},a=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:i,formIsDirty:(0,C.isDirty)(r,D.default)(e),schemaName:r,tagData:a}}function d(e){return{actions:{schema:(0,j.bindActionCreators)(O,e),reduxForm:(0,j.bindActionCreators)({reset:E.reset,initialize:E.initialize,change:T.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],n={};return!t&&this.state.searchText&&(n[this.props.name]=this.state.searchText.trim()),Object.keys(this.props.formData).forEach(function(t){var r=e.props.formData[t];r&&(n[t]=r)}),n}},{key:"handleChange",value:function(e){var t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});var n=this.props,r=n.schemaName,o=n.formData,i=n.name,a=n.actions;void 0!==o[i]&&a.reduxForm.change(r,i,t)}},{key:"focusInput",value:function(){if(this.state.display!==G.NONE){var e=_.default.findDOMNode(this);if(e){var t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}}}},{key:"focusFirstFormField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input, textarea, select, button";if(this.state.display===G.EXPANDED){var t=_.default.findDOMNode(this);if(t){var n=t.querySelector(".search-form");if(n){var r=n.querySelector(e);r&&(r.focus(),r.select&&r.select())}}}}},{key:"clearFormData",value:function(e){""!==this.state.searchText&&this.setState({searchText:""});var t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){var n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,null),this.props.actions.reduxForm.initialize(n,{},Object.keys(this.props.formData)),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=i({},e,void 0);Array.isArray(t.linkedFields)&&t.linkedFields.forEach(function(e){n[e]=void 0}),this.doSearch(n)}},{key:"focusFormFilter",value:function(e){var t=this,n=this.props.tagData[e],r=n.focusSelector||"[name="+e+"]";this.expand(),setTimeout(function(){return t.focusFirstFormField(r)},50)}},{key:"open",value:function(){this.show(),this.focusInput()}},{key:"hide",value:function(){this.props.onHide?this.props.onHide():this.state.display!==G.NONE&&this.setState({display:G.NONE})}},{key:"show",value:function(){this.state.display!==G.VISIBLE&&this.setState({display:G.VISIBLE});var e=this.props,t=e.schemaName,n=e.formData,r=e.name,o=e.actions;void 0!==n[r]&&o.reduxForm.change(t,r,this.state.searchText)}},{key:"expand",value:function(){this.state.display!==G.EXPANDED&&this.setState({display:G.EXPANDED})}},{key:"toggle",value:function(){switch(this.state.display){case G.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case G.EXPANDED:this.show()}}},{key:"searchTermIsDirty",value:function(){var e=this.state,t=e.searchText,n=e.initialSearchText;return t.trim()!==n.trim()}},{key:"doSearch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.getData(),e),n=t[this.props.name]||"",r=Object.assign({},this.getData(!0),e);this.state.display===G.VISIBLE&&this.state.initialSearchText===n&&this.state.searchText===n||this.setState({display:G.VISIBLE,initialSearchText:n,searchText:n}),this.props.actions.schema.setSchemaStateOverrides(this.props.schemaUrl,null),this.props.actions.reduxForm.initialize(this.props.schemaName,r),this.props.onSearch(t)}},{key:"clearFilters",value:function(){this.clearFormData(),this.focusFirstFormField()}},{key:"clearSearchBox",value:function(){this.clearFormData(),this.focusInput()}},{key:"formatTagData",value:function(){var e=this.props,t=e.tagData,n=e.name;return t&&t[n]&&delete t[n],t?Object.values(t).map(function(e){return{key:e.key,label:e.label,value:e.value}}):[]}},{key:"render",value:function(){var e=this.props,t=e.formSchemaUrl,n=e.forceFilters,r=e.id,i=e.displayBehavior,a=e.identifier,s=e.formIsDirty,l=(e.tagData,o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData"]));if(this.state.display===G.NONE)return i===q.TOGGLABLE?g.default.createElement(L.default,{onToggle:this.show}):g.default.createElement("div",null);var c=r+"_ExtraFields",u=this.state.searchText,d=this.state.display===G.EXPANDED,p=[q.HIDEABLE,q.TOGGLABLE].includes(i),h=s||this.searchTermIsDirty(),m=this.getData(),b=Object.keys(m).length>0;return g.default.createElement(F.default,{onClickOut:this.show,className:"search"},g.default.createElement(A.default,f({},l,{onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:u,hideable:p,expanded:d,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:h,clearable:b,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),g.default.createElement(I.default,{id:c,identifier:a,expanded:d,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:b})))}}]),t}(b.Component);z.propTypes={onSearch:V.default.func,onHide:V.default.func,id:V.default.string.isRequired,display:V.default.oneOf(Object.values(G)),formSchemaUrl:V.default.string,filters:V.default.object,formData:V.default.object,placeholder:V.default.string,displayBehavior:V.default.oneOf(Object.values(q)),term:V.default.string,name:V.default.string,forceFilters:V.default.bool,formIsDirty:V.default.bool,identifier:V.default.string,schemaName:V.default.string,tagHandlers:V.default.object,borders:V.default.shape({top:V.default.bool,right:V.default.bool,bottom:V.default.bool,left:V.default.bool})},z.defaultProps={placeholder:m.default._t("Admin.SEARCH","Search"),display:G.VISIBLE,displayBehavior:q.NONE,filters:{},formData:{},term:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=z,t.hasFilters=c,t.default=(0,v.connect)(u,d)(z)},"./client/src/components/Search/SearchBox.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n576?55:20;return this.state.tagWidth+e}},{key:"calculateSpaceForTags",value:function(){var e=this.state.width;e-=150,e=e-55-52;var t=this.props,n=t.hideable,r=t.showFilters;return n&&(e-=52),r&&(e-=52),e=Math.max(e,0)}},{key:"handleKeyDown",value:function(e){"Enter"===e.key?(e.preventDefault(),this.props.onSearch()):0===e.target.selectionStart&&("ArrowLeft"===e.key||"Backspace"===e.key&&e.target.selectionEnd-e.target.selectionStart==0)&&(e.preventDefault(),this.focusOnLastTag())}},{key:"handleFocus",value:function(){this.state.hasFocus||this.setState({hasFocus:!0}),this.props.onHideFilter&&this.props.onHideFilter()}},{key:"handleBlur",value:function(){this.state.hasFocus&&this.setState({hasFocus:!1})}},{key:"focusOnLastTag",value:function(){var e=O.default.findDOMNode(this);if(e){var t=e.querySelector(".compact-tag-list__visible .tag:last-child");t&&t.focus()}}},{key:"focusOnInput",value:function(){var e=O.default.findDOMNode(this);if(e){var t=e.querySelector("input");t&&t.focus()}}},{key:"renderInput",value:function(){var e,n=this.props,r=n.id,i=n.searchText,a=n.onChange,s=n.placeholder,l=n.name,c=n.borders,u={paddingLeft:this.calculateInputLeftPadding()+"px"},d=Object.assign({},t.defaultProps.borders,c),p="search-box__content-field",h=(0,m.default)("form-control",p,(e={},o(e,p+"--top-border",d.top),o(e,p+"--right-border",d.right),o(e,p+"--bottom-border",d.bottom),o(e,p+"--left-border",d.left),e));return f.default.createElement("input",{"aria-labelledby":r+"_label",type:"search",name:l,placeholder:s,className:h,onKeyDown:this.handleKeyDown,onChange:a,onFocus:this.handleFocus,onBlur:this.handleBlur,value:i,id:r,autoFocus:!0,style:u})}},{key:"renderTags",value:function(){var e=this.props,t=e.tagData,n=e.onTagDelete,r=e.onTagClick,o=e.onToggleFilter;return f.default.createElement("div",{className:"search-box__tags"},f.default.createElement(j.default,{onResize:this.onTagListResize},f.default.createElement(y.default,{onTagDelete:n,onTagClick:r,onHolderFocus:this.focusOnInput,tags:t,onSummary:o,maxSize:this.calculateSpaceForTags(),deletable:!0})))}},{key:"renderEnterHint",value:function(){var e=this;return f.default.createElement("div",{role:"presentation",className:"search-box__enter",onClick:function(t){t.stopPropagation(),t.preventDefault(),e.props.onSearch()}},u.default._t("Admin.ENTER","Enter")," ↵")}},{key:"renderFilterButton",value:function(){var e=this.props,t=e.expanded,n=e.onToggleFilter,r=e.formId,o=(0,m.default)("btn--icon","btn--no-text","font-icon-caret-down-two","search-box__filter-trigger",{collapsed:!t});return f.default.createElement(p.Button,{"aria-expanded":t,"aria-controls":r,"aria-label":u.default._t("Admin.ADVANCED","Advanced"),onClick:n,className:o,title:u.default._t("Admin.ADVANCED","Advanced")})}},{key:"renderHideButton",value:function(){var e=this.props,t=e.id,n=e.onHide;return f.default.createElement(p.Button,{onClick:n,title:u.default._t("Admin.CLOSE","Close"),"aria-label":u.default._t("Admin.CLOSE","Close"),className:"font-icon-cancel btn--no-text btn--icon-lg search-box__cancel","aria-controls":t,"aria-expanded":"true"})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.id,r=e.hideable,o=e.expanded,i=e.showFilters,a=e.dirty,s=e.clearable,l=(0,m.default)("search-box",{"search-box--hideable":r,"search-box--not-hideable":!r,"search-box--has-focus":this.state.hasFocus,"search-box--has-not-focus":!this.state.hasFocus,"search-box--has-filters":i,"search-box--has-not-filters":!i,"search-box--compact":this.state.width<576,"search-box--expanded":o}),c=(a||!s)&&this.state.hasFocus;return f.default.createElement("div",{className:l},f.default.createElement(j.default,{onResize:this.onResize},f.default.createElement("div",{className:"search-box__group"},f.default.createElement(p.Label,{for:n,id:n+"_label",hidden:!0},u.default._t("Admin.SEARCH","Search")),this.renderTags(),this.renderInput(),c&&this.renderEnterHint(),t,f.default.createElement("div",{className:"icon font-icon-search"}),i&&this.renderFilterButton(),r&&this.renderHideButton())))}}]),t}(d.Component);T.propTypes={onSearch:C.default.func,onToggleFilter:C.default.func,onHideFilter:C.default.func,onChange:C.default.func,onHide:C.default.func,onTagDelete:C.default.func,onTagClick:C.default.func,placeholder:C.default.string,expanded:C.default.bool,formId:C.default.string,id:C.default.string,searchText:C.default.string,hideable:C.default.bool,showFilters:C.default.bool,name:C.default.string,dirty:C.default.bool,clearable:C.default.bool,tagData:C.default.arrayOf(g.default)},T.defaultProps={placeholder:u.default._t("Admin.SEARCH","Search"),tagData:[],filters:{},formData:{},term:"",borders:{top:!1,right:!1,bottom:!0,left:!0}},t.Component=T,t.default=T},"./client/src/components/Search/SearchForm.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=n("./client/src/components/Search/utilities/genericDateTagHandler.js"),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a=function(e,t,n){if(!Array.isArray(t)||0===t.length)return!1;var r=n.state.fields.find(function(t){return t.name===e});return!(!r||!r.source)&&(t.map(function(e){var t=r.source.find(function(t){return t.value.toString()===e.toString()});return t&&t.title?t.title:e}).join(", ")||!1)},s={Date:(0,i.default)("ll"),Time:(0,i.default)("LT"),Datetime:(0,i.default)("lll"),Hidden:function(){return!1},SingleSelect:function(e,t,n){if(void 0===e.value)return!1;var r=a(e.key,[e.value],n);return!!r&&Object.assign({},e,{value:r})},Boolean:function(e){return!!e.value&&(e.value,r(e,["value"]))},MultiSelect:function(e,t,n){var r=a(e.key,e.value,n);return!!r&&Object.assign({},e,{value:r})},default:function(e){return!!e.value&&e}};t.default=s},"./client/src/components/Search/utilities/genericDateTagHandler.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=function(e){return function(t,n){var r=n.lang;if(!t.value)return!1;if(t.value&&r){o.default.locale(r);var i=(0,o.default)(t.value);if(i.isValid())return Object.assign({},t,{value:i.format(e)})}return t}};t.default=i},"./client/src/components/Search/utilities/mapFormSchemaToTags.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./client/src/components/Search/utilities/defaultTagHandlers.js"),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=function(e,t){var n=t.key,r=t.value;return""+e+(t.label.toLowerCase()||n)+" "+(r||"")+" "},a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.metadata.loading)return{};var r=void 0,a=function(n){var o={key:n.name,label:n.title,value:t[n.name]};return("function"==typeof r["#"+o.key]?r["#"+o.key]:"function"==typeof r[n.schemaType]?r[n.schemaType]:r.default)(o,n,e,t)},s=function(e,t){var n=t.children;if(!Array.isArray(n)||0===n.length)return!1;var r=n.map(a).filter(function(e){return!1!==e}).reduce(i,"").trim(),o=n.map(function(e){return e.name}),s="[name="+n[0].name+"]";return!!r&&Object.assign({},e,{value:r,linkedFields:o,focusSelector:s})};r=Object.assign({},o.default,{Structural:s},n);var l=e.schema.fields,c=l.map(a).filter(function(e){return!1!==e}),u={};return c.forEach(function(e){u[e.key]=e}),u};t.default=a},"./client/src/components/SingleSelectField/SingleSelectField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t1}},{key:"handleChange",value:function(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{id:this.props.id,value:e.target.value})}},{key:"render",value:function(){return c.default.createElement(f.Input,this.getInputProps())}}]),t}(l.Component);m.propTypes={extraClass:h.default.string,id:h.default.string,name:h.default.string.isRequired,onChange:h.default.func,value:h.default.oneOfType([h.default.string,h.default.number]),readOnly:h.default.bool,disabled:h.default.bool,placeholder:h.default.string,type:h.default.string,autoFocus:h.default.bool,attributes:h.default.oneOfType([h.default.object,h.default.array])},m.defaultProps={value:"",extraClass:"",className:"",type:"text",attributes:{}},t.Component=m,t.default=(0,d.default)(m)},"./client/src/components/TimeField/TimeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.data.readUsageEndpoint||{},n=t.method,r=t.url;e.loadUsedOn(e.identifier,n,r)}},{key:"render",value:function(){return c.default.createElement(e,this.props)}}]),n}(l.Component);t.propTypes={identifier:d.default.string,loading:d.default.bool,data:d.default.oneOfType([d.default.array,d.default.shape({recordClass:d.default.string,recordId:d.default.oneOfType([d.default.string,d.default.number]),readUsageEndpoint:d.default.shape({url:d.default.string,method:d.default.string})})]),usedOn:d.default.array};var n=function(e,t){var n=t.data,r=n.recordClass,o=n.recordId,i=r&&o?r+"#"+o:"",a=e.usedOn;return{identifier:i,loading:a.loading.includes(i),usedOn:a.usedOn[i]||null,error:a.errors[i]||null}},r=(0,f.connect)(n,{loadUsedOn:p.loadUsedOn})(t);return r.Component=t,r};t.default=h},"./client/src/containers/App/App.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=n(7),a=function(e){return o.default.createElement("div",{className:"app"},e.children)};t.default=(0,i.provideInjector)(a)},"./client/src/containers/Form/Form.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r'),e("body").append(t)),t.open(),!1}}),e(".add-to-campaign-modal .add-to-campaign-modal__nav-link").entwine({onclick:function(t){t.preventDefault();var n=e(t.target);window.location=n.attr("href")}}),e("#add-to-campaign__dialog-wrapper").entwine({onunmatch:function(){this._clearModal()},open:function(){this._renderModal(!0)},close:function(){this._renderModal(!1)},_renderModal:function(t){var n=this,r=function(){return n.close()},o=function(){return n._handleSubmitModal.apply(n,arguments)},a=e("form.cms-edit-form :input[name=ID]").val(),s=window.ss.store,l=s.getState().config.sections.find(function(e){return"SilverStripe\\CMS\\Controllers\\CMSPageEditController"===e.name}),u=l.form.AddToCampaignForm.schemaUrl+"/"+a,f=i.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign");d.default.render(c.default.createElement(p,{title:f,isOpen:t,onSubmit:o,onClosed:r,schemaUrl:u,bodyClassName:"modal__dialog",className:"add-to-campaign-modal",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good",identifier:"Admin.AddToCampaign"}),this[0])},_clearModal:function(){d.default.unmountComponentAtNode(this[0])},_handleSubmitModal:function(e,t,n){return n()}})})},"./client/src/legacy/ConfirmedPasswordField.js":function(e,t,n){"use strict";var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(r);(0,o.default)(document).on("click",".confirmedpassword .showOnClick a",function(){var e=(0,o.default)(".showOnClickContainer",(0,o.default)(this).parent());return e.toggle("fast",function(){e.toggleClass("d-none").find('input[type="hidden"]').val(e.hasClass("d-none")?0:1)}),!1})},"./client/src/legacy/DateField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(2),i=r(o),a=n(3),s=r(a),l=n(15),c=r(l),u=n(19),d=r(u);n("./thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),i.default.entwine("ss",function(e){e("input[type=date]").entwine({onadd:function(){if(!d.default.inputtypes.date&&!(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))){var t=e("",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L"))}this.val(r);var i=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L")});this.attr("placeholder",i),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e)for(var n=["L","YYYY-MM-DD"],r=0;r",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L LT"))}this.val(r);var i=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L LT")});this.attr("placeholder",i),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e){var n=(0,c.default)(e,["L LT",c.default.ISO_8601]);n.isValid()&&(t=n.format("YYYY-MM-DDTHH:mm:ss"))}this.parent().find("input[type=hidden]").val(t)}})})},"./client/src/legacy/GridField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=Object.assign||function(e){for(var t=1;t'),this.find("tbody tr").each(function(){e(this).find("td:last").attr("colspan",2)});var n=e('
');e(".grid-field__filter-header th:last .action").each(function(){e(this).detach(),n.append(e(this))}),e(".grid-field__filter-header").append(n)},injectSearchButton:function(e){var t=this.find(".grid-field__filter-header").length>0,n=void 0;e?(n='',this.addClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden"),t||this.find(":button[name=showFilter]").hide()):(n='',this.removeClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").addClass("grid-field__search-holder--hidden")),t&&this.find(".sortable-header th:last").html(n)}}),e(".grid-field *").entwine({getGridField:function(){return this.closest(".grid-field")}}),e(".gridfield-actionmenu__container").entwine({Timer:null,Component:null,Actions:null,onmatch:function(){this._super();var t=[];e(".action-menu--handled",this.parent()).each(function(){var n=e(this).detach();t.push(n)}),this.setActions(t);var n=this.closest(".cms-content").attr("id"),r=n?{context:n}:{},o=(0,m.loadComponent)("GridFieldActions",r);this.setComponent(o),this.refresh()},onunmatch:function(){this._super();var t=this[0];t&&p.default.unmountComponentAtNode(t);var n=this.getActions(),r=this.parent();n&&e(n).each(function(){e(this).appendTo(r)})},refresh:function(){var e=this.data("schema"),t=this.getComponent();p.default.render(d.default.createElement(t,{schema:e}),this[0])}}),e(".grid-field :button[name=showFilter]").entwine({onclick:function(e){this.closest(".grid-field").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden").find(":input:first").focus(),this.closest(".grid-field").addClass("show-filter"),this.parent().html(''),e.preventDefault()}}),e(".grid-field .ss-gridfield-item").entwine({onclick:function(t){if(t.target.classList.contains("action-menu__toggle"))return this._super(t),!1;if(e(t.target).closest(".action").length)return this._super(t),!1;var n=this.find(".edit-link, .view-link");n.length&&this.getGridField().showDetailView(n.prop("href"))},onmouseover:function(){this.find(".edit-link, .view-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".grid-field .action.action_import:button").entwine({onclick:function(e){e.preventDefault(),this.openmodal()},onmatch:function(){this._super(),"open"===this.data("state")&&this.openmodal()},onunmatch:function(){this._super()},openmodal:function(){function t(){o.removeClass("show"),n.removeClass("show"),setTimeout(function(){o.remove()},150)}var n=e(this.data("target")),r=e(this.data("modal"));n.length<1?(n=r,n.appendTo(document.body)):n.innerHTML=r.innerHTML;var o=e(".modal-backdrop");o.length<1&&(o=e(''),o.appendTo(document.body)),n.find("[data-dismiss]").add(".modal-backdrop").on("click",function(){t()}),e(document).on("keydown",function(e){27===e.keyCode&&t()}),setTimeout(function(){o.addClass("show"),n.addClass("show")},0)}}),e(".grid-field .action:button").entwine({onclick:function(t){var n="show",r=!0;if(this.is(":disabled"))return void t.preventDefault();!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(n="hidden"),(this.hasClass("ss-gridfield-pagination-action")||this.hasClass("grid-field__sort"))&&(r=!1);var o=function(t,n,r){var o=r.getResponseHeader("X-Message-Text"),i=r.getResponseHeader("X-Message-Type");o&&i&&(e("#Form_EditForm_error").addClass(i),e("#Form_EditForm_error").html(o),e("#Form_EditForm_error").show())};this.getGridField().reload({data:[{name:this.attr("name"),value:this.val(),filter:n,triggerChange:r}]},o),t.preventDefault()},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),r=this.closest("form"),o=r.find(":input.gridstate").serialize(),i=r.find('input[name="SecurityID"]').val();o+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),i&&(o+="&SecurityID="+encodeURIComponent(i)),window.location.search&&(o=window.location.search.replace(/^\?/,"")+"&"+o);var a=-1==n.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(n.data("url")+a+o,e("base").attr("href"))}}),e(".grid-field .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),n=""!==t.val(),r=e.is(":disabled");(n&&r||!n&&!r)&&e.attr("disabled",!r)}}),e(".grid-field .grid-field__col-compact .action--delete, .grid-field .grid-field__col-compact .action--archive, .cms-edit-form .btn-toolbar .action--delete, .cms-edit-form .btn-toolbar .action--archive").entwine({onclick:function(t){var n=e(this).hasClass("action--archive")?c.default._t("Admin.ARCHIVECONFIRMMESSAGE"):c.default._t("Admin.DELETECONFIRMMESSAGE");if(!confirm(n))return t.preventDefault(),!1;this._super(t)}}),e(".grid-field .grid-print-button.action:button").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var t=this.actionurl();return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus(),(this.contentWindow||this).print()})},onunmatch:function(){this._super()}}),e(".grid-field .action.no-ajax, .grid-field .no-ajax .action:button").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".grid-field[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".grid-field[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".js-injector-boot .grid-field .grid-field__search-holder").entwine({Component:null,onmatch:function(){this._super(),this.prependTo(this.parent());var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,m.loadComponent)("Search",t);this.setComponent(n),this.refresh()},onunmatch:function(){this._super();var e=this[0];e&&p.default.unmountComponentAtNode(e)},close:function(){var e=this.data("schema"),t=[{name:e.clearAction,value:"",filter:"hidden",triggerChange:!1}];this.getGridField().reload({data:t})},search:function(e){var t=this.data("schema"),n=[{name:t.searchAction,value:"",filter:"show",triggerChange:!1}],r=!0,o=!1,a=void 0;try{for(var s,l=Object.entries(e)[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value,u=i(c,2),d=u[0],f=u[1];if(f){var p="filter["+t.gridfield+"]["+d+"]";n.push({name:p,value:f})}}}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}this.getGridField().reload({data:n})},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},i=function(t){return e.search(t)};p.default.render(d.default.createElement(n,o({id:t.gridfield+"Search",identifier:t.gridfield+"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",onHide:r,onSearch:i},t)),this[0])}}),e(".js-injector-boot .grid-field .search-box__content-field").entwine({onkeydown:function(e){"Enter"===e.key&&e.preventDefault()}}),e(".grid-field .grid-field__filter-header :input").entwine({onmatch:function(){var e=this.closest(".extra").find(".ss-gridfield-button-filter"),t=this.closest(".extra").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(e){if(!this.closest(".ss-gridfield-button-reset").length){var t=this.closest(".extra").find(".ss-gridfield-button-filter"),n=this.closest(".extra").find(".ss-gridfield-button-reset");if("13"==e.keyCode){var r=this.closest(".grid-field__filter-header").find(".ss-gridfield-button-filter"),o="show";return!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(o="hidden"),this.getGridField().reload({data:[{name:r.attr("name"),value:r.val(),filter:o,triggerChange:!1}]}),!1}t.addClass("hover-alike"),n.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,n){var r=e(this.element);e(this.element).closest("form"),e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(r).data("searchUrl"),data:encodeURIComponent(r.attr("name"))+"="+encodeURIComponent(r.val()),success:n,error:function(e){alert(c.default._t("Admin.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,n){var r=e('');r.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(r),e(this).closest(".grid-field").find(".action_gridfield_relationadd").removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){t.preventDefault();var n=parseInt(e(this).val(),10),r=e(this).getGridField();return r.setState("GridFieldPaginator",{currentPage:n}),r.reload(),!1}}})})},"./client/src/legacy/HtmlEditorField.js":function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _jquery=__webpack_require__(2),_jquery2=_interopRequireDefault(_jquery),ss=void 0!==window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(e){editorID=e,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var e="#"+editorID,t=(0,_jquery2.default)(e).data("config"),n=this;return t.selector=e,t.setup=function(e){e.on("change",function(){n.save()})},t},save:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getInstance();t.save(),e.silent||(0,_jquery2.default)(t.getElement()).trigger("change")},create:function(){var e=this.getConfig();void 0!==e.baseURL&&(tinymce.EditorManager.baseURL=e.baseURL),tinymce.init(e)},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().setContent(e,t)},insertContent:function(e,t){this.getInstance().insertContent(e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t,n){if(n){var r=this.getInstance().dom.create("a",e,n);this.getInstance().selection.setNode(r)}else this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback,cu=tinyMCE.settings.convert_urls;return cb&&(href=eval(cb+"(href, node, true);")),cu&&href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers.default=ss.editorWrappers.tinyMCE,_jquery2.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),t.init(this.attr("id")),this._super()},onmatch:function(){this.getEditor()||this.onadd(),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save({silent:!0}),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openEmbedDialog:function(){this.openDialog("embed")},openDialog:function(t){if("media"===t&&window.InsertMediaModal){var n=e("#insert-media-react__dialog-wrapper");return n.length||(n=e(''),e("body").append(n)),n.setElement(this),void n.open()}if("embed"===t&&window.InsertEmbedModal){var r=e("#insert-embed-react__dialog-wrapper");return r.length||(r=e(''),e("body").append(r)),r.setElement(this),void r.open()}throw new Error("Dialog named "+t+" is not available.")}})})},"./client/src/legacy/LeftAndMain.ActionTabSet.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){e(".cms-container").find("iframe").each(function(t,n){try{e(n).contents().off("click.ss-ui-action-tabset")}catch(e){console.warn("Unable to access iframe, possible https mis-match")}}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){var r,o=this,i=e(".cms-container").find("iframe");r=function(t){var n,i;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(o).length||n.length||(o.tabs("option","active",!1),i=e(".cms-container").find("iframe"),i.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",r)}),e(document).off("click.ss-ui-action-tabset",r))},e(document).on("click.ss-ui-action-tabset",r),i.length>0&&i.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",r)})},riseUp:function(t,n){var r,o,i,a,s,l,c,u,d;return r=e(this).find(".ui-tabs-panel").outerHeight(),o=e(this).find(".ui-tabs-nav").outerHeight(),i=e(window).height()+e(document).scrollTop()-o,a=e(this).find(".ui-tabs-nav").offset().top,s=n.newPanel,l=n.newTab,a+r>=i&&a-r>0?(this.addClass("rise-up"),null!==l.position()&&(c=-s.outerHeight(),u=s.parents(".toolbar--south"),u&&(d=l.offset().top-u.offset().top,c-=d),e(s).css("top",c+"px"))):(this.removeClass("rise-up"),null!==l.position()&&e(s).css("bottom","100%")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")}},ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},"./client/src/legacy/LeftAndMain.BatchActions.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(2),o=t(r),i=n(3),a=t(i);o.default.entwine("ss.tree",function(t){t("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return t(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},onmatch:function(){var e=this;e.getTree().bind("load_node.jstree",function(t,n){e.refreshSelected()})},onunmatch:function(){this.getTree().unbind("load_node.jstree")},registerDefault:function(){this.register("publish",function(e){return!!confirm(a.default.inject(a.default._t("Admin.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:e.length}))&&e}),this.register("unpublish",function(e){return!!confirm(a.default.inject(a.default._t("Admin.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:e.length}))&&e}),this.register("delete",function(e){return!!confirm(a.default.inject(a.default._t("Admin.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to delete these pages?\n\nThese pages and all of their children pages will be deleted and sent to the archive."),{num:e.length}))&&e}),this.register("restore",function(e){return!!confirm(a.default.inject(a.default._t("Admin.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:e.length}))&&e})},onadd:function(){this.registerDefault(),this._super()},register:function(e,t){this.trigger("register",{type:e,callback:t});var n=this.getActions();n[e]=t,this.setActions(n)},unregister:function(e){this.trigger("unregister",{type:e});var t=this.getActions();t[e]&&delete t[e],this.setActions(t)},refreshSelected:function(n){var r=this,o=this.getTree(),i=this.getIDs(),a=[],s=t(".cms-content-batchactions-button"),l=this.find(":input[name=Action]").val();null==n&&(n=o);for(var c in i)t(t(o).getNodeByID(c)).addClass("selected").attr("selected","selected");if(!l||-1==l||!s.hasClass("active"))return void t(n).find("li").each(function(){t(this).setEnabled(!0)});t(n).find("li").each(function(){a.push(t(this).data("id")),t(this).addClass("treeloading").setEnabled(!1)});var u=t.path.parseUrl(l),d=u.hrefNoSearch+"/applicablepages/";d=t.path.addSearchParams(d,u.search),d=t.path.addSearchParams(d,{csvIDs:a.join(",")}),e.getJSON(d,function(o){e(n).find("li").each(function(){t(this).removeClass("treeloading");var e=t(this).data("id");0==e||t.inArray(e,o)>=0?t(this).setEnabled(!0):(t(this).removeClass("selected").setEnabled(!1),t(this).prop("selected",!1))}),r.serializeFromTree()})},serializeFromTree:function(){var e=this.getTree(),t=e.getSelectedIDs();return this.setIDs(t),!0},setIDs:function(e){this.find(":input[name=csvIDs]").val(e?e.join(","):null)},getIDs:function(){var e=this.find(":input[name=csvIDs]").val();return e?e.split(","):[]},onsubmit:function(n){var r=this,o=this.getIDs(),i=this.getTree(),s=this.getActions();if(!o||!o.length)return alert(a.default._t("Admin.SELECTONEPAGE","Please select at least one page")),n.preventDefault(),!1;var l=this.find(":input[name=Action]").val();if(!l)return n.preventDefault(),!1;var c=l.split("/").filter(function(e){return!!e}).pop();if(s[c]&&(o=s[c].apply(this,[o])),!o||!o.length)return n.preventDefault(),!1;this.setIDs(o),i.find("li").removeClass("failed");var u=this.find(":submit:first");return u.addClass("loading"),e.ajax({url:l,type:"POST",data:this.serializeArray(),complete:function(e,t){u.removeClass("loading"),i.jstree("refresh",-1),r.setIDs([]),r.find(":input[name=Action]").val("").change();var n=e.getResponseHeader("X-Status");n&&statusMessage(decodeURIComponent(n),"success"==t?"good":"bad")},success:function(e,n){var r,o;if(e.modified){var a=[];for(r in e.modified)o=i.getNodeByID(r),i.jstree("set_text",o,e.modified[r].TreeTitle),a.push(o);t(a).effect("highlight")}if(e.deleted)for(r in e.deleted)o=i.getNodeByID(r),o.length&&i.jstree("delete_node",o);if(e.error)for(r in e.error)o=i.getNodeByID(r),t(o).addClass("failed")},dataType:"json"}),n.preventDefault(),!1}}),t(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var e=t(".cms-tree"),n=t("#Form_BatchActionsForm");this._super(),this.data("active")?(e.addClass("multiple"),e.removeClass("draggable"),n.serializeFromTree()):(e.removeClass("multiple"),e.addClass("draggable")),t("#Form_BatchActionsForm").refreshSelected()}}),t("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(e){t(e.target.form).find(":submit"),t(e.target).val(),t("#Form_BatchActionsForm").refreshSelected(),this.trigger("chosen:updated"),this._super(e)}})})}).call(t,n(2))},"./client/src/legacy/LeftAndMain.Content.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".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()}}),e(".cms-content .cms-tree").entwine({onadd:function(){var t=this;this._super(),this.bind("select_node.jstree",function(n,r){var o=r.rslt.obj,i=t.find(":input[name=ID]").val(),a=r.args[2],s=e(".cms-container");if(!a)return!1;if(e(o).hasClass("disabled"))return!1;if(e(o).data("id")!=i){var l=e(o).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(o).find("a:first"))&&(l=l=e.path.makeUrlAbsolute(l,e("base").attr("href"))),document.location.search&&(l=e.path.addSearchParams(l,document.location.search.replace(/^\?/,""))),s.loadPanel(l)):t.removeForm()}})}}),e(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),e(".cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto");var e=parseInt(this.css("padding-top"),10),t=parseInt(this.css("padding-bottom"),10);this.height(this.innerHeight()-e-t)}})})},"./client/src/legacy/LeftAndMain.EditForm.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(2),o=t(r),i=n(3),a=t(i),s=window.onbeforeunload;window.onbeforeunload=function(e){var t=(0,o.default)(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")&&!t.is(".discardchanges")?a.default._t("Admin.CONFIRMUNSAVEDSHORT"):"function"==typeof s?s():void 0},o.default.entwine("ss",function(e){e(".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 e in{action:!0,method:!0,enctype:!0,name:!0}){var t=this.find(":input[name=_form_"+e+"]");t&&(this.attr(e,t.val()),t.remove())}this.setValidationErrorShown(!1),this._super()},"from .cms-tabset":{onafterredrawtabs:function(){if(this.hasClass("validationerror")){var t=this.find(".message.validation, .message.required").first().closest(".tab");e(".cms-container").clearCurrentTabState();var n=t.closest(".ss-tabset");n.length||(n=t.closest(".cms-tabset")),n.length?n.tabs("option","active",t.index(".tab")):this.getValidationErrorShown()||(this.setValidationErrorShown(!0),l(ss.i18n._t("Admin.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;if(this.find(".btn-toolbar :submit.btn--loading.loading").length>0)return!0;var e=confirm(a.default._t("Admin.CONFIRMUNSAVED"));return e&&this.addClass("discardchanges"),e},onsubmit:function(e,t){if("_blank"!=this.prop("target"))return t&&this.closest(".cms-container").submitForm(this,t),!1},validate:function(){return this.trigger("validate",{isValid:!0}),!0},"from .htmleditor":{oneditorinit:function(t){var n=this,r=e(t.target).closest(".field.htmleditor");r.find("textarea.htmleditor").getEditor().getInstance().onClick.add(function(e){n.saveFieldFocus(r.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(t){this.saveFieldFocus(e(t.target).attr("id"))},onfocus:function(t){this.saveFieldFocus(e(t.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(t){var n=e(t.target).closest(".field.treedropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function(t){var n=e(t.target).closest(".field.dropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(t){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var n=e(this).attr("id"),r=[];if(r.push({id:n,selected:t}),r)try{window.sessionStorage.setItem(n,JSON.stringify(r))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw e}}},restoreFieldFocus:function(){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var t,n,r,o,i,a=this,s=void 0!==window.sessionStorage&&window.sessionStorage,l=s?window.sessionStorage.getItem(this.attr("id")):null,c=!!l&&JSON.parse(l),u=0!==this.find(".ss-tabset").length;if(s&&c.length>0){if(e.each(c,function(n,r){a.is("#"+r.id)&&(t=e("#"+r.selected))}),e(t).length<1)return void this.focusFirstInput();if(n=e(t).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),r="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),u&&r!==n)return;o=e(t).closest(".togglecomposite"),o.length>0&&o.accordion("activate",o.find(".ui-accordion-header")),i=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),i=e(t).position().top),e(t).focus(),i>e(window).height()/2&&a.find(".cms-content-fields").scrollTop(i)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),e(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function(e){return this.is(":disabled")?(e.preventDefault(),!1):!1===this._super(e)||e.defaultPrevented||e.isDefaultPrevented()?void 0:(this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),e(".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()}}),e(".cms-edit-form .btn-toolbar button[name=action_doUnpublish].btn.action").entwine({onclick:function(e){var t=this.data("owners");if(t&&parseInt(t)>0){var n=[a.default.inject(a.default._t("Admin.OWNED_WARNING_1","You are unpublishing content that is being used in {count} other published section(s)."),{count:t}),a.default._t("Admin.OWNED_WARNING_2","This could cause a published page to have missing components on the live site."),a.default._t("Admin.OWNED_WARNING_3","Do you want to unpublish anyway?")];window.confirm(n.join("\n\n"))?this._super():e.preventDefault()}else this._super()}}),e(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var e=this.find("> ul:first");1==e.children("li").length&&e.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}}),e('.cms-edit-form [name="CanViewType"], .cms-edit-form [name="CanEditType"], .cms-edit-form [name="CanCreateTopLevelType"]').entwine({onmatch:function(){"OnlyTheseUsers"===this.val()&&(this.is(":checked")?this.showList(!0):this.hideList(!0))},onchange:function(e){"OnlyTheseUsers"===e.target.value?this.showList():this.hideList()},showList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");t.addClass("field--merge-below"),e?n.show().css("overflow","visible"):n.slideDown(function(){n.css("overflow","visible")})},hideList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");n.css("overflow","hidden"),e?(n.hide().css("display","none"),t.removeClass("field--merge-below")):n.slideUp(function(){t.removeClass("field--merge-below")})}})});var l=function(t){e.noticeAdd({text:t,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(t,n(2))},"./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-description-toggle").entwine({onadd:function(){var e=!1,t=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),n=this.find(".cms-description-trigger"),r=this.find(".description");this.hasClass("description-toggle-enabled")||(0===n.length&&(n=this.find(".middleColumn").first().after('').next()),this.addClass("description-toggle-enabled"),n.on("click",function(){r[e?"hide":"show"](),e=!e}),r.hide())}})})},"./client/src/legacy/LeftAndMain.FieldHelp.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var e=this.find(".description");e.length&&(this.attr("title",e.text()).tooltip({content:e.html()}),e.remove())}}),e(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},"./client/src/legacy/LeftAndMain.Menu.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,r){e(".cms-menu__list").children("li").each(function(){t?e(this).children("ul").each(function(){e(this).removeClass("collapsed-flyout"),e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))}):e(this).children("ul").each(function(){e(this).addClass("collapsed-flyout"),e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)})}),this.toggleFlyoutState(t),this._super(t,n,r)},toggleFlyoutState:function(t){if(t)e(".collapsed").find("li").show(),e(".cms-menu__list").find(".child-flyout-indicator").hide();else{e(".collapsed-flyout").find("li").each(function(){e(this).hide()});var n=e(".cms-menu__list ul.collapsed-flyout").parent();0===n.children(".child-flyout-indicator").length&&n.append('').fadeIn(),n.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&void 0!==(n=e.cookie("cms-menu-sticky"))&&null!==n&&(t="true"===n),t},setPersistedStickyState:function(t){void 0!==e.cookie&&e.cookie("cms-menu-sticky",t,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var t=this.getPersistedCollapsedState(),n=e(".cms-menu").getPersistedStickyState(),r=this.siteTreePresent();return void 0===t?r:t!==r&&n?t:r},onadd:function(){var t=this;setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),e(".cms-menu__list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(e){var t=e.getResponseHeader("X-Controller");if(t){var n=this.find("li#Menu-"+t.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function(e,t){this.updateMenuFromResponse(t.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,t){this.updateMenuFromResponse(t.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(t){this.toggleClass("collapsed",e(t.target).hasClass("collapsed")),e(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||e(".toggle-children.opened").closest("li").addClass("opened")}},updateItems:function(){var t=this.find("#Menu-CMSMain");t[t.is(".current")?"show":"hide"]();var n=e(".cms-content input[name=ID]").val();n&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).setRecordID(n)})}}),e(".cms-menu__list li").entwine({toggleFlyout:function(t){var n=e(this);if(n.children("ul").first().hasClass("collapsed-flyout"))if(t){if(!n.children("ul").first().children("li").first().hasClass("clone")){var r=n.clone();r.addClass("clone").css({}),r.children("ul").first().remove(),r.find("span").not(".text").remove(),r.find("a").first().unbind("click"),n.children("ul").prepend(r)}e(".collapsed-flyout").show(),n.addClass("opened"),n.children("ul").find("li").fadeIn("fast")}else r&&r.remove(),e(".collapsed-flyout").hide(),n.removeClass("opened"),n.find("toggle-children").removeClass("opened"),n.children("ul").find("li").hide()}}),e(".cms-menu__list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu__list .toggle").entwine({onclick:function(t){t.preventDefault(),e(this).toogleFlyout(!0)}}),e(".cms-menu__list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append(''),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var e=this.getMenuItem();e&&e.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 e=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),e){var t=e.siblings();e.addClass("current"),t.removeClass("current").close(),t.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),e(".cms-menu__list *").entwine({getMenu:function(){return this.parents(".cms-menu__list:first")}}),e(".cms-menu__list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),e(".cms-menu__list li a").entwine({onclick:function(t){var n=e.path.isExternal(this.attr("href"));if(!(t.which>1||n)&&"_blank"!=this.attr("target")){t.preventDefault();var r=this.getMenuItem(),o=this.attr("href");n||(o=e("base").attr("href")+o);var i=r.find("li");i.length?i.first().find("a").click():document.location.href=o,r.select()}}}),e(".cms-menu__list li .toggle-children").entwine({onclick:function(e){return this.closest("li").toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu__list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle").entwine({onadd:function(){var t=!!e(".cms-menu").getPersistedStickyState();this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function(e){this.next(".sticky-status-indicator").text(e?"fixed":"auto")},onclick:function(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),r=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&!1===r&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(r),this.toggleCSS(r),this.toggleIndicator(r),this._super()}})})},"./client/src/legacy/LeftAndMain.MobileMenuToggle.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(2),i=r(o),a=n("./client/src/components/MobileMenuToggle/MobileMenuToggleContainer.js"),s=r(a),l=n("./client/src/state/mobileMenu/MobileMenuActions.js"),c=n(8),u=r(c);i.default.entwine("ss",function(e){e(".js-react-boot").entwine({onmatch:function(){var t=e(".cms-mobile-menu-toggle-wrapper");t.length>0&&u.default.render(React.createElement(s.default,{store:window.ss.store,controls:"cms-menu"}),t[0]);var n=window.ss.store,r=e(".cms-menu"),o=e(".cms-menu-mobile-overlay");n.subscribe(function(){var e=n.getState(),t=e.mobileMenu.isOpen;r.toggleClass("cms-menu--open",t).attr("aria-expanded",t),o.attr("aria-expanded",t)})}}),e(".cms-menu-mobile-overlay").entwine({onclick:function(){window.ss.store.dispatch((0,l.closeMobileMenu)())}})})},"./client/src/legacy/LeftAndMain.Panel.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e.entwine.warningLevel=e.entwine.WARN_LEVEL_BESTPRACTISE,e(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==e.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var t,n;return this.canSetCookie()&&void 0!==(n=e.cookie("cms-panel-collapsed-"+this.attr("id")))&&null!==n&&(t="true"===n),t},setPersistedCollapsedState:function(t){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),t,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var e=this.getPersistedCollapsedState();return void 0===e&&(e=this.hasClass("collapsed")),e},onadd:function(){var t,n;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(n=e("").append('»').append('«'),this.append(n)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),t=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(t.length?t.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(e,t,n){var r,o;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),r=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(r),o=this.find(".cms-panel-content-collapsed"),o.length&&(this.find(".cms-panel-content")[e?"show":"hide"](),this.find(".cms-panel-content-collapsed")[e?"hide":"show"]()),!1!==n&&this.setPersistedCollapsedState(!e),this.trigger("toggle",e),this.trigger(e?"expand":"collapse")},expandPanel:function(e){(e||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(e){!e&&this.hasClass("collapsed")||this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),e(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},"./client/src/legacy/LeftAndMain.Preview.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(2),i=r(o),a=n(3),s=r(a);i.default.entwine("ss.preview",function(e){e(".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(t,n){var r=this,o=this._getNavigatorStates();return!1!==n&&e.each(o,function(e,n){r.saveState("state",t)}),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var r=e(".cms-container").entwine(".ss");if("split"==t)r.splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)r.contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;r.previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return!1!==n&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){return this.getSizes(),this.setCurrentSizeName(e),this.removeClass("auto desktop tablet mobile").addClass(e),this.saveState("size",e),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.getCurrentStateName();t&&this.find(".cms-preview-states").changeVisibleState(t);var n=e(".cms-container").entwine(".ss").getLayoutOptions();return n&&e(".preview-mode-selector").changeVisibleMode(n.mode),this.getCurrentSizeName()&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(e,t){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+e,t)},loadState:function(e){if(this._supportsLocalStorage())return window.localStorage.getItem("cms-preview-state-"+e)},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),e.browser.msie&&e.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){var t=e("#FontFixStyleElement");return t.length||(t=e('').appendTo("head")),t},onadd:function(){var t=this,n=this.find("iframe");n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),e.browser.msie&&8===parseInt(e.browser.version,10)&&n.bind("readystatechange",function(e){"interactive"==n[0].readyState&&(t.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){t.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this._unblock(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var e,t,n=new Date;try{return(e=window.localStorage).setItem(n,n),t=e.getItem(n)==n,e.removeItem(n),t&&e}catch(e){console.warn("localStorge is not available due to current browser / system settings.")}},onforcecontent:function(){this.changeMode("content",!1)},onenable:function(){var t=e(".preview-mode-selector");t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){var t=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){return this.find(".preview-note").show(),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.find(".preview-note").hide(),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var t,n;return e(".cms-previewable").length?(t=this.loadState("mode"),n=this.loadState("size"),this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw(),t&&this.changeMode(t),n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var e=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){return e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]");return n.length?{name:t,url:n.attr("href"),active:n.hasClass("active")}:null})},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var t=this._getNavigatorStates(),n=this.getCurrentStateName(),r=null;t&&(r=e.grep(t,function(e,t){return n===e.name||!n&&e.active}));var o=null;if(r[0]?o=r[0].url:t.length?(this.setCurrentStateName(t[0].name),o=t[0].url):this.setCurrentStateName(null),o){var i=o.split("#"),a=i.shift().split(/[?&]/),s=a.shift();a.push("CMSPreview=1"),i=i.length?"#"+i.join("#"):"",o=s+"?"+a.join("&")+i}return this.is(".column-hidden")?(this.setPendingURL(o),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),o?(this._loadUrl(o),this._unblock()):this._block()),this},_moveNavigator:function(){var t=e(".cms-preview .cms-preview-controls");e(".cms-edit-form .cms-navigator").length&&t.length?t.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var t;e(".cms-container");try{t=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(t){var n=e(t).find("meta[name=x-page-id]").attr("content"),r=e(t).find("meta[name=x-cms-edit-link]").attr("content"),o=e(".cms-content");n&&o.find(":input[name=ID]").val()!=n&&e(".cms-container").entwine(".ss").loadPanel(r)}}},_adjustIframeForPreview:function(){var e,t=this.find("iframe")[0];if(t){try{e=t.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(e){for(var n=e.getElementsByTagName("A"),r=0;r'):this.parent().append('')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})})},"./client/src/legacy/LeftAndMain.Tree.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss.tree",function(e){e(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function(){if(this._super(),!e.isNumeric(this.data("jstree_instance_id"))){var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));var n=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(t,r){n.setIsLoaded(!0),r.inst._set_settings({html_data:{ajax:{url:n.data("urlTree"),data:function(t){var r=n.data("searchparams")||[];return r=e.grep(r,function(e,t){return"ID"!=e.name&&"value"!=e.name}),r.push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),r.push({name:"ajax",value:1}),r}}}}),n.updateFromEditForm(),n.css("visibility","visible"),r.inst.hide_checkboxes()}).bind("before.jstree",function(t,r){if("start_drag"==r.func&&(!n.hasClass("draggable")||n.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(r.func,["check_node","uncheck_node"])){var o=e(r.args[0]).parents("li:first"),i=o.find("li:not(.disabled)");if(o.hasClass("disabled")&&0==i)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(t,r){if(!n.getIsUpdatingTree()){var o=r.rslt.o,i=r.rslt.np,a=(r.inst._get_parent(o),e(i).data("id")||0),s=e(o).data("id"),l=e.map(e(o).siblings().andSelf(),function(t){return e(t).data("id")});e.ajax({url:e.path.addSearchParams(n.data("urlSavetreenode"),n.data("extraParams")),type:"POST",data:{ID:s,ParentID:a,SiblingIDs:l},success:function(){e(".cms-edit-form :input[name=ID]").val()==s&&e(".cms-edit-form :input[name=ParentID]").val(a),n.updateNodesFromServer([s])},statusCode:{403:function(){e.jstree.rollback(r.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(t){var n=this,r=e(".cms-edit-form :input[name=ID]").val(),o=this.find("[data-id="+r+"]"),i=[+r];o.find("li").each(function(){i.push(e(this).data("id"))});for(var a=[];i.length;){var s=i.slice(0,50);a.push(s),i=i.slice(50)}a.map(function(e){return n.updateNodesFromServer(e,!1)}).reduce(function(e,t){return e.then(t)},Promise.resolve())}},getTreeConfig:function(){var t=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(n){var r=e(n.o),o=e(n.np),i=n.ot.get_container()[0]==n.np[0],a=r.getClassname(),s=o.getClassname(),l=t.getHints(),c=[],u=s||"Root",d=l&&void 0!==l[u]?l[u]:null;return d&&r.attr("class").match(/VirtualPage-([^\s]*)/)&&(a=RegExp.$1),d&&(c=void 0!==d.disallowedChildren?d.disallowedChildren:[]),!(0===r.data("id")||r.hasClass("status-archived")||i&&"inside"!=n.p||o.hasClass("nochildren")||c.length&&-1!=e.inArray(a,c))}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:e("body").data("frameworkpath")+"/admin/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(e,t){e?this.data("searchparams",e):this.removeData("searchparams"),this.jstree("refresh",-1,t)},getNodeByID:function(e){return this.find("*[data-id="+e+"]")},createNode:function(t,n,r){var o=this,i=void 0!==n.ParentID&&o.getNodeByID(n.ParentID),a=e(t),s={data:""};a.hasClass("jstree-open")?s.state="open":a.hasClass("jstree-closed")&&(s.state="closed"),this.jstree("create_node",i.length?i:-1,"last",s,function(e){for(var t=e.attr("class"),n=0;n/g,"");var o=e(n),i=!!r.NextID&&this.getNodeByID(r.NextID),a=!!r.PrevID&&this.getNodeByID(r.PrevID),s=!!r.ParentID&&this.getNodeByID(r.ParentID);e.each(["id","style","class","data-pagetype"],function(e,n){t.attr(n,o.attr(n))});var l=t.children("ul").detach();t.html(o.html()).append(l),i&&i.length?this.jstree("move_node",t,i,"before"):a&&a.length?this.jstree("move_node",t,a,"after"):this.jstree("move_node",t,s.length?s:-1)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.getIsLoaded()&&(!r||!this.getIsUpdatingTree())){var o=this,i=!1;this.setIsUpdatingTree(!0),o.jstree("save_selected");var a=function(e){o.getNodeByID(e.data("id")).not(e).remove(),o.jstree("deselect_all"),o.jstree("select_node",e)};return o.jstree("open_node",this.getNodeByID(0)),o.jstree("save_opened"),o.jstree("save_selected"),new Promise(function(r){e.ajax({url:e.path.addSearchParams(n.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(t,n){r(t),e.each(t,function(e,t){var n=o.getNodeByID(e);if(!t)return void o.jstree("delete_node",n);n.length?(o.updateNode(n,t.html,t),setTimeout(function(){a(n)},500)):(i=!0,t.ParentID&&!o.find("li[data-id="+t.ParentID+"]").length?o.jstree("load_node",-1,function(){newNode=o.find("li[data-id="+e+"]"),a(newNode)}):o.createNode(t.html,t,function(e){a(e)}))}),i||(o.jstree("deselect_all"),o.jstree("reselect"),o.jstree("reopen"))},complete:function(){o.setIsUpdatingTree(!1)}})})}}}),e(".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 e(this).jstree("get_checked").not(".disabled").map(function(){return e(this).data("id")}).get()}}),e(".cms-tree li").entwine({setEnabled:function(e){this.toggleClass("disabled",!e)},getClassname:function(){var e=this.attr("class").match(/class-([^\s]*)/i);return e?e[1]:""},getID:function(){return this.data("id")}})})},"./client/src/legacy/LeftAndMain.TreeDropdownField.js":function(e,t,n){"use strict";var r=n(2);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})})},"./client/src/legacy/LeftAndMain.js":function(module,exports,__webpack_require__){"use strict";(function(jQuery){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _extends=Object.assign||function(e){for(var t=1;t399?"bad":"good",l=["OK","success","HTTP/2.0 200"];if(null===o||isSameUrl(r,o)&&isSameUrl(i,o)||window.ss.router.show(o,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:t.getResponseHeader("X-Pjax")?t.getResponseHeader("X-Pjax"):n.headers["X-Pjax"]}),t.getResponseHeader("X-Reauthenticate"))return void $(".cms-container").showLoginDialog();0!==t.status&&a&&-1===$.inArray(a,l)&&statusMessage(decodeURIComponent(a),s),ajaxCompleteEvent(this)}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){if($.browser.msie&&parseInt($.browser.version,10)<8)return $(".ss-loading-screen").append('