From a39ede44ddb9da9545e48b6fcdc307f13cf61e6f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 3 Oct 2022 15:59:39 +1300 Subject: [PATCH] DEP Update jQuery to 3.x --- client/dist/js/LeftAndMain.Ping.js | 2 +- client/dist/js/MemberImportForm.js | 2 +- client/dist/js/TinyMCE_sslink-email.js | 2 +- client/dist/js/TinyMCE_sslink-external.js | 2 +- client/dist/js/TinyMCE_sslink.js | 2 +- client/dist/js/bundle.js | 2 +- client/dist/js/i18n.js | 2 +- client/dist/js/vendor.js | 2 +- client/dist/styles/bundle.css | 2 +- client/src/bundles/bundle.js | 1 + client/src/bundles/vendor.js | 14 +- client/src/components/Menu/Menu.scss | 86 +- client/src/jquery.js | 8 - client/src/legacy/DatetimeField.js | 2 +- client/src/legacy/GridField.js | 12 +- client/src/legacy/LeftAndMain.ActionTabSet.js | 4 +- client/src/legacy/LeftAndMain.BatchActions.js | 71 +- client/src/legacy/LeftAndMain.Content.js | 2 +- client/src/legacy/LeftAndMain.EditForm.js | 2 +- client/src/legacy/LeftAndMain.Menu.js | 83 +- client/src/legacy/LeftAndMain.Preview.js | 4 +- client/src/legacy/LeftAndMain.Tree.js | 12 +- client/src/legacy/LeftAndMain.js | 106 +- client/src/legacy/SecurityAdmin.js | 5 +- client/src/legacy/SelectionGroup.js | 3 +- client/src/legacy/TabSet.js | 59 +- .../src/legacy}/jquery.changetracker.js | 35 +- client/src/legacy/ssui.core.js | 10 +- .../legacy/tests/jquery.changetracker-test.js | 196 + package.json | 6 +- thirdparty/jquery-changetracker/README.md | 17 - thirdparty/jquery-changetracker/spec/dom.html | 23 - .../spec/lib/images/bg.png | Bin 154 -> 0 bytes .../spec/lib/images/hr.png | Bin 321 -> 0 bytes .../spec/lib/images/loading.gif | Bin 2608 -> 0 bytes .../spec/lib/images/sprites.bg.png | Bin 4876 -> 0 bytes .../spec/lib/images/sprites.png | Bin 3629 -> 0 bytes .../spec/lib/images/vr.png | Bin 145 -> 0 bytes .../jquery-changetracker/spec/lib/jspec.css | 149 - .../spec/lib/jspec.growl.js | 115 - .../spec/lib/jspec.jquery.js | 88 - .../jquery-changetracker/spec/lib/jspec.js | 1908 ---- .../spec/lib/jspec.nodejs.js | 18 - .../spec/lib/jspec.shell.js | 39 - .../spec/lib/jspec.timers.js | 154 - .../spec/lib/jspec.xhr.js | 210 - thirdparty/jquery-changetracker/spec/node.js | 10 - thirdparty/jquery-changetracker/spec/rhino.js | 10 - .../jquery-changetracker/spec/server.html | 18 - .../jquery-changetracker/spec/server.rb | 4 - .../spec/spec.changetracker.basics.js | 127 - .../spec/support/jquery.js | 9266 ---------------- .../spec/unit/spec.helper.js | 0 .../jquery-changetracker/spec/unit/spec.js | 8 - .../vendor/TrivialReporter.js | 61 - .../jquery-changetracker/vendor/jasmine.css | 24 - .../jquery-changetracker/vendor/jasmine.js | 900 -- .../vendor/jquery-1.3.2.js | 4376 -------- thirdparty/jquery-cookie/jquery.cookie.js | 2 +- thirdparty/jquery-entwine/.piston.yml | 8 - thirdparty/jquery-entwine/LICENSE | 8 +- .../{README.textile => README.md} | 394 +- .../dist/jquery.concrete-dist.js | 2263 ---- ...uery.entwine-dist.js => jquery.entwine.js} | 580 +- .../jquery.entwine.domevents.addrem.js | 138 - .../jquery.entwine.domevents.maybechanged.js | 149 - .../src/jquery.entwine.addrem.js | 63 - .../src/jquery.entwine.ctors.js | 242 - .../src/jquery.entwine.eventcapture.js | 118 - .../src/jquery.entwine.events.js | 249 - .../src/jquery.entwine.inspector.js | 240 - .../jquery-entwine/src/jquery.entwine.js | 360 - .../src/jquery.entwine.legacy.js | 21 - .../src/jquery.entwine.properties.js | 85 - .../jquery-entwine/src/jquery.focusinout.js | 52 - .../src/jquery.selector.affectedby.js | 58 - .../jquery-entwine/vendor/jquery-1.10.2.js | 9789 ----------------- .../jquery-entwine/vendor/jquery-1.9.0.js | 9555 ---------------- thirdparty/jquery-form/.piston.yml | 8 - thirdparty/jquery-form/META.json | 32 - thirdparty/jquery-form/jquery.form.js | 1009 -- .../jquery-hoverIntent/jquery.hoverIntent.js | 106 - .../jquery.hoverIntent.minified.js | 9 - thirdparty/jquery-ondemand/jquery.ondemand.js | 10 +- thirdparty/jquery-query/jquery.query.js | 64 +- thirdparty/jquery-ui/jquery-ui.js | 10 +- thirdparty/jquery/MIT-LICENSE.txt | 20 - thirdparty/jquery/jquery.js | 9404 ---------------- thirdparty/jquery/jquery.min.js | 4 - thirdparty/jstree/README.txt | 2 + thirdparty/jstree/_lib/jquery.cookie.js | 96 - thirdparty/jstree/_lib/jquery.hotkeys.js | 99 - thirdparty/jstree/_lib/jquery.js | 18 - thirdparty/jstree/jquery.jstree.js | 924 +- yarn.lock | 14 +- 95 files changed, 1439 insertions(+), 53028 deletions(-) delete mode 100644 client/src/jquery.js rename {thirdparty/jquery-changetracker/lib => client/src/legacy}/jquery.changetracker.js (93%) create mode 100644 client/src/legacy/tests/jquery.changetracker-test.js delete mode 100644 thirdparty/jquery-changetracker/README.md delete mode 100755 thirdparty/jquery-changetracker/spec/dom.html delete mode 100755 thirdparty/jquery-changetracker/spec/lib/images/bg.png delete mode 100755 thirdparty/jquery-changetracker/spec/lib/images/hr.png delete mode 100755 thirdparty/jquery-changetracker/spec/lib/images/loading.gif delete mode 100755 thirdparty/jquery-changetracker/spec/lib/images/sprites.bg.png delete mode 100755 thirdparty/jquery-changetracker/spec/lib/images/sprites.png delete mode 100755 thirdparty/jquery-changetracker/spec/lib/images/vr.png delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.css delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.growl.js delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.jquery.js delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.js delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.nodejs.js delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.shell.js delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.timers.js delete mode 100755 thirdparty/jquery-changetracker/spec/lib/jspec.xhr.js delete mode 100755 thirdparty/jquery-changetracker/spec/node.js delete mode 100755 thirdparty/jquery-changetracker/spec/rhino.js delete mode 100755 thirdparty/jquery-changetracker/spec/server.html delete mode 100755 thirdparty/jquery-changetracker/spec/server.rb delete mode 100644 thirdparty/jquery-changetracker/spec/spec.changetracker.basics.js delete mode 100644 thirdparty/jquery-changetracker/spec/support/jquery.js delete mode 100755 thirdparty/jquery-changetracker/spec/unit/spec.helper.js delete mode 100755 thirdparty/jquery-changetracker/spec/unit/spec.js delete mode 100644 thirdparty/jquery-changetracker/vendor/TrivialReporter.js delete mode 100644 thirdparty/jquery-changetracker/vendor/jasmine.css delete mode 100644 thirdparty/jquery-changetracker/vendor/jasmine.js delete mode 100644 thirdparty/jquery-changetracker/vendor/jquery-1.3.2.js delete mode 100644 thirdparty/jquery-entwine/.piston.yml rename thirdparty/jquery-entwine/{README.textile => README.md} (56%) delete mode 100755 thirdparty/jquery-entwine/dist/jquery.concrete-dist.js rename thirdparty/jquery-entwine/{dist/jquery.entwine-dist.js => jquery.entwine.js} (83%) delete mode 100755 thirdparty/jquery-entwine/src/domevents/jquery.entwine.domevents.addrem.js delete mode 100755 thirdparty/jquery-entwine/src/domevents/jquery.entwine.domevents.maybechanged.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.addrem.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.ctors.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.eventcapture.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.events.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.inspector.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.legacy.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.entwine.properties.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.focusinout.js delete mode 100755 thirdparty/jquery-entwine/src/jquery.selector.affectedby.js delete mode 100644 thirdparty/jquery-entwine/vendor/jquery-1.10.2.js delete mode 100644 thirdparty/jquery-entwine/vendor/jquery-1.9.0.js delete mode 100644 thirdparty/jquery-form/.piston.yml delete mode 100644 thirdparty/jquery-form/META.json delete mode 100644 thirdparty/jquery-form/jquery.form.js delete mode 100644 thirdparty/jquery-hoverIntent/jquery.hoverIntent.js delete mode 100644 thirdparty/jquery-hoverIntent/jquery.hoverIntent.minified.js delete mode 100644 thirdparty/jquery/MIT-LICENSE.txt delete mode 100644 thirdparty/jquery/jquery.js delete mode 100644 thirdparty/jquery/jquery.min.js delete mode 100644 thirdparty/jstree/_lib/jquery.cookie.js delete mode 100644 thirdparty/jstree/_lib/jquery.hotkeys.js delete mode 100644 thirdparty/jstree/_lib/jquery.js diff --git a/client/dist/js/LeftAndMain.Ping.js b/client/dist/js/LeftAndMain.Ping.js index eabb88fb4..71c09e264 100644 --- a/client/dist/js/LeftAndMain.Ping.js +++ b/client/dist/js/LeftAndMain.Ping.js @@ -1 +1 @@ -webpackJsonp([3],{"./client/src/legacy/LeftAndMain.Ping.js":function(n,e,t){"use strict";var i=t(3);(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([3],{"./client/src/legacy/LeftAndMain.Ping.js":function(n,e,t){"use strict";var i=t("jquery");(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 f16dd0871..c6d566092 100644 --- a/client/dist/js/MemberImportForm.js +++ b/client/dist/js/MemberImportForm.js @@ -1 +1 @@ -webpackJsonp([2],{"./client/src/legacy/MemberImportForm.js":function(e,n,t){"use strict";var o=t(3);(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([2],{"./client/src/legacy/MemberImportForm.js":function(e,n,t){"use strict";var r=t("jquery");(function(e){return e&&e.__esModule?e:{default:e}})(r).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 dc0f94ce3..c55050900 100644 --- a/client/dist/js/TinyMCE_sslink-email.js +++ b/client/dist/js/TinyMCE_sslink-email.js @@ -1 +1 @@ -!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/legacy/TinyMCE_sslink-email.js")}({"./client/src/legacy/TinyMCE_sslink-email.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),l=i(a),s=n(6),u=i(s),c=n(0),d=i(c),f=n(3),m=i(f),p=n(5),g=n(4);l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:function(e){return e.execCommand("sslinkemail")},priority:51},editorIdentifier).addCommandWithUrlTest("sslinkemail",/^mailto:/);var k={init:function(e){e.addCommand("sslinkemail",function(){window.jQuery("#"+e.id).entwine("ss").openLinkEmailDialog()})}},_="insert-link__dialog-wrapper--email",b=(0,g.loadComponent)((0,p.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));m.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,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),a=tinymce.activeEditor.selection,l=a.getContent()||"",s=a.getNode().tagName,c="A"!==s&&""===l.trim();d.default.render(u.default.createElement(b,{isOpen:e,onInsert:i,onClosed:n,title:o.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:c}),this[0])},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("?"),r=i[0].replace(/^mailto:/,"").split("?")[0];r.match(/.+@.+\..+/)||(r="");var o=i[1]?i[1].match(/subject=([^&]+)/):"";return{Link:r,Subject:o?decodeURIComponent(o[1]):"",Description:n.attr("title")}},buildAttributes:function(e){var t=this._super(e),n="",i=t.href.replace(/^mailto:/,"").split("?")[0];return i.match(/.+@.+\..+/)||(i=""),i&&(n="mailto:"+i),n&&e.Subject&&(n=n+"?subject="+encodeURIComponent(e.Subject)),t.href=n,delete t.target,t}})}),tinymce.PluginManager.add("sslinkemail",function(e){return k.init(e)}),t.default=k},0:function(e,t){e.exports=ReactDom},1:function(e,t){e.exports=TinyMCEActionRegistrar},2:function(e,t){e.exports=i18n},3:function(e,t){e.exports=jQuery},4:function(e,t){e.exports=Injector},5:function(e,t){e.exports=InsertLinkModal},6:function(e,t){e.exports=React}}); \ No newline at end of file +!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/legacy/TinyMCE_sslink-email.js")}({"./client/src/legacy/TinyMCE_sslink-email.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n("i18n"),o=i(r),a=n("lib/TinyMCEActionRegistrar"),l=i(a),s=n("react"),c=i(s),d=n("react-dom"),u=i(d),m=n("jquery"),f=i(m),p=n("containers/InsertLinkModal/InsertLinkModal"),g=n("lib/Injector");l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:function(e){return e.execCommand("sslinkemail")},priority:51},editorIdentifier).addCommandWithUrlTest("sslinkemail",/^mailto:/);var k={init:function(e){e.addCommand("sslinkemail",function(){window.jQuery("#"+e.id).entwine("ss").openLinkEmailDialog()})}},b="insert-link__dialog-wrapper--email",y=(0,g.loadComponent)((0,p.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));f.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkEmailDialog:function(){var t=e("#"+b);t.length||(t=e('
'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+b).entwine({renderModal:function(e){var t=this,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),a=tinymce.activeEditor.selection,l=a.getContent()||"",s=a.getNode().tagName,d="A"!==s&&""===l.trim();u.default.render(c.default.createElement(y,{isOpen:e,onInsert:i,onClosed:n,title:o.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:d}),this[0])},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("?"),r=i[0].replace(/^mailto:/,"").split("?")[0];r.match(/.+@.+\..+/)||(r="");var o=i[1]?i[1].match(/subject=([^&]+)/):"";return{Link:r,Subject:o?decodeURIComponent(o[1]):"",Description:n.attr("title")}},buildAttributes:function(e){var t=this._super(e),n="",i=t.href.replace(/^mailto:/,"").split("?")[0];return i.match(/.+@.+\..+/)||(i=""),i&&(n="mailto:"+i),n&&e.Subject&&(n=n+"?subject="+encodeURIComponent(e.Subject)),t.href=n,delete t.target,t}})}),tinymce.PluginManager.add("sslinkemail",function(e){return k.init(e)}),t.default=k},"containers/InsertLinkModal/InsertLinkModal":function(e,t){e.exports=InsertLinkModal},i18n:function(e,t){e.exports=i18n},jquery:function(e,t){e.exports=jQuery},"lib/Injector":function(e,t){e.exports=Injector},"lib/TinyMCEActionRegistrar":function(e,t){e.exports=TinyMCEActionRegistrar},react:function(e,t){e.exports=React},"react-dom":function(e,t){e.exports=ReactDom}}); \ 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 d701697b2..20ea77d89 100644 --- a/client/dist/js/TinyMCE_sslink-external.js +++ b/client/dist/js/TinyMCE_sslink-external.js @@ -1 +1 @@ -!function(e){function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="./client/src/legacy/TinyMCE_sslink-external.js")}({"./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),o=i(r),a=t(1),l=i(a),s=t(6),u=i(s),c=t(0),d=i(c),f=t(3),p=i(f),x=t(5),m=t(4);l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onclick:function(e){return e.execCommand("sslinkexternal")},priority:70},editorIdentifier);var _={init:function(e){e.addCommand("sslinkexternal",function(){window.jQuery("#"+e.id).entwine("ss").openLinkExternalDialog()})}},g="insert-link__dialog-wrapper--external",k=(0,m.loadComponent)((0,x.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkExternalDialog:function(){var n=e("#"+g);n.length||(n=e('
'),e("body").append(n)),n.addClass("insert-link__dialog-wrapper"),n.setElement(this),n.open()}}),e("#"+g).entwine({renderModal:function(e){var n=this,t=function(){return n.close()},i=function(){return n.handleInsert.apply(n,arguments)},r=this.getOriginalAttributes(),a=tinymce.activeEditor.selection,l=a.getContent()||"",s=a.getNode().tagName,c="A"!==s&&""===l.trim();d.default.render(u.default.createElement(k,{isOpen:e,onInsert:i,onClosed:t,title:o.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 _.init(e)}),n.default=_},0:function(e,n){e.exports=ReactDom},1:function(e,n){e.exports=TinyMCEActionRegistrar},2:function(e,n){e.exports=i18n},3:function(e,n){e.exports=jQuery},4:function(e,n){e.exports=Injector},5:function(e,n){e.exports=InsertLinkModal},6:function(e,n){e.exports=React}}); \ No newline at end of file +!function(e){function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="./client/src/legacy/TinyMCE_sslink-external.js")}({"./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("i18n"),o=i(r),a=t("lib/TinyMCEActionRegistrar"),l=i(a),s=t("react"),c=i(s),d=t("react-dom"),u=i(d),f=t("jquery"),p=i(f),x=t("containers/InsertLinkModal/InsertLinkModal"),m=t("lib/Injector");l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onclick:function(e){return e.execCommand("sslinkexternal")},priority:70},editorIdentifier);var k={init:function(e){e.addCommand("sslinkexternal",function(){window.jQuery("#"+e.id).entwine("ss").openLinkExternalDialog()})}},g="insert-link__dialog-wrapper--external",y=(0,m.loadComponent)((0,x.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkExternalDialog:function(){var n=e("#"+g);n.length||(n=e('
'),e("body").append(n)),n.addClass("insert-link__dialog-wrapper"),n.setElement(this),n.open()}}),e("#"+g).entwine({renderModal:function(e){var n=this,t=function(){return n.close()},i=function(){return n.handleInsert.apply(n,arguments)},r=this.getOriginalAttributes(),a=tinymce.activeEditor.selection,l=a.getContent()||"",s=a.getNode().tagName,d="A"!==s&&""===l.trim();u.default.render(c.default.createElement(y,{isOpen:e,onInsert:i,onClosed:t,title:o.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:r,identifier:"Admin.InsertLinkExternalModal",requireLinkText:d}),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},"containers/InsertLinkModal/InsertLinkModal":function(e,n){e.exports=InsertLinkModal},i18n:function(e,n){e.exports=i18n},jquery:function(e,n){e.exports=jQuery},"lib/Injector":function(e,n){e.exports=Injector},"lib/TinyMCEActionRegistrar":function(e,n){e.exports=TinyMCEActionRegistrar},react:function(e,n){e.exports=React},"react-dom":function(e,n){e.exports=ReactDom}}); \ No newline at end of file diff --git a/client/dist/js/TinyMCE_sslink.js b/client/dist/js/TinyMCE_sslink.js index 8ac561e86..6baeba9d9 100644 --- a/client/dist/js/TinyMCE_sslink.js +++ b/client/dist/js/TinyMCE_sslink.js @@ -1 +1 @@ -!function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/legacy/TinyMCE_sslink.js")}({"./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!(!t||!e)&&(o=o.map(function(t){return String(t)}).map(function(t){return t.toLowerCase()}),o.filter(function(e){if(e.indexOf("[")>-1&&e.indexOf("]")>-1){var n=e.substring(0,e.indexOf("[")),o=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(n===t.tagName.toLowerCase()&&t.getAttribute(o))return!0}else if(t.tagName&&e===t.tagName.toLowerCase())return!0;return!1}).length>0)}function r(t,e){function n(){i(l,s,o)&&(r.hide(),clearTimeout(c),c=setTimeout(function(){r.show(),r.reposition(l)},300))}var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["a"],r=new a(t,e),l=null,c=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",v=s.bottom+r.top+n+10):g>=d&&(y=" mce-arrow-down",v=s.top+r.top+n-c-8):g>=d?(y=" mce-arrow-down",v=s.top+r.top+n-c-8):b>=d&&k/2>s.bottom+r.top-h&&(y=" mce-arrow-up",v=s.bottom+r.top+n+10),0===v&&(v=n+h+5),w=u-a/2+r.left+e,s.left<0||s.right>r.width?w=r.left+e+(r.width-a)/2:a>=o?(y+=" mce-arrow-full",w=0):w<0&&s.left+a>o||w+a>o&&s.right-a<0?w=(o-a)/2:wr.width+r.left+e&&(y+=" mce-arrow-right",w=s.right-a+r.left+e),l.className=l.className.replace(/ ?mce-arrow-[\w]+/g,"")+y,this.setStyles({left:w,top:v}),this)}}]),t}();e.default=a,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(1),r=o(i),l=n(0),a=o(l),c=n(3),s=o(c),u=n("./client/src/components/TinymceInlineToolbar/TinymceInlineToolbar.js"),d=n(7),f=n(2),m=o(f),h={init:function(t){function e(){var e=tinymce.activeEditor.selection.getNode(),n=e.getAttribute("href");n&&t.execCommand(r.default.getEditorCommandFromUrl(n))}var n=this,o=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl",i=m.default._t("Admin.INSERT_LINK","Insert link"),l=m.default.inject(m.default._t("Admin.INSERT_LINK_WITH_SHORTCUT","Insert link {shortcut}"),{shortcut:"["+o+"+K]"}),a=r.default.getSortedActions("sslink",t.settings.editorIdentifier,!0).map(function(e){return Object.assign({},e,{onclick:function(){return e.onclick(t)}})});t.addButton("sslink",{icon:"link",title:l,type:"menubutton",menu:a}),t.addMenuItem("sslink",{icon:"link",text:i,menu:a}),t.addShortcut("Meta+k","Open link menu",function(){(0,s.default)('[aria-label^="'+i+'"] > button',t.container).first().click()}),t.on("preinit",function(){(0,u.setupTinyMceInlineToolbar)(t,[{type:"button",onClick:e,text:m.default._t("Admin.EDIT_LINK","Edit link")},{type:"button",onClick:function(){return n.handleRemoveLinkClick(t)},text:m.default._t("Admin.REMOVE_LINK","Remove link")}],["a[href]"])})},handleRemoveLinkClick:function(t){var e=t.execCommand("unlink"),n=t.selection.getNode();return n&&void 0!==n.normalize&&n.normalize(),e}};s.default.entwine("ss",function(t){t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch:function(){this._clearModal()},_clearModal:function(){a.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),n=(0,d.createHTMLSanitiser)(),o=n(t.Text);return this.insertLinkInEditor(e,o),this.close(),Promise.resolve()},buildAttributes:function(t){var e=t.Anchor,n=t.Link,o=t.TargetBlank,i=t.Description,r=e&&e.length?"#"+e:"";return r=r.replace(/^#+/,"#"),{href:""+n+r,target:o?"_blank":"",title:i}},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 h.init(t)}),e.default=h},0:function(t,e){t.exports=ReactDom},1:function(t,e){t.exports=TinyMCEActionRegistrar},2:function(t,e){t.exports=i18n},3:function(t,e){t.exports=jQuery},7:function(t,e){t.exports=ShortcodeSerialiser}}); \ No newline at end of file +!function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/legacy/TinyMCE_sslink.js")}({"./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!(!t||!e)&&(o=o.map(function(t){return String(t)}).map(function(t){return t.toLowerCase()}),o.filter(function(e){if(e.indexOf("[")>-1&&e.indexOf("]")>-1){var n=e.substring(0,e.indexOf("[")),o=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(n===t.tagName.toLowerCase()&&t.getAttribute(o))return!0}else if(t.tagName&&e===t.tagName.toLowerCase())return!0;return!1}).length>0)}function r(t,e){function n(){i(l,s,o)&&(r.hide(),clearTimeout(c),c=setTimeout(function(){r.show(),r.reposition(l)},300))}var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["a"],r=new a(t,e),l=null,c=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=y||b>=y?this.hide():(this.bottom?b>=d?(k=" mce-arrow-up",v=s.bottom+r.top+n+10):p>=d&&(k=" mce-arrow-down",v=s.top+r.top+n-c-8):p>=d?(k=" mce-arrow-down",v=s.top+r.top+n-c-8):b>=d&&y/2>s.bottom+r.top-h&&(k=" mce-arrow-up",v=s.bottom+r.top+n+10),0===v&&(v=n+h+5),w=u-a/2+r.left+e,s.left<0||s.right>r.width?w=r.left+e+(r.width-a)/2:a>=o?(k+=" mce-arrow-full",w=0):w<0&&s.left+a>o||w+a>o&&s.right-a<0?w=(o-a)/2:wr.width+r.left+e&&(k+=" mce-arrow-right",w=s.right-a+r.left+e),l.className=l.className.replace(/ ?mce-arrow-[\w]+/g,"")+k,this.setStyles({left:w,top:v}),this)}}]),t}();e.default=a,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("lib/TinyMCEActionRegistrar"),r=o(i),l=n("react-dom"),a=o(l),c=n("jquery"),s=o(c),u=n("./client/src/components/TinymceInlineToolbar/TinymceInlineToolbar.js"),d=n("lib/ShortcodeSerialiser"),f=n("i18n"),m=o(f),h={init:function(t){function e(){var e=tinymce.activeEditor.selection.getNode(),n=e.getAttribute("href");n&&t.execCommand(r.default.getEditorCommandFromUrl(n))}var n=this,o=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl",i=m.default._t("Admin.INSERT_LINK","Insert link"),l=m.default.inject(m.default._t("Admin.INSERT_LINK_WITH_SHORTCUT","Insert link {shortcut}"),{shortcut:"["+o+"+K]"}),a=r.default.getSortedActions("sslink",t.settings.editorIdentifier,!0).map(function(e){return Object.assign({},e,{onclick:function(){return e.onclick(t)}})});t.addButton("sslink",{icon:"link",title:l,type:"menubutton",menu:a}),t.addMenuItem("sslink",{icon:"link",text:i,menu:a}),t.addShortcut("Meta+k","Open link menu",function(){(0,s.default)('[aria-label^="'+i+'"] > button',t.container).first().click()}),t.on("preinit",function(){(0,u.setupTinyMceInlineToolbar)(t,[{type:"button",onClick:e,text:m.default._t("Admin.EDIT_LINK","Edit link")},{type:"button",onClick:function(){return n.handleRemoveLinkClick(t)},text:m.default._t("Admin.REMOVE_LINK","Remove link")}],["a[href]"])})},handleRemoveLinkClick:function(t){var e=t.execCommand("unlink"),n=t.selection.getNode();return n&&void 0!==n.normalize&&n.normalize(),e}};s.default.entwine("ss",function(t){t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch:function(){this._clearModal()},_clearModal:function(){a.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),n=(0,d.createHTMLSanitiser)(),o=n(t.Text);return this.insertLinkInEditor(e,o),this.close(),Promise.resolve()},buildAttributes:function(t){var e=t.Anchor,n=t.Link,o=t.TargetBlank,i=t.Description,r=e&&e.length?"#"+e:"";return r=r.replace(/^#+/,"#"),{href:""+n+r,target:o?"_blank":"",title:i}},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 h.init(t)}),e.default=h},i18n:function(t,e){t.exports=i18n},jquery:function(t,e){t.exports=jQuery},"lib/ShortcodeSerialiser":function(t,e){t.exports=ShortcodeSerialiser},"lib/TinyMCEActionRegistrar":function(t,e){t.exports=TinyMCEActionRegistrar},"react-dom":function(t,e){t.exports=ReactDom}}); \ No newline at end of file diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 95cf8c55d..3be8f5e36 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 a=function(){function e(e,t){for(var n=0;n0}},{key:"handleBeforeUnload",value:function(e,t){return t(!this.shouldConfirmBeforeUnload()||confirm(C.default._t("Admin.CONFIRMUNSAVEDSHORT","WARNING: Your changes have not been saved.")))}},{key:"handleBeforeRoute",value:function(e,t){return t(!this.shouldConfirmBeforeUnload()||confirm(C.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=k},"./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/bundle.esm.js"),o=n("./client/src/boot/apollo/dataIdFromObject.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e){return new r.InMemoryCache({fragmentMatcher:e?new r.IntrospectionFragmentMatcher({introspectionQueryResultData:e}):null,dataIdFromObject:a.default,addTypename:!0})};t.default=i},"./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,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.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(15),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=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,p,h=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=!!document.body.getAttribute("data-graphql-legacy"),o=[t+"_graphql/admin.types.graphql",t+"admin.types.graphql"],l=[t+"admin/graphql/types",t+"assets/admin.types.graphql"],c=void 0,u=void 0,n?(h&&l.reverse(),c=l[0],u=l[1]):(c=o[0],u=o[1]),d={method:"GET",headers:{"Content-Type":"application/json"},uri:""+t,credentials:"same-origin"},f=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,a.default)(t,d).then(s).then(function(e){return e.json()}).then(i));case 1:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}(),p=void 0,e.prev=9,e.next=12,f(c);case 12:p=e.sent,e.next=28;break;case 15:if(e.prev=15,e.t0=e.catch(9),u){e.next=19;break}return e.abrupt("return",Promise.reject(e.t0));case 19:return e.prev=19,e.next=22,f(u);case 22:p=e.sent,e.next=28;break;case 25:return e.prev=25,e.t1=e.catch(19),e.abrupt("return",Promise.reject(e.t1));case 28:return e.abrupt("return",Promise.resolve(p));case 29:case"end":return e.stop()}},e,void 0,[[9,15],[19,25]])}));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(7)},"./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 a=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 a({},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,i=t?e.data.pristineIcon:e.data.dirtyIcon;return a({},e,{title:r||e.title,icon:i||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),i=Object.keys(e).reduce(function(e,t){var i=(0,f.findField)(n.fields,t);if(!i)return e;var s=r.validateFieldSchema(i),l=s.valid,c=s.errors;return l?e:a({},e,o({},t,c))},{});return t.addErrors(i),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,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var a=function(){var e=o(regeneratorRuntime.mark(function e(){var t,n,r,o,a,i,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"),a=u.applyMiddleware.apply(void 0,r),o&&(a=(0,O.default)(a)),i=a(u.createStore),window.ss.apolloClient=n,l=new s.default(null,n),(0,C.default)(),c.default.init(function(){var e=(0,u.combineReducers)(c.default.reducer.getAll()),t=i(e,{});t.dispatch((0,v.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)}}(),i=n("./client/src/boot/BootRoutes.js"),s=r(i),l=n(10),c=r(l),u=n(7),d=n(56),f=r(d),p=n(19),h=r(p),m=n("./client/src/boot/apollo/buildClient.js"),b=r(m),v=n("./client/src/state/config/ConfigActions.js"),g=n("./client/src/boot/registerComponents.js"),y=r(g),_=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=a},"./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(12),a=n(10),i=r(a),s=n("./client/src/components/ActionMenu/ActionMenu.js"),l=r(s),c=n(30),u=r(c),d=n(18),f=r(d),p=n(28),h=r(p),m=n("./client/src/components/TextField/TextField.js"),b=r(m),v=n("./client/src/components/HiddenField/HiddenField.js"),g=r(v),y=n("./client/src/components/DateField/DateField.js"),_=r(y),j=n("./client/src/components/TimeField/TimeField.js"),w=r(j),O=n("./client/src/components/DatetimeField/DatetimeField.js"),E=r(O),C=n("./client/src/components/CheckboxField/CheckboxField.js"),T=r(C),x=n("./client/src/components/CheckboxSetField/CheckboxSetField.js"),S=r(x),k=n("./client/src/components/OptionsetField/OptionsetField.js"),P=r(k),F=n(46),D=r(F),A=n("./client/src/components/GridFieldActions/GridFieldActions.js"),M=r(A),R=n("./client/src/components/SingleSelectField/SingleSelectField.js"),I=r(R),N=n("./client/src/components/PopoverField/PopoverField.js"),L=r(N),B=n("./client/src/components/HeaderField/HeaderField.js"),U=r(B),H=n(47),V=r(H),G=n("./client/src/components/HtmlReadonlyField/HtmlReadonlyField.js"),q=r(G),z=n("./client/src/components/LookupField/LookupField.js"),$=r(z),W=n("./client/src/components/CompositeField/CompositeField.js"),K=r(W),X=n("./client/src/components/LabelField/LabelField.js"),Y=r(X),Q=n("./client/src/components/Tabs/Tabs.js"),J=r(Q),Z=n("./client/src/components/Tabs/TabItem.js"),ee=r(Z),te=n(43),ne=r(te),re=n("./client/src/components/FieldGroup/FieldGroup.js"),oe=r(re),ae=n(38),ie=r(ae),se=n(33),le=r(se),ce=n("./client/src/components/NotFoundComponent/NotFoundComponent.js"),ue=r(ce),de=n("./client/src/components/Form/Form.js"),fe=r(de),pe=n(20),he=r(pe),me=n(49),be=r(me),ve=n("./client/src/containers/Form/Form.js"),ge=r(ve),ye=n("./client/src/components/UsedOnTable/UsedOnTable.js"),_e=r(ye),je=n(23),we=r(je),Oe=n(60),Ee=r(Oe),Ce=n(62),Te=r(Ce),xe=n(25),Se=r(xe),ke=n(26),Pe=r(ke),Fe=n(36),De=r(Fe),Ae=n(31),Me=r(Ae),Re=n("./client/src/components/Tip/Tip.js"),Ie=r(Re),Ne=n(35),Le=r(Ne),Be=n(58),Ue=r(Be),He=n("./client/src/components/HtmlEditorField/HtmlEditorField.js"),Ve=r(He),Ge=n("./client/src/components/NumberField/NumberField.js"),qe=r(Ge),ze=n("./client/src/components/PopoverOptionSet/PopoverOptionSet.js"),$e=r(ze),We=n("./client/src/containers/ToastsContainer/ToastsContainer.js"),Ke=r(We);t.default=function(){i.default.component.registerMany({ActionMenu:l.default,Badge:u.default,Button:f.default,BackButton:h.default,TextField:b.default,HiddenField:g.default,DateField:_.default,TimeField:w.default,DatetimeField:E.default,CheckboxField:T.default,CheckboxSetField:S.default,OptionsetField:P.default,GridField:D.default,GridFieldActions:M.default,FieldGroup:oe.default,SingleSelectField:I.default,PopoverField:L.default,HeaderField:U.default,LiteralField:V.default,HtmlReadonlyField:q.default,LookupField:$.default,CompositeField:K.default,Tabs:J.default,TabItem:ee.default,FormAction:ne.default,LabelField:Y.default,TreeDropdownField:ie.default,Preview:be.default,ReduxForm:ge.default,ReduxFormField:o.Field,Form:fe.default,FormAlert:he.default,FormBuilderModal:le.default,NotFoundComponent:ue.default,UsedOnTable:_e.default,Loading:we.default,VersionedBadge:Ee.default,ViewModeToggle:Te.default,ResizeAware:Se.default,Tag:Pe.default,TagList:De.default,CompactTagList:Me.default,Tip:Ie.default,Search:Le.default,SearchToggle:Ue.default,HtmlEditorField:Ve.default,NumberField:qe.default,PopoverOptionSet:$e.default,ToastsContainer:Ke.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:f.default});i.default.reducer.registerMany(o({config:u.default,form:t,records:h.default,breadcrumbs:b.default,treeDropdownField:g.default,tabs:_.default,mobileMenu:w.default,unsavedForms:E.default,usedOn:T.default,viewMode:P.default,toasts:D.default},e)),i.default.transform("admin",function(e){e.reducer("form",S.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?ToastsActions!./client/src/state/toasts/ToastsActions.js-exposed"),n("./node_modules/expose-loader/index.js?FileStatusIcon!./client/src/components/FileStatusIcon/FileStatusIcon.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?Button!./client/src/components/Button/Button.js-exposed"),n("./node_modules/expose-loader/index.js?BackButton!./client/src/components/Button/BackButton.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?FileStatusIcon!./client/src/components/FileStatusIcon/FileStatusIcon.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?TabsActions!./client/src/state/tabs/TabsActions.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?Tip!./client/src/components/Tip/Tip.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?Button!./client/src/components/Button/Button.js-exposed"),n("./node_modules/expose-loader/index.js?BackButton!./client/src/components/Button/BackButton.js-exposed"),n("./node_modules/expose-loader/index.js?VersionedBadge!./client/src/components/VersionedBadge/VersionedBadge.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("./node_modules/expose-loader/index.js?withDragDropContext!./client/src/lib/withDragDropContext.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/ToastsContainer.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 a(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 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 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 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(f.default,s({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);v.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},v.defaultProps={extraClass:"",className:"",value:[]},t.Component=v;var g=function(e){var t=(0,h.default)(v);return u.default.createElement(t,e)};t.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 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 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}),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}function a(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 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=g.default.string,y.propTypes=g.default.arrayOf(g.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 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 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;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(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 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),a=o&&o.values||{},i=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:a,formIsDirty:(0,T.isDirty)(r,D.default)(e),schemaName:r,tagData:i}}function d(e){return{actions:{schema:(0,w.bindActionCreators)(E,e),reduxForm:(0,w.bindActionCreators)({reset:C.reset,initialize:C.initialize,change:C.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var f=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}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")}}(),p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=this.props,n=t.name,r=t.filterPrefix,o=t.formData,a=this.state.searchText,i={};return Object.keys(o).forEach(function(e){var t=o[e];t&&(i[e]=t)}),!e&&a&&void 0===o[""+r+n]&&(i[""+r+n]=a.trim()),i}},{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.name,a=n.filterPrefix,i=n.actions;void 0!==n.formData[""+a+o]&&i.reduxForm.change(r,""+a+o,t)}},{key:"focusInput",value:function(){if(this.state.display!==G.NONE){var e=j.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=j.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,{fields:[]}),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=a({},e,void 0),r=this.props,o=r.schemaName,i=r.filters;this.props.actions.reduxForm.change(o,e,""),this.setOverrides(p({},this.props,{filters:p({},i,a({},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.clearSearchBox(),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=this.props,n=t.name,r=t.filterPrefix,o={},a=this.getData();Object.entries(a).forEach(function(t){var i=f(t,2),s=i[0],l=i[1],c=s,u=l;e.hasOwnProperty(s)&&(u=e[s]),r.length>0&&s.startsWith(r)&&(c=s.substring(r.length)),(!r.length>0||s!==n||void 0===a[""+r+n])&&(o[c]=u)});var i=o[n]||"";this.state.display===G.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:G.VISIBLE,initialSearchText:i,searchText:i}),this.props.onSearch(o)}},{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,r=e.filterPrefix,o=Object.assign({},t),a=""+r+n;return o&&o[a]&&delete o[a],o?Object.values(o).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,a=e.displayBehavior,i=e.identifier,s=e.formIsDirty,l=(e.tagData,e.name),c=o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData","name"]);if(this.state.display===G.NONE)return a===q.TOGGLABLE?g.default.createElement(L.default,{onToggle:this.show}):g.default.createElement("div",null);var u=r+"_ExtraFields",d=this.state.searchText,f=this.state.display===G.EXPANDED,h=this.state.display===G.VISIBLE,m=[q.HIDEABLE,q.TOGGLABLE].includes(a),b=s||this.searchTermIsDirty(),v=this.getData(),y=Object.keys(v).length>0;return g.default.createElement(P.default,{onClickOut:this.show,className:"search"},g.default.createElement(M.default,p({},c,{name:"SearchBox__"+l,onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:d,hideable:m,expanded:f,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:b,clearable:y,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),g.default.createElement(I.default,{id:u,identifier:i,visible:h,expanded:f,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:y})))}}]),t}(v.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,filterPrefix: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:b.default._t("Admin.SEARCH","Search"),display:G.VISIBLE,displayBehavior:q.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=z,t.hasFilters=c,t.default=(0,y.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 a(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 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,a=n.searchText,i=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:i,onFocus:this.handleFocus,onBlur:this.handleBlur,value:a,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","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")},"Search options")}},{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,a=e.showFilters,i=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":a,"search-box--has-not-filters":!a,"search-box--compact":this.state.width<576,"search-box--expanded":o}),c=(i||!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"}),a&&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(v.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){return function(t){"Enter"===t.key&&(t.preventDefault(),e())}}function a(e){var t=e.visible,n=e.expanded,r=e.onSearch,a=e.onClear,i=e.formSchemaUrl,s=e.id,l=e.identifier,u=e.clearable,p=o(r),h=t||n;return c.default.createElement(f.Collapse,{id:s,isOpen:n,className:"search-form"},c.default.createElement("div",{className:"search-form__wrapper",onKeyDown:p},h&&i&&c.default.createElement(d.default,{className:"no-change-track",formTag:"div",identifier:l,schemaUrl:i,onSubmit:function(){return r(),Promise.resolve()}}),c.default.createElement(f.Button,{className:"search-form__submit",onClick:function(){return r()},color:"primary",type:"button"},m),u&&c.default.createElement(f.Button,{className:"search-form__clear",onClick:function(){return a()}},b)))}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var i=n(4),s=r(i),l=n(0),c=r(l),u=n(32),d=r(u),f=n(5),p=n(1),h=r(p),m=s.default._t("Admin.SEARCH","Search"),b=s.default._t("Admin.CLEAR","Clear");a.propTypes={onSearch:h.default.func,onClear:h.default.func,visible:h.default.bool,expanded:h.default.bool,id:h.default.string.isRequired,formSchemaUrl:h.default.string,identifier:h.default.string,clearable:h.default.bool},a.defaultProps={formData:{}},t.Component=a,t.default=a},"./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(4),a=r(o),i=n(0),s=r(i),l=n(5),c=n(2),u=r(c),d=n(1),f=r(d),p=a.default._t("Admin.SHOW_SEARCH","Show search"),h=function(e){return(0,u.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e})},m=function(e){var t=e.onToggle,n=e.toggled;return s.default.createElement(l.Button,{title:p,onClick:t,className:h(n)},s.default.createElement("span",{className:"sr-only"},p))};m.propTypes={onToggle:f.default.func,toggled:f.default.bool},t.Component=m,t.default=m},"./client/src/components/Search/utilities/defaultTagHandlers.js":function(e,t,n){"use strict";function r(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}Object.defineProperty(t,"__esModule",{value:!0});var o=n("./client/src/components/Search/utilities/genericDateTagHandler.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=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,a.default)("ll"),Time:(0,a.default)("LT"),Datetime:(0,a.default)("lll"),Hidden:function(){return!1},SingleSelect:function(e,t,n){if(void 0===e.value)return!1;var r=i(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=i(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(14),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=function(e){return function(t,n){var r=n.lang;if(!t.value)return!1;if(t.value&&r){o.default.locale(r);var a=(0,o.default)(t.value);if(a.isValid())return Object.assign({},t,{value:a.format(e)})}return t}};t.default=a},"./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),a=function(e,t){var n=t.key,r=t.value;return""+e+(t.label.toLowerCase()||n)+" "+(r||"")+" "},i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.metadata.loading)return{};var r=void 0,i=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(i).filter(function(e){return!1!==e}).reduce(a,"").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(i).filter(function(e){return!1!==e}),u={};return c.forEach(function(e){u[e.key]=e}),u};t.default=i},"./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 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 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}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t1?s.default.createElement(l.Nav,{tabs:!0,role:"tablist"},o):null}Object.defineProperty(t,"__esModule",{value:!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 a=Object.assign||function(e){for(var t=1;t1}}]),t}(f.default);t.Component=p,t.default=(0,u.default)(p)},"./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 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 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}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t0&&i.default.createElement(h.ToastActions,{actions:a,onDismiss:r,dismissed:o}))};g.propTypes=o({},v,{onDismiss:l.default.func.isRequired}),g.defaultProps={actions:[]},t.default=g},"./client/src/components/Toasts/ToastActions.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ToastActions=t.ToastAction=void 0;var o=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 a=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0;if(!n)return[];if(!t||0===Object.keys(t).length)return null;if(t.id===n)return[t.id];if(!t.children)return null;var o=!0,a=!1,i=void 0;try{for(var s,l=t.children[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var c=s.value,u=e(c,n);if(null!==u)return t.id&&t.id!==r&&u.unshift(t.id),u}}catch(e){a=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(a)throw i}}return null}},"./client/src/components/UsedOnTable/UsedOnTable.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 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 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}),t.Component=void 0;var s=function(){function e(e,t){for(var n=0;n=25&&(o=o.substring(0,25).trim()+"..."),s&&(a=s);var l=t+"-"+n+"-"+r,u=["used-on__title-item"];return i&&(u.push("used-on__title-item--first"),i=!1),c.default.createElement("li",{className:(0,p.default)(u),key:l},o)}),l=t+"-"+n;return c.default.createElement("tr",{key:l,className:"used-on__row"},c.default.createElement("td",{className:"used-on__col--index"},c.default.createElement("a",{href:a,className:"used-on__cell-link"},t+1)),c.default.createElement("td",{className:"used-on__col--title"},c.default.createElement("a",{href:a,className:"used-on__cell-link"},c.default.createElement("ul",{className:"used-on__title-items"},s),c.default.createElement("span",{className:"used-on__type"},r))))}},{key:"render",value:function(){return c.default.createElement("table",{className:"table used-on__table"},this.renderHeader(),this.renderBody())}}]),t}(l.PureComponent);_.propTypes={loading:d.default.bool,usedOn:d.default.arrayOf(d.default.shape({id:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,type:d.default.string,link:d.default.string,ancestors:d.default.arrayOf(d.default.shape({title:d.default.string,link:d.default.string})).isRequired})),error:d.default.string},t.Component=_,t.default=(0,y.default)(_)},"./client/src/components/UsedOnTable/provideUsedOnData.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 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 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,t=e.data.readUsageEndpoint||{},n=t.method,r=t.url;this.haveFetchedData&&!this.props.forceFetch||e.loadUsedOn(e.identifier,n,r),this.haveFetchedData=!0}},{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,forceFetch:d.default.bool};var n=function(e,t){var n=t.data,r=n.recordClass,o=n.recordId,a=r&&o?r+"#"+o:"",i=e.usedOn;return{identifier:a,loading:i.loading.includes(a),usedOn:i.usedOn[a]||null,error:i.errors[a]||null}},r=(0,h.injectTabContext)(t),u=(0,f.connect)(n,{loadUsedOn:p.loadUsedOn})(r);return u.Component=r,u};t.default=m},"./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),a=n(10),i=n("./node_modules/react-router-config/esm/react-router-config.js"),s=function(e){var t=e.route;return o.default.createElement("div",{className:"app"},(0,i.renderRoutes)(t.routes()))};t.default=(0,a.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)},i=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+"/"+i,f=a.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(3),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(3),a=r(o),i=n(4),s=r(i),l=n(14),c=r(l),u=n(22),d=r(u);a.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 a=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L")});this.attr("placeholder",a),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 a=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L LT")});this.attr("placeholder",a),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").addClass("ss-gridfield-item loading").attr("colspan",l);s.append(e("").append(p)),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(o){if(r.empty().append(e(o).children()),a&&r.find(':input[name="'+a+'"]').focus(),r.find(".grid-field__filter-header, .grid-field__search-holder").length){var i="show"===t.data[0].filter;r.needsColumnFix()&&r.fixColumns(),r.injectSearchButton(i)}n&&n.apply(this,arguments),r.trigger("reload",r),!1!==t.data[0].triggerChange&&r.trigger("change")},error:function(e){alert(c.default._t("Admin.ERRORINTRANSACTION"))},complete:function(e,t){r.find(".loading").removeClass("loading")}},t))},showDetailView:function(e){window.location.href=e},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(e,t){var n=this.getState();n[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(n))},getState:function(){var e=this.find(':input[name="'+this.data("name")+'[GridState]"]').val();return e?JSON.parse(e):{}},hasFilters:function(){return!!this.getState().GridFieldFilterHeader},needsColumnFix:function(){return this.find(".grid-field__filter-header, .grid-field__search-holder").length&&!this.find(".grid-field__col-compact").length&&!this.find("th.col-Actions").length},fixColumns:function(t){this.find(".sortable-header").append(''),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)},keepStateInHistory:function(){var t=this,n=e(this).find(".gridfield-actionmenu__container").data("schema");n&&n.length>0&&n.filter(function(e){if("link"===e.type){var n=t.buildURLString(e.url),r=n?"?"+n.join("&"):"";window.ss.router.replace(window.location.pathname+r,void 0,void 0,!1)}})},buildURLString:function(e){var t=[window.location.origin,e].join("/"),n=[window.location.search,new URL(t).searchParams.toString()].join("&").substring(1),r=[],o=[];return n.split("&").forEach(function(e){var t=e.split("=");r[t[0]]=t[1]?t[1]:""}),Object.keys(r).forEach(function(e){o.push([e,r[e]].join("="))}),o}}),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=[{name:this.attr("name"),value:this.val(),filter:n,triggerChange:r}],a=this.data("action-state");a&&o.push({name:"ActionState",value:JSON.stringify(a)});var i=e(this).getGridField(),s=function(t,n,r){i.keepStateInHistory();var o=r.getResponseHeader("X-Message-Text"),a=r.getResponseHeader("X-Message-Type");if(o&&a){var s=e("#Form_EditForm_error");s.addClass(a),s.html(o),s.show()}};i.reload({data:o},s),t.preventDefault()},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),r=this.closest("form"),o=r.find(":input.gridstate").serialize(),a=r.find('input[name="SecurityID"]').val();o+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),a&&(o+="&SecurityID="+encodeURIComponent(a));var i=this.data("action-state");i&&(o+="&ActionState="+encodeURIComponent(JSON.stringify(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","Are you sure you want to archive this record?"):c.default._t("Admin.DELETECONFIRMMESSAGE","Are you sure you want to delete this record?");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 t=this.data("schema"),n=[{name:t.clearAction,value:"",filter:"hidden",triggerChange:!1}];t.clearActionState&&n.push({name:"ActionState",value:t.clearActionState});var r=e(this).getGridField(),o=function(){r.keepStateInHistory()};r.reload({data:n},o)},search:function(t){var n=this.data("schema"),r=[{name:n.searchAction,value:"",filter:"show",triggerChange:!1}];n.searchActionState&&r.push({name:"ActionState",value:n.searchActionState});var o=!0,i=!1,s=void 0;try{for(var l,c=Object.entries(t)[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value,d=a(u,2),f=d[0],p=d[1];if(p){var h="filter["+n.gridfield+"]["+f+"]";r.push({name:h,value:p})}}}catch(e){i=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(i)throw s}}var m=e(this).getGridField(),b=function(){m.keepStateInHistory()};m.reload({data:r},b)},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},a=function(t){return e.search(t)};String(t.gridfield).replace(/\-/g,"."),p.default.render(d.default.createElement(n,o({id:t.gridfield+"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:r,onSearch:a},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(t){if(!this.closest(".ss-gridfield-button-reset").length){var n=this.closest(".extra").find(".ss-gridfield-button-filter"),r=this.closest(".extra").find(".ss-gridfield-button-reset");if("13"==t.keyCode){var o=this.closest(".grid-field__filter-header").find(".ss-gridfield-button-filter"),a="show";!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(a="hidden");var i=[{name:o.attr("name"),value:o.val(),filter:a,triggerChange:!1}];o.data("action-state")&&i.push({name:"ActionState",value:JSON.stringify(o.data("action-state"))});var s=e(this).getGridField(),l=function(){s.keepStateInHistory()};return s.reload({data:i},l),!1}n.addClass("hover-alike"),r.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();r.setState("GridFieldPaginator",{currentPage:n});var o=function(){r.keepStateInHistory()};return r.reload({},o),!1}}})})},"./client/src/legacy/HtmlEditorField.js":function(module,exports,__webpack_require__){"use strict";(function($){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _jquery=__webpack_require__(3),_jquery2=_interopRequireDefault(_jquery);__webpack_require__("./node_modules/events-polyfill/index.js");var 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"),t.getElement().dispatchEvent(new Event("input",{bubbles:!0})))},create:function(){function e(e,t){var r=$(e).scrollTop();$(".mce-floatpanel").each(function(e,n){var o=parseFloat(n.style.top);$(n).css("top",o-(r-t)+"px")}),$(".mce-floatpanel").css("opacity","1"),n=void 0}function t(t){var a=t.target;!n||(new Date-n)/100>500?(o=$(a).scrollTop(),$(".mce-floatpanel").css("opacity","0")):window.clearTimeout(r),n=new Date,r=window.setTimeout(function(){return e(a,o)},500)}var n=void 0,r=void 0,o=void 0,a=this.getConfig();void 0!==a.baseURL&&(tinymce.EditorManager.baseURL=a.baseURL),tinymce.init(a).then(function(e){e.length>0&&e[0].container&&$(e[0].container).closest(".panel--scrollable").on("scroll",function(e){return t(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){n=n.replaceAll("<","<").replaceAll(">",">");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()},onunmatch:function(){this.getEditor()&&this.onremove(),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('